@editora/ui-core 0.1.14 → 0.1.16
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/README.md +8 -2
- package/dist/components/ui-dialog.d.ts.map +1 -1
- package/dist/components/ui-sortable.d.ts.map +1 -1
- package/dist/dialog.cjs.js +11 -11
- package/dist/dialog.esm.js +2 -8
- package/dist/sortable.cjs.js +1 -1
- package/dist/sortable.esm.js +49 -48
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
# @editora/ui-core
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@editora/ui-core)
|
|
4
|
+
[](https://github.com/ajaykr089/Editora/blob/main/LICENSE)
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
6
|
+
[](https://bundlephobia.com/package/@editora/ui-core)
|
|
7
|
+
|
|
3
8
|

|
|
4
9
|
|
|
5
10
|
## Demos
|
|
6
11
|
|
|
7
|
-
- **CodeSandbox:** https://
|
|
12
|
+
- **CodeSandbox:** https://codesandbox.io/p/github/ajaykr089/editora-codesandbox/main
|
|
13
|
+
- **CodeSandboxUI Components:** https://qjr47y-5173.csb.app/button
|
|
8
14
|
- **UI Component Catalog:** https://editora-ecosystem.netlify.app/
|
|
9
15
|
- **Web Demo:** https://editora-free.netlify.app/
|
|
10
16
|
- **Storybook:** https://editora-ecosystem-storybook.netlify.app/
|
|
@@ -94,7 +100,7 @@ More guidance lives in [`docs/FRAMEWORK_DIRECT_USAGE.md`](https://github.com/aja
|
|
|
94
100
|
|
|
95
101
|
### Primitives and forms
|
|
96
102
|
- `ui-button`, `ui-split-button`, `ui-input`, `ui-textarea`, `ui-label`, `ui-description`, `ui-field-error`, `ui-control-group`, `ui-fieldset`, `ui-field`, `ui-form`, `ui-pin-input`, `ui-otp-input`, `ui-inline-edit`
|
|
97
|
-
- `ui-checkbox`, `ui-radio-group`, `ui-switch`, `ui-slider`, `ui-select`, `ui-combobox`
|
|
103
|
+
- `ui-checkbox`, `ui-radio`, `ui-radio-group`, `ui-switch`, `ui-slider`, `ui-select`, `ui-combobox`
|
|
98
104
|
- `ui-date-picker`, `ui-date-range-picker`, `ui-time-picker`, `ui-date-time-picker`, `ui-date-range-time-picker`
|
|
99
105
|
- `ui-color-picker`
|
|
100
106
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-dialog.d.ts","sourceRoot":"","sources":["../../src/components/ui-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAgY7C,KAAK,YAAY,GAAG,QAAQ,GAAG,aAAa,CAAC;AAC7C,KAAK,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAC9D,KAAK,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AACtD,KAAK,qBAAqB,GAAG,SAAS,GAAG,KAAK,GAAG,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC;AAEjH,MAAM,MAAM,0BAA0B,GAClC,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,cAAc,GACd,QAAQ,GACR,QAAQ,CAAC;AAEb,MAAM,WAAW,uBAAuB;IACtC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,IAAI,CAAC,EAAE,YAAY,C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8BzB,OAAO,CAAC,cAAc;IAqCtB,OAAO,CAAC,cAAc;IAsBtB,OAAO,CAAC,YAAY;IA6BpB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,aAAa;IAkCrB,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,YAAY;IAkBpB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,QAAQ;IA4BhB,OAAO,CAAC,WAAW;IAqJnB,OAAO,CAAC,wBAAwB;IAoBhC,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,gBAAgB;IAUxB,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,eAAe;IAkBvB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,yBAAyB;IAKjC,OAAO,CAAC,oBAAoB;IAsB5B,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,oBAAoB;IAyC5B,OAAO,CAAC,0BAA0B;IAWlC,OAAO,CAAC,uBAAuB;CAahC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
package/dist/dialog.cjs.js
CHANGED
|
@@ -372,10 +372,10 @@
|
|
|
372
372
|
box-shadow: none;
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
|
-
`,W='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function g(n,t){if(n==null)return t;const i=n.trim().toLowerCase();return i!=="false"&&i!=="0"&&i!=="off"}function a(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function S(){return typeof window<"u"&&typeof document<"u"}function C(n){return typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>n()):window.setTimeout(n,16)}function p(n){if(n){if(typeof cancelAnimationFrame=="function"){cancelAnimationFrame(n);return}window.clearTimeout(n)}}const E=class l extends z.ElementBase{constructor(){super(),this._isActive=!1,this._uid=Math.random().toString(36).slice(2,10),this._dialogId=this._uid,this._lastFocused=null,this._terminalEmitted=!1,this._closeMeta=null,this._runtimeError="",this._config={},this._dismissableLayer=null,this._focusScope=null,this._disconnectCleanupFrame=0,this._restoreFocusFrame=0,this._onClick=this._onClick.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onFocusIn=this._onFocusIn.bind(this),this._onSubmit=this._onSubmit.bind(this)}static get observedAttributes(){return["open","headless","title","description","closable","dismissible","close-on-overlay","close-on-backdrop","close-on-esc","lock-while-loading","size","state","role","initial-focus","submit-text","cancel-text","loading-text","error-message","aria-label","aria-labelledby","aria-describedby"]}connectedCallback(){this._disconnectCleanupFrame&&(p(this._disconnectCleanupFrame),this._disconnectCleanupFrame=0),super.connectedCallback(),this.root.addEventListener("click",this._onClick),this.root.addEventListener("keydown",this._onKeyDown),this.addEventListener("submit",this._onSubmit),this._syncFromAttributes(),this._syncOpenState()}disconnectedCallback(){this.root.removeEventListener("click",this._onClick),this.root.removeEventListener("keydown",this._onKeyDown),this.removeEventListener("submit",this._onSubmit),this._disconnectCleanupFrame&&p(this._disconnectCleanupFrame),this._restoreFocusFrame&&(p(this._restoreFocusFrame),this._restoreFocusFrame=0),this._disconnectCleanupFrame=C(()=>{this._disconnectCleanupFrame=0,!this.isConnected&&(this._isActive&&!this._terminalEmitted?this.close("dismiss","unmount"):(this._destroyRuntimeControllers(),this._deactivate()),super.disconnectedCallback())})}attributeChangedCallback(t,i,e){if(i!==e){if(t==="open"){this._syncOpenState();return}t==="state"&&e!=="error"&&(this._runtimeError=""),this._syncFromAttributes(),this.isConnected&&this.requestRender()}}get open(){return this.hasAttribute("open")}set open(t){t?this.setAttribute("open",""):this.close("dismiss","programmatic")}get dismissible(){return g(this.getAttribute("dismissible")??this.getAttribute("closable"),!0)}set dismissible(t){this.setAttribute("dismissible",String(t)),this.setAttribute("closable",String(t))}get closeOnOverlay(){return g(this.getAttribute("close-on-overlay")??this.getAttribute("close-on-backdrop"),!0)}set closeOnOverlay(t){this.setAttribute("close-on-overlay",String(t)),this.setAttribute("close-on-backdrop",String(t))}get closeOnEsc(){return g(this.getAttribute("close-on-esc"),!0)}set closeOnEsc(t){this.setAttribute("close-on-esc",String(t))}get lockWhileLoading(){return g(this.getAttribute("lock-while-loading"),!0)}set lockWhileLoading(t){this.setAttribute("lock-while-loading",String(t))}get state(){const t=this.getAttribute("state");return t==="loading"||t==="error"||t==="success"?t:"idle"}set state(t){if(t==="idle"){this.removeAttribute("state");return}this.setAttribute("state",t)}get dialogId(){return this._dialogId}set dialogId(t){this._dialogId=t||this._uid,this.requestRender()}get config(){return this._config}set config(t){this._config=t||{},this._config.id&&(this._dialogId=this._config.id),this._config.dismissible!=null&&(this.dismissible=!!this._config.dismissible),this._config.closeOnOverlay!=null&&(this.closeOnOverlay=!!this._config.closeOnOverlay),this._config.closeOnEsc!=null&&(this.closeOnEsc=!!this._config.closeOnEsc),this._config.lockWhileLoading!=null&&(this.lockWhileLoading=!!this._config.lockWhileLoading),this._config.size&&this.setAttribute("size",this._config.size),this._config.role&&this.setAttribute("role",this._config.role),this._config.initialFocus&&this.setAttribute("initial-focus",this._config.initialFocus),this._config.ariaLabel&&this.setAttribute("aria-label",this._config.ariaLabel),this._config.ariaLabelledby&&this.setAttribute("aria-labelledby",this._config.ariaLabelledby),this._config.ariaDescribedby&&this.setAttribute("aria-describedby",this._config.ariaDescribedby),this._config.errorMessage&&(this._runtimeError=this._config.errorMessage),this.requestRender()}openDialog(){this.setAttribute("open","")}closeDialog(t="programmatic"){if(!this.hasAttribute("open"))return;const i=new CustomEvent("request-close",{detail:{reason:t},bubbles:!0,cancelable:!0,composed:!0});this.dispatchEvent(i);const e=new CustomEvent("ui-request-close",{detail:{id:this.dialogId||this._uid,reason:t},bubbles:!0,cancelable:!0,composed:!0});if(this.dispatchEvent(e),!(i.defaultPrevented||e.defaultPrevented)){if(t==="submit"){this.close("submit");return}if(t==="cancel"){this.close("cancel");return}if(t==="overlay"){this.close("dismiss","overlay");return}if(t==="escape"){this.close("dismiss","esc");return}if(t==="button"){this.close("dismiss","close-icon");return}this.close("dismiss","programmatic")}}close(t="dismiss",i,e){this._terminalEmitted||(this._closeMeta={action:t,source:i,reason:e},this.hasAttribute("open")&&this.removeAttribute("open"),this._syncOpenState())}setError(t){this._runtimeError=t,this.state=t?"error":"idle",this.requestRender()}clearError(){this._runtimeError="",this.state==="error"&&(this.state="idle"),this.requestRender()}_syncFromAttributes(){!this.hasAttribute("dismissible")&&this.hasAttribute("closable")&&this.setAttribute("dismissible",this.getAttribute("closable")||"true"),!this.hasAttribute("closable")&&this.hasAttribute("dismissible")&&this.setAttribute("closable",this.getAttribute("dismissible")||"true"),!this.hasAttribute("close-on-overlay")&&this.hasAttribute("close-on-backdrop")&&this.setAttribute("close-on-overlay",this.getAttribute("close-on-backdrop")||"true"),!this.hasAttribute("close-on-backdrop")&&this.hasAttribute("close-on-overlay")&&this.setAttribute("close-on-backdrop",this.getAttribute("close-on-overlay")||"true"),this.hasAttribute("role")||this.setAttribute("role","dialog")}_syncOpenState(){const t=this.hasAttribute("open");t&&!this._isActive?this._activate():!t&&this._isActive&&this._deactivate(),this._syncOpenUi()}_activate(){this._isActive=!0,this._terminalEmitted=!1,this._closeMeta=null,l._openStack.includes(this)||l._openStack.push(this),this._lastFocused=document.activeElement||null,F.acquireBodyScrollLock();const t=this.dialogId||this._uid;this._dispatchWithLegacy("ui-open","open",{id:t}),this.dispatchEvent(new CustomEvent("show",{bubbles:!0,composed:!0})),this._syncOpenUi(),this._syncRuntimeControllers()}_deactivate(){if(!this._isActive)return;this._isActive=!1,this._destroyRuntimeControllers();const t=l._openStack.lastIndexOf(this);if(t>=0&&l._openStack.splice(t,1),F.releaseBodyScrollLock(),!this._terminalEmitted){const e=this._closeMeta||{action:"dismiss",source:"abort"},s=this.dialogId||this._uid;e.action==="cancel"?this._dispatchWithLegacy("ui-cancel","cancel",{id:s}):this._dispatchWithLegacy("ui-dismiss","dismiss",{id:s,source:e.source||"abort",reason:e.reason}),this._dispatchWithLegacy("ui-close","close",{id:s,action:e.action,source:e.source,reason:e.reason}),this.dispatchEvent(new CustomEvent("hide",{bubbles:!0,composed:!0})),this._terminalEmitted=!0,this._closeMeta=null}const i=this._lastFocused;this._lastFocused=null,i&&this._canRestoreFocus(i)&&(this._restoreFocusFrame&&p(this._restoreFocusFrame),this._restoreFocusFrame=C(()=>{this._restoreFocusFrame=0;try{this._canRestoreFocus(i)&&i.focus()}catch{}})),this._syncOpenUi()}_dispatchWithLegacy(t,i,e,s=!1){const o=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0,cancelable:s});this.dispatchEvent(o);const r=new CustomEvent(i,{detail:e,bubbles:!0,composed:!0,cancelable:s});return this.dispatchEvent(r),o}_isTopMost(){if(!this._isActive)return!1;const t=l._openStack;return t.length>0&&t[t.length-1]===this}_queryPanel(){return this.root.querySelector(".panel")}_canRestoreFocus(t){if(!t||!t.isConnected||t.disabled||t.getAttribute("aria-hidden")==="true")return!1;if(!S())return!0;const i=window.getComputedStyle(t);return i.display!=="none"&&i.visibility!=="hidden"}_collectFocusable(t){return Array.from(t.querySelectorAll(W)).filter(i=>{if(i.disabled||i.getAttribute("aria-hidden")==="true")return!1;const s=S()?window.getComputedStyle(i):null;return!(s&&(s.display==="none"||s.visibility==="hidden"))})}_focusInitial(){if(!this.open)return;const t=this._queryPanel();if(!t)return;const i=this.getAttribute("initial-focus")||this._config.initialFocus||"";if(i){const r=t.querySelector(i);if(r&&typeof r.focus=="function"){r.focus();return}}const e=this._collectFocusable(t),o=e.find(r=>r.hasAttribute("autofocus"))||e[0]||t;!o.hasAttribute("tabindex")&&o===t&&o.setAttribute("tabindex","-1");try{o.focus()}catch{}}_onFocusIn(t){!this.open||this._isTopMost()}_handleTab(t){t.key}_destroyRuntimeControllers(){var t,i;(t=this._dismissableLayer)==null||t.destroy(),this._dismissableLayer=null,(i=this._focusScope)==null||i.destroy(),this._focusScope=null}_syncOpenUi(){const t=this.root.querySelector(".overlay"),i=this._queryPanel(),e=this.open;!t||!i||(t.hidden=!e,t.setAttribute("data-open",String(e)),t.setAttribute("aria-hidden",e?"false":"true"),i.setAttribute("aria-hidden",e?"false":"true"))}_syncRuntimeControllers(){if(this._destroyRuntimeControllers(),!this.open||!this._isTopMost())return;const t=this._queryPanel();t&&(this._dismissableLayer=M.createDismissableLayer({node:t,closeOnEscape:this.closeOnEsc,closeOnPointerOutside:this.closeOnOverlay,closeOnFocusOutside:!1,onBeforeDismiss:(i,e)=>this._isInteractionLocked()?!1:i==="escape-key"?(this.closeDialog("escape"),!1):(i==="outside-pointer"&&this.closeDialog("overlay"),!1)}),this._focusScope=R.createFocusScope({node:t,trapped:!0,loop:!0,restoreFocus:!1,autoFocus:"first",initialFocus:()=>{const i=this.getAttribute("initial-focus")||this._config.initialFocus||"";return i?t.querySelector(i):null}}))}_collectFormData(t){const i=this._queryPanel(),e=t||this.querySelector("form")||(i==null?void 0:i.querySelector("form"))||null;if(!(e instanceof HTMLFormElement)||typeof FormData>"u")return;const s=new FormData(e),o={};for(const[r,h]of s.entries()){const c=String(h);if(o[r]==null){o[r]=c;continue}const d=o[r];Array.isArray(d)?d.push(c):o[r]=[d,c]}return Object.keys(o).length?o:void 0}_resolveSubmitForm(t){var s;if(t){const o=t.closest("form");if(o instanceof HTMLFormElement&&this.contains(o))return o}const i=this.querySelector("form");if(i instanceof HTMLFormElement)return i;const e=(s=this._queryPanel())==null?void 0:s.querySelector("form");return e instanceof HTMLFormElement?e:null}_isInteractionLocked(){return this.state==="loading"&&this.lockWhileLoading}_requestDismiss(t,i){if(!this._isInteractionLocked()){if(t==="overlay"){this.closeDialog("overlay");return}if(t==="esc"){this.closeDialog("escape");return}if(t==="close-icon"){this.closeDialog("button");return}this.close("dismiss",t,i)}}_handleSubmit(t){if(this._isInteractionLocked())return;const i=t??this._resolveSubmitForm();if(i&&typeof i.reportValidity=="function"&&!i.reportValidity())return;const e={id:this.dialogId||this._uid,formData:this._collectFormData(i)};this._dispatchWithLegacy("ui-submit","submit",e,!0).defaultPrevented||this.closeDialog("submit")}_handleCancel(){this._isInteractionLocked()||this.closeDialog("cancel")}_onClick(t){if(!this.open||!this._isTopMost())return;const i=t.target;if(i){if(!i.closest(".panel")&&i.closest(".overlay")&&this.closeOnOverlay){this._requestDismiss("overlay");return}if(i.closest(".close")){this._requestDismiss("close-icon");return}if(i.closest(".btn-submit")){this._handleSubmit();return}i.closest(".btn-cancel")&&this._handleCancel()}}_onSubmit(t){if(!this.open||!this._isTopMost())return;const i=t.target;i&&i!==this&&this.contains(i)&&(t.preventDefault(),t.stopPropagation(),this._handleSubmit(i))}_onKeyDown(t){if(!(!this.open||!this._isTopMost())&&t.key==="Escape"){if(!this.closeOnEsc)return;t.preventDefault(),t.stopPropagation(),this._requestDismiss("esc");return}}render(){const t=this._config.title??this.getAttribute("title")??"",i=this._config.description??this.getAttribute("description")??"",e=this._config.submitText??this.getAttribute("submit-text")??"Submit",s=this._config.cancelText??this.getAttribute("cancel-text")??"Cancel",o=this._config.loadingText??this.getAttribute("loading-text")??"Working...",r=t.trim(),h=i.trim(),c=!!this.querySelector('[slot="title"]'),d=!!this.querySelector('[slot="description"]'),f=!!(r||c),m=!!(h||d),O=!!this.querySelector('[slot="content"]'),D=!!this.querySelector('[slot="footer"]'),q=this._config.showCancel??!0,$=this._config.showClose??this.dismissible,v=this._runtimeError||this._config.errorMessage||this.getAttribute("error-message")||"",b=this.state==="loading",y=`ui-dialog-title-${this._uid}`,x=`ui-dialog-description-${this._uid}`,A=`ui-dialog-error-${this._uid}`,T=this.getAttribute("aria-label")||"",I=this.getAttribute("aria-labelledby")||"",k=this.getAttribute("aria-describedby")||"",_=I||(f?y:""),w=T||(_?"":"Dialog"),u=[];k?u.push(k):(m&&u.push(x),v&&u.push(A));const B=f||m?`
|
|
375
|
+
`,W='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function g(a,t){if(a==null)return t;const i=a.trim().toLowerCase();return i!=="false"&&i!=="0"&&i!=="off"}function n(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function S(){return typeof window<"u"&&typeof document<"u"}function C(a){return window.setTimeout(a,16)}function p(a){a&&window.clearTimeout(a)}const E=class l extends z.ElementBase{constructor(){super(),this._isActive=!1,this._uid=Math.random().toString(36).slice(2,10),this._dialogId=this._uid,this._lastFocused=null,this._terminalEmitted=!1,this._closeMeta=null,this._runtimeError="",this._config={},this._dismissableLayer=null,this._focusScope=null,this._disconnectCleanupFrame=0,this._restoreFocusFrame=0,this._onClick=this._onClick.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onFocusIn=this._onFocusIn.bind(this),this._onSubmit=this._onSubmit.bind(this)}static get observedAttributes(){return["open","headless","title","description","closable","dismissible","close-on-overlay","close-on-backdrop","close-on-esc","lock-while-loading","size","state","role","initial-focus","submit-text","cancel-text","loading-text","error-message","aria-label","aria-labelledby","aria-describedby"]}connectedCallback(){this._disconnectCleanupFrame&&(p(this._disconnectCleanupFrame),this._disconnectCleanupFrame=0),super.connectedCallback(),this.root.addEventListener("click",this._onClick),this.root.addEventListener("keydown",this._onKeyDown),this.addEventListener("submit",this._onSubmit),this._syncFromAttributes(),this._syncOpenState()}disconnectedCallback(){this.root.removeEventListener("click",this._onClick),this.root.removeEventListener("keydown",this._onKeyDown),this.removeEventListener("submit",this._onSubmit),this._disconnectCleanupFrame&&p(this._disconnectCleanupFrame),this._restoreFocusFrame&&(p(this._restoreFocusFrame),this._restoreFocusFrame=0),this._disconnectCleanupFrame=C(()=>{this._disconnectCleanupFrame=0,!this.isConnected&&(this._isActive&&!this._terminalEmitted?this.close("dismiss","unmount"):(this._destroyRuntimeControllers(),this._deactivate()),super.disconnectedCallback())})}attributeChangedCallback(t,i,e){if(i!==e){if(t==="open"){this._syncOpenState();return}t==="state"&&e!=="error"&&(this._runtimeError=""),this._syncFromAttributes(),this.isConnected&&this.requestRender()}}get open(){return this.hasAttribute("open")}set open(t){t?this.setAttribute("open",""):this.close("dismiss","programmatic")}get dismissible(){return g(this.getAttribute("dismissible")??this.getAttribute("closable"),!0)}set dismissible(t){this.setAttribute("dismissible",String(t)),this.setAttribute("closable",String(t))}get closeOnOverlay(){return g(this.getAttribute("close-on-overlay")??this.getAttribute("close-on-backdrop"),!0)}set closeOnOverlay(t){this.setAttribute("close-on-overlay",String(t)),this.setAttribute("close-on-backdrop",String(t))}get closeOnEsc(){return g(this.getAttribute("close-on-esc"),!0)}set closeOnEsc(t){this.setAttribute("close-on-esc",String(t))}get lockWhileLoading(){return g(this.getAttribute("lock-while-loading"),!0)}set lockWhileLoading(t){this.setAttribute("lock-while-loading",String(t))}get state(){const t=this.getAttribute("state");return t==="loading"||t==="error"||t==="success"?t:"idle"}set state(t){if(t==="idle"){this.removeAttribute("state");return}this.setAttribute("state",t)}get dialogId(){return this._dialogId}set dialogId(t){this._dialogId=t||this._uid,this.requestRender()}get config(){return this._config}set config(t){this._config=t||{},this._config.id&&(this._dialogId=this._config.id),this._config.dismissible!=null&&(this.dismissible=!!this._config.dismissible),this._config.closeOnOverlay!=null&&(this.closeOnOverlay=!!this._config.closeOnOverlay),this._config.closeOnEsc!=null&&(this.closeOnEsc=!!this._config.closeOnEsc),this._config.lockWhileLoading!=null&&(this.lockWhileLoading=!!this._config.lockWhileLoading),this._config.size&&this.setAttribute("size",this._config.size),this._config.role&&this.setAttribute("role",this._config.role),this._config.initialFocus&&this.setAttribute("initial-focus",this._config.initialFocus),this._config.ariaLabel&&this.setAttribute("aria-label",this._config.ariaLabel),this._config.ariaLabelledby&&this.setAttribute("aria-labelledby",this._config.ariaLabelledby),this._config.ariaDescribedby&&this.setAttribute("aria-describedby",this._config.ariaDescribedby),this._config.errorMessage&&(this._runtimeError=this._config.errorMessage),this.requestRender()}openDialog(){this.setAttribute("open","")}closeDialog(t="programmatic"){if(!this.hasAttribute("open"))return;const i=new CustomEvent("request-close",{detail:{reason:t},bubbles:!0,cancelable:!0,composed:!0});this.dispatchEvent(i);const e=new CustomEvent("ui-request-close",{detail:{id:this.dialogId||this._uid,reason:t},bubbles:!0,cancelable:!0,composed:!0});if(this.dispatchEvent(e),!(i.defaultPrevented||e.defaultPrevented)){if(t==="submit"){this.close("submit");return}if(t==="cancel"){this.close("cancel");return}if(t==="overlay"){this.close("dismiss","overlay");return}if(t==="escape"){this.close("dismiss","esc");return}if(t==="button"){this.close("dismiss","close-icon");return}this.close("dismiss","programmatic")}}close(t="dismiss",i,e){this._terminalEmitted||(this._closeMeta={action:t,source:i,reason:e},this.hasAttribute("open")&&this.removeAttribute("open"),this._syncOpenState())}setError(t){this._runtimeError=t,this.state=t?"error":"idle",this.requestRender()}clearError(){this._runtimeError="",this.state==="error"&&(this.state="idle"),this.requestRender()}_syncFromAttributes(){!this.hasAttribute("dismissible")&&this.hasAttribute("closable")&&this.setAttribute("dismissible",this.getAttribute("closable")||"true"),!this.hasAttribute("closable")&&this.hasAttribute("dismissible")&&this.setAttribute("closable",this.getAttribute("dismissible")||"true"),!this.hasAttribute("close-on-overlay")&&this.hasAttribute("close-on-backdrop")&&this.setAttribute("close-on-overlay",this.getAttribute("close-on-backdrop")||"true"),!this.hasAttribute("close-on-backdrop")&&this.hasAttribute("close-on-overlay")&&this.setAttribute("close-on-backdrop",this.getAttribute("close-on-overlay")||"true"),this.hasAttribute("role")||this.setAttribute("role","dialog")}_syncOpenState(){const t=this.hasAttribute("open");t&&!this._isActive?this._activate():!t&&this._isActive&&this._deactivate(),this._syncOpenUi()}_activate(){this._isActive=!0,this._terminalEmitted=!1,this._closeMeta=null,l._openStack.includes(this)||l._openStack.push(this),this._lastFocused=document.activeElement||null,F.acquireBodyScrollLock();const t=this.dialogId||this._uid;this._dispatchWithLegacy("ui-open","open",{id:t}),this.dispatchEvent(new CustomEvent("show",{bubbles:!0,composed:!0})),this._syncOpenUi(),this._syncRuntimeControllers()}_deactivate(){if(!this._isActive)return;this._isActive=!1,this._destroyRuntimeControllers();const t=l._openStack.lastIndexOf(this);if(t>=0&&l._openStack.splice(t,1),F.releaseBodyScrollLock(),!this._terminalEmitted){const e=this._closeMeta||{action:"dismiss",source:"abort"},o=this.dialogId||this._uid;e.action==="cancel"?this._dispatchWithLegacy("ui-cancel","cancel",{id:o}):this._dispatchWithLegacy("ui-dismiss","dismiss",{id:o,source:e.source||"abort",reason:e.reason}),this._dispatchWithLegacy("ui-close","close",{id:o,action:e.action,source:e.source,reason:e.reason}),this.dispatchEvent(new CustomEvent("hide",{bubbles:!0,composed:!0})),this._terminalEmitted=!0,this._closeMeta=null}const i=this._lastFocused;this._lastFocused=null,i&&this._canRestoreFocus(i)&&(this._restoreFocusFrame&&p(this._restoreFocusFrame),this._restoreFocusFrame=C(()=>{this._restoreFocusFrame=0;try{this._canRestoreFocus(i)&&i.focus()}catch{}})),this._syncOpenUi()}_dispatchWithLegacy(t,i,e,o=!1){const s=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0,cancelable:o});this.dispatchEvent(s);const r=new CustomEvent(i,{detail:e,bubbles:!0,composed:!0,cancelable:o});return this.dispatchEvent(r),s}_isTopMost(){if(!this._isActive)return!1;const t=l._openStack;return t.length>0&&t[t.length-1]===this}_queryPanel(){return this.root.querySelector(".panel")}_canRestoreFocus(t){if(!t||!t.isConnected||t.disabled||t.getAttribute("aria-hidden")==="true")return!1;if(!S())return!0;const i=window.getComputedStyle(t);return i.display!=="none"&&i.visibility!=="hidden"}_collectFocusable(t){return Array.from(t.querySelectorAll(W)).filter(i=>{if(i.disabled||i.getAttribute("aria-hidden")==="true")return!1;const o=S()?window.getComputedStyle(i):null;return!(o&&(o.display==="none"||o.visibility==="hidden"))})}_focusInitial(){if(!this.open)return;const t=this._queryPanel();if(!t)return;const i=this.getAttribute("initial-focus")||this._config.initialFocus||"";if(i){const r=t.querySelector(i);if(r&&typeof r.focus=="function"){r.focus();return}}const e=this._collectFocusable(t),s=e.find(r=>r.hasAttribute("autofocus"))||e[0]||t;!s.hasAttribute("tabindex")&&s===t&&s.setAttribute("tabindex","-1");try{s.focus()}catch{}}_onFocusIn(t){!this.open||this._isTopMost()}_handleTab(t){t.key}_destroyRuntimeControllers(){var t,i;(t=this._dismissableLayer)==null||t.destroy(),this._dismissableLayer=null,(i=this._focusScope)==null||i.destroy(),this._focusScope=null}_syncOpenUi(){const t=this.root.querySelector(".overlay"),i=this._queryPanel(),e=this.open;!t||!i||(t.hidden=!e,t.setAttribute("data-open",String(e)),t.setAttribute("aria-hidden",e?"false":"true"),i.setAttribute("aria-hidden",e?"false":"true"))}_syncRuntimeControllers(){if(this._destroyRuntimeControllers(),!this.open||!this._isTopMost())return;const t=this._queryPanel();t&&(this._dismissableLayer=M.createDismissableLayer({node:t,closeOnEscape:this.closeOnEsc,closeOnPointerOutside:this.closeOnOverlay,closeOnFocusOutside:!1,onBeforeDismiss:(i,e)=>this._isInteractionLocked()?!1:i==="escape-key"?(this.closeDialog("escape"),!1):(i==="outside-pointer"&&this.closeDialog("overlay"),!1)}),this._focusScope=R.createFocusScope({node:t,trapped:!0,loop:!0,restoreFocus:!1,autoFocus:"first",initialFocus:()=>{const i=this.getAttribute("initial-focus")||this._config.initialFocus||"";return i?t.querySelector(i):null}}))}_collectFormData(t){const i=this._queryPanel(),e=t||this.querySelector("form")||(i==null?void 0:i.querySelector("form"))||null;if(!(e instanceof HTMLFormElement)||typeof FormData>"u")return;const o=new FormData(e),s={};for(const[r,h]of o.entries()){const c=String(h);if(s[r]==null){s[r]=c;continue}const d=s[r];Array.isArray(d)?d.push(c):s[r]=[d,c]}return Object.keys(s).length?s:void 0}_resolveSubmitForm(t){var o;if(t){const s=t.closest("form");if(s instanceof HTMLFormElement&&this.contains(s))return s}const i=this.querySelector("form");if(i instanceof HTMLFormElement)return i;const e=(o=this._queryPanel())==null?void 0:o.querySelector("form");return e instanceof HTMLFormElement?e:null}_isInteractionLocked(){return this.state==="loading"&&this.lockWhileLoading}_requestDismiss(t,i){if(!this._isInteractionLocked()){if(t==="overlay"){this.closeDialog("overlay");return}if(t==="esc"){this.closeDialog("escape");return}if(t==="close-icon"){this.closeDialog("button");return}this.close("dismiss",t,i)}}_handleSubmit(t){if(this._isInteractionLocked())return;const i=t??this._resolveSubmitForm();if(i&&typeof i.reportValidity=="function"&&!i.reportValidity())return;const e={id:this.dialogId||this._uid,formData:this._collectFormData(i)};this._dispatchWithLegacy("ui-submit","submit",e,!0).defaultPrevented||this.closeDialog("submit")}_handleCancel(){this._isInteractionLocked()||this.closeDialog("cancel")}_onClick(t){if(!this.open||!this._isTopMost())return;const i=t.target;if(i){if(!i.closest(".panel")&&i.closest(".overlay")&&this.closeOnOverlay){this._requestDismiss("overlay");return}if(i.closest(".close")){this._requestDismiss("close-icon");return}if(i.closest(".btn-submit")){this._handleSubmit();return}i.closest(".btn-cancel")&&this._handleCancel()}}_onSubmit(t){if(!this.open||!this._isTopMost())return;const i=t.target;i&&i!==this&&this.contains(i)&&(t.preventDefault(),t.stopPropagation(),this._handleSubmit(i))}_onKeyDown(t){if(!(!this.open||!this._isTopMost())&&t.key==="Escape"){if(!this.closeOnEsc)return;t.preventDefault(),t.stopPropagation(),this._requestDismiss("esc");return}}render(){const t=this._config.title??this.getAttribute("title")??"",i=this._config.description??this.getAttribute("description")??"",e=this._config.submitText??this.getAttribute("submit-text")??"Submit",o=this._config.cancelText??this.getAttribute("cancel-text")??"Cancel",s=this._config.loadingText??this.getAttribute("loading-text")??"Working...",r=t.trim(),h=i.trim(),c=!!this.querySelector('[slot="title"]'),d=!!this.querySelector('[slot="description"]'),f=!!(r||c),m=!!(h||d),O=!!this.querySelector('[slot="content"]'),D=!!this.querySelector('[slot="footer"]'),q=this._config.showCancel??!0,$=this._config.showClose??this.dismissible,v=this._runtimeError||this._config.errorMessage||this.getAttribute("error-message")||"",b=this.state==="loading",y=`ui-dialog-title-${this._uid}`,x=`ui-dialog-description-${this._uid}`,A=`ui-dialog-error-${this._uid}`,T=this.getAttribute("aria-label")||"",I=this.getAttribute("aria-labelledby")||"",k=this.getAttribute("aria-describedby")||"",_=I||(f?y:""),w=T||(_?"":"Dialog"),u=[];k?u.push(k):(m&&u.push(x),v&&u.push(A));const B=f||m?`
|
|
376
376
|
<header class="header" part="header">
|
|
377
|
-
${f?`<h2 id="${y}" class="title" part="title"><slot name="title">${
|
|
378
|
-
${m?`<p id="${x}" class="description" part="description"><slot name="description">${
|
|
377
|
+
${f?`<h2 id="${y}" class="title" part="title"><slot name="title">${n(r)}</slot></h2>`:""}
|
|
378
|
+
${m?`<p id="${x}" class="description" part="description"><slot name="description">${n(h)}</slot></p>`:""}
|
|
379
379
|
</header>
|
|
380
380
|
`:"";this._destroyRuntimeControllers(),this.setContent(`
|
|
381
381
|
${this.hasAttribute("headless")?"":`<style>${P}</style>`}
|
|
@@ -383,11 +383,11 @@
|
|
|
383
383
|
<section
|
|
384
384
|
class="panel"
|
|
385
385
|
part="panel"
|
|
386
|
-
role="${
|
|
386
|
+
role="${n(this.getAttribute("role")||"dialog")}"
|
|
387
387
|
aria-modal="true"
|
|
388
|
-
${w?`aria-label="${
|
|
389
|
-
${_?`aria-labelledby="${
|
|
390
|
-
${u.length?`aria-describedby="${
|
|
388
|
+
${w?`aria-label="${n(w)}"`:""}
|
|
389
|
+
${_?`aria-labelledby="${n(_)}"`:""}
|
|
390
|
+
${u.length?`aria-describedby="${n(u.join(" "))}"`:""}
|
|
391
391
|
aria-hidden="${this.open?"false":"true"}"
|
|
392
392
|
tabindex="-1"
|
|
393
393
|
>
|
|
@@ -402,13 +402,13 @@
|
|
|
402
402
|
${O?'<slot name="content"></slot>':"<slot></slot>"}
|
|
403
403
|
</div>
|
|
404
404
|
|
|
405
|
-
<div class="error" id="${A}" part="error" aria-live="polite" data-empty="${String(!v)}">${
|
|
405
|
+
<div class="error" id="${A}" part="error" aria-live="polite" data-empty="${String(!v)}">${n(v)}</div>
|
|
406
406
|
|
|
407
407
|
<footer class="footer" part="footer">
|
|
408
|
-
${b?`<span class="loading" part="loading"><span class="spinner" aria-hidden="true"></span><span>${
|
|
408
|
+
${b?`<span class="loading" part="loading"><span class="spinner" aria-hidden="true"></span><span>${n(s)}</span></span>`:'<span aria-hidden="true"></span>'}
|
|
409
409
|
|
|
410
|
-
${D?'<slot name="footer"></slot>':`${q?`<button class="btn btn-cancel" part="cancel" type="button" ${b?"disabled":""}>${
|
|
411
|
-
<button class="btn btn-submit" part="submit" type="button" ${b?"disabled":""}>${
|
|
410
|
+
${D?'<slot name="footer"></slot>':`${q?`<button class="btn btn-cancel" part="cancel" type="button" ${b?"disabled":""}>${n(o)}</button>`:""}
|
|
411
|
+
<button class="btn btn-submit" part="submit" type="button" ${b?"disabled":""}>${n(e)}</button>`}
|
|
412
412
|
</footer>
|
|
413
413
|
</section>
|
|
414
414
|
</div>
|
package/dist/dialog.esm.js
CHANGED
|
@@ -390,16 +390,10 @@ function F() {
|
|
|
390
390
|
return typeof window < "u" && typeof document < "u";
|
|
391
391
|
}
|
|
392
392
|
function S(n) {
|
|
393
|
-
return
|
|
393
|
+
return window.setTimeout(n, 16);
|
|
394
394
|
}
|
|
395
395
|
function p(n) {
|
|
396
|
-
|
|
397
|
-
if (typeof cancelAnimationFrame == "function") {
|
|
398
|
-
cancelAnimationFrame(n);
|
|
399
|
-
return;
|
|
400
|
-
}
|
|
401
|
-
window.clearTimeout(n);
|
|
402
|
-
}
|
|
396
|
+
n && window.clearTimeout(n);
|
|
403
397
|
}
|
|
404
398
|
const C = class l extends I {
|
|
405
399
|
constructor() {
|
package/dist/sortable.cjs.js
CHANGED
|
@@ -720,7 +720,7 @@
|
|
|
720
720
|
background: Highlight;
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
`;function V(u){if(!u)return[];try{const e=JSON.parse(u);return Array.isArray(e)?e:[]}catch{return[]}}function I(u){return u.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function z(u,e){return`${u}::${e??"__root__"}`}function X(u){return u?[u.listId,u.parentId??"",u.beforeId??"",u.mode].join("::"):""}function B(u,e){return X(u)===X(e)}function oe(u){if(!u||u==="none")return{x:1,y:1};const e=u.match(/^matrix3d\((.+)\)$/);if(e){const t=e[1].split(",").map(i=>Number.parseFloat(i.trim()));if(t.length===16&&t.every(i=>Number.isFinite(i)))return{x:t[0]||1,y:t[5]||1}}const r=u.match(/^matrix\((.+)\)$/);if(r){const t=r[1].split(",").map(i=>Number.parseFloat(i.trim()));if(t.length===6&&t.every(i=>Number.isFinite(i))){const[i,s,o,a]=t;return{x:Math.sqrt(i*i+s*s)||1,y:Math.sqrt(o*o+a*a)||1}}}return{x:1,y:1}}function ae(u){return u==="item"?"item":"handle"}function $(u){return{...u}}function de(u,e,r,t,i,s){const o=M(u),a=E(u),l=new Set,n=[],d=h=>{const x=o.get(h);!x||l.has(h)||(l.add(h),n.push(h),(a.get(z(x.listId,h))||[]).forEach(d))};t.forEach(d);const c=u.map($),g=c.filter(h=>l.has(h.id)),m=i?c.map($):c.filter(h=>!l.has(h.id)),f=i?g.map(h=>s(h,n)):g.map($),v=new Map,b=new Map;i&&g.forEach((h,x)=>{v.set(h.id,f[x].id),b.set(f[x].id,h.id)}),f.forEach(h=>{const x=i?b.get(h.id):h.id,F=x?o.get(x):null;F&&(i&&(h.parentId=F.parentId&&v.has(F.parentId)&&v.get(F.parentId)||null),h.listId=r.listId)});const y=t.map(h=>v.get(h)||h),w=[...m,...f],k=E(m),A=z(r.listId,r.parentId),_=[...k.get(A)||[]],R=r.beforeId?_.indexOf(r.beforeId):_.length,S=R>=0?R:_.length;_.splice(S,0,...y),k.set(A,_),E(f).forEach((h,x)=>{const[,F]=x.split("::");(F||"")!=="__root__"&&k.set(x,[...h])});const T=M(w);y.forEach(h=>{const x=T.get(h);x&&(x.parentId=r.parentId,x.listId=r.listId)});const P=[],L=new Set,G=(h,x)=>{(k.get(z(h,x))||[]).forEach((O,K)=>{const p=T.get(O);!p||L.has(O)||(L.add(O),p.listId=h,p.parentId=x,p.order=K,P.push(p),G(h,O))})};return e.forEach(h=>G(h.id,null)),w.forEach(h=>{L.has(h.id)||(h.parentId=null,P.push(h))}),{items:P.map($),insertedRootIds:y}}function E(u){const e=new Map;return u.forEach(r=>{const t=z(r.listId,r.parentId),i=e.get(t);i?i.push(r.id):e.set(t,[r.id])}),e}function M(u){return new Map(u.map(e=>[e.id,e]))}function Y(u){const e=new Set,r=[];return u.forEach((t,i)=>{const s=typeof(t==null?void 0:t.id)=="string"&&t.id.trim()?t.id.trim():`list-${i+1}`;e.has(s)||(e.add(s),r.push({id:s,label:typeof(t==null?void 0:t.label)=="string"&&t.label.trim()?t.label.trim():`List ${i+1}`,description:typeof(t==null?void 0:t.description)=="string"?t.description:"",emptyLabel:typeof(t==null?void 0:t.emptyLabel)=="string"&&t.emptyLabel.trim()?t.emptyLabel.trim():"Drop items here.",orientation:(t==null?void 0:t.orientation)==="horizontal"?"horizontal":"vertical",disabled:!!(t!=null&&t.disabled),cloneOnDrag:!!(t!=null&&t.cloneOnDrag),accepts:Array.isArray(t==null?void 0:t.accepts)?t.accepts.filter(o=>typeof o=="string"&&o.trim().length>0):void 0}))}),r.length?r:[{id:"default",label:"Items",description:"",emptyLabel:"Drop items here.",orientation:"vertical",disabled:!1,cloneOnDrag:!1}]}function U(u,e){const r=new Set(u.map(n=>n.id)),t=[];e.forEach((n,d)=>{const c=typeof(n==null?void 0:n.id)=="string"&&n.id.trim()?n.id.trim():"",g=typeof(n==null?void 0:n.label)=="string"&&n.label.trim()?n.label.trim():"";if(!c||!g)return;const m=typeof(n==null?void 0:n.listId)=="string"&&r.has(n.listId)?n.listId:u[0].id;t.push({id:c,label:g,listId:m,parentId:typeof(n==null?void 0:n.parentId)=="string"&&n.parentId.trim()?n.parentId.trim():null,description:typeof(n==null?void 0:n.description)=="string"?n.description:"",order:Number.isFinite(n==null?void 0:n.order)?Number(n.order):d,disabled:!!(n!=null&&n.disabled),dragDisabled:!!(n!=null&&n.dragDisabled),cloneOnDrag:!!(n!=null&&n.cloneOnDrag),hidden:!!(n!=null&&n.hidden)})});const i=new Map(t.map(n=>[n.id,n]));t.forEach(n=>{if(!n.parentId)return;const d=i.get(n.parentId);(!d||d.id===n.id||d.listId!==n.listId)&&(n.parentId=null)});const s=new Map;t.forEach(n=>{const d=z(n.listId,n.parentId),c=s.get(d);c?c.push(n):s.set(d,[n])}),s.forEach(n=>n.sort((d,c)=>d.order-c.order||d.label.localeCompare(c.label)));const o=[],a=new Set,l=(n,d)=>{(s.get(z(n,d))||[]).forEach((g,m)=>{a.has(g.id)||(a.add(g.id),g.order=m,o.push(g),l(n,g.id))})};return u.forEach(n=>l(n.id,null)),t.forEach(n=>{a.has(n.id)||(n.parentId=null,o.push(n))}),o.map($)}function le(u){return JSON.stringify(u.map(e=>({id:e.id,label:e.label,listId:e.listId,parentId:e.parentId,description:e.description,order:e.order,disabled:e.disabled,dragDisabled:e.dragDisabled,cloneOnDrag:e.cloneOnDrag,hidden:e.hidden})))}function ce(u){return JSON.stringify(u.map(e=>({id:e.id,label:e.label,description:e.description,emptyLabel:e.emptyLabel,orientation:e.orientation,disabled:e.disabled,cloneOnDrag:e.cloneOnDrag,accepts:e.accepts})))}function j(u){return JSON.stringify(u)}function J(u){const e=new Map,r=u.map(t=>{const i=z(t.listId,t.parentId),s=e.get(i)??0;return e.set(i,s+1),{id:t.id,listId:t.listId,parentId:t.parentId,index:s}});return{version:re,records:r}}function W(u,e){return e?`${u.label} ${u.description}`.toLowerCase().includes(e.toLowerCase()):!0}function Q(u,e,r,t,i){const s=M(u),o=E(u),a=new Map,l=(c,g)=>{const m=[...o.get(z(c,g))||[]];return i==="label"&&m.sort((f,v)=>{const b=s.get(f),y=s.get(v);return!b||!y?0:b.label.localeCompare(y.label)}),m},n=(c,g,m)=>{const f=[];return l(c,g).forEach(v=>{const b=s.get(v);if(!b||b.hidden)return;const y=n(c,b.id);!W(b,t)&&y.length===0||(f.push({id:b.id,disabled:b.disabled}),y.length&&f.push(...y))}),f};return Array.from(new Set(u.map(c=>c.listId))).forEach(c=>{a.set(c,n(c,null))}),a}class Z extends te.ElementBase{constructor(){super(),this._lists=Y([]),this._items=[],this._selection=[],this._focusedId=null,this._rangeAnchorId=null,this._dragState=null,this._liveMessage="Sortable list ready.",this._lastListsAttr=null,this._lastItemsAttr=null,this._lastSelectionAttr=null,this._hydratedPersistKey=null,this._cloneSeed=1,this._dragImage=null,this._dragPreviewOverlay=null,this._pendingFocusId=null,this._pointerGesture=null,this._pendingDropTarget=null,this._suppressAttributeRender=!1,this._onClick=this._onClick.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onDragStart=this._onDragStart.bind(this),this._onDragOver=this._onDragOver.bind(this),this._onDrop=this._onDrop.bind(this),this._onDragEnd=this._onDragEnd.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerCancel=this._onPointerCancel.bind(this),this._onFocusIn=this._onFocusIn.bind(this),this._onDocumentKeyDown=this._onDocumentKeyDown.bind(this)}static get observedAttributes(){return["lists","items","selection","filter-query","sort","persist-key","allow-filtered-drag","allow-nesting","drop-indicator-visibility","dropzone-style","drag-preview-size","drag-handle-mode","drag-handle-selector","custom-item-rendering","show-selection-badge","disabled"]}shouldRenderOnAttributeChange(e,r,t){return this._suppressAttributeRender?!["lists","items","selection"].includes(e):!0}attributeChangedCallback(e,r,t){if(r!==t&&this.isConnected){if(e==="selection"&&!this._suppressAttributeRender&&this._canSyncInteractiveStateInPlace()){this._syncSelectionFromAttribute(t??null),this._syncSelectionVisualState();return}if(e==="show-selection-badge"&&this._canSyncInteractiveStateInPlace()){this._syncSelectionVisualState();return}super.attributeChangedCallback(e,r,t)}}connectedCallback(){var e,r,t,i;super.connectedCallback(),this.root.addEventListener("click",this._onClick),this.root.addEventListener("keydown",this._onKeyDown),this.root.addEventListener("dragstart",this._onDragStart),this.root.addEventListener("dragover",this._onDragOver),this.root.addEventListener("drop",this._onDrop),this.root.addEventListener("dragend",this._onDragEnd),this.root.addEventListener("pointerdown",this._onPointerDown),this.root.addEventListener("focusin",this._onFocusIn),(e=this.ownerDocument)==null||e.addEventListener("keydown",this._onDocumentKeyDown,!0),(r=this.ownerDocument)==null||r.addEventListener("pointermove",this._onPointerMove,!0),(t=this.ownerDocument)==null||t.addEventListener("pointerup",this._onPointerUp,!0),(i=this.ownerDocument)==null||i.addEventListener("pointercancel",this._onPointerCancel,!0)}disconnectedCallback(){var e,r,t,i;this.root.removeEventListener("click",this._onClick),this.root.removeEventListener("keydown",this._onKeyDown),this.root.removeEventListener("dragstart",this._onDragStart),this.root.removeEventListener("dragover",this._onDragOver),this.root.removeEventListener("drop",this._onDrop),this.root.removeEventListener("dragend",this._onDragEnd),this.root.removeEventListener("pointerdown",this._onPointerDown),this.root.removeEventListener("focusin",this._onFocusIn),(e=this.ownerDocument)==null||e.removeEventListener("keydown",this._onDocumentKeyDown,!0),(r=this.ownerDocument)==null||r.removeEventListener("pointermove",this._onPointerMove,!0),(t=this.ownerDocument)==null||t.removeEventListener("pointerup",this._onPointerUp,!0),(i=this.ownerDocument)==null||i.removeEventListener("pointercancel",this._onPointerCancel,!0),this._removeDragPreviewOverlay(),this._removeDragImage(),super.disconnectedCallback()}get lists(){return this._lists.map(e=>({...e}))}set lists(e){this.setAttribute("lists",JSON.stringify(e??[]))}get items(){return this._items.map(e=>({...e}))}set items(e){this.setAttribute("items",JSON.stringify(e??[]))}get selection(){return[...this._selection]}set selection(e){this.setAttribute("selection",JSON.stringify(e??[]))}get sort(){return this.getAttribute("sort")==="label"?"label":"manual"}set sort(e){!e||e==="manual"?this.removeAttribute("sort"):this.setAttribute("sort",e)}get filterQuery(){return this.getAttribute("filter-query")||""}set filterQuery(e){e?this.setAttribute("filter-query",e):this.removeAttribute("filter-query")}select(e){this._setSelection(e,"api")}clearSelection(){this._setSelection([],"api")}cancelDrag(){this._cancelDrag(!0)}focusItem(e){this._items.some(r=>r.id===e)&&(this._focusedId=e,this._pendingFocusId=e,!this._applyInteractiveStateInPlace({restoreFocus:!0})&&this.requestRender())}moveSelection(e){const r=this._selectedRootIds();r.length&&this._commitMove({listId:e.targetListId,parentId:e.parentId??null,beforeId:e.beforeId??null,mode:e.mode??(e.parentId?"inside":"before")},r,!!e.clone,e.source??"api")}getPersistenceSnapshot(){return J(this._items)}render(){var _,R;this._syncStateFromAttributes();const e=this._measureItemShellRects(),r=new Set(this._draggingIds()),t=new Set(this._selection),s=!!((_=this._dragState)!=null&&_.keyboard)?this._projectedMoveResult():null,o=(s==null?void 0:s.items)||this._items,a=new Set((s==null?void 0:s.insertedRootIds)||[]),l=!!this._dragState&&!this._dragState.keyboard&&!!this._dragState.dropTarget,n=Q(o,t,r,this.filterQuery,this.sort),d=this._resolvedFocusedId(n),c=this._isDragLocked(),g=this._selection.length,m=this.getAttribute("allow-nesting")!=="false",f=this.getAttribute("drop-indicator-visibility")==="always"?"always":"active",v=this._dropzoneStyle(),b=this.getAttribute("show-selection-badge")!=="false",y=this._dragHandleMode(),w=this._usesCustomHandleSelector(),k=c?this.sort==="label"?"Dragging is paused while alphabetical sorting is active.":this.filterQuery&&!this.hasAttribute("allow-filtered-drag")?"Dragging is paused while the list is filtered.":"Dragging is currently disabled.":(R=this._dragState)!=null&&R.keyboard?"Keyboard drag active. Use arrow keys to choose a drop target, Space or Enter to drop, and Escape to cancel.":y==="item"?"Drag from anywhere on an item, or press Space on a focused item to start keyboard reordering.":w?"Use your custom drag handle element, or press Space on a focused item to start keyboard reordering.":"Use the handle to drag, or press Space on a focused item to start keyboard reordering.",A=`
|
|
723
|
+
`;function V(u){if(!u)return[];try{const e=JSON.parse(u);return Array.isArray(e)?e:[]}catch{return[]}}function I(u){return u.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function z(u,e){return`${u}::${e??"__root__"}`}function X(u){return u?[u.listId,u.parentId??"",u.beforeId??"",u.mode].join("::"):""}function B(u,e){return X(u)===X(e)}function oe(u){if(!u||u==="none")return{x:1,y:1};const e=u.match(/^matrix3d\((.+)\)$/);if(e){const t=e[1].split(",").map(i=>Number.parseFloat(i.trim()));if(t.length===16&&t.every(i=>Number.isFinite(i)))return{x:t[0]||1,y:t[5]||1}}const r=u.match(/^matrix\((.+)\)$/);if(r){const t=r[1].split(",").map(i=>Number.parseFloat(i.trim()));if(t.length===6&&t.every(i=>Number.isFinite(i))){const[i,s,o,a]=t;return{x:Math.sqrt(i*i+s*s)||1,y:Math.sqrt(o*o+a*a)||1}}}return{x:1,y:1}}function ae(u){return u==="item"?"item":"handle"}function $(u){return{...u}}function de(u,e,r,t,i,s){const o=M(u),a=E(u),l=new Set,n=[],d=h=>{const x=o.get(h);!x||l.has(h)||(l.add(h),n.push(h),(a.get(z(x.listId,h))||[]).forEach(d))};t.forEach(d);const c=u.map($),g=c.filter(h=>l.has(h.id)),m=i?c.map($):c.filter(h=>!l.has(h.id)),f=i?g.map(h=>s(h,n)):g.map($),v=new Map,b=new Map;i&&g.forEach((h,x)=>{v.set(h.id,f[x].id),b.set(f[x].id,h.id)}),f.forEach(h=>{const x=i?b.get(h.id):h.id,F=x?o.get(x):null;F&&(i&&(h.parentId=F.parentId&&v.has(F.parentId)&&v.get(F.parentId)||null),h.listId=r.listId)});const y=t.map(h=>v.get(h)||h),w=[...m,...f],k=E(m),A=z(r.listId,r.parentId),_=[...k.get(A)||[]],R=r.beforeId?_.indexOf(r.beforeId):_.length,S=R>=0?R:_.length;_.splice(S,0,...y),k.set(A,_),E(f).forEach((h,x)=>{const[,F]=x.split("::");(F||"")!=="__root__"&&k.set(x,[...h])});const T=M(w);y.forEach(h=>{const x=T.get(h);x&&(x.parentId=r.parentId,x.listId=r.listId)});const P=[],L=new Set,G=(h,x)=>{(k.get(z(h,x))||[]).forEach((O,K)=>{const p=T.get(O);!p||L.has(O)||(L.add(O),p.listId=h,p.parentId=x,p.order=K,P.push(p),G(h,O))})};return e.forEach(h=>G(h.id,null)),w.forEach(h=>{L.has(h.id)||(h.parentId=null,P.push(h))}),{items:P.map($),insertedRootIds:y}}function E(u){const e=new Map;return u.forEach(r=>{const t=z(r.listId,r.parentId),i=e.get(t);i?i.push(r.id):e.set(t,[r.id])}),e}function M(u){return new Map(u.map(e=>[e.id,e]))}function Y(u){const e=new Set,r=[];return u.forEach((t,i)=>{const s=typeof(t==null?void 0:t.id)=="string"&&t.id.trim()?t.id.trim():`list-${i+1}`;e.has(s)||(e.add(s),r.push({id:s,label:typeof(t==null?void 0:t.label)=="string"&&t.label.trim()?t.label.trim():`List ${i+1}`,description:typeof(t==null?void 0:t.description)=="string"?t.description:"",emptyLabel:typeof(t==null?void 0:t.emptyLabel)=="string"&&t.emptyLabel.trim()?t.emptyLabel.trim():"Drop items here.",orientation:(t==null?void 0:t.orientation)==="horizontal"?"horizontal":"vertical",disabled:!!(t!=null&&t.disabled),cloneOnDrag:!!(t!=null&&t.cloneOnDrag),accepts:Array.isArray(t==null?void 0:t.accepts)?t.accepts.filter(o=>typeof o=="string"&&o.trim().length>0):void 0}))}),r.length?r:[{id:"default",label:"Items",description:"",emptyLabel:"Drop items here.",orientation:"vertical",disabled:!1,cloneOnDrag:!1}]}function U(u,e){const r=new Set(u.map(n=>n.id)),t=[];e.forEach((n,d)=>{const c=typeof(n==null?void 0:n.id)=="string"&&n.id.trim()?n.id.trim():"",g=typeof(n==null?void 0:n.label)=="string"&&n.label.trim()?n.label.trim():"";if(!c||!g)return;const m=typeof(n==null?void 0:n.listId)=="string"&&r.has(n.listId)?n.listId:u[0].id;t.push({id:c,label:g,listId:m,parentId:typeof(n==null?void 0:n.parentId)=="string"&&n.parentId.trim()?n.parentId.trim():null,description:typeof(n==null?void 0:n.description)=="string"?n.description:"",order:Number.isFinite(n==null?void 0:n.order)?Number(n.order):d,disabled:!!(n!=null&&n.disabled),dragDisabled:!!(n!=null&&n.dragDisabled),cloneOnDrag:!!(n!=null&&n.cloneOnDrag),hidden:!!(n!=null&&n.hidden)})});const i=new Map(t.map(n=>[n.id,n]));t.forEach(n=>{if(!n.parentId)return;const d=i.get(n.parentId);(!d||d.id===n.id||d.listId!==n.listId)&&(n.parentId=null)});const s=new Map;t.forEach(n=>{const d=z(n.listId,n.parentId),c=s.get(d);c?c.push(n):s.set(d,[n])}),s.forEach(n=>n.sort((d,c)=>d.order-c.order||d.label.localeCompare(c.label)));const o=[],a=new Set,l=(n,d)=>{(s.get(z(n,d))||[]).forEach((g,m)=>{a.has(g.id)||(a.add(g.id),g.order=m,o.push(g),l(n,g.id))})};return u.forEach(n=>l(n.id,null)),t.forEach(n=>{a.has(n.id)||(n.parentId=null,o.push(n))}),o.map($)}function le(u){return JSON.stringify(u.map(e=>({id:e.id,label:e.label,listId:e.listId,parentId:e.parentId,description:e.description,order:e.order,disabled:e.disabled,dragDisabled:e.dragDisabled,cloneOnDrag:e.cloneOnDrag,hidden:e.hidden})))}function ce(u){return JSON.stringify(u.map(e=>({id:e.id,label:e.label,description:e.description,emptyLabel:e.emptyLabel,orientation:e.orientation,disabled:e.disabled,cloneOnDrag:e.cloneOnDrag,accepts:e.accepts})))}function j(u){return JSON.stringify(u)}function J(u){const e=new Map,r=u.map(t=>{const i=z(t.listId,t.parentId),s=e.get(i)??0;return e.set(i,s+1),{id:t.id,listId:t.listId,parentId:t.parentId,index:s}});return{version:re,records:r}}function W(u,e){return e?`${u.label} ${u.description}`.toLowerCase().includes(e.toLowerCase()):!0}function Q(u,e,r,t,i){const s=M(u),o=E(u),a=new Map,l=(c,g)=>{const m=[...o.get(z(c,g))||[]];return i==="label"&&m.sort((f,v)=>{const b=s.get(f),y=s.get(v);return!b||!y?0:b.label.localeCompare(y.label)}),m},n=(c,g,m)=>{const f=[];return l(c,g).forEach(v=>{const b=s.get(v);if(!b||b.hidden)return;const y=n(c,b.id);!W(b,t)&&y.length===0||(f.push({id:b.id,disabled:b.disabled}),y.length&&f.push(...y))}),f};return Array.from(new Set(u.map(c=>c.listId))).forEach(c=>{a.set(c,n(c,null))}),a}class Z extends te.ElementBase{constructor(){super(),this._lists=Y([]),this._items=[],this._selection=[],this._focusedId=null,this._rangeAnchorId=null,this._dragState=null,this._liveMessage="Sortable list ready.",this._lastListsAttr=null,this._lastItemsAttr=null,this._lastSelectionAttr=null,this._hydratedPersistKey=null,this._cloneSeed=1,this._dragImage=null,this._dragPreviewOverlay=null,this._pendingFocusId=null,this._pointerGesture=null,this._pendingDropTarget=null,this._suppressAttributeRender=!1,this._onClick=this._onClick.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onDragStart=this._onDragStart.bind(this),this._onDragOver=this._onDragOver.bind(this),this._onDrop=this._onDrop.bind(this),this._onDragEnd=this._onDragEnd.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerCancel=this._onPointerCancel.bind(this),this._onFocusIn=this._onFocusIn.bind(this),this._onDocumentKeyDown=this._onDocumentKeyDown.bind(this)}static get observedAttributes(){return["lists","items","selection","filter-query","sort","persist-key","allow-filtered-drag","allow-nesting","drop-indicator-visibility","dropzone-style","drag-preview-size","drag-handle-mode","drag-handle-selector","custom-item-rendering","show-selection-badge","disabled"]}shouldRenderOnAttributeChange(e,r,t){return this._suppressAttributeRender?!["lists","items","selection"].includes(e):!0}attributeChangedCallback(e,r,t){if(r!==t&&this.isConnected){if(e==="selection"&&!this._suppressAttributeRender&&this._canSyncInteractiveStateInPlace()){this._syncSelectionFromAttribute(t??null),this._syncSelectionVisualState();return}if(e==="show-selection-badge"&&this._canSyncInteractiveStateInPlace()){this._syncSelectionVisualState();return}super.attributeChangedCallback(e,r,t)}}connectedCallback(){var e,r,t,i;super.connectedCallback(),this.root.addEventListener("click",this._onClick),this.root.addEventListener("keydown",this._onKeyDown),this.root.addEventListener("dragstart",this._onDragStart),this.root.addEventListener("dragover",this._onDragOver),this.root.addEventListener("drop",this._onDrop),this.root.addEventListener("dragend",this._onDragEnd),this.root.addEventListener("pointerdown",this._onPointerDown),this.root.addEventListener("focusin",this._onFocusIn),(e=this.ownerDocument)==null||e.addEventListener("keydown",this._onDocumentKeyDown,!0),(r=this.ownerDocument)==null||r.addEventListener("pointermove",this._onPointerMove,!0),(t=this.ownerDocument)==null||t.addEventListener("pointerup",this._onPointerUp,!0),(i=this.ownerDocument)==null||i.addEventListener("pointercancel",this._onPointerCancel,!0)}disconnectedCallback(){var e,r,t,i;this.root.removeEventListener("click",this._onClick),this.root.removeEventListener("keydown",this._onKeyDown),this.root.removeEventListener("dragstart",this._onDragStart),this.root.removeEventListener("dragover",this._onDragOver),this.root.removeEventListener("drop",this._onDrop),this.root.removeEventListener("dragend",this._onDragEnd),this.root.removeEventListener("pointerdown",this._onPointerDown),this.root.removeEventListener("focusin",this._onFocusIn),(e=this.ownerDocument)==null||e.removeEventListener("keydown",this._onDocumentKeyDown,!0),(r=this.ownerDocument)==null||r.removeEventListener("pointermove",this._onPointerMove,!0),(t=this.ownerDocument)==null||t.removeEventListener("pointerup",this._onPointerUp,!0),(i=this.ownerDocument)==null||i.removeEventListener("pointercancel",this._onPointerCancel,!0),this._removeDragPreviewOverlay(),this._removeDragImage(),super.disconnectedCallback()}get lists(){return this._lists.map(e=>({...e}))}set lists(e){this.setAttribute("lists",JSON.stringify(e??[]))}get items(){return this._items.map(e=>({...e}))}set items(e){this.setAttribute("items",JSON.stringify(e??[]))}get selection(){return[...this._selection]}set selection(e){this.setAttribute("selection",JSON.stringify(e??[]))}get sort(){return this.getAttribute("sort")==="label"?"label":"manual"}set sort(e){!e||e==="manual"?this.removeAttribute("sort"):this.setAttribute("sort",e)}get filterQuery(){return this.getAttribute("filter-query")||""}set filterQuery(e){e?this.setAttribute("filter-query",e):this.removeAttribute("filter-query")}select(e){this._setSelection(e,"api")}clearSelection(){this._setSelection([],"api")}cancelDrag(){this._cancelDrag(!0)}focusItem(e){this._items.some(r=>r.id===e)&&(this._focusedId=e,this._pendingFocusId=e,!this._applyInteractiveStateInPlace({restoreFocus:!0})&&this.requestRender())}moveSelection(e){this._syncSelectionFromAttribute(this.getAttribute("selection"));const r=this._selectedRootIds();r.length&&this._commitMove({listId:e.targetListId,parentId:e.parentId??null,beforeId:e.beforeId??null,mode:e.mode??(e.parentId?"inside":"before")},r,!!e.clone,e.source??"api")}getPersistenceSnapshot(){return J(this._items)}render(){var _,R;this._syncStateFromAttributes();const e=this._measureItemShellRects(),r=new Set(this._draggingIds()),t=new Set(this._selection),s=!!((_=this._dragState)!=null&&_.keyboard)?this._projectedMoveResult():null,o=(s==null?void 0:s.items)||this._items,a=new Set((s==null?void 0:s.insertedRootIds)||[]),l=!!this._dragState&&!this._dragState.keyboard&&!!this._dragState.dropTarget,n=Q(o,t,r,this.filterQuery,this.sort),d=this._resolvedFocusedId(n),c=this._isDragLocked(),g=this._selection.length,m=this.getAttribute("allow-nesting")!=="false",f=this.getAttribute("drop-indicator-visibility")==="always"?"always":"active",v=this._dropzoneStyle(),b=this.getAttribute("show-selection-badge")!=="false",y=this._dragHandleMode(),w=this._usesCustomHandleSelector(),k=c?this.sort==="label"?"Dragging is paused while alphabetical sorting is active.":this.filterQuery&&!this.hasAttribute("allow-filtered-drag")?"Dragging is paused while the list is filtered.":"Dragging is currently disabled.":(R=this._dragState)!=null&&R.keyboard?"Keyboard drag active. Use arrow keys to choose a drop target, Space or Enter to drop, and Escape to cancel.":y==="item"?"Drag from anywhere on an item, or press Space on a focused item to start keyboard reordering.":w?"Use your custom drag handle element, or press Space on a focused item to start keyboard reordering.":"Use the handle to drag, or press Space on a focused item to start keyboard reordering.",A=`
|
|
724
724
|
<style>${ne}</style>
|
|
725
725
|
<div
|
|
726
726
|
class="root"
|
package/dist/sortable.esm.js
CHANGED
|
@@ -781,14 +781,14 @@ function ae(u, e, r, t, i, s) {
|
|
|
781
781
|
!x || l.has(h) || (l.add(h), n.push(h), (a.get(z(x.listId, h)) || []).forEach(d));
|
|
782
782
|
};
|
|
783
783
|
t.forEach(d);
|
|
784
|
-
const c = u.map(P), g = c.filter((h) => l.has(h.id)),
|
|
784
|
+
const c = u.map(P), g = c.filter((h) => l.has(h.id)), m = i ? c.map(P) : c.filter((h) => !l.has(h.id)), f = i ? g.map((h) => s(h, n)) : g.map(P), v = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
|
|
785
785
|
i && g.forEach((h, x) => {
|
|
786
|
-
v.set(h.id, f[x].id),
|
|
786
|
+
v.set(h.id, f[x].id), b.set(f[x].id, h.id);
|
|
787
787
|
}), f.forEach((h) => {
|
|
788
|
-
const x = i ?
|
|
788
|
+
const x = i ? b.get(h.id) : h.id, F = x ? o.get(x) : null;
|
|
789
789
|
F && (i && (h.parentId = F.parentId && v.has(F.parentId) && v.get(F.parentId) || null), h.listId = r.listId);
|
|
790
790
|
});
|
|
791
|
-
const y = t.map((h) => v.get(h) || h), w = [...
|
|
791
|
+
const y = t.map((h) => v.get(h) || h), w = [...m, ...f], k = E(m), A = z(r.listId, r.parentId), _ = [...k.get(A) || []], R = r.beforeId ? _.indexOf(r.beforeId) : _.length, S = R >= 0 ? R : _.length;
|
|
792
792
|
_.splice(S, 0, ...y), k.set(A, _), E(f).forEach((h, x) => {
|
|
793
793
|
const [, F] = x.split("::");
|
|
794
794
|
(F || "") !== "__root__" && k.set(x, [...h]);
|
|
@@ -851,11 +851,11 @@ function U(u, e) {
|
|
|
851
851
|
const c = typeof (n == null ? void 0 : n.id) == "string" && n.id.trim() ? n.id.trim() : "", g = typeof (n == null ? void 0 : n.label) == "string" && n.label.trim() ? n.label.trim() : "";
|
|
852
852
|
if (!c || !g)
|
|
853
853
|
return;
|
|
854
|
-
const
|
|
854
|
+
const m = typeof (n == null ? void 0 : n.listId) == "string" && r.has(n.listId) ? n.listId : u[0].id;
|
|
855
855
|
t.push({
|
|
856
856
|
id: c,
|
|
857
857
|
label: g,
|
|
858
|
-
listId:
|
|
858
|
+
listId: m,
|
|
859
859
|
parentId: typeof (n == null ? void 0 : n.parentId) == "string" && n.parentId.trim() ? n.parentId.trim() : null,
|
|
860
860
|
description: typeof (n == null ? void 0 : n.description) == "string" ? n.description : "",
|
|
861
861
|
order: Number.isFinite(n == null ? void 0 : n.order) ? Number(n.order) : d,
|
|
@@ -878,8 +878,8 @@ function U(u, e) {
|
|
|
878
878
|
c ? c.push(n) : s.set(d, [n]);
|
|
879
879
|
}), s.forEach((n) => n.sort((d, c) => d.order - c.order || d.label.localeCompare(c.label)));
|
|
880
880
|
const o = [], a = /* @__PURE__ */ new Set(), l = (n, d) => {
|
|
881
|
-
(s.get(z(n, d)) || []).forEach((g,
|
|
882
|
-
a.has(g.id) || (a.add(g.id), g.order =
|
|
881
|
+
(s.get(z(n, d)) || []).forEach((g, m) => {
|
|
882
|
+
a.has(g.id) || (a.add(g.id), g.order = m, o.push(g), l(n, g.id));
|
|
883
883
|
});
|
|
884
884
|
};
|
|
885
885
|
return u.forEach((n) => l(n.id, null)), t.forEach((n) => {
|
|
@@ -935,21 +935,21 @@ function W(u, e) {
|
|
|
935
935
|
}
|
|
936
936
|
function Q(u, e, r, t, i) {
|
|
937
937
|
const s = M(u), o = E(u), a = /* @__PURE__ */ new Map(), l = (c, g) => {
|
|
938
|
-
const
|
|
939
|
-
return i === "label" &&
|
|
940
|
-
const
|
|
941
|
-
return !
|
|
942
|
-
}),
|
|
943
|
-
}, n = (c, g,
|
|
938
|
+
const m = [...o.get(z(c, g)) || []];
|
|
939
|
+
return i === "label" && m.sort((f, v) => {
|
|
940
|
+
const b = s.get(f), y = s.get(v);
|
|
941
|
+
return !b || !y ? 0 : b.label.localeCompare(y.label);
|
|
942
|
+
}), m;
|
|
943
|
+
}, n = (c, g, m) => {
|
|
944
944
|
const f = [];
|
|
945
945
|
return l(c, g).forEach((v) => {
|
|
946
|
-
const
|
|
947
|
-
if (!
|
|
946
|
+
const b = s.get(v);
|
|
947
|
+
if (!b || b.hidden)
|
|
948
948
|
return;
|
|
949
|
-
const y = n(c,
|
|
950
|
-
!W(
|
|
951
|
-
id:
|
|
952
|
-
disabled:
|
|
949
|
+
const y = n(c, b.id);
|
|
950
|
+
!W(b, t) && y.length === 0 || (f.push({
|
|
951
|
+
id: b.id,
|
|
952
|
+
disabled: b.disabled
|
|
953
953
|
}), y.length && f.push(...y));
|
|
954
954
|
}), f;
|
|
955
955
|
};
|
|
@@ -1048,6 +1048,7 @@ class ce extends ee {
|
|
|
1048
1048
|
this._items.some((r) => r.id === e) && (this._focusedId = e, this._pendingFocusId = e, !this._applyInteractiveStateInPlace({ restoreFocus: !0 }) && this.requestRender());
|
|
1049
1049
|
}
|
|
1050
1050
|
moveSelection(e) {
|
|
1051
|
+
this._syncSelectionFromAttribute(this.getAttribute("selection"));
|
|
1051
1052
|
const r = this._selectedRootIds();
|
|
1052
1053
|
r.length && this._commitMove({
|
|
1053
1054
|
listId: e.targetListId,
|
|
@@ -1062,7 +1063,7 @@ class ce extends ee {
|
|
|
1062
1063
|
render() {
|
|
1063
1064
|
var _, R;
|
|
1064
1065
|
this._syncStateFromAttributes();
|
|
1065
|
-
const e = this._measureItemShellRects(), r = new Set(this._draggingIds()), t = new Set(this._selection), s = !!((_ = this._dragState) != null && _.keyboard) ? this._projectedMoveResult() : null, o = (s == null ? void 0 : s.items) || this._items, a = new Set((s == null ? void 0 : s.insertedRootIds) || []), l = !!this._dragState && !this._dragState.keyboard && !!this._dragState.dropTarget, n = Q(o, t, r, this.filterQuery, this.sort), d = this._resolvedFocusedId(n), c = this._isDragLocked(), g = this._selection.length,
|
|
1066
|
+
const e = this._measureItemShellRects(), r = new Set(this._draggingIds()), t = new Set(this._selection), s = !!((_ = this._dragState) != null && _.keyboard) ? this._projectedMoveResult() : null, o = (s == null ? void 0 : s.items) || this._items, a = new Set((s == null ? void 0 : s.insertedRootIds) || []), l = !!this._dragState && !this._dragState.keyboard && !!this._dragState.dropTarget, n = Q(o, t, r, this.filterQuery, this.sort), d = this._resolvedFocusedId(n), c = this._isDragLocked(), g = this._selection.length, m = this.getAttribute("allow-nesting") !== "false", f = this.getAttribute("drop-indicator-visibility") === "always" ? "always" : "active", v = this._dropzoneStyle(), b = this.getAttribute("show-selection-badge") !== "false", y = this._dragHandleMode(), w = this._usesCustomHandleSelector(), k = c ? this.sort === "label" ? "Dragging is paused while alphabetical sorting is active." : this.filterQuery && !this.hasAttribute("allow-filtered-drag") ? "Dragging is paused while the list is filtered." : "Dragging is currently disabled." : (R = this._dragState) != null && R.keyboard ? "Keyboard drag active. Use arrow keys to choose a drop target, Space or Enter to drop, and Escape to cancel." : y === "item" ? "Drag from anywhere on an item, or press Space on a focused item to start keyboard reordering." : w ? "Use your custom drag handle element, or press Space on a focused item to start keyboard reordering." : "Use the handle to drag, or press Space on a focused item to start keyboard reordering.", A = `
|
|
1066
1067
|
<style>${se}</style>
|
|
1067
1068
|
<div
|
|
1068
1069
|
class="root"
|
|
@@ -1082,7 +1083,7 @@ class ce extends ee {
|
|
|
1082
1083
|
<div class="lists" part="lists">
|
|
1083
1084
|
${this._lists.map((S) => {
|
|
1084
1085
|
var L;
|
|
1085
|
-
const C = n.get(S.id) || [], T = C.length ? this._renderListTree(o, S, d, r,
|
|
1086
|
+
const C = n.get(S.id) || [], T = C.length ? this._renderListTree(o, S, d, r, m, a, b) : "", $ = S.disabled ? "This list is read-only." : S.cloneOnDrag ? "Dragging from this list creates a copy." : (L = S.accepts) != null && L.length ? `Accepts drops from: ${S.accepts.join(", ")}` : "";
|
|
1086
1087
|
return `
|
|
1087
1088
|
<section
|
|
1088
1089
|
class="list"
|
|
@@ -1344,14 +1345,14 @@ class ce extends ee {
|
|
|
1344
1345
|
`;
|
|
1345
1346
|
const l = o.getBoundingClientRect();
|
|
1346
1347
|
r && r.setAttribute("data-drag-preview", "true"), a.style.setProperty("left", "-9999px"), a.style.setProperty("top", "-9999px"), s ? (a.style.setProperty("inline-size", `${s.width}px`), a.style.setProperty("block-size", `${s.height}px`)) : (a.style.removeProperty("inline-size"), a.style.removeProperty("block-size")), a.setAttribute("data-visible", "true");
|
|
1347
|
-
const n = a.getBoundingClientRect(), d = (s == null ? void 0 : s.width) ?? n.width, c = (s == null ? void 0 : s.height) ?? n.height, g = Math.max(16, Math.min(l.left, window.innerWidth - d - 16)),
|
|
1348
|
+
const n = a.getBoundingClientRect(), d = (s == null ? void 0 : s.width) ?? n.width, c = (s == null ? void 0 : s.height) ?? n.height, g = Math.max(16, Math.min(l.left, window.innerWidth - d - 16)), m = Math.max(
|
|
1348
1349
|
16,
|
|
1349
1350
|
Math.min(
|
|
1350
1351
|
l.top + (l.height - c) / 2,
|
|
1351
1352
|
window.innerHeight - c - 16
|
|
1352
1353
|
)
|
|
1353
1354
|
);
|
|
1354
|
-
a.style.setProperty("left", `${Math.round(g)}px`), a.style.setProperty("top", `${Math.round(
|
|
1355
|
+
a.style.setProperty("left", `${Math.round(g)}px`), a.style.setProperty("top", `${Math.round(m)}px`);
|
|
1355
1356
|
}
|
|
1356
1357
|
_setDraggingVisualState(e, r) {
|
|
1357
1358
|
e.forEach((t) => {
|
|
@@ -1474,17 +1475,17 @@ class ce extends ee {
|
|
|
1474
1475
|
}
|
|
1475
1476
|
_renderListTree(e, r, t, i, s, o, a) {
|
|
1476
1477
|
const l = M(e), n = E(e), d = (c) => {
|
|
1477
|
-
const g = n.get(z(r.id, c)) || [],
|
|
1478
|
-
const y = l.get(v), w = l.get(
|
|
1478
|
+
const g = n.get(z(r.id, c)) || [], m = this.sort === "label" ? [...g].sort((v, b) => {
|
|
1479
|
+
const y = l.get(v), w = l.get(b);
|
|
1479
1480
|
return !y || !w ? 0 : y.label.localeCompare(w.label);
|
|
1480
1481
|
}) : g;
|
|
1481
1482
|
let f = "";
|
|
1482
|
-
return
|
|
1483
|
-
const
|
|
1484
|
-
if (!
|
|
1483
|
+
return m.forEach((v) => {
|
|
1484
|
+
const b = l.get(v);
|
|
1485
|
+
if (!b || b.hidden)
|
|
1485
1486
|
return;
|
|
1486
1487
|
const y = this._renderChildBranch(
|
|
1487
|
-
|
|
1488
|
+
b,
|
|
1488
1489
|
t,
|
|
1489
1490
|
i,
|
|
1490
1491
|
d,
|
|
@@ -1492,7 +1493,7 @@ class ce extends ee {
|
|
|
1492
1493
|
o,
|
|
1493
1494
|
a
|
|
1494
1495
|
);
|
|
1495
|
-
!W(
|
|
1496
|
+
!W(b, this.filterQuery) && !y.includes('class="item"') || (f += this._renderDropzone({
|
|
1496
1497
|
listId: r.id,
|
|
1497
1498
|
parentId: c,
|
|
1498
1499
|
beforeId: v,
|
|
@@ -1509,7 +1510,7 @@ class ce extends ee {
|
|
|
1509
1510
|
}
|
|
1510
1511
|
_renderChildBranch(e, r, t, i, s, o, a) {
|
|
1511
1512
|
var S, C, T, $;
|
|
1512
|
-
const l = I(e.id), n = o.has(e.id), d = n ? "" : i(e.id), c = d.includes('class="item"'), g = n ? !1 : this._selection.includes(e.id),
|
|
1513
|
+
const l = I(e.id), n = o.has(e.id), d = n ? "" : i(e.id), c = d.includes('class="item"'), g = n ? !1 : this._selection.includes(e.id), m = n ? !1 : t.has(e.id), f = e.disabled, v = f || e.dragDisabled || this._isDragLocked(), b = ((C = (S = this._dragState) == null ? void 0 : S.dropTarget) == null ? void 0 : C.mode) === "inside" && this._dragState.dropTarget.parentId === e.id, y = (T = this._dragState) != null && T.clone ? "Copy preview" : "Drop preview", w = ($ = this._dragState) != null && $.clone ? "Release to add a copy here." : this._dragState && this._dragState.movedRootIds.length > 1 ? "Release to place this selection here." : "Release to place this item here.", k = this._dragHandleMode(), A = this._usesCustomHandleSelector(), _ = A ? "custom" : k, R = !A && k === "handle";
|
|
1513
1514
|
return `
|
|
1514
1515
|
<div class="item-shell" data-item-shell="${l}">
|
|
1515
1516
|
<article
|
|
@@ -1520,13 +1521,13 @@ class ce extends ee {
|
|
|
1520
1521
|
${!n && _ === "item" ? 'data-drag-trigger="item"' : ""}
|
|
1521
1522
|
data-selected="${g}"
|
|
1522
1523
|
data-focused="${n ? "false" : r === e.id}"
|
|
1523
|
-
data-dragging="${
|
|
1524
|
+
data-dragging="${m}"
|
|
1524
1525
|
data-disabled="${f}"
|
|
1525
|
-
data-drop-inside-active="${
|
|
1526
|
+
data-drop-inside-active="${b ? "true" : "false"}"
|
|
1526
1527
|
role="${n ? "presentation" : "option"}"
|
|
1527
1528
|
aria-selected="${n ? "false" : g}"
|
|
1528
1529
|
aria-disabled="${f}"
|
|
1529
|
-
aria-grabbed="${n ? "false" :
|
|
1530
|
+
aria-grabbed="${n ? "false" : m}"
|
|
1530
1531
|
aria-hidden="${n ? "true" : "false"}"
|
|
1531
1532
|
tabindex="${n ? "-1" : r === e.id ? "0" : "-1"}"
|
|
1532
1533
|
>
|
|
@@ -1777,7 +1778,7 @@ class ce extends ee {
|
|
|
1777
1778
|
const a = this._items.find((_) => _.id === o);
|
|
1778
1779
|
if (!a)
|
|
1779
1780
|
return null;
|
|
1780
|
-
const l = this._lists.find((_) => _.id === a.listId), n = s.getBoundingClientRect(), d = (l == null ? void 0 : l.orientation) === "horizontal", c = d ? n.left : n.top, g = d ? n.right : n.bottom,
|
|
1781
|
+
const l = this._lists.find((_) => _.id === a.listId), n = s.getBoundingClientRect(), d = (l == null ? void 0 : l.orientation) === "horizontal", c = d ? n.left : n.top, g = d ? n.right : n.bottom, m = d ? r : t, f = Math.max(1, g - c), v = (m - c) / f, b = this.getAttribute("allow-nesting") !== "false" && !a.disabled;
|
|
1781
1782
|
if (v <= 0.34)
|
|
1782
1783
|
return {
|
|
1783
1784
|
listId: a.listId,
|
|
@@ -1785,7 +1786,7 @@ class ce extends ee {
|
|
|
1785
1786
|
beforeId: a.id,
|
|
1786
1787
|
mode: "before"
|
|
1787
1788
|
};
|
|
1788
|
-
if (
|
|
1789
|
+
if (b && v >= 0.34 && v <= 0.74)
|
|
1789
1790
|
return {
|
|
1790
1791
|
listId: a.listId,
|
|
1791
1792
|
parentId: a.id,
|
|
@@ -2011,20 +2012,20 @@ class ce extends ee {
|
|
|
2011
2012
|
!D || a.has(p) || (a.add(p), l.push(p), (o.get(z(D.listId, p)) || []).forEach(n));
|
|
2012
2013
|
};
|
|
2013
2014
|
r.forEach(n);
|
|
2014
|
-
const d = this._items.map(P), c = d.filter((p) => a.has(p.id)), g = t ? d.map(P) : d.filter((p) => !a.has(p.id)),
|
|
2015
|
+
const d = this._items.map(P), c = d.filter((p) => a.has(p.id)), g = t ? d.map(P) : d.filter((p) => !a.has(p.id)), m = t ? c.map((p) => this._cloneSubtreeItem(p, l)) : c.map(P), f = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map();
|
|
2015
2016
|
t && c.forEach((p, D) => {
|
|
2016
|
-
f.set(p.id,
|
|
2017
|
-
}),
|
|
2017
|
+
f.set(p.id, m[D].id), v.set(m[D].id, p.id);
|
|
2018
|
+
}), m.forEach((p) => {
|
|
2018
2019
|
const D = t ? v.get(p.id) : p.id, q = D ? s.get(D) : null;
|
|
2019
2020
|
q && (t && (p.parentId = q.parentId && f.has(q.parentId) && f.get(q.parentId) || null), p.listId = e.listId);
|
|
2020
2021
|
});
|
|
2021
|
-
const
|
|
2022
|
-
A.splice(R, 0, ...
|
|
2022
|
+
const b = r.map((p) => f.get(p) || p), y = [...g, ...m], w = E(g), k = z(e.listId, e.parentId), A = [...w.get(k) || []], _ = e.beforeId ? A.indexOf(e.beforeId) : A.length, R = _ >= 0 ? _ : A.length;
|
|
2023
|
+
A.splice(R, 0, ...b), w.set(k, A), E(m).forEach((p, D) => {
|
|
2023
2024
|
const [, q] = D.split("::");
|
|
2024
2025
|
(q || "") !== "__root__" && w.set(D, [...p]);
|
|
2025
2026
|
});
|
|
2026
2027
|
const C = M(y);
|
|
2027
|
-
|
|
2028
|
+
b.forEach((p) => {
|
|
2028
2029
|
const D = C.get(p);
|
|
2029
2030
|
D && (D.parentId = e.parentId, D.listId = e.listId);
|
|
2030
2031
|
});
|
|
@@ -2037,7 +2038,7 @@ class ce extends ee {
|
|
|
2037
2038
|
this._lists.forEach((p) => L(p.id, null)), y.forEach((p) => {
|
|
2038
2039
|
$.has(p.id) || (p.parentId = null, T.push(p));
|
|
2039
2040
|
}), this._dragState && (this._dragState.committed = !0), this._items = T.map(P), this._clearPointerDragPreview(), this._dragState = null, this._removeDragImage();
|
|
2040
|
-
const G = [...
|
|
2041
|
+
const G = [...b], h = [...this._selection];
|
|
2041
2042
|
this._selection = G, this._focusedId = G[0] || null, this._pendingFocusId = this._focusedId, this._syncAttributesFromState();
|
|
2042
2043
|
const x = J(this._items);
|
|
2043
2044
|
this._persistSnapshot(x);
|
|
@@ -2046,7 +2047,7 @@ class ce extends ee {
|
|
|
2046
2047
|
lists: this.lists,
|
|
2047
2048
|
selection: [...G],
|
|
2048
2049
|
previousSelection: h,
|
|
2049
|
-
movedIds: [...
|
|
2050
|
+
movedIds: [...b],
|
|
2050
2051
|
source: i,
|
|
2051
2052
|
operation: O,
|
|
2052
2053
|
persistence: x
|
|
@@ -2059,7 +2060,7 @@ class ce extends ee {
|
|
|
2059
2060
|
detail: K,
|
|
2060
2061
|
bubbles: !0,
|
|
2061
2062
|
composed: !0
|
|
2062
|
-
})), this._announce(this._messageForMove(O,
|
|
2063
|
+
})), this._announce(this._messageForMove(O, b.length, e)), this.requestRender();
|
|
2063
2064
|
}
|
|
2064
2065
|
_syncAttributesFromState() {
|
|
2065
2066
|
const e = le(this._lists), r = de(this._items), t = j(this._selection);
|
|
@@ -2165,8 +2166,8 @@ class ce extends ee {
|
|
|
2165
2166
|
return;
|
|
2166
2167
|
const t = Math.max(0, r.findIndex(
|
|
2167
2168
|
(s) => {
|
|
2168
|
-
var o, a, l, n, d, c, g,
|
|
2169
|
-
return s.listId === ((a = (o = this._dragState) == null ? void 0 : o.dropTarget) == null ? void 0 : a.listId) && s.parentId === ((n = (l = this._dragState) == null ? void 0 : l.dropTarget) == null ? void 0 : n.parentId) && s.beforeId === ((c = (d = this._dragState) == null ? void 0 : d.dropTarget) == null ? void 0 : c.beforeId) && s.mode === ((
|
|
2169
|
+
var o, a, l, n, d, c, g, m;
|
|
2170
|
+
return s.listId === ((a = (o = this._dragState) == null ? void 0 : o.dropTarget) == null ? void 0 : a.listId) && s.parentId === ((n = (l = this._dragState) == null ? void 0 : l.dropTarget) == null ? void 0 : n.parentId) && s.beforeId === ((c = (d = this._dragState) == null ? void 0 : d.dropTarget) == null ? void 0 : c.beforeId) && s.mode === ((m = (g = this._dragState) == null ? void 0 : g.dropTarget) == null ? void 0 : m.mode);
|
|
2170
2171
|
}
|
|
2171
2172
|
)), i = Math.max(0, Math.min(r.length - 1, t + e));
|
|
2172
2173
|
this._setDropTarget(r[i], { announceLabel: r[i].label });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editora/ui-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Framework-agnostic Web Components and primitives for the Editora UI ecosystem",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@editora/icons": "^0.1.
|
|
57
|
+
"@editora/icons": "^0.1.7"
|
|
58
58
|
},
|
|
59
59
|
"keywords": [
|
|
60
60
|
"editora",
|