@gkd-kit/inspect 0.0.1702561254987 → 0.0.1704576041276
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/404.html +4 -5
- package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-4c5f8c4f.js → ActionCard.vue_vue_type_script_setup_true_lang-qwACpRks.js} +3 -3
- package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-4c5f8c4f.js.map → ActionCard.vue_vue_type_script_setup_true_lang-qwACpRks.js.map} +1 -1
- package/dist/assets/DevicePage-BcY77MNN.js +4 -0
- package/dist/assets/{DevicePage-8df43b4b.js.map → DevicePage-BcY77MNN.js.map} +1 -1
- package/dist/assets/HomePage-AewPpa9f.js +10 -0
- package/dist/assets/HomePage-AewPpa9f.js.map +1 -0
- package/dist/assets/ImportPage-N5zOrFlg.js +2 -0
- package/dist/assets/{ImportPage-24784485.js.map → ImportPage-N5zOrFlg.js.map} +1 -1
- package/dist/assets/SnapshotPage-GIDAU0T_.js +940 -0
- package/dist/assets/SnapshotPage-GIDAU0T_.js.map +1 -0
- package/dist/assets/_404Page-yqalp27n.js +2 -0
- package/dist/assets/{_404Page-84365d7d.js.map → _404Page-yqalp27n.js.map} +1 -1
- package/dist/assets/{import-c7d10488.js → import-8dE-g0dA.js} +2 -2
- package/dist/assets/{import-c7d10488.js.map → import-8dE-g0dA.js.map} +1 -1
- package/dist/assets/index-LcmqHjos.js +560 -0
- package/dist/assets/index-LcmqHjos.js.map +1 -0
- package/dist/assets/index-bkFpkLHU.js +17 -0
- package/dist/assets/index-bkFpkLHU.js.map +1 -0
- package/dist/assets/index-y3lQ_apj.css +1 -0
- package/dist/assets/{jszip.min-81817b5a.js → jszip.min-zGVuynBP.js} +2 -2
- package/dist/assets/{jszip.min-81817b5a.js.map → jszip.min-zGVuynBP.js.map} +1 -1
- package/dist/assets/node-NR_j6ej3.js +732 -0
- package/dist/assets/node-NR_j6ej3.js.map +1 -0
- package/dist/assets/polyfills-ZApNKvyK.js +1 -0
- package/dist/assets/storage-eMnHZqY5.js +330 -0
- package/dist/assets/storage-eMnHZqY5.js.map +1 -0
- package/dist/assets/table-QBsS0iMA.js +966 -0
- package/dist/assets/table-QBsS0iMA.js.map +1 -0
- package/dist/index.html +4 -5
- package/package.json +20 -19
- package/dist/assets/DevicePage-8df43b4b.js +0 -4
- package/dist/assets/HomePage-bf46f139.js +0 -10
- package/dist/assets/HomePage-bf46f139.js.map +0 -1
- package/dist/assets/ImportPage-24784485.js +0 -2
- package/dist/assets/SnapshotPage-f9a90429.js +0 -241
- package/dist/assets/SnapshotPage-f9a90429.js.map +0 -1
- package/dist/assets/_404Page-84365d7d.js +0 -2
- package/dist/assets/index-3405371b.js +0 -554
- package/dist/assets/index-3405371b.js.map +0 -1
- package/dist/assets/index-5246d348.css +0 -1
- package/dist/assets/index-82b0a82f.js +0 -17
- package/dist/assets/index-82b0a82f.js.map +0 -1
- package/dist/assets/node-f1373b73.js +0 -731
- package/dist/assets/node-f1373b73.js.map +0 -1
- package/dist/assets/polyfills-e3dd7d1e.js +0 -1
- package/dist/assets/storage-55bc0a35.js +0 -330
- package/dist/assets/storage-55bc0a35.js.map +0 -1
- package/dist/assets/table-d01f58e1.js +0 -958
- package/dist/assets/table-d01f58e1.js.map +0 -1
|
@@ -1,958 +0,0 @@
|
|
|
1
|
-
import{A as j,e as Ge,r as Nn,as as Ln,at as En,au as Mt,av as ot,aw as Kn,ax as ct,d as he,ay as Hn,a6 as Ot,ae as nt,n as i,ah as Dn,az as mo,X as dt,p as it,Y as qo,Q as Te,P as De,a4 as Ye,U as Ve,aA as Tt,q as R,x as le,v as W,y as ne,_ as Ue,aB as Bt,B as Ae,J as ae,c as w,C as qe,E as at,aC as no,a3 as lo,aD as so,ad as $t,ab as Rt,a1 as ce,aa as Jt,Z as ye,z as tt,D as Go,aE as jn,G as ft,H as ie,aF as xo,w as ut,aG as Un,F as st,aH as Wn,aI as Xo,aJ as Vn,aK as qn,K as Zo,L as Gn,aL as yo,aM as Xn,aN as Zn,aO as Jn,W as $e,aP as Qn,aQ as Yn,aR as kt,j as Co,aS as Jo,aT as ro,aU as er,aV as tr,ac as or,a8 as Ct,a2 as nr,af as rr,aW as ir,aX as ar,a7 as lr,a9 as xt,$ as sr,a0 as dr,O as cr,a as io,b as ur}from"./index-3405371b.js";import{y as fr,z as hr,g as Qo,A as co,V as Yo,l as pr,i as et,B as vr,m as en,D as It,E as gr,b as At,j as _t,F as Pt,e as rt,G as uo,H as br,I as Ft,J as tn,K as on,L as nn,M as mr,N as wo,f as xr,O as yr,P as Cr,Q as wr,R as Sr,o as fo,S as Rr,T as kr,U as Xe,W as Pr,h as ho,r as Fr,q as rn,d as zr,C as an,X as Mr,Y as Or,Z as So,_ as Ro,t as Tr,v as ko}from"./node-f1373b73.js";import{x as ln}from"./storage-55bc0a35.js";function Po(e){switch(e){case"tiny":return"mini";case"small":return"tiny";case"medium":return"small";case"large":return"medium";case"huge":return"large"}throw Error(`${e} has no smaller size.`)}function Br(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function sn(e){return t=>{t?e.value=t.$el:e.value=null}}function wt(e){const t=e.filter(o=>o!==void 0);if(t.length!==0)return t.length===1?t[0]:o=>{e.forEach(n=>{n&&n(o)})}}function $r(e,t,o){if(!t)return e;const n=j(e.value);let r=null;return Ge(e,a=>{r!==null&&window.clearTimeout(r),a===!0?o&&!o.value?n.value=!0:r=window.setTimeout(()=>{n.value=!0},t):n.value=!1}),n}function Ir(e={},t){const o=Nn({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:n,keyup:r}=e,a=s=>{switch(s.key){case"Control":o.ctrl=!0;break;case"Meta":o.command=!0,o.win=!0;break;case"Shift":o.shift=!0;break;case"Tab":o.tab=!0;break}n!==void 0&&Object.keys(n).forEach(u=>{if(u!==s.key)return;const v=n[u];if(typeof v=="function")v(s);else{const{stop:p=!1,prevent:x=!1}=v;p&&s.stopPropagation(),x&&s.preventDefault(),v.handler(s)}})},d=s=>{switch(s.key){case"Control":o.ctrl=!1;break;case"Meta":o.command=!1,o.win=!1;break;case"Shift":o.shift=!1;break;case"Tab":o.tab=!1;break}r!==void 0&&Object.keys(r).forEach(u=>{if(u!==s.key)return;const v=r[u];if(typeof v=="function")v(s);else{const{stop:p=!1,prevent:x=!1}=v;p&&s.stopPropagation(),x&&s.preventDefault(),v.handler(s)}})},l=()=>{(t===void 0||t.value)&&(ct("keydown",document,a),ct("keyup",document,d)),t!==void 0&&Ge(t,s=>{s?(ct("keydown",document,a),ct("keyup",document,d)):(ot("keydown",document,a),ot("keyup",document,d))})};return Ln()?(En(l),Mt(()=>{(t===void 0||t.value)&&(ot("keydown",document,a),ot("keyup",document,d))})):l(),Kn(o)}const lt="v-hidden",Ar=hr("[v-hidden]",{display:"none!important"}),Fo=he({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const o=j(null),n=j(null);function r(){const{value:d}=o,{getCounter:l,getTail:s}=e;let u;if(l!==void 0?u=l():u=n.value,!d||!u)return;u.hasAttribute(lt)&&u.removeAttribute(lt);const{children:v}=d,p=d.offsetWidth,x=[],h=t.tail?s==null?void 0:s():null;let c=h?h.offsetWidth:0,b=!1;const m=d.children.length-(t.tail?1:0);for(let C=0;C<m-1;++C){if(C<0)continue;const A=v[C];if(b){A.hasAttribute(lt)||A.setAttribute(lt,"");continue}else A.hasAttribute(lt)&&A.removeAttribute(lt);const Q=A.offsetWidth;if(c+=Q,x[C]=Q,c>p){const{updateCounter:_}=e;for(let B=C;B>=0;--B){const H=m-1-B;_!==void 0?_(H):u.textContent=`${H}`;const $=u.offsetWidth;if(c-=x[B],c+$<=p||B===0){b=!0,C=B-1,h&&(C===-1?(h.style.maxWidth=`${p-$}px`,h.style.boxSizing="border-box"):h.style.maxWidth="");break}}}}const{onUpdateOverflow:y}=e;b?y!==void 0&&y(!0):(y!==void 0&&y(!1),u.setAttribute(lt,""))}const a=Hn();return Ar.mount({id:"vueuc/overflow",head:!0,anchorMetaName:fr,ssr:a}),Ot(r),{selfRef:o,counterRef:n,sync:r}},render(){const{$slots:e}=this;return nt(this.sync),i("div",{class:"v-overflow",ref:"selfRef"},[Dn(e,"default"),e.counter?e.counter():i("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function dn(e,t){t&&(Ot(()=>{const{value:o}=e;o&&mo.registerHandler(o,t)}),Mt(()=>{const{value:o}=e;o&&mo.unregisterHandler(o)}))}const _r=he({name:"ArrowDown",render(){return i("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},i("g",{"fill-rule":"nonzero"},i("path",{d:"M23.7916,15.2664 C24.0788,14.9679 24.0696,14.4931 23.7711,14.206 C23.4726,13.9188 22.9978,13.928 22.7106,14.2265 L14.7511,22.5007 L14.7511,3.74792 C14.7511,3.33371 14.4153,2.99792 14.0011,2.99792 C13.5869,2.99792 13.2511,3.33371 13.2511,3.74793 L13.2511,22.4998 L5.29259,14.2265 C5.00543,13.928 4.53064,13.9188 4.23213,14.206 C3.93361,14.4931 3.9244,14.9679 4.21157,15.2664 L13.2809,24.6944 C13.6743,25.1034 14.3289,25.1034 14.7223,24.6944 L23.7916,15.2664 Z"}))))}}),zo=he({name:"Backward",render(){return i("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M12.2674 15.793C11.9675 16.0787 11.4927 16.0672 11.2071 15.7673L6.20572 10.5168C5.9298 10.2271 5.9298 9.7719 6.20572 9.48223L11.2071 4.23177C11.4927 3.93184 11.9675 3.92031 12.2674 4.206C12.5673 4.49169 12.5789 4.96642 12.2932 5.26634L7.78458 9.99952L12.2932 14.7327C12.5789 15.0326 12.5673 15.5074 12.2674 15.793Z",fill:"currentColor"}))}}),Nr=he({name:"Checkmark",render(){return i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},i("g",{fill:"none"},i("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),Mo=he({name:"FastBackward",render(){return i("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},i("g",{fill:"currentColor","fill-rule":"nonzero"},i("path",{d:"M8.73171,16.7949 C9.03264,17.0795 9.50733,17.0663 9.79196,16.7654 C10.0766,16.4644 10.0634,15.9897 9.76243,15.7051 L4.52339,10.75 L17.2471,10.75 C17.6613,10.75 17.9971,10.4142 17.9971,10 C17.9971,9.58579 17.6613,9.25 17.2471,9.25 L4.52112,9.25 L9.76243,4.29275 C10.0634,4.00812 10.0766,3.53343 9.79196,3.2325 C9.50733,2.93156 9.03264,2.91834 8.73171,3.20297 L2.31449,9.27241 C2.14819,9.4297 2.04819,9.62981 2.01448,9.8386 C2.00308,9.89058 1.99707,9.94459 1.99707,10 C1.99707,10.0576 2.00356,10.1137 2.01585,10.1675 C2.05084,10.3733 2.15039,10.5702 2.31449,10.7254 L8.73171,16.7949 Z"}))))}}),Oo=he({name:"FastForward",render(){return i("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},i("g",{fill:"currentColor","fill-rule":"nonzero"},i("path",{d:"M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z"}))))}}),Lr=he({name:"Filter",render(){return i("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},i("g",{"fill-rule":"nonzero"},i("path",{d:"M17,19 C17.5522847,19 18,19.4477153 18,20 C18,20.5522847 17.5522847,21 17,21 L11,21 C10.4477153,21 10,20.5522847 10,20 C10,19.4477153 10.4477153,19 11,19 L17,19 Z M21,13 C21.5522847,13 22,13.4477153 22,14 C22,14.5522847 21.5522847,15 21,15 L7,15 C6.44771525,15 6,14.5522847 6,14 C6,13.4477153 6.44771525,13 7,13 L21,13 Z M24,7 C24.5522847,7 25,7.44771525 25,8 C25,8.55228475 24.5522847,9 24,9 L4,9 C3.44771525,9 3,8.55228475 3,8 C3,7.44771525 3.44771525,7 4,7 L24,7 Z"}))))}}),To=he({name:"Forward",render(){return i("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M7.73271 4.20694C8.03263 3.92125 8.50737 3.93279 8.79306 4.23271L13.7944 9.48318C14.0703 9.77285 14.0703 10.2281 13.7944 10.5178L8.79306 15.7682C8.50737 16.0681 8.03263 16.0797 7.73271 15.794C7.43279 15.5083 7.42125 15.0336 7.70694 14.7336L12.2155 10.0005L7.70694 5.26729C7.42125 4.96737 7.43279 4.49264 7.73271 4.20694Z",fill:"currentColor"}))}}),Bo=he({name:"More",render(){return i("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},i("g",{fill:"currentColor","fill-rule":"nonzero"},i("path",{d:"M4,7 C4.55228,7 5,7.44772 5,8 C5,8.55229 4.55228,9 4,9 C3.44772,9 3,8.55229 3,8 C3,7.44772 3.44772,7 4,7 Z M8,7 C8.55229,7 9,7.44772 9,8 C9,8.55229 8.55229,9 8,9 C7.44772,9 7,8.55229 7,8 C7,7.44772 7.44772,7 8,7 Z M12,7 C12.5523,7 13,7.44772 13,8 C13,8.55229 12.5523,9 12,9 C11.4477,9 11,8.55229 11,8 C11,7.44772 11.4477,7 12,7 Z"}))))}}),Er=he({props:{onFocus:Function,onBlur:Function},setup(e){return()=>i("div",{style:"width: 0; height: 0",tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}}),Kr={height:"calc(var(--n-option-height) * 7.6)",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"},Hr=e=>{const{borderRadius:t,popoverColor:o,textColor3:n,dividerColor:r,textColor2:a,primaryColorPressed:d,textColorDisabled:l,primaryColor:s,opacityDisabled:u,hoverColor:v,fontSizeSmall:p,fontSizeMedium:x,fontSizeLarge:h,fontSizeHuge:c,heightSmall:b,heightMedium:m,heightLarge:y,heightHuge:C}=e;return Object.assign(Object.assign({},Kr),{optionFontSizeSmall:p,optionFontSizeMedium:x,optionFontSizeLarge:h,optionFontSizeHuge:c,optionHeightSmall:b,optionHeightMedium:m,optionHeightLarge:y,optionHeightHuge:C,borderRadius:t,color:o,groupHeaderTextColor:n,actionDividerColor:r,optionTextColor:a,optionTextColorPressed:d,optionTextColorDisabled:l,optionTextColorActive:s,optionOpacityDisabled:u,optionCheckColor:s,optionColorPending:v,optionColorActive:"rgba(0, 0, 0, 0)",optionColorActivePending:v,actionTextColor:a,loadingColor:s})},Dr=dt({name:"InternalSelectMenu",common:it,peers:{Scrollbar:qo,Empty:Qo},self:Hr}),po=Dr;function jr(e,t){return i(Tt,{name:"fade-in-scale-up-transition"},{default:()=>e?i(Ve,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>i(Nr)}):null})}const $o=he({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:t,pendingTmNodeRef:o,multipleRef:n,valueSetRef:r,renderLabelRef:a,renderOptionRef:d,labelFieldRef:l,valueFieldRef:s,showCheckmarkRef:u,nodePropsRef:v,handleOptionClick:p,handleOptionMouseEnter:x}=Te(co),h=De(()=>{const{value:y}=o;return y?e.tmNode.key===y.key:!1});function c(y){const{tmNode:C}=e;C.disabled||p(y,C)}function b(y){const{tmNode:C}=e;C.disabled||x(y,C)}function m(y){const{tmNode:C}=e,{value:A}=h;C.disabled||A||x(y,C)}return{multiple:n,isGrouped:De(()=>{const{tmNode:y}=e,{parent:C}=y;return C&&C.rawNode.type==="group"}),showCheckmark:u,nodeProps:v,isPending:h,isSelected:De(()=>{const{value:y}=t,{value:C}=n;if(y===null)return!1;const A=e.tmNode.rawNode[s.value];if(C){const{value:Q}=r;return Q.has(A)}else return y===A}),labelField:l,renderLabel:a,renderOption:d,handleMouseMove:m,handleMouseEnter:b,handleClick:c}},render(){const{clsPrefix:e,tmNode:{rawNode:t},isSelected:o,isPending:n,isGrouped:r,showCheckmark:a,nodeProps:d,renderOption:l,renderLabel:s,handleClick:u,handleMouseEnter:v,handleMouseMove:p}=this,x=jr(o,e),h=s?[s(t,o),a&&x]:[Ye(t[this.labelField],t,o),a&&x],c=d==null?void 0:d(t),b=i("div",Object.assign({},c,{class:[`${e}-base-select-option`,t.class,c==null?void 0:c.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:o,[`${e}-base-select-option--grouped`]:r,[`${e}-base-select-option--pending`]:n,[`${e}-base-select-option--show-checkmark`]:a}],style:[(c==null?void 0:c.style)||"",t.style||""],onClick:wt([u,c==null?void 0:c.onClick]),onMouseenter:wt([v,c==null?void 0:c.onMouseenter]),onMousemove:wt([p,c==null?void 0:c.onMousemove])}),i("div",{class:`${e}-base-select-option__content`},h));return t.render?t.render({node:b,option:t,selected:o}):l?l({node:b,option:t,selected:o}):b}}),Io=he({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:t,labelFieldRef:o,nodePropsRef:n}=Te(co);return{labelField:o,nodeProps:n,renderLabel:e,renderOption:t}},render(){const{clsPrefix:e,renderLabel:t,renderOption:o,nodeProps:n,tmNode:{rawNode:r}}=this,a=n==null?void 0:n(r),d=t?t(r,!1):Ye(r[this.labelField],r,!1),l=i("div",Object.assign({},a,{class:[`${e}-base-select-group-header`,a==null?void 0:a.class]}),d);return r.render?r.render({node:l,option:r}):o?o({node:l,option:r,selected:!1}):l}}),Ur=R("base-select-menu",`
|
|
2
|
-
line-height: 1.5;
|
|
3
|
-
outline: none;
|
|
4
|
-
z-index: 0;
|
|
5
|
-
position: relative;
|
|
6
|
-
border-radius: var(--n-border-radius);
|
|
7
|
-
transition:
|
|
8
|
-
background-color .3s var(--n-bezier),
|
|
9
|
-
box-shadow .3s var(--n-bezier);
|
|
10
|
-
background-color: var(--n-color);
|
|
11
|
-
`,[R("scrollbar",`
|
|
12
|
-
max-height: var(--n-height);
|
|
13
|
-
`),R("virtual-list",`
|
|
14
|
-
max-height: var(--n-height);
|
|
15
|
-
`),R("base-select-option",`
|
|
16
|
-
min-height: var(--n-option-height);
|
|
17
|
-
font-size: var(--n-option-font-size);
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
`,[le("content",`
|
|
21
|
-
z-index: 1;
|
|
22
|
-
white-space: nowrap;
|
|
23
|
-
text-overflow: ellipsis;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
`)]),R("base-select-group-header",`
|
|
26
|
-
min-height: var(--n-option-height);
|
|
27
|
-
font-size: .93em;
|
|
28
|
-
display: flex;
|
|
29
|
-
align-items: center;
|
|
30
|
-
`),R("base-select-menu-option-wrapper",`
|
|
31
|
-
position: relative;
|
|
32
|
-
width: 100%;
|
|
33
|
-
`),le("loading, empty",`
|
|
34
|
-
display: flex;
|
|
35
|
-
padding: 12px 32px;
|
|
36
|
-
flex: 1;
|
|
37
|
-
justify-content: center;
|
|
38
|
-
`),le("loading",`
|
|
39
|
-
color: var(--n-loading-color);
|
|
40
|
-
font-size: var(--n-loading-size);
|
|
41
|
-
`),le("action",`
|
|
42
|
-
padding: 8px var(--n-option-padding-left);
|
|
43
|
-
font-size: var(--n-option-font-size);
|
|
44
|
-
transition:
|
|
45
|
-
color .3s var(--n-bezier),
|
|
46
|
-
border-color .3s var(--n-bezier);
|
|
47
|
-
border-top: 1px solid var(--n-action-divider-color);
|
|
48
|
-
color: var(--n-action-text-color);
|
|
49
|
-
`),R("base-select-group-header",`
|
|
50
|
-
position: relative;
|
|
51
|
-
cursor: default;
|
|
52
|
-
padding: var(--n-option-padding);
|
|
53
|
-
color: var(--n-group-header-text-color);
|
|
54
|
-
`),R("base-select-option",`
|
|
55
|
-
cursor: pointer;
|
|
56
|
-
position: relative;
|
|
57
|
-
padding: var(--n-option-padding);
|
|
58
|
-
transition:
|
|
59
|
-
color .3s var(--n-bezier),
|
|
60
|
-
opacity .3s var(--n-bezier);
|
|
61
|
-
box-sizing: border-box;
|
|
62
|
-
color: var(--n-option-text-color);
|
|
63
|
-
opacity: 1;
|
|
64
|
-
`,[W("show-checkmark",`
|
|
65
|
-
padding-right: calc(var(--n-option-padding-right) + 20px);
|
|
66
|
-
`),ne("&::before",`
|
|
67
|
-
content: "";
|
|
68
|
-
position: absolute;
|
|
69
|
-
left: 4px;
|
|
70
|
-
right: 4px;
|
|
71
|
-
top: 0;
|
|
72
|
-
bottom: 0;
|
|
73
|
-
border-radius: var(--n-border-radius);
|
|
74
|
-
transition: background-color .3s var(--n-bezier);
|
|
75
|
-
`),ne("&:active",`
|
|
76
|
-
color: var(--n-option-text-color-pressed);
|
|
77
|
-
`),W("grouped",`
|
|
78
|
-
padding-left: calc(var(--n-option-padding-left) * 1.5);
|
|
79
|
-
`),W("pending",[ne("&::before",`
|
|
80
|
-
background-color: var(--n-option-color-pending);
|
|
81
|
-
`)]),W("selected",`
|
|
82
|
-
color: var(--n-option-text-color-active);
|
|
83
|
-
`,[ne("&::before",`
|
|
84
|
-
background-color: var(--n-option-color-active);
|
|
85
|
-
`),W("pending",[ne("&::before",`
|
|
86
|
-
background-color: var(--n-option-color-active-pending);
|
|
87
|
-
`)])]),W("disabled",`
|
|
88
|
-
cursor: not-allowed;
|
|
89
|
-
`,[Ue("selected",`
|
|
90
|
-
color: var(--n-option-text-color-disabled);
|
|
91
|
-
`),W("selected",`
|
|
92
|
-
opacity: var(--n-option-opacity-disabled);
|
|
93
|
-
`)]),le("check",`
|
|
94
|
-
font-size: 16px;
|
|
95
|
-
position: absolute;
|
|
96
|
-
right: calc(var(--n-option-padding-right) - 4px);
|
|
97
|
-
top: calc(50% - 7px);
|
|
98
|
-
color: var(--n-option-check-color);
|
|
99
|
-
transition: color .3s var(--n-bezier);
|
|
100
|
-
`,[Bt({enterScale:"0.5"})])])]),cn=he({name:"InternalSelectMenu",props:Object.assign(Object.assign({},Ae.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:"medium"},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,onToggle:Function}),setup(e){const t=Ae("InternalSelectMenu","-internal-select-menu",Ur,po,e,ae(e,"clsPrefix")),o=j(null),n=j(null),r=j(null),a=w(()=>e.treeMate.getFlattenedNodes()),d=w(()=>pr(a.value)),l=j(null);function s(){const{treeMate:S}=e;let f=null;const{value:O}=e;O===null?f=S.getFirstAvailableNode():(e.multiple?f=S.getNode((O||[])[(O||[]).length-1]):f=S.getNode(O),(!f||f.disabled)&&(f=S.getFirstAvailableNode())),V(f||null)}function u(){const{value:S}=l;S&&!e.treeMate.getNode(S.key)&&(l.value=null)}let v;Ge(()=>e.show,S=>{S?v=Ge(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?s():u(),nt(k)):u()},{immediate:!0}):v==null||v()},{immediate:!0}),Mt(()=>{v==null||v()});const p=w(()=>Rt(t.value.self[ce("optionHeight",e.size)])),x=w(()=>Jt(t.value.self[ce("padding",e.size)])),h=w(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),c=w(()=>{const S=a.value;return S&&S.length===0});function b(S){const{onToggle:f}=e;f&&f(S)}function m(S){const{onScroll:f}=e;f&&f(S)}function y(S){var f;(f=r.value)===null||f===void 0||f.sync(),m(S)}function C(){var S;(S=r.value)===null||S===void 0||S.sync()}function A(){const{value:S}=l;return S||null}function Q(S,f){f.disabled||V(f,!1)}function _(S,f){f.disabled||b(f)}function B(S){var f;et(S,"action")||(f=e.onKeyup)===null||f===void 0||f.call(e,S)}function H(S){var f;et(S,"action")||(f=e.onKeydown)===null||f===void 0||f.call(e,S)}function $(S){var f;(f=e.onMousedown)===null||f===void 0||f.call(e,S),!e.focusable&&S.preventDefault()}function z(){const{value:S}=l;S&&V(S.getNext({loop:!0}),!0)}function M(){const{value:S}=l;S&&V(S.getPrev({loop:!0}),!0)}function V(S,f=!1){l.value=S,f&&k()}function k(){var S,f;const O=l.value;if(!O)return;const D=d.value(O.key);D!==null&&(e.virtualScroll?(S=n.value)===null||S===void 0||S.scrollTo({index:D}):(f=r.value)===null||f===void 0||f.scrollTo({index:D,elSize:p.value}))}function N(S){var f,O;!((f=o.value)===null||f===void 0)&&f.contains(S.target)&&((O=e.onFocus)===null||O===void 0||O.call(e,S))}function I(S){var f,O;!((f=o.value)===null||f===void 0)&&f.contains(S.relatedTarget)||(O=e.onBlur)===null||O===void 0||O.call(e,S)}qe(co,{handleOptionMouseEnter:Q,handleOptionClick:_,valueSetRef:h,pendingTmNodeRef:l,nodePropsRef:ae(e,"nodeProps"),showCheckmarkRef:ae(e,"showCheckmark"),multipleRef:ae(e,"multiple"),valueRef:ae(e,"value"),renderLabelRef:ae(e,"renderLabel"),renderOptionRef:ae(e,"renderOption"),labelFieldRef:ae(e,"labelField"),valueFieldRef:ae(e,"valueField")}),qe(vr,o),Ot(()=>{const{value:S}=r;S&&S.sync()});const L=w(()=>{const{size:S}=e,{common:{cubicBezierEaseInOut:f},self:{height:O,borderRadius:D,color:U,groupHeaderTextColor:re,actionDividerColor:ue,optionTextColorPressed:Se,optionTextColor:oe,optionTextColorDisabled:me,optionTextColorActive:se,optionOpacityDisabled:P,optionCheckColor:Z,actionTextColor:Fe,optionColorPending:J,optionColorActive:ge,loadingColor:Ie,loadingSize:ze,optionColorActivePending:Pe,[ce("optionFontSize",S)]:Le,[ce("optionHeight",S)]:Ee,[ce("optionPadding",S)]:ke}}=t.value;return{"--n-height":O,"--n-action-divider-color":ue,"--n-action-text-color":Fe,"--n-bezier":f,"--n-border-radius":D,"--n-color":U,"--n-option-font-size":Le,"--n-group-header-text-color":re,"--n-option-check-color":Z,"--n-option-color-pending":J,"--n-option-color-active":ge,"--n-option-color-active-pending":Pe,"--n-option-height":Ee,"--n-option-opacity-disabled":P,"--n-option-text-color":oe,"--n-option-text-color-active":se,"--n-option-text-color-disabled":me,"--n-option-text-color-pressed":Se,"--n-option-padding":ke,"--n-option-padding-left":Jt(ke,"left"),"--n-option-padding-right":Jt(ke,"right"),"--n-loading-color":Ie,"--n-loading-size":ze}}),{inlineThemeDisabled:X}=e,E=X?at("internal-select-menu",w(()=>e.size[0]),L,e):void 0,ee={selfRef:o,next:z,prev:M,getPendingTmNode:A};return dn(o,e.onResize),Object.assign({mergedTheme:t,virtualListRef:n,scrollbarRef:r,itemSize:p,padding:x,flattenedNodes:a,empty:c,virtualListContainer(){const{value:S}=n;return S==null?void 0:S.listElRef},virtualListContent(){const{value:S}=n;return S==null?void 0:S.itemsElRef},doScroll:m,handleFocusin:N,handleFocusout:I,handleKeyUp:B,handleKeyDown:H,handleMouseDown:$,handleVirtualListResize:C,handleVirtualListScroll:y,cssVars:X?void 0:L,themeClass:E==null?void 0:E.themeClass,onRender:E==null?void 0:E.onRender},ee)},render(){const{$slots:e,virtualScroll:t,clsPrefix:o,mergedTheme:n,themeClass:r,onRender:a}=this;return a==null||a(),i("div",{ref:"selfRef",tabindex:this.focusable?0:-1,class:[`${o}-base-select-menu`,r,this.multiple&&`${o}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},this.loading?i("div",{class:`${o}-base-select-menu__loading`},i(lo,{clsPrefix:o,strokeWidth:20})):this.empty?i("div",{class:`${o}-base-select-menu__empty`,"data-empty":!0,"data-action":!0},$t(e.empty,()=>[i(en,{theme:n.peers.Empty,themeOverrides:n.peerOverrides.Empty})])):i(so,{ref:"scrollbarRef",theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,scrollable:this.scrollable,container:t?this.virtualListContainer:void 0,content:t?this.virtualListContent:void 0,onScroll:t?void 0:this.doScroll},{default:()=>t?i(Yo,{ref:"virtualListRef",class:`${o}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:d})=>d.isGroup?i(Io,{key:d.key,clsPrefix:o,tmNode:d}):d.ignored?null:i($o,{clsPrefix:o,key:d.key,tmNode:d})}):i("div",{class:`${o}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(d=>d.isGroup?i(Io,{key:d.key,clsPrefix:o,tmNode:d}):i($o,{clsPrefix:o,key:d.key,tmNode:d})))}),no(e.action,d=>d&&[i("div",{class:`${o}-base-select-menu__action`,"data-action":!0,key:"action"},d),i(Er,{onFocus:this.onTabOut,key:"focus-detector"})]))}}),Wr={closeIconSizeTiny:"12px",closeIconSizeSmall:"12px",closeIconSizeMedium:"14px",closeIconSizeLarge:"14px",closeSizeTiny:"16px",closeSizeSmall:"16px",closeSizeMedium:"18px",closeSizeLarge:"18px",padding:"0 7px",closeMargin:"0 0 0 4px",closeMarginRtl:"0 4px 0 0"},Vr=e=>{const{textColor2:t,primaryColorHover:o,primaryColorPressed:n,primaryColor:r,infoColor:a,successColor:d,warningColor:l,errorColor:s,baseColor:u,borderColor:v,opacityDisabled:p,tagColor:x,closeIconColor:h,closeIconColorHover:c,closeIconColorPressed:b,borderRadiusSmall:m,fontSizeMini:y,fontSizeTiny:C,fontSizeSmall:A,fontSizeMedium:Q,heightMini:_,heightTiny:B,heightSmall:H,heightMedium:$,closeColorHover:z,closeColorPressed:M,buttonColor2Hover:V,buttonColor2Pressed:k,fontWeightStrong:N}=e;return Object.assign(Object.assign({},Wr),{closeBorderRadius:m,heightTiny:_,heightSmall:B,heightMedium:H,heightLarge:$,borderRadius:m,opacityDisabled:p,fontSizeTiny:y,fontSizeSmall:C,fontSizeMedium:A,fontSizeLarge:Q,fontWeightStrong:N,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:u,colorCheckable:"#0000",colorHoverCheckable:V,colorPressedCheckable:k,colorChecked:r,colorCheckedHover:o,colorCheckedPressed:n,border:`1px solid ${v}`,textColor:t,color:x,colorBordered:"rgb(250, 250, 252)",closeIconColor:h,closeIconColorHover:c,closeIconColorPressed:b,closeColorHover:z,closeColorPressed:M,borderPrimary:`1px solid ${ye(r,{alpha:.3})}`,textColorPrimary:r,colorPrimary:ye(r,{alpha:.12}),colorBorderedPrimary:ye(r,{alpha:.1}),closeIconColorPrimary:r,closeIconColorHoverPrimary:r,closeIconColorPressedPrimary:r,closeColorHoverPrimary:ye(r,{alpha:.12}),closeColorPressedPrimary:ye(r,{alpha:.18}),borderInfo:`1px solid ${ye(a,{alpha:.3})}`,textColorInfo:a,colorInfo:ye(a,{alpha:.12}),colorBorderedInfo:ye(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:ye(a,{alpha:.12}),closeColorPressedInfo:ye(a,{alpha:.18}),borderSuccess:`1px solid ${ye(d,{alpha:.3})}`,textColorSuccess:d,colorSuccess:ye(d,{alpha:.12}),colorBorderedSuccess:ye(d,{alpha:.1}),closeIconColorSuccess:d,closeIconColorHoverSuccess:d,closeIconColorPressedSuccess:d,closeColorHoverSuccess:ye(d,{alpha:.12}),closeColorPressedSuccess:ye(d,{alpha:.18}),borderWarning:`1px solid ${ye(l,{alpha:.35})}`,textColorWarning:l,colorWarning:ye(l,{alpha:.15}),colorBorderedWarning:ye(l,{alpha:.12}),closeIconColorWarning:l,closeIconColorHoverWarning:l,closeIconColorPressedWarning:l,closeColorHoverWarning:ye(l,{alpha:.12}),closeColorPressedWarning:ye(l,{alpha:.18}),borderError:`1px solid ${ye(s,{alpha:.23})}`,textColorError:s,colorError:ye(s,{alpha:.1}),colorBorderedError:ye(s,{alpha:.08}),closeIconColorError:s,closeIconColorHoverError:s,closeIconColorPressedError:s,closeColorHoverError:ye(s,{alpha:.12}),closeColorPressedError:ye(s,{alpha:.18})})},qr={name:"Tag",common:it,self:Vr},Gr=qr,Xr={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},Zr=R("tag",`
|
|
101
|
-
white-space: nowrap;
|
|
102
|
-
position: relative;
|
|
103
|
-
box-sizing: border-box;
|
|
104
|
-
cursor: default;
|
|
105
|
-
display: inline-flex;
|
|
106
|
-
align-items: center;
|
|
107
|
-
flex-wrap: nowrap;
|
|
108
|
-
padding: var(--n-padding);
|
|
109
|
-
border-radius: var(--n-border-radius);
|
|
110
|
-
color: var(--n-text-color);
|
|
111
|
-
background-color: var(--n-color);
|
|
112
|
-
transition:
|
|
113
|
-
border-color .3s var(--n-bezier),
|
|
114
|
-
background-color .3s var(--n-bezier),
|
|
115
|
-
color .3s var(--n-bezier),
|
|
116
|
-
box-shadow .3s var(--n-bezier),
|
|
117
|
-
opacity .3s var(--n-bezier);
|
|
118
|
-
line-height: 1;
|
|
119
|
-
height: var(--n-height);
|
|
120
|
-
font-size: var(--n-font-size);
|
|
121
|
-
`,[W("strong",`
|
|
122
|
-
font-weight: var(--n-font-weight-strong);
|
|
123
|
-
`),le("border",`
|
|
124
|
-
pointer-events: none;
|
|
125
|
-
position: absolute;
|
|
126
|
-
left: 0;
|
|
127
|
-
right: 0;
|
|
128
|
-
top: 0;
|
|
129
|
-
bottom: 0;
|
|
130
|
-
border-radius: inherit;
|
|
131
|
-
border: var(--n-border);
|
|
132
|
-
transition: border-color .3s var(--n-bezier);
|
|
133
|
-
`),le("icon",`
|
|
134
|
-
display: flex;
|
|
135
|
-
margin: 0 4px 0 0;
|
|
136
|
-
color: var(--n-text-color);
|
|
137
|
-
transition: color .3s var(--n-bezier);
|
|
138
|
-
font-size: var(--n-avatar-size-override);
|
|
139
|
-
`),le("avatar",`
|
|
140
|
-
display: flex;
|
|
141
|
-
margin: 0 6px 0 0;
|
|
142
|
-
`),le("close",`
|
|
143
|
-
margin: var(--n-close-margin);
|
|
144
|
-
transition:
|
|
145
|
-
background-color .3s var(--n-bezier),
|
|
146
|
-
color .3s var(--n-bezier);
|
|
147
|
-
`),W("round",`
|
|
148
|
-
padding: 0 calc(var(--n-height) / 3);
|
|
149
|
-
border-radius: calc(var(--n-height) / 2);
|
|
150
|
-
`,[le("icon",`
|
|
151
|
-
margin: 0 4px 0 calc((var(--n-height) - 8px) / -2);
|
|
152
|
-
`),le("avatar",`
|
|
153
|
-
margin: 0 6px 0 calc((var(--n-height) - 8px) / -2);
|
|
154
|
-
`),W("closable",`
|
|
155
|
-
padding: 0 calc(var(--n-height) / 4) 0 calc(var(--n-height) / 3);
|
|
156
|
-
`)]),W("icon, avatar",[W("round",`
|
|
157
|
-
padding: 0 calc(var(--n-height) / 3) 0 calc(var(--n-height) / 2);
|
|
158
|
-
`)]),W("disabled",`
|
|
159
|
-
cursor: not-allowed !important;
|
|
160
|
-
opacity: var(--n-opacity-disabled);
|
|
161
|
-
`),W("checkable",`
|
|
162
|
-
cursor: pointer;
|
|
163
|
-
box-shadow: none;
|
|
164
|
-
color: var(--n-text-color-checkable);
|
|
165
|
-
background-color: var(--n-color-checkable);
|
|
166
|
-
`,[Ue("disabled",[ne("&:hover","background-color: var(--n-color-hover-checkable);",[Ue("checked","color: var(--n-text-color-hover-checkable);")]),ne("&:active","background-color: var(--n-color-pressed-checkable);",[Ue("checked","color: var(--n-text-color-pressed-checkable);")])]),W("checked",`
|
|
167
|
-
color: var(--n-text-color-checked);
|
|
168
|
-
background-color: var(--n-color-checked);
|
|
169
|
-
`,[Ue("disabled",[ne("&:hover","background-color: var(--n-color-checked-hover);"),ne("&:active","background-color: var(--n-color-checked-pressed);")])])])]),Jr=Object.assign(Object.assign(Object.assign({},Ae.props),Xr),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),Qr=ft("n-tag"),Qt=he({name:"Tag",props:Jr,setup(e){const t=j(null),{mergedBorderedRef:o,mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:a}=tt(e),d=Ae("Tag","-tag",Zr,Gr,e,n);qe(Qr,{roundRef:ae(e,"round")});function l(h){if(!e.disabled&&e.checkable){const{checked:c,onCheckedChange:b,onUpdateChecked:m,"onUpdate:checked":y}=e;m&&m(!c),y&&y(!c),b&&b(!c)}}function s(h){if(e.triggerClickOnClose||h.stopPropagation(),!e.disabled){const{onClose:c}=e;c&&ie(c,h)}}const u={setTextContent(h){const{value:c}=t;c&&(c.textContent=h)}},v=Go("Tag",a,n),p=w(()=>{const{type:h,size:c,color:{color:b,textColor:m}={}}=e,{common:{cubicBezierEaseInOut:y},self:{padding:C,closeMargin:A,closeMarginRtl:Q,borderRadius:_,opacityDisabled:B,textColorCheckable:H,textColorHoverCheckable:$,textColorPressedCheckable:z,textColorChecked:M,colorCheckable:V,colorHoverCheckable:k,colorPressedCheckable:N,colorChecked:I,colorCheckedHover:L,colorCheckedPressed:X,closeBorderRadius:E,fontWeightStrong:ee,[ce("colorBordered",h)]:S,[ce("closeSize",c)]:f,[ce("closeIconSize",c)]:O,[ce("fontSize",c)]:D,[ce("height",c)]:U,[ce("color",h)]:re,[ce("textColor",h)]:ue,[ce("border",h)]:Se,[ce("closeIconColor",h)]:oe,[ce("closeIconColorHover",h)]:me,[ce("closeIconColorPressed",h)]:se,[ce("closeColorHover",h)]:P,[ce("closeColorPressed",h)]:Z}}=d.value;return{"--n-font-weight-strong":ee,"--n-avatar-size-override":`calc(${U} - 8px)`,"--n-bezier":y,"--n-border-radius":_,"--n-border":Se,"--n-close-icon-size":O,"--n-close-color-pressed":Z,"--n-close-color-hover":P,"--n-close-border-radius":E,"--n-close-icon-color":oe,"--n-close-icon-color-hover":me,"--n-close-icon-color-pressed":se,"--n-close-icon-color-disabled":oe,"--n-close-margin":A,"--n-close-margin-rtl":Q,"--n-close-size":f,"--n-color":b||(o.value?S:re),"--n-color-checkable":V,"--n-color-checked":I,"--n-color-checked-hover":L,"--n-color-checked-pressed":X,"--n-color-hover-checkable":k,"--n-color-pressed-checkable":N,"--n-font-size":D,"--n-height":U,"--n-opacity-disabled":B,"--n-padding":C,"--n-text-color":m||ue,"--n-text-color-checkable":H,"--n-text-color-checked":M,"--n-text-color-hover-checkable":$,"--n-text-color-pressed-checkable":z}}),x=r?at("tag",w(()=>{let h="";const{type:c,size:b,color:{color:m,textColor:y}={}}=e;return h+=c[0],h+=b[0],m&&(h+=`a${xo(m)}`),y&&(h+=`b${xo(y)}`),o.value&&(h+="c"),h}),p,e):void 0;return Object.assign(Object.assign({},u),{rtlEnabled:v,mergedClsPrefix:n,contentRef:t,mergedBordered:o,handleClick:l,handleCloseClick:s,cssVars:r?void 0:p,themeClass:x==null?void 0:x.themeClass,onRender:x==null?void 0:x.onRender})},render(){var e,t;const{mergedClsPrefix:o,rtlEnabled:n,closable:r,color:{borderColor:a}={},round:d,onRender:l,$slots:s}=this;l==null||l();const u=no(s.avatar,p=>p&&i("div",{class:`${o}-tag__avatar`},p)),v=no(s.icon,p=>p&&i("div",{class:`${o}-tag__icon`},p));return i("div",{class:[`${o}-tag`,this.themeClass,{[`${o}-tag--rtl`]:n,[`${o}-tag--strong`]:this.strong,[`${o}-tag--disabled`]:this.disabled,[`${o}-tag--checkable`]:this.checkable,[`${o}-tag--checked`]:this.checkable&&this.checked,[`${o}-tag--round`]:d,[`${o}-tag--avatar`]:u,[`${o}-tag--icon`]:v,[`${o}-tag--closable`]:r}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},v||u,i("span",{class:`${o}-tag__content`,ref:"contentRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)),!this.checkable&&r?i(jn,{clsPrefix:o,class:`${o}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:d,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?i("div",{class:`${o}-tag__border`,style:{borderColor:a}}):null)}}),Yr={paddingSingle:"0 26px 0 12px",paddingMultiple:"3px 26px 0 12px",clearSize:"16px",arrowSize:"16px"},ei=e=>{const{borderRadius:t,textColor2:o,textColorDisabled:n,inputColor:r,inputColorDisabled:a,primaryColor:d,primaryColorHover:l,warningColor:s,warningColorHover:u,errorColor:v,errorColorHover:p,borderColor:x,iconColor:h,iconColorDisabled:c,clearColor:b,clearColorHover:m,clearColorPressed:y,placeholderColor:C,placeholderColorDisabled:A,fontSizeTiny:Q,fontSizeSmall:_,fontSizeMedium:B,fontSizeLarge:H,heightTiny:$,heightSmall:z,heightMedium:M,heightLarge:V}=e;return Object.assign(Object.assign({},Yr),{fontSizeTiny:Q,fontSizeSmall:_,fontSizeMedium:B,fontSizeLarge:H,heightTiny:$,heightSmall:z,heightMedium:M,heightLarge:V,borderRadius:t,textColor:o,textColorDisabled:n,placeholderColor:C,placeholderColorDisabled:A,color:r,colorDisabled:a,colorActive:r,border:`1px solid ${x}`,borderHover:`1px solid ${l}`,borderActive:`1px solid ${d}`,borderFocus:`1px solid ${l}`,boxShadowHover:"none",boxShadowActive:`0 0 0 2px ${ye(d,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${ye(d,{alpha:.2})}`,caretColor:d,arrowColor:h,arrowColorDisabled:c,loadingColor:d,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${u}`,borderActiveWarning:`1px solid ${s}`,borderFocusWarning:`1px solid ${u}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 0 2px ${ye(s,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${ye(s,{alpha:.2})}`,colorActiveWarning:r,caretColorWarning:s,borderError:`1px solid ${v}`,borderHoverError:`1px solid ${p}`,borderActiveError:`1px solid ${v}`,borderFocusError:`1px solid ${p}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 0 2px ${ye(v,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${ye(v,{alpha:.2})}`,colorActiveError:r,caretColorError:v,clearColor:b,clearColorHover:m,clearColorPressed:y})},ti=dt({name:"InternalSelection",common:it,peers:{Popover:It},self:ei}),un=ti,oi=ne([R("base-selection",`
|
|
170
|
-
position: relative;
|
|
171
|
-
z-index: auto;
|
|
172
|
-
box-shadow: none;
|
|
173
|
-
width: 100%;
|
|
174
|
-
max-width: 100%;
|
|
175
|
-
display: inline-block;
|
|
176
|
-
vertical-align: bottom;
|
|
177
|
-
border-radius: var(--n-border-radius);
|
|
178
|
-
min-height: var(--n-height);
|
|
179
|
-
line-height: 1.5;
|
|
180
|
-
font-size: var(--n-font-size);
|
|
181
|
-
`,[R("base-loading",`
|
|
182
|
-
color: var(--n-loading-color);
|
|
183
|
-
`),R("base-selection-tags","min-height: var(--n-height);"),le("border, state-border",`
|
|
184
|
-
position: absolute;
|
|
185
|
-
left: 0;
|
|
186
|
-
right: 0;
|
|
187
|
-
top: 0;
|
|
188
|
-
bottom: 0;
|
|
189
|
-
pointer-events: none;
|
|
190
|
-
border: var(--n-border);
|
|
191
|
-
border-radius: inherit;
|
|
192
|
-
transition:
|
|
193
|
-
box-shadow .3s var(--n-bezier),
|
|
194
|
-
border-color .3s var(--n-bezier);
|
|
195
|
-
`),le("state-border",`
|
|
196
|
-
z-index: 1;
|
|
197
|
-
border-color: #0000;
|
|
198
|
-
`),R("base-suffix",`
|
|
199
|
-
cursor: pointer;
|
|
200
|
-
position: absolute;
|
|
201
|
-
top: 50%;
|
|
202
|
-
transform: translateY(-50%);
|
|
203
|
-
right: 10px;
|
|
204
|
-
`,[le("arrow",`
|
|
205
|
-
font-size: var(--n-arrow-size);
|
|
206
|
-
color: var(--n-arrow-color);
|
|
207
|
-
transition: color .3s var(--n-bezier);
|
|
208
|
-
`)]),R("base-selection-overlay",`
|
|
209
|
-
display: flex;
|
|
210
|
-
align-items: center;
|
|
211
|
-
white-space: nowrap;
|
|
212
|
-
pointer-events: none;
|
|
213
|
-
position: absolute;
|
|
214
|
-
top: 0;
|
|
215
|
-
right: 0;
|
|
216
|
-
bottom: 0;
|
|
217
|
-
left: 0;
|
|
218
|
-
padding: var(--n-padding-single);
|
|
219
|
-
transition: color .3s var(--n-bezier);
|
|
220
|
-
`,[le("wrapper",`
|
|
221
|
-
flex-basis: 0;
|
|
222
|
-
flex-grow: 1;
|
|
223
|
-
overflow: hidden;
|
|
224
|
-
text-overflow: ellipsis;
|
|
225
|
-
`)]),R("base-selection-placeholder",`
|
|
226
|
-
color: var(--n-placeholder-color);
|
|
227
|
-
`,[le("inner",`
|
|
228
|
-
max-width: 100%;
|
|
229
|
-
overflow: hidden;
|
|
230
|
-
`)]),R("base-selection-tags",`
|
|
231
|
-
cursor: pointer;
|
|
232
|
-
outline: none;
|
|
233
|
-
box-sizing: border-box;
|
|
234
|
-
position: relative;
|
|
235
|
-
z-index: auto;
|
|
236
|
-
display: flex;
|
|
237
|
-
padding: var(--n-padding-multiple);
|
|
238
|
-
flex-wrap: wrap;
|
|
239
|
-
align-items: center;
|
|
240
|
-
width: 100%;
|
|
241
|
-
vertical-align: bottom;
|
|
242
|
-
background-color: var(--n-color);
|
|
243
|
-
border-radius: inherit;
|
|
244
|
-
transition:
|
|
245
|
-
color .3s var(--n-bezier),
|
|
246
|
-
box-shadow .3s var(--n-bezier),
|
|
247
|
-
background-color .3s var(--n-bezier);
|
|
248
|
-
`),R("base-selection-label",`
|
|
249
|
-
height: var(--n-height);
|
|
250
|
-
display: inline-flex;
|
|
251
|
-
width: 100%;
|
|
252
|
-
vertical-align: bottom;
|
|
253
|
-
cursor: pointer;
|
|
254
|
-
outline: none;
|
|
255
|
-
z-index: auto;
|
|
256
|
-
box-sizing: border-box;
|
|
257
|
-
position: relative;
|
|
258
|
-
transition:
|
|
259
|
-
color .3s var(--n-bezier),
|
|
260
|
-
box-shadow .3s var(--n-bezier),
|
|
261
|
-
background-color .3s var(--n-bezier);
|
|
262
|
-
border-radius: inherit;
|
|
263
|
-
background-color: var(--n-color);
|
|
264
|
-
align-items: center;
|
|
265
|
-
`,[R("base-selection-input",`
|
|
266
|
-
font-size: inherit;
|
|
267
|
-
line-height: inherit;
|
|
268
|
-
outline: none;
|
|
269
|
-
cursor: pointer;
|
|
270
|
-
box-sizing: border-box;
|
|
271
|
-
border:none;
|
|
272
|
-
width: 100%;
|
|
273
|
-
padding: var(--n-padding-single);
|
|
274
|
-
background-color: #0000;
|
|
275
|
-
color: var(--n-text-color);
|
|
276
|
-
transition: color .3s var(--n-bezier);
|
|
277
|
-
caret-color: var(--n-caret-color);
|
|
278
|
-
`,[le("content",`
|
|
279
|
-
text-overflow: ellipsis;
|
|
280
|
-
overflow: hidden;
|
|
281
|
-
white-space: nowrap;
|
|
282
|
-
`)]),le("render-label",`
|
|
283
|
-
color: var(--n-text-color);
|
|
284
|
-
`)]),Ue("disabled",[ne("&:hover",[le("state-border",`
|
|
285
|
-
box-shadow: var(--n-box-shadow-hover);
|
|
286
|
-
border: var(--n-border-hover);
|
|
287
|
-
`)]),W("focus",[le("state-border",`
|
|
288
|
-
box-shadow: var(--n-box-shadow-focus);
|
|
289
|
-
border: var(--n-border-focus);
|
|
290
|
-
`)]),W("active",[le("state-border",`
|
|
291
|
-
box-shadow: var(--n-box-shadow-active);
|
|
292
|
-
border: var(--n-border-active);
|
|
293
|
-
`),R("base-selection-label","background-color: var(--n-color-active);"),R("base-selection-tags","background-color: var(--n-color-active);")])]),W("disabled","cursor: not-allowed;",[le("arrow",`
|
|
294
|
-
color: var(--n-arrow-color-disabled);
|
|
295
|
-
`),R("base-selection-label",`
|
|
296
|
-
cursor: not-allowed;
|
|
297
|
-
background-color: var(--n-color-disabled);
|
|
298
|
-
`,[R("base-selection-input",`
|
|
299
|
-
cursor: not-allowed;
|
|
300
|
-
color: var(--n-text-color-disabled);
|
|
301
|
-
`),le("render-label",`
|
|
302
|
-
color: var(--n-text-color-disabled);
|
|
303
|
-
`)]),R("base-selection-tags",`
|
|
304
|
-
cursor: not-allowed;
|
|
305
|
-
background-color: var(--n-color-disabled);
|
|
306
|
-
`),R("base-selection-placeholder",`
|
|
307
|
-
cursor: not-allowed;
|
|
308
|
-
color: var(--n-placeholder-color-disabled);
|
|
309
|
-
`)]),R("base-selection-input-tag",`
|
|
310
|
-
height: calc(var(--n-height) - 6px);
|
|
311
|
-
line-height: calc(var(--n-height) - 6px);
|
|
312
|
-
outline: none;
|
|
313
|
-
display: none;
|
|
314
|
-
position: relative;
|
|
315
|
-
margin-bottom: 3px;
|
|
316
|
-
max-width: 100%;
|
|
317
|
-
vertical-align: bottom;
|
|
318
|
-
`,[le("input",`
|
|
319
|
-
font-size: inherit;
|
|
320
|
-
font-family: inherit;
|
|
321
|
-
min-width: 1px;
|
|
322
|
-
padding: 0;
|
|
323
|
-
background-color: #0000;
|
|
324
|
-
outline: none;
|
|
325
|
-
border: none;
|
|
326
|
-
max-width: 100%;
|
|
327
|
-
overflow: hidden;
|
|
328
|
-
width: 1em;
|
|
329
|
-
line-height: inherit;
|
|
330
|
-
cursor: pointer;
|
|
331
|
-
color: var(--n-text-color);
|
|
332
|
-
caret-color: var(--n-caret-color);
|
|
333
|
-
`),le("mirror",`
|
|
334
|
-
position: absolute;
|
|
335
|
-
left: 0;
|
|
336
|
-
top: 0;
|
|
337
|
-
white-space: pre;
|
|
338
|
-
visibility: hidden;
|
|
339
|
-
user-select: none;
|
|
340
|
-
-webkit-user-select: none;
|
|
341
|
-
opacity: 0;
|
|
342
|
-
`)]),["warning","error"].map(e=>W(`${e}-status`,[le("state-border",`border: var(--n-border-${e});`),Ue("disabled",[ne("&:hover",[le("state-border",`
|
|
343
|
-
box-shadow: var(--n-box-shadow-hover-${e});
|
|
344
|
-
border: var(--n-border-hover-${e});
|
|
345
|
-
`)]),W("active",[le("state-border",`
|
|
346
|
-
box-shadow: var(--n-box-shadow-active-${e});
|
|
347
|
-
border: var(--n-border-active-${e});
|
|
348
|
-
`),R("base-selection-label",`background-color: var(--n-color-active-${e});`),R("base-selection-tags",`background-color: var(--n-color-active-${e});`)]),W("focus",[le("state-border",`
|
|
349
|
-
box-shadow: var(--n-box-shadow-focus-${e});
|
|
350
|
-
border: var(--n-border-focus-${e});
|
|
351
|
-
`)])])]))]),R("base-selection-popover",`
|
|
352
|
-
margin-bottom: -3px;
|
|
353
|
-
display: flex;
|
|
354
|
-
flex-wrap: wrap;
|
|
355
|
-
margin-right: -8px;
|
|
356
|
-
`),R("base-selection-tag-wrapper",`
|
|
357
|
-
max-width: 100%;
|
|
358
|
-
display: inline-flex;
|
|
359
|
-
padding: 0 7px 3px 0;
|
|
360
|
-
`,[ne("&:last-child","padding-right: 0;"),R("tag",`
|
|
361
|
-
font-size: 14px;
|
|
362
|
-
max-width: 100%;
|
|
363
|
-
`,[le("content",`
|
|
364
|
-
line-height: 1.25;
|
|
365
|
-
text-overflow: ellipsis;
|
|
366
|
-
overflow: hidden;
|
|
367
|
-
`)])])]),ni=he({name:"InternalSelection",props:Object.assign(Object.assign({},Ae.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const t=j(null),o=j(null),n=j(null),r=j(null),a=j(null),d=j(null),l=j(null),s=j(null),u=j(null),v=j(null),p=j(!1),x=j(!1),h=j(!1),c=Ae("InternalSelection","-internal-selection",oi,un,e,ae(e,"clsPrefix")),b=w(()=>e.clearable&&!e.disabled&&(h.value||e.active)),m=w(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):Ye(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),y=w(()=>{const F=e.selectedOption;if(F)return F[e.labelField]}),C=w(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function A(){var F;const{value:q}=t;if(q){const{value:xe}=o;xe&&(xe.style.width=`${q.offsetWidth}px`,e.maxTagCount!=="responsive"&&((F=u.value)===null||F===void 0||F.sync()))}}function Q(){const{value:F}=v;F&&(F.style.display="none")}function _(){const{value:F}=v;F&&(F.style.display="inline-block")}Ge(ae(e,"active"),F=>{F||Q()}),Ge(ae(e,"pattern"),()=>{e.multiple&&nt(A)});function B(F){const{onFocus:q}=e;q&&q(F)}function H(F){const{onBlur:q}=e;q&&q(F)}function $(F){const{onDeleteOption:q}=e;q&&q(F)}function z(F){const{onClear:q}=e;q&&q(F)}function M(F){const{onPatternInput:q}=e;q&&q(F)}function V(F){var q;(!F.relatedTarget||!(!((q=n.value)===null||q===void 0)&&q.contains(F.relatedTarget)))&&B(F)}function k(F){var q;!((q=n.value)===null||q===void 0)&&q.contains(F.relatedTarget)||H(F)}function N(F){z(F)}function I(){h.value=!0}function L(){h.value=!1}function X(F){!e.active||!e.filterable||F.target!==o.value&&F.preventDefault()}function E(F){$(F)}function ee(F){if(F.key==="Backspace"&&!S.value&&!e.pattern.length){const{selectedOptions:q}=e;q!=null&&q.length&&E(q[q.length-1])}}const S=j(!1);let f=null;function O(F){const{value:q}=t;if(q){const xe=F.target.value;q.textContent=xe,A()}e.ignoreComposition&&S.value?f=F:M(F)}function D(){S.value=!0}function U(){S.value=!1,e.ignoreComposition&&M(f),f=null}function re(F){var q;x.value=!0,(q=e.onPatternFocus)===null||q===void 0||q.call(e,F)}function ue(F){var q;x.value=!1,(q=e.onPatternBlur)===null||q===void 0||q.call(e,F)}function Se(){var F,q;if(e.filterable)x.value=!1,(F=d.value)===null||F===void 0||F.blur(),(q=o.value)===null||q===void 0||q.blur();else if(e.multiple){const{value:xe}=r;xe==null||xe.blur()}else{const{value:xe}=a;xe==null||xe.blur()}}function oe(){var F,q,xe;e.filterable?(x.value=!1,(F=d.value)===null||F===void 0||F.focus()):e.multiple?(q=r.value)===null||q===void 0||q.focus():(xe=a.value)===null||xe===void 0||xe.focus()}function me(){const{value:F}=o;F&&(_(),F.focus())}function se(){const{value:F}=o;F&&F.blur()}function P(F){const{value:q}=l;q&&q.setTextContent(`+${F}`)}function Z(){const{value:F}=s;return F}function Fe(){return o.value}let J=null;function ge(){J!==null&&window.clearTimeout(J)}function Ie(){e.active||(ge(),J=window.setTimeout(()=>{C.value&&(p.value=!0)},100))}function ze(){ge()}function Pe(F){F||(ge(),p.value=!1)}Ge(C,F=>{F||(p.value=!1)}),Ot(()=>{ut(()=>{const F=d.value;F&&(e.disabled?F.removeAttribute("tabindex"):F.tabIndex=x.value?-1:0)})}),dn(n,e.onResize);const{inlineThemeDisabled:Le}=e,Ee=w(()=>{const{size:F}=e,{common:{cubicBezierEaseInOut:q},self:{borderRadius:xe,color:je,placeholderColor:Je,textColor:Ke,paddingSingle:Me,paddingMultiple:He,caretColor:Ne,colorDisabled:G,textColorDisabled:te,placeholderColorDisabled:Ce,colorActive:K,boxShadowFocus:be,boxShadowActive:we,boxShadowHover:g,border:T,borderFocus:Y,borderHover:fe,borderActive:ve,arrowColor:de,arrowColorDisabled:pe,loadingColor:Re,colorActiveWarning:Oe,boxShadowFocusWarning:Qe,boxShadowActiveWarning:Be,boxShadowHoverWarning:_e,borderWarning:ht,borderFocusWarning:pt,borderHoverWarning:vt,borderActiveWarning:gt,colorActiveError:bt,boxShadowFocusError:mt,boxShadowActiveError:Lt,boxShadowHoverError:Et,borderError:Kt,borderFocusError:Ht,borderHoverError:Dt,borderActiveError:jt,clearColor:Ut,clearColorHover:Wt,clearColorPressed:Vt,clearSize:qt,arrowSize:Gt,[ce("height",F)]:Xt,[ce("fontSize",F)]:Zt}}=c.value;return{"--n-bezier":q,"--n-border":T,"--n-border-active":ve,"--n-border-focus":Y,"--n-border-hover":fe,"--n-border-radius":xe,"--n-box-shadow-active":we,"--n-box-shadow-focus":be,"--n-box-shadow-hover":g,"--n-caret-color":Ne,"--n-color":je,"--n-color-active":K,"--n-color-disabled":G,"--n-font-size":Zt,"--n-height":Xt,"--n-padding-single":Me,"--n-padding-multiple":He,"--n-placeholder-color":Je,"--n-placeholder-color-disabled":Ce,"--n-text-color":Ke,"--n-text-color-disabled":te,"--n-arrow-color":de,"--n-arrow-color-disabled":pe,"--n-loading-color":Re,"--n-color-active-warning":Oe,"--n-box-shadow-focus-warning":Qe,"--n-box-shadow-active-warning":Be,"--n-box-shadow-hover-warning":_e,"--n-border-warning":ht,"--n-border-focus-warning":pt,"--n-border-hover-warning":vt,"--n-border-active-warning":gt,"--n-color-active-error":bt,"--n-box-shadow-focus-error":mt,"--n-box-shadow-active-error":Lt,"--n-box-shadow-hover-error":Et,"--n-border-error":Kt,"--n-border-focus-error":Ht,"--n-border-hover-error":Dt,"--n-border-active-error":jt,"--n-clear-size":qt,"--n-clear-color":Ut,"--n-clear-color-hover":Wt,"--n-clear-color-pressed":Vt,"--n-arrow-size":Gt}}),ke=Le?at("internal-selection",w(()=>e.size[0]),Ee,e):void 0;return{mergedTheme:c,mergedClearable:b,patternInputFocused:x,filterablePlaceholder:m,label:y,selected:C,showTagsPanel:p,isComposing:S,counterRef:l,counterWrapperRef:s,patternInputMirrorRef:t,patternInputRef:o,selfRef:n,multipleElRef:r,singleElRef:a,patternInputWrapperRef:d,overflowRef:u,inputTagElRef:v,handleMouseDown:X,handleFocusin:V,handleClear:N,handleMouseEnter:I,handleMouseLeave:L,handleDeleteOption:E,handlePatternKeyDown:ee,handlePatternInputInput:O,handlePatternInputBlur:ue,handlePatternInputFocus:re,handleMouseEnterCounter:Ie,handleMouseLeaveCounter:ze,handleFocusout:k,handleCompositionEnd:U,handleCompositionStart:D,onPopoverUpdateShow:Pe,focus:oe,focusInput:me,blur:Se,blurInput:se,updateCounter:P,getCounter:Z,getTail:Fe,renderLabel:e.renderLabel,cssVars:Le?void 0:Ee,themeClass:ke==null?void 0:ke.themeClass,onRender:ke==null?void 0:ke.onRender}},render(){const{status:e,multiple:t,size:o,disabled:n,filterable:r,maxTagCount:a,bordered:d,clsPrefix:l,onRender:s,renderTag:u,renderLabel:v}=this;s==null||s();const p=a==="responsive",x=typeof a=="number",h=p||x,c=i(Un,null,{default:()=>i(gr,{clsPrefix:l,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var m,y;return(y=(m=this.$slots).arrow)===null||y===void 0?void 0:y.call(m)}})});let b;if(t){const{labelField:m}=this,y=k=>i("div",{class:`${l}-base-selection-tag-wrapper`,key:k.value},u?u({option:k,handleClose:()=>{this.handleDeleteOption(k)}}):i(Qt,{size:o,closable:!k.disabled,disabled:n,onClose:()=>{this.handleDeleteOption(k)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>v?v(k,!0):Ye(k[m],k,!0)})),C=()=>(x?this.selectedOptions.slice(0,a):this.selectedOptions).map(y),A=r?i("div",{class:`${l}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},i("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:n,value:this.pattern,autofocus:this.autofocus,class:`${l}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),i("span",{ref:"patternInputMirrorRef",class:`${l}-base-selection-input-tag__mirror`},this.pattern)):null,Q=p?()=>i("div",{class:`${l}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},i(Qt,{size:o,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:n})):void 0;let _;if(x){const k=this.selectedOptions.length-a;k>0&&(_=i("div",{class:`${l}-base-selection-tag-wrapper`,key:"__counter__"},i(Qt,{size:o,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:n},{default:()=>`+${k}`})))}const B=p?r?i(Fo,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:C,counter:Q,tail:()=>A}):i(Fo,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:C,counter:Q}):x?C().concat(_):C(),H=h?()=>i("div",{class:`${l}-base-selection-popover`},p?C():this.selectedOptions.map(y)):void 0,$=h?{show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover}:null,M=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?i("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`},i("div",{class:`${l}-base-selection-placeholder__inner`},this.placeholder)):null,V=r?i("div",{ref:"patternInputWrapperRef",class:`${l}-base-selection-tags`},B,p?null:A,c):i("div",{ref:"multipleElRef",class:`${l}-base-selection-tags`,tabindex:n?void 0:0},B,c);b=i(st,null,h?i(At,Object.assign({},$,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>V,default:H}):V,M)}else if(r){const m=this.pattern||this.isComposing,y=this.active?!m:!this.selected,C=this.active?!1:this.selected;b=i("div",{ref:"patternInputWrapperRef",class:`${l}-base-selection-label`},i("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${l}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:n,disabled:n,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),C?i("div",{class:`${l}-base-selection-label__render-label ${l}-base-selection-overlay`,key:"input"},i("div",{class:`${l}-base-selection-overlay__wrapper`},u?u({option:this.selectedOption,handleClose:()=>{}}):v?v(this.selectedOption,!0):Ye(this.label,this.selectedOption,!0))):null,y?i("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`,key:"placeholder"},i("div",{class:`${l}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,c)}else b=i("div",{ref:"singleElRef",class:`${l}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?i("div",{class:`${l}-base-selection-input`,title:Br(this.label),key:"input"},i("div",{class:`${l}-base-selection-input__content`},u?u({option:this.selectedOption,handleClose:()=>{}}):v?v(this.selectedOption,!0):Ye(this.label,this.selectedOption,!0))):i("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`,key:"placeholder"},i("div",{class:`${l}-base-selection-placeholder__inner`},this.placeholder)),c);return i("div",{ref:"selfRef",class:[`${l}-base-selection`,this.themeClass,e&&`${l}-base-selection--${e}-status`,{[`${l}-base-selection--active`]:this.active,[`${l}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${l}-base-selection--disabled`]:this.disabled,[`${l}-base-selection--multiple`]:this.multiple,[`${l}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},b,d?i("div",{class:`${l}-base-selection__border`}):null,d?i("div",{class:`${l}-base-selection__state-border`}):null)}});function zt(e){return e.type==="group"}function fn(e){return e.type==="ignored"}function Yt(e,t){try{return!!(1+t.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function hn(e,t){return{getIsGroup:zt,getIgnored:fn,getKey(n){return zt(n)?n.name||n.key||"key-required":n[e]},getChildren(n){return n[t]}}}function ri(e,t,o,n){if(!t)return e;function r(a){if(!Array.isArray(a))return[];const d=[];for(const l of a)if(zt(l)){const s=r(l[n]);s.length&&d.push(Object.assign({},l,{[n]:s}))}else{if(fn(l))continue;t(o,l)&&d.push(l)}return d}return r(e)}function ii(e,t,o){const n=new Map;return e.forEach(r=>{zt(r)?r[o].forEach(a=>{n.set(a[t],a)}):n.set(r[t],r)}),n}function ai(e){const{boxShadow2:t}=e;return{menuBoxShadow:t}}const li=dt({name:"Popselect",common:it,peers:{Popover:It,InternalSelectMenu:po},self:ai}),vo=li,pn=ft("n-popselect"),si=R("popselect-menu",`
|
|
368
|
-
box-shadow: var(--n-menu-box-shadow);
|
|
369
|
-
`),go={multiple:Boolean,value:{type:[String,Number,Array],default:null},cancelable:Boolean,options:{type:Array,default:()=>[]},size:{type:String,default:"medium"},scrollable:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onMouseenter:Function,onMouseleave:Function,renderLabel:Function,showCheckmark:{type:Boolean,default:void 0},nodeProps:Function,virtualScroll:Boolean,onChange:[Function,Array]},Ao=Wn(go),di=he({name:"PopselectPanel",props:go,setup(e){const t=Te(pn),{mergedClsPrefixRef:o,inlineThemeDisabled:n}=tt(e),r=Ae("Popselect","-pop-select",si,vo,t.props,o),a=w(()=>_t(e.options,hn("value","children")));function d(x,h){const{onUpdateValue:c,"onUpdate:value":b,onChange:m}=e;c&&ie(c,x,h),b&&ie(b,x,h),m&&ie(m,x,h)}function l(x){u(x.key)}function s(x){et(x,"action")||x.preventDefault()}function u(x){const{value:{getNode:h}}=a;if(e.multiple)if(Array.isArray(e.value)){const c=[],b=[];let m=!0;e.value.forEach(y=>{if(y===x){m=!1;return}const C=h(y);C&&(c.push(C.key),b.push(C.rawNode))}),m&&(c.push(x),b.push(h(x).rawNode)),d(c,b)}else{const c=h(x);c&&d([x],[c.rawNode])}else if(e.value===x&&e.cancelable)d(null,null);else{const c=h(x);c&&d(x,c.rawNode);const{"onUpdate:show":b,onUpdateShow:m}=t.props;b&&ie(b,!1),m&&ie(m,!1),t.setShow(!1)}nt(()=>{t.syncPosition()})}Ge(ae(e,"options"),()=>{nt(()=>{t.syncPosition()})});const v=w(()=>{const{self:{menuBoxShadow:x}}=r.value;return{"--n-menu-box-shadow":x}}),p=n?at("select",void 0,v,t.props):void 0;return{mergedTheme:t.mergedThemeRef,mergedClsPrefix:o,treeMate:a,handleToggle:l,handleMenuMousedown:s,cssVars:n?void 0:v,themeClass:p==null?void 0:p.themeClass,onRender:p==null?void 0:p.onRender}},render(){var e;return(e=this.onRender)===null||e===void 0||e.call(this),i(cn,{clsPrefix:this.mergedClsPrefix,focusable:!0,nodeProps:this.nodeProps,class:[`${this.mergedClsPrefix}-popselect-menu`,this.themeClass],style:this.cssVars,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,multiple:this.multiple,treeMate:this.treeMate,size:this.size,value:this.value,virtualScroll:this.virtualScroll,scrollable:this.scrollable,renderLabel:this.renderLabel,onToggle:this.handleToggle,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseenter,onMousedown:this.handleMenuMousedown,showCheckmark:this.showCheckmark},{action:()=>{var t,o;return((o=(t=this.$slots).action)===null||o===void 0?void 0:o.call(t))||[]},empty:()=>{var t,o;return((o=(t=this.$slots).empty)===null||o===void 0?void 0:o.call(t))||[]}})}}),ci=Object.assign(Object.assign(Object.assign(Object.assign({},Ae.props),ln(Pt,["showArrow","arrow"])),{placement:Object.assign(Object.assign({},Pt.placement),{default:"bottom"}),trigger:{type:String,default:"hover"}}),go),ui=he({name:"Popselect",props:ci,inheritAttrs:!1,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=tt(e),o=Ae("Popselect","-popselect",void 0,vo,e,t),n=j(null);function r(){var l;(l=n.value)===null||l===void 0||l.syncPosition()}function a(l){var s;(s=n.value)===null||s===void 0||s.setShow(l)}return qe(pn,{props:e,mergedThemeRef:o,syncPosition:r,setShow:a}),Object.assign(Object.assign({},{syncPosition:r,setShow:a}),{popoverInstRef:n,mergedTheme:o})},render(){const{mergedTheme:e}=this,t={theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:{padding:"0"},ref:"popoverInstRef",internalRenderBody:(o,n,r,a,d)=>{const{$attrs:l}=this;return i(di,Object.assign({},l,{class:[l.class,o],style:[l.style,r]},Xo(this.$props,Ao),{ref:sn(n),onMouseenter:wt([a,l.onMouseenter]),onMouseleave:wt([d,l.onMouseleave])}),{action:()=>{var s,u;return(u=(s=this.$slots).action)===null||u===void 0?void 0:u.call(s)},empty:()=>{var s,u;return(u=(s=this.$slots).empty)===null||u===void 0?void 0:u.call(s)}})}};return i(At,Object.assign({},ln(this.$props,Ao),t,{internalDeactivateImmediately:!0}),{trigger:()=>{var o,n;return(n=(o=this.$slots).default)===null||n===void 0?void 0:n.call(o)}})}});function fi(e){const{boxShadow2:t}=e;return{menuBoxShadow:t}}const hi=dt({name:"Select",common:it,peers:{InternalSelection:un,InternalSelectMenu:po},self:fi}),vn=hi,pi=ne([R("select",`
|
|
370
|
-
z-index: auto;
|
|
371
|
-
outline: none;
|
|
372
|
-
width: 100%;
|
|
373
|
-
position: relative;
|
|
374
|
-
`),R("select-menu",`
|
|
375
|
-
margin: 4px 0;
|
|
376
|
-
box-shadow: var(--n-menu-box-shadow);
|
|
377
|
-
`,[Bt({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),vi=Object.assign(Object.assign({},Ae.props),{to:Ft.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),gi=he({name:"Select",props:vi,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:o,namespaceRef:n,inlineThemeDisabled:r}=tt(e),a=Ae("Select","-select",pi,vn,e,t),d=j(e.defaultValue),l=ae(e,"value"),s=rt(l,d),u=j(!1),v=j(""),p=w(()=>{const{valueField:g,childrenField:T}=e,Y=hn(g,T);return _t(k.value,Y)}),x=w(()=>ii(M.value,e.valueField,e.childrenField)),h=j(!1),c=rt(ae(e,"show"),h),b=j(null),m=j(null),y=j(null),{localeRef:C}=uo("Select"),A=w(()=>{var g;return(g=e.placeholder)!==null&&g!==void 0?g:C.value.placeholder}),Q=br(e,["items","options"]),_=[],B=j([]),H=j([]),$=j(new Map),z=w(()=>{const{fallbackOption:g}=e;if(g===void 0){const{labelField:T,valueField:Y}=e;return fe=>({[T]:String(fe),[Y]:fe})}return g===!1?!1:T=>Object.assign(g(T),{value:T})}),M=w(()=>H.value.concat(B.value).concat(Q.value)),V=w(()=>{const{filter:g}=e;if(g)return g;const{labelField:T,valueField:Y}=e;return(fe,ve)=>{if(!ve)return!1;const de=ve[T];if(typeof de=="string")return Yt(fe,de);const pe=ve[Y];return typeof pe=="string"?Yt(fe,pe):typeof pe=="number"?Yt(fe,String(pe)):!1}}),k=w(()=>{if(e.remote)return Q.value;{const{value:g}=M,{value:T}=v;return!T.length||!e.filterable?g:ri(g,V.value,T,e.childrenField)}});function N(g){const T=e.remote,{value:Y}=$,{value:fe}=x,{value:ve}=z,de=[];return g.forEach(pe=>{if(fe.has(pe))de.push(fe.get(pe));else if(T&&Y.has(pe))de.push(Y.get(pe));else if(ve){const Re=ve(pe);Re&&de.push(Re)}}),de}const I=w(()=>{if(e.multiple){const{value:g}=s;return Array.isArray(g)?N(g):[]}return null}),L=w(()=>{const{value:g}=s;return!e.multiple&&!Array.isArray(g)?g===null?null:N([g])[0]||null:null}),X=Vn(e),{mergedSizeRef:E,mergedDisabledRef:ee,mergedStatusRef:S}=X;function f(g,T){const{onChange:Y,"onUpdate:value":fe,onUpdateValue:ve}=e,{nTriggerFormChange:de,nTriggerFormInput:pe}=X;Y&&ie(Y,g,T),ve&&ie(ve,g,T),fe&&ie(fe,g,T),d.value=g,de(),pe()}function O(g){const{onBlur:T}=e,{nTriggerFormBlur:Y}=X;T&&ie(T,g),Y()}function D(){const{onClear:g}=e;g&&ie(g)}function U(g){const{onFocus:T,showOnFocus:Y}=e,{nTriggerFormFocus:fe}=X;T&&ie(T,g),fe(),Y&&me()}function re(g){const{onSearch:T}=e;T&&ie(T,g)}function ue(g){const{onScroll:T}=e;T&&ie(T,g)}function Se(){var g;const{remote:T,multiple:Y}=e;if(T){const{value:fe}=$;if(Y){const{valueField:ve}=e;(g=I.value)===null||g===void 0||g.forEach(de=>{fe.set(de[ve],de)})}else{const ve=L.value;ve&&fe.set(ve[e.valueField],ve)}}}function oe(g){const{onUpdateShow:T,"onUpdate:show":Y}=e;T&&ie(T,g),Y&&ie(Y,g),h.value=g}function me(){ee.value||(oe(!0),h.value=!0,e.filterable&&te())}function se(){oe(!1)}function P(){v.value="",H.value=_}const Z=j(!1);function Fe(){e.filterable&&(Z.value=!0)}function J(){e.filterable&&(Z.value=!1,c.value||P())}function ge(){ee.value||(c.value?e.filterable?te():se():me())}function Ie(g){var T,Y;!((Y=(T=y.value)===null||T===void 0?void 0:T.selfRef)===null||Y===void 0)&&Y.contains(g.relatedTarget)||(u.value=!1,O(g),se())}function ze(g){U(g),u.value=!0}function Pe(g){u.value=!0}function Le(g){var T;!((T=b.value)===null||T===void 0)&&T.$el.contains(g.relatedTarget)||(u.value=!1,O(g),se())}function Ee(){var g;(g=b.value)===null||g===void 0||g.focus(),se()}function ke(g){var T;c.value&&(!((T=b.value)===null||T===void 0)&&T.$el.contains(Xn(g))||se())}function F(g){if(!Array.isArray(g))return[];if(z.value)return Array.from(g);{const{remote:T}=e,{value:Y}=x;if(T){const{value:fe}=$;return g.filter(ve=>Y.has(ve)||fe.has(ve))}else return g.filter(fe=>Y.has(fe))}}function q(g){xe(g.rawNode)}function xe(g){if(ee.value)return;const{tag:T,remote:Y,clearFilterAfterSelect:fe,valueField:ve}=e;if(T&&!Y){const{value:de}=H,pe=de[0]||null;if(pe){const Re=B.value;Re.length?Re.push(pe):B.value=[pe],H.value=_}}if(Y&&$.value.set(g[ve],g),e.multiple){const de=F(s.value),pe=de.findIndex(Re=>Re===g[ve]);if(~pe){if(de.splice(pe,1),T&&!Y){const Re=je(g[ve]);~Re&&(B.value.splice(Re,1),fe&&(v.value=""))}}else de.push(g[ve]),fe&&(v.value="");f(de,N(de))}else{if(T&&!Y){const de=je(g[ve]);~de?B.value=[B.value[de]]:B.value=_}G(),se(),f(g[ve],g)}}function je(g){return B.value.findIndex(Y=>Y[e.valueField]===g)}function Je(g){c.value||me();const{value:T}=g.target;v.value=T;const{tag:Y,remote:fe}=e;if(re(T),Y&&!fe){if(!T){H.value=_;return}const{onCreate:ve}=e,de=ve?ve(T):{[e.labelField]:T,[e.valueField]:T},{valueField:pe,labelField:Re}=e;Q.value.some(Oe=>Oe[pe]===de[pe]||Oe[Re]===de[Re])||B.value.some(Oe=>Oe[pe]===de[pe]||Oe[Re]===de[Re])?H.value=_:H.value=[de]}}function Ke(g){g.stopPropagation();const{multiple:T}=e;!T&&e.filterable&&se(),D(),T?f([],[]):f(null,null)}function Me(g){!et(g,"action")&&!et(g,"empty")&&g.preventDefault()}function He(g){ue(g)}function Ne(g){var T,Y,fe,ve,de;if(!e.keyboard){g.preventDefault();return}switch(g.key){case" ":if(e.filterable)break;g.preventDefault();case"Enter":if(!(!((T=b.value)===null||T===void 0)&&T.isComposing)){if(c.value){const pe=(Y=y.value)===null||Y===void 0?void 0:Y.getPendingTmNode();pe?q(pe):e.filterable||(se(),G())}else if(me(),e.tag&&Z.value){const pe=H.value[0];if(pe){const Re=pe[e.valueField],{value:Oe}=s;e.multiple&&Array.isArray(Oe)&&Oe.some(Qe=>Qe===Re)||xe(pe)}}}g.preventDefault();break;case"ArrowUp":if(g.preventDefault(),e.loading)return;c.value&&((fe=y.value)===null||fe===void 0||fe.prev());break;case"ArrowDown":if(g.preventDefault(),e.loading)return;c.value?(ve=y.value)===null||ve===void 0||ve.next():me();break;case"Escape":c.value&&(Zn(g),se()),(de=b.value)===null||de===void 0||de.focus();break}}function G(){var g;(g=b.value)===null||g===void 0||g.focus()}function te(){var g;(g=b.value)===null||g===void 0||g.focusInput()}function Ce(){var g;c.value&&((g=m.value)===null||g===void 0||g.syncPosition())}Se(),Ge(ae(e,"options"),Se);const K={focus:()=>{var g;(g=b.value)===null||g===void 0||g.focus()},focusInput:()=>{var g;(g=b.value)===null||g===void 0||g.focusInput()},blur:()=>{var g;(g=b.value)===null||g===void 0||g.blur()},blurInput:()=>{var g;(g=b.value)===null||g===void 0||g.blurInput()}},be=w(()=>{const{self:{menuBoxShadow:g}}=a.value;return{"--n-menu-box-shadow":g}}),we=r?at("select",void 0,be,e):void 0;return Object.assign(Object.assign({},K),{mergedStatus:S,mergedClsPrefix:t,mergedBordered:o,namespace:n,treeMate:p,isMounted:qn(),triggerRef:b,menuRef:y,pattern:v,uncontrolledShow:h,mergedShow:c,adjustedTo:Ft(e),uncontrolledValue:d,mergedValue:s,followerRef:m,localizedPlaceholder:A,selectedOption:L,selectedOptions:I,mergedSize:E,mergedDisabled:ee,focused:u,activeWithoutMenuOpen:Z,inlineThemeDisabled:r,onTriggerInputFocus:Fe,onTriggerInputBlur:J,handleTriggerOrMenuResize:Ce,handleMenuFocus:Pe,handleMenuBlur:Le,handleMenuTabOut:Ee,handleTriggerClick:ge,handleToggle:q,handleDeleteOption:xe,handlePatternInput:Je,handleClear:Ke,handleTriggerBlur:Ie,handleTriggerFocus:ze,handleKeydown:Ne,handleMenuAfterLeave:P,handleMenuClickOutside:ke,handleMenuScroll:He,handleMenuKeydown:Ne,handleMenuMousedown:Me,mergedTheme:a,cssVars:r?void 0:be,themeClass:we==null?void 0:we.themeClass,onRender:we==null?void 0:we.onRender})},render(){return i("div",{class:`${this.mergedClsPrefix}-select`},i(tn,null,{default:()=>[i(on,null,{default:()=>i(ni,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,t;return[(t=(e=this.$slots).arrow)===null||t===void 0?void 0:t.call(e)]}})}),i(nn,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===Ft.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>i(Tt,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,t,o;return this.mergedShow||this.displayDirective==="show"?((e=this.onRender)===null||e===void 0||e.call(this),Zo(i(cn,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(t=this.menuProps)===null||t===void 0?void 0:t.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:"medium",renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(o=this.menuProps)===null||o===void 0?void 0:o.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var n,r;return[(r=(n=this.$slots).empty)===null||r===void 0?void 0:r.call(n)]},action:()=>{var n,r;return[(r=(n=this.$slots).action)===null||r===void 0?void 0:r.call(n)]}}),this.displayDirective==="show"?[[Gn,this.mergedShow],[yo,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[yo,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),bi={itemPaddingSmall:"0 4px",itemMarginSmall:"0 0 0 8px",itemMarginSmallRtl:"0 8px 0 0",itemPaddingMedium:"0 4px",itemMarginMedium:"0 0 0 8px",itemMarginMediumRtl:"0 8px 0 0",itemPaddingLarge:"0 4px",itemMarginLarge:"0 0 0 8px",itemMarginLargeRtl:"0 8px 0 0",buttonIconSizeSmall:"14px",buttonIconSizeMedium:"16px",buttonIconSizeLarge:"18px",inputWidthSmall:"60px",selectWidthSmall:"unset",inputMarginSmall:"0 0 0 8px",inputMarginSmallRtl:"0 8px 0 0",selectMarginSmall:"0 0 0 8px",prefixMarginSmall:"0 8px 0 0",suffixMarginSmall:"0 0 0 8px",inputWidthMedium:"60px",selectWidthMedium:"unset",inputMarginMedium:"0 0 0 8px",inputMarginMediumRtl:"0 8px 0 0",selectMarginMedium:"0 0 0 8px",prefixMarginMedium:"0 8px 0 0",suffixMarginMedium:"0 0 0 8px",inputWidthLarge:"60px",selectWidthLarge:"unset",inputMarginLarge:"0 0 0 8px",inputMarginLargeRtl:"0 8px 0 0",selectMarginLarge:"0 0 0 8px",prefixMarginLarge:"0 8px 0 0",suffixMarginLarge:"0 0 0 8px"},mi=e=>{const{textColor2:t,primaryColor:o,primaryColorHover:n,primaryColorPressed:r,inputColorDisabled:a,textColorDisabled:d,borderColor:l,borderRadius:s,fontSizeTiny:u,fontSizeSmall:v,fontSizeMedium:p,heightTiny:x,heightSmall:h,heightMedium:c}=e;return Object.assign(Object.assign({},bi),{buttonColor:"#0000",buttonColorHover:"#0000",buttonColorPressed:"#0000",buttonBorder:`1px solid ${l}`,buttonBorderHover:`1px solid ${l}`,buttonBorderPressed:`1px solid ${l}`,buttonIconColor:t,buttonIconColorHover:t,buttonIconColorPressed:t,itemTextColor:t,itemTextColorHover:n,itemTextColorPressed:r,itemTextColorActive:o,itemTextColorDisabled:d,itemColor:"#0000",itemColorHover:"#0000",itemColorPressed:"#0000",itemColorActive:"#0000",itemColorActiveHover:"#0000",itemColorDisabled:a,itemBorder:"1px solid #0000",itemBorderHover:"1px solid #0000",itemBorderPressed:"1px solid #0000",itemBorderActive:`1px solid ${o}`,itemBorderDisabled:`1px solid ${l}`,itemBorderRadius:s,itemSizeSmall:x,itemSizeMedium:h,itemSizeLarge:c,itemFontSizeSmall:u,itemFontSizeMedium:v,itemFontSizeLarge:p,jumperFontSizeSmall:u,jumperFontSizeMedium:v,jumperFontSizeLarge:p,jumperTextColor:t,jumperTextColorDisabled:d})},xi=dt({name:"Pagination",common:it,peers:{Select:vn,Input:mr,Popselect:vo},self:mi}),gn=xi;function yi(e,t,o){let n=!1,r=!1,a=1,d=t;if(t===1)return{hasFastBackward:!1,hasFastForward:!1,fastForwardTo:d,fastBackwardTo:a,items:[{type:"page",label:1,active:e===1,mayBeFastBackward:!1,mayBeFastForward:!1}]};if(t===2)return{hasFastBackward:!1,hasFastForward:!1,fastForwardTo:d,fastBackwardTo:a,items:[{type:"page",label:1,active:e===1,mayBeFastBackward:!1,mayBeFastForward:!1},{type:"page",label:2,active:e===2,mayBeFastBackward:!0,mayBeFastForward:!1}]};const l=1,s=t;let u=e,v=e;const p=(o-5)/2;v+=Math.ceil(p),v=Math.min(Math.max(v,l+o-3),s-2),u-=Math.floor(p),u=Math.max(Math.min(u,s-o+3),l+2);let x=!1,h=!1;u>l+2&&(x=!0),v<s-2&&(h=!0);const c=[];c.push({type:"page",label:1,active:e===1,mayBeFastBackward:!1,mayBeFastForward:!1}),x?(n=!0,a=u-1,c.push({type:"fast-backward",active:!1,label:void 0,options:_o(l+1,u-1)})):s>=l+1&&c.push({type:"page",label:l+1,mayBeFastBackward:!0,mayBeFastForward:!1,active:e===l+1});for(let b=u;b<=v;++b)c.push({type:"page",label:b,mayBeFastBackward:!1,mayBeFastForward:!1,active:e===b});return h?(r=!0,d=v+1,c.push({type:"fast-forward",active:!1,label:void 0,options:_o(v+1,s-1)})):v===s-2&&c[c.length-1].label!==s-1&&c.push({type:"page",mayBeFastForward:!0,mayBeFastBackward:!1,label:s-1,active:e===s-1}),c[c.length-1].label!==s&&c.push({type:"page",mayBeFastForward:!1,mayBeFastBackward:!1,label:s,active:e===s}),{hasFastBackward:n,hasFastForward:r,fastBackwardTo:a,fastForwardTo:d,items:c}}function _o(e,t){const o=[];for(let n=e;n<=t;++n)o.push({label:`${n}`,value:n});return o}const No=`
|
|
378
|
-
background: var(--n-item-color-hover);
|
|
379
|
-
color: var(--n-item-text-color-hover);
|
|
380
|
-
border: var(--n-item-border-hover);
|
|
381
|
-
`,Lo=[W("button",`
|
|
382
|
-
background: var(--n-button-color-hover);
|
|
383
|
-
border: var(--n-button-border-hover);
|
|
384
|
-
color: var(--n-button-icon-color-hover);
|
|
385
|
-
`)],Ci=R("pagination",`
|
|
386
|
-
display: flex;
|
|
387
|
-
vertical-align: middle;
|
|
388
|
-
font-size: var(--n-item-font-size);
|
|
389
|
-
flex-wrap: nowrap;
|
|
390
|
-
`,[R("pagination-prefix",`
|
|
391
|
-
display: flex;
|
|
392
|
-
align-items: center;
|
|
393
|
-
margin: var(--n-prefix-margin);
|
|
394
|
-
`),R("pagination-suffix",`
|
|
395
|
-
display: flex;
|
|
396
|
-
align-items: center;
|
|
397
|
-
margin: var(--n-suffix-margin);
|
|
398
|
-
`),ne("> *:not(:first-child)",`
|
|
399
|
-
margin: var(--n-item-margin);
|
|
400
|
-
`),R("select",`
|
|
401
|
-
width: var(--n-select-width);
|
|
402
|
-
`),ne("&.transition-disabled",[R("pagination-item","transition: none!important;")]),R("pagination-quick-jumper",`
|
|
403
|
-
white-space: nowrap;
|
|
404
|
-
display: flex;
|
|
405
|
-
color: var(--n-jumper-text-color);
|
|
406
|
-
transition: color .3s var(--n-bezier);
|
|
407
|
-
align-items: center;
|
|
408
|
-
font-size: var(--n-jumper-font-size);
|
|
409
|
-
`,[R("input",`
|
|
410
|
-
margin: var(--n-input-margin);
|
|
411
|
-
width: var(--n-input-width);
|
|
412
|
-
`)]),R("pagination-item",`
|
|
413
|
-
position: relative;
|
|
414
|
-
cursor: pointer;
|
|
415
|
-
user-select: none;
|
|
416
|
-
-webkit-user-select: none;
|
|
417
|
-
display: flex;
|
|
418
|
-
align-items: center;
|
|
419
|
-
justify-content: center;
|
|
420
|
-
box-sizing: border-box;
|
|
421
|
-
min-width: var(--n-item-size);
|
|
422
|
-
height: var(--n-item-size);
|
|
423
|
-
padding: var(--n-item-padding);
|
|
424
|
-
background-color: var(--n-item-color);
|
|
425
|
-
color: var(--n-item-text-color);
|
|
426
|
-
border-radius: var(--n-item-border-radius);
|
|
427
|
-
border: var(--n-item-border);
|
|
428
|
-
fill: var(--n-button-icon-color);
|
|
429
|
-
transition:
|
|
430
|
-
color .3s var(--n-bezier),
|
|
431
|
-
border-color .3s var(--n-bezier),
|
|
432
|
-
background-color .3s var(--n-bezier),
|
|
433
|
-
fill .3s var(--n-bezier);
|
|
434
|
-
`,[W("button",`
|
|
435
|
-
background: var(--n-button-color);
|
|
436
|
-
color: var(--n-button-icon-color);
|
|
437
|
-
border: var(--n-button-border);
|
|
438
|
-
padding: 0;
|
|
439
|
-
`,[R("base-icon",`
|
|
440
|
-
font-size: var(--n-button-icon-size);
|
|
441
|
-
`)]),Ue("disabled",[W("hover",No,Lo),ne("&:hover",No,Lo),ne("&:active",`
|
|
442
|
-
background: var(--n-item-color-pressed);
|
|
443
|
-
color: var(--n-item-text-color-pressed);
|
|
444
|
-
border: var(--n-item-border-pressed);
|
|
445
|
-
`,[W("button",`
|
|
446
|
-
background: var(--n-button-color-pressed);
|
|
447
|
-
border: var(--n-button-border-pressed);
|
|
448
|
-
color: var(--n-button-icon-color-pressed);
|
|
449
|
-
`)]),W("active",`
|
|
450
|
-
background: var(--n-item-color-active);
|
|
451
|
-
color: var(--n-item-text-color-active);
|
|
452
|
-
border: var(--n-item-border-active);
|
|
453
|
-
`,[ne("&:hover",`
|
|
454
|
-
background: var(--n-item-color-active-hover);
|
|
455
|
-
`)])]),W("disabled",`
|
|
456
|
-
cursor: not-allowed;
|
|
457
|
-
color: var(--n-item-text-color-disabled);
|
|
458
|
-
`,[W("active, button",`
|
|
459
|
-
background-color: var(--n-item-color-disabled);
|
|
460
|
-
border: var(--n-item-border-disabled);
|
|
461
|
-
`)])]),W("disabled",`
|
|
462
|
-
cursor: not-allowed;
|
|
463
|
-
`,[R("pagination-quick-jumper",`
|
|
464
|
-
color: var(--n-jumper-text-color-disabled);
|
|
465
|
-
`)]),W("simple",`
|
|
466
|
-
display: flex;
|
|
467
|
-
align-items: center;
|
|
468
|
-
flex-wrap: nowrap;
|
|
469
|
-
`,[R("pagination-quick-jumper",[R("input",`
|
|
470
|
-
margin: 0;
|
|
471
|
-
`)])])]),wi=Object.assign(Object.assign({},Ae.props),{simple:Boolean,page:Number,defaultPage:{type:Number,default:1},itemCount:Number,pageCount:Number,defaultPageCount:{type:Number,default:1},showSizePicker:Boolean,pageSize:Number,defaultPageSize:Number,pageSizes:{type:Array,default(){return[10]}},showQuickJumper:Boolean,size:{type:String,default:"medium"},disabled:Boolean,pageSlot:{type:Number,default:9},selectProps:Object,prev:Function,next:Function,goto:Function,prefix:Function,suffix:Function,label:Function,displayOrder:{type:Array,default:["pages","size-picker","quick-jumper"]},to:Ft.propTo,"onUpdate:page":[Function,Array],onUpdatePage:[Function,Array],"onUpdate:pageSize":[Function,Array],onUpdatePageSize:[Function,Array],onPageSizeChange:[Function,Array],onChange:[Function,Array]}),Si=he({name:"Pagination",props:wi,setup(e){const{mergedComponentPropsRef:t,mergedClsPrefixRef:o,inlineThemeDisabled:n,mergedRtlRef:r}=tt(e),a=Ae("Pagination","-pagination",Ci,gn,e,o),{localeRef:d}=uo("Pagination"),l=j(null),s=j(e.defaultPage),v=j((()=>{const{defaultPageSize:P}=e;if(P!==void 0)return P;const Z=e.pageSizes[0];return typeof Z=="number"?Z:Z.value||10})()),p=rt(ae(e,"page"),s),x=rt(ae(e,"pageSize"),v),h=w(()=>{const{itemCount:P}=e;if(P!==void 0)return Math.max(1,Math.ceil(P/x.value));const{pageCount:Z}=e;return Z!==void 0?Math.max(Z,1):1}),c=j("");ut(()=>{e.simple,c.value=String(p.value)});const b=j(!1),m=j(!1),y=j(!1),C=j(!1),A=()=>{e.disabled||(b.value=!0,X())},Q=()=>{e.disabled||(b.value=!1,X())},_=()=>{m.value=!0,X()},B=()=>{m.value=!1,X()},H=P=>{E(P)},$=w(()=>yi(p.value,h.value,e.pageSlot));ut(()=>{$.value.hasFastBackward?$.value.hasFastForward||(b.value=!1,y.value=!1):(m.value=!1,C.value=!1)});const z=w(()=>{const P=d.value.selectionSuffix;return e.pageSizes.map(Z=>typeof Z=="number"?{label:`${Z} / ${P}`,value:Z}:Z)}),M=w(()=>{var P,Z;return((Z=(P=t==null?void 0:t.value)===null||P===void 0?void 0:P.Pagination)===null||Z===void 0?void 0:Z.inputSize)||Po(e.size)}),V=w(()=>{var P,Z;return((Z=(P=t==null?void 0:t.value)===null||P===void 0?void 0:P.Pagination)===null||Z===void 0?void 0:Z.selectSize)||Po(e.size)}),k=w(()=>(p.value-1)*x.value),N=w(()=>{const P=p.value*x.value-1,{itemCount:Z}=e;return Z!==void 0&&P>Z-1?Z-1:P}),I=w(()=>{const{itemCount:P}=e;return P!==void 0?P:(e.pageCount||1)*x.value}),L=Go("Pagination",r,o),X=()=>{nt(()=>{var P;const{value:Z}=l;Z&&(Z.classList.add("transition-disabled"),(P=l.value)===null||P===void 0||P.offsetWidth,Z.classList.remove("transition-disabled"))})};function E(P){if(P===p.value)return;const{"onUpdate:page":Z,onUpdatePage:Fe,onChange:J,simple:ge}=e;Z&&ie(Z,P),Fe&&ie(Fe,P),J&&ie(J,P),s.value=P,ge&&(c.value=String(P))}function ee(P){if(P===x.value)return;const{"onUpdate:pageSize":Z,onUpdatePageSize:Fe,onPageSizeChange:J}=e;Z&&ie(Z,P),Fe&&ie(Fe,P),J&&ie(J,P),v.value=P,h.value<p.value&&E(h.value)}function S(){if(e.disabled)return;const P=Math.min(p.value+1,h.value);E(P)}function f(){if(e.disabled)return;const P=Math.max(p.value-1,1);E(P)}function O(){if(e.disabled)return;const P=Math.min($.value.fastForwardTo,h.value);E(P)}function D(){if(e.disabled)return;const P=Math.max($.value.fastBackwardTo,1);E(P)}function U(P){ee(P)}function re(){const P=parseInt(c.value);Number.isNaN(P)||(E(Math.max(1,Math.min(P,h.value))),e.simple||(c.value=""))}function ue(){re()}function Se(P){if(!e.disabled)switch(P.type){case"page":E(P.label);break;case"fast-backward":D();break;case"fast-forward":O();break}}function oe(P){c.value=P.replace(/\D+/g,"")}ut(()=>{p.value,x.value,X()});const me=w(()=>{const{size:P}=e,{self:{buttonBorder:Z,buttonBorderHover:Fe,buttonBorderPressed:J,buttonIconColor:ge,buttonIconColorHover:Ie,buttonIconColorPressed:ze,itemTextColor:Pe,itemTextColorHover:Le,itemTextColorPressed:Ee,itemTextColorActive:ke,itemTextColorDisabled:F,itemColor:q,itemColorHover:xe,itemColorPressed:je,itemColorActive:Je,itemColorActiveHover:Ke,itemColorDisabled:Me,itemBorder:He,itemBorderHover:Ne,itemBorderPressed:G,itemBorderActive:te,itemBorderDisabled:Ce,itemBorderRadius:K,jumperTextColor:be,jumperTextColorDisabled:we,buttonColor:g,buttonColorHover:T,buttonColorPressed:Y,[ce("itemPadding",P)]:fe,[ce("itemMargin",P)]:ve,[ce("inputWidth",P)]:de,[ce("selectWidth",P)]:pe,[ce("inputMargin",P)]:Re,[ce("selectMargin",P)]:Oe,[ce("jumperFontSize",P)]:Qe,[ce("prefixMargin",P)]:Be,[ce("suffixMargin",P)]:_e,[ce("itemSize",P)]:ht,[ce("buttonIconSize",P)]:pt,[ce("itemFontSize",P)]:vt,[`${ce("itemMargin",P)}Rtl`]:gt,[`${ce("inputMargin",P)}Rtl`]:bt},common:{cubicBezierEaseInOut:mt}}=a.value;return{"--n-prefix-margin":Be,"--n-suffix-margin":_e,"--n-item-font-size":vt,"--n-select-width":pe,"--n-select-margin":Oe,"--n-input-width":de,"--n-input-margin":Re,"--n-input-margin-rtl":bt,"--n-item-size":ht,"--n-item-text-color":Pe,"--n-item-text-color-disabled":F,"--n-item-text-color-hover":Le,"--n-item-text-color-active":ke,"--n-item-text-color-pressed":Ee,"--n-item-color":q,"--n-item-color-hover":xe,"--n-item-color-disabled":Me,"--n-item-color-active":Je,"--n-item-color-active-hover":Ke,"--n-item-color-pressed":je,"--n-item-border":He,"--n-item-border-hover":Ne,"--n-item-border-disabled":Ce,"--n-item-border-active":te,"--n-item-border-pressed":G,"--n-item-padding":fe,"--n-item-border-radius":K,"--n-bezier":mt,"--n-jumper-font-size":Qe,"--n-jumper-text-color":be,"--n-jumper-text-color-disabled":we,"--n-item-margin":ve,"--n-item-margin-rtl":gt,"--n-button-icon-size":pt,"--n-button-icon-color":ge,"--n-button-icon-color-hover":Ie,"--n-button-icon-color-pressed":ze,"--n-button-color-hover":T,"--n-button-color":g,"--n-button-color-pressed":Y,"--n-button-border":Z,"--n-button-border-hover":Fe,"--n-button-border-pressed":J}}),se=n?at("pagination",w(()=>{let P="";const{size:Z}=e;return P+=Z[0],P}),me,e):void 0;return{rtlEnabled:L,mergedClsPrefix:o,locale:d,selfRef:l,mergedPage:p,pageItems:w(()=>$.value.items),mergedItemCount:I,jumperValue:c,pageSizeOptions:z,mergedPageSize:x,inputSize:M,selectSize:V,mergedTheme:a,mergedPageCount:h,startIndex:k,endIndex:N,showFastForwardMenu:y,showFastBackwardMenu:C,fastForwardActive:b,fastBackwardActive:m,handleMenuSelect:H,handleFastForwardMouseenter:A,handleFastForwardMouseleave:Q,handleFastBackwardMouseenter:_,handleFastBackwardMouseleave:B,handleJumperInput:oe,handleBackwardClick:f,handleForwardClick:S,handlePageItemClick:Se,handleSizePickerChange:U,handleQuickJumperChange:ue,cssVars:n?void 0:me,themeClass:se==null?void 0:se.themeClass,onRender:se==null?void 0:se.onRender}},render(){const{$slots:e,mergedClsPrefix:t,disabled:o,cssVars:n,mergedPage:r,mergedPageCount:a,pageItems:d,showSizePicker:l,showQuickJumper:s,mergedTheme:u,locale:v,inputSize:p,selectSize:x,mergedPageSize:h,pageSizeOptions:c,jumperValue:b,simple:m,prev:y,next:C,prefix:A,suffix:Q,label:_,goto:B,handleJumperInput:H,handleSizePickerChange:$,handleBackwardClick:z,handlePageItemClick:M,handleForwardClick:V,handleQuickJumperChange:k,onRender:N}=this;N==null||N();const I=e.prefix||A,L=e.suffix||Q,X=y||e.prev,E=C||e.next,ee=_||e.label;return i("div",{ref:"selfRef",class:[`${t}-pagination`,this.themeClass,this.rtlEnabled&&`${t}-pagination--rtl`,o&&`${t}-pagination--disabled`,m&&`${t}-pagination--simple`],style:n},I?i("div",{class:`${t}-pagination-prefix`},I({page:r,pageSize:h,pageCount:a,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount})):null,this.displayOrder.map(S=>{switch(S){case"pages":return i(st,null,i("div",{class:[`${t}-pagination-item`,!X&&`${t}-pagination-item--button`,(r<=1||r>a||o)&&`${t}-pagination-item--disabled`],onClick:z},X?X({page:r,pageSize:h,pageCount:a,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount}):i(Ve,{clsPrefix:t},{default:()=>this.rtlEnabled?i(To,null):i(zo,null)})),m?i(st,null,i("div",{class:`${t}-pagination-quick-jumper`},i(wo,{value:b,onUpdateValue:H,size:p,placeholder:"",disabled:o,theme:u.peers.Input,themeOverrides:u.peerOverrides.Input,onChange:k}))," / ",a):d.map((f,O)=>{let D,U,re;const{type:ue}=f;switch(ue){case"page":const oe=f.label;ee?D=ee({type:"page",node:oe,active:f.active}):D=oe;break;case"fast-forward":const me=this.fastForwardActive?i(Ve,{clsPrefix:t},{default:()=>this.rtlEnabled?i(Mo,null):i(Oo,null)}):i(Ve,{clsPrefix:t},{default:()=>i(Bo,null)});ee?D=ee({type:"fast-forward",node:me,active:this.fastForwardActive||this.showFastForwardMenu}):D=me,U=this.handleFastForwardMouseenter,re=this.handleFastForwardMouseleave;break;case"fast-backward":const se=this.fastBackwardActive?i(Ve,{clsPrefix:t},{default:()=>this.rtlEnabled?i(Oo,null):i(Mo,null)}):i(Ve,{clsPrefix:t},{default:()=>i(Bo,null)});ee?D=ee({type:"fast-backward",node:se,active:this.fastBackwardActive||this.showFastBackwardMenu}):D=se,U=this.handleFastBackwardMouseenter,re=this.handleFastBackwardMouseleave;break}const Se=i("div",{key:O,class:[`${t}-pagination-item`,f.active&&`${t}-pagination-item--active`,ue!=="page"&&(ue==="fast-backward"&&this.showFastBackwardMenu||ue==="fast-forward"&&this.showFastForwardMenu)&&`${t}-pagination-item--hover`,o&&`${t}-pagination-item--disabled`,ue==="page"&&`${t}-pagination-item--clickable`],onClick:()=>{M(f)},onMouseenter:U,onMouseleave:re},D);if(ue==="page"&&!f.mayBeFastBackward&&!f.mayBeFastForward)return Se;{const oe=f.type==="page"?f.mayBeFastBackward?"fast-backward":"fast-forward":f.type;return i(ui,{to:this.to,key:oe,disabled:o,trigger:"hover",virtualScroll:!0,style:{width:"60px"},theme:u.peers.Popselect,themeOverrides:u.peerOverrides.Popselect,builtinThemeOverrides:{peers:{InternalSelectMenu:{height:"calc(var(--n-option-height) * 4.6)"}}},nodeProps:()=>({style:{justifyContent:"center"}}),show:ue==="page"?!1:ue==="fast-backward"?this.showFastBackwardMenu:this.showFastForwardMenu,onUpdateShow:me=>{ue!=="page"&&(me?ue==="fast-backward"?this.showFastBackwardMenu=me:this.showFastForwardMenu=me:(this.showFastBackwardMenu=!1,this.showFastForwardMenu=!1))},options:f.type!=="page"?f.options:[],onUpdateValue:this.handleMenuSelect,scrollable:!0,showCheckmark:!1},{default:()=>Se})}}),i("div",{class:[`${t}-pagination-item`,!E&&`${t}-pagination-item--button`,{[`${t}-pagination-item--disabled`]:r<1||r>=a||o}],onClick:V},E?E({page:r,pageSize:h,pageCount:a,itemCount:this.mergedItemCount,startIndex:this.startIndex,endIndex:this.endIndex}):i(Ve,{clsPrefix:t},{default:()=>this.rtlEnabled?i(zo,null):i(To,null)})));case"size-picker":return!m&&l?i(gi,Object.assign({consistentMenuWidth:!1,placeholder:"",showCheckmark:!1,to:this.to},this.selectProps,{size:x,options:c,value:h,disabled:o,theme:u.peers.Select,themeOverrides:u.peerOverrides.Select,onUpdateValue:$})):null;case"quick-jumper":return!m&&s?i("div",{class:`${t}-pagination-quick-jumper`},B?B():$t(this.$slots.goto,()=>[v.goto]),i(wo,{value:b,onUpdateValue:H,size:p,placeholder:"",disabled:o,theme:u.peers.Input,themeOverrides:u.peerOverrides.Input,onChange:k})):null;default:return null}}),L?i("div",{class:`${t}-pagination-suffix`},L({page:r,pageSize:h,pageCount:a,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount})):null)}}),Ri={padding:"4px 0",optionIconSizeSmall:"14px",optionIconSizeMedium:"16px",optionIconSizeLarge:"16px",optionIconSizeHuge:"18px",optionSuffixWidthSmall:"14px",optionSuffixWidthMedium:"14px",optionSuffixWidthLarge:"16px",optionSuffixWidthHuge:"16px",optionIconSuffixWidthSmall:"32px",optionIconSuffixWidthMedium:"32px",optionIconSuffixWidthLarge:"36px",optionIconSuffixWidthHuge:"36px",optionPrefixWidthSmall:"14px",optionPrefixWidthMedium:"14px",optionPrefixWidthLarge:"16px",optionPrefixWidthHuge:"16px",optionIconPrefixWidthSmall:"36px",optionIconPrefixWidthMedium:"36px",optionIconPrefixWidthLarge:"40px",optionIconPrefixWidthHuge:"40px"},ki=e=>{const{primaryColor:t,textColor2:o,dividerColor:n,hoverColor:r,popoverColor:a,invertedColor:d,borderRadius:l,fontSizeSmall:s,fontSizeMedium:u,fontSizeLarge:v,fontSizeHuge:p,heightSmall:x,heightMedium:h,heightLarge:c,heightHuge:b,textColor3:m,opacityDisabled:y}=e;return Object.assign(Object.assign({},Ri),{optionHeightSmall:x,optionHeightMedium:h,optionHeightLarge:c,optionHeightHuge:b,borderRadius:l,fontSizeSmall:s,fontSizeMedium:u,fontSizeLarge:v,fontSizeHuge:p,optionTextColor:o,optionTextColorHover:o,optionTextColorActive:t,optionTextColorChildActive:t,color:a,dividerColor:n,suffixColor:o,prefixColor:o,optionColorHover:r,optionColorActive:ye(t,{alpha:.1}),groupHeaderTextColor:m,optionTextColorInverted:"#BBB",optionTextColorHoverInverted:"#FFF",optionTextColorActiveInverted:"#FFF",optionTextColorChildActiveInverted:"#FFF",colorInverted:d,dividerColorInverted:"#BBB",suffixColorInverted:"#BBB",prefixColorInverted:"#BBB",optionColorHoverInverted:t,optionColorActiveInverted:t,groupHeaderTextColorInverted:"#AAA",optionOpacityDisabled:y})},Pi=dt({name:"Dropdown",common:it,peers:{Popover:It},self:ki}),bn=Pi,Fi={thPaddingSmall:"8px",thPaddingMedium:"12px",thPaddingLarge:"12px",tdPaddingSmall:"8px",tdPaddingMedium:"12px",tdPaddingLarge:"12px",sorterSize:"15px",resizableContainerSize:"8px",resizableSize:"2px",filterSize:"15px",paginationMargin:"12px 0 0 0",emptyPadding:"48px 0",actionPadding:"8px 12px",actionButtonMargin:"0 8px 0 0"},zi=e=>{const{cardColor:t,modalColor:o,popoverColor:n,textColor2:r,textColor1:a,tableHeaderColor:d,tableColorHover:l,iconColor:s,primaryColor:u,fontWeightStrong:v,borderRadius:p,lineHeight:x,fontSizeSmall:h,fontSizeMedium:c,fontSizeLarge:b,dividerColor:m,heightSmall:y,opacityDisabled:C,tableColorStriped:A}=e;return Object.assign(Object.assign({},Fi),{actionDividerColor:m,lineHeight:x,borderRadius:p,fontSizeSmall:h,fontSizeMedium:c,fontSizeLarge:b,borderColor:$e(t,m),tdColorHover:$e(t,l),tdColorStriped:$e(t,A),thColor:$e(t,d),thColorHover:$e($e(t,d),l),tdColor:t,tdTextColor:r,thTextColor:a,thFontWeight:v,thButtonColorHover:l,thIconColor:s,thIconColorActive:u,borderColorModal:$e(o,m),tdColorHoverModal:$e(o,l),tdColorStripedModal:$e(o,A),thColorModal:$e(o,d),thColorHoverModal:$e($e(o,d),l),tdColorModal:o,borderColorPopover:$e(n,m),tdColorHoverPopover:$e(n,l),tdColorStripedPopover:$e(n,A),thColorPopover:$e(n,d),thColorHoverPopover:$e($e(n,d),l),tdColorPopover:n,boxShadowBefore:"inset -12px 0 8px -12px rgba(0, 0, 0, .18)",boxShadowAfter:"inset 12px 0 8px -12px rgba(0, 0, 0, .18)",loadingColor:u,loadingSize:y,opacityLoading:C})},Mi=dt({name:"DataTable",common:it,peers:{Button:Jn,Checkbox:xr,Radio:yr,Pagination:gn,Scrollbar:qo,Empty:Qo,Popover:It,Ellipsis:Cr,Dropdown:bn},self:zi}),Oi=Mi,Ti=he({name:"PerformantEllipsis",props:wr,inheritAttrs:!1,setup(e,{attrs:t,slots:o}){const n=j(!1),r=Qn();return Yn("-ellipsis",Sr,r),{mouseEntered:n,renderTrigger:()=>{const{lineClamp:d}=e,l=r.value;return i("span",Object.assign({},kt(t,{class:[`${l}-ellipsis`,d!==void 0?Rr(l):void 0,e.expandTrigger==="click"?kr(l,"pointer"):void 0],style:d===void 0?{textOverflow:"ellipsis"}:{"-webkit-line-clamp":d}}),{onMouseenter:()=>{n.value=!0}}),d?o:i("span",null,o))}}},render(){return this.mouseEntered?i(fo,kt({},this.$attrs,this.$props),this.$slots):this.renderTrigger()}}),Bi=he({name:"DataTableRenderSorter",props:{render:{type:Function,required:!0},order:{type:[String,Boolean],default:!1}},render(){const{render:e,order:t}=this;return e({order:t})}}),$i=Object.assign(Object.assign({},Ae.props),{onUnstableColumnResize:Function,pagination:{type:[Object,Boolean],default:!1},paginateSinglePage:{type:Boolean,default:!0},minHeight:[Number,String],maxHeight:[Number,String],columns:{type:Array,default:()=>[]},rowClassName:[String,Function],rowProps:Function,rowKey:Function,summary:[Function],data:{type:Array,default:()=>[]},loading:Boolean,bordered:{type:Boolean,default:void 0},bottomBordered:{type:Boolean,default:void 0},striped:Boolean,scrollX:[Number,String],defaultCheckedRowKeys:{type:Array,default:()=>[]},checkedRowKeys:Array,singleLine:{type:Boolean,default:!0},singleColumn:Boolean,size:{type:String,default:"medium"},remote:Boolean,defaultExpandedRowKeys:{type:Array,default:[]},defaultExpandAll:Boolean,expandedRowKeys:Array,stickyExpandedRows:Boolean,virtualScroll:Boolean,tableLayout:{type:String,default:"auto"},allowCheckingNotLoaded:Boolean,cascade:{type:Boolean,default:!0},childrenKey:{type:String,default:"children"},indent:{type:Number,default:16},flexHeight:Boolean,summaryPlacement:{type:String,default:"bottom"},paginationBehaviorOnFilter:{type:String,default:"current"},scrollbarProps:Object,renderCell:Function,renderExpandIcon:Function,spinProps:{type:Object,default:{}},onLoad:Function,"onUpdate:page":[Function,Array],onUpdatePage:[Function,Array],"onUpdate:pageSize":[Function,Array],onUpdatePageSize:[Function,Array],"onUpdate:sorter":[Function,Array],onUpdateSorter:[Function,Array],"onUpdate:filters":[Function,Array],onUpdateFilters:[Function,Array],"onUpdate:checkedRowKeys":[Function,Array],onUpdateCheckedRowKeys:[Function,Array],"onUpdate:expandedRowKeys":[Function,Array],onUpdateExpandedRowKeys:[Function,Array],onScroll:Function,onPageChange:[Function,Array],onPageSizeChange:[Function,Array],onSorterChange:[Function,Array],onFiltersChange:[Function,Array],onCheckedRowKeysChange:[Function,Array]}),Ze=ft("n-data-table"),Ii=he({name:"SortIcon",props:{column:{type:Object,required:!0}},setup(e){const{mergedComponentPropsRef:t}=tt(),{mergedSortStateRef:o,mergedClsPrefixRef:n}=Te(Ze),r=w(()=>o.value.find(s=>s.columnKey===e.column.key)),a=w(()=>r.value!==void 0),d=w(()=>{const{value:s}=r;return s&&a.value?s.order:!1}),l=w(()=>{var s,u;return((u=(s=t==null?void 0:t.value)===null||s===void 0?void 0:s.DataTable)===null||u===void 0?void 0:u.renderSorter)||e.column.renderSorter});return{mergedClsPrefix:n,active:a,mergedSortOrder:d,mergedRenderSorter:l}},render(){const{mergedRenderSorter:e,mergedSortOrder:t,mergedClsPrefix:o}=this,{renderSorterIcon:n}=this.column;return e?i(Bi,{render:e,order:t}):i("span",{class:[`${o}-data-table-sorter`,t==="ascend"&&`${o}-data-table-sorter--asc`,t==="descend"&&`${o}-data-table-sorter--desc`]},n?n({order:t}):i(Ve,{clsPrefix:o},{default:()=>i(_r,null)}))}}),Ai=he({name:"DataTableRenderFilter",props:{render:{type:Function,required:!0},active:{type:Boolean,default:!1},show:{type:Boolean,default:!1}},render(){const{render:e,active:t,show:o}=this;return e({active:t,show:o})}}),mn=40,xn=40;function Eo(e){if(e.type==="selection")return e.width===void 0?mn:Rt(e.width);if(e.type==="expand")return e.width===void 0?xn:Rt(e.width);if(!("children"in e))return typeof e.width=="string"?Rt(e.width):e.width}function _i(e){var t,o;if(e.type==="selection")return Xe((t=e.width)!==null&&t!==void 0?t:mn);if(e.type==="expand")return Xe((o=e.width)!==null&&o!==void 0?o:xn);if(!("children"in e))return Xe(e.width)}function We(e){return e.type==="selection"?"__n_selection__":e.type==="expand"?"__n_expand__":e.key}function Ko(e){return e&&(typeof e=="object"?Object.assign({},e):e)}function Ni(e){return e==="ascend"?1:e==="descend"?-1:0}function Li(e,t,o){return o!==void 0&&(e=Math.min(e,typeof o=="number"?o:parseFloat(o))),t!==void 0&&(e=Math.max(e,typeof t=="number"?t:parseFloat(t))),e}function Ei(e,t){if(t!==void 0)return{width:t,minWidth:t,maxWidth:t};const o=_i(e),{minWidth:n,maxWidth:r}=e;return{width:o,minWidth:Xe(n)||o,maxWidth:Xe(r)}}function Ki(e,t,o){return typeof o=="function"?o(e,t):o||""}function eo(e){return e.filterOptionValues!==void 0||e.filterOptionValue===void 0&&e.defaultFilterOptionValues!==void 0}function to(e){return"children"in e?!1:!!e.sorter}function yn(e){return"children"in e&&e.children.length?!1:!!e.resizable}function Ho(e){return"children"in e?!1:!!e.filter&&(!!e.filterOptions||!!e.renderFilterMenu)}function Do(e){if(e){if(e==="descend")return"ascend"}else return"descend";return!1}function Hi(e,t){return e.sorter===void 0?null:t===null||t.columnKey!==e.key?{columnKey:e.key,sorter:e.sorter,order:Do(!1)}:Object.assign(Object.assign({},t),{order:Do(t.order)})}function Cn(e,t){return t.find(o=>o.columnKey===e.key&&o.order)!==void 0}const Di=he({name:"DataTableFilterMenu",props:{column:{type:Object,required:!0},radioGroupName:{type:String,required:!0},multiple:{type:Boolean,required:!0},value:{type:[Array,String,Number],default:null},options:{type:Array,required:!0},onConfirm:{type:Function,required:!0},onClear:{type:Function,required:!0},onChange:{type:Function,required:!0}},setup(e){const{mergedClsPrefixRef:t,mergedThemeRef:o,localeRef:n}=Te(Ze),r=j(e.value),a=w(()=>{const{value:p}=r;return Array.isArray(p)?p:null}),d=w(()=>{const{value:p}=r;return eo(e.column)?Array.isArray(p)&&p.length&&p[0]||null:Array.isArray(p)?null:p});function l(p){e.onChange(p)}function s(p){e.multiple&&Array.isArray(p)?r.value=p:eo(e.column)&&!Array.isArray(p)?r.value=[p]:r.value=p}function u(){l(r.value),e.onConfirm()}function v(){e.multiple||eo(e.column)?l([]):l(null),e.onClear()}return{mergedClsPrefix:t,mergedTheme:o,locale:n,checkboxGroupValue:a,radioGroupValue:d,handleChange:s,handleConfirmClick:u,handleClearClick:v}},render(){const{mergedTheme:e,locale:t,mergedClsPrefix:o}=this;return i("div",{class:`${o}-data-table-filter-menu`},i(so,null,{default:()=>{const{checkboxGroupValue:n,handleChange:r}=this;return this.multiple?i(Pr,{value:n,class:`${o}-data-table-filter-menu__group`,onUpdateValue:r},{default:()=>this.options.map(a=>i(ho,{key:a.value,theme:e.peers.Checkbox,themeOverrides:e.peerOverrides.Checkbox,value:a.value},{default:()=>a.label}))}):i(Fr,{name:this.radioGroupName,class:`${o}-data-table-filter-menu__group`,value:this.radioGroupValue,onUpdateValue:this.handleChange},{default:()=>this.options.map(a=>i(rn,{key:a.value,value:a.value,theme:e.peers.Radio,themeOverrides:e.peerOverrides.Radio},{default:()=>a.label}))})}}),i("div",{class:`${o}-data-table-filter-menu__action`},i(Co,{size:"tiny",theme:e.peers.Button,themeOverrides:e.peerOverrides.Button,onClick:this.handleClearClick},{default:()=>t.clear}),i(Co,{theme:e.peers.Button,themeOverrides:e.peerOverrides.Button,type:"primary",size:"tiny",onClick:this.handleConfirmClick},{default:()=>t.confirm})))}});function ji(e,t,o){const n=Object.assign({},e);return n[t]=o,n}const Ui=he({name:"DataTableFilterButton",props:{column:{type:Object,required:!0},options:{type:Array,default:()=>[]}},setup(e){const{mergedComponentPropsRef:t}=tt(),{mergedThemeRef:o,mergedClsPrefixRef:n,mergedFilterStateRef:r,filterMenuCssVarsRef:a,paginationBehaviorOnFilterRef:d,doUpdatePage:l,doUpdateFilters:s}=Te(Ze),u=j(!1),v=r,p=w(()=>e.column.filterMultiple!==!1),x=w(()=>{const C=v.value[e.column.key];if(C===void 0){const{value:A}=p;return A?[]:null}return C}),h=w(()=>{const{value:C}=x;return Array.isArray(C)?C.length>0:C!==null}),c=w(()=>{var C,A;return((A=(C=t==null?void 0:t.value)===null||C===void 0?void 0:C.DataTable)===null||A===void 0?void 0:A.renderFilter)||e.column.renderFilter});function b(C){const A=ji(v.value,e.column.key,C);s(A,e.column),d.value==="first"&&l(1)}function m(){u.value=!1}function y(){u.value=!1}return{mergedTheme:o,mergedClsPrefix:n,active:h,showPopover:u,mergedRenderFilter:c,filterMultiple:p,mergedFilterValue:x,filterMenuCssVars:a,handleFilterChange:b,handleFilterMenuConfirm:y,handleFilterMenuCancel:m}},render(){const{mergedTheme:e,mergedClsPrefix:t,handleFilterMenuCancel:o}=this;return i(At,{show:this.showPopover,onUpdateShow:n=>this.showPopover=n,trigger:"click",theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,placement:"bottom",style:{padding:0}},{trigger:()=>{const{mergedRenderFilter:n}=this;if(n)return i(Ai,{"data-data-table-filter":!0,render:n,active:this.active,show:this.showPopover});const{renderFilterIcon:r}=this.column;return i("div",{"data-data-table-filter":!0,class:[`${t}-data-table-filter`,{[`${t}-data-table-filter--active`]:this.active,[`${t}-data-table-filter--show`]:this.showPopover}]},r?r({active:this.active,show:this.showPopover}):i(Ve,{clsPrefix:t},{default:()=>i(Lr,null)}))},default:()=>{const{renderFilterMenu:n}=this.column;return n?n({hide:o}):i(Di,{style:this.filterMenuCssVars,radioGroupName:String(this.column.key),multiple:this.filterMultiple,value:this.mergedFilterValue,options:this.options,column:this.column,onChange:this.handleFilterChange,onClear:this.handleFilterMenuCancel,onConfirm:this.handleFilterMenuConfirm})}})}}),Wi=he({name:"ColumnResizeButton",props:{onResizeStart:Function,onResize:Function,onResizeEnd:Function},setup(e){const{mergedClsPrefixRef:t}=Te(Ze),o=j(!1);let n=0;function r(s){return s.clientX}function a(s){var u;s.preventDefault();const v=o.value;n=r(s),o.value=!0,v||(ct("mousemove",window,d),ct("mouseup",window,l),(u=e.onResizeStart)===null||u===void 0||u.call(e))}function d(s){var u;(u=e.onResize)===null||u===void 0||u.call(e,r(s)-n)}function l(){var s;o.value=!1,(s=e.onResizeEnd)===null||s===void 0||s.call(e),ot("mousemove",window,d),ot("mouseup",window,l)}return Mt(()=>{ot("mousemove",window,d),ot("mouseup",window,l)}),{mergedClsPrefix:t,active:o,handleMousedown:a}},render(){const{mergedClsPrefix:e}=this;return i("span",{"data-data-table-resizable":!0,class:[`${e}-data-table-resize-button`,this.active&&`${e}-data-table-resize-button--active`],onMousedown:this.handleMousedown})}}),wn=he({name:"DropdownDivider",props:{clsPrefix:{type:String,required:!0}},render(){return i("div",{class:`${this.clsPrefix}-dropdown-divider`})}}),bo=ft("n-dropdown-menu"),Nt=ft("n-dropdown"),jo=ft("n-dropdown-option");function ao(e,t){return e.type==="submenu"||e.type===void 0&&e[t]!==void 0}function Vi(e){return e.type==="group"}function Sn(e){return e.type==="divider"}function qi(e){return e.type==="render"}const Rn=he({name:"DropdownOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null},placement:{type:String,default:"right-start"},props:Object,scrollable:Boolean},setup(e){const t=Te(Nt),{hoverKeyRef:o,keyboardKeyRef:n,lastToggledSubmenuKeyRef:r,pendingKeyPathRef:a,activeKeyPathRef:d,animatedRef:l,mergedShowRef:s,renderLabelRef:u,renderIconRef:v,labelFieldRef:p,childrenFieldRef:x,renderOptionRef:h,nodePropsRef:c,menuPropsRef:b}=t,m=Te(jo,null),y=Te(bo),C=Te(Jo),A=w(()=>e.tmNode.rawNode),Q=w(()=>{const{value:E}=x;return ao(e.tmNode.rawNode,E)}),_=w(()=>{const{disabled:E}=e.tmNode;return E}),B=w(()=>{if(!Q.value)return!1;const{key:E,disabled:ee}=e.tmNode;if(ee)return!1;const{value:S}=o,{value:f}=n,{value:O}=r,{value:D}=a;return S!==null?D.includes(E):f!==null?D.includes(E)&&D[D.length-1]!==E:O!==null?D.includes(E):!1}),H=w(()=>n.value===null&&!l.value),$=$r(B,300,H),z=w(()=>!!(m!=null&&m.enteringSubmenuRef.value)),M=j(!1);qe(jo,{enteringSubmenuRef:M});function V(){M.value=!0}function k(){M.value=!1}function N(){const{parentKey:E,tmNode:ee}=e;ee.disabled||s.value&&(r.value=E,n.value=null,o.value=ee.key)}function I(){const{tmNode:E}=e;E.disabled||s.value&&o.value!==E.key&&N()}function L(E){if(e.tmNode.disabled||!s.value)return;const{relatedTarget:ee}=E;ee&&!et({target:ee},"dropdownOption")&&!et({target:ee},"scrollbarRail")&&(o.value=null)}function X(){const{value:E}=Q,{tmNode:ee}=e;s.value&&!E&&!ee.disabled&&(t.doSelect(ee.key,ee.rawNode),t.doUpdateShow(!1))}return{labelField:p,renderLabel:u,renderIcon:v,siblingHasIcon:y.showIconRef,siblingHasSubmenu:y.hasSubmenuRef,menuProps:b,popoverBody:C,animated:l,mergedShowSubmenu:w(()=>$.value&&!z.value),rawNode:A,hasSubmenu:Q,pending:De(()=>{const{value:E}=a,{key:ee}=e.tmNode;return E.includes(ee)}),childActive:De(()=>{const{value:E}=d,{key:ee}=e.tmNode,S=E.findIndex(f=>ee===f);return S===-1?!1:S<E.length-1}),active:De(()=>{const{value:E}=d,{key:ee}=e.tmNode,S=E.findIndex(f=>ee===f);return S===-1?!1:S===E.length-1}),mergedDisabled:_,renderOption:h,nodeProps:c,handleClick:X,handleMouseMove:I,handleMouseEnter:N,handleMouseLeave:L,handleSubmenuBeforeEnter:V,handleSubmenuAfterEnter:k}},render(){var e,t;const{animated:o,rawNode:n,mergedShowSubmenu:r,clsPrefix:a,siblingHasIcon:d,siblingHasSubmenu:l,renderLabel:s,renderIcon:u,renderOption:v,nodeProps:p,props:x,scrollable:h}=this;let c=null;if(r){const C=(e=this.menuProps)===null||e===void 0?void 0:e.call(this,n,n.children);c=i(kn,Object.assign({},C,{clsPrefix:a,scrollable:this.scrollable,tmNodes:this.tmNode.children,parentKey:this.tmNode.key}))}const b={class:[`${a}-dropdown-option-body`,this.pending&&`${a}-dropdown-option-body--pending`,this.active&&`${a}-dropdown-option-body--active`,this.childActive&&`${a}-dropdown-option-body--child-active`,this.mergedDisabled&&`${a}-dropdown-option-body--disabled`],onMousemove:this.handleMouseMove,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onClick:this.handleClick},m=p==null?void 0:p(n),y=i("div",Object.assign({class:[`${a}-dropdown-option`,m==null?void 0:m.class],"data-dropdown-option":!0},m),i("div",kt(b,x),[i("div",{class:[`${a}-dropdown-option-body__prefix`,d&&`${a}-dropdown-option-body__prefix--show-icon`]},[u?u(n):Ye(n.icon)]),i("div",{"data-dropdown-option":!0,class:`${a}-dropdown-option-body__label`},s?s(n):Ye((t=n[this.labelField])!==null&&t!==void 0?t:n.title)),i("div",{"data-dropdown-option":!0,class:[`${a}-dropdown-option-body__suffix`,l&&`${a}-dropdown-option-body__suffix--has-submenu`]},this.hasSubmenu?i(zr,null,{default:()=>i(an,null)}):null)]),this.hasSubmenu?i(tn,null,{default:()=>[i(on,null,{default:()=>i("div",{class:`${a}-dropdown-offset-container`},i(nn,{show:this.mergedShowSubmenu,placement:this.placement,to:h&&this.popoverBody||void 0,teleportDisabled:!h},{default:()=>i("div",{class:`${a}-dropdown-menu-wrapper`},o?i(Tt,{onBeforeEnter:this.handleSubmenuBeforeEnter,onAfterEnter:this.handleSubmenuAfterEnter,name:"fade-in-scale-up-transition",appear:!0},{default:()=>c}):c)}))})]}):null);return v?v({node:y,option:n}):y}}),Gi=he({name:"DropdownGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{showIconRef:e,hasSubmenuRef:t}=Te(bo),{renderLabelRef:o,labelFieldRef:n,nodePropsRef:r,renderOptionRef:a}=Te(Nt);return{labelField:n,showIcon:e,hasSubmenu:t,renderLabel:o,nodeProps:r,renderOption:a}},render(){var e;const{clsPrefix:t,hasSubmenu:o,showIcon:n,nodeProps:r,renderLabel:a,renderOption:d}=this,{rawNode:l}=this.tmNode,s=i("div",Object.assign({class:`${t}-dropdown-option`},r==null?void 0:r(l)),i("div",{class:`${t}-dropdown-option-body ${t}-dropdown-option-body--group`},i("div",{"data-dropdown-option":!0,class:[`${t}-dropdown-option-body__prefix`,n&&`${t}-dropdown-option-body__prefix--show-icon`]},Ye(l.icon)),i("div",{class:`${t}-dropdown-option-body__label`,"data-dropdown-option":!0},a?a(l):Ye((e=l.title)!==null&&e!==void 0?e:l[this.labelField])),i("div",{class:[`${t}-dropdown-option-body__suffix`,o&&`${t}-dropdown-option-body__suffix--has-submenu`],"data-dropdown-option":!0})));return d?d({node:s,option:l}):s}}),Xi=he({name:"NDropdownGroup",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null}},render(){const{tmNode:e,parentKey:t,clsPrefix:o}=this,{children:n}=e;return i(st,null,i(Gi,{clsPrefix:o,tmNode:e,key:e.key}),n==null?void 0:n.map(r=>{const{rawNode:a}=r;return a.show===!1?null:Sn(a)?i(wn,{clsPrefix:o,key:r.key}):r.isGroup?(ro("dropdown","`group` node is not allowed to be put in `group` node."),null):i(Rn,{clsPrefix:o,tmNode:r,parentKey:t,key:r.key})}))}}),Zi=he({name:"DropdownRenderOption",props:{tmNode:{type:Object,required:!0}},render(){const{rawNode:{render:e,props:t}}=this.tmNode;return i("div",t,[e==null?void 0:e()])}}),kn=he({name:"DropdownMenu",props:{scrollable:Boolean,showArrow:Boolean,arrowStyle:[String,Object],clsPrefix:{type:String,required:!0},tmNodes:{type:Array,default:()=>[]},parentKey:{type:[String,Number],default:null}},setup(e){const{renderIconRef:t,childrenFieldRef:o}=Te(Nt);qe(bo,{showIconRef:w(()=>{const r=t.value;return e.tmNodes.some(a=>{var d;if(a.isGroup)return(d=a.children)===null||d===void 0?void 0:d.some(({rawNode:s})=>r?r(s):s.icon);const{rawNode:l}=a;return r?r(l):l.icon})}),hasSubmenuRef:w(()=>{const{value:r}=o;return e.tmNodes.some(a=>{var d;if(a.isGroup)return(d=a.children)===null||d===void 0?void 0:d.some(({rawNode:s})=>ao(s,r));const{rawNode:l}=a;return ao(l,r)})})});const n=j(null);return qe(er,null),qe(tr,null),qe(Jo,n),{bodyRef:n}},render(){const{parentKey:e,clsPrefix:t,scrollable:o}=this,n=this.tmNodes.map(r=>{const{rawNode:a}=r;return a.show===!1?null:qi(a)?i(Zi,{tmNode:r,key:r.key}):Sn(a)?i(wn,{clsPrefix:t,key:r.key}):Vi(a)?i(Xi,{clsPrefix:t,tmNode:r,parentKey:e,key:r.key}):i(Rn,{clsPrefix:t,tmNode:r,parentKey:e,key:r.key,props:a.props,scrollable:o})});return i("div",{class:[`${t}-dropdown-menu`,o&&`${t}-dropdown-menu--scrollable`],ref:"bodyRef"},o?i(or,{contentClass:`${t}-dropdown-menu__content`},{default:()=>n}):n,this.showArrow?Mr({clsPrefix:t,arrowStyle:this.arrowStyle}):null)}}),Ji=R("dropdown-menu",`
|
|
472
|
-
transform-origin: var(--v-transform-origin);
|
|
473
|
-
background-color: var(--n-color);
|
|
474
|
-
border-radius: var(--n-border-radius);
|
|
475
|
-
box-shadow: var(--n-box-shadow);
|
|
476
|
-
position: relative;
|
|
477
|
-
transition:
|
|
478
|
-
background-color .3s var(--n-bezier),
|
|
479
|
-
box-shadow .3s var(--n-bezier);
|
|
480
|
-
`,[Bt(),R("dropdown-option",`
|
|
481
|
-
position: relative;
|
|
482
|
-
`,[ne("a",`
|
|
483
|
-
text-decoration: none;
|
|
484
|
-
color: inherit;
|
|
485
|
-
outline: none;
|
|
486
|
-
`,[ne("&::before",`
|
|
487
|
-
content: "";
|
|
488
|
-
position: absolute;
|
|
489
|
-
left: 0;
|
|
490
|
-
right: 0;
|
|
491
|
-
top: 0;
|
|
492
|
-
bottom: 0;
|
|
493
|
-
`)]),R("dropdown-option-body",`
|
|
494
|
-
display: flex;
|
|
495
|
-
cursor: pointer;
|
|
496
|
-
position: relative;
|
|
497
|
-
height: var(--n-option-height);
|
|
498
|
-
line-height: var(--n-option-height);
|
|
499
|
-
font-size: var(--n-font-size);
|
|
500
|
-
color: var(--n-option-text-color);
|
|
501
|
-
transition: color .3s var(--n-bezier);
|
|
502
|
-
`,[ne("&::before",`
|
|
503
|
-
content: "";
|
|
504
|
-
position: absolute;
|
|
505
|
-
top: 0;
|
|
506
|
-
bottom: 0;
|
|
507
|
-
left: 4px;
|
|
508
|
-
right: 4px;
|
|
509
|
-
transition: background-color .3s var(--n-bezier);
|
|
510
|
-
border-radius: var(--n-border-radius);
|
|
511
|
-
`),Ue("disabled",[W("pending",`
|
|
512
|
-
color: var(--n-option-text-color-hover);
|
|
513
|
-
`,[le("prefix, suffix",`
|
|
514
|
-
color: var(--n-option-text-color-hover);
|
|
515
|
-
`),ne("&::before","background-color: var(--n-option-color-hover);")]),W("active",`
|
|
516
|
-
color: var(--n-option-text-color-active);
|
|
517
|
-
`,[le("prefix, suffix",`
|
|
518
|
-
color: var(--n-option-text-color-active);
|
|
519
|
-
`),ne("&::before","background-color: var(--n-option-color-active);")]),W("child-active",`
|
|
520
|
-
color: var(--n-option-text-color-child-active);
|
|
521
|
-
`,[le("prefix, suffix",`
|
|
522
|
-
color: var(--n-option-text-color-child-active);
|
|
523
|
-
`)])]),W("disabled",`
|
|
524
|
-
cursor: not-allowed;
|
|
525
|
-
opacity: var(--n-option-opacity-disabled);
|
|
526
|
-
`),W("group",`
|
|
527
|
-
font-size: calc(var(--n-font-size) - 1px);
|
|
528
|
-
color: var(--n-group-header-text-color);
|
|
529
|
-
`,[le("prefix",`
|
|
530
|
-
width: calc(var(--n-option-prefix-width) / 2);
|
|
531
|
-
`,[W("show-icon",`
|
|
532
|
-
width: calc(var(--n-option-icon-prefix-width) / 2);
|
|
533
|
-
`)])]),le("prefix",`
|
|
534
|
-
width: var(--n-option-prefix-width);
|
|
535
|
-
display: flex;
|
|
536
|
-
justify-content: center;
|
|
537
|
-
align-items: center;
|
|
538
|
-
color: var(--n-prefix-color);
|
|
539
|
-
transition: color .3s var(--n-bezier);
|
|
540
|
-
z-index: 1;
|
|
541
|
-
`,[W("show-icon",`
|
|
542
|
-
width: var(--n-option-icon-prefix-width);
|
|
543
|
-
`),R("icon",`
|
|
544
|
-
font-size: var(--n-option-icon-size);
|
|
545
|
-
`)]),le("label",`
|
|
546
|
-
white-space: nowrap;
|
|
547
|
-
flex: 1;
|
|
548
|
-
z-index: 1;
|
|
549
|
-
`),le("suffix",`
|
|
550
|
-
box-sizing: border-box;
|
|
551
|
-
flex-grow: 0;
|
|
552
|
-
flex-shrink: 0;
|
|
553
|
-
display: flex;
|
|
554
|
-
justify-content: flex-end;
|
|
555
|
-
align-items: center;
|
|
556
|
-
min-width: var(--n-option-suffix-width);
|
|
557
|
-
padding: 0 8px;
|
|
558
|
-
transition: color .3s var(--n-bezier);
|
|
559
|
-
color: var(--n-suffix-color);
|
|
560
|
-
z-index: 1;
|
|
561
|
-
`,[W("has-submenu",`
|
|
562
|
-
width: var(--n-option-icon-suffix-width);
|
|
563
|
-
`),R("icon",`
|
|
564
|
-
font-size: var(--n-option-icon-size);
|
|
565
|
-
`)]),R("dropdown-menu","pointer-events: all;")]),R("dropdown-offset-container",`
|
|
566
|
-
pointer-events: none;
|
|
567
|
-
position: absolute;
|
|
568
|
-
left: 0;
|
|
569
|
-
right: 0;
|
|
570
|
-
top: -4px;
|
|
571
|
-
bottom: -4px;
|
|
572
|
-
`)]),R("dropdown-divider",`
|
|
573
|
-
transition: background-color .3s var(--n-bezier);
|
|
574
|
-
background-color: var(--n-divider-color);
|
|
575
|
-
height: 1px;
|
|
576
|
-
margin: 4px 0;
|
|
577
|
-
`),R("dropdown-menu-wrapper",`
|
|
578
|
-
transform-origin: var(--v-transform-origin);
|
|
579
|
-
width: fit-content;
|
|
580
|
-
`),ne(">",[R("scrollbar",`
|
|
581
|
-
height: inherit;
|
|
582
|
-
max-height: inherit;
|
|
583
|
-
`)]),Ue("scrollable",`
|
|
584
|
-
padding: var(--n-padding);
|
|
585
|
-
`),W("scrollable",[le("content",`
|
|
586
|
-
padding: var(--n-padding);
|
|
587
|
-
`)])]),Qi={animated:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},size:{type:String,default:"medium"},inverted:Boolean,placement:{type:String,default:"bottom"},onSelect:[Function,Array],options:{type:Array,default:()=>[]},menuProps:Function,showArrow:Boolean,renderLabel:Function,renderIcon:Function,renderOption:Function,nodeProps:Function,labelField:{type:String,default:"label"},keyField:{type:String,default:"key"},childrenField:{type:String,default:"children"},value:[String,Number]},Yi=Object.keys(Pt),ea=Object.assign(Object.assign(Object.assign({},Pt),Qi),Ae.props),ta=he({name:"Dropdown",inheritAttrs:!1,props:ea,setup(e){const t=j(!1),o=rt(ae(e,"show"),t),n=w(()=>{const{keyField:k,childrenField:N}=e;return _t(e.options,{getKey(I){return I[k]},getDisabled(I){return I.disabled===!0},getIgnored(I){return I.type==="divider"||I.type==="render"},getChildren(I){return I[N]}})}),r=w(()=>n.value.treeNodes),a=j(null),d=j(null),l=j(null),s=w(()=>{var k,N,I;return(I=(N=(k=a.value)!==null&&k!==void 0?k:d.value)!==null&&N!==void 0?N:l.value)!==null&&I!==void 0?I:null}),u=w(()=>n.value.getPath(s.value).keyPath),v=w(()=>n.value.getPath(e.value).keyPath),p=De(()=>e.keyboard&&o.value);Ir({keydown:{ArrowUp:{prevent:!0,handler:_},ArrowRight:{prevent:!0,handler:Q},ArrowDown:{prevent:!0,handler:B},ArrowLeft:{prevent:!0,handler:A},Enter:{prevent:!0,handler:H},Escape:C}},p);const{mergedClsPrefixRef:x,inlineThemeDisabled:h}=tt(e),c=Ae("Dropdown","-dropdown",Ji,bn,e,x);qe(Nt,{labelFieldRef:ae(e,"labelField"),childrenFieldRef:ae(e,"childrenField"),renderLabelRef:ae(e,"renderLabel"),renderIconRef:ae(e,"renderIcon"),hoverKeyRef:a,keyboardKeyRef:d,lastToggledSubmenuKeyRef:l,pendingKeyPathRef:u,activeKeyPathRef:v,animatedRef:ae(e,"animated"),mergedShowRef:o,nodePropsRef:ae(e,"nodeProps"),renderOptionRef:ae(e,"renderOption"),menuPropsRef:ae(e,"menuProps"),doSelect:b,doUpdateShow:m}),Ge(o,k=>{!e.animated&&!k&&y()});function b(k,N){const{onSelect:I}=e;I&&ie(I,k,N)}function m(k){const{"onUpdate:show":N,onUpdateShow:I}=e;N&&ie(N,k),I&&ie(I,k),t.value=k}function y(){a.value=null,d.value=null,l.value=null}function C(){m(!1)}function A(){z("left")}function Q(){z("right")}function _(){z("up")}function B(){z("down")}function H(){const k=$();k!=null&&k.isLeaf&&o.value&&(b(k.key,k.rawNode),m(!1))}function $(){var k;const{value:N}=n,{value:I}=s;return!N||I===null?null:(k=N.getNode(I))!==null&&k!==void 0?k:null}function z(k){const{value:N}=s,{value:{getFirstAvailableNode:I}}=n;let L=null;if(N===null){const X=I();X!==null&&(L=X.key)}else{const X=$();if(X){let E;switch(k){case"down":E=X.getNext();break;case"up":E=X.getPrev();break;case"right":E=X.getChild();break;case"left":E=X.getParent();break}E&&(L=E.key)}}L!==null&&(a.value=null,d.value=L)}const M=w(()=>{const{size:k,inverted:N}=e,{common:{cubicBezierEaseInOut:I},self:L}=c.value,{padding:X,dividerColor:E,borderRadius:ee,optionOpacityDisabled:S,[ce("optionIconSuffixWidth",k)]:f,[ce("optionSuffixWidth",k)]:O,[ce("optionIconPrefixWidth",k)]:D,[ce("optionPrefixWidth",k)]:U,[ce("fontSize",k)]:re,[ce("optionHeight",k)]:ue,[ce("optionIconSize",k)]:Se}=L,oe={"--n-bezier":I,"--n-font-size":re,"--n-padding":X,"--n-border-radius":ee,"--n-option-height":ue,"--n-option-prefix-width":U,"--n-option-icon-prefix-width":D,"--n-option-suffix-width":O,"--n-option-icon-suffix-width":f,"--n-option-icon-size":Se,"--n-divider-color":E,"--n-option-opacity-disabled":S};return N?(oe["--n-color"]=L.colorInverted,oe["--n-option-color-hover"]=L.optionColorHoverInverted,oe["--n-option-color-active"]=L.optionColorActiveInverted,oe["--n-option-text-color"]=L.optionTextColorInverted,oe["--n-option-text-color-hover"]=L.optionTextColorHoverInverted,oe["--n-option-text-color-active"]=L.optionTextColorActiveInverted,oe["--n-option-text-color-child-active"]=L.optionTextColorChildActiveInverted,oe["--n-prefix-color"]=L.prefixColorInverted,oe["--n-suffix-color"]=L.suffixColorInverted,oe["--n-group-header-text-color"]=L.groupHeaderTextColorInverted):(oe["--n-color"]=L.color,oe["--n-option-color-hover"]=L.optionColorHover,oe["--n-option-color-active"]=L.optionColorActive,oe["--n-option-text-color"]=L.optionTextColor,oe["--n-option-text-color-hover"]=L.optionTextColorHover,oe["--n-option-text-color-active"]=L.optionTextColorActive,oe["--n-option-text-color-child-active"]=L.optionTextColorChildActive,oe["--n-prefix-color"]=L.prefixColor,oe["--n-suffix-color"]=L.suffixColor,oe["--n-group-header-text-color"]=L.groupHeaderTextColor),oe}),V=h?at("dropdown",w(()=>`${e.size[0]}${e.inverted?"i":""}`),M,e):void 0;return{mergedClsPrefix:x,mergedTheme:c,tmNodes:r,mergedShow:o,handleAfterLeave:()=>{e.animated&&y()},doUpdateShow:m,cssVars:h?void 0:M,themeClass:V==null?void 0:V.themeClass,onRender:V==null?void 0:V.onRender}},render(){const e=(n,r,a,d,l)=>{var s;const{mergedClsPrefix:u,menuProps:v}=this;(s=this.onRender)===null||s===void 0||s.call(this);const p=(v==null?void 0:v(void 0,this.tmNodes.map(h=>h.rawNode)))||{},x={ref:sn(r),class:[n,`${u}-dropdown`,this.themeClass],clsPrefix:u,tmNodes:this.tmNodes,style:[a,this.cssVars],showArrow:this.showArrow,arrowStyle:this.arrowStyle,scrollable:this.scrollable,onMouseenter:d,onMouseleave:l};return i(kn,kt(this.$attrs,x,p))},{mergedTheme:t}=this,o={show:this.mergedShow,theme:t.peers.Popover,themeOverrides:t.peerOverrides.Popover,internalOnAfterLeave:this.handleAfterLeave,internalRenderBody:e,onUpdateShow:this.doUpdateShow,"onUpdate:show":void 0};return i(At,Object.assign({},Xo(this.$props,Yi),o),{trigger:()=>{var n,r;return(r=(n=this.$slots).default)===null||r===void 0?void 0:r.call(n)}})}}),Pn="_n_all__",Fn="_n_none__";function oa(e,t,o,n){return e?r=>{for(const a of e)switch(r){case Pn:o(!0);return;case Fn:n(!0);return;default:if(typeof a=="object"&&a.key===r){a.onSelect(t.value);return}}}:()=>{}}function na(e,t){return e?e.map(o=>{switch(o){case"all":return{label:t.checkTableAll,key:Pn};case"none":return{label:t.uncheckTableAll,key:Fn};default:return o}}):[]}const ra=he({name:"DataTableSelectionMenu",props:{clsPrefix:{type:String,required:!0}},setup(e){const{props:t,localeRef:o,checkOptionsRef:n,rawPaginatedDataRef:r,doCheckAll:a,doUncheckAll:d}=Te(Ze),l=w(()=>oa(n.value,r,a,d)),s=w(()=>na(n.value,o.value));return()=>{var u,v,p,x;const{clsPrefix:h}=e;return i(ta,{theme:(v=(u=t.theme)===null||u===void 0?void 0:u.peers)===null||v===void 0?void 0:v.Dropdown,themeOverrides:(x=(p=t.themeOverrides)===null||p===void 0?void 0:p.peers)===null||x===void 0?void 0:x.Dropdown,options:s.value,onSelect:l.value},{default:()=>i(Ve,{clsPrefix:h,class:`${h}-data-table-check-extra`},{default:()=>i(Or,null)})})}}});function oo(e){return typeof e.title=="function"?e.title(e):e.title}const zn=he({name:"DataTableHeader",props:{discrete:{type:Boolean,default:!0}},setup(){const{mergedClsPrefixRef:e,scrollXRef:t,fixedColumnLeftMapRef:o,fixedColumnRightMapRef:n,mergedCurrentPageRef:r,allRowsCheckedRef:a,someRowsCheckedRef:d,rowsRef:l,colsRef:s,mergedThemeRef:u,checkOptionsRef:v,mergedSortStateRef:p,componentId:x,mergedTableLayoutRef:h,headerCheckboxDisabledRef:c,onUnstableColumnResize:b,doUpdateResizableWidth:m,handleTableHeaderScroll:y,deriveNextSorter:C,doUncheckAll:A,doCheckAll:Q}=Te(Ze),_=j({});function B(k){const N=_.value[k];return N==null?void 0:N.getBoundingClientRect().width}function H(){a.value?A():Q()}function $(k,N){if(et(k,"dataTableFilter")||et(k,"dataTableResizable")||!to(N))return;const I=p.value.find(X=>X.columnKey===N.key)||null,L=Hi(N,I);C(L)}const z=new Map;function M(k){z.set(k.key,B(k.key))}function V(k,N){const I=z.get(k.key);if(I===void 0)return;const L=I+N,X=Li(L,k.minWidth,k.maxWidth);b(L,X,k,B),m(k,X)}return{cellElsRef:_,componentId:x,mergedSortState:p,mergedClsPrefix:e,scrollX:t,fixedColumnLeftMap:o,fixedColumnRightMap:n,currentPage:r,allRowsChecked:a,someRowsChecked:d,rows:l,cols:s,mergedTheme:u,checkOptions:v,mergedTableLayout:h,headerCheckboxDisabled:c,handleCheckboxUpdateChecked:H,handleColHeaderClick:$,handleTableHeaderScroll:y,handleColumnResizeStart:M,handleColumnResize:V}},render(){const{cellElsRef:e,mergedClsPrefix:t,fixedColumnLeftMap:o,fixedColumnRightMap:n,currentPage:r,allRowsChecked:a,someRowsChecked:d,rows:l,cols:s,mergedTheme:u,checkOptions:v,componentId:p,discrete:x,mergedTableLayout:h,headerCheckboxDisabled:c,mergedSortState:b,handleColHeaderClick:m,handleCheckboxUpdateChecked:y,handleColumnResizeStart:C,handleColumnResize:A}=this,Q=i("thead",{class:`${t}-data-table-thead`,"data-n-id":p},l.map(H=>i("tr",{class:`${t}-data-table-tr`},H.map(({column:$,colSpan:z,rowSpan:M,isLast:V})=>{var k,N;const I=We($),{ellipsis:L}=$,X=()=>$.type==="selection"?$.multiple!==!1?i(st,null,i(ho,{key:r,privateInsideTable:!0,checked:a,indeterminate:d,disabled:c,onUpdateChecked:y}),v?i(ra,{clsPrefix:t}):null):null:i(st,null,i("div",{class:`${t}-data-table-th__title-wrapper`},i("div",{class:`${t}-data-table-th__title`},L===!0||L&&!L.tooltip?i("div",{class:`${t}-data-table-th__ellipsis`},oo($)):L&&typeof L=="object"?i(fo,Object.assign({},L,{theme:u.peers.Ellipsis,themeOverrides:u.peerOverrides.Ellipsis}),{default:()=>oo($)}):oo($)),to($)?i(Ii,{column:$}):null),Ho($)?i(Ui,{column:$,options:$.filterOptions}):null,yn($)?i(Wi,{onResizeStart:()=>{C($)},onResize:S=>{A($,S)}}):null),E=I in o,ee=I in n;return i("th",{ref:S=>e[I]=S,key:I,style:{textAlign:$.titleAlign||$.align,left:Ct((k=o[I])===null||k===void 0?void 0:k.start),right:Ct((N=n[I])===null||N===void 0?void 0:N.start)},colspan:z,rowspan:M,"data-col-key":I,class:[`${t}-data-table-th`,(E||ee)&&`${t}-data-table-th--fixed-${E?"left":"right"}`,{[`${t}-data-table-th--hover`]:Cn($,b),[`${t}-data-table-th--filterable`]:Ho($),[`${t}-data-table-th--sortable`]:to($),[`${t}-data-table-th--selection`]:$.type==="selection",[`${t}-data-table-th--last`]:V},$.className],onClick:$.type!=="selection"&&$.type!=="expand"&&!("children"in $)?S=>{m(S,$)}:void 0},X())}))));if(!x)return Q;const{handleTableHeaderScroll:_,scrollX:B}=this;return i("div",{class:`${t}-data-table-base-table-header`,onScroll:_},i("table",{ref:"body",class:`${t}-data-table-table`,style:{minWidth:Xe(B),tableLayout:h}},i("colgroup",null,s.map(H=>i("col",{key:H.key,style:H.style}))),Q))}}),ia=he({name:"DataTableCell",props:{clsPrefix:{type:String,required:!0},row:{type:Object,required:!0},index:{type:Number,required:!0},column:{type:Object,required:!0},isSummary:Boolean,mergedTheme:{type:Object,required:!0},renderCell:Function},render(){const{isSummary:e,column:t,row:o,renderCell:n}=this;let r;const{render:a,key:d,ellipsis:l}=t;if(a&&!e?r=a(o,this.index):e?r=o[d].value:r=n?n(So(o,d),o,t):So(o,d),l)if(typeof l=="object"){const{mergedTheme:s}=this;return t.ellipsisComponent==="performant-ellipsis"?i(Ti,Object.assign({},l,{theme:s.peers.Ellipsis,themeOverrides:s.peerOverrides.Ellipsis}),{default:()=>r}):i(fo,Object.assign({},l,{theme:s.peers.Ellipsis,themeOverrides:s.peerOverrides.Ellipsis}),{default:()=>r})}else return i("span",{class:`${this.clsPrefix}-data-table-td__ellipsis`},r);return r}}),Uo=he({name:"DataTableExpandTrigger",props:{clsPrefix:{type:String,required:!0},expanded:Boolean,loading:Boolean,onClick:{type:Function,required:!0},renderExpandIcon:{type:Function}},render(){const{clsPrefix:e}=this;return i("div",{class:[`${e}-data-table-expand-trigger`,this.expanded&&`${e}-data-table-expand-trigger--expanded`],onClick:this.onClick,onMousedown:t=>{t.preventDefault()}},i(nr,null,{default:()=>this.loading?i(lo,{key:"loading",clsPrefix:this.clsPrefix,radius:85,strokeWidth:15,scale:.88}):this.renderExpandIcon?this.renderExpandIcon({expanded:this.expanded}):i(Ve,{clsPrefix:e,key:"base-icon"},{default:()=>i(an,null)})}))}}),aa=he({name:"DataTableBodyCheckbox",props:{rowKey:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!0},onUpdateChecked:{type:Function,required:!0}},setup(e){const{mergedCheckedRowKeySetRef:t,mergedInderminateRowKeySetRef:o}=Te(Ze);return()=>{const{rowKey:n}=e;return i(ho,{privateInsideTable:!0,disabled:e.disabled,indeterminate:o.value.has(n),checked:t.value.has(n),onUpdateChecked:e.onUpdateChecked})}}}),la=he({name:"DataTableBodyRadio",props:{rowKey:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!0},onUpdateChecked:{type:Function,required:!0}},setup(e){const{mergedCheckedRowKeySetRef:t,componentId:o}=Te(Ze);return()=>{const{rowKey:n}=e;return i(rn,{name:o,disabled:e.disabled,checked:t.value.has(n),onUpdateChecked:e.onUpdateChecked})}}});function sa(e,t){const o=[];function n(r,a){r.forEach(d=>{d.children&&t.has(d.key)?(o.push({tmNode:d,striped:!1,key:d.key,index:a}),n(d.children,a)):o.push({key:d.key,tmNode:d,striped:!1,index:a})})}return e.forEach(r=>{o.push(r);const{children:a}=r.tmNode;a&&t.has(r.key)&&n(a,r.index)}),o}const da=he({props:{clsPrefix:{type:String,required:!0},id:{type:String,required:!0},cols:{type:Array,required:!0},onMouseenter:Function,onMouseleave:Function},render(){const{clsPrefix:e,id:t,cols:o,onMouseenter:n,onMouseleave:r}=this;return i("table",{style:{tableLayout:"fixed"},class:`${e}-data-table-table`,onMouseenter:n,onMouseleave:r},i("colgroup",null,o.map(a=>i("col",{key:a.key,style:a.style}))),i("tbody",{"data-n-id":t,class:`${e}-data-table-tbody`},this.$slots))}}),ca=he({name:"DataTableBody",props:{onResize:Function,showHeader:Boolean,flexHeight:Boolean,bodyStyle:Object},setup(e){const{slots:t,bodyWidthRef:o,mergedExpandedRowKeysRef:n,mergedClsPrefixRef:r,mergedThemeRef:a,scrollXRef:d,colsRef:l,paginatedDataRef:s,rawPaginatedDataRef:u,fixedColumnLeftMapRef:v,fixedColumnRightMapRef:p,mergedCurrentPageRef:x,rowClassNameRef:h,leftActiveFixedColKeyRef:c,leftActiveFixedChildrenColKeysRef:b,rightActiveFixedColKeyRef:m,rightActiveFixedChildrenColKeysRef:y,renderExpandRef:C,hoverKeyRef:A,summaryRef:Q,mergedSortStateRef:_,virtualScrollRef:B,componentId:H,mergedTableLayoutRef:$,childTriggerColIndexRef:z,indentRef:M,rowPropsRef:V,maxHeightRef:k,stripedRef:N,loadingRef:I,onLoadRef:L,loadingKeySetRef:X,expandableRef:E,stickyExpandedRowsRef:ee,renderExpandIconRef:S,summaryPlacementRef:f,treeMateRef:O,scrollbarPropsRef:D,setHeaderScrollLeft:U,doUpdateExpandedRowKeys:re,handleTableBodyScroll:ue,doCheck:Se,doUncheck:oe,renderCell:me}=Te(Ze),se=j(null),P=j(null),Z=j(null),Fe=De(()=>s.value.length===0),J=De(()=>e.showHeader||!Fe.value),ge=De(()=>e.showHeader||Fe.value);let Ie="";const ze=w(()=>new Set(n.value));function Pe(G){var te;return(te=O.value.getNode(G))===null||te===void 0?void 0:te.rawNode}function Le(G,te,Ce){const K=Pe(G.key);if(!K){ro("data-table",`fail to get row data with key ${G.key}`);return}if(Ce){const be=s.value.findIndex(we=>we.key===Ie);if(be!==-1){const we=s.value.findIndex(fe=>fe.key===G.key),g=Math.min(be,we),T=Math.max(be,we),Y=[];s.value.slice(g,T+1).forEach(fe=>{fe.disabled||Y.push(fe.key)}),te?Se(Y,!1,K):oe(Y,K),Ie=G.key;return}}te?Se(G.key,!1,K):oe(G.key,K),Ie=G.key}function Ee(G){const te=Pe(G.key);if(!te){ro("data-table",`fail to get row data with key ${G.key}`);return}Se(G.key,!0,te)}function ke(){if(!J.value){const{value:te}=Z;return te||null}if(B.value)return xe();const{value:G}=se;return G?G.containerRef:null}function F(G,te){var Ce;if(X.value.has(G))return;const{value:K}=n,be=K.indexOf(G),we=Array.from(K);~be?(we.splice(be,1),re(we)):te&&!te.isLeaf&&!te.shallowLoaded?(X.value.add(G),(Ce=L.value)===null||Ce===void 0||Ce.call(L,te.rawNode).then(()=>{const{value:g}=n,T=Array.from(g);~T.indexOf(G)||T.push(G),re(T)}).finally(()=>{X.value.delete(G)})):(we.push(G),re(we))}function q(){A.value=null}function xe(){const{value:G}=P;return G==null?void 0:G.listElRef}function je(){const{value:G}=P;return G==null?void 0:G.itemsElRef}function Je(G){var te;ue(G),(te=se.value)===null||te===void 0||te.sync()}function Ke(G){var te;const{onResize:Ce}=e;Ce&&Ce(G),(te=se.value)===null||te===void 0||te.sync()}const Me={getScrollContainer:ke,scrollTo(G,te){var Ce,K;B.value?(Ce=P.value)===null||Ce===void 0||Ce.scrollTo(G,te):(K=se.value)===null||K===void 0||K.scrollTo(G,te)}},He=ne([({props:G})=>{const te=K=>K===null?null:ne(`[data-n-id="${G.componentId}"] [data-col-key="${K}"]::after`,{boxShadow:"var(--n-box-shadow-after)"}),Ce=K=>K===null?null:ne(`[data-n-id="${G.componentId}"] [data-col-key="${K}"]::before`,{boxShadow:"var(--n-box-shadow-before)"});return ne([te(G.leftActiveFixedColKey),Ce(G.rightActiveFixedColKey),G.leftActiveFixedChildrenColKeys.map(K=>te(K)),G.rightActiveFixedChildrenColKeys.map(K=>Ce(K))])}]);let Ne=!1;return ut(()=>{const{value:G}=c,{value:te}=b,{value:Ce}=m,{value:K}=y;if(!Ne&&G===null&&Ce===null)return;const be={leftActiveFixedColKey:G,leftActiveFixedChildrenColKeys:te,rightActiveFixedColKey:Ce,rightActiveFixedChildrenColKeys:K,componentId:H};He.mount({id:`n-${H}`,force:!0,props:be,anchorMetaName:ar}),Ne=!0}),rr(()=>{He.unmount({id:`n-${H}`})}),Object.assign({bodyWidth:o,summaryPlacement:f,dataTableSlots:t,componentId:H,scrollbarInstRef:se,virtualListRef:P,emptyElRef:Z,summary:Q,mergedClsPrefix:r,mergedTheme:a,scrollX:d,cols:l,loading:I,bodyShowHeaderOnly:ge,shouldDisplaySomeTablePart:J,empty:Fe,paginatedDataAndInfo:w(()=>{const{value:G}=N;let te=!1;return{data:s.value.map(G?(K,be)=>(K.isLeaf||(te=!0),{tmNode:K,key:K.key,striped:be%2===1,index:be}):(K,be)=>(K.isLeaf||(te=!0),{tmNode:K,key:K.key,striped:!1,index:be})),hasChildren:te}}),rawPaginatedData:u,fixedColumnLeftMap:v,fixedColumnRightMap:p,currentPage:x,rowClassName:h,renderExpand:C,mergedExpandedRowKeySet:ze,hoverKey:A,mergedSortState:_,virtualScroll:B,mergedTableLayout:$,childTriggerColIndex:z,indent:M,rowProps:V,maxHeight:k,loadingKeySet:X,expandable:E,stickyExpandedRows:ee,renderExpandIcon:S,scrollbarProps:D,setHeaderScrollLeft:U,handleVirtualListScroll:Je,handleVirtualListResize:Ke,handleMouseleaveTable:q,virtualListContainer:xe,virtualListContent:je,handleTableBodyScroll:ue,handleCheckboxUpdateChecked:Le,handleRadioUpdateChecked:Ee,handleUpdateExpanded:F,renderCell:me},Me)},render(){const{mergedTheme:e,scrollX:t,mergedClsPrefix:o,virtualScroll:n,maxHeight:r,mergedTableLayout:a,flexHeight:d,loadingKeySet:l,onResize:s,setHeaderScrollLeft:u}=this,v=t!==void 0||r!==void 0||d,p=!v&&a==="auto",x=t!==void 0||p,h={minWidth:Xe(t)||"100%"};t&&(h.width="100%");const c=i(so,Object.assign({},this.scrollbarProps,{ref:"scrollbarInstRef",scrollable:v||p,class:`${o}-data-table-base-table-body`,style:this.bodyStyle,theme:e.peers.Scrollbar,themeOverrides:e.peerOverrides.Scrollbar,contentStyle:h,container:n?this.virtualListContainer:void 0,content:n?this.virtualListContent:void 0,horizontalRailStyle:{zIndex:3},verticalRailStyle:{zIndex:3},xScrollable:x,onScroll:n?void 0:this.handleTableBodyScroll,internalOnUpdateScrollLeft:u,onResize:s}),{default:()=>{const b={},m={},{cols:y,paginatedDataAndInfo:C,mergedTheme:A,fixedColumnLeftMap:Q,fixedColumnRightMap:_,currentPage:B,rowClassName:H,mergedSortState:$,mergedExpandedRowKeySet:z,stickyExpandedRows:M,componentId:V,childTriggerColIndex:k,expandable:N,rowProps:I,handleMouseleaveTable:L,renderExpand:X,summary:E,handleCheckboxUpdateChecked:ee,handleRadioUpdateChecked:S,handleUpdateExpanded:f}=this,{length:O}=y;let D;const{data:U,hasChildren:re}=C,ue=re?sa(U,z):U;if(E){const J=E(this.rawPaginatedData);if(Array.isArray(J)){const ge=J.map((Ie,ze)=>({isSummaryRow:!0,key:`__n_summary__${ze}`,tmNode:{rawNode:Ie,disabled:!0},index:-1}));D=this.summaryPlacement==="top"?[...ge,...ue]:[...ue,...ge]}else{const ge={isSummaryRow:!0,key:"__n_summary__",tmNode:{rawNode:J,disabled:!0},index:-1};D=this.summaryPlacement==="top"?[ge,...ue]:[...ue,ge]}}else D=ue;const Se=re?{width:Ct(this.indent)}:void 0,oe=[];D.forEach(J=>{X&&z.has(J.key)&&(!N||N(J.tmNode.rawNode))?oe.push(J,{isExpandedRow:!0,key:`${J.key}-expand`,tmNode:J.tmNode,index:J.index}):oe.push(J)});const{length:me}=oe,se={};U.forEach(({tmNode:J},ge)=>{se[ge]=J.key});const P=M?this.bodyWidth:null,Z=P===null?void 0:`${P}px`,Fe=(J,ge,Ie)=>{const{index:ze}=J;if("isExpandedRow"in J){const{tmNode:{key:Ke,rawNode:Me}}=J;return i("tr",{class:`${o}-data-table-tr ${o}-data-table-tr--expanded`,key:`${Ke}__expand`},i("td",{class:[`${o}-data-table-td`,`${o}-data-table-td--last-col`,ge+1===me&&`${o}-data-table-td--last-row`],colspan:O},M?i("div",{class:`${o}-data-table-expand`,style:{width:Z}},X(Me,ze)):X(Me,ze)))}const Pe="isSummaryRow"in J,Le=!Pe&&J.striped,{tmNode:Ee,key:ke}=J,{rawNode:F}=Ee,q=z.has(ke),xe=I?I(F,ze):void 0,je=typeof H=="string"?H:Ki(F,ze,H);return i("tr",Object.assign({onMouseenter:()=>{this.hoverKey=ke},key:ke,class:[`${o}-data-table-tr`,Pe&&`${o}-data-table-tr--summary`,Le&&`${o}-data-table-tr--striped`,q&&`${o}-data-table-tr--expanded`,je]},xe),y.map((Ke,Me)=>{var He,Ne,G,te,Ce;if(ge in b){const Be=b[ge],_e=Be.indexOf(Me);if(~_e)return Be.splice(_e,1),null}const{column:K}=Ke,be=We(Ke),{rowSpan:we,colSpan:g}=K,T=Pe?((He=J.tmNode.rawNode[be])===null||He===void 0?void 0:He.colSpan)||1:g?g(F,ze):1,Y=Pe?((Ne=J.tmNode.rawNode[be])===null||Ne===void 0?void 0:Ne.rowSpan)||1:we?we(F,ze):1,fe=Me+T===O,ve=ge+Y===me,de=Y>1;if(de&&(m[ge]={[Me]:[]}),T>1||de)for(let Be=ge;Be<ge+Y;++Be){de&&m[ge][Me].push(se[Be]);for(let _e=Me;_e<Me+T;++_e)Be===ge&&_e===Me||(Be in b?b[Be].push(_e):b[Be]=[_e])}const pe=de?this.hoverKey:null,{cellProps:Re}=K,Oe=Re==null?void 0:Re(F,ze),Qe={"--indent-offset":""};return i("td",Object.assign({},Oe,{key:be,style:[{textAlign:K.align||void 0,left:Ct((G=Q[be])===null||G===void 0?void 0:G.start),right:Ct((te=_[be])===null||te===void 0?void 0:te.start)},Qe,(Oe==null?void 0:Oe.style)||""],colspan:T,rowspan:Ie?void 0:Y,"data-col-key":be,class:[`${o}-data-table-td`,K.className,Oe==null?void 0:Oe.class,Pe&&`${o}-data-table-td--summary`,(pe!==null&&m[ge][Me].includes(pe)||Cn(K,$))&&`${o}-data-table-td--hover`,K.fixed&&`${o}-data-table-td--fixed-${K.fixed}`,K.align&&`${o}-data-table-td--${K.align}-align`,K.type==="selection"&&`${o}-data-table-td--selection`,K.type==="expand"&&`${o}-data-table-td--expand`,fe&&`${o}-data-table-td--last-col`,ve&&`${o}-data-table-td--last-row`]}),re&&Me===k?[lr(Qe["--indent-offset"]=Pe?0:J.tmNode.level,i("div",{class:`${o}-data-table-indent`,style:Se})),Pe||J.tmNode.isLeaf?i("div",{class:`${o}-data-table-expand-placeholder`}):i(Uo,{class:`${o}-data-table-expand-trigger`,clsPrefix:o,expanded:q,renderExpandIcon:this.renderExpandIcon,loading:l.has(J.key),onClick:()=>{f(ke,J.tmNode)}})]:null,K.type==="selection"?Pe?null:K.multiple===!1?i(la,{key:B,rowKey:ke,disabled:J.tmNode.disabled,onUpdateChecked:()=>{S(J.tmNode)}}):i(aa,{key:B,rowKey:ke,disabled:J.tmNode.disabled,onUpdateChecked:(Be,_e)=>{ee(J.tmNode,Be,_e.shiftKey)}}):K.type==="expand"?Pe?null:!K.expandable||!((Ce=K.expandable)===null||Ce===void 0)&&Ce.call(K,F)?i(Uo,{clsPrefix:o,expanded:q,renderExpandIcon:this.renderExpandIcon,onClick:()=>{f(ke,null)}}):null:i(ia,{clsPrefix:o,index:ze,row:F,column:K,isSummary:Pe,mergedTheme:A,renderCell:this.renderCell}))}))};return n?i(Yo,{ref:"virtualListRef",items:oe,itemSize:28,visibleItemsTag:da,visibleItemsProps:{clsPrefix:o,id:V,cols:y,onMouseleave:L},showScrollbar:!1,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemsStyle:h,itemResizable:!0},{default:({item:J,index:ge})=>Fe(J,ge,!0)}):i("table",{class:`${o}-data-table-table`,onMouseleave:L,style:{tableLayout:this.mergedTableLayout}},i("colgroup",null,y.map(J=>i("col",{key:J.key,style:J.style}))),this.showHeader?i(zn,{discrete:!1}):null,this.empty?null:i("tbody",{"data-n-id":V,class:`${o}-data-table-tbody`},oe.map((J,ge)=>Fe(J,ge,!1))))}});if(this.empty){const b=()=>i("div",{class:[`${o}-data-table-empty`,this.loading&&`${o}-data-table-empty--hide`],style:this.bodyStyle,ref:"emptyElRef"},$t(this.dataTableSlots.empty,()=>[i(en,{theme:this.mergedTheme.peers.Empty,themeOverrides:this.mergedTheme.peerOverrides.Empty})]));return this.shouldDisplaySomeTablePart?i(st,null,c,b()):i(ir,{onResize:this.onResize},{default:b})}return c}}),ua=he({setup(){const{mergedClsPrefixRef:e,rightFixedColumnsRef:t,leftFixedColumnsRef:o,bodyWidthRef:n,maxHeightRef:r,minHeightRef:a,flexHeightRef:d,syncScrollState:l}=Te(Ze),s=j(null),u=j(null),v=j(null),p=j(!(o.value.length||t.value.length)),x=w(()=>({maxHeight:Xe(r.value),minHeight:Xe(a.value)}));function h(y){n.value=y.contentRect.width,l(),p.value||(p.value=!0)}function c(){const{value:y}=s;return y?y.$el:null}function b(){const{value:y}=u;return y?y.getScrollContainer():null}const m={getBodyElement:b,getHeaderElement:c,scrollTo(y,C){var A;(A=u.value)===null||A===void 0||A.scrollTo(y,C)}};return ut(()=>{const{value:y}=v;if(!y)return;const C=`${e.value}-data-table-base-table--transition-disabled`;p.value?setTimeout(()=>{y.classList.remove(C)},0):y.classList.add(C)}),Object.assign({maxHeight:r,mergedClsPrefix:e,selfElRef:v,headerInstRef:s,bodyInstRef:u,bodyStyle:x,flexHeight:d,handleBodyResize:h},m)},render(){const{mergedClsPrefix:e,maxHeight:t,flexHeight:o}=this,n=t===void 0&&!o;return i("div",{class:`${e}-data-table-base-table`,ref:"selfElRef"},n?null:i(zn,{ref:"headerInstRef"}),i(ca,{ref:"bodyInstRef",bodyStyle:this.bodyStyle,showHeader:n,flexHeight:o,onResize:this.handleBodyResize}))}});function fa(e,t){const{paginatedDataRef:o,treeMateRef:n,selectionColumnRef:r}=t,a=j(e.defaultCheckedRowKeys),d=w(()=>{var _;const{checkedRowKeys:B}=e,H=B===void 0?a.value:B;return((_=r.value)===null||_===void 0?void 0:_.multiple)===!1?{checkedKeys:H.slice(0,1),indeterminateKeys:[]}:n.value.getCheckedKeys(H,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded})}),l=w(()=>d.value.checkedKeys),s=w(()=>d.value.indeterminateKeys),u=w(()=>new Set(l.value)),v=w(()=>new Set(s.value)),p=w(()=>{const{value:_}=u;return o.value.reduce((B,H)=>{const{key:$,disabled:z}=H;return B+(!z&&_.has($)?1:0)},0)}),x=w(()=>o.value.filter(_=>_.disabled).length),h=w(()=>{const{length:_}=o.value,{value:B}=v;return p.value>0&&p.value<_-x.value||o.value.some(H=>B.has(H.key))}),c=w(()=>{const{length:_}=o.value;return p.value!==0&&p.value===_-x.value}),b=w(()=>o.value.length===0);function m(_,B,H){const{"onUpdate:checkedRowKeys":$,onUpdateCheckedRowKeys:z,onCheckedRowKeysChange:M}=e,V=[],{value:{getNode:k}}=n;_.forEach(N=>{var I;const L=(I=k(N))===null||I===void 0?void 0:I.rawNode;V.push(L)}),$&&ie($,_,V,{row:B,action:H}),z&&ie(z,_,V,{row:B,action:H}),M&&ie(M,_,V,{row:B,action:H}),a.value=_}function y(_,B=!1,H){if(!e.loading){if(B){m(Array.isArray(_)?_.slice(0,1):[_],H,"check");return}m(n.value.check(_,l.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,H,"check")}}function C(_,B){e.loading||m(n.value.uncheck(_,l.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,B,"uncheck")}function A(_=!1){const{value:B}=r;if(!B||e.loading)return;const H=[];(_?n.value.treeNodes:o.value).forEach($=>{$.disabled||H.push($.key)}),m(n.value.check(H,l.value,{cascade:!0,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,void 0,"checkAll")}function Q(_=!1){const{value:B}=r;if(!B||e.loading)return;const H=[];(_?n.value.treeNodes:o.value).forEach($=>{$.disabled||H.push($.key)}),m(n.value.uncheck(H,l.value,{cascade:!0,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,void 0,"uncheckAll")}return{mergedCheckedRowKeySetRef:u,mergedCheckedRowKeysRef:l,mergedInderminateRowKeySetRef:v,someRowsCheckedRef:h,allRowsCheckedRef:c,headerCheckboxDisabledRef:b,doUpdateCheckedRowKeys:m,doCheckAll:A,doUncheckAll:Q,doCheck:y,doUncheck:C}}function St(e){return typeof e=="object"&&typeof e.multiple=="number"?e.multiple:!1}function ha(e,t){return t&&(e===void 0||e==="default"||typeof e=="object"&&e.compare==="default")?pa(t):typeof e=="function"?e:e&&typeof e=="object"&&e.compare&&e.compare!=="default"?e.compare:!1}function pa(e){return(t,o)=>{const n=t[e],r=o[e];return typeof n=="number"&&typeof r=="number"?n-r:typeof n=="string"&&typeof r=="string"?n.localeCompare(r):0}}function va(e,{dataRelatedColsRef:t,filteredDataRef:o}){const n=[];t.value.forEach(h=>{var c;h.sorter!==void 0&&x(n,{columnKey:h.key,sorter:h.sorter,order:(c=h.defaultSortOrder)!==null&&c!==void 0?c:!1})});const r=j(n),a=w(()=>{const h=t.value.filter(m=>m.type!=="selection"&&m.sorter!==void 0&&(m.sortOrder==="ascend"||m.sortOrder==="descend"||m.sortOrder===!1)),c=h.filter(m=>m.sortOrder!==!1);if(c.length)return c.map(m=>({columnKey:m.key,order:m.sortOrder,sorter:m.sorter}));if(h.length)return[];const{value:b}=r;return Array.isArray(b)?b:b?[b]:[]}),d=w(()=>{const h=a.value.slice().sort((c,b)=>{const m=St(c.sorter)||0;return(St(b.sorter)||0)-m});return h.length?o.value.slice().sort((b,m)=>{let y=0;return h.some(C=>{const{columnKey:A,sorter:Q,order:_}=C,B=ha(Q,A);return B&&_&&(y=B(b.rawNode,m.rawNode),y!==0)?(y=y*Ni(_),!0):!1}),y}):o.value});function l(h){let c=a.value.slice();return h&&St(h.sorter)!==!1?(c=c.filter(b=>St(b.sorter)!==!1),x(c,h),c):h||null}function s(h){const c=l(h);u(c)}function u(h){const{"onUpdate:sorter":c,onUpdateSorter:b,onSorterChange:m}=e;c&&ie(c,h),b&&ie(b,h),m&&ie(m,h),r.value=h}function v(h,c="ascend"){if(!h)p();else{const b=t.value.find(y=>y.type!=="selection"&&y.type!=="expand"&&y.key===h);if(!(b!=null&&b.sorter))return;const m=b.sorter;s({columnKey:h,sorter:m,order:c})}}function p(){u(null)}function x(h,c){const b=h.findIndex(m=>(c==null?void 0:c.columnKey)&&m.columnKey===c.columnKey);b!==void 0&&b>=0?h[b]=c:h.push(c)}return{clearSorter:p,sort:v,sortedDataRef:d,mergedSortStateRef:a,deriveNextSorter:s}}function ga(e,{dataRelatedColsRef:t}){const o=w(()=>{const f=O=>{for(let D=0;D<O.length;++D){const U=O[D];if("children"in U)return f(U.children);if(U.type==="selection")return U}return null};return f(e.columns)}),n=w(()=>{const{childrenKey:f}=e;return _t(e.data,{ignoreEmptyChildren:!0,getKey:e.rowKey,getChildren:O=>O[f],getDisabled:O=>{var D,U;return!!(!((U=(D=o.value)===null||D===void 0?void 0:D.disabled)===null||U===void 0)&&U.call(D,O))}})}),r=De(()=>{const{columns:f}=e,{length:O}=f;let D=null;for(let U=0;U<O;++U){const re=f[U];if(!re.type&&D===null&&(D=U),"tree"in re&&re.tree)return U}return D||0}),a=j({}),d=j(1),l=j(10),s=w(()=>{const f=t.value.filter(U=>U.filterOptionValues!==void 0||U.filterOptionValue!==void 0),O={};return f.forEach(U=>{var re;U.type==="selection"||U.type==="expand"||(U.filterOptionValues===void 0?O[U.key]=(re=U.filterOptionValue)!==null&&re!==void 0?re:null:O[U.key]=U.filterOptionValues)}),Object.assign(Ko(a.value),O)}),u=w(()=>{const f=s.value,{columns:O}=e;function D(ue){return(Se,oe)=>!!~String(oe[ue]).indexOf(String(Se))}const{value:{treeNodes:U}}=n,re=[];return O.forEach(ue=>{ue.type==="selection"||ue.type==="expand"||"children"in ue||re.push([ue.key,ue])}),U?U.filter(ue=>{const{rawNode:Se}=ue;for(const[oe,me]of re){let se=f[oe];if(se==null||(Array.isArray(se)||(se=[se]),!se.length))continue;const P=me.filter==="default"?D(oe):me.filter;if(me&&typeof P=="function")if(me.filterMode==="and"){if(se.some(Z=>!P(Z,Se)))return!1}else{if(se.some(Z=>P(Z,Se)))continue;return!1}}return!0}):[]}),{sortedDataRef:v,deriveNextSorter:p,mergedSortStateRef:x,sort:h,clearSorter:c}=va(e,{dataRelatedColsRef:t,filteredDataRef:u});t.value.forEach(f=>{var O;if(f.filter){const D=f.defaultFilterOptionValues;f.filterMultiple?a.value[f.key]=D||[]:D!==void 0?a.value[f.key]=D===null?[]:D:a.value[f.key]=(O=f.defaultFilterOptionValue)!==null&&O!==void 0?O:null}});const b=w(()=>{const{pagination:f}=e;if(f!==!1)return f.page}),m=w(()=>{const{pagination:f}=e;if(f!==!1)return f.pageSize}),y=rt(b,d),C=rt(m,l),A=De(()=>{const f=y.value;return e.remote?f:Math.max(1,Math.min(Math.ceil(u.value.length/C.value),f))}),Q=w(()=>{const{pagination:f}=e;if(f){const{pageCount:O}=f;if(O!==void 0)return O}}),_=w(()=>{if(e.remote)return n.value.treeNodes;if(!e.pagination)return v.value;const f=C.value,O=(A.value-1)*f;return v.value.slice(O,O+f)}),B=w(()=>_.value.map(f=>f.rawNode));function H(f){const{pagination:O}=e;if(O){const{onChange:D,"onUpdate:page":U,onUpdatePage:re}=O;D&&ie(D,f),re&&ie(re,f),U&&ie(U,f),V(f)}}function $(f){const{pagination:O}=e;if(O){const{onPageSizeChange:D,"onUpdate:pageSize":U,onUpdatePageSize:re}=O;D&&ie(D,f),re&&ie(re,f),U&&ie(U,f),k(f)}}const z=w(()=>{if(e.remote){const{pagination:f}=e;if(f){const{itemCount:O}=f;if(O!==void 0)return O}return}return u.value.length}),M=w(()=>Object.assign(Object.assign({},e.pagination),{onChange:void 0,onUpdatePage:void 0,onUpdatePageSize:void 0,onPageSizeChange:void 0,"onUpdate:page":H,"onUpdate:pageSize":$,page:A.value,pageSize:C.value,pageCount:z.value===void 0?Q.value:void 0,itemCount:z.value}));function V(f){const{"onUpdate:page":O,onPageChange:D,onUpdatePage:U}=e;U&&ie(U,f),O&&ie(O,f),D&&ie(D,f),d.value=f}function k(f){const{"onUpdate:pageSize":O,onPageSizeChange:D,onUpdatePageSize:U}=e;D&&ie(D,f),U&&ie(U,f),O&&ie(O,f),l.value=f}function N(f,O){const{onUpdateFilters:D,"onUpdate:filters":U,onFiltersChange:re}=e;D&&ie(D,f,O),U&&ie(U,f,O),re&&ie(re,f,O),a.value=f}function I(f,O,D,U){var re;(re=e.onUnstableColumnResize)===null||re===void 0||re.call(e,f,O,D,U)}function L(f){V(f)}function X(){E()}function E(){ee({})}function ee(f){S(f)}function S(f){f?f&&(a.value=Ko(f)):a.value={}}return{treeMateRef:n,mergedCurrentPageRef:A,mergedPaginationRef:M,paginatedDataRef:_,rawPaginatedDataRef:B,mergedFilterStateRef:s,mergedSortStateRef:x,hoverKeyRef:j(null),selectionColumnRef:o,childTriggerColIndexRef:r,doUpdateFilters:N,deriveNextSorter:p,doUpdatePageSize:k,doUpdatePage:V,onUnstableColumnResize:I,filter:S,filters:ee,clearFilter:X,clearFilters:E,clearSorter:c,page:L,sort:h}}function ba(e,{mainTableInstRef:t,mergedCurrentPageRef:o,bodyWidthRef:n}){let r=0;const a=j(),d=j(null),l=j([]),s=j(null),u=j([]),v=w(()=>Xe(e.scrollX)),p=w(()=>e.columns.filter(z=>z.fixed==="left")),x=w(()=>e.columns.filter(z=>z.fixed==="right")),h=w(()=>{const z={};let M=0;function V(k){k.forEach(N=>{const I={start:M,end:0};z[We(N)]=I,"children"in N?(V(N.children),I.end=M):(M+=Eo(N)||0,I.end=M)})}return V(p.value),z}),c=w(()=>{const z={};let M=0;function V(k){for(let N=k.length-1;N>=0;--N){const I=k[N],L={start:M,end:0};z[We(I)]=L,"children"in I?(V(I.children),L.end=M):(M+=Eo(I)||0,L.end=M)}}return V(x.value),z});function b(){var z,M;const{value:V}=p;let k=0;const{value:N}=h;let I=null;for(let L=0;L<V.length;++L){const X=We(V[L]);if(r>(((z=N[X])===null||z===void 0?void 0:z.start)||0)-k)I=X,k=((M=N[X])===null||M===void 0?void 0:M.end)||0;else break}d.value=I}function m(){l.value=[];let z=e.columns.find(M=>We(M)===d.value);for(;z&&"children"in z;){const M=z.children.length;if(M===0)break;const V=z.children[M-1];l.value.push(We(V)),z=V}}function y(){var z,M;const{value:V}=x,k=Number(e.scrollX),{value:N}=n;if(N===null)return;let I=0,L=null;const{value:X}=c;for(let E=V.length-1;E>=0;--E){const ee=We(V[E]);if(Math.round(r+(((z=X[ee])===null||z===void 0?void 0:z.start)||0)+N-I)<k)L=ee,I=((M=X[ee])===null||M===void 0?void 0:M.end)||0;else break}s.value=L}function C(){u.value=[];let z=e.columns.find(M=>We(M)===s.value);for(;z&&"children"in z&&z.children.length;){const M=z.children[0];u.value.push(We(M)),z=M}}function A(){const z=t.value?t.value.getHeaderElement():null,M=t.value?t.value.getBodyElement():null;return{header:z,body:M}}function Q(){const{body:z}=A();z&&(z.scrollTop=0)}function _(){a.value!=="body"?Ro(H):a.value=void 0}function B(z){var M;(M=e.onScroll)===null||M===void 0||M.call(e,z),a.value!=="head"?Ro(H):a.value=void 0}function H(){const{header:z,body:M}=A();if(!M)return;const{value:V}=n;if(V!==null){if(e.maxHeight||e.flexHeight){if(!z)return;const k=r-z.scrollLeft;a.value=k!==0?"head":"body",a.value==="head"?(r=z.scrollLeft,M.scrollLeft=r):(r=M.scrollLeft,z.scrollLeft=r)}else r=M.scrollLeft;b(),m(),y(),C()}}function $(z){const{header:M}=A();M&&(M.scrollLeft=z,H())}return Ge(o,()=>{Q()}),{styleScrollXRef:v,fixedColumnLeftMapRef:h,fixedColumnRightMapRef:c,leftFixedColumnsRef:p,rightFixedColumnsRef:x,leftActiveFixedColKeyRef:d,leftActiveFixedChildrenColKeysRef:l,rightActiveFixedColKeyRef:s,rightActiveFixedChildrenColKeysRef:u,syncScrollState:H,handleTableBodyScroll:B,handleTableHeaderScroll:_,setHeaderScrollLeft:$}}function ma(){const e=j({});function t(r){return e.value[r]}function o(r,a){yn(r)&&"key"in r&&(e.value[r.key]=a)}function n(){e.value={}}return{getResizableWidth:t,doUpdateResizableWidth:o,clearResizableWidth:n}}function xa(e,t){const o=[],n=[],r=[],a=new WeakMap;let d=-1,l=0,s=!1;function u(x,h){h>d&&(o[h]=[],d=h);for(const c of x)if("children"in c)u(c.children,h+1);else{const b="key"in c?c.key:void 0;n.push({key:We(c),style:Ei(c,b!==void 0?Xe(t(b)):void 0),column:c}),l+=1,s||(s=!!c.ellipsis),r.push(c)}}u(e,0);let v=0;function p(x,h){let c=0;x.forEach((b,m)=>{var y;if("children"in b){const C=v,A={column:b,colSpan:0,rowSpan:1,isLast:!1};p(b.children,h+1),b.children.forEach(Q=>{var _,B;A.colSpan+=(B=(_=a.get(Q))===null||_===void 0?void 0:_.colSpan)!==null&&B!==void 0?B:0}),C+A.colSpan===l&&(A.isLast=!0),a.set(b,A),o[h].push(A)}else{if(v<c){v+=1;return}let C=1;"titleColSpan"in b&&(C=(y=b.titleColSpan)!==null&&y!==void 0?y:1),C>1&&(c=v+C);const A=v+C===l,Q={column:b,colSpan:C,rowSpan:d-h+1,isLast:A};a.set(b,Q),o[h].push(Q),v+=1}})}return p(e,0),{hasEllipsis:s,rows:o,cols:n,dataRelatedCols:r}}function ya(e,t){const o=w(()=>xa(e.columns,t));return{rowsRef:w(()=>o.value.rows),colsRef:w(()=>o.value.cols),hasEllipsisRef:w(()=>o.value.hasEllipsis),dataRelatedColsRef:w(()=>o.value.dataRelatedCols)}}function Ca(e,t){const o=De(()=>{for(const u of e.columns)if(u.type==="expand")return u.renderExpand}),n=De(()=>{let u;for(const v of e.columns)if(v.type==="expand"){u=v.expandable;break}return u}),r=j(e.defaultExpandAll?o!=null&&o.value?(()=>{const u=[];return t.value.treeNodes.forEach(v=>{var p;!((p=n.value)===null||p===void 0)&&p.call(n,v.rawNode)&&u.push(v.key)}),u})():t.value.getNonLeafKeys():e.defaultExpandedRowKeys),a=ae(e,"expandedRowKeys"),d=ae(e,"stickyExpandedRows"),l=rt(a,r);function s(u){const{onUpdateExpandedRowKeys:v,"onUpdate:expandedRowKeys":p}=e;v&&ie(v,u),p&&ie(p,u),r.value=u}return{stickyExpandedRowsRef:d,mergedExpandedRowKeysRef:l,renderExpandRef:o,expandableRef:n,doUpdateExpandedRowKeys:s}}const Wo=Sa(),wa=ne([R("data-table",`
|
|
588
|
-
width: 100%;
|
|
589
|
-
font-size: var(--n-font-size);
|
|
590
|
-
display: flex;
|
|
591
|
-
flex-direction: column;
|
|
592
|
-
position: relative;
|
|
593
|
-
--n-merged-th-color: var(--n-th-color);
|
|
594
|
-
--n-merged-td-color: var(--n-td-color);
|
|
595
|
-
--n-merged-border-color: var(--n-border-color);
|
|
596
|
-
--n-merged-th-color-hover: var(--n-th-color-hover);
|
|
597
|
-
--n-merged-td-color-hover: var(--n-td-color-hover);
|
|
598
|
-
--n-merged-td-color-striped: var(--n-td-color-striped);
|
|
599
|
-
`,[R("data-table-wrapper",`
|
|
600
|
-
flex-grow: 1;
|
|
601
|
-
display: flex;
|
|
602
|
-
flex-direction: column;
|
|
603
|
-
`),W("flex-height",[ne(">",[R("data-table-wrapper",[ne(">",[R("data-table-base-table",`
|
|
604
|
-
display: flex;
|
|
605
|
-
flex-direction: column;
|
|
606
|
-
flex-grow: 1;
|
|
607
|
-
`,[ne(">",[R("data-table-base-table-body","flex-basis: 0;",[ne("&:last-child","flex-grow: 1;")])])])])])])]),ne(">",[R("data-table-loading-wrapper",`
|
|
608
|
-
color: var(--n-loading-color);
|
|
609
|
-
font-size: var(--n-loading-size);
|
|
610
|
-
position: absolute;
|
|
611
|
-
left: 50%;
|
|
612
|
-
top: 50%;
|
|
613
|
-
transform: translateX(-50%) translateY(-50%);
|
|
614
|
-
transition: color .3s var(--n-bezier);
|
|
615
|
-
display: flex;
|
|
616
|
-
align-items: center;
|
|
617
|
-
justify-content: center;
|
|
618
|
-
`,[Bt({originalTransform:"translateX(-50%) translateY(-50%)"})])]),R("data-table-expand-placeholder",`
|
|
619
|
-
margin-right: 8px;
|
|
620
|
-
display: inline-block;
|
|
621
|
-
width: 16px;
|
|
622
|
-
height: 1px;
|
|
623
|
-
`),R("data-table-indent",`
|
|
624
|
-
display: inline-block;
|
|
625
|
-
height: 1px;
|
|
626
|
-
`),R("data-table-expand-trigger",`
|
|
627
|
-
display: inline-flex;
|
|
628
|
-
margin-right: 8px;
|
|
629
|
-
cursor: pointer;
|
|
630
|
-
font-size: 16px;
|
|
631
|
-
vertical-align: -0.2em;
|
|
632
|
-
position: relative;
|
|
633
|
-
width: 16px;
|
|
634
|
-
height: 16px;
|
|
635
|
-
color: var(--n-td-text-color);
|
|
636
|
-
transition: color .3s var(--n-bezier);
|
|
637
|
-
`,[W("expanded",[R("icon","transform: rotate(90deg);",[xt({originalTransform:"rotate(90deg)"})]),R("base-icon","transform: rotate(90deg);",[xt({originalTransform:"rotate(90deg)"})])]),R("base-loading",`
|
|
638
|
-
color: var(--n-loading-color);
|
|
639
|
-
transition: color .3s var(--n-bezier);
|
|
640
|
-
position: absolute;
|
|
641
|
-
left: 0;
|
|
642
|
-
right: 0;
|
|
643
|
-
top: 0;
|
|
644
|
-
bottom: 0;
|
|
645
|
-
`,[xt()]),R("icon",`
|
|
646
|
-
position: absolute;
|
|
647
|
-
left: 0;
|
|
648
|
-
right: 0;
|
|
649
|
-
top: 0;
|
|
650
|
-
bottom: 0;
|
|
651
|
-
`,[xt()]),R("base-icon",`
|
|
652
|
-
position: absolute;
|
|
653
|
-
left: 0;
|
|
654
|
-
right: 0;
|
|
655
|
-
top: 0;
|
|
656
|
-
bottom: 0;
|
|
657
|
-
`,[xt()])]),R("data-table-thead",`
|
|
658
|
-
transition: background-color .3s var(--n-bezier);
|
|
659
|
-
background-color: var(--n-merged-th-color);
|
|
660
|
-
`),R("data-table-tr",`
|
|
661
|
-
box-sizing: border-box;
|
|
662
|
-
background-clip: padding-box;
|
|
663
|
-
transition: background-color .3s var(--n-bezier);
|
|
664
|
-
`,[R("data-table-expand",`
|
|
665
|
-
position: sticky;
|
|
666
|
-
left: 0;
|
|
667
|
-
overflow: hidden;
|
|
668
|
-
margin: calc(var(--n-th-padding) * -1);
|
|
669
|
-
padding: var(--n-th-padding);
|
|
670
|
-
box-sizing: border-box;
|
|
671
|
-
`),W("striped","background-color: var(--n-merged-td-color-striped);",[R("data-table-td","background-color: var(--n-merged-td-color-striped);")]),Ue("summary",[ne("&:hover","background-color: var(--n-merged-td-color-hover);",[ne(">",[R("data-table-td","background-color: var(--n-merged-td-color-hover);")])])])]),R("data-table-th",`
|
|
672
|
-
padding: var(--n-th-padding);
|
|
673
|
-
position: relative;
|
|
674
|
-
text-align: start;
|
|
675
|
-
box-sizing: border-box;
|
|
676
|
-
background-color: var(--n-merged-th-color);
|
|
677
|
-
border-color: var(--n-merged-border-color);
|
|
678
|
-
border-bottom: 1px solid var(--n-merged-border-color);
|
|
679
|
-
color: var(--n-th-text-color);
|
|
680
|
-
transition:
|
|
681
|
-
border-color .3s var(--n-bezier),
|
|
682
|
-
color .3s var(--n-bezier),
|
|
683
|
-
background-color .3s var(--n-bezier);
|
|
684
|
-
font-weight: var(--n-th-font-weight);
|
|
685
|
-
`,[W("filterable",`
|
|
686
|
-
padding-right: 36px;
|
|
687
|
-
`,[W("sortable",`
|
|
688
|
-
padding-right: calc(var(--n-th-padding) + 36px);
|
|
689
|
-
`)]),Wo,W("selection",`
|
|
690
|
-
padding: 0;
|
|
691
|
-
text-align: center;
|
|
692
|
-
line-height: 0;
|
|
693
|
-
z-index: 3;
|
|
694
|
-
`),le("title-wrapper",`
|
|
695
|
-
display: flex;
|
|
696
|
-
align-items: center;
|
|
697
|
-
flex-wrap: nowrap;
|
|
698
|
-
max-width: 100%;
|
|
699
|
-
`,[le("title",`
|
|
700
|
-
flex: 1;
|
|
701
|
-
min-width: 0;
|
|
702
|
-
`)]),le("ellipsis",`
|
|
703
|
-
display: inline-block;
|
|
704
|
-
vertical-align: bottom;
|
|
705
|
-
text-overflow: ellipsis;
|
|
706
|
-
overflow: hidden;
|
|
707
|
-
white-space: nowrap;
|
|
708
|
-
max-width: 100%;
|
|
709
|
-
`),W("hover",`
|
|
710
|
-
background-color: var(--n-merged-th-color-hover);
|
|
711
|
-
`),W("sortable",`
|
|
712
|
-
cursor: pointer;
|
|
713
|
-
`,[le("ellipsis",`
|
|
714
|
-
max-width: calc(100% - 18px);
|
|
715
|
-
`),ne("&:hover",`
|
|
716
|
-
background-color: var(--n-merged-th-color-hover);
|
|
717
|
-
`)]),R("data-table-sorter",`
|
|
718
|
-
height: var(--n-sorter-size);
|
|
719
|
-
width: var(--n-sorter-size);
|
|
720
|
-
margin-left: 4px;
|
|
721
|
-
position: relative;
|
|
722
|
-
display: inline-flex;
|
|
723
|
-
align-items: center;
|
|
724
|
-
justify-content: center;
|
|
725
|
-
vertical-align: -0.2em;
|
|
726
|
-
color: var(--n-th-icon-color);
|
|
727
|
-
transition: color .3s var(--n-bezier);
|
|
728
|
-
`,[R("base-icon","transition: transform .3s var(--n-bezier)"),W("desc",[R("base-icon",`
|
|
729
|
-
transform: rotate(0deg);
|
|
730
|
-
`)]),W("asc",[R("base-icon",`
|
|
731
|
-
transform: rotate(-180deg);
|
|
732
|
-
`)]),W("asc, desc",`
|
|
733
|
-
color: var(--n-th-icon-color-active);
|
|
734
|
-
`)]),R("data-table-resize-button",`
|
|
735
|
-
width: var(--n-resizable-container-size);
|
|
736
|
-
position: absolute;
|
|
737
|
-
top: 0;
|
|
738
|
-
right: calc(var(--n-resizable-container-size) / 2);
|
|
739
|
-
bottom: 0;
|
|
740
|
-
cursor: col-resize;
|
|
741
|
-
user-select: none;
|
|
742
|
-
`,[ne("&::after",`
|
|
743
|
-
width: var(--n-resizable-size);
|
|
744
|
-
height: 50%;
|
|
745
|
-
position: absolute;
|
|
746
|
-
top: 50%;
|
|
747
|
-
left: calc(var(--n-resizable-container-size) / 2);
|
|
748
|
-
bottom: 0;
|
|
749
|
-
background-color: var(--n-merged-border-color);
|
|
750
|
-
transform: translateY(-50%);
|
|
751
|
-
transition: background-color .3s var(--n-bezier);
|
|
752
|
-
z-index: 1;
|
|
753
|
-
content: '';
|
|
754
|
-
`),W("active",[ne("&::after",`
|
|
755
|
-
background-color: var(--n-th-icon-color-active);
|
|
756
|
-
`)]),ne("&:hover::after",`
|
|
757
|
-
background-color: var(--n-th-icon-color-active);
|
|
758
|
-
`)]),R("data-table-filter",`
|
|
759
|
-
position: absolute;
|
|
760
|
-
z-index: auto;
|
|
761
|
-
right: 0;
|
|
762
|
-
width: 36px;
|
|
763
|
-
top: 0;
|
|
764
|
-
bottom: 0;
|
|
765
|
-
cursor: pointer;
|
|
766
|
-
display: flex;
|
|
767
|
-
justify-content: center;
|
|
768
|
-
align-items: center;
|
|
769
|
-
transition:
|
|
770
|
-
background-color .3s var(--n-bezier),
|
|
771
|
-
color .3s var(--n-bezier);
|
|
772
|
-
font-size: var(--n-filter-size);
|
|
773
|
-
color: var(--n-th-icon-color);
|
|
774
|
-
`,[ne("&:hover",`
|
|
775
|
-
background-color: var(--n-th-button-color-hover);
|
|
776
|
-
`),W("show",`
|
|
777
|
-
background-color: var(--n-th-button-color-hover);
|
|
778
|
-
`),W("active",`
|
|
779
|
-
background-color: var(--n-th-button-color-hover);
|
|
780
|
-
color: var(--n-th-icon-color-active);
|
|
781
|
-
`)])]),R("data-table-td",`
|
|
782
|
-
padding: var(--n-td-padding);
|
|
783
|
-
text-align: start;
|
|
784
|
-
box-sizing: border-box;
|
|
785
|
-
border: none;
|
|
786
|
-
background-color: var(--n-merged-td-color);
|
|
787
|
-
color: var(--n-td-text-color);
|
|
788
|
-
border-bottom: 1px solid var(--n-merged-border-color);
|
|
789
|
-
transition:
|
|
790
|
-
box-shadow .3s var(--n-bezier),
|
|
791
|
-
background-color .3s var(--n-bezier),
|
|
792
|
-
border-color .3s var(--n-bezier),
|
|
793
|
-
color .3s var(--n-bezier);
|
|
794
|
-
`,[W("expand",[R("data-table-expand-trigger",`
|
|
795
|
-
margin-right: 0;
|
|
796
|
-
`)]),W("last-row",`
|
|
797
|
-
border-bottom: 0 solid var(--n-merged-border-color);
|
|
798
|
-
`,[ne("&::after",`
|
|
799
|
-
bottom: 0 !important;
|
|
800
|
-
`),ne("&::before",`
|
|
801
|
-
bottom: 0 !important;
|
|
802
|
-
`)]),W("summary",`
|
|
803
|
-
background-color: var(--n-merged-th-color);
|
|
804
|
-
`),W("hover",`
|
|
805
|
-
background-color: var(--n-merged-td-color-hover);
|
|
806
|
-
`),le("ellipsis",`
|
|
807
|
-
display: inline-block;
|
|
808
|
-
text-overflow: ellipsis;
|
|
809
|
-
overflow: hidden;
|
|
810
|
-
white-space: nowrap;
|
|
811
|
-
max-width: 100%;
|
|
812
|
-
vertical-align: bottom;
|
|
813
|
-
max-width: calc(100% - var(--indent-offset, -1.5) * 16px - 24px);
|
|
814
|
-
`),W("selection, expand",`
|
|
815
|
-
text-align: center;
|
|
816
|
-
padding: 0;
|
|
817
|
-
line-height: 0;
|
|
818
|
-
`),Wo]),R("data-table-empty",`
|
|
819
|
-
box-sizing: border-box;
|
|
820
|
-
padding: var(--n-empty-padding);
|
|
821
|
-
flex-grow: 1;
|
|
822
|
-
flex-shrink: 0;
|
|
823
|
-
opacity: 1;
|
|
824
|
-
display: flex;
|
|
825
|
-
align-items: center;
|
|
826
|
-
justify-content: center;
|
|
827
|
-
transition: opacity .3s var(--n-bezier);
|
|
828
|
-
`,[W("hide",`
|
|
829
|
-
opacity: 0;
|
|
830
|
-
`)]),le("pagination",`
|
|
831
|
-
margin: var(--n-pagination-margin);
|
|
832
|
-
display: flex;
|
|
833
|
-
justify-content: flex-end;
|
|
834
|
-
`),R("data-table-wrapper",`
|
|
835
|
-
position: relative;
|
|
836
|
-
opacity: 1;
|
|
837
|
-
transition: opacity .3s var(--n-bezier), border-color .3s var(--n-bezier);
|
|
838
|
-
border-top-left-radius: var(--n-border-radius);
|
|
839
|
-
border-top-right-radius: var(--n-border-radius);
|
|
840
|
-
line-height: var(--n-line-height);
|
|
841
|
-
`),W("loading",[R("data-table-wrapper",`
|
|
842
|
-
opacity: var(--n-opacity-loading);
|
|
843
|
-
pointer-events: none;
|
|
844
|
-
`)]),W("single-column",[R("data-table-td",`
|
|
845
|
-
border-bottom: 0 solid var(--n-merged-border-color);
|
|
846
|
-
`,[ne("&::after, &::before",`
|
|
847
|
-
bottom: 0 !important;
|
|
848
|
-
`)])]),Ue("single-line",[R("data-table-th",`
|
|
849
|
-
border-right: 1px solid var(--n-merged-border-color);
|
|
850
|
-
`,[W("last",`
|
|
851
|
-
border-right: 0 solid var(--n-merged-border-color);
|
|
852
|
-
`)]),R("data-table-td",`
|
|
853
|
-
border-right: 1px solid var(--n-merged-border-color);
|
|
854
|
-
`,[W("last-col",`
|
|
855
|
-
border-right: 0 solid var(--n-merged-border-color);
|
|
856
|
-
`)])]),W("bordered",[R("data-table-wrapper",`
|
|
857
|
-
border: 1px solid var(--n-merged-border-color);
|
|
858
|
-
border-bottom-left-radius: var(--n-border-radius);
|
|
859
|
-
border-bottom-right-radius: var(--n-border-radius);
|
|
860
|
-
overflow: hidden;
|
|
861
|
-
`)]),R("data-table-base-table",[W("transition-disabled",[R("data-table-th",[ne("&::after, &::before","transition: none;")]),R("data-table-td",[ne("&::after, &::before","transition: none;")])])]),W("bottom-bordered",[R("data-table-td",[W("last-row",`
|
|
862
|
-
border-bottom: 1px solid var(--n-merged-border-color);
|
|
863
|
-
`)])]),R("data-table-table",`
|
|
864
|
-
font-variant-numeric: tabular-nums;
|
|
865
|
-
width: 100%;
|
|
866
|
-
word-break: break-word;
|
|
867
|
-
transition: background-color .3s var(--n-bezier);
|
|
868
|
-
border-collapse: separate;
|
|
869
|
-
border-spacing: 0;
|
|
870
|
-
background-color: var(--n-merged-td-color);
|
|
871
|
-
`),R("data-table-base-table-header",`
|
|
872
|
-
border-top-left-radius: calc(var(--n-border-radius) - 1px);
|
|
873
|
-
border-top-right-radius: calc(var(--n-border-radius) - 1px);
|
|
874
|
-
z-index: 3;
|
|
875
|
-
overflow: scroll;
|
|
876
|
-
flex-shrink: 0;
|
|
877
|
-
transition: border-color .3s var(--n-bezier);
|
|
878
|
-
scrollbar-width: none;
|
|
879
|
-
`,[ne("&::-webkit-scrollbar",`
|
|
880
|
-
width: 0;
|
|
881
|
-
height: 0;
|
|
882
|
-
`)]),R("data-table-check-extra",`
|
|
883
|
-
transition: color .3s var(--n-bezier);
|
|
884
|
-
color: var(--n-th-icon-color);
|
|
885
|
-
position: absolute;
|
|
886
|
-
font-size: 14px;
|
|
887
|
-
right: -4px;
|
|
888
|
-
top: 50%;
|
|
889
|
-
transform: translateY(-50%);
|
|
890
|
-
z-index: 1;
|
|
891
|
-
`)]),R("data-table-filter-menu",[R("scrollbar",`
|
|
892
|
-
max-height: 240px;
|
|
893
|
-
`),le("group",`
|
|
894
|
-
display: flex;
|
|
895
|
-
flex-direction: column;
|
|
896
|
-
padding: 12px 12px 0 12px;
|
|
897
|
-
`,[R("checkbox",`
|
|
898
|
-
margin-bottom: 12px;
|
|
899
|
-
margin-right: 0;
|
|
900
|
-
`),R("radio",`
|
|
901
|
-
margin-bottom: 12px;
|
|
902
|
-
margin-right: 0;
|
|
903
|
-
`)]),le("action",`
|
|
904
|
-
padding: var(--n-action-padding);
|
|
905
|
-
display: flex;
|
|
906
|
-
flex-wrap: nowrap;
|
|
907
|
-
justify-content: space-evenly;
|
|
908
|
-
border-top: 1px solid var(--n-action-divider-color);
|
|
909
|
-
`,[R("button",[ne("&:not(:last-child)",`
|
|
910
|
-
margin: var(--n-action-button-margin);
|
|
911
|
-
`),ne("&:last-child",`
|
|
912
|
-
margin-right: 0;
|
|
913
|
-
`)])]),R("divider",`
|
|
914
|
-
margin: 0 !important;
|
|
915
|
-
`)]),sr(R("data-table",`
|
|
916
|
-
--n-merged-th-color: var(--n-th-color-modal);
|
|
917
|
-
--n-merged-td-color: var(--n-td-color-modal);
|
|
918
|
-
--n-merged-border-color: var(--n-border-color-modal);
|
|
919
|
-
--n-merged-th-color-hover: var(--n-th-color-hover-modal);
|
|
920
|
-
--n-merged-td-color-hover: var(--n-td-color-hover-modal);
|
|
921
|
-
--n-merged-td-color-striped: var(--n-td-color-striped-modal);
|
|
922
|
-
`)),dr(R("data-table",`
|
|
923
|
-
--n-merged-th-color: var(--n-th-color-popover);
|
|
924
|
-
--n-merged-td-color: var(--n-td-color-popover);
|
|
925
|
-
--n-merged-border-color: var(--n-border-color-popover);
|
|
926
|
-
--n-merged-th-color-hover: var(--n-th-color-hover-popover);
|
|
927
|
-
--n-merged-td-color-hover: var(--n-td-color-hover-popover);
|
|
928
|
-
--n-merged-td-color-striped: var(--n-td-color-striped-popover);
|
|
929
|
-
`))]);function Sa(){return[W("fixed-left",`
|
|
930
|
-
left: 0;
|
|
931
|
-
position: sticky;
|
|
932
|
-
z-index: 2;
|
|
933
|
-
`,[ne("&::after",`
|
|
934
|
-
pointer-events: none;
|
|
935
|
-
content: "";
|
|
936
|
-
width: 36px;
|
|
937
|
-
display: inline-block;
|
|
938
|
-
position: absolute;
|
|
939
|
-
top: 0;
|
|
940
|
-
bottom: -1px;
|
|
941
|
-
transition: box-shadow .2s var(--n-bezier);
|
|
942
|
-
right: -36px;
|
|
943
|
-
`)]),W("fixed-right",`
|
|
944
|
-
right: 0;
|
|
945
|
-
position: sticky;
|
|
946
|
-
z-index: 1;
|
|
947
|
-
`,[ne("&::before",`
|
|
948
|
-
pointer-events: none;
|
|
949
|
-
content: "";
|
|
950
|
-
width: 36px;
|
|
951
|
-
display: inline-block;
|
|
952
|
-
position: absolute;
|
|
953
|
-
top: 0;
|
|
954
|
-
bottom: -1px;
|
|
955
|
-
transition: box-shadow .2s var(--n-bezier);
|
|
956
|
-
left: -36px;
|
|
957
|
-
`)])]}const za=he({name:"DataTable",alias:["AdvancedTable"],props:$i,setup(e,{slots:t}){const{mergedBorderedRef:o,mergedClsPrefixRef:n,inlineThemeDisabled:r}=tt(e),a=w(()=>{const{bottomBordered:K}=e;return o.value?!1:K!==void 0?K:!0}),d=Ae("DataTable","-data-table",wa,Oi,e,n),l=j(null),s=j(null),{getResizableWidth:u,clearResizableWidth:v,doUpdateResizableWidth:p}=ma(),{rowsRef:x,colsRef:h,dataRelatedColsRef:c,hasEllipsisRef:b}=ya(e,u),{treeMateRef:m,mergedCurrentPageRef:y,paginatedDataRef:C,rawPaginatedDataRef:A,selectionColumnRef:Q,hoverKeyRef:_,mergedPaginationRef:B,mergedFilterStateRef:H,mergedSortStateRef:$,childTriggerColIndexRef:z,doUpdatePage:M,doUpdateFilters:V,onUnstableColumnResize:k,deriveNextSorter:N,filter:I,filters:L,clearFilter:X,clearFilters:E,clearSorter:ee,page:S,sort:f}=ga(e,{dataRelatedColsRef:c}),{doCheckAll:O,doUncheckAll:D,doCheck:U,doUncheck:re,headerCheckboxDisabledRef:ue,someRowsCheckedRef:Se,allRowsCheckedRef:oe,mergedCheckedRowKeySetRef:me,mergedInderminateRowKeySetRef:se}=fa(e,{selectionColumnRef:Q,treeMateRef:m,paginatedDataRef:C}),{stickyExpandedRowsRef:P,mergedExpandedRowKeysRef:Z,renderExpandRef:Fe,expandableRef:J,doUpdateExpandedRowKeys:ge}=Ca(e,m),{handleTableBodyScroll:Ie,handleTableHeaderScroll:ze,syncScrollState:Pe,setHeaderScrollLeft:Le,leftActiveFixedColKeyRef:Ee,leftActiveFixedChildrenColKeysRef:ke,rightActiveFixedColKeyRef:F,rightActiveFixedChildrenColKeysRef:q,leftFixedColumnsRef:xe,rightFixedColumnsRef:je,fixedColumnLeftMapRef:Je,fixedColumnRightMapRef:Ke}=ba(e,{bodyWidthRef:l,mainTableInstRef:s,mergedCurrentPageRef:y}),{localeRef:Me}=uo("DataTable"),He=w(()=>e.virtualScroll||e.flexHeight||e.maxHeight!==void 0||b.value?"fixed":e.tableLayout);qe(Ze,{props:e,treeMateRef:m,renderExpandIconRef:ae(e,"renderExpandIcon"),loadingKeySetRef:j(new Set),slots:t,indentRef:ae(e,"indent"),childTriggerColIndexRef:z,bodyWidthRef:l,componentId:cr(),hoverKeyRef:_,mergedClsPrefixRef:n,mergedThemeRef:d,scrollXRef:w(()=>e.scrollX),rowsRef:x,colsRef:h,paginatedDataRef:C,leftActiveFixedColKeyRef:Ee,leftActiveFixedChildrenColKeysRef:ke,rightActiveFixedColKeyRef:F,rightActiveFixedChildrenColKeysRef:q,leftFixedColumnsRef:xe,rightFixedColumnsRef:je,fixedColumnLeftMapRef:Je,fixedColumnRightMapRef:Ke,mergedCurrentPageRef:y,someRowsCheckedRef:Se,allRowsCheckedRef:oe,mergedSortStateRef:$,mergedFilterStateRef:H,loadingRef:ae(e,"loading"),rowClassNameRef:ae(e,"rowClassName"),mergedCheckedRowKeySetRef:me,mergedExpandedRowKeysRef:Z,mergedInderminateRowKeySetRef:se,localeRef:Me,expandableRef:J,stickyExpandedRowsRef:P,rowKeyRef:ae(e,"rowKey"),renderExpandRef:Fe,summaryRef:ae(e,"summary"),virtualScrollRef:ae(e,"virtualScroll"),rowPropsRef:ae(e,"rowProps"),stripedRef:ae(e,"striped"),checkOptionsRef:w(()=>{const{value:K}=Q;return K==null?void 0:K.options}),rawPaginatedDataRef:A,filterMenuCssVarsRef:w(()=>{const{self:{actionDividerColor:K,actionPadding:be,actionButtonMargin:we}}=d.value;return{"--n-action-padding":be,"--n-action-button-margin":we,"--n-action-divider-color":K}}),onLoadRef:ae(e,"onLoad"),mergedTableLayoutRef:He,maxHeightRef:ae(e,"maxHeight"),minHeightRef:ae(e,"minHeight"),flexHeightRef:ae(e,"flexHeight"),headerCheckboxDisabledRef:ue,paginationBehaviorOnFilterRef:ae(e,"paginationBehaviorOnFilter"),summaryPlacementRef:ae(e,"summaryPlacement"),scrollbarPropsRef:ae(e,"scrollbarProps"),syncScrollState:Pe,doUpdatePage:M,doUpdateFilters:V,getResizableWidth:u,onUnstableColumnResize:k,clearResizableWidth:v,doUpdateResizableWidth:p,deriveNextSorter:N,doCheck:U,doUncheck:re,doCheckAll:O,doUncheckAll:D,doUpdateExpandedRowKeys:ge,handleTableHeaderScroll:ze,handleTableBodyScroll:Ie,setHeaderScrollLeft:Le,renderCell:ae(e,"renderCell")});const Ne={filter:I,filters:L,clearFilters:E,clearSorter:ee,page:S,sort:f,clearFilter:X,scrollTo:(K,be)=>{var we;(we=s.value)===null||we===void 0||we.scrollTo(K,be)}},G=w(()=>{const{size:K}=e,{common:{cubicBezierEaseInOut:be},self:{borderColor:we,tdColorHover:g,thColor:T,thColorHover:Y,tdColor:fe,tdTextColor:ve,thTextColor:de,thFontWeight:pe,thButtonColorHover:Re,thIconColor:Oe,thIconColorActive:Qe,filterSize:Be,borderRadius:_e,lineHeight:ht,tdColorModal:pt,thColorModal:vt,borderColorModal:gt,thColorHoverModal:bt,tdColorHoverModal:mt,borderColorPopover:Lt,thColorPopover:Et,tdColorPopover:Kt,tdColorHoverPopover:Ht,thColorHoverPopover:Dt,paginationMargin:jt,emptyPadding:Ut,boxShadowAfter:Wt,boxShadowBefore:Vt,sorterSize:qt,resizableContainerSize:Gt,resizableSize:Xt,loadingColor:Zt,loadingSize:Mn,opacityLoading:On,tdColorStriped:Tn,tdColorStripedModal:Bn,tdColorStripedPopover:$n,[ce("fontSize",K)]:In,[ce("thPadding",K)]:An,[ce("tdPadding",K)]:_n}}=d.value;return{"--n-font-size":In,"--n-th-padding":An,"--n-td-padding":_n,"--n-bezier":be,"--n-border-radius":_e,"--n-line-height":ht,"--n-border-color":we,"--n-border-color-modal":gt,"--n-border-color-popover":Lt,"--n-th-color":T,"--n-th-color-hover":Y,"--n-th-color-modal":vt,"--n-th-color-hover-modal":bt,"--n-th-color-popover":Et,"--n-th-color-hover-popover":Dt,"--n-td-color":fe,"--n-td-color-hover":g,"--n-td-color-modal":pt,"--n-td-color-hover-modal":mt,"--n-td-color-popover":Kt,"--n-td-color-hover-popover":Ht,"--n-th-text-color":de,"--n-td-text-color":ve,"--n-th-font-weight":pe,"--n-th-button-color-hover":Re,"--n-th-icon-color":Oe,"--n-th-icon-color-active":Qe,"--n-filter-size":Be,"--n-pagination-margin":jt,"--n-empty-padding":Ut,"--n-box-shadow-before":Vt,"--n-box-shadow-after":Wt,"--n-sorter-size":qt,"--n-resizable-container-size":Gt,"--n-resizable-size":Xt,"--n-loading-size":Mn,"--n-loading-color":Zt,"--n-opacity-loading":On,"--n-td-color-striped":Tn,"--n-td-color-striped-modal":Bn,"--n-td-color-striped-popover":$n}}),te=r?at("data-table",w(()=>e.size[0]),G,e):void 0,Ce=w(()=>{if(!e.pagination)return!1;if(e.paginateSinglePage)return!0;const K=B.value,{pageCount:be}=K;return be!==void 0?be>1:K.itemCount&&K.pageSize&&K.itemCount>K.pageSize});return Object.assign({mainTableInstRef:s,mergedClsPrefix:n,mergedTheme:d,paginatedData:C,mergedBordered:o,mergedBottomBordered:a,mergedPagination:B,mergedShowPagination:Ce,cssVars:r?void 0:G,themeClass:te==null?void 0:te.themeClass,onRender:te==null?void 0:te.onRender},Ne)},render(){const{mergedClsPrefix:e,themeClass:t,onRender:o,$slots:n,spinProps:r}=this;return o==null||o(),i("div",{class:[`${e}-data-table`,t,{[`${e}-data-table--bordered`]:this.mergedBordered,[`${e}-data-table--bottom-bordered`]:this.mergedBottomBordered,[`${e}-data-table--single-line`]:this.singleLine,[`${e}-data-table--single-column`]:this.singleColumn,[`${e}-data-table--loading`]:this.loading,[`${e}-data-table--flex-height`]:this.flexHeight}],style:this.cssVars},i("div",{class:`${e}-data-table-wrapper`},i(ua,{ref:"mainTableInstRef"})),this.mergedShowPagination?i("div",{class:`${e}-data-table__pagination`},i(Si,Object.assign({theme:this.mergedTheme.peers.Pagination,themeOverrides:this.mergedTheme.peerOverrides.Pagination,disabled:this.loading},this.mergedPagination))):null,i(Tt,{name:"fade-in-scale-up-transition"},{default:()=>this.loading?i("div",{class:`${e}-data-table-loading-wrapper`},$t(n.loading,()=>[i(lo,Object.assign({clsPrefix:e,strokeWidth:20},r))])):null}))}}),Ra={async mounted(e,t){await nt(),t.value(e.getClientRects()[0])},async updated(e,t){await nt(),t.value(e.getClientRects()[0])}},yt=e=>{const t=io({...e,render(o,n){var r;return Zo(ur("span",{class:"whitespace-nowrap"},[(r=e.render)==null?void 0:r.call(e,o,n)]),[[Ra,a=>{t.width=Math.max(Math.ceil(a.width+16),t.width||0,Number(t.minWidth||0))}]])}});return t},Vo=e=>`${ko(e).manufacturer} Android${ko(e).release||"13"}`,Ma=()=>{const e=io({key:"id",title:"创建时间",fixed:"left",width:"130px",sortOrder:!1,sorter(s,u){return s.id-u.id},render(s){return Tr(s.id).format("MM-DD HH:mm:ss")}}),t=yt({key:"versionRelease",title:"设备",filterMultiple:!0,minWidth:100,filter(s,u){return Vo(u).includes(s.toString())},render(s){return Vo(s)}}),o=yt({key:"appName",minWidth:100,title:"APP名称",filterMultiple:!0,filter(s,u){return s.toString()==u.appName},render(s){return s.appName}}),n=yt({key:"appId",title:"ID",minWidth:100,render(s){return s.appId}}),r=yt({key:"appVersionCode",title:"版本代码",minWidth:150,render(s){return s.appVersionCode}}),a=yt({key:"appVersionName",title:"版本号",minWidth:150,render(s){return s.appVersionName}}),d=io({key:"activityId",title:"界面ID",filterMultiple:!0,filter(s,u){return s.toString()==u.activityId},render(s){return s.activityId}});return{ctimeCol:e,deviceCol:t,appNameCol:o,appIdCol:n,appVersionCodeCol:r,appVersionNameCol:a,activityIdCol:d,reseColWidth:()=>{t.width=void 0,o.width=void 0,n.width=void 0,r.width=void 0,a.width=void 0}}};export{za as N,gi as a,Vo as r,Ma as u};
|
|
958
|
-
//# sourceMappingURL=table-d01f58e1.js.map
|