@robot-admin/naive-ui-components 0.42.1 → 0.42.2
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/CHANGELOG.md +9 -0
- package/README.md +1 -1
- package/README_EN.md +1 -1
- package/dist/C_SplitPane.css +9 -10
- package/dist/C_SplitPane2.cjs +1 -1
- package/dist/C_SplitPane2.js +1 -1
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants3.d.cts +7 -7
- package/dist/constants3.d.ts +7 -7
- package/dist/constants4.d.cts +4 -4
- package/dist/constants4.d.ts +4 -4
- package/dist/data2.d.cts +9 -9
- package/dist/data2.d.ts +9 -9
- package/dist/editors.d.cts +7 -7
- package/dist/editors.d.ts +7 -7
- package/dist/index11.vue.d.ts +3 -3
- package/dist/index12.vue.d.cts +3 -3
- package/dist/index13.vue.d.ts +4 -4
- package/dist/index14.vue.d.cts +4 -4
- package/dist/index14.vue.d.ts +3 -3
- package/dist/index15.vue.d.cts +3 -3
- package/dist/index2.vue.d.cts +2 -2
- package/dist/index2.vue.d.ts +2 -2
- package/dist/index20.vue.d.ts +5 -5
- package/dist/index21.vue.d.cts +5 -5
- package/dist/index21.vue.d.ts +7 -7
- package/dist/index22.vue.d.cts +7 -7
- package/dist/index23.vue.d.ts +2 -2
- package/dist/index24.vue.d.cts +2 -2
- package/dist/index24.vue.d.ts +1 -1
- package/dist/index25.vue.d.cts +1 -1
- package/dist/index27.vue.d.ts +2 -2
- package/dist/index28.vue.d.cts +2 -2
- package/dist/index29.vue.d.cts +2 -2
- package/dist/index29.vue.d.ts +2 -2
- package/dist/index3.vue.d.cts +5 -5
- package/dist/index3.vue.d.ts +5 -5
- package/dist/index31.vue.d.cts +1 -1
- package/dist/index31.vue.d.ts +1 -1
- package/dist/index38.vue.d.cts +1 -1
- package/dist/index38.vue.d.ts +1 -1
- package/dist/index39.vue.d.cts +2 -2
- package/dist/index39.vue.d.ts +2 -2
- package/dist/index42.vue.d.cts +3 -3
- package/dist/index42.vue.d.ts +3 -3
- package/dist/index43.vue.d.cts +2 -2
- package/dist/index43.vue.d.ts +2 -2
- package/dist/index5.vue.d.cts +1 -1
- package/dist/index5.vue.d.ts +1 -1
- package/dist/index6.vue.d.cts +5 -5
- package/dist/index6.vue.d.ts +5 -5
- package/dist/mapUtils.d.cts +2 -2
- package/dist/mapUtils.d.ts +2 -2
- package/dist/presets.d.cts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/style.css +9 -10
- package/dist/useCalendarEvents.d.cts +1 -1
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.cts +5 -5
- package/dist/useCollapsePanel.d.ts +5 -5
- package/dist/useCropperCore.d.cts +6 -6
- package/dist/useCropperCore.d.ts +6 -6
- package/dist/useEdgeInteraction.d.cts +1 -1
- package/dist/useEdgeInteraction.d.ts +1 -1
- package/dist/useFullscreen.d.cts +3 -3
- package/dist/useFullscreen.d.ts +3 -3
- package/dist/useQRCode.d.cts +5 -5
- package/dist/useQRCode.d.ts +5 -5
- package/dist/useSignatureHistory.d.cts +3 -3
- package/dist/useSignatureHistory.d.ts +3 -3
- package/dist/useSplitResize.d.cts +4 -4
- package/dist/useSplitResize.d.ts +4 -4
- package/dist/useWorkflowValidation.d.cts +102 -102
- package/dist/useWorkflowValidation.d.ts +102 -102
- package/dist/verification.d.cts +2 -2
- package/dist/verification.d.ts +2 -2
- package/docs/guides/split-pane.en.md +4 -4
- package/docs/guides/split-pane.md +4 -11
- package/docs/wl-ui-produce-coverage.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @robot-admin/naive-ui-components
|
|
2
2
|
|
|
3
|
+
## 0.42.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- `C_SplitPane` 按实际折叠状态通知 `collapse` 和 `expand`。禁用折叠后,键盘抵达或离开尺寸边界时只通知比例变化。
|
|
8
|
+
- 受控拖动合并同一手势内连续重复的尺寸请求。容器尺寸变化后,仍按最新可用空间重新换算位移。
|
|
9
|
+
- 握柄悬停时的透明区域允许相邻表格接收点击,两侧箭头保持可达。减少动态效果模式下保留无动画的短暂停留时间。
|
|
10
|
+
- 根据生产多表页面与实际平台手柄实现更新中英文指南,说明拖动热区、页面高度预算和初始尺寸单位。
|
|
11
|
+
|
|
3
12
|
## 0.42.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
**Naive UI Components** 是从 [Robot Admin](https://github.com/ChenyCHENYU/Robot_Admin) 提炼的 Vue 3 组件库,以 `@robot-admin/naive-ui-components` 独立发布。表单、表格、实体选择和工作台可以通过类型化的配置接入。业务接口、权限和任务执行由宿主应用负责。
|
|
30
30
|
|
|
31
|
-
当前仓库版本 **0.42.
|
|
31
|
+
当前仓库版本 **0.42.2**。分割面板按实际状态通知折叠和展开,受控拖动合并连续重复的尺寸请求。多表页面可用像素下限和分隔条宽度预留拖动空间。 [分割面板](./docs/guides/split-pane.md) · [变更记录](./CHANGELOG.md)
|
|
32
32
|
|
|
33
33
|
## 快速开始
|
|
34
34
|
|
package/README_EN.md
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
**Naive UI Components** is a Vue 3 library extracted from [Robot Admin](https://github.com/ChenyCHENYU/Robot_Admin) and published independently as `@robot-admin/naive-ui-components`. It provides typed configuration for forms, tables, entity pickers, and workspaces. The host application owns endpoints, permissions, and task execution.
|
|
30
30
|
|
|
31
|
-
The current repository version is **0.42.
|
|
31
|
+
The current repository version is **0.42.2**. Split panes report actual collapse and expansion, and controlled dragging suppresses consecutive duplicate size requests. Multi-table workspaces can reserve room to resize with pixel minimums and a configurable divider. [Split panes](./docs/guides/split-pane.en.md) · [Changelog](./CHANGELOG.md)
|
|
32
32
|
|
|
33
33
|
## Quick start
|
|
34
34
|
|
package/dist/C_SplitPane.css
CHANGED
|
@@ -185,8 +185,8 @@
|
|
|
185
185
|
cursor: pointer;
|
|
186
186
|
opacity: 0;
|
|
187
187
|
visibility: hidden;
|
|
188
|
-
pointer-events:
|
|
189
|
-
transition: opacity 0.16s ease, border-color 0.16s ease, color 0.16s ease;
|
|
188
|
+
pointer-events: auto;
|
|
189
|
+
transition: opacity 0.16s ease, visibility 0s linear 0.16s, border-color 0.16s ease, color 0.16s ease;
|
|
190
190
|
}
|
|
191
191
|
.split-gutter__collapse-btn[data-v-6f1b8596]:hover, .split-gutter__collapse-btn[data-v-6f1b8596]:focus-visible {
|
|
192
192
|
color: var(--split-accent);
|
|
@@ -230,9 +230,6 @@
|
|
|
230
230
|
.c-split-pane--vertical.c-split-pane--collapsed-second > .split-gutter .split-gutter__collapse-btn--second .split-gutter__chevron[data-v-6f1b8596] {
|
|
231
231
|
transform: rotate(90deg);
|
|
232
232
|
}
|
|
233
|
-
.c-split-pane:not(.c-split-pane--disabled) > .split-gutter:hover .split-gutter__controls[data-v-6f1b8596] {
|
|
234
|
-
pointer-events: auto;
|
|
235
|
-
}
|
|
236
233
|
.c-split-pane:not(.c-split-pane--disabled) > .split-gutter[data-v-6f1b8596]:hover, .c-split-pane:not(.c-split-pane--disabled) > .split-gutter[data-v-6f1b8596]:focus-within {
|
|
237
234
|
--split-line-color: color-mix(
|
|
238
235
|
in srgb,
|
|
@@ -252,7 +249,7 @@
|
|
|
252
249
|
.c-split-pane:not(.c-split-pane--disabled) > .split-gutter:hover .split-gutter__collapse-btn[data-v-6f1b8596], .c-split-pane:not(.c-split-pane--disabled) > .split-gutter:focus-within .split-gutter__collapse-btn[data-v-6f1b8596] {
|
|
253
250
|
opacity: 1;
|
|
254
251
|
visibility: visible;
|
|
255
|
-
|
|
252
|
+
transition-delay: 0s;
|
|
256
253
|
}
|
|
257
254
|
.c-split-pane:not(.c-split-pane--disabled) > .split-gutter:focus-visible .split-gutter__visual[data-v-6f1b8596] {
|
|
258
255
|
outline: 2px solid var(--split-accent);
|
|
@@ -278,7 +275,7 @@
|
|
|
278
275
|
.c-split-pane--collapsed-second > .split-gutter .split-gutter__collapse-btn[data-v-6f1b8596] {
|
|
279
276
|
opacity: 1;
|
|
280
277
|
visibility: visible;
|
|
281
|
-
|
|
278
|
+
transition-delay: 0s;
|
|
282
279
|
}
|
|
283
280
|
.c-split-pane--horizontal.c-split-pane--collapsed-first > .split-gutter .split-gutter__controls[data-v-6f1b8596] {
|
|
284
281
|
left: 0;
|
|
@@ -308,16 +305,18 @@
|
|
|
308
305
|
.c-split-pane:not(.c-split-pane--disabled) > .split-gutter .split-gutter__collapse-btn[data-v-6f1b8596] {
|
|
309
306
|
opacity: 1;
|
|
310
307
|
visibility: visible;
|
|
311
|
-
|
|
308
|
+
transition-delay: 0s;
|
|
312
309
|
}
|
|
313
310
|
}
|
|
314
311
|
@media (prefers-reduced-motion: reduce) {
|
|
315
312
|
.split-gutter[data-v-6f1b8596]::before,
|
|
316
313
|
.split-gutter__visual[data-v-6f1b8596],
|
|
317
|
-
.split-gutter__dot[data-v-6f1b8596]
|
|
318
|
-
.split-gutter__collapse-btn[data-v-6f1b8596] {
|
|
314
|
+
.split-gutter__dot[data-v-6f1b8596] {
|
|
319
315
|
transition: none;
|
|
320
316
|
}
|
|
317
|
+
.split-gutter__collapse-btn[data-v-6f1b8596] {
|
|
318
|
+
transition: opacity 0s linear 0.16s, visibility 0s linear 0.16s;
|
|
319
|
+
}
|
|
321
320
|
}
|
|
322
321
|
|
|
323
322
|
/* layer: shortcuts */
|
package/dist/C_SplitPane2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk.cjs`);const e=require(`./useComponentLocale.cjs`),t=require(`./useComponentTheme.cjs`),n=require(`./export-helper.cjs`);let r=require(`vue`);const i=(e,t)=>typeof e==`number`&&Number.isFinite(e)?e:t,a=e=>Math.max(4,i(e,6));function o(e){let t=Math.max(0,Math.min(100,i(e.minSize,0))),n=Math.max(0,Math.min(100,i(e.maxSize,100))),r=Math.min(t,n),a=Math.max(t,n),o=Math.max(0,i(e.availableLength,0));if(!o)return{min:r,max:a};let s=Math.max(0,i(e.minFirstSize,0)),c=Math.max(0,i(e.minSecondSize,0)),l=Math.max(r,s/o*100),u=Math.min(a,100-c/o*100);if(l<=u)return{min:l,max:u};let d=s+c?s/(s+c)*100:50,f=Math.max(r,Math.min(a,d));return{min:f,max:f}}function s(e,t,n){return Math.min(n,Math.max(t,i(e,50)))}const c=new WeakMap;function l(e,t){let{style:n}=e.body,r=t===`horizontal`?`col-resize`:`row-resize`,i=[`cursor`,`user-select`].map(e=>({name:e,value:n.getPropertyValue(e),priority:n.getPropertyPriority(e),owned:e===`cursor`?r:`none`}));for(let e of i)n.setProperty(e.name,e.owned);return()=>{for(let e of i)n.getPropertyValue(e.name)===e.owned&&(e.value?n.setProperty(e.name,e.value,e.priority):n.removeProperty(e.name))}}function u(e,t){let n=e.currentTarget,r=n.ownerDocument,i=r.defaultView;if(!i)return;let a=i,o=t.direction===`horizontal`?`clientX`:`clientY`,s=e[o],u=e.pointerId,d=!0,f=!1,p=0,m,h,g;c.get(r)?.(),e.preventDefault(),e.stopPropagation(),n.focus({preventScroll:!0});function _(e){p=e[o]-s,!f&&Math.abs(p)>=3&&(f=!0,g=l(r,t.direction),t.onStart())}function v(e){e.pointerId===u&&(_(e),!(!f||!d)&&(e.cancelable&&e.preventDefault(),h===void 0&&(h=a.requestAnimationFrame(()=>{h=void 0,m=p,t.onDelta(p)}))))}function y(e){d&&(d=!1,h!==void 0&&a.cancelAnimationFrame(h),g?.(),r.removeEventListener(`pointermove`,v,!0),r.removeEventListener(`pointerup`,b,!0),r.removeEventListener(`pointercancel`,b,!0),r.removeEventListener(`visibilitychange`,S),a.removeEventListener(`blur`,x),c.get(r)===x&&c.delete(r),e&&f&&p!==m&&t.onDelta(p),t.onEnd(f))}function b(e){if(!d||e.pointerId!==u)return;let t=e.type===`pointerup`;t&&_(e),y(t)}let x=()=>y(!1),S=()=>{r.hidden&&x()};return r.addEventListener(`pointermove`,v,{capture:!0,passive:!1}),r.addEventListener(`pointerup`,b,!0),r.addEventListener(`pointercancel`,b,!0),r.addEventListener(`visibilitychange`,S),a.addEventListener(`blur`,x),c.set(r,x),x}function d(e){return e===0?`first`:e===100?`second`:null}function f(e,t,n,r,i){if(e===`Home`)return i.min;if(e===`End`)return i.max;let a=t===`horizontal`?`ArrowLeft`:`ArrowUp`,o=t===`horizontal`?`ArrowRight`:`ArrowDown`;if(e===a)return r-n;if(e===o)return r+n}function p(e){let{containerRef:t,direction:n,disabled:c,collapsible:l}=e,p=(0,r.ref)(0),m=(0,r.computed)(()=>a((0,r.toValue)(e.gutterSize))),h=(0,r.computed)(()=>Math.max(0,p.value-m.value)),g=(0,r.computed)(()=>o({minSize:(0,r.toValue)(e.minSize),maxSize:(0,r.toValue)(e.maxSize),minFirstSize:(0,r.toValue)(e.minFirstSize)??0,minSecondSize:(0,r.toValue)(e.minSecondSize)??0,availableLength:h.value})),_=(0,r.ref)(s((0,r.toValue)(e.defaultSize),g.value.min,g.value.max)),v=(0,r.computed)(()=>(0,r.toValue)(e.size)!==void 0),y=(0,r.computed)(()=>v.value?i((0,r.toValue)(e.size),50):_.value),b=(0,r.computed)(()=>l.value?y.value===0?`first`:y.value===100?`second`:null:null),x=(0,r.computed)(()=>b.value?b.value===`first`?0:100:s(y.value,g.value.min,g.value.max)),S=(0,r.ref)(!1),C=(0,r.computed)(()=>b.value===`first`),w=(0,r.computed)(()=>b.value===`second`),T=i((0,r.toValue)(e.defaultSize),50),E=b.value?s(T>0&&T<100?T:50,g.value.min,g.value.max):x.value,D,O=!1,k=!1,A,j=(t,n=!1)=>{if(!Number.isFinite(t))return;let r=n?t:s(t,g.value.min,g.value.max);r!==y.value&&(v.value||(_.value=r),e.onUpdateSize?.(r))};(0,r.watch)(x,(t,n)=>{let r=d(n),i=b.value;!r&&i&&(E=n),r&&r!==i&&e.onExpand?.(r),i&&i!==r&&e.onCollapse?.(i),e.onResize?.(t,100-t)},{flush:`sync`}),(0,r.watch)(g,()=>{b.value||j(x.value)},{flush:`sync`}),(0,r.watch)([c,n],()=>D?.(),{flush:`sync`}),(0,r.watch)(l,()=>{b.value||j(x.value)},{flush:`sync`});let M=()=>{let e=t.value;if(!e)return;let r=e.getBoundingClientRect();p.value=n.value===`horizontal`?r.width:r.height};(0,r.watch)(n,M,{flush:`post`}),(0,r.onMounted)(()=>{M(),typeof ResizeObserver<`u`&&t.value&&(A=new ResizeObserver(M),A.observe(t.value))});let N=(e=`first`)=>{!l.value||b.value===e||(b.value||(E=x.value),j(e===`first`?0:100,!0))},P=()=>{b.value&&j(E)},F=(e=`first`)=>{b.value===e?P():N(e)},I=()=>j(i((0,r.toValue)(e.defaultSize),50)),L=e=>j(e),R=t=>{if(c.value||D||t.button!==0||!t.isPrimary||(M(),!h.value))return;O=k,k=!1;let i=x.value;D=u(t,{direction:n.value,onStart:()=>{k=!0,S.value=!0,e.onDragStart?.(i)},onDelta:e=>{let t=h.value;t&&j(i+e/t*100)},onEnd:t=>{if(S.value=!1,D=void 0,!t)return;let n=()=>e.onDragEnd?.(x.value);v.value?(0,r.nextTick)(n):n()}})},z=()=>{b.value?P():N(`first`)};return(0,r.onDeactivated)(()=>D?.()),(0,r.onUnmounted)(()=>{D?.(),A?.disconnect()}),{panelSize:x,isDragging:S,collapsedTarget:b,isFirstCollapsed:C,isSecondCollapsed:w,bounds:g,gutterSize:m,handlePointerDown:R,handleDoubleClick:()=>{!c.value&&!O&&!k&&z()},handleKeyDown:t=>{if(c.value||t.target!==t.currentTarget)return;if(t.key===`Enter`){l.value&&(t.preventDefault(),z());return}let a=Math.max(0,i((0,r.toValue)(e.step),2))||2,o=t.shiftKey?10:1,s=f(t.key,n.value,a*o,x.value,g.value);s!==void 0&&(t.preventDefault(),j(s))},collapse:N,expand:P,toggle:F,resetSize:I,setSize:L,getPanelInfo:()=>({first:{size:x.value,collapsed:C.value},second:{size:100-x.value,collapsed:w.value}})}}const m=[`aria-hidden`,`inert`],h={class:`split-panel__content`},g=[`aria-orientation`,`aria-valuenow`,`aria-valuemin`,`aria-valuemax`,`aria-disabled`,`aria-label`,`tabindex`],_=[`disabled`,`aria-label`,`aria-expanded`,`title`],v={class:`split-gutter__visual`,"aria-hidden":`true`},y={class:`split-gutter__dots`},b=[`disabled`,`aria-label`,`aria-expanded`,`title`],x=[`aria-hidden`,`inert`],S={class:`split-panel__content`},C=(0,r.defineComponent)({name:`C_SplitPane`,__name:`index`,props:{ariaLabel:{},direction:{default:`horizontal`},size:{},defaultSize:{default:50},minSize:{default:0},maxSize:{default:100},minFirstSize:{default:0},minSecondSize:{default:0},disabled:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},gutterSize:{default:6},step:{default:2}},emits:[`update:size`,`resize`,`collapse`,`expand`,`drag-start`,`drag-end`],setup(n,{expose:i,emit:a}){let o=t.n(),{t:s}=e.t(),c=n,l=a,u=(0,r.useId)(),d=`split-${u}-first`,f=`split-${u}-second`,C=(0,r.ref)(null),{panelSize:w,bounds:T,gutterSize:E,isDragging:D,isFirstCollapsed:O,isSecondCollapsed:k,handlePointerDown:A,handleDoubleClick:j,handleKeyDown:M,collapse:N,expand:P,toggle:F,resetSize:I,setSize:L,getPanelInfo:R}=p({containerRef:C,direction:(0,r.toRef)(c,`direction`),size:(0,r.toRef)(c,`size`),defaultSize:(0,r.toRef)(c,`defaultSize`),minSize:(0,r.toRef)(c,`minSize`),maxSize:(0,r.toRef)(c,`maxSize`),minFirstSize:(0,r.toRef)(c,`minFirstSize`),minSecondSize:(0,r.toRef)(c,`minSecondSize`),gutterSize:(0,r.toRef)(c,`gutterSize`),disabled:(0,r.toRef)(c,`disabled`),collapsible:(0,r.toRef)(c,`collapsible`),step:(0,r.toRef)(c,`step`),onUpdateSize:e=>l(`update:size`,e),onResize:(e,t)=>l(`resize`,e,t),onCollapse:e=>l(`collapse`,e),onExpand:e=>l(`expand`,e),onDragStart:e=>l(`drag-start`,e),onDragEnd:e=>l(`drag-end`,e)}),z=(0,r.computed)(()=>({flex:`${w.value} 1 0px`})),B=(0,r.computed)(()=>({flex:`${100-w.value} 1 0px`})),V=(0,r.computed)(()=>c.direction===`horizontal`?{width:`${E.value}px`}:{height:`${E.value}px`});return i({collapse:N,expand:P,toggle:F,resetSize:I,getPanelInfo:R,setSize:L}),(e,t)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{ref_key:`containerRef`,ref:C,class:(0,r.normalizeClass)([`c-split-pane`,[`c-split-pane--${n.direction}`,{"c-split-pane--dragging":(0,r.unref)(D),"c-split-pane--disabled":n.disabled,"c-split-pane--collapsed-first":(0,r.unref)(O),"c-split-pane--collapsed-second":(0,r.unref)(k)}]]),style:(0,r.normalizeStyle)((0,r.unref)(o))},[(0,r.createCommentVNode)(` 首面板 `),(0,r.createElementVNode)(`div`,{class:`split-panel split-panel--first`,id:d,style:(0,r.normalizeStyle)(z.value),"aria-hidden":(0,r.unref)(O)||void 0,inert:(0,r.unref)(O)},[(0,r.createElementVNode)(`div`,h,[(0,r.renderSlot)(e.$slots,`first`,{size:(0,r.unref)(w),collapsed:(0,r.unref)(O)},void 0,!0)])],12,m),(0,r.createCommentVNode)(` 分割线手柄 `),(0,r.createElementVNode)(`div`,{class:`split-gutter`,style:(0,r.normalizeStyle)(V.value),role:`separator`,"aria-orientation":n.direction===`horizontal`?`vertical`:`horizontal`,"aria-valuenow":(0,r.unref)(w),"aria-valuemin":(0,r.unref)(O)?0:(0,r.unref)(T).min,"aria-valuemax":(0,r.unref)(k)?100:(0,r.unref)(T).max,"aria-disabled":n.disabled||void 0,"aria-controls":d,"aria-label":n.ariaLabel??(0,r.unref)(s)(`split.resize`),tabindex:n.disabled?-1:0,onPointerdown:t[6]||=(...e)=>(0,r.unref)(A)&&(0,r.unref)(A)(...e),onDblclick:t[7]||=(...e)=>(0,r.unref)(j)&&(0,r.unref)(j)(...e),onKeydown:t[8]||=(...e)=>(0,r.unref)(M)&&(0,r.unref)(M)(...e)},[(0,r.createElementVNode)(`div`,{class:(0,r.normalizeClass)([`split-gutter__controls`,{"split-gutter__controls--with-collapse":n.showCollapseButton&&n.collapsible}])},[n.showCollapseButton&&n.collapsible?((0,r.openBlock)(),(0,r.createElementBlock)(`button`,{key:0,class:`split-gutter__collapse-btn split-gutter__collapse-btn--first`,type:`button`,disabled:n.disabled,"aria-label":(0,r.unref)(O)?(0,r.unref)(s)(`split.expandFirst`):(0,r.unref)(s)(`split.collapseFirst`),"aria-expanded":!(0,r.unref)(O),"aria-controls":d,title:(0,r.unref)(O)?(0,r.unref)(s)(`split.expandFirst`):(0,r.unref)(s)(`split.collapseFirst`),onClick:t[0]||=(0,r.withModifiers)(e=>(0,r.unref)(F)(`first`),[`stop`]),onPointerdown:t[1]||=(0,r.withModifiers)(()=>{},[`stop`]),onDblclick:t[2]||=(0,r.withModifiers)(()=>{},[`stop`])},[...t[9]||=[(0,r.createElementVNode)(`svg`,{class:`split-gutter__chevron`,viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`},[(0,r.createElementVNode)(`path`,{d:`m9.5 4.5-3.5 3.5 3.5 3.5`})],-1)]],40,_)):(0,r.createCommentVNode)(`v-if`,!0),(0,r.createElementVNode)(`div`,v,[(0,r.createElementVNode)(`div`,y,[((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(3,e=>(0,r.createElementVNode)(`span`,{key:e,class:`split-gutter__dot`})),64))])]),n.showCollapseButton&&n.collapsible?((0,r.openBlock)(),(0,r.createElementBlock)(`button`,{key:1,class:`split-gutter__collapse-btn split-gutter__collapse-btn--second`,type:`button`,disabled:n.disabled,"aria-label":(0,r.unref)(k)?(0,r.unref)(s)(`split.expandSecond`):(0,r.unref)(s)(`split.collapseSecond`),"aria-expanded":!(0,r.unref)(k),"aria-controls":f,title:(0,r.unref)(k)?(0,r.unref)(s)(`split.expandSecond`):(0,r.unref)(s)(`split.collapseSecond`),onClick:t[3]||=(0,r.withModifiers)(e=>(0,r.unref)(F)(`second`),[`stop`]),onPointerdown:t[4]||=(0,r.withModifiers)(()=>{},[`stop`]),onDblclick:t[5]||=(0,r.withModifiers)(()=>{},[`stop`])},[...t[10]||=[(0,r.createElementVNode)(`svg`,{class:`split-gutter__chevron`,viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`},[(0,r.createElementVNode)(`path`,{d:`m9.5 4.5-3.5 3.5 3.5 3.5`})],-1)]],40,b)):(0,r.createCommentVNode)(`v-if`,!0)],2)],44,g),(0,r.createCommentVNode)(` 第二面板 `),(0,r.createElementVNode)(`div`,{class:`split-panel split-panel--second`,id:f,style:(0,r.normalizeStyle)(B.value),"aria-hidden":(0,r.unref)(k)||void 0,inert:(0,r.unref)(k)},[(0,r.createElementVNode)(`div`,S,[(0,r.renderSlot)(e.$slots,`second`,{size:100-(0,r.unref)(w),collapsed:(0,r.unref)(k)},void 0,!0)])],12,x)],6))}});var w=n.t(C,[[`__scopeId`,`data-v-6f1b8596`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return w}});
|
|
1
|
+
require(`./chunk.cjs`);const e=require(`./useComponentLocale.cjs`),t=require(`./useComponentTheme.cjs`),n=require(`./export-helper.cjs`);let r=require(`vue`);const i=(e,t)=>typeof e==`number`&&Number.isFinite(e)?e:t,a=e=>Math.max(4,i(e,6));function o(e){let t=Math.max(0,Math.min(100,i(e.minSize,0))),n=Math.max(0,Math.min(100,i(e.maxSize,100))),r=Math.min(t,n),a=Math.max(t,n),o=Math.max(0,i(e.availableLength,0));if(!o)return{min:r,max:a};let s=Math.max(0,i(e.minFirstSize,0)),c=Math.max(0,i(e.minSecondSize,0)),l=Math.max(r,s/o*100),u=Math.min(a,100-c/o*100);if(l<=u)return{min:l,max:u};let d=s+c?s/(s+c)*100:50,f=Math.max(r,Math.min(a,d));return{min:f,max:f}}function s(e,t,n){return Math.min(n,Math.max(t,i(e,50)))}const c=new WeakMap;function l(e,t){let{style:n}=e.body,r=t===`horizontal`?`col-resize`:`row-resize`,i=[`cursor`,`user-select`].map(e=>({name:e,value:n.getPropertyValue(e),priority:n.getPropertyPriority(e),owned:e===`cursor`?r:`none`}));for(let e of i)n.setProperty(e.name,e.owned);return()=>{for(let e of i)n.getPropertyValue(e.name)===e.owned&&(e.value?n.setProperty(e.name,e.value,e.priority):n.removeProperty(e.name))}}function u(e,t){let n=e.currentTarget,r=n.ownerDocument,i=r.defaultView;if(!i)return;let a=i,o=t.direction===`horizontal`?`clientX`:`clientY`,s=e[o],u=e.pointerId,d=!0,f=!1,p=0,m,h,g;c.get(r)?.(),e.preventDefault(),e.stopPropagation(),n.focus({preventScroll:!0});function _(e){p=e[o]-s,!f&&Math.abs(p)>=3&&(f=!0,g=l(r,t.direction),t.onStart())}function v(e){e.pointerId===u&&(_(e),!(!f||!d)&&(e.cancelable&&e.preventDefault(),h===void 0&&(h=a.requestAnimationFrame(()=>{h=void 0,m=p,t.onDelta(p)}))))}function y(e){d&&(d=!1,h!==void 0&&a.cancelAnimationFrame(h),g?.(),r.removeEventListener(`pointermove`,v,!0),r.removeEventListener(`pointerup`,b,!0),r.removeEventListener(`pointercancel`,b,!0),r.removeEventListener(`visibilitychange`,S),a.removeEventListener(`blur`,x),c.get(r)===x&&c.delete(r),e&&f&&p!==m&&t.onDelta(p),t.onEnd(f))}function b(e){if(!d||e.pointerId!==u)return;let t=e.type===`pointerup`;t&&_(e),y(t)}let x=()=>y(!1),S=()=>{r.hidden&&x()};return r.addEventListener(`pointermove`,v,{capture:!0,passive:!1}),r.addEventListener(`pointerup`,b,!0),r.addEventListener(`pointercancel`,b,!0),r.addEventListener(`visibilitychange`,S),a.addEventListener(`blur`,x),c.set(r,x),x}function d(e,t,n,r,i){if(e===`Home`)return i.min;if(e===`End`)return i.max;let a=t===`horizontal`?`ArrowLeft`:`ArrowUp`,o=t===`horizontal`?`ArrowRight`:`ArrowDown`;if(e===a)return r-n;if(e===o)return r+n}function f(e){let{containerRef:t,direction:n,disabled:c,collapsible:l}=e,f=(0,r.ref)(0),p=(0,r.computed)(()=>a((0,r.toValue)(e.gutterSize))),m=(0,r.computed)(()=>Math.max(0,f.value-p.value)),h=(0,r.computed)(()=>o({minSize:(0,r.toValue)(e.minSize),maxSize:(0,r.toValue)(e.maxSize),minFirstSize:(0,r.toValue)(e.minFirstSize)??0,minSecondSize:(0,r.toValue)(e.minSecondSize)??0,availableLength:m.value})),g=(0,r.ref)(s((0,r.toValue)(e.defaultSize),h.value.min,h.value.max)),_=(0,r.computed)(()=>(0,r.toValue)(e.size)!==void 0),v=(0,r.computed)(()=>_.value?i((0,r.toValue)(e.size),50):g.value),y=(0,r.computed)(()=>l.value?v.value===0?`first`:v.value===100?`second`:null:null),b=(0,r.computed)(()=>y.value?y.value===`first`?0:100:s(v.value,h.value.min,h.value.max)),x=(0,r.ref)(!1),S=(0,r.computed)(()=>y.value===`first`),C=(0,r.computed)(()=>y.value===`second`),w=b.value,T=i((0,r.toValue)(e.defaultSize),50),E=w>0&&w<100?w:s(T>0&&T<100?T:50,h.value.min,h.value.max),D,O=!1,k=!1,A,j=t=>{t!==v.value&&(_.value||(g.value=t),e.onUpdateSize?.(t))},M=(e,t=!1)=>{Number.isFinite(e)&&j(t?e:s(e,h.value.min,h.value.max))};(0,r.watch)([b,y],([t,n],[r,i])=>{t>0&&t<100&&(E=t),i!==n&&(i&&e.onExpand?.(i),n&&e.onCollapse?.(n)),t!==r&&e.onResize?.(t,100-t)},{flush:`sync`}),(0,r.watch)(h,()=>{y.value||M(b.value)},{flush:`sync`}),(0,r.watch)([c,n],()=>D?.(),{flush:`sync`}),(0,r.watch)(l,()=>{y.value||M(b.value)},{flush:`sync`});let N=()=>{let e=t.value;if(!e)return;let r=e.getBoundingClientRect();f.value=n.value===`horizontal`?r.width:r.height};(0,r.watch)(n,N,{flush:`post`}),(0,r.onMounted)(()=>{N(),typeof ResizeObserver<`u`&&t.value&&(A=new ResizeObserver(N),A.observe(t.value))});let P=(e=`first`)=>{!l.value||y.value===e||M(e===`first`?0:100,!0)},F=()=>{y.value&&M(E)},I=(e=`first`)=>{y.value===e?F():P(e)},L=()=>M(i((0,r.toValue)(e.defaultSize),50)),R=e=>M(e),z=t=>{if(c.value||D||t.button!==0||!t.isPrimary||(N(),!m.value))return;O=k,k=!1;let i=b.value,a;D=u(t,{direction:n.value,onStart:()=>{k=!0,x.value=!0,e.onDragStart?.(i)},onDelta:e=>{let t=m.value;if(!t)return;let{min:n,max:r}=h.value,o=s(i+e/t*100,n,r);o!==a&&(a=o,j(o))},onEnd:t=>{if(x.value=!1,D=void 0,!t)return;let n=()=>e.onDragEnd?.(b.value);_.value?(0,r.nextTick)(n):n()}})},B=()=>{y.value?F():P(`first`)};return(0,r.onDeactivated)(()=>D?.()),(0,r.onUnmounted)(()=>{D?.(),A?.disconnect()}),{panelSize:b,isDragging:x,collapsedTarget:y,isFirstCollapsed:S,isSecondCollapsed:C,bounds:h,gutterSize:p,handlePointerDown:z,handleDoubleClick:()=>{!c.value&&!O&&!k&&B()},handleKeyDown:t=>{if(c.value||t.target!==t.currentTarget)return;if(t.key===`Enter`){l.value&&(t.preventDefault(),B());return}let a=Math.max(0,i((0,r.toValue)(e.step),2))||2,o=t.shiftKey?10:1,s=d(t.key,n.value,a*o,b.value,h.value);s!==void 0&&(t.preventDefault(),M(s))},collapse:P,expand:F,toggle:I,resetSize:L,setSize:R,getPanelInfo:()=>({first:{size:b.value,collapsed:S.value},second:{size:100-b.value,collapsed:C.value}})}}const p=[`aria-hidden`,`inert`],m={class:`split-panel__content`},h=[`aria-orientation`,`aria-valuenow`,`aria-valuemin`,`aria-valuemax`,`aria-disabled`,`aria-label`,`tabindex`],g=[`disabled`,`aria-label`,`aria-expanded`,`title`],_={class:`split-gutter__visual`,"aria-hidden":`true`},v={class:`split-gutter__dots`},y=[`disabled`,`aria-label`,`aria-expanded`,`title`],b=[`aria-hidden`,`inert`],x={class:`split-panel__content`},S=(0,r.defineComponent)({name:`C_SplitPane`,__name:`index`,props:{ariaLabel:{},direction:{default:`horizontal`},size:{},defaultSize:{default:50},minSize:{default:0},maxSize:{default:100},minFirstSize:{default:0},minSecondSize:{default:0},disabled:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},gutterSize:{default:6},step:{default:2}},emits:[`update:size`,`resize`,`collapse`,`expand`,`drag-start`,`drag-end`],setup(n,{expose:i,emit:a}){let o=t.n(),{t:s}=e.t(),c=n,l=a,u=(0,r.useId)(),d=`split-${u}-first`,S=`split-${u}-second`,C=(0,r.ref)(null),{panelSize:w,bounds:T,gutterSize:E,isDragging:D,isFirstCollapsed:O,isSecondCollapsed:k,handlePointerDown:A,handleDoubleClick:j,handleKeyDown:M,collapse:N,expand:P,toggle:F,resetSize:I,setSize:L,getPanelInfo:R}=f({containerRef:C,direction:(0,r.toRef)(c,`direction`),size:(0,r.toRef)(c,`size`),defaultSize:(0,r.toRef)(c,`defaultSize`),minSize:(0,r.toRef)(c,`minSize`),maxSize:(0,r.toRef)(c,`maxSize`),minFirstSize:(0,r.toRef)(c,`minFirstSize`),minSecondSize:(0,r.toRef)(c,`minSecondSize`),gutterSize:(0,r.toRef)(c,`gutterSize`),disabled:(0,r.toRef)(c,`disabled`),collapsible:(0,r.toRef)(c,`collapsible`),step:(0,r.toRef)(c,`step`),onUpdateSize:e=>l(`update:size`,e),onResize:(e,t)=>l(`resize`,e,t),onCollapse:e=>l(`collapse`,e),onExpand:e=>l(`expand`,e),onDragStart:e=>l(`drag-start`,e),onDragEnd:e=>l(`drag-end`,e)}),z=(0,r.computed)(()=>({flex:`${w.value} 1 0px`})),B=(0,r.computed)(()=>({flex:`${100-w.value} 1 0px`})),V=(0,r.computed)(()=>c.direction===`horizontal`?{width:`${E.value}px`}:{height:`${E.value}px`});return i({collapse:N,expand:P,toggle:F,resetSize:I,getPanelInfo:R,setSize:L}),(e,t)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{ref_key:`containerRef`,ref:C,class:(0,r.normalizeClass)([`c-split-pane`,[`c-split-pane--${n.direction}`,{"c-split-pane--dragging":(0,r.unref)(D),"c-split-pane--disabled":n.disabled,"c-split-pane--collapsed-first":(0,r.unref)(O),"c-split-pane--collapsed-second":(0,r.unref)(k)}]]),style:(0,r.normalizeStyle)((0,r.unref)(o))},[(0,r.createCommentVNode)(` 首面板 `),(0,r.createElementVNode)(`div`,{class:`split-panel split-panel--first`,id:d,style:(0,r.normalizeStyle)(z.value),"aria-hidden":(0,r.unref)(O)||void 0,inert:(0,r.unref)(O)},[(0,r.createElementVNode)(`div`,m,[(0,r.renderSlot)(e.$slots,`first`,{size:(0,r.unref)(w),collapsed:(0,r.unref)(O)},void 0,!0)])],12,p),(0,r.createCommentVNode)(` 分割线手柄 `),(0,r.createElementVNode)(`div`,{class:`split-gutter`,style:(0,r.normalizeStyle)(V.value),role:`separator`,"aria-orientation":n.direction===`horizontal`?`vertical`:`horizontal`,"aria-valuenow":(0,r.unref)(w),"aria-valuemin":(0,r.unref)(O)?0:(0,r.unref)(T).min,"aria-valuemax":(0,r.unref)(k)?100:(0,r.unref)(T).max,"aria-disabled":n.disabled||void 0,"aria-controls":d,"aria-label":n.ariaLabel??(0,r.unref)(s)(`split.resize`),tabindex:n.disabled?-1:0,onPointerdown:t[6]||=(...e)=>(0,r.unref)(A)&&(0,r.unref)(A)(...e),onDblclick:t[7]||=(...e)=>(0,r.unref)(j)&&(0,r.unref)(j)(...e),onKeydown:t[8]||=(...e)=>(0,r.unref)(M)&&(0,r.unref)(M)(...e)},[(0,r.createElementVNode)(`div`,{class:(0,r.normalizeClass)([`split-gutter__controls`,{"split-gutter__controls--with-collapse":n.showCollapseButton&&n.collapsible}])},[n.showCollapseButton&&n.collapsible?((0,r.openBlock)(),(0,r.createElementBlock)(`button`,{key:0,class:`split-gutter__collapse-btn split-gutter__collapse-btn--first`,type:`button`,disabled:n.disabled,"aria-label":(0,r.unref)(O)?(0,r.unref)(s)(`split.expandFirst`):(0,r.unref)(s)(`split.collapseFirst`),"aria-expanded":!(0,r.unref)(O),"aria-controls":d,title:(0,r.unref)(O)?(0,r.unref)(s)(`split.expandFirst`):(0,r.unref)(s)(`split.collapseFirst`),onClick:t[0]||=(0,r.withModifiers)(e=>(0,r.unref)(F)(`first`),[`stop`]),onPointerdown:t[1]||=(0,r.withModifiers)(()=>{},[`stop`]),onDblclick:t[2]||=(0,r.withModifiers)(()=>{},[`stop`])},[...t[9]||=[(0,r.createElementVNode)(`svg`,{class:`split-gutter__chevron`,viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`},[(0,r.createElementVNode)(`path`,{d:`m9.5 4.5-3.5 3.5 3.5 3.5`})],-1)]],40,g)):(0,r.createCommentVNode)(`v-if`,!0),(0,r.createElementVNode)(`div`,_,[(0,r.createElementVNode)(`div`,v,[((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(3,e=>(0,r.createElementVNode)(`span`,{key:e,class:`split-gutter__dot`})),64))])]),n.showCollapseButton&&n.collapsible?((0,r.openBlock)(),(0,r.createElementBlock)(`button`,{key:1,class:`split-gutter__collapse-btn split-gutter__collapse-btn--second`,type:`button`,disabled:n.disabled,"aria-label":(0,r.unref)(k)?(0,r.unref)(s)(`split.expandSecond`):(0,r.unref)(s)(`split.collapseSecond`),"aria-expanded":!(0,r.unref)(k),"aria-controls":S,title:(0,r.unref)(k)?(0,r.unref)(s)(`split.expandSecond`):(0,r.unref)(s)(`split.collapseSecond`),onClick:t[3]||=(0,r.withModifiers)(e=>(0,r.unref)(F)(`second`),[`stop`]),onPointerdown:t[4]||=(0,r.withModifiers)(()=>{},[`stop`]),onDblclick:t[5]||=(0,r.withModifiers)(()=>{},[`stop`])},[...t[10]||=[(0,r.createElementVNode)(`svg`,{class:`split-gutter__chevron`,viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`},[(0,r.createElementVNode)(`path`,{d:`m9.5 4.5-3.5 3.5 3.5 3.5`})],-1)]],40,y)):(0,r.createCommentVNode)(`v-if`,!0)],2)],44,h),(0,r.createCommentVNode)(` 第二面板 `),(0,r.createElementVNode)(`div`,{class:`split-panel split-panel--second`,id:S,style:(0,r.normalizeStyle)(B.value),"aria-hidden":(0,r.unref)(k)||void 0,inert:(0,r.unref)(k)},[(0,r.createElementVNode)(`div`,x,[(0,r.renderSlot)(e.$slots,`second`,{size:100-(0,r.unref)(w),collapsed:(0,r.unref)(k)},void 0,!0)])],12,b)],6))}});var C=n.t(S,[[`__scopeId`,`data-v-6f1b8596`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return C}});
|
package/dist/C_SplitPane2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useComponentLocale.js";import{n as t}from"./useComponentTheme.js";import{t as n}from"./export-helper.js";import{Fragment as r,computed as i,createCommentVNode as a,createElementBlock as o,createElementVNode as s,defineComponent as c,nextTick as l,normalizeClass as u,normalizeStyle as d,onDeactivated as f,onMounted as p,onUnmounted as m,openBlock as h,ref as g,renderList as _,renderSlot as v,toRef as y,toValue as b,unref as x,useId as S,watch as C,withModifiers as w}from"vue";const T=(e,t)=>typeof e==`number`&&Number.isFinite(e)?e:t,E=e=>Math.max(4,T(e,6));function D(e){let t=Math.max(0,Math.min(100,T(e.minSize,0))),n=Math.max(0,Math.min(100,T(e.maxSize,100))),r=Math.min(t,n),i=Math.max(t,n),a=Math.max(0,T(e.availableLength,0));if(!a)return{min:r,max:i};let o=Math.max(0,T(e.minFirstSize,0)),s=Math.max(0,T(e.minSecondSize,0)),c=Math.max(r,o/a*100),l=Math.min(i,100-s/a*100);if(c<=l)return{min:c,max:l};let u=o+s?o/(o+s)*100:50,d=Math.max(r,Math.min(i,u));return{min:d,max:d}}function O(e,t,n){return Math.min(n,Math.max(t,T(e,50)))}const k=new WeakMap;function A(e,t){let{style:n}=e.body,r=t===`horizontal`?`col-resize`:`row-resize`,i=[`cursor`,`user-select`].map(e=>({name:e,value:n.getPropertyValue(e),priority:n.getPropertyPriority(e),owned:e===`cursor`?r:`none`}));for(let e of i)n.setProperty(e.name,e.owned);return()=>{for(let e of i)n.getPropertyValue(e.name)===e.owned&&(e.value?n.setProperty(e.name,e.value,e.priority):n.removeProperty(e.name))}}function j(e,t){let n=e.currentTarget,r=n.ownerDocument,i=r.defaultView;if(!i)return;let a=i,o=t.direction===`horizontal`?`clientX`:`clientY`,s=e[o],c=e.pointerId,l=!0,u=!1,d=0,f,p,m;k.get(r)?.(),e.preventDefault(),e.stopPropagation(),n.focus({preventScroll:!0});function h(e){d=e[o]-s,!u&&Math.abs(d)>=3&&(u=!0,m=A(r,t.direction),t.onStart())}function g(e){e.pointerId===c&&(h(e),!(!u||!l)&&(e.cancelable&&e.preventDefault(),p===void 0&&(p=a.requestAnimationFrame(()=>{p=void 0,f=d,t.onDelta(d)}))))}function _(e){l&&(l=!1,p!==void 0&&a.cancelAnimationFrame(p),m?.(),r.removeEventListener(`pointermove`,g,!0),r.removeEventListener(`pointerup`,v,!0),r.removeEventListener(`pointercancel`,v,!0),r.removeEventListener(`visibilitychange`,b),a.removeEventListener(`blur`,y),k.get(r)===y&&k.delete(r),e&&u&&d!==f&&t.onDelta(d),t.onEnd(u))}function v(e){if(!l||e.pointerId!==c)return;let t=e.type===`pointerup`;t&&h(e),_(t)}let y=()=>_(!1),b=()=>{r.hidden&&y()};return r.addEventListener(`pointermove`,g,{capture:!0,passive:!1}),r.addEventListener(`pointerup`,v,!0),r.addEventListener(`pointercancel`,v,!0),r.addEventListener(`visibilitychange`,b),a.addEventListener(`blur`,y),k.set(r,y),y}function M(e){return e===0?`first`:e===100?`second`:null}function N(e,t,n,r,i){if(e===`Home`)return i.min;if(e===`End`)return i.max;let a=t===`horizontal`?`ArrowLeft`:`ArrowUp`,o=t===`horizontal`?`ArrowRight`:`ArrowDown`;if(e===a)return r-n;if(e===o)return r+n}function P(e){let{containerRef:t,direction:n,disabled:r,collapsible:a}=e,o=g(0),s=i(()=>E(b(e.gutterSize))),c=i(()=>Math.max(0,o.value-s.value)),u=i(()=>D({minSize:b(e.minSize),maxSize:b(e.maxSize),minFirstSize:b(e.minFirstSize)??0,minSecondSize:b(e.minSecondSize)??0,availableLength:c.value})),d=g(O(b(e.defaultSize),u.value.min,u.value.max)),h=i(()=>b(e.size)!==void 0),_=i(()=>h.value?T(b(e.size),50):d.value),v=i(()=>a.value?_.value===0?`first`:_.value===100?`second`:null:null),y=i(()=>v.value?v.value===`first`?0:100:O(_.value,u.value.min,u.value.max)),x=g(!1),S=i(()=>v.value===`first`),w=i(()=>v.value===`second`),k=T(b(e.defaultSize),50),A=v.value?O(k>0&&k<100?k:50,u.value.min,u.value.max):y.value,P,F=!1,I=!1,L,R=(t,n=!1)=>{if(!Number.isFinite(t))return;let r=n?t:O(t,u.value.min,u.value.max);r!==_.value&&(h.value||(d.value=r),e.onUpdateSize?.(r))};C(y,(t,n)=>{let r=M(n),i=v.value;!r&&i&&(A=n),r&&r!==i&&e.onExpand?.(r),i&&i!==r&&e.onCollapse?.(i),e.onResize?.(t,100-t)},{flush:`sync`}),C(u,()=>{v.value||R(y.value)},{flush:`sync`}),C([r,n],()=>P?.(),{flush:`sync`}),C(a,()=>{v.value||R(y.value)},{flush:`sync`});let z=()=>{let e=t.value;if(!e)return;let r=e.getBoundingClientRect();o.value=n.value===`horizontal`?r.width:r.height};C(n,z,{flush:`post`}),p(()=>{z(),typeof ResizeObserver<`u`&&t.value&&(L=new ResizeObserver(z),L.observe(t.value))});let B=(e=`first`)=>{!a.value||v.value===e||(v.value||(A=y.value),R(e===`first`?0:100,!0))},V=()=>{v.value&&R(A)},H=(e=`first`)=>{v.value===e?V():B(e)},U=()=>R(T(b(e.defaultSize),50)),W=e=>R(e),G=t=>{if(r.value||P||t.button!==0||!t.isPrimary||(z(),!c.value))return;F=I,I=!1;let i=y.value;P=j(t,{direction:n.value,onStart:()=>{I=!0,x.value=!0,e.onDragStart?.(i)},onDelta:e=>{let t=c.value;t&&R(i+e/t*100)},onEnd:t=>{if(x.value=!1,P=void 0,!t)return;let n=()=>e.onDragEnd?.(y.value);h.value?l(n):n()}})},K=()=>{v.value?V():B(`first`)};return f(()=>P?.()),m(()=>{P?.(),L?.disconnect()}),{panelSize:y,isDragging:x,collapsedTarget:v,isFirstCollapsed:S,isSecondCollapsed:w,bounds:u,gutterSize:s,handlePointerDown:G,handleDoubleClick:()=>{!r.value&&!F&&!I&&K()},handleKeyDown:t=>{if(r.value||t.target!==t.currentTarget)return;if(t.key===`Enter`){a.value&&(t.preventDefault(),K());return}let i=Math.max(0,T(b(e.step),2))||2,o=t.shiftKey?10:1,s=N(t.key,n.value,i*o,y.value,u.value);s!==void 0&&(t.preventDefault(),R(s))},collapse:B,expand:V,toggle:H,resetSize:U,setSize:W,getPanelInfo:()=>({first:{size:y.value,collapsed:S.value},second:{size:100-y.value,collapsed:w.value}})}}const F=[`aria-hidden`,`inert`],I={class:`split-panel__content`},L=[`aria-orientation`,`aria-valuenow`,`aria-valuemin`,`aria-valuemax`,`aria-disabled`,`aria-label`,`tabindex`],R=[`disabled`,`aria-label`,`aria-expanded`,`title`],z={class:`split-gutter__visual`,"aria-hidden":`true`},B={class:`split-gutter__dots`},V=[`disabled`,`aria-label`,`aria-expanded`,`title`],H=[`aria-hidden`,`inert`],U={class:`split-panel__content`};var W=n(c({name:`C_SplitPane`,__name:`index`,props:{ariaLabel:{},direction:{default:`horizontal`},size:{},defaultSize:{default:50},minSize:{default:0},maxSize:{default:100},minFirstSize:{default:0},minSecondSize:{default:0},disabled:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},gutterSize:{default:6},step:{default:2}},emits:[`update:size`,`resize`,`collapse`,`expand`,`drag-start`,`drag-end`],setup(n,{expose:c,emit:l}){let f=t(),{t:p}=e(),m=n,b=l,C=S(),T=`split-${C}-first`,E=`split-${C}-second`,D=g(null),{panelSize:O,bounds:k,gutterSize:A,isDragging:j,isFirstCollapsed:M,isSecondCollapsed:N,handlePointerDown:W,handleDoubleClick:G,handleKeyDown:K,collapse:q,expand:J,toggle:Y,resetSize:X,setSize:Z,getPanelInfo:Q}=P({containerRef:D,direction:y(m,`direction`),size:y(m,`size`),defaultSize:y(m,`defaultSize`),minSize:y(m,`minSize`),maxSize:y(m,`maxSize`),minFirstSize:y(m,`minFirstSize`),minSecondSize:y(m,`minSecondSize`),gutterSize:y(m,`gutterSize`),disabled:y(m,`disabled`),collapsible:y(m,`collapsible`),step:y(m,`step`),onUpdateSize:e=>b(`update:size`,e),onResize:(e,t)=>b(`resize`,e,t),onCollapse:e=>b(`collapse`,e),onExpand:e=>b(`expand`,e),onDragStart:e=>b(`drag-start`,e),onDragEnd:e=>b(`drag-end`,e)}),$=i(()=>({flex:`${O.value} 1 0px`})),ee=i(()=>({flex:`${100-O.value} 1 0px`})),te=i(()=>m.direction===`horizontal`?{width:`${A.value}px`}:{height:`${A.value}px`});return c({collapse:q,expand:J,toggle:Y,resetSize:X,getPanelInfo:Q,setSize:Z}),(e,t)=>(h(),o(`div`,{ref_key:`containerRef`,ref:D,class:u([`c-split-pane`,[`c-split-pane--${n.direction}`,{"c-split-pane--dragging":x(j),"c-split-pane--disabled":n.disabled,"c-split-pane--collapsed-first":x(M),"c-split-pane--collapsed-second":x(N)}]]),style:d(x(f))},[a(` 首面板 `),s(`div`,{class:`split-panel split-panel--first`,id:T,style:d($.value),"aria-hidden":x(M)||void 0,inert:x(M)},[s(`div`,I,[v(e.$slots,`first`,{size:x(O),collapsed:x(M)},void 0,!0)])],12,F),a(` 分割线手柄 `),s(`div`,{class:`split-gutter`,style:d(te.value),role:`separator`,"aria-orientation":n.direction===`horizontal`?`vertical`:`horizontal`,"aria-valuenow":x(O),"aria-valuemin":x(M)?0:x(k).min,"aria-valuemax":x(N)?100:x(k).max,"aria-disabled":n.disabled||void 0,"aria-controls":T,"aria-label":n.ariaLabel??x(p)(`split.resize`),tabindex:n.disabled?-1:0,onPointerdown:t[6]||=(...e)=>x(W)&&x(W)(...e),onDblclick:t[7]||=(...e)=>x(G)&&x(G)(...e),onKeydown:t[8]||=(...e)=>x(K)&&x(K)(...e)},[s(`div`,{class:u([`split-gutter__controls`,{"split-gutter__controls--with-collapse":n.showCollapseButton&&n.collapsible}])},[n.showCollapseButton&&n.collapsible?(h(),o(`button`,{key:0,class:`split-gutter__collapse-btn split-gutter__collapse-btn--first`,type:`button`,disabled:n.disabled,"aria-label":x(M)?x(p)(`split.expandFirst`):x(p)(`split.collapseFirst`),"aria-expanded":!x(M),"aria-controls":T,title:x(M)?x(p)(`split.expandFirst`):x(p)(`split.collapseFirst`),onClick:t[0]||=w(e=>x(Y)(`first`),[`stop`]),onPointerdown:t[1]||=w(()=>{},[`stop`]),onDblclick:t[2]||=w(()=>{},[`stop`])},[...t[9]||=[s(`svg`,{class:`split-gutter__chevron`,viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`},[s(`path`,{d:`m9.5 4.5-3.5 3.5 3.5 3.5`})],-1)]],40,R)):a(`v-if`,!0),s(`div`,z,[s(`div`,B,[(h(),o(r,null,_(3,e=>s(`span`,{key:e,class:`split-gutter__dot`})),64))])]),n.showCollapseButton&&n.collapsible?(h(),o(`button`,{key:1,class:`split-gutter__collapse-btn split-gutter__collapse-btn--second`,type:`button`,disabled:n.disabled,"aria-label":x(N)?x(p)(`split.expandSecond`):x(p)(`split.collapseSecond`),"aria-expanded":!x(N),"aria-controls":E,title:x(N)?x(p)(`split.expandSecond`):x(p)(`split.collapseSecond`),onClick:t[3]||=w(e=>x(Y)(`second`),[`stop`]),onPointerdown:t[4]||=w(()=>{},[`stop`]),onDblclick:t[5]||=w(()=>{},[`stop`])},[...t[10]||=[s(`svg`,{class:`split-gutter__chevron`,viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`},[s(`path`,{d:`m9.5 4.5-3.5 3.5 3.5 3.5`})],-1)]],40,V)):a(`v-if`,!0)],2)],44,L),a(` 第二面板 `),s(`div`,{class:`split-panel split-panel--second`,id:E,style:d(ee.value),"aria-hidden":x(N)||void 0,inert:x(N)},[s(`div`,U,[v(e.$slots,`second`,{size:100-x(O),collapsed:x(N)},void 0,!0)])],12,H)],6))}}),[[`__scopeId`,`data-v-6f1b8596`]]);export{P as n,W as t};
|
|
1
|
+
import{t as e}from"./useComponentLocale.js";import{n as t}from"./useComponentTheme.js";import{t as n}from"./export-helper.js";import{Fragment as r,computed as i,createCommentVNode as a,createElementBlock as o,createElementVNode as s,defineComponent as c,nextTick as l,normalizeClass as u,normalizeStyle as d,onDeactivated as f,onMounted as p,onUnmounted as m,openBlock as h,ref as g,renderList as _,renderSlot as v,toRef as y,toValue as b,unref as x,useId as S,watch as C,withModifiers as w}from"vue";const T=(e,t)=>typeof e==`number`&&Number.isFinite(e)?e:t,E=e=>Math.max(4,T(e,6));function D(e){let t=Math.max(0,Math.min(100,T(e.minSize,0))),n=Math.max(0,Math.min(100,T(e.maxSize,100))),r=Math.min(t,n),i=Math.max(t,n),a=Math.max(0,T(e.availableLength,0));if(!a)return{min:r,max:i};let o=Math.max(0,T(e.minFirstSize,0)),s=Math.max(0,T(e.minSecondSize,0)),c=Math.max(r,o/a*100),l=Math.min(i,100-s/a*100);if(c<=l)return{min:c,max:l};let u=o+s?o/(o+s)*100:50,d=Math.max(r,Math.min(i,u));return{min:d,max:d}}function O(e,t,n){return Math.min(n,Math.max(t,T(e,50)))}const k=new WeakMap;function A(e,t){let{style:n}=e.body,r=t===`horizontal`?`col-resize`:`row-resize`,i=[`cursor`,`user-select`].map(e=>({name:e,value:n.getPropertyValue(e),priority:n.getPropertyPriority(e),owned:e===`cursor`?r:`none`}));for(let e of i)n.setProperty(e.name,e.owned);return()=>{for(let e of i)n.getPropertyValue(e.name)===e.owned&&(e.value?n.setProperty(e.name,e.value,e.priority):n.removeProperty(e.name))}}function j(e,t){let n=e.currentTarget,r=n.ownerDocument,i=r.defaultView;if(!i)return;let a=i,o=t.direction===`horizontal`?`clientX`:`clientY`,s=e[o],c=e.pointerId,l=!0,u=!1,d=0,f,p,m;k.get(r)?.(),e.preventDefault(),e.stopPropagation(),n.focus({preventScroll:!0});function h(e){d=e[o]-s,!u&&Math.abs(d)>=3&&(u=!0,m=A(r,t.direction),t.onStart())}function g(e){e.pointerId===c&&(h(e),!(!u||!l)&&(e.cancelable&&e.preventDefault(),p===void 0&&(p=a.requestAnimationFrame(()=>{p=void 0,f=d,t.onDelta(d)}))))}function _(e){l&&(l=!1,p!==void 0&&a.cancelAnimationFrame(p),m?.(),r.removeEventListener(`pointermove`,g,!0),r.removeEventListener(`pointerup`,v,!0),r.removeEventListener(`pointercancel`,v,!0),r.removeEventListener(`visibilitychange`,b),a.removeEventListener(`blur`,y),k.get(r)===y&&k.delete(r),e&&u&&d!==f&&t.onDelta(d),t.onEnd(u))}function v(e){if(!l||e.pointerId!==c)return;let t=e.type===`pointerup`;t&&h(e),_(t)}let y=()=>_(!1),b=()=>{r.hidden&&y()};return r.addEventListener(`pointermove`,g,{capture:!0,passive:!1}),r.addEventListener(`pointerup`,v,!0),r.addEventListener(`pointercancel`,v,!0),r.addEventListener(`visibilitychange`,b),a.addEventListener(`blur`,y),k.set(r,y),y}function M(e,t,n,r,i){if(e===`Home`)return i.min;if(e===`End`)return i.max;let a=t===`horizontal`?`ArrowLeft`:`ArrowUp`,o=t===`horizontal`?`ArrowRight`:`ArrowDown`;if(e===a)return r-n;if(e===o)return r+n}function N(e){let{containerRef:t,direction:n,disabled:r,collapsible:a}=e,o=g(0),s=i(()=>E(b(e.gutterSize))),c=i(()=>Math.max(0,o.value-s.value)),u=i(()=>D({minSize:b(e.minSize),maxSize:b(e.maxSize),minFirstSize:b(e.minFirstSize)??0,minSecondSize:b(e.minSecondSize)??0,availableLength:c.value})),d=g(O(b(e.defaultSize),u.value.min,u.value.max)),h=i(()=>b(e.size)!==void 0),_=i(()=>h.value?T(b(e.size),50):d.value),v=i(()=>a.value?_.value===0?`first`:_.value===100?`second`:null:null),y=i(()=>v.value?v.value===`first`?0:100:O(_.value,u.value.min,u.value.max)),x=g(!1),S=i(()=>v.value===`first`),w=i(()=>v.value===`second`),k=y.value,A=T(b(e.defaultSize),50),N=k>0&&k<100?k:O(A>0&&A<100?A:50,u.value.min,u.value.max),P,F=!1,I=!1,L,R=t=>{t!==_.value&&(h.value||(d.value=t),e.onUpdateSize?.(t))},z=(e,t=!1)=>{Number.isFinite(e)&&R(t?e:O(e,u.value.min,u.value.max))};C([y,v],([t,n],[r,i])=>{t>0&&t<100&&(N=t),i!==n&&(i&&e.onExpand?.(i),n&&e.onCollapse?.(n)),t!==r&&e.onResize?.(t,100-t)},{flush:`sync`}),C(u,()=>{v.value||z(y.value)},{flush:`sync`}),C([r,n],()=>P?.(),{flush:`sync`}),C(a,()=>{v.value||z(y.value)},{flush:`sync`});let B=()=>{let e=t.value;if(!e)return;let r=e.getBoundingClientRect();o.value=n.value===`horizontal`?r.width:r.height};C(n,B,{flush:`post`}),p(()=>{B(),typeof ResizeObserver<`u`&&t.value&&(L=new ResizeObserver(B),L.observe(t.value))});let V=(e=`first`)=>{!a.value||v.value===e||z(e===`first`?0:100,!0)},H=()=>{v.value&&z(N)},U=(e=`first`)=>{v.value===e?H():V(e)},W=()=>z(T(b(e.defaultSize),50)),G=e=>z(e),K=t=>{if(r.value||P||t.button!==0||!t.isPrimary||(B(),!c.value))return;F=I,I=!1;let i=y.value,a;P=j(t,{direction:n.value,onStart:()=>{I=!0,x.value=!0,e.onDragStart?.(i)},onDelta:e=>{let t=c.value;if(!t)return;let{min:n,max:r}=u.value,o=O(i+e/t*100,n,r);o!==a&&(a=o,R(o))},onEnd:t=>{if(x.value=!1,P=void 0,!t)return;let n=()=>e.onDragEnd?.(y.value);h.value?l(n):n()}})},q=()=>{v.value?H():V(`first`)};return f(()=>P?.()),m(()=>{P?.(),L?.disconnect()}),{panelSize:y,isDragging:x,collapsedTarget:v,isFirstCollapsed:S,isSecondCollapsed:w,bounds:u,gutterSize:s,handlePointerDown:K,handleDoubleClick:()=>{!r.value&&!F&&!I&&q()},handleKeyDown:t=>{if(r.value||t.target!==t.currentTarget)return;if(t.key===`Enter`){a.value&&(t.preventDefault(),q());return}let i=Math.max(0,T(b(e.step),2))||2,o=t.shiftKey?10:1,s=M(t.key,n.value,i*o,y.value,u.value);s!==void 0&&(t.preventDefault(),z(s))},collapse:V,expand:H,toggle:U,resetSize:W,setSize:G,getPanelInfo:()=>({first:{size:y.value,collapsed:S.value},second:{size:100-y.value,collapsed:w.value}})}}const P=[`aria-hidden`,`inert`],F={class:`split-panel__content`},I=[`aria-orientation`,`aria-valuenow`,`aria-valuemin`,`aria-valuemax`,`aria-disabled`,`aria-label`,`tabindex`],L=[`disabled`,`aria-label`,`aria-expanded`,`title`],R={class:`split-gutter__visual`,"aria-hidden":`true`},z={class:`split-gutter__dots`},B=[`disabled`,`aria-label`,`aria-expanded`,`title`],V=[`aria-hidden`,`inert`],H={class:`split-panel__content`};var U=n(c({name:`C_SplitPane`,__name:`index`,props:{ariaLabel:{},direction:{default:`horizontal`},size:{},defaultSize:{default:50},minSize:{default:0},maxSize:{default:100},minFirstSize:{default:0},minSecondSize:{default:0},disabled:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},gutterSize:{default:6},step:{default:2}},emits:[`update:size`,`resize`,`collapse`,`expand`,`drag-start`,`drag-end`],setup(n,{expose:c,emit:l}){let f=t(),{t:p}=e(),m=n,b=l,C=S(),T=`split-${C}-first`,E=`split-${C}-second`,D=g(null),{panelSize:O,bounds:k,gutterSize:A,isDragging:j,isFirstCollapsed:M,isSecondCollapsed:U,handlePointerDown:W,handleDoubleClick:G,handleKeyDown:K,collapse:q,expand:J,toggle:Y,resetSize:X,setSize:Z,getPanelInfo:Q}=N({containerRef:D,direction:y(m,`direction`),size:y(m,`size`),defaultSize:y(m,`defaultSize`),minSize:y(m,`minSize`),maxSize:y(m,`maxSize`),minFirstSize:y(m,`minFirstSize`),minSecondSize:y(m,`minSecondSize`),gutterSize:y(m,`gutterSize`),disabled:y(m,`disabled`),collapsible:y(m,`collapsible`),step:y(m,`step`),onUpdateSize:e=>b(`update:size`,e),onResize:(e,t)=>b(`resize`,e,t),onCollapse:e=>b(`collapse`,e),onExpand:e=>b(`expand`,e),onDragStart:e=>b(`drag-start`,e),onDragEnd:e=>b(`drag-end`,e)}),$=i(()=>({flex:`${O.value} 1 0px`})),ee=i(()=>({flex:`${100-O.value} 1 0px`})),te=i(()=>m.direction===`horizontal`?{width:`${A.value}px`}:{height:`${A.value}px`});return c({collapse:q,expand:J,toggle:Y,resetSize:X,getPanelInfo:Q,setSize:Z}),(e,t)=>(h(),o(`div`,{ref_key:`containerRef`,ref:D,class:u([`c-split-pane`,[`c-split-pane--${n.direction}`,{"c-split-pane--dragging":x(j),"c-split-pane--disabled":n.disabled,"c-split-pane--collapsed-first":x(M),"c-split-pane--collapsed-second":x(U)}]]),style:d(x(f))},[a(` 首面板 `),s(`div`,{class:`split-panel split-panel--first`,id:T,style:d($.value),"aria-hidden":x(M)||void 0,inert:x(M)},[s(`div`,F,[v(e.$slots,`first`,{size:x(O),collapsed:x(M)},void 0,!0)])],12,P),a(` 分割线手柄 `),s(`div`,{class:`split-gutter`,style:d(te.value),role:`separator`,"aria-orientation":n.direction===`horizontal`?`vertical`:`horizontal`,"aria-valuenow":x(O),"aria-valuemin":x(M)?0:x(k).min,"aria-valuemax":x(U)?100:x(k).max,"aria-disabled":n.disabled||void 0,"aria-controls":T,"aria-label":n.ariaLabel??x(p)(`split.resize`),tabindex:n.disabled?-1:0,onPointerdown:t[6]||=(...e)=>x(W)&&x(W)(...e),onDblclick:t[7]||=(...e)=>x(G)&&x(G)(...e),onKeydown:t[8]||=(...e)=>x(K)&&x(K)(...e)},[s(`div`,{class:u([`split-gutter__controls`,{"split-gutter__controls--with-collapse":n.showCollapseButton&&n.collapsible}])},[n.showCollapseButton&&n.collapsible?(h(),o(`button`,{key:0,class:`split-gutter__collapse-btn split-gutter__collapse-btn--first`,type:`button`,disabled:n.disabled,"aria-label":x(M)?x(p)(`split.expandFirst`):x(p)(`split.collapseFirst`),"aria-expanded":!x(M),"aria-controls":T,title:x(M)?x(p)(`split.expandFirst`):x(p)(`split.collapseFirst`),onClick:t[0]||=w(e=>x(Y)(`first`),[`stop`]),onPointerdown:t[1]||=w(()=>{},[`stop`]),onDblclick:t[2]||=w(()=>{},[`stop`])},[...t[9]||=[s(`svg`,{class:`split-gutter__chevron`,viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`},[s(`path`,{d:`m9.5 4.5-3.5 3.5 3.5 3.5`})],-1)]],40,L)):a(`v-if`,!0),s(`div`,R,[s(`div`,z,[(h(),o(r,null,_(3,e=>s(`span`,{key:e,class:`split-gutter__dot`})),64))])]),n.showCollapseButton&&n.collapsible?(h(),o(`button`,{key:1,class:`split-gutter__collapse-btn split-gutter__collapse-btn--second`,type:`button`,disabled:n.disabled,"aria-label":x(U)?x(p)(`split.expandSecond`):x(p)(`split.collapseSecond`),"aria-expanded":!x(U),"aria-controls":E,title:x(U)?x(p)(`split.expandSecond`):x(p)(`split.collapseSecond`),onClick:t[3]||=w(e=>x(Y)(`second`),[`stop`]),onPointerdown:t[4]||=w(()=>{},[`stop`]),onDblclick:t[5]||=w(()=>{},[`stop`])},[...t[10]||=[s(`svg`,{class:`split-gutter__chevron`,viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`},[s(`path`,{d:`m9.5 4.5-3.5 3.5 3.5 3.5`})],-1)]],40,B)):a(`v-if`,!0)],2)],44,I),a(` 第二面板 `),s(`div`,{class:`split-panel split-panel--second`,id:E,style:d(ee.value),"aria-hidden":x(U)||void 0,inert:x(U)},[s(`div`,H,[v(e.$slots,`second`,{size:100-x(O),collapsed:x(U)},void 0,!0)])],12,V)],6))}}),[[`__scopeId`,`data-v-6f1b8596`]]);export{N as n,U as t};
|
package/dist/constants.d.cts
CHANGED
|
@@ -117,8 +117,8 @@ declare const __VLS_export: vue.DefineComponent<CronProps, CronExpose, {}, {}, {
|
|
|
117
117
|
"onValidation-change"?: ((result: CronValidation) => any) | undefined;
|
|
118
118
|
}>, {
|
|
119
119
|
disabled: boolean;
|
|
120
|
-
showPreview: boolean;
|
|
121
120
|
showTemplates: boolean;
|
|
121
|
+
showPreview: boolean;
|
|
122
122
|
showSecond: boolean;
|
|
123
123
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
124
124
|
declare const _default: typeof __VLS_export;
|
package/dist/constants.d.ts
CHANGED
|
@@ -117,8 +117,8 @@ declare const __VLS_export: vue.DefineComponent<CronProps, CronExpose, {}, {}, {
|
|
|
117
117
|
"onValidation-change"?: ((result: CronValidation) => any) | undefined;
|
|
118
118
|
}>, {
|
|
119
119
|
disabled: boolean;
|
|
120
|
-
showPreview: boolean;
|
|
121
120
|
showTemplates: boolean;
|
|
121
|
+
showPreview: boolean;
|
|
122
122
|
showSecond: boolean;
|
|
123
123
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
124
124
|
declare const _default: typeof __VLS_export;
|
package/dist/constants3.d.cts
CHANGED
|
@@ -4,32 +4,32 @@ import * as vue from "vue";
|
|
|
4
4
|
//#region src/components/C_NotificationCenter/index.vue.d.ts
|
|
5
5
|
type __VLS_Slots = NotificationCenterSlots;
|
|
6
6
|
declare const __VLS_base: vue.DefineComponent<NotificationCenterProps, NotificationCenterExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
7
|
-
delete: (ids: string[]) => any;
|
|
8
|
-
viewAll: () => any;
|
|
9
7
|
itemClick: (message: NotificationMessage) => any;
|
|
8
|
+
delete: (ids: string[]) => any;
|
|
9
|
+
navigate: (url: string) => any;
|
|
10
10
|
read: (ids: string[]) => any;
|
|
11
|
+
viewAll: () => any;
|
|
11
12
|
allRead: (category?: NotificationCategory | undefined) => any;
|
|
12
13
|
unreadChange: (count: number) => any;
|
|
13
14
|
wsStatusChange: (status: WSConnectionStatus) => any;
|
|
14
15
|
newMessage: (message: NotificationMessage) => any;
|
|
15
|
-
navigate: (url: string) => any;
|
|
16
16
|
}, string, vue.PublicProps, Readonly<NotificationCenterProps> & Readonly<{
|
|
17
|
-
onDelete?: ((ids: string[]) => any) | undefined;
|
|
18
|
-
onViewAll?: (() => any) | undefined;
|
|
19
17
|
onItemClick?: ((message: NotificationMessage) => any) | undefined;
|
|
18
|
+
onDelete?: ((ids: string[]) => any) | undefined;
|
|
19
|
+
onNavigate?: ((url: string) => any) | undefined;
|
|
20
20
|
onRead?: ((ids: string[]) => any) | undefined;
|
|
21
|
+
onViewAll?: (() => any) | undefined;
|
|
21
22
|
onAllRead?: ((category?: NotificationCategory | undefined) => any) | undefined;
|
|
22
23
|
onUnreadChange?: ((count: number) => any) | undefined;
|
|
23
24
|
onWsStatusChange?: ((status: WSConnectionStatus) => any) | undefined;
|
|
24
25
|
onNewMessage?: ((message: NotificationMessage) => any) | undefined;
|
|
25
|
-
onNavigate?: ((url: string) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
pageSize: number;
|
|
28
|
+
storageKey: string;
|
|
28
29
|
autoStart: boolean;
|
|
29
30
|
desktopNotification: boolean;
|
|
30
31
|
maxBadgeCount: number;
|
|
31
32
|
pollingInterval: number;
|
|
32
|
-
storageKey: string;
|
|
33
33
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
package/dist/constants3.d.ts
CHANGED
|
@@ -4,32 +4,32 @@ import * as vue from "vue";
|
|
|
4
4
|
//#region src/components/C_NotificationCenter/index.vue.d.ts
|
|
5
5
|
type __VLS_Slots = NotificationCenterSlots;
|
|
6
6
|
declare const __VLS_base: vue.DefineComponent<NotificationCenterProps, NotificationCenterExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
7
|
-
delete: (ids: string[]) => any;
|
|
8
|
-
viewAll: () => any;
|
|
9
7
|
itemClick: (message: NotificationMessage) => any;
|
|
8
|
+
delete: (ids: string[]) => any;
|
|
9
|
+
navigate: (url: string) => any;
|
|
10
10
|
read: (ids: string[]) => any;
|
|
11
|
+
viewAll: () => any;
|
|
11
12
|
allRead: (category?: NotificationCategory | undefined) => any;
|
|
12
13
|
unreadChange: (count: number) => any;
|
|
13
14
|
wsStatusChange: (status: WSConnectionStatus) => any;
|
|
14
15
|
newMessage: (message: NotificationMessage) => any;
|
|
15
|
-
navigate: (url: string) => any;
|
|
16
16
|
}, string, vue.PublicProps, Readonly<NotificationCenterProps> & Readonly<{
|
|
17
|
-
onDelete?: ((ids: string[]) => any) | undefined;
|
|
18
|
-
onViewAll?: (() => any) | undefined;
|
|
19
17
|
onItemClick?: ((message: NotificationMessage) => any) | undefined;
|
|
18
|
+
onDelete?: ((ids: string[]) => any) | undefined;
|
|
19
|
+
onNavigate?: ((url: string) => any) | undefined;
|
|
20
20
|
onRead?: ((ids: string[]) => any) | undefined;
|
|
21
|
+
onViewAll?: (() => any) | undefined;
|
|
21
22
|
onAllRead?: ((category?: NotificationCategory | undefined) => any) | undefined;
|
|
22
23
|
onUnreadChange?: ((count: number) => any) | undefined;
|
|
23
24
|
onWsStatusChange?: ((status: WSConnectionStatus) => any) | undefined;
|
|
24
25
|
onNewMessage?: ((message: NotificationMessage) => any) | undefined;
|
|
25
|
-
onNavigate?: ((url: string) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
pageSize: number;
|
|
28
|
+
storageKey: string;
|
|
28
29
|
autoStart: boolean;
|
|
29
30
|
desktopNotification: boolean;
|
|
30
31
|
maxBadgeCount: number;
|
|
31
32
|
pollingInterval: number;
|
|
32
|
-
storageKey: string;
|
|
33
33
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
package/dist/constants4.d.cts
CHANGED
|
@@ -8,27 +8,27 @@ type __VLS_Slots = {} & {
|
|
|
8
8
|
area?: (props: typeof __VLS_11) => any;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_base: vue.DefineComponent<UploadProps, UploadExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
11
|
-
progress: (file: UploadFileItem, percent: number) => any;
|
|
12
11
|
success: (file: UploadFileItem, response: unknown) => any;
|
|
13
12
|
error: (file: UploadFileItem, error: Error) => any;
|
|
14
13
|
change: (fileList: UploadFileItem[]) => any;
|
|
14
|
+
progress: (file: UploadFileItem, percent: number) => any;
|
|
15
15
|
remove: (file: UploadFileItem) => any;
|
|
16
16
|
finish: (fileList: UploadFileItem[]) => any;
|
|
17
17
|
exceed: (files: File[], fileList: UploadFileItem[]) => any;
|
|
18
18
|
}, string, vue.PublicProps, Readonly<UploadProps> & Readonly<{
|
|
19
|
-
onProgress?: ((file: UploadFileItem, percent: number) => any) | undefined;
|
|
20
19
|
onSuccess?: ((file: UploadFileItem, response: unknown) => any) | undefined;
|
|
21
20
|
onError?: ((file: UploadFileItem, error: Error) => any) | undefined;
|
|
22
21
|
onChange?: ((fileList: UploadFileItem[]) => any) | undefined;
|
|
22
|
+
onProgress?: ((file: UploadFileItem, percent: number) => any) | undefined;
|
|
23
23
|
onRemove?: ((file: UploadFileItem) => any) | undefined;
|
|
24
24
|
onFinish?: ((fileList: UploadFileItem[]) => any) | undefined;
|
|
25
25
|
onExceed?: ((files: File[], fileList: UploadFileItem[]) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
data: Record<string, unknown>;
|
|
28
|
-
multiple: boolean;
|
|
29
28
|
disabled: boolean;
|
|
30
|
-
|
|
29
|
+
multiple: boolean;
|
|
31
30
|
action: string;
|
|
31
|
+
draggable: boolean;
|
|
32
32
|
headers: Record<string, string>;
|
|
33
33
|
directory: boolean;
|
|
34
34
|
accept: string;
|
package/dist/constants4.d.ts
CHANGED
|
@@ -9,27 +9,27 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
area?: (props: typeof __VLS_11) => any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: vue.DefineComponent<UploadProps, UploadExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
12
|
-
progress: (file: UploadFileItem, percent: number) => any;
|
|
13
12
|
success: (file: UploadFileItem, response: unknown) => any;
|
|
14
13
|
error: (file: UploadFileItem, error: Error) => any;
|
|
15
14
|
change: (fileList: UploadFileItem[]) => any;
|
|
15
|
+
progress: (file: UploadFileItem, percent: number) => any;
|
|
16
16
|
remove: (file: UploadFileItem) => any;
|
|
17
17
|
finish: (fileList: UploadFileItem[]) => any;
|
|
18
18
|
exceed: (files: File[], fileList: UploadFileItem[]) => any;
|
|
19
19
|
}, string, vue.PublicProps, Readonly<UploadProps> & Readonly<{
|
|
20
|
-
onProgress?: ((file: UploadFileItem, percent: number) => any) | undefined;
|
|
21
20
|
onSuccess?: ((file: UploadFileItem, response: unknown) => any) | undefined;
|
|
22
21
|
onError?: ((file: UploadFileItem, error: Error) => any) | undefined;
|
|
23
22
|
onChange?: ((fileList: UploadFileItem[]) => any) | undefined;
|
|
23
|
+
onProgress?: ((file: UploadFileItem, percent: number) => any) | undefined;
|
|
24
24
|
onRemove?: ((file: UploadFileItem) => any) | undefined;
|
|
25
25
|
onFinish?: ((fileList: UploadFileItem[]) => any) | undefined;
|
|
26
26
|
onExceed?: ((files: File[], fileList: UploadFileItem[]) => any) | undefined;
|
|
27
27
|
}>, {
|
|
28
28
|
data: Record<string, unknown>;
|
|
29
|
-
multiple: boolean;
|
|
30
29
|
disabled: boolean;
|
|
31
|
-
|
|
30
|
+
multiple: boolean;
|
|
32
31
|
action: string;
|
|
32
|
+
draggable: boolean;
|
|
33
33
|
headers: Record<string, string>;
|
|
34
34
|
directory: boolean;
|
|
35
35
|
accept: string;
|
package/dist/data2.d.cts
CHANGED
|
@@ -66,26 +66,26 @@ declare const __VLS_base: vue.DefineComponent<CTabsProps, {
|
|
|
66
66
|
activeValue: vue.WritableComputedRef<TabsValue | null, TabsValue | null>;
|
|
67
67
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
68
68
|
"update:modelValue": (value: TabsValue) => any;
|
|
69
|
-
close: (value: TabsValue) => any;
|
|
70
|
-
add: () => any;
|
|
71
69
|
change: (value: TabsValue, item: TabsItem | undefined) => any;
|
|
70
|
+
add: () => any;
|
|
71
|
+
close: (value: TabsValue) => any;
|
|
72
72
|
}, string, vue.PublicProps, Readonly<CTabsProps> & Readonly<{
|
|
73
73
|
"onUpdate:modelValue"?: ((value: TabsValue) => any) | undefined;
|
|
74
|
-
onClose?: ((value: TabsValue) => any) | undefined;
|
|
75
|
-
onAdd?: (() => any) | undefined;
|
|
76
74
|
onChange?: ((value: TabsValue, item: TabsItem | undefined) => any) | undefined;
|
|
75
|
+
onAdd?: (() => any) | undefined;
|
|
76
|
+
onClose?: ((value: TabsValue) => any) | undefined;
|
|
77
77
|
}>, {
|
|
78
|
+
items: readonly TabsItem[];
|
|
78
79
|
size: TabsSize;
|
|
80
|
+
type: TabsType;
|
|
79
81
|
modelValue: TabsValue | null;
|
|
82
|
+
defaultValue: TabsValue | null;
|
|
80
83
|
placement: TabsPlacement;
|
|
84
|
+
justifyContent: TabsJustifyContent;
|
|
81
85
|
displayDirective: TabsDisplayDirective;
|
|
82
86
|
animated: boolean;
|
|
83
|
-
type: TabsType;
|
|
84
|
-
defaultValue: TabsValue | null;
|
|
85
|
-
items: readonly TabsItem[];
|
|
86
|
-
addable: boolean;
|
|
87
87
|
closable: boolean;
|
|
88
|
-
|
|
88
|
+
addable: boolean;
|
|
89
89
|
tabsOnly: boolean;
|
|
90
90
|
paneClass: string;
|
|
91
91
|
paneStyle: string | vue.CSSProperties;
|
package/dist/data2.d.ts
CHANGED
|
@@ -66,26 +66,26 @@ declare const __VLS_base: vue.DefineComponent<CTabsProps, {
|
|
|
66
66
|
activeValue: vue.WritableComputedRef<TabsValue | null, TabsValue | null>;
|
|
67
67
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
68
68
|
"update:modelValue": (value: TabsValue) => any;
|
|
69
|
-
close: (value: TabsValue) => any;
|
|
70
|
-
add: () => any;
|
|
71
69
|
change: (value: TabsValue, item: TabsItem | undefined) => any;
|
|
70
|
+
add: () => any;
|
|
71
|
+
close: (value: TabsValue) => any;
|
|
72
72
|
}, string, vue.PublicProps, Readonly<CTabsProps> & Readonly<{
|
|
73
73
|
"onUpdate:modelValue"?: ((value: TabsValue) => any) | undefined;
|
|
74
|
-
onClose?: ((value: TabsValue) => any) | undefined;
|
|
75
|
-
onAdd?: (() => any) | undefined;
|
|
76
74
|
onChange?: ((value: TabsValue, item: TabsItem | undefined) => any) | undefined;
|
|
75
|
+
onAdd?: (() => any) | undefined;
|
|
76
|
+
onClose?: ((value: TabsValue) => any) | undefined;
|
|
77
77
|
}>, {
|
|
78
|
+
items: readonly TabsItem[];
|
|
78
79
|
size: TabsSize;
|
|
80
|
+
type: TabsType;
|
|
79
81
|
modelValue: TabsValue | null;
|
|
82
|
+
defaultValue: TabsValue | null;
|
|
80
83
|
placement: TabsPlacement;
|
|
84
|
+
justifyContent: TabsJustifyContent;
|
|
81
85
|
displayDirective: TabsDisplayDirective;
|
|
82
86
|
animated: boolean;
|
|
83
|
-
type: TabsType;
|
|
84
|
-
defaultValue: TabsValue | null;
|
|
85
|
-
items: readonly TabsItem[];
|
|
86
|
-
addable: boolean;
|
|
87
87
|
closable: boolean;
|
|
88
|
-
|
|
88
|
+
addable: boolean;
|
|
89
89
|
tabsOnly: boolean;
|
|
90
90
|
paneClass: string;
|
|
91
91
|
paneStyle: string | vue.CSSProperties;
|
package/dist/editors.d.cts
CHANGED
|
@@ -23,8 +23,8 @@ declare function useComponentFeedback(local?: MaybeRefOrGetter<ComponentFeedback
|
|
|
23
23
|
//#region src/components/C_Table/index.vue.d.ts
|
|
24
24
|
declare const __VLS_export$1: <T extends object = DataRecord, C = unknown>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$1<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
25
25
|
props: vue.PublicProps & __VLS_PrettifyLocal$1<TableRuntimeProps<T, C> & {
|
|
26
|
-
onCancel?: ((rowData: T, rowIndex: number) => any) | undefined;
|
|
27
26
|
onSave?: ((rowData: T, rowIndex: number, columnKey?: string | undefined) => any) | undefined;
|
|
27
|
+
onCancel?: ((rowData: T, rowIndex: number) => any) | undefined;
|
|
28
28
|
"onPagination-change"?: ((page: number, pageSize: number) => any) | undefined;
|
|
29
29
|
"onRow-delete"?: ((deletedRow: T, index: number) => any) | undefined;
|
|
30
30
|
"onBatch-action-error"?: ((error: unknown, actionKey: string) => any) | undefined;
|
|
@@ -59,7 +59,7 @@ declare const __VLS_export$1: <T extends object = DataRecord, C = unknown>(__VLS
|
|
|
59
59
|
} & {
|
|
60
60
|
empty?: (props: {}) => any;
|
|
61
61
|
};
|
|
62
|
-
emit: ((evt: "
|
|
62
|
+
emit: ((evt: "save", rowData: T, rowIndex: number, columnKey?: string | undefined) => void) & ((evt: "cancel", rowData: T, rowIndex: number) => void) & ((evt: "pagination-change", page: number, pageSize: number) => void) & ((evt: "row-delete", deletedRow: T, index: number) => void) & ((evt: "batch-action-error", error: unknown, actionKey: string) => void) & ((evt: "row-key-error", issues: TableRowKeyIssue<T>[]) => void) & ((evt: "row-add", newRow: T) => void) & ((evt: "row-copy", originalRow: T, newRow: T) => void) & ((evt: "row-move", row: T, fromIndex: number, toIndex: number) => void) & ((evt: "row-selection-change", selectedKey: DataTableRowKey | null, selectedRow: T | null) => void) & ((evt: "view-detail", data: T) => void) & ((evt: "column-change", columns: TableColumn<T>[]) => void) & ((evt: "expand-change", expandedKeys: DataTableRowKey[], row?: T | undefined, expanded?: boolean | undefined) => void) & ((evt: "selection-change", checkedKeys: DataTableRowKey[], checkedRows: T[], childSelections?: Map<DataTableRowKey, DataTableRowKey[]> | undefined) => void) & ((evt: "child-selection-change", parentKey: DataTableRowKey, childKeys: DataTableRowKey[], childRows: C[]) => void) & ((evt: "parent-child-link-change", parentKey: DataTableRowKey, shouldSelect: boolean) => void) & ((evt: "update:data", data: T[]) => void) & ((evt: "edit-error", error: unknown) => void);
|
|
63
63
|
}>) => vue.VNode & {
|
|
64
64
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
65
65
|
};
|
|
@@ -558,14 +558,14 @@ declare function setupHighlight(app: App, options?: HighlightPluginOptions): Hig
|
|
|
558
558
|
//#region src/components/C_Tree/index.vue.d.ts
|
|
559
559
|
declare const __VLS_export: <T extends object = TreeNodeData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
560
560
|
props: vue.PublicProps & __VLS_PrettifyLocal<TreeProps$1<T> & {
|
|
561
|
-
"onUpdate:expandedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "
|
|
561
|
+
"onUpdate:expandedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => any) | undefined;
|
|
562
562
|
onAdd?: ((parentNode?: T | undefined) => any) | undefined;
|
|
563
|
-
onRefresh?: (() => any) | undefined;
|
|
564
|
-
"onUpdate:selectedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "expand" | "filter" | "collapse" | "unselect" | "check" | "uncheck">) => any) | undefined;
|
|
565
563
|
"onLoad-error"?: ((error: unknown, node: T) => any) | undefined;
|
|
564
|
+
onRefresh?: (() => any) | undefined;
|
|
565
|
+
"onUpdate:selectedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => any) | undefined;
|
|
566
566
|
"onSearch-error"?: ((error: unknown) => any) | undefined;
|
|
567
567
|
"onUpdate:searchPattern"?: ((pattern: string) => any) | undefined;
|
|
568
|
-
"onUpdate:checkedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "
|
|
568
|
+
"onUpdate:checkedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => any) | undefined;
|
|
569
569
|
"onNode-select"?: ((node: T | null, selectedKeys: TreeKey[]) => any) | undefined;
|
|
570
570
|
"onNode-action"?: ((action: string, node: T) => any) | undefined;
|
|
571
571
|
"onNode-drop"?: ((info: DropInfo<T>) => any) | undefined;
|
|
@@ -583,7 +583,7 @@ declare const __VLS_export: <T extends object = TreeNodeData>(__VLS_props: NonNu
|
|
|
583
583
|
}>) => void;
|
|
584
584
|
attrs: any;
|
|
585
585
|
slots: TreeSlots<T>;
|
|
586
|
-
emit: ((evt: "update:expandedKeys", keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "
|
|
586
|
+
emit: ((evt: "update:expandedKeys", keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => void) & ((evt: "add", parentNode?: T | undefined) => void) & ((evt: "load-error", error: unknown, node: T) => void) & ((evt: "refresh") => void) & ((evt: "update:selectedKeys", keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => void) & ((evt: "search-error", error: unknown) => void) & ((evt: "update:searchPattern", pattern: string) => void) & ((evt: "update:checkedKeys", keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => void) & ((evt: "node-select", node: T | null, selectedKeys: TreeKey[]) => void) & ((evt: "node-action", action: string, node: T) => void) & ((evt: "node-drop", info: DropInfo<T>) => void);
|
|
587
587
|
}>) => vue.VNode & {
|
|
588
588
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
589
589
|
};
|
package/dist/editors.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ import { HLJSApi } from "highlight.js";
|
|
|
13
13
|
//#region src/components/C_Table/index.vue.d.ts
|
|
14
14
|
declare const __VLS_export$1: <T extends object = DataRecord, C = unknown>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$1<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
15
15
|
props: vue.PublicProps & __VLS_PrettifyLocal$1<TableRuntimeProps<T, C> & {
|
|
16
|
-
onCancel?: ((rowData: T, rowIndex: number) => any) | undefined;
|
|
17
16
|
onSave?: ((rowData: T, rowIndex: number, columnKey?: string | undefined) => any) | undefined;
|
|
17
|
+
onCancel?: ((rowData: T, rowIndex: number) => any) | undefined;
|
|
18
18
|
"onPagination-change"?: ((page: number, pageSize: number) => any) | undefined;
|
|
19
19
|
"onRow-delete"?: ((deletedRow: T, index: number) => any) | undefined;
|
|
20
20
|
"onBatch-action-error"?: ((error: unknown, actionKey: string) => any) | undefined;
|
|
@@ -49,7 +49,7 @@ declare const __VLS_export$1: <T extends object = DataRecord, C = unknown>(__VLS
|
|
|
49
49
|
} & {
|
|
50
50
|
empty?: (props: {}) => any;
|
|
51
51
|
};
|
|
52
|
-
emit: ((evt: "
|
|
52
|
+
emit: ((evt: "save", rowData: T, rowIndex: number, columnKey?: string | undefined) => void) & ((evt: "cancel", rowData: T, rowIndex: number) => void) & ((evt: "pagination-change", page: number, pageSize: number) => void) & ((evt: "row-delete", deletedRow: T, index: number) => void) & ((evt: "batch-action-error", error: unknown, actionKey: string) => void) & ((evt: "row-key-error", issues: TableRowKeyIssue<T>[]) => void) & ((evt: "row-add", newRow: T) => void) & ((evt: "row-copy", originalRow: T, newRow: T) => void) & ((evt: "row-move", row: T, fromIndex: number, toIndex: number) => void) & ((evt: "row-selection-change", selectedKey: DataTableRowKey | null, selectedRow: T | null) => void) & ((evt: "view-detail", data: T) => void) & ((evt: "column-change", columns: TableColumn<T>[]) => void) & ((evt: "expand-change", expandedKeys: DataTableRowKey[], row?: T | undefined, expanded?: boolean | undefined) => void) & ((evt: "selection-change", checkedKeys: DataTableRowKey[], checkedRows: T[], childSelections?: Map<DataTableRowKey, DataTableRowKey[]> | undefined) => void) & ((evt: "child-selection-change", parentKey: DataTableRowKey, childKeys: DataTableRowKey[], childRows: C[]) => void) & ((evt: "parent-child-link-change", parentKey: DataTableRowKey, shouldSelect: boolean) => void) & ((evt: "update:data", data: T[]) => void) & ((evt: "edit-error", error: unknown) => void);
|
|
53
53
|
}>) => vue.VNode & {
|
|
54
54
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
55
55
|
};
|
|
@@ -548,14 +548,14 @@ declare function setupHighlight(app: App, options?: HighlightPluginOptions): Hig
|
|
|
548
548
|
//#region src/components/C_Tree/index.vue.d.ts
|
|
549
549
|
declare const __VLS_export: <T extends object = TreeNodeData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
550
550
|
props: vue.PublicProps & __VLS_PrettifyLocal<TreeProps$1<T> & {
|
|
551
|
-
"onUpdate:expandedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "
|
|
551
|
+
"onUpdate:expandedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => any) | undefined;
|
|
552
552
|
onAdd?: ((parentNode?: T | undefined) => any) | undefined;
|
|
553
|
-
onRefresh?: (() => any) | undefined;
|
|
554
|
-
"onUpdate:selectedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "expand" | "filter" | "collapse" | "unselect" | "check" | "uncheck">) => any) | undefined;
|
|
555
553
|
"onLoad-error"?: ((error: unknown, node: T) => any) | undefined;
|
|
554
|
+
onRefresh?: (() => any) | undefined;
|
|
555
|
+
"onUpdate:selectedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => any) | undefined;
|
|
556
556
|
"onSearch-error"?: ((error: unknown) => any) | undefined;
|
|
557
557
|
"onUpdate:searchPattern"?: ((pattern: string) => any) | undefined;
|
|
558
|
-
"onUpdate:checkedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "
|
|
558
|
+
"onUpdate:checkedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => any) | undefined;
|
|
559
559
|
"onNode-select"?: ((node: T | null, selectedKeys: TreeKey[]) => any) | undefined;
|
|
560
560
|
"onNode-action"?: ((action: string, node: T) => any) | undefined;
|
|
561
561
|
"onNode-drop"?: ((info: DropInfo<T>) => any) | undefined;
|
|
@@ -573,7 +573,7 @@ declare const __VLS_export: <T extends object = TreeNodeData>(__VLS_props: NonNu
|
|
|
573
573
|
}>) => void;
|
|
574
574
|
attrs: any;
|
|
575
575
|
slots: TreeSlots<T>;
|
|
576
|
-
emit: ((evt: "update:expandedKeys", keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "
|
|
576
|
+
emit: ((evt: "update:expandedKeys", keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => void) & ((evt: "add", parentNode?: T | undefined) => void) & ((evt: "load-error", error: unknown, node: T) => void) & ((evt: "refresh") => void) & ((evt: "update:selectedKeys", keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => void) & ((evt: "search-error", error: unknown) => void) & ((evt: "update:searchPattern", pattern: string) => void) & ((evt: "update:checkedKeys", keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => void) & ((evt: "node-select", node: T | null, selectedKeys: TreeKey[]) => void) & ((evt: "node-action", action: string, node: T) => void) & ((evt: "node-drop", info: DropInfo<T>) => void);
|
|
577
577
|
}>) => vue.VNode & {
|
|
578
578
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
579
579
|
};
|
package/dist/index11.vue.d.ts
CHANGED
|
@@ -104,9 +104,9 @@ type __VLS_Slots = {
|
|
|
104
104
|
declare const __VLS_base: vue.DefineComponent<ChatProps, {
|
|
105
105
|
scrollToBottom: () => void;
|
|
106
106
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
107
|
-
"load-more": () => any;
|
|
108
107
|
send: (content: string) => any;
|
|
109
108
|
"select-contact": (id: string) => any;
|
|
109
|
+
"load-more": () => any;
|
|
110
110
|
"image-preview": (url: string) => any;
|
|
111
111
|
"file-click": (msg: ChatMessage) => any;
|
|
112
112
|
"file-upload": () => any;
|
|
@@ -114,9 +114,9 @@ declare const __VLS_base: vue.DefineComponent<ChatProps, {
|
|
|
114
114
|
resend: (msg: ChatMessage) => any;
|
|
115
115
|
"source-click": (source: ChatSource, msg: ChatMessage) => any;
|
|
116
116
|
}, string, vue.PublicProps, Readonly<ChatProps> & Readonly<{
|
|
117
|
-
"onLoad-more"?: (() => any) | undefined;
|
|
118
117
|
onSend?: ((content: string) => any) | undefined;
|
|
119
118
|
"onSelect-contact"?: ((id: string) => any) | undefined;
|
|
119
|
+
"onLoad-more"?: (() => any) | undefined;
|
|
120
120
|
"onImage-preview"?: ((url: string) => any) | undefined;
|
|
121
121
|
"onFile-click"?: ((msg: ChatMessage) => any) | undefined;
|
|
122
122
|
"onFile-upload"?: (() => any) | undefined;
|
|
@@ -124,7 +124,6 @@ declare const __VLS_base: vue.DefineComponent<ChatProps, {
|
|
|
124
124
|
onResend?: ((msg: ChatMessage) => any) | undefined;
|
|
125
125
|
"onSource-click"?: ((source: ChatSource, msg: ChatMessage) => any) | undefined;
|
|
126
126
|
}>, {
|
|
127
|
-
virtualScroll: boolean;
|
|
128
127
|
showContacts: boolean;
|
|
129
128
|
showTimestamp: boolean;
|
|
130
129
|
showSendBtn: boolean;
|
|
@@ -134,6 +133,7 @@ declare const __VLS_base: vue.DefineComponent<ChatProps, {
|
|
|
134
133
|
currentContactId: string;
|
|
135
134
|
selfAvatar: string;
|
|
136
135
|
selfName: string;
|
|
136
|
+
virtualScroll: boolean;
|
|
137
137
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
138
138
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
139
139
|
declare const _default: typeof __VLS_export;
|