@acedatacloud/nexior 3.11.0 → 3.11.1
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/assets/{Auth-yB0CeE45.js → Auth-Uv_IvbtF.js} +1 -1
- package/dist/assets/{BotPlaceholder-UYTmTQfX.js → BotPlaceholder-DwgRH20-.js} +1 -1
- package/dist/assets/{Callback-BtSDibG6.js → Callback-ByCCzWcg.js} +1 -1
- package/dist/assets/{Console-C9ZaBgGb.js → Console-DHwwvfxZ.js} +1 -1
- package/dist/assets/{Conversation-C2Bxv62z.js → Conversation-BpaSz31f.js} +2 -2
- package/dist/assets/{CopyToClipboard-CVDOXZ-a.js → CopyToClipboard-B_zjEArC.js} +1 -1
- package/dist/assets/{Detail-SSvP24MP.js → Detail-CldUUlYK.js} +1 -1
- package/dist/assets/{EditArray-BoexcGfM.js → EditArray-Bt1sWXgD.js} +1 -1
- package/dist/assets/{Extra-OoDxCqCt.js → Extra-D06dGtrC.js} +1 -1
- package/dist/assets/{FilePreview-Dlnwdpd4.js → FilePreview-BTDh_yU5.js} +1 -1
- package/dist/assets/{History-SNU6XfwJ.js → History-BjWm608N.js} +1 -1
- package/dist/assets/{ImagePreview-KNv7fJqR.js → ImagePreview-B_rmftlm.js} +1 -1
- package/dist/assets/{ImageWrapper-C_vFtEZX.js → ImageWrapper-IsRbsLXL.js} +1 -1
- package/dist/assets/{Index-BDfHKHFK.js → Index-4bHarnDT.js} +1 -1
- package/dist/assets/{Index-B7mf0uql.js → Index-B1debl89.js} +1 -1
- package/dist/assets/{Index-BwPijVkk.js → Index-BP7CYQ7P.js} +1 -1
- package/dist/assets/{Index-CC4G3jtU.js → Index-BSbUQIbg.js} +1 -1
- package/dist/assets/{Index-D9QA5j35.js → Index-C0q2dzjc.js} +1 -1
- package/dist/assets/{Index-CbJhphXQ.js → Index-C86zmZAm.js} +1 -1
- package/dist/assets/{Index-Tx4dngrL.js → Index-CD5ywDjH.js} +1 -1
- package/dist/assets/{Index-Cpudt58V.js → Index-CMHnESeE.js} +1 -1
- package/dist/assets/{Index-CfzeJAfW.js → Index-Cd_bZOhx.js} +1 -1
- package/dist/assets/{Index-DvUTtwhr.js → Index-CeuNLk_f.js} +1 -1
- package/dist/assets/Index-DqWTPyqq.js +1 -0
- package/dist/assets/{Index-B4wVJnzn.css → Index-PPPaGVos.css} +1 -1
- package/dist/assets/{Index-QWMJwQdg.js → Index-U3dqcrDR.js} +1 -1
- package/dist/assets/{Index-Bglj4mEd.js → Index-Yx6X3Qm1.js} +1 -1
- package/dist/assets/{InfoIcon-CijoMMMz.js → InfoIcon-C_-GVrFj.js} +1 -1
- package/dist/assets/{Invitees-BJRwEWVb.js → Invitees-BPVP0Aih.js} +1 -1
- package/dist/assets/{List-Ivm0DPbF.js → List-D-4zj9go.js} +1 -1
- package/dist/assets/{List-ChZSO58k.js → List-E-lT1rwt.js} +1 -1
- package/dist/assets/{List-CdyalDB0.js → List-OpmDGTjj.js} +1 -1
- package/dist/assets/{Login-BhN-WMGi.js → Login-6lS0WBm3.js} +1 -1
- package/dist/assets/{Main-CMPcVepk.js → Main-CPaYaYMS.js} +1 -1
- package/dist/assets/{Navigator-B01Aq9Hg.js → Navigator-DM74lcQp.js} +1 -1
- package/dist/assets/{NoTasks-CocWVrlG.js → NoTasks-Cc2t-KhB.js} +1 -1
- package/dist/assets/{Pagination-Ots2yYuN.js → Pagination-C5BddcIC.js} +1 -1
- package/dist/assets/{Status-BQn5-WVc.js → Status-CEpyyIqD.js} +1 -1
- package/dist/assets/{Subscribe-iEJxZHxT.js → Subscribe-DD2lmhnE.js} +1 -1
- package/dist/assets/{VideoPlayer-C0MqtCQO.js → VideoPlayer-pXfQbDQT.js} +1 -1
- package/dist/assets/{_Uint8Array-CFF3tqTI.js → _Uint8Array-C21Rl0N8.js} +1 -1
- package/dist/assets/{_baseClone-DxikSyNf.js → _baseClone-B-ja3TJc.js} +1 -1
- package/dist/assets/{_baseIteratee-DkeT1DK7.js → _baseIteratee-JKg-PLGw.js} +1 -1
- package/dist/assets/{_initCloneObject-15wE_65Y.js → _initCloneObject-VeD_6fht.js} +1 -1
- package/dist/assets/{castArray-DF9exNaC.js → castArray-CjJRTN8w.js} +1 -1
- package/dist/assets/{debounce-DIgj7DCo.js → debounce-DPEiv4qa.js} +1 -1
- package/dist/assets/{distribution-CLzzUrpW.js → distribution-mwsaLSCr.js} +1 -1
- package/dist/assets/{dropdown-CxWjiH2O.js → dropdown-CpNXmULE.js} +1 -1
- package/dist/assets/{index-DocBE9iv.js → index-52Xy00cP.js} +1 -1
- package/dist/assets/{index-Hc-BbYQ6.js → index-BCDVF19o.js} +1 -1
- package/dist/assets/{index-Dy-wDVPV.js → index-BIeRBgdC.js} +1 -1
- package/dist/assets/{index-BPSPAB35.js → index-BO9akAqw.js} +1 -1
- package/dist/assets/{index-BTeCKWcI.js → index-BWD3Nss6.js} +1 -1
- package/dist/assets/{index-CGMy-mxm.js → index-BXSgDlie.js} +1 -1
- package/dist/assets/{index-DdY8PKQv.js → index-BXaZ87x3.js} +1 -1
- package/dist/assets/{index-D2tyb6wy.js → index-BeBmiTmh.js} +1 -1
- package/dist/assets/{index-BrdKF5yA.js → index-BeZMFg4Z.js} +1 -1
- package/dist/assets/{index-C7Wx0X9v.js → index-Bzx9vpDl.js} +1 -1
- package/dist/assets/{index-Cb8UQUPX.js → index-C094cc3A.js} +1 -1
- package/dist/assets/{index-BiFV7IEN.js → index-CY9KGeTn.js} +1 -1
- package/dist/assets/{index-DM-McChS.js → index-Cbr5I2Y9.js} +8 -8
- package/dist/assets/{index-cm1Ch8j7.js → index-D-qMYOzj.js} +1 -1
- package/dist/assets/{index-C0t9rMvj.js → index-D8KZMM1b.js} +1 -1
- package/dist/assets/{index-DKr_xH2f.js → index-DFk1FoEG.js} +1 -1
- package/dist/assets/{index-CCbHa9JO.js → index-DYcbA4Xy.js} +1 -1
- package/dist/assets/{index-UrRqTynA.js → index-Dcs3jWJX.js} +1 -1
- package/dist/assets/{index-UCEZcelc.js → index-De_ntG9v.js} +1 -1
- package/dist/assets/{index-tl1Kf-hL.js → index-DmkicCz4.js} +1 -1
- package/dist/assets/{index-Dl_ff5ni.js → index-EFW5HXXl.js} +1 -1
- package/dist/assets/{index-T_Hh32Hb.js → index-HscBp0fS.js} +1 -1
- package/dist/assets/{index-5RZmISot.js → index-IHqDwSxu.js} +1 -1
- package/dist/assets/{index-Bc05C7Iq.js → index-MUigFyNQ.js} +1 -1
- package/dist/assets/{index-JW39oOEU.js → index-Tlw0DGaS.js} +1 -1
- package/dist/assets/{index-CwfVnyAs.js → index-XZ6jwXk2.js} +1 -1
- package/dist/assets/{index-BtkTmjB7.js → index-_Q_QIBBy.js} +1 -1
- package/dist/assets/{index-BmqnE4_p.js → index-cur6am9k.js} +1 -1
- package/dist/assets/{index-Bq_Fgsk6.js → index-v77iUQMy.js} +1 -1
- package/dist/assets/{index.es-CmAoTyVL.js → index.es-DaeHBJIN.js} +1 -1
- package/dist/assets/{isEqual-BerUtaWm.js → isEqual-By-euu_c.js} +1 -1
- package/dist/assets/{isPlainObject-BY0szB_N.js → isPlainObject-DC7IXBFc.js} +1 -1
- package/dist/assets/{order-DGTaix-M.js → order-D77l3vr6.js} +1 -1
- package/dist/assets/{price-DrK20qlf.js → price-DfAGvI7c.js} +1 -1
- package/dist/assets/{strings-RzDk29K3.js → strings-CzjyDUaH.js} +1 -1
- package/dist/assets/{typescript-LPT8zmb-.js → typescript-BMcXT3c_.js} +1 -1
- package/dist/assets/{use-form-item-ckkxdj9G.js → use-form-item-DBbvHFR2.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/Index-C3wChpL_.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aA as tt,aj as E,c as u,ah as al,al as ge,bC as nt,aq as P,cZ as at,cW as X,au as G,aI as ye,_ as Se,d as re,J as ae,K as ke,b as I,o as g,r as k,t as V,x as W,af as N,n as v,a as se,aU as ol,e as Ee,c8 as De,bE as ie,am as sl,ba as H,y as $,f as he,at as Re,a$ as ot,c$ as st,aL as z,ci as it,bm as rt,bD as be,bv as Ze,bH as ut,aJ as ne,bL as Xe,d0 as dt,cf as Z,aG as ct,cq as pt,ce as il,az as ft,ai as vt,bf as mt,d1 as bt,an as le,d2 as Ye,A as ht,bG as _e,cl as gt,bQ as yt,l as j,cL as St,k as q,j as L,i as A,F as xe,v as el,D as ll,c6 as te,d3 as Ct,b6 as Ve,d4 as Ot,E as wt,c5 as It,ak as rl,bI as Et,cx as Vt,w as ul,g as Tt}from"./index-DM-McChS.js";import{u as tl,b as kt,E as Dt}from"./index-D2tyb6wy.js";import{s as Rt,E as $t}from"./index-BPSPAB35.js";import{e as Mt}from"./strings-RzDk29K3.js";import{c as U}from"./castArray-DF9exNaC.js";import{i as oe}from"./isEqual-BerUtaWm.js";import{b as Q,d as Lt}from"./typescript-LPT8zmb-.js";import{u as Bt,a as Nt}from"./use-form-item-ckkxdj9G.js";import{u as Wt,a as Pt}from"./index-JW39oOEU.js";import{d as zt}from"./debounce-DIgj7DCo.js";import{b as Ft}from"./_baseIteratee-DkeT1DK7.js";import{u as Kt}from"./index-DKr_xH2f.js";import{C as At}from"./index-UrRqTynA.js";function Ht(e,o,a,m){e.length;for(var c=a+1;c--;)if(o(e[c],c,e))return c;return-1}function Ut(e,o,a){var m=e==null?0:e.length;if(!m)return-1;var c=m-1;return Ht(e,Ft(o),c)}function Gt(){const e=tt(),o=E(0),a=11,m=u(()=>({minWidth:`${Math.max(o.value,a)}px`}));return Q(e,()=>{var S,t;o.value=(t=(S=e.value)==null?void 0:S.getBoundingClientRect().width)!=null?t:0}),{calculatorRef:e,calculatorWidth:o,inputStyle:m}}const dl=Symbol("ElSelectGroup"),Ce=Symbol("ElSelect"),Te="ElOption",jt=al({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function qt(e,o){const a=ge(Ce);a||nt(Te,"usage: <el-select><el-option /></el-select/>");const m=ge(dl,{disabled:!1}),c=u(()=>f(U(a.props.modelValue),e.value)),S=u(()=>{var s;if(a.props.multiple){const p=U((s=a.props.modelValue)!=null?s:[]);return!c.value&&p.length>=a.props.multipleLimit&&a.props.multipleLimit>0}else return!1}),t=u(()=>{var s;return(s=e.label)!=null?s:P(e.value)?"":e.value}),C=u(()=>e.value||e.label||""),h=u(()=>e.disabled||o.groupDisabled||S.value),b=ye(),f=(s=[],p)=>{if(P(e.value)){const w=a.props.valueKey;return s&&s.some(T=>at(X(T,w))===X(p,w))}else return s&&s.includes(p)},d=()=>{!e.disabled&&!m.disabled&&(a.states.hoveringIndex=a.optionsArray.indexOf(b.proxy))},i=s=>{const p=new RegExp(Mt(s),"i");o.visible=p.test(String(t.value))||e.created};return G(()=>t.value,()=>{!e.created&&!a.props.remote&&a.setSelected()}),G(()=>e.value,(s,p)=>{const{remote:w,valueKey:T}=a.props;if((w?s!==p:!oe(s,p))&&(a.onOptionDestroy(p,b.proxy),a.onOptionCreate(b.proxy)),!e.created&&!w){if(T&&P(s)&&P(p)&&s[T]===p[T])return;a.setSelected()}}),G(()=>m.disabled,()=>{o.groupDisabled=m.disabled},{immediate:!0}),{select:a,currentLabel:t,currentValue:C,itemSelected:c,isDisabled:h,hoverItem:d,updateOption:i}}const Qt=re({name:Te,componentName:Te,props:jt,setup(e){const o=se("select"),a=ol(),m=u(()=>[o.be("dropdown","item"),o.is("disabled",Ee(C)),o.is("selected",Ee(t)),o.is("hovering",Ee(i))]),c=ie({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:S,itemSelected:t,isDisabled:C,select:h,hoverItem:b,updateOption:f}=qt(e,c),{visible:d,hover:i}=De(c),s=ye().proxy;h.onOptionCreate(s),sl(()=>{const w=s.value,{selected:T}=h.states,D=T.some(y=>y.value===s.value);H(()=>{h.states.cachedOptions.get(w)===s&&!D&&h.states.cachedOptions.delete(w)}),h.onOptionDestroy(w,s)});function p(){C.value||h.handleOptionSelect(s)}return{ns:o,id:a,containerKls:m,currentLabel:S,itemSelected:t,isDisabled:C,select:h,visible:d,hover:i,states:c,hoverItem:b,updateOption:f,selectOptionClick:p}}});function Jt(e,o){return ae((g(),I("li",{id:e.id,class:v(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMousemove:e.hoverItem,onClick:N(e.selectOptionClick,["stop"])},[k(e.$slots,"default",{},()=>[V("span",null,W(e.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[ke,e.visible]])}var $e=Se(Qt,[["render",Jt],["__file","option.vue"]]);const Zt=re({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=ge(Ce),o=se("select"),a=u(()=>e.props.popperClass),m=u(()=>e.props.multiple),c=u(()=>e.props.fitInputWidth),S=E("");function t(){var C;S.value=`${(C=e.selectRef)==null?void 0:C.offsetWidth}px`}return Re(()=>{t(),Q(e.selectRef,t)}),{ns:o,minWidth:S,popperClass:a,isMultiple:m,isFitInputWidth:c}}});function Xt(e,o,a,m,c,S){return g(),I("div",{class:v([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:he({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(g(),I("div",{key:0,class:v(e.ns.be("dropdown","header"))},[k(e.$slots,"header")],2)):$("v-if",!0),k(e.$slots,"default"),e.$slots.footer?(g(),I("div",{key:1,class:v(e.ns.be("dropdown","footer"))},[k(e.$slots,"footer")],2)):$("v-if",!0)],6)}var Yt=Se(Zt,[["render",Xt],["__file","select-dropdown.vue"]]);const _t=(e,o)=>{const{t:a}=ot(),m=ol(),c=se("select"),S=se("input"),t=ie({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),C=E(),h=E(),b=E(),f=E(),d=E(),i=E(),s=E(),p=E(),w=E(),T=E(),D=E(),y=E(!1),B=E(),{form:ue,formItem:F}=Bt(),{inputId:pl}=Nt(e,{formItemContext:F}),{valueOnClear:fl,isEmptyValue:vl}=st(e),{isComposing:Me,handleCompositionStart:ml,handleCompositionUpdate:bl,handleCompositionEnd:hl}=Wt({afterComposition:l=>He(l)}),Y=u(()=>e.disabled||!!ue?.disabled),{wrapperRef:Le,isFocused:Be,handleBlur:gl}=Pt(d,{disabled:Y,afterFocus(){e.automaticDropdown&&!y.value&&(y.value=!0,t.menuVisibleOnFocus=!0)},beforeBlur(l){var n,r;return((n=b.value)==null?void 0:n.isFocusInsideContent(l))||((r=f.value)==null?void 0:r.isFocusInsideContent(l))},afterBlur(){var l;y.value=!1,t.menuVisibleOnFocus=!1,e.validateEvent&&((l=F?.validate)==null||l.call(F,"blur").catch(n=>Xe()))}}),Oe=u(()=>z(e.modelValue)?e.modelValue.length>0:!vl(e.modelValue)),yl=u(()=>{var l;return(l=ue?.statusIcon)!=null?l:!1}),Sl=u(()=>e.clearable&&!Y.value&&t.inputHovering&&Oe.value),Ne=u(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),Cl=u(()=>c.is("reverse",!!(Ne.value&&y.value))),we=u(()=>F?.validateState||""),Ol=u(()=>we.value&&it[we.value]),wl=u(()=>e.remote?300:0),Il=u(()=>e.remote&&!t.inputValue&&t.options.size===0),El=u(()=>e.loading?e.loadingText||a("el.select.loading"):e.filterable&&t.inputValue&&t.options.size>0&&_.value===0?e.noMatchText||a("el.select.noMatch"):t.options.size===0?e.noDataText||a("el.select.noData"):null),_=u(()=>R.value.filter(l=>l.visible).length),R=u(()=>{const l=Array.from(t.options.values()),n=[];return t.optionValues.forEach(r=>{const O=l.findIndex(M=>M.value===r);O>-1&&n.push(l[O])}),n.length>=l.length?n:l}),Vl=u(()=>Array.from(t.cachedOptions.values())),Tl=u(()=>{const l=R.value.filter(n=>!n.created).some(n=>n.currentLabel===t.inputValue);return e.filterable&&e.allowCreate&&t.inputValue!==""&&!l}),We=()=>{e.filterable&&ne(e.filterMethod)||e.filterable&&e.remote&&ne(e.remoteMethod)||R.value.forEach(l=>{var n;(n=l.updateOption)==null||n.call(l,t.inputValue)})},Pe=rt(),kl=u(()=>["small"].includes(Pe.value)?"small":"default"),Dl=u({get(){return y.value&&!Il.value},set(l){y.value=l}}),Rl=u(()=>{if(e.multiple&&!be(e.modelValue))return U(e.modelValue).length===0&&!t.inputValue;const l=z(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||be(l)?!t.inputValue:!0}),$l=u(()=>{var l;const n=(l=e.placeholder)!=null?l:a("el.select.placeholder");return e.multiple||!Oe.value?n:t.selectedLabel}),Ml=u(()=>Ze?null:"mouseenter");G(()=>e.modelValue,(l,n)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(t.inputValue="",de("")),ce(),!oe(l,n)&&e.validateEvent&&F?.validate("change").catch(r=>Xe())},{flush:"post",deep:!0}),G(()=>y.value,l=>{l?de(t.inputValue):(t.inputValue="",t.previousQuery=null,t.isBeforeHide=!0),o("visible-change",l)}),G(()=>t.options.entries(),()=>{ft&&(ce(),e.defaultFirstOption&&(e.filterable||e.remote)&&_.value&&ze())},{flush:"post"}),G([()=>t.hoveringIndex,R],([l])=>{vt(l)&&l>-1?B.value=R.value[l]||{}:B.value={},R.value.forEach(n=>{n.hover=B.value===n})}),ut(()=>{t.isBeforeHide||We()});const de=l=>{t.previousQuery===l||Me.value||(t.previousQuery=l,e.filterable&&ne(e.filterMethod)?e.filterMethod(l):e.filterable&&e.remote&&ne(e.remoteMethod)&&e.remoteMethod(l),e.defaultFirstOption&&(e.filterable||e.remote)&&_.value?H(ze):H(Ll))},ze=()=>{const l=R.value.filter(M=>M.visible&&!M.disabled&&!M.states.groupDisabled),n=l.find(M=>M.created),r=l[0],O=R.value.map(M=>M.value);t.hoveringIndex=qe(O,n||r)},ce=()=>{if(e.multiple)t.selectedLabel="";else{const n=z(e.modelValue)?e.modelValue[0]:e.modelValue,r=Fe(n);t.selectedLabel=r.currentLabel,t.selected=[r];return}const l=[];be(e.modelValue)||U(e.modelValue).forEach(n=>{l.push(Fe(n))}),t.selected=l},Fe=l=>{let n;const r=pt(l);for(let J=t.cachedOptions.size-1;J>=0;J--){const K=Vl.value[J];if(r?X(K.value,e.valueKey)===X(l,e.valueKey):K.value===l){n={value:l,currentLabel:K.currentLabel,get isDisabled(){return K.isDisabled}};break}}if(n)return n;const O=r?l.label:l??"";return{value:l,currentLabel:O}},Ll=()=>{t.hoveringIndex=R.value.findIndex(l=>t.selected.some(n=>ve(n)===ve(l)))},Bl=()=>{t.selectionWidth=Number.parseFloat(window.getComputedStyle(h.value).width)},Nl=()=>{t.collapseItemWidth=T.value.getBoundingClientRect().width},Ie=()=>{var l,n;(n=(l=b.value)==null?void 0:l.updatePopper)==null||n.call(l)},Ke=()=>{var l,n;(n=(l=f.value)==null?void 0:l.updatePopper)==null||n.call(l)},Ae=()=>{t.inputValue.length>0&&!y.value&&(y.value=!0),de(t.inputValue)},He=l=>{if(t.inputValue=l.target.value,e.remote)Ue();else return Ae()},Ue=zt(()=>{Ae()},wl.value),x=l=>{oe(e.modelValue,l)||o(il,l)},Wl=l=>Ut(l,n=>{const r=t.cachedOptions.get(n);return r&&!r.disabled&&!r.states.groupDisabled}),Pl=l=>{if(e.multiple&&l.code!==ct.delete&&l.target.value.length<=0){const n=U(e.modelValue).slice(),r=Wl(n);if(r<0)return;const O=n[r];n.splice(r,1),o(Z,n),x(n),o("remove-tag",O)}},zl=(l,n)=>{const r=t.selected.indexOf(n);if(r>-1&&!Y.value){const O=U(e.modelValue).slice();O.splice(r,1),o(Z,O),x(O),o("remove-tag",n.value)}l.stopPropagation(),fe()},Ge=l=>{l.stopPropagation();const n=e.multiple?[]:fl.value;if(e.multiple)for(const r of t.selected)r.isDisabled&&n.push(r.value);o(Z,n),x(n),t.hoveringIndex=-1,y.value=!1,o("clear"),fe()},je=l=>{var n;if(e.multiple){const r=U((n=e.modelValue)!=null?n:[]).slice(),O=qe(r,l);O>-1?r.splice(O,1):(e.multipleLimit<=0||r.length<e.multipleLimit)&&r.push(l.value),o(Z,r),x(r),l.created&&de(""),e.filterable&&!e.reserveKeyword&&(t.inputValue="")}else o(Z,l.value),x(l.value),y.value=!1;fe(),!y.value&&H(()=>{pe(l)})},qe=(l,n)=>be(n)?-1:P(n.value)?l.findIndex(r=>oe(X(r,e.valueKey),ve(n))):l.indexOf(n.value),pe=l=>{var n,r,O,M,J;const K=z(l)?l[0]:l;let me=null;if(K?.value){const ee=R.value.filter(lt=>lt.value===K.value);ee.length>0&&(me=ee[0].$el)}if(b.value&&me){const ee=(M=(O=(r=(n=b.value)==null?void 0:n.popperRef)==null?void 0:r.contentRef)==null?void 0:O.querySelector)==null?void 0:M.call(O,`.${c.be("dropdown","wrap")}`);ee&&dt(ee,me)}(J=D.value)==null||J.handleScroll()},Fl=l=>{t.options.set(l.value,l),t.cachedOptions.set(l.value,l)},Kl=(l,n)=>{t.options.get(l)===n&&t.options.delete(l)},Al=u(()=>{var l,n;return(n=(l=b.value)==null?void 0:l.popperRef)==null?void 0:n.contentRef}),Hl=()=>{t.isBeforeHide=!1,H(()=>{var l;(l=D.value)==null||l.update(),pe(t.selected)})},fe=()=>{var l;(l=d.value)==null||l.focus()},Ul=()=>{var l;if(y.value){y.value=!1,H(()=>{var n;return(n=d.value)==null?void 0:n.blur()});return}(l=d.value)==null||l.blur()},Gl=l=>{Ge(l)},jl=l=>{if(y.value=!1,Be.value){const n=new FocusEvent("focus",l);H(()=>gl(n))}},ql=()=>{t.inputValue.length>0?t.inputValue="":y.value=!1},Qe=()=>{Y.value||(Ze&&(t.inputHovering=!0),t.menuVisibleOnFocus?t.menuVisibleOnFocus=!1:y.value=!y.value)},Ql=()=>{if(!y.value)Qe();else{const l=R.value[t.hoveringIndex];l&&!l.isDisabled&&je(l)}},ve=l=>P(l.value)?X(l.value,e.valueKey):l.value,Jl=u(()=>R.value.filter(l=>l.visible).every(l=>l.isDisabled)),Zl=u(()=>e.multiple?e.collapseTags?t.selected.slice(0,e.maxCollapseTags):t.selected:[]),Xl=u(()=>e.multiple?e.collapseTags?t.selected.slice(e.maxCollapseTags):[]:[]),Je=l=>{if(!y.value){y.value=!0;return}if(!(t.options.size===0||_.value===0||Me.value)&&!Jl.value){l==="next"?(t.hoveringIndex++,t.hoveringIndex===t.options.size&&(t.hoveringIndex=0)):l==="prev"&&(t.hoveringIndex--,t.hoveringIndex<0&&(t.hoveringIndex=t.options.size-1));const n=R.value[t.hoveringIndex];(n.isDisabled||!n.visible)&&Je(l),H(()=>pe(B.value))}},Yl=()=>{if(!h.value)return 0;const l=window.getComputedStyle(h.value);return Number.parseFloat(l.gap||"6px")},_l=u(()=>{const l=Yl();return{maxWidth:`${T.value&&e.maxCollapseTags===1?t.selectionWidth-t.collapseItemWidth-l:t.selectionWidth}px`}}),xl=u(()=>({maxWidth:`${t.selectionWidth}px`})),et=l=>{o("popup-scroll",l)};return Q(h,Bl),Q(p,Ie),Q(Le,Ie),Q(w,Ke),Q(T,Nl),Re(()=>{ce()}),{inputId:pl,contentId:m,nsSelect:c,nsInput:S,states:t,isFocused:Be,expanded:y,optionsArray:R,hoverOption:B,selectSize:Pe,filteredOptionsCount:_,updateTooltip:Ie,updateTagTooltip:Ke,debouncedOnInputChange:Ue,onInput:He,deletePrevTag:Pl,deleteTag:zl,deleteSelected:Ge,handleOptionSelect:je,scrollToOption:pe,hasModelValue:Oe,shouldShowPlaceholder:Rl,currentPlaceholder:$l,mouseEnterEventName:Ml,needStatusIcon:yl,showClose:Sl,iconComponent:Ne,iconReverse:Cl,validateState:we,validateIcon:Ol,showNewOption:Tl,updateOptions:We,collapseTagSize:kl,setSelected:ce,selectDisabled:Y,emptyText:El,handleCompositionStart:ml,handleCompositionUpdate:bl,handleCompositionEnd:hl,onOptionCreate:Fl,onOptionDestroy:Kl,handleMenuEnter:Hl,focus:fe,blur:Ul,handleClearClick:Gl,handleClickOutside:jl,handleEsc:ql,toggleMenu:Qe,selectOption:Ql,getValueKey:ve,navigateOptions:Je,dropdownMenuVisible:Dl,showTagList:Zl,collapseTagList:Xl,popupScroll:et,tagStyle:_l,collapseTagStyle:xl,popperRef:Al,inputRef:d,tooltipRef:b,tagTooltipRef:f,prefixRef:i,suffixRef:s,selectRef:C,wrapperRef:Le,selectionRef:h,scrollbarRef:D,menuRef:p,tagMenuRef:w,collapseItemRef:T}};var xt=re({name:"ElOptions",setup(e,{slots:o}){const a=ge(Ce);let m=[];return()=>{var c,S;const t=(c=o.default)==null?void 0:c.call(o),C=[];function h(b){z(b)&&b.forEach(f=>{var d,i,s,p;const w=(d=f?.type||{})==null?void 0:d.name;w==="ElOptionGroup"?h(!mt(f.children)&&!z(f.children)&&ne((i=f.children)==null?void 0:i.default)?(s=f.children)==null?void 0:s.default():f.children):w==="ElOption"?C.push((p=f.props)==null?void 0:p.value):z(f.children)&&h(f.children)})}return t.length&&h((S=t[0])==null?void 0:S.children),oe(C,m)||(m=C,a&&(a.states.optionValues=C)),t}}});const en=al({name:String,id:String,modelValue:{type:le([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:yt,effect:{type:le(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:le(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:tl.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:_e,default:gt},fitInputWidth:Boolean,suffixIcon:{type:_e,default:ht},tagType:{...Ye.type,default:"info"},tagEffect:{...Ye.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:le(String),values:kt,default:"bottom-start"},fallbackPlacements:{type:le(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:tl.appendTo,...bt,...Kt(["ariaLabel"])});Rt.scroll;const nl="ElSelect",ln=re({name:nl,componentName:nl,components:{ElSelectMenu:Yt,ElOption:$e,ElOptions:xt,ElTag:It,ElScrollbar:$t,ElTooltip:Dt,ElIcon:wt},directives:{ClickOutside:At},props:en,emits:[Z,il,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(e,{emit:o,slots:a}){const m=ye();m.appContext.config.warnHandler=(...i)=>{!i[0]||i[0].includes('Slot "default" invoked outside of the render function')||console.warn(...i)};const c=u(()=>{const{modelValue:i,multiple:s}=e,p=s?[]:void 0;return z(i)?s?i:p:s?p:i}),S=ie({...De(e),modelValue:c}),t=_t(S,o),{calculatorRef:C,inputStyle:h}=Gt(),b=i=>i.reduce((s,p)=>(s.push(p),p.children&&p.children.length>0&&s.push(...b(p.children)),s),[]),f=i=>{Et(i||[]).forEach(p=>{var w;if(P(p)&&(p.type.name==="ElOption"||p.type.name==="ElTree")){const T=p.type.name;if(T==="ElTree"){const D=((w=p.props)==null?void 0:w.data)||[];b(D).forEach(B=>{B.currentLabel=B.label||(P(B.value)?"":B.value),t.onOptionCreate(B)})}else if(T==="ElOption"){const D={...p.props};D.currentLabel=D.label||(P(D.value)?"":D.value),t.onOptionCreate(D)}}})};G(()=>{var i;return(i=a.default)==null?void 0:i.call(a)},i=>{e.persistent||f(i)},{immediate:!0}),rl(Ce,ie({props:S,states:t.states,selectRef:t.selectRef,optionsArray:t.optionsArray,setSelected:t.setSelected,handleOptionSelect:t.handleOptionSelect,onOptionCreate:t.onOptionCreate,onOptionDestroy:t.onOptionDestroy}));const d=u(()=>e.multiple?t.states.selected.map(i=>i.currentLabel):t.states.selectedLabel);return sl(()=>{m.appContext.config.warnHandler=void 0}),{...t,modelValue:c,selectedLabel:d,calculatorRef:C,inputStyle:h}}});function tn(e,o){const a=j("el-tag"),m=j("el-tooltip"),c=j("el-icon"),S=j("el-option"),t=j("el-options"),C=j("el-scrollbar"),h=j("el-select-menu"),b=St("click-outside");return ae((g(),I("div",{ref:"selectRef",class:v([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[Ot(e.mouseEnterEventName)]:f=>e.states.inputHovering=!0,onMouseleave:f=>e.states.inputHovering=!1},[q(m,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:f=>e.states.isBeforeHide=!1},{default:L(()=>{var f;return[V("div",{ref:"wrapperRef",class:v([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:N(e.toggleMenu,["prevent"])},[e.$slots.prefix?(g(),I("div",{key:0,ref:"prefixRef",class:v(e.nsSelect.e("prefix"))},[k(e.$slots,"prefix")],2)):$("v-if",!0),V("div",{ref:"selectionRef",class:v([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?k(e.$slots,"tag",{key:0,data:e.states.selected,deleteTag:e.deleteTag,selectDisabled:e.selectDisabled},()=>[(g(!0),I(xe,null,el(e.showTagList,d=>(g(),I("div",{key:e.getValueKey(d),class:v(e.nsSelect.e("selected-item"))},[q(a,{closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:he(e.tagStyle),onClose:i=>e.deleteTag(i,d)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))},[k(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[ll(W(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(g(),A(m,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom","popper-class":e.popperClass,teleported:e.teleported},{default:L(()=>[V("div",{ref:"collapseItemRef",class:v(e.nsSelect.e("selected-item"))},[q(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:he(e.collapseTagStyle)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))}," + "+W(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:L(()=>[V("div",{ref:"tagMenuRef",class:v(e.nsSelect.e("selection"))},[(g(!0),I(xe,null,el(e.collapseTagList,d=>(g(),I("div",{key:e.getValueKey(d),class:v(e.nsSelect.e("selected-item"))},[q(a,{class:"in-tooltip",closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:i=>e.deleteTag(i,d)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))},[k(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[ll(W(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","popper-class","teleported"])):$("v-if",!0)]):$("v-if",!0),V("div",{class:v([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[ae(V("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":d=>e.states.inputValue=d,type:"text",name:e.name,class:v([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:he(e.inputStyle),tabindex:e.tabindex,role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((f=e.hoverOption)==null?void 0:f.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[te(N(d=>e.navigateOptions("next"),["stop","prevent"]),["down"]),te(N(d=>e.navigateOptions("prev"),["stop","prevent"]),["up"]),te(N(e.handleEsc,["stop","prevent"]),["esc"]),te(N(e.selectOption,["stop","prevent"]),["enter"]),te(N(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:N(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[Ct,e.states.inputValue]]),e.filterable?(g(),I("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:v(e.nsSelect.e("input-calculator")),textContent:W(e.states.inputValue)},null,10,["textContent"])):$("v-if",!0)],2),e.shouldShowPlaceholder?(g(),I("div",{key:1,class:v([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?k(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[V("span",null,W(e.currentPlaceholder),1)]):(g(),I("span",{key:1},W(e.currentPlaceholder),1))],2)):$("v-if",!0)],2),V("div",{ref:"suffixRef",class:v(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(g(),A(c,{key:0,class:v([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:L(()=>[(g(),A(Ve(e.iconComponent)))]),_:1},8,["class"])):$("v-if",!0),e.showClose&&e.clearIcon?(g(),A(c,{key:1,class:v([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:L(()=>[(g(),A(Ve(e.clearIcon)))]),_:1},8,["class","onClick"])):$("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(g(),A(c,{key:2,class:v([e.nsInput.e("icon"),e.nsInput.e("validateIcon"),e.nsInput.is("loading",e.validateState==="validating")])},{default:L(()=>[(g(),A(Ve(e.validateIcon)))]),_:1},8,["class"])):$("v-if",!0)],2)],10,["onClick"])]}),content:L(()=>[q(h,{ref:"menuRef"},{default:L(()=>[e.$slots.header?(g(),I("div",{key:0,class:v(e.nsSelect.be("dropdown","header")),onClick:N(()=>{},["stop"])},[k(e.$slots,"header")],10,["onClick"])):$("v-if",!0),ae(q(C,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:v([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical",onScroll:e.popupScroll},{default:L(()=>[e.showNewOption?(g(),A(S,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):$("v-if",!0),q(t,null,{default:L(()=>[k(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[ke,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(g(),I("div",{key:1,class:v(e.nsSelect.be("dropdown","loading"))},[k(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(g(),I("div",{key:2,class:v(e.nsSelect.be("dropdown","empty"))},[k(e.$slots,"empty",{},()=>[V("span",null,W(e.emptyText),1)])],2)):$("v-if",!0),e.$slots.footer?(g(),I("div",{key:3,class:v(e.nsSelect.be("dropdown","footer")),onClick:N(()=>{},["stop"])},[k(e.$slots,"footer")],10,["onClick"])):$("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[b,e.handleClickOutside,e.popperRef]])}var nn=Se(ln,[["render",tn],["__file","select.vue"]]);const an=re({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const o=se("select"),a=E(),m=ye(),c=E([]);rl(dl,ie({...De(e)}));const S=u(()=>c.value.some(b=>b.visible===!0)),t=b=>{var f;return b.type.name==="ElOption"&&!!((f=b.component)!=null&&f.proxy)},C=b=>{const f=U(b),d=[];return f.forEach(i=>{var s;Vt(i)&&(t(i)?d.push(i.component.proxy):z(i.children)&&i.children.length?d.push(...C(i.children)):(s=i.component)!=null&&s.subTree&&d.push(...C(i.component.subTree)))}),d},h=()=>{c.value=C(m.subTree)};return Re(()=>{h()}),Lt(a,h,{attributes:!0,subtree:!0,childList:!0}),{groupRef:a,visible:S,ns:o}}});function on(e,o,a,m,c,S){return ae((g(),I("ul",{ref:"groupRef",class:v(e.ns.be("group","wrap"))},[V("li",{class:v(e.ns.be("group","title"))},W(e.label),3),V("li",null,[V("ul",{class:v(e.ns.b("group"))},[k(e.$slots,"default")],2)])],2)),[[ke,e.visible]])}var cl=Se(an,[["render",on],["__file","option-group.vue"]]);const Sn=Tt(nn,{Option:$e,OptionGroup:cl}),Cn=ul($e);ul(cl);export{Cn as E,Sn as a};
|
|
1
|
+
import{aA as tt,aj as E,c as u,ah as al,al as ge,bC as nt,aq as P,cZ as at,cW as X,au as G,aI as ye,_ as Se,d as re,J as ae,K as ke,b as I,o as g,r as k,t as V,x as W,af as N,n as v,a as se,aU as ol,e as Ee,c8 as De,bE as ie,am as sl,ba as H,y as $,f as he,at as Re,a$ as ot,c$ as st,aL as z,ci as it,bm as rt,bD as be,bv as Ze,bH as ut,aJ as ne,bL as Xe,d0 as dt,cf as Z,aG as ct,cq as pt,ce as il,az as ft,ai as vt,bf as mt,d1 as bt,an as le,d2 as Ye,A as ht,bG as _e,cl as gt,bQ as yt,l as j,cL as St,k as q,j as L,i as A,F as xe,v as el,D as ll,c6 as te,d3 as Ct,b6 as Ve,d4 as Ot,E as wt,c5 as It,ak as rl,bI as Et,cx as Vt,w as ul,g as Tt}from"./index-Cbr5I2Y9.js";import{u as tl,b as kt,E as Dt}from"./index-BeBmiTmh.js";import{s as Rt,E as $t}from"./index-BO9akAqw.js";import{e as Mt}from"./strings-CzjyDUaH.js";import{c as U}from"./castArray-CjJRTN8w.js";import{i as oe}from"./isEqual-By-euu_c.js";import{b as Q,d as Lt}from"./typescript-BMcXT3c_.js";import{u as Bt,a as Nt}from"./use-form-item-DBbvHFR2.js";import{u as Wt,a as Pt}from"./index-Tlw0DGaS.js";import{d as zt}from"./debounce-DPEiv4qa.js";import{b as Ft}from"./_baseIteratee-JKg-PLGw.js";import{u as Kt}from"./index-DFk1FoEG.js";import{C as At}from"./index-Dcs3jWJX.js";function Ht(e,o,a,m){e.length;for(var c=a+1;c--;)if(o(e[c],c,e))return c;return-1}function Ut(e,o,a){var m=e==null?0:e.length;if(!m)return-1;var c=m-1;return Ht(e,Ft(o),c)}function Gt(){const e=tt(),o=E(0),a=11,m=u(()=>({minWidth:`${Math.max(o.value,a)}px`}));return Q(e,()=>{var S,t;o.value=(t=(S=e.value)==null?void 0:S.getBoundingClientRect().width)!=null?t:0}),{calculatorRef:e,calculatorWidth:o,inputStyle:m}}const dl=Symbol("ElSelectGroup"),Ce=Symbol("ElSelect"),Te="ElOption",jt=al({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function qt(e,o){const a=ge(Ce);a||nt(Te,"usage: <el-select><el-option /></el-select/>");const m=ge(dl,{disabled:!1}),c=u(()=>f(U(a.props.modelValue),e.value)),S=u(()=>{var s;if(a.props.multiple){const p=U((s=a.props.modelValue)!=null?s:[]);return!c.value&&p.length>=a.props.multipleLimit&&a.props.multipleLimit>0}else return!1}),t=u(()=>{var s;return(s=e.label)!=null?s:P(e.value)?"":e.value}),C=u(()=>e.value||e.label||""),h=u(()=>e.disabled||o.groupDisabled||S.value),b=ye(),f=(s=[],p)=>{if(P(e.value)){const w=a.props.valueKey;return s&&s.some(T=>at(X(T,w))===X(p,w))}else return s&&s.includes(p)},d=()=>{!e.disabled&&!m.disabled&&(a.states.hoveringIndex=a.optionsArray.indexOf(b.proxy))},i=s=>{const p=new RegExp(Mt(s),"i");o.visible=p.test(String(t.value))||e.created};return G(()=>t.value,()=>{!e.created&&!a.props.remote&&a.setSelected()}),G(()=>e.value,(s,p)=>{const{remote:w,valueKey:T}=a.props;if((w?s!==p:!oe(s,p))&&(a.onOptionDestroy(p,b.proxy),a.onOptionCreate(b.proxy)),!e.created&&!w){if(T&&P(s)&&P(p)&&s[T]===p[T])return;a.setSelected()}}),G(()=>m.disabled,()=>{o.groupDisabled=m.disabled},{immediate:!0}),{select:a,currentLabel:t,currentValue:C,itemSelected:c,isDisabled:h,hoverItem:d,updateOption:i}}const Qt=re({name:Te,componentName:Te,props:jt,setup(e){const o=se("select"),a=ol(),m=u(()=>[o.be("dropdown","item"),o.is("disabled",Ee(C)),o.is("selected",Ee(t)),o.is("hovering",Ee(i))]),c=ie({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:S,itemSelected:t,isDisabled:C,select:h,hoverItem:b,updateOption:f}=qt(e,c),{visible:d,hover:i}=De(c),s=ye().proxy;h.onOptionCreate(s),sl(()=>{const w=s.value,{selected:T}=h.states,D=T.some(y=>y.value===s.value);H(()=>{h.states.cachedOptions.get(w)===s&&!D&&h.states.cachedOptions.delete(w)}),h.onOptionDestroy(w,s)});function p(){C.value||h.handleOptionSelect(s)}return{ns:o,id:a,containerKls:m,currentLabel:S,itemSelected:t,isDisabled:C,select:h,visible:d,hover:i,states:c,hoverItem:b,updateOption:f,selectOptionClick:p}}});function Jt(e,o){return ae((g(),I("li",{id:e.id,class:v(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMousemove:e.hoverItem,onClick:N(e.selectOptionClick,["stop"])},[k(e.$slots,"default",{},()=>[V("span",null,W(e.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[ke,e.visible]])}var $e=Se(Qt,[["render",Jt],["__file","option.vue"]]);const Zt=re({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=ge(Ce),o=se("select"),a=u(()=>e.props.popperClass),m=u(()=>e.props.multiple),c=u(()=>e.props.fitInputWidth),S=E("");function t(){var C;S.value=`${(C=e.selectRef)==null?void 0:C.offsetWidth}px`}return Re(()=>{t(),Q(e.selectRef,t)}),{ns:o,minWidth:S,popperClass:a,isMultiple:m,isFitInputWidth:c}}});function Xt(e,o,a,m,c,S){return g(),I("div",{class:v([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:he({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(g(),I("div",{key:0,class:v(e.ns.be("dropdown","header"))},[k(e.$slots,"header")],2)):$("v-if",!0),k(e.$slots,"default"),e.$slots.footer?(g(),I("div",{key:1,class:v(e.ns.be("dropdown","footer"))},[k(e.$slots,"footer")],2)):$("v-if",!0)],6)}var Yt=Se(Zt,[["render",Xt],["__file","select-dropdown.vue"]]);const _t=(e,o)=>{const{t:a}=ot(),m=ol(),c=se("select"),S=se("input"),t=ie({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),C=E(),h=E(),b=E(),f=E(),d=E(),i=E(),s=E(),p=E(),w=E(),T=E(),D=E(),y=E(!1),B=E(),{form:ue,formItem:F}=Bt(),{inputId:pl}=Nt(e,{formItemContext:F}),{valueOnClear:fl,isEmptyValue:vl}=st(e),{isComposing:Me,handleCompositionStart:ml,handleCompositionUpdate:bl,handleCompositionEnd:hl}=Wt({afterComposition:l=>He(l)}),Y=u(()=>e.disabled||!!ue?.disabled),{wrapperRef:Le,isFocused:Be,handleBlur:gl}=Pt(d,{disabled:Y,afterFocus(){e.automaticDropdown&&!y.value&&(y.value=!0,t.menuVisibleOnFocus=!0)},beforeBlur(l){var n,r;return((n=b.value)==null?void 0:n.isFocusInsideContent(l))||((r=f.value)==null?void 0:r.isFocusInsideContent(l))},afterBlur(){var l;y.value=!1,t.menuVisibleOnFocus=!1,e.validateEvent&&((l=F?.validate)==null||l.call(F,"blur").catch(n=>Xe()))}}),Oe=u(()=>z(e.modelValue)?e.modelValue.length>0:!vl(e.modelValue)),yl=u(()=>{var l;return(l=ue?.statusIcon)!=null?l:!1}),Sl=u(()=>e.clearable&&!Y.value&&t.inputHovering&&Oe.value),Ne=u(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),Cl=u(()=>c.is("reverse",!!(Ne.value&&y.value))),we=u(()=>F?.validateState||""),Ol=u(()=>we.value&&it[we.value]),wl=u(()=>e.remote?300:0),Il=u(()=>e.remote&&!t.inputValue&&t.options.size===0),El=u(()=>e.loading?e.loadingText||a("el.select.loading"):e.filterable&&t.inputValue&&t.options.size>0&&_.value===0?e.noMatchText||a("el.select.noMatch"):t.options.size===0?e.noDataText||a("el.select.noData"):null),_=u(()=>R.value.filter(l=>l.visible).length),R=u(()=>{const l=Array.from(t.options.values()),n=[];return t.optionValues.forEach(r=>{const O=l.findIndex(M=>M.value===r);O>-1&&n.push(l[O])}),n.length>=l.length?n:l}),Vl=u(()=>Array.from(t.cachedOptions.values())),Tl=u(()=>{const l=R.value.filter(n=>!n.created).some(n=>n.currentLabel===t.inputValue);return e.filterable&&e.allowCreate&&t.inputValue!==""&&!l}),We=()=>{e.filterable&&ne(e.filterMethod)||e.filterable&&e.remote&&ne(e.remoteMethod)||R.value.forEach(l=>{var n;(n=l.updateOption)==null||n.call(l,t.inputValue)})},Pe=rt(),kl=u(()=>["small"].includes(Pe.value)?"small":"default"),Dl=u({get(){return y.value&&!Il.value},set(l){y.value=l}}),Rl=u(()=>{if(e.multiple&&!be(e.modelValue))return U(e.modelValue).length===0&&!t.inputValue;const l=z(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||be(l)?!t.inputValue:!0}),$l=u(()=>{var l;const n=(l=e.placeholder)!=null?l:a("el.select.placeholder");return e.multiple||!Oe.value?n:t.selectedLabel}),Ml=u(()=>Ze?null:"mouseenter");G(()=>e.modelValue,(l,n)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(t.inputValue="",de("")),ce(),!oe(l,n)&&e.validateEvent&&F?.validate("change").catch(r=>Xe())},{flush:"post",deep:!0}),G(()=>y.value,l=>{l?de(t.inputValue):(t.inputValue="",t.previousQuery=null,t.isBeforeHide=!0),o("visible-change",l)}),G(()=>t.options.entries(),()=>{ft&&(ce(),e.defaultFirstOption&&(e.filterable||e.remote)&&_.value&&ze())},{flush:"post"}),G([()=>t.hoveringIndex,R],([l])=>{vt(l)&&l>-1?B.value=R.value[l]||{}:B.value={},R.value.forEach(n=>{n.hover=B.value===n})}),ut(()=>{t.isBeforeHide||We()});const de=l=>{t.previousQuery===l||Me.value||(t.previousQuery=l,e.filterable&&ne(e.filterMethod)?e.filterMethod(l):e.filterable&&e.remote&&ne(e.remoteMethod)&&e.remoteMethod(l),e.defaultFirstOption&&(e.filterable||e.remote)&&_.value?H(ze):H(Ll))},ze=()=>{const l=R.value.filter(M=>M.visible&&!M.disabled&&!M.states.groupDisabled),n=l.find(M=>M.created),r=l[0],O=R.value.map(M=>M.value);t.hoveringIndex=qe(O,n||r)},ce=()=>{if(e.multiple)t.selectedLabel="";else{const n=z(e.modelValue)?e.modelValue[0]:e.modelValue,r=Fe(n);t.selectedLabel=r.currentLabel,t.selected=[r];return}const l=[];be(e.modelValue)||U(e.modelValue).forEach(n=>{l.push(Fe(n))}),t.selected=l},Fe=l=>{let n;const r=pt(l);for(let J=t.cachedOptions.size-1;J>=0;J--){const K=Vl.value[J];if(r?X(K.value,e.valueKey)===X(l,e.valueKey):K.value===l){n={value:l,currentLabel:K.currentLabel,get isDisabled(){return K.isDisabled}};break}}if(n)return n;const O=r?l.label:l??"";return{value:l,currentLabel:O}},Ll=()=>{t.hoveringIndex=R.value.findIndex(l=>t.selected.some(n=>ve(n)===ve(l)))},Bl=()=>{t.selectionWidth=Number.parseFloat(window.getComputedStyle(h.value).width)},Nl=()=>{t.collapseItemWidth=T.value.getBoundingClientRect().width},Ie=()=>{var l,n;(n=(l=b.value)==null?void 0:l.updatePopper)==null||n.call(l)},Ke=()=>{var l,n;(n=(l=f.value)==null?void 0:l.updatePopper)==null||n.call(l)},Ae=()=>{t.inputValue.length>0&&!y.value&&(y.value=!0),de(t.inputValue)},He=l=>{if(t.inputValue=l.target.value,e.remote)Ue();else return Ae()},Ue=zt(()=>{Ae()},wl.value),x=l=>{oe(e.modelValue,l)||o(il,l)},Wl=l=>Ut(l,n=>{const r=t.cachedOptions.get(n);return r&&!r.disabled&&!r.states.groupDisabled}),Pl=l=>{if(e.multiple&&l.code!==ct.delete&&l.target.value.length<=0){const n=U(e.modelValue).slice(),r=Wl(n);if(r<0)return;const O=n[r];n.splice(r,1),o(Z,n),x(n),o("remove-tag",O)}},zl=(l,n)=>{const r=t.selected.indexOf(n);if(r>-1&&!Y.value){const O=U(e.modelValue).slice();O.splice(r,1),o(Z,O),x(O),o("remove-tag",n.value)}l.stopPropagation(),fe()},Ge=l=>{l.stopPropagation();const n=e.multiple?[]:fl.value;if(e.multiple)for(const r of t.selected)r.isDisabled&&n.push(r.value);o(Z,n),x(n),t.hoveringIndex=-1,y.value=!1,o("clear"),fe()},je=l=>{var n;if(e.multiple){const r=U((n=e.modelValue)!=null?n:[]).slice(),O=qe(r,l);O>-1?r.splice(O,1):(e.multipleLimit<=0||r.length<e.multipleLimit)&&r.push(l.value),o(Z,r),x(r),l.created&&de(""),e.filterable&&!e.reserveKeyword&&(t.inputValue="")}else o(Z,l.value),x(l.value),y.value=!1;fe(),!y.value&&H(()=>{pe(l)})},qe=(l,n)=>be(n)?-1:P(n.value)?l.findIndex(r=>oe(X(r,e.valueKey),ve(n))):l.indexOf(n.value),pe=l=>{var n,r,O,M,J;const K=z(l)?l[0]:l;let me=null;if(K?.value){const ee=R.value.filter(lt=>lt.value===K.value);ee.length>0&&(me=ee[0].$el)}if(b.value&&me){const ee=(M=(O=(r=(n=b.value)==null?void 0:n.popperRef)==null?void 0:r.contentRef)==null?void 0:O.querySelector)==null?void 0:M.call(O,`.${c.be("dropdown","wrap")}`);ee&&dt(ee,me)}(J=D.value)==null||J.handleScroll()},Fl=l=>{t.options.set(l.value,l),t.cachedOptions.set(l.value,l)},Kl=(l,n)=>{t.options.get(l)===n&&t.options.delete(l)},Al=u(()=>{var l,n;return(n=(l=b.value)==null?void 0:l.popperRef)==null?void 0:n.contentRef}),Hl=()=>{t.isBeforeHide=!1,H(()=>{var l;(l=D.value)==null||l.update(),pe(t.selected)})},fe=()=>{var l;(l=d.value)==null||l.focus()},Ul=()=>{var l;if(y.value){y.value=!1,H(()=>{var n;return(n=d.value)==null?void 0:n.blur()});return}(l=d.value)==null||l.blur()},Gl=l=>{Ge(l)},jl=l=>{if(y.value=!1,Be.value){const n=new FocusEvent("focus",l);H(()=>gl(n))}},ql=()=>{t.inputValue.length>0?t.inputValue="":y.value=!1},Qe=()=>{Y.value||(Ze&&(t.inputHovering=!0),t.menuVisibleOnFocus?t.menuVisibleOnFocus=!1:y.value=!y.value)},Ql=()=>{if(!y.value)Qe();else{const l=R.value[t.hoveringIndex];l&&!l.isDisabled&&je(l)}},ve=l=>P(l.value)?X(l.value,e.valueKey):l.value,Jl=u(()=>R.value.filter(l=>l.visible).every(l=>l.isDisabled)),Zl=u(()=>e.multiple?e.collapseTags?t.selected.slice(0,e.maxCollapseTags):t.selected:[]),Xl=u(()=>e.multiple?e.collapseTags?t.selected.slice(e.maxCollapseTags):[]:[]),Je=l=>{if(!y.value){y.value=!0;return}if(!(t.options.size===0||_.value===0||Me.value)&&!Jl.value){l==="next"?(t.hoveringIndex++,t.hoveringIndex===t.options.size&&(t.hoveringIndex=0)):l==="prev"&&(t.hoveringIndex--,t.hoveringIndex<0&&(t.hoveringIndex=t.options.size-1));const n=R.value[t.hoveringIndex];(n.isDisabled||!n.visible)&&Je(l),H(()=>pe(B.value))}},Yl=()=>{if(!h.value)return 0;const l=window.getComputedStyle(h.value);return Number.parseFloat(l.gap||"6px")},_l=u(()=>{const l=Yl();return{maxWidth:`${T.value&&e.maxCollapseTags===1?t.selectionWidth-t.collapseItemWidth-l:t.selectionWidth}px`}}),xl=u(()=>({maxWidth:`${t.selectionWidth}px`})),et=l=>{o("popup-scroll",l)};return Q(h,Bl),Q(p,Ie),Q(Le,Ie),Q(w,Ke),Q(T,Nl),Re(()=>{ce()}),{inputId:pl,contentId:m,nsSelect:c,nsInput:S,states:t,isFocused:Be,expanded:y,optionsArray:R,hoverOption:B,selectSize:Pe,filteredOptionsCount:_,updateTooltip:Ie,updateTagTooltip:Ke,debouncedOnInputChange:Ue,onInput:He,deletePrevTag:Pl,deleteTag:zl,deleteSelected:Ge,handleOptionSelect:je,scrollToOption:pe,hasModelValue:Oe,shouldShowPlaceholder:Rl,currentPlaceholder:$l,mouseEnterEventName:Ml,needStatusIcon:yl,showClose:Sl,iconComponent:Ne,iconReverse:Cl,validateState:we,validateIcon:Ol,showNewOption:Tl,updateOptions:We,collapseTagSize:kl,setSelected:ce,selectDisabled:Y,emptyText:El,handleCompositionStart:ml,handleCompositionUpdate:bl,handleCompositionEnd:hl,onOptionCreate:Fl,onOptionDestroy:Kl,handleMenuEnter:Hl,focus:fe,blur:Ul,handleClearClick:Gl,handleClickOutside:jl,handleEsc:ql,toggleMenu:Qe,selectOption:Ql,getValueKey:ve,navigateOptions:Je,dropdownMenuVisible:Dl,showTagList:Zl,collapseTagList:Xl,popupScroll:et,tagStyle:_l,collapseTagStyle:xl,popperRef:Al,inputRef:d,tooltipRef:b,tagTooltipRef:f,prefixRef:i,suffixRef:s,selectRef:C,wrapperRef:Le,selectionRef:h,scrollbarRef:D,menuRef:p,tagMenuRef:w,collapseItemRef:T}};var xt=re({name:"ElOptions",setup(e,{slots:o}){const a=ge(Ce);let m=[];return()=>{var c,S;const t=(c=o.default)==null?void 0:c.call(o),C=[];function h(b){z(b)&&b.forEach(f=>{var d,i,s,p;const w=(d=f?.type||{})==null?void 0:d.name;w==="ElOptionGroup"?h(!mt(f.children)&&!z(f.children)&&ne((i=f.children)==null?void 0:i.default)?(s=f.children)==null?void 0:s.default():f.children):w==="ElOption"?C.push((p=f.props)==null?void 0:p.value):z(f.children)&&h(f.children)})}return t.length&&h((S=t[0])==null?void 0:S.children),oe(C,m)||(m=C,a&&(a.states.optionValues=C)),t}}});const en=al({name:String,id:String,modelValue:{type:le([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:yt,effect:{type:le(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:le(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:tl.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:_e,default:gt},fitInputWidth:Boolean,suffixIcon:{type:_e,default:ht},tagType:{...Ye.type,default:"info"},tagEffect:{...Ye.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:le(String),values:kt,default:"bottom-start"},fallbackPlacements:{type:le(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:tl.appendTo,...bt,...Kt(["ariaLabel"])});Rt.scroll;const nl="ElSelect",ln=re({name:nl,componentName:nl,components:{ElSelectMenu:Yt,ElOption:$e,ElOptions:xt,ElTag:It,ElScrollbar:$t,ElTooltip:Dt,ElIcon:wt},directives:{ClickOutside:At},props:en,emits:[Z,il,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(e,{emit:o,slots:a}){const m=ye();m.appContext.config.warnHandler=(...i)=>{!i[0]||i[0].includes('Slot "default" invoked outside of the render function')||console.warn(...i)};const c=u(()=>{const{modelValue:i,multiple:s}=e,p=s?[]:void 0;return z(i)?s?i:p:s?p:i}),S=ie({...De(e),modelValue:c}),t=_t(S,o),{calculatorRef:C,inputStyle:h}=Gt(),b=i=>i.reduce((s,p)=>(s.push(p),p.children&&p.children.length>0&&s.push(...b(p.children)),s),[]),f=i=>{Et(i||[]).forEach(p=>{var w;if(P(p)&&(p.type.name==="ElOption"||p.type.name==="ElTree")){const T=p.type.name;if(T==="ElTree"){const D=((w=p.props)==null?void 0:w.data)||[];b(D).forEach(B=>{B.currentLabel=B.label||(P(B.value)?"":B.value),t.onOptionCreate(B)})}else if(T==="ElOption"){const D={...p.props};D.currentLabel=D.label||(P(D.value)?"":D.value),t.onOptionCreate(D)}}})};G(()=>{var i;return(i=a.default)==null?void 0:i.call(a)},i=>{e.persistent||f(i)},{immediate:!0}),rl(Ce,ie({props:S,states:t.states,selectRef:t.selectRef,optionsArray:t.optionsArray,setSelected:t.setSelected,handleOptionSelect:t.handleOptionSelect,onOptionCreate:t.onOptionCreate,onOptionDestroy:t.onOptionDestroy}));const d=u(()=>e.multiple?t.states.selected.map(i=>i.currentLabel):t.states.selectedLabel);return sl(()=>{m.appContext.config.warnHandler=void 0}),{...t,modelValue:c,selectedLabel:d,calculatorRef:C,inputStyle:h}}});function tn(e,o){const a=j("el-tag"),m=j("el-tooltip"),c=j("el-icon"),S=j("el-option"),t=j("el-options"),C=j("el-scrollbar"),h=j("el-select-menu"),b=St("click-outside");return ae((g(),I("div",{ref:"selectRef",class:v([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[Ot(e.mouseEnterEventName)]:f=>e.states.inputHovering=!0,onMouseleave:f=>e.states.inputHovering=!1},[q(m,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:f=>e.states.isBeforeHide=!1},{default:L(()=>{var f;return[V("div",{ref:"wrapperRef",class:v([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:N(e.toggleMenu,["prevent"])},[e.$slots.prefix?(g(),I("div",{key:0,ref:"prefixRef",class:v(e.nsSelect.e("prefix"))},[k(e.$slots,"prefix")],2)):$("v-if",!0),V("div",{ref:"selectionRef",class:v([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?k(e.$slots,"tag",{key:0,data:e.states.selected,deleteTag:e.deleteTag,selectDisabled:e.selectDisabled},()=>[(g(!0),I(xe,null,el(e.showTagList,d=>(g(),I("div",{key:e.getValueKey(d),class:v(e.nsSelect.e("selected-item"))},[q(a,{closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:he(e.tagStyle),onClose:i=>e.deleteTag(i,d)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))},[k(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[ll(W(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(g(),A(m,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom","popper-class":e.popperClass,teleported:e.teleported},{default:L(()=>[V("div",{ref:"collapseItemRef",class:v(e.nsSelect.e("selected-item"))},[q(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:he(e.collapseTagStyle)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))}," + "+W(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:L(()=>[V("div",{ref:"tagMenuRef",class:v(e.nsSelect.e("selection"))},[(g(!0),I(xe,null,el(e.collapseTagList,d=>(g(),I("div",{key:e.getValueKey(d),class:v(e.nsSelect.e("selected-item"))},[q(a,{class:"in-tooltip",closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:i=>e.deleteTag(i,d)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))},[k(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[ll(W(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","popper-class","teleported"])):$("v-if",!0)]):$("v-if",!0),V("div",{class:v([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[ae(V("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":d=>e.states.inputValue=d,type:"text",name:e.name,class:v([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:he(e.inputStyle),tabindex:e.tabindex,role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((f=e.hoverOption)==null?void 0:f.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[te(N(d=>e.navigateOptions("next"),["stop","prevent"]),["down"]),te(N(d=>e.navigateOptions("prev"),["stop","prevent"]),["up"]),te(N(e.handleEsc,["stop","prevent"]),["esc"]),te(N(e.selectOption,["stop","prevent"]),["enter"]),te(N(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:N(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[Ct,e.states.inputValue]]),e.filterable?(g(),I("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:v(e.nsSelect.e("input-calculator")),textContent:W(e.states.inputValue)},null,10,["textContent"])):$("v-if",!0)],2),e.shouldShowPlaceholder?(g(),I("div",{key:1,class:v([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?k(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[V("span",null,W(e.currentPlaceholder),1)]):(g(),I("span",{key:1},W(e.currentPlaceholder),1))],2)):$("v-if",!0)],2),V("div",{ref:"suffixRef",class:v(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(g(),A(c,{key:0,class:v([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:L(()=>[(g(),A(Ve(e.iconComponent)))]),_:1},8,["class"])):$("v-if",!0),e.showClose&&e.clearIcon?(g(),A(c,{key:1,class:v([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:L(()=>[(g(),A(Ve(e.clearIcon)))]),_:1},8,["class","onClick"])):$("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(g(),A(c,{key:2,class:v([e.nsInput.e("icon"),e.nsInput.e("validateIcon"),e.nsInput.is("loading",e.validateState==="validating")])},{default:L(()=>[(g(),A(Ve(e.validateIcon)))]),_:1},8,["class"])):$("v-if",!0)],2)],10,["onClick"])]}),content:L(()=>[q(h,{ref:"menuRef"},{default:L(()=>[e.$slots.header?(g(),I("div",{key:0,class:v(e.nsSelect.be("dropdown","header")),onClick:N(()=>{},["stop"])},[k(e.$slots,"header")],10,["onClick"])):$("v-if",!0),ae(q(C,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:v([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical",onScroll:e.popupScroll},{default:L(()=>[e.showNewOption?(g(),A(S,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):$("v-if",!0),q(t,null,{default:L(()=>[k(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[ke,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(g(),I("div",{key:1,class:v(e.nsSelect.be("dropdown","loading"))},[k(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(g(),I("div",{key:2,class:v(e.nsSelect.be("dropdown","empty"))},[k(e.$slots,"empty",{},()=>[V("span",null,W(e.emptyText),1)])],2)):$("v-if",!0),e.$slots.footer?(g(),I("div",{key:3,class:v(e.nsSelect.be("dropdown","footer")),onClick:N(()=>{},["stop"])},[k(e.$slots,"footer")],10,["onClick"])):$("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[b,e.handleClickOutside,e.popperRef]])}var nn=Se(ln,[["render",tn],["__file","select.vue"]]);const an=re({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const o=se("select"),a=E(),m=ye(),c=E([]);rl(dl,ie({...De(e)}));const S=u(()=>c.value.some(b=>b.visible===!0)),t=b=>{var f;return b.type.name==="ElOption"&&!!((f=b.component)!=null&&f.proxy)},C=b=>{const f=U(b),d=[];return f.forEach(i=>{var s;Vt(i)&&(t(i)?d.push(i.component.proxy):z(i.children)&&i.children.length?d.push(...C(i.children)):(s=i.component)!=null&&s.subTree&&d.push(...C(i.component.subTree)))}),d},h=()=>{c.value=C(m.subTree)};return Re(()=>{h()}),Lt(a,h,{attributes:!0,subtree:!0,childList:!0}),{groupRef:a,visible:S,ns:o}}});function on(e,o,a,m,c,S){return ae((g(),I("ul",{ref:"groupRef",class:v(e.ns.be("group","wrap"))},[V("li",{class:v(e.ns.be("group","title"))},W(e.label),3),V("li",null,[V("ul",{class:v(e.ns.b("group"))},[k(e.$slots,"default")],2)])],2)),[[ke,e.visible]])}var cl=Se(an,[["render",on],["__file","option-group.vue"]]);const Sn=Tt(nn,{Option:$e,OptionGroup:cl}),Cn=ul($e);ul(cl);export{Cn as E,Sn as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aL as te,bf as Pe,aK as Te,ah as Fe,an as de,c7 as Ce,aj as $,c as E,_ as De,d as Y,bE as ce,bm as ze,a as qe,au as re,ak as Ue,c8 as Je,c9 as xe,b as Ke,o as pe,r as X,n as J,e as x,aJ as Ge,bL as st,al as ne,bC as ot,at as Ze,am as Ye,bS as ft,k as ie,F as lt,ba as ke,aD as ve,u as ut,aU as dt,ca as ct,bl as Se,cb as fe,t as Ae,j as le,i as pt,y as je,b6 as vt,f as Re,D as mt,x as Ve,cc as ht,w as gt,g as yt}from"./index-
|
|
1
|
+
import{aL as te,bf as Pe,aK as Te,ah as Fe,an as de,c7 as Ce,aj as $,c as E,_ as De,d as Y,bE as ce,bm as ze,a as qe,au as re,ak as Ue,c8 as Je,c9 as xe,b as Ke,o as pe,r as X,n as J,e as x,aJ as Ge,bL as st,al as ne,bC as ot,at as Ze,am as Ye,bS as ft,k as ie,F as lt,ba as ke,aD as ve,u as ut,aU as dt,ca as ct,bl as Se,cb as fe,t as Ae,j as le,i as pt,y as je,b6 as vt,f as Re,D as mt,x as Ve,cc as ht,w as gt,g as yt}from"./index-Cbr5I2Y9.js";import{c as me}from"./castArray-CjJRTN8w.js";import{b as bt}from"./typescript-BMcXT3c_.js";import{b as wt}from"./_baseClone-B-ja3TJc.js";var Ft=4;function Me(i){return wt(i,Ft)}const qt=Fe({size:{type:String,values:Ce},disabled:Boolean}),xt=Fe({...qt,model:Object,rules:{type:de(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean],default:!0}}),Ot={validate:(i,e,t)=>(te(i)||Pe(i))&&Te(e)&&Pe(t)};function Et(){const i=$([]),e=E(()=>{if(!i.value.length)return"0";const a=Math.max(...i.value);return a?`${a}px`:""});function t(a){const s=i.value.indexOf(a);return s===-1&&e.value,s}function r(a,s){if(a&&s){const o=t(s);i.value.splice(o,1,a)}else a&&i.value.push(a)}function n(a){const s=t(a);s>-1&&i.value.splice(s,1)}return{autoLabelWidth:e,registerLabelWidth:r,deregisterLabelWidth:n}}const H=(i,e)=>{const t=me(e).map(r=>te(r)?r.join("."):r);return t.length>0?i.filter(r=>r.propString&&t.includes(r.propString)):i},_t="ElForm",Pt=Y({name:_t}),St=Y({...Pt,props:xt,emits:Ot,setup(i,{expose:e,emit:t}){const r=i,n=$(),a=ce([]),s=ze(),o=qe("form"),u=E(()=>{const{labelPosition:l,inline:m}=r;return[o.b(),o.m(s.value||"default"),{[o.m(`label-${l}`)]:l,[o.m("inline")]:m}]}),w=l=>H(a,[l])[0],p=l=>{a.push(l)},g=l=>{l.prop&&a.splice(a.indexOf(l),1)},F=(l=[])=>{r.model&&H(a,l).forEach(m=>m.resetField())},O=(l=[])=>{H(a,l).forEach(m=>m.clearValidate())},S=E(()=>!!r.model),c=l=>{if(a.length===0)return[];const m=H(a,l);return m.length?m:[]},y=async l=>j(void 0,l),f=async(l=[])=>{if(!S.value)return!1;const m=c(l);if(m.length===0)return!0;let b={};for(const R of m)try{await R.validate(""),R.validateState==="error"&&R.resetField()}catch(_){b={...b,..._}}return Object.keys(b).length===0?!0:Promise.reject(b)},j=async(l=[],m)=>{let b=!1;const R=!Ge(m);try{return b=await f(l),b===!0&&await m?.(b),b}catch(_){if(_ instanceof Error)throw _;const W=_;if(r.scrollToError&&n.value){const B=n.value.querySelector(`.${o.b()}-item.is-error`);B?.scrollIntoView(r.scrollIntoViewOptions)}return!b&&await m?.(!1,W),R&&Promise.reject(W)}},v=l=>{var m;const b=w(l);b&&((m=b.$el)==null||m.scrollIntoView(r.scrollIntoViewOptions))};return re(()=>r.rules,()=>{r.validateOnRuleChange&&y().catch(l=>st())},{deep:!0,flush:"post"}),Ue(xe,ce({...Je(r),emit:t,resetFields:F,clearValidate:O,validateField:j,getField:w,addField:p,removeField:g,...Et()})),e({validate:y,validateField:j,resetFields:F,clearValidate:O,scrollToField:v,getField:w,fields:a}),(l,m)=>(pe(),Ke("form",{ref_key:"formRef",ref:n,class:J(x(u))},[X(l.$slots,"default")],2))}});var At=De(St,[["__file","form.vue"]]);function T(){return T=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},T.apply(this,arguments)}function jt(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,Z(i,e)}function he(i){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},he(i)}function Z(i,e){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Z(i,e)}function Rt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ee(i,e,t){return Rt()?ee=Reflect.construct.bind():ee=function(n,a,s){var o=[null];o.push.apply(o,a);var u=Function.bind.apply(n,o),w=new u;return s&&Z(w,s.prototype),w},ee.apply(null,arguments)}function Vt(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function ge(i){var e=typeof Map=="function"?new Map:void 0;return ge=function(r){if(r===null||!Vt(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,n)}function n(){return ee(r,arguments,he(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Z(n,r)},ge(i)}var Mt=/%[sdj%]/g,Nt=function(){};function ye(i){if(!i||!i.length)return null;var e={};return i.forEach(function(t){var r=t.field;e[r]=e[r]||[],e[r].push(t)}),e}function N(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];var n=0,a=t.length;if(typeof i=="function")return i.apply(null,t);if(typeof i=="string"){var s=i.replace(Mt,function(o){if(o==="%%")return"%";if(n>=a)return o;switch(o){case"%s":return String(t[n++]);case"%d":return Number(t[n++]);case"%j":try{return JSON.stringify(t[n++])}catch{return"[Circular]"}break;default:return o}});return s}return i}function Wt(i){return i==="string"||i==="url"||i==="hex"||i==="email"||i==="date"||i==="pattern"}function P(i,e){return!!(i==null||e==="array"&&Array.isArray(i)&&!i.length||Wt(e)&&typeof i=="string"&&!i)}function Lt(i,e,t){var r=[],n=0,a=i.length;function s(o){r.push.apply(r,o||[]),n++,n===a&&t(r)}i.forEach(function(o){e(o,s)})}function Ne(i,e,t){var r=0,n=i.length;function a(s){if(s&&s.length){t(s);return}var o=r;r=r+1,o<n?e(i[o],a):t([])}a([])}function It(i){var e=[];return Object.keys(i).forEach(function(t){e.push.apply(e,i[t]||[])}),e}var We=function(i){jt(e,i);function e(t,r){var n;return n=i.call(this,"Async Validation Error")||this,n.errors=t,n.fields=r,n}return e}(ge(Error));function $t(i,e,t,r,n){if(e.first){var a=new Promise(function(F,O){var S=function(f){return r(f),f.length?O(new We(f,ye(f))):F(n)},c=It(i);Ne(c,t,S)});return a.catch(function(F){return F}),a}var s=e.firstFields===!0?Object.keys(i):e.firstFields||[],o=Object.keys(i),u=o.length,w=0,p=[],g=new Promise(function(F,O){var S=function(y){if(p.push.apply(p,y),w++,w===u)return r(p),p.length?O(new We(p,ye(p))):F(n)};o.length||(r(p),F(n)),o.forEach(function(c){var y=i[c];s.indexOf(c)!==-1?Ne(y,t,S):Lt(y,t,S)})});return g.catch(function(F){return F}),g}function Bt(i){return!!(i&&i.message!==void 0)}function Tt(i,e){for(var t=i,r=0;r<e.length;r++){if(t==null)return t;t=t[e[r]]}return t}function Le(i,e){return function(t){var r;return i.fullFields?r=Tt(e,i.fullFields):r=e[t.field||i.fullField],Bt(t)?(t.field=t.field||i.fullField,t.fieldValue=r,t):{message:typeof t=="function"?t():t,fieldValue:r,field:t.field||i.fullField}}}function Ie(i,e){if(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];typeof r=="object"&&typeof i[t]=="object"?i[t]=T({},i[t],r):i[t]=r}}return i}var He=function(e,t,r,n,a,s){e.required&&(!r.hasOwnProperty(e.field)||P(t,s||e.type))&&n.push(N(a.messages.required,e.fullField))},Ct=function(e,t,r,n,a){(/^\s+$/.test(t)||t==="")&&n.push(N(a.messages.whitespace,e.fullField))},Q,Dt=function(){if(Q)return Q;var i="[a-fA-F\\d:]",e=function(l){return l&&l.includeBoundaries?"(?:(?<=\\s|^)(?="+i+")|(?<="+i+")(?=\\s|$))":""},t="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",n=(`
|
|
2
2
|
(?:
|
|
3
3
|
(?:`+r+":){7}(?:"+r+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
4
4
|
(?:`+r+":){6}(?:"+t+"|:"+r+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as Re,b as je}from"./typescript-LPT8zmb-.js";import{_ as le,d as N,a as O,i as he,o as W,j as X,r as B,aw as Se,bx as Fe,e as C,aR as we,g as ke,aG as T,by as Z,bz as Y,bA as qe,bB as ce,c as m,ah as be,al as ee,bC as te,aj as E,A as Ve,b3 as Ge,bD as Oe,bE as ge,au as Q,ak as me,aI as Me,at as ye,am as Ne,bk as I,E as Pe,bf as j,J as $e,K as Ue,F as Ie,bF as Ee,bG as J,aL as Be,aq as Je,bH as Ke,bI as Ye,ay as Te,an as ne,bJ as Ze,ba as Qe,bK as Xe,bL as et,aM as tt,b as ae,t as ve,n as oe,D as nt,x as at,w as xe}from"./index-DM-McChS.js";import{E as ze}from"./index-D2tyb6wy.js";import{T as ot}from"./index-r5W6hzzQ.js";import{C as st}from"./index-UrRqTynA.js";const lt=N({name:"ElCollapseTransition"}),ut=N({...lt,setup(t){const n=O("collapse-transition"),s=e=>{e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom},a={beforeEnter(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height&&(e.dataset.elExistsHeight=e.style.height),e.style.maxHeight=0,e.style.paddingTop=0,e.style.paddingBottom=0},enter(e){requestAnimationFrame(()=>{e.dataset.oldOverflow=e.style.overflow,e.dataset.elExistsHeight?e.style.maxHeight=e.dataset.elExistsHeight:e.scrollHeight!==0?e.style.maxHeight=`${e.scrollHeight}px`:e.style.maxHeight=0,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom,e.style.overflow="hidden"})},afterEnter(e){e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow},enterCancelled(e){s(e)},beforeLeave(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.maxHeight=`${e.scrollHeight}px`,e.style.overflow="hidden"},leave(e){e.scrollHeight!==0&&(e.style.maxHeight=0,e.style.paddingTop=0,e.style.paddingBottom=0)},afterLeave(e){s(e)},leaveCancelled(e){s(e)}};return(e,h)=>(W(),he(we,Se({name:C(n).b()},Fe(a)),{default:X(()=>[B(e.$slots,"default")]),_:3},16,["name"]))}});var it=le(ut,[["__file","collapse-transition.vue"]]);const rt=ke(it);let ct=class{constructor(n,s){this.parent=n,this.domNode=s,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(n){n===this.subMenuItems.length?n=0:n<0&&(n=this.subMenuItems.length-1),this.subMenuItems[n].focus(),this.subIndex=n}addListeners(){const n=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,s=>{s.addEventListener("keydown",a=>{let e=!1;switch(a.code){case T.down:{this.gotoSubIndex(this.subIndex+1),e=!0;break}case T.up:{this.gotoSubIndex(this.subIndex-1),e=!0;break}case T.tab:{Z(n,"mouseleave");break}case T.enter:case T.numpadEnter:case T.space:{e=!0,a.currentTarget.click();break}}return e&&(a.preventDefault(),a.stopPropagation()),!1})})}},dt=class{constructor(n,s){this.domNode=n,this.submenu=null,this.submenu=null,this.init(s)}init(n){this.domNode.setAttribute("tabindex","0");const s=this.domNode.querySelector(`.${n}-menu`);s&&(this.submenu=new ct(this,s)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",n=>{let s=!1;switch(n.code){case T.down:{Z(n.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),s=!0;break}case T.up:{Z(n.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),s=!0;break}case T.tab:{Z(n.currentTarget,"mouseleave");break}case T.enter:case T.numpadEnter:case T.space:{s=!0,n.currentTarget.click();break}}s&&n.preventDefault()})}},pt=class{constructor(n,s){this.domNode=n,this.init(s)}init(n){const s=this.domNode.childNodes;Array.from(s).forEach(a=>{a.nodeType===1&&new dt(a,n)})}};const mt=N({name:"ElMenuCollapseTransition"}),vt=N({...mt,setup(t){const n=O("menu"),s={onBeforeEnter:a=>a.style.opacity="0.2",onEnter(a,e){Y(a,`${n.namespace.value}-opacity-transition`),a.style.opacity="1",e()},onAfterEnter(a){ce(a,`${n.namespace.value}-opacity-transition`),a.style.opacity=""},onBeforeLeave(a){a.dataset||(a.dataset={}),qe(a,n.m("collapse"))?(ce(a,n.m("collapse")),a.dataset.oldOverflow=a.style.overflow,a.dataset.scrollWidth=a.clientWidth.toString(),Y(a,n.m("collapse"))):(Y(a,n.m("collapse")),a.dataset.oldOverflow=a.style.overflow,a.dataset.scrollWidth=a.clientWidth.toString(),ce(a,n.m("collapse"))),a.style.width=`${a.scrollWidth}px`,a.style.overflow="hidden"},onLeave(a){Y(a,"horizontal-collapse-transition"),a.style.width=`${a.dataset.scrollWidth}px`}};return(a,e)=>(W(),he(we,Se({mode:"out-in"},C(s)),{default:X(()=>[B(a.$slots,"default")]),_:3},16))}});var ft=le(vt,[["__file","menu-collapse-transition.vue"]]);function Ae(t,n){const s=m(()=>{let e=t.parent;const h=[n.value];for(;e.type.name!=="ElMenu";)e.props.index&&h.unshift(e.props.index),e=e.parent;return h});return{parentMenu:m(()=>{let e=t.parent;for(;e&&!["ElMenu","ElSubMenu"].includes(e.type.name);)e=e.parent;return e}),indexPath:s}}function ht(t){return m(()=>{const s=t.backgroundColor;return s?new ot(s).shade(20).toString():""})}const He=(t,n)=>{const s=O("menu");return m(()=>s.cssVarBlock({"text-color":t.textColor||"","hover-text-color":t.textColor||"","bg-color":t.backgroundColor||"","hover-bg-color":ht(t).value||"","active-color":t.activeTextColor||"",level:`${n}`}))},Ce="rootMenu",se="subMenu:",bt=be({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:J},expandOpenIcon:{type:J},collapseCloseIcon:{type:J},collapseOpenIcon:{type:J}}),de="ElSubMenu";var _e=N({name:de,props:bt,setup(t,{slots:n,expose:s}){const a=Me(),{indexPath:e,parentMenu:h}=Ae(a,m(()=>t.index)),v=O("menu"),M=O("sub-menu"),i=ee(Ce);i||te(de,"can not inject root menu");const c=ee(`${se}${h.value.uid}`);c||te(de,"can not inject sub menu");const b=E({}),y=E({});let f;const _=E(!1),w=E(),F=E(),z=m(()=>H.value==="horizontal"&&A.value?"bottom-start":"right-start"),D=m(()=>H.value==="horizontal"&&A.value||H.value==="vertical"&&!i.props.collapse?t.expandCloseIcon&&t.expandOpenIcon?k.value?t.expandOpenIcon:t.expandCloseIcon:Ve:t.collapseCloseIcon&&t.collapseOpenIcon?k.value?t.collapseOpenIcon:t.collapseCloseIcon:Ge),A=m(()=>c.level===0),q=m(()=>{const u=t.teleported;return Oe(u)?A.value:u}),ue=m(()=>i.props.collapse?`${v.namespace.value}-zoom-in-left`:`${v.namespace.value}-zoom-in-top`),K=m(()=>H.value==="horizontal"&&A.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),k=m(()=>i.openedMenus.includes(t.index)),R=m(()=>[...Object.values(b.value),...Object.values(y.value)].some(({active:u})=>u)),H=m(()=>i.props.mode),ie=m(()=>i.props.persistent),L=ge({index:t.index,indexPath:e,active:R}),V=He(i.props,c.level+1),G=m(()=>{var u;return(u=t.popperOffset)!=null?u:i.props.popperOffset}),U=m(()=>{var u;return(u=t.popperClass)!=null?u:i.props.popperClass}),re=m(()=>{var u;return(u=t.showTimeout)!=null?u:i.props.showTimeout}),o=m(()=>{var u;return(u=t.hideTimeout)!=null?u:i.props.hideTimeout}),l=()=>{var u,x,g;return(g=(x=(u=F.value)==null?void 0:u.popperRef)==null?void 0:x.popperInstanceRef)==null?void 0:g.destroy()},r=u=>{u||l()},d=()=>{i.props.menuTrigger==="hover"&&i.props.mode==="horizontal"||i.props.collapse&&i.props.mode==="vertical"||t.disabled||i.handleSubMenuClick({index:t.index,indexPath:e.value,active:R.value})},p=(u,x=re.value)=>{var g;if(u.type!=="focus"){if(i.props.menuTrigger==="click"&&i.props.mode==="horizontal"||!i.props.collapse&&i.props.mode==="vertical"||t.disabled){c.mouseInChild.value=!0;return}c.mouseInChild.value=!0,f?.(),{stop:f}=Ee(()=>{i.openMenu(t.index,e.value)},x),q.value&&((g=h.value.vnode.el)==null||g.dispatchEvent(new MouseEvent("mouseenter")))}},S=(u=!1)=>{var x;if(i.props.menuTrigger==="click"&&i.props.mode==="horizontal"||!i.props.collapse&&i.props.mode==="vertical"){c.mouseInChild.value=!1;return}f?.(),c.mouseInChild.value=!1,{stop:f}=Ee(()=>!_.value&&i.closeMenu(t.index,e.value),o.value),q.value&&u&&((x=c.handleMouseleave)==null||x.call(c,!0))};Q(()=>i.props.collapse,u=>r(!!u));{const u=g=>{y.value[g.index]=g},x=g=>{delete y.value[g.index]};me(`${se}${a.uid}`,{addSubMenu:u,removeSubMenu:x,handleMouseleave:S,mouseInChild:_,level:c.level+1})}return s({opened:k}),ye(()=>{i.addSubMenu(L),c.addSubMenu(L)}),Ne(()=>{c.removeSubMenu(L),i.removeSubMenu(L)}),()=>{var u;const x=[(u=n.title)==null?void 0:u.call(n),I(Pe,{class:M.e("icon-arrow"),style:{transform:k.value?t.expandCloseIcon&&t.expandOpenIcon||t.collapseCloseIcon&&t.collapseOpenIcon&&i.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>j(D.value)?I(a.appContext.components[D.value]):I(D.value)})],g=i.isMenuPopup?I(ze,{ref:F,visible:k.value,effect:"light",pure:!0,offset:G.value,showArrow:!1,persistent:ie.value,popperClass:U.value,placement:z.value,teleported:q.value,fallbackPlacements:K.value,transition:ue.value,gpuAcceleration:!1},{content:()=>{var P;return I("div",{class:[v.m(H.value),v.m("popup-container"),U.value],onMouseenter:$=>p($,100),onMouseleave:()=>S(!0),onFocus:$=>p($,100)},[I("ul",{class:[v.b(),v.m("popup"),v.m(`popup-${z.value}`)],style:V.value},[(P=n.default)==null?void 0:P.call(n)])])},default:()=>I("div",{class:M.e("title"),onClick:d},x)}):I(Ie,{},[I("div",{class:M.e("title"),ref:w,onClick:d},x),I(rt,{},{default:()=>{var P;return $e(I("ul",{role:"menu",class:[v.b(),v.m("inline")],style:V.value},[(P=n.default)==null?void 0:P.call(n)]),[[Ue,k.value]])}})]);return I("li",{class:[M.b(),M.is("active",R.value),M.is("opened",k.value),M.is("disabled",t.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:k.value,onMouseenter:p,onMouseleave:()=>S(),onFocus:p},[g])}}});const gt=be({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:ne(Array),default:()=>Re([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:J,default:()=>Ze},popperEffect:{type:ne(String),default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),pe=t=>Be(t)&&t.every(n=>j(n)),Mt={close:(t,n)=>j(t)&&pe(n),open:(t,n)=>j(t)&&pe(n),select:(t,n,s,a)=>j(t)&&pe(n)&&Je(s)&&(Oe(a)||a instanceof Promise)};var yt=N({name:"ElMenu",props:gt,emits:Mt,setup(t,{emit:n,slots:s,expose:a}){const e=Me(),h=e.appContext.config.globalProperties.$router,v=E(),M=O("menu"),i=O("sub-menu"),c=E(-1),b=E(t.defaultOpeneds&&!t.collapse?t.defaultOpeneds.slice(0):[]),y=E(t.defaultActive),f=E({}),_=E({}),w=m(()=>t.mode==="horizontal"||t.mode==="vertical"&&t.collapse),F=()=>{const o=y.value&&f.value[y.value];if(!o||t.mode==="horizontal"||t.collapse)return;o.indexPath.forEach(r=>{const d=_.value[r];d&&z(r,d.indexPath)})},z=(o,l)=>{b.value.includes(o)||(t.uniqueOpened&&(b.value=b.value.filter(r=>l.includes(r))),b.value.push(o),n("open",o,l))},D=o=>{const l=b.value.indexOf(o);l!==-1&&b.value.splice(l,1)},A=(o,l)=>{D(o),n("close",o,l)},q=({index:o,indexPath:l})=>{b.value.includes(o)?A(o,l):z(o,l)},ue=o=>{(t.mode==="horizontal"||t.collapse)&&(b.value=[]);const{index:l,indexPath:r}=o;if(!(Te(l)||Te(r)))if(t.router&&h){const d=o.route||l,p=h.push(d).then(S=>(S||(y.value=l),S));n("select",l,r,{index:l,indexPath:r,route:d},p)}else y.value=l,n("select",l,r,{index:l,indexPath:r})},K=o=>{var l;const r=f.value,d=r[o]||y.value&&r[y.value]||r[t.defaultActive];y.value=(l=d?.index)!=null?l:o},k=o=>{const l=getComputedStyle(o),r=Number.parseInt(l.marginLeft,10),d=Number.parseInt(l.marginRight,10);return o.offsetWidth+r+d||0},R=()=>{var o,l;if(!v.value)return-1;const r=Array.from((l=(o=v.value)==null?void 0:o.childNodes)!=null?l:[]).filter($=>$.nodeName!=="#text"||$.nodeValue),d=64,p=getComputedStyle(v.value),S=Number.parseInt(p.paddingLeft,10),u=Number.parseInt(p.paddingRight,10),x=v.value.clientWidth-S-u;let g=0,P=0;return r.forEach(($,De)=>{$.nodeName!=="#comment"&&(g+=k($),g<=x-d&&(P=De+1))}),P===r.length?-1:P},H=o=>_.value[o].indexPath,ie=(o,l=33.34)=>{let r;return()=>{r&&clearTimeout(r),r=setTimeout(()=>{o()},l)}};let L=!0;const V=()=>{if(c.value===R())return;const o=()=>{c.value=-1,Qe(()=>{c.value=R()})};L?o():ie(o)(),L=!1};Q(()=>t.defaultActive,o=>{f.value[o]||(y.value=""),K(o)}),Q(()=>t.collapse,o=>{o&&(b.value=[])}),Q(f.value,F);let G;Ke(()=>{t.mode==="horizontal"&&t.ellipsis?G=je(v,V).stop:G?.()});const U=E(!1);{const o=p=>{_.value[p.index]=p},l=p=>{delete _.value[p.index]};me(Ce,ge({props:t,openedMenus:b,items:f,subMenus:_,activeIndex:y,isMenuPopup:w,addMenuItem:p=>{f.value[p.index]=p},removeMenuItem:p=>{delete f.value[p.index]},addSubMenu:o,removeSubMenu:l,openMenu:z,closeMenu:A,handleMenuItemClick:ue,handleSubMenuClick:q})),me(`${se}${e.uid}`,{addSubMenu:o,removeSubMenu:l,mouseInChild:U,level:0})}ye(()=>{t.mode==="horizontal"&&new pt(e.vnode.el,M.namespace.value)}),a({open:l=>{const{indexPath:r}=_.value[l];r.forEach(d=>z(d,r))},close:D,updateActiveIndex:K,handleResize:V});const re=He(t,0);return()=>{var o,l;let r=(l=(o=s.default)==null?void 0:o.call(s))!=null?l:[];const d=[];if(t.mode==="horizontal"&&v.value){const u=Ye(r),x=c.value===-1?u:u.slice(0,c.value),g=c.value===-1?[]:u.slice(c.value);g?.length&&t.ellipsis&&(r=x,d.push(I(_e,{index:"sub-menu-more",class:i.e("hide-arrow"),popperOffset:t.popperOffset},{title:()=>I(Pe,{class:i.e("icon-more")},{default:()=>I(t.ellipsisIcon)}),default:()=>g})))}const p=t.closeOnClickOutside?[[st,()=>{b.value.length&&(U.value||(b.value.forEach(u=>n("close",u,H(u))),b.value=[]))}]]:[],S=$e(I("ul",{key:String(t.collapse),role:"menubar",ref:v,style:re.value,class:{[M.b()]:!0,[M.m(t.mode)]:!0,[M.m("collapse")]:t.collapse}},[...r,...d]),p);return t.collapseTransition&&t.mode==="vertical"?I(ft,()=>S):S}}});const It=be({index:{type:ne([String,null]),default:null},route:{type:ne([String,Object])},disabled:Boolean}),xt={click:t=>j(t.index)&&Be(t.indexPath)},fe="ElMenuItem",Ct=N({name:fe}),_t=N({...Ct,props:It,emits:xt,setup(t,{expose:n,emit:s}){const a=t;Xe(a.index)&&et();const e=Me(),h=ee(Ce),v=O("menu"),M=O("menu-item");h||te(fe,"can not inject root menu");const{parentMenu:i,indexPath:c}=Ae(e,tt(a,"index")),b=ee(`${se}${i.value.uid}`);b||te(fe,"can not inject sub menu");const y=m(()=>a.index===h.activeIndex),f=ge({index:a.index,indexPath:c,active:y}),_=()=>{a.disabled||(h.handleMenuItemClick({index:a.index,indexPath:c.value,route:a.route}),s("click",f))};return ye(()=>{b.addSubMenu(f),h.addMenuItem(f)}),Ne(()=>{b.removeSubMenu(f),h.removeMenuItem(f)}),n({parentMenu:i,rootMenu:h,active:y,nsMenu:v,nsMenuItem:M,handleClick:_}),(w,F)=>(W(),ae("li",{class:oe([C(M).b(),C(M).is("active",C(y)),C(M).is("disabled",w.disabled)]),role:"menuitem",tabindex:"-1",onClick:_},[C(i).type.name==="ElMenu"&&C(h).props.collapse&&w.$slots.title?(W(),he(C(ze),{key:0,effect:C(h).props.popperEffect,placement:"right","fallback-placements":["left"],persistent:C(h).props.persistent},{content:X(()=>[B(w.$slots,"title")]),default:X(()=>[ve("div",{class:oe(C(v).be("tooltip","trigger"))},[B(w.$slots,"default")],2)]),_:3},8,["effect","persistent"])):(W(),ae(Ie,{key:1},[B(w.$slots,"default"),B(w.$slots,"title")],64))],2))}});var Le=le(_t,[["__file","menu-item.vue"]]);const Et={title:String},Tt=N({name:"ElMenuItemGroup"}),St=N({...Tt,props:Et,setup(t){const n=O("menu-item-group");return(s,a)=>(W(),ae("li",{class:oe(C(n).b())},[ve("div",{class:oe(C(n).e("title"))},[s.$slots.title?B(s.$slots,"title",{key:1}):(W(),ae(Ie,{key:0},[nt(at(s.title),1)],64))],2),ve("ul",null,[B(s.$slots,"default")])],2))}});var We=le(St,[["__file","menu-item-group.vue"]]);const At=ke(yt,{MenuItem:Le,MenuItemGroup:We,SubMenu:_e}),Ht=xe(Le);xe(We);xe(_e);export{Ht as E,At as a};
|
|
1
|
+
import{m as Re,b as je}from"./typescript-BMcXT3c_.js";import{_ as le,d as N,a as O,i as he,o as W,j as X,r as B,aw as Se,bx as Fe,e as C,aR as we,g as ke,aG as T,by as Z,bz as Y,bA as qe,bB as ce,c as m,ah as be,al as ee,bC as te,aj as E,A as Ve,b3 as Ge,bD as Oe,bE as ge,au as Q,ak as me,aI as Me,at as ye,am as Ne,bk as I,E as Pe,bf as j,J as $e,K as Ue,F as Ie,bF as Ee,bG as J,aL as Be,aq as Je,bH as Ke,bI as Ye,ay as Te,an as ne,bJ as Ze,ba as Qe,bK as Xe,bL as et,aM as tt,b as ae,t as ve,n as oe,D as nt,x as at,w as xe}from"./index-Cbr5I2Y9.js";import{E as ze}from"./index-BeBmiTmh.js";import{T as ot}from"./index-r5W6hzzQ.js";import{C as st}from"./index-Dcs3jWJX.js";const lt=N({name:"ElCollapseTransition"}),ut=N({...lt,setup(t){const n=O("collapse-transition"),s=e=>{e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom},a={beforeEnter(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height&&(e.dataset.elExistsHeight=e.style.height),e.style.maxHeight=0,e.style.paddingTop=0,e.style.paddingBottom=0},enter(e){requestAnimationFrame(()=>{e.dataset.oldOverflow=e.style.overflow,e.dataset.elExistsHeight?e.style.maxHeight=e.dataset.elExistsHeight:e.scrollHeight!==0?e.style.maxHeight=`${e.scrollHeight}px`:e.style.maxHeight=0,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom,e.style.overflow="hidden"})},afterEnter(e){e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow},enterCancelled(e){s(e)},beforeLeave(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.maxHeight=`${e.scrollHeight}px`,e.style.overflow="hidden"},leave(e){e.scrollHeight!==0&&(e.style.maxHeight=0,e.style.paddingTop=0,e.style.paddingBottom=0)},afterLeave(e){s(e)},leaveCancelled(e){s(e)}};return(e,h)=>(W(),he(we,Se({name:C(n).b()},Fe(a)),{default:X(()=>[B(e.$slots,"default")]),_:3},16,["name"]))}});var it=le(ut,[["__file","collapse-transition.vue"]]);const rt=ke(it);let ct=class{constructor(n,s){this.parent=n,this.domNode=s,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(n){n===this.subMenuItems.length?n=0:n<0&&(n=this.subMenuItems.length-1),this.subMenuItems[n].focus(),this.subIndex=n}addListeners(){const n=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,s=>{s.addEventListener("keydown",a=>{let e=!1;switch(a.code){case T.down:{this.gotoSubIndex(this.subIndex+1),e=!0;break}case T.up:{this.gotoSubIndex(this.subIndex-1),e=!0;break}case T.tab:{Z(n,"mouseleave");break}case T.enter:case T.numpadEnter:case T.space:{e=!0,a.currentTarget.click();break}}return e&&(a.preventDefault(),a.stopPropagation()),!1})})}},dt=class{constructor(n,s){this.domNode=n,this.submenu=null,this.submenu=null,this.init(s)}init(n){this.domNode.setAttribute("tabindex","0");const s=this.domNode.querySelector(`.${n}-menu`);s&&(this.submenu=new ct(this,s)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",n=>{let s=!1;switch(n.code){case T.down:{Z(n.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),s=!0;break}case T.up:{Z(n.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),s=!0;break}case T.tab:{Z(n.currentTarget,"mouseleave");break}case T.enter:case T.numpadEnter:case T.space:{s=!0,n.currentTarget.click();break}}s&&n.preventDefault()})}},pt=class{constructor(n,s){this.domNode=n,this.init(s)}init(n){const s=this.domNode.childNodes;Array.from(s).forEach(a=>{a.nodeType===1&&new dt(a,n)})}};const mt=N({name:"ElMenuCollapseTransition"}),vt=N({...mt,setup(t){const n=O("menu"),s={onBeforeEnter:a=>a.style.opacity="0.2",onEnter(a,e){Y(a,`${n.namespace.value}-opacity-transition`),a.style.opacity="1",e()},onAfterEnter(a){ce(a,`${n.namespace.value}-opacity-transition`),a.style.opacity=""},onBeforeLeave(a){a.dataset||(a.dataset={}),qe(a,n.m("collapse"))?(ce(a,n.m("collapse")),a.dataset.oldOverflow=a.style.overflow,a.dataset.scrollWidth=a.clientWidth.toString(),Y(a,n.m("collapse"))):(Y(a,n.m("collapse")),a.dataset.oldOverflow=a.style.overflow,a.dataset.scrollWidth=a.clientWidth.toString(),ce(a,n.m("collapse"))),a.style.width=`${a.scrollWidth}px`,a.style.overflow="hidden"},onLeave(a){Y(a,"horizontal-collapse-transition"),a.style.width=`${a.dataset.scrollWidth}px`}};return(a,e)=>(W(),he(we,Se({mode:"out-in"},C(s)),{default:X(()=>[B(a.$slots,"default")]),_:3},16))}});var ft=le(vt,[["__file","menu-collapse-transition.vue"]]);function Ae(t,n){const s=m(()=>{let e=t.parent;const h=[n.value];for(;e.type.name!=="ElMenu";)e.props.index&&h.unshift(e.props.index),e=e.parent;return h});return{parentMenu:m(()=>{let e=t.parent;for(;e&&!["ElMenu","ElSubMenu"].includes(e.type.name);)e=e.parent;return e}),indexPath:s}}function ht(t){return m(()=>{const s=t.backgroundColor;return s?new ot(s).shade(20).toString():""})}const He=(t,n)=>{const s=O("menu");return m(()=>s.cssVarBlock({"text-color":t.textColor||"","hover-text-color":t.textColor||"","bg-color":t.backgroundColor||"","hover-bg-color":ht(t).value||"","active-color":t.activeTextColor||"",level:`${n}`}))},Ce="rootMenu",se="subMenu:",bt=be({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:J},expandOpenIcon:{type:J},collapseCloseIcon:{type:J},collapseOpenIcon:{type:J}}),de="ElSubMenu";var _e=N({name:de,props:bt,setup(t,{slots:n,expose:s}){const a=Me(),{indexPath:e,parentMenu:h}=Ae(a,m(()=>t.index)),v=O("menu"),M=O("sub-menu"),i=ee(Ce);i||te(de,"can not inject root menu");const c=ee(`${se}${h.value.uid}`);c||te(de,"can not inject sub menu");const b=E({}),y=E({});let f;const _=E(!1),w=E(),F=E(),z=m(()=>H.value==="horizontal"&&A.value?"bottom-start":"right-start"),D=m(()=>H.value==="horizontal"&&A.value||H.value==="vertical"&&!i.props.collapse?t.expandCloseIcon&&t.expandOpenIcon?k.value?t.expandOpenIcon:t.expandCloseIcon:Ve:t.collapseCloseIcon&&t.collapseOpenIcon?k.value?t.collapseOpenIcon:t.collapseCloseIcon:Ge),A=m(()=>c.level===0),q=m(()=>{const u=t.teleported;return Oe(u)?A.value:u}),ue=m(()=>i.props.collapse?`${v.namespace.value}-zoom-in-left`:`${v.namespace.value}-zoom-in-top`),K=m(()=>H.value==="horizontal"&&A.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),k=m(()=>i.openedMenus.includes(t.index)),R=m(()=>[...Object.values(b.value),...Object.values(y.value)].some(({active:u})=>u)),H=m(()=>i.props.mode),ie=m(()=>i.props.persistent),L=ge({index:t.index,indexPath:e,active:R}),V=He(i.props,c.level+1),G=m(()=>{var u;return(u=t.popperOffset)!=null?u:i.props.popperOffset}),U=m(()=>{var u;return(u=t.popperClass)!=null?u:i.props.popperClass}),re=m(()=>{var u;return(u=t.showTimeout)!=null?u:i.props.showTimeout}),o=m(()=>{var u;return(u=t.hideTimeout)!=null?u:i.props.hideTimeout}),l=()=>{var u,x,g;return(g=(x=(u=F.value)==null?void 0:u.popperRef)==null?void 0:x.popperInstanceRef)==null?void 0:g.destroy()},r=u=>{u||l()},d=()=>{i.props.menuTrigger==="hover"&&i.props.mode==="horizontal"||i.props.collapse&&i.props.mode==="vertical"||t.disabled||i.handleSubMenuClick({index:t.index,indexPath:e.value,active:R.value})},p=(u,x=re.value)=>{var g;if(u.type!=="focus"){if(i.props.menuTrigger==="click"&&i.props.mode==="horizontal"||!i.props.collapse&&i.props.mode==="vertical"||t.disabled){c.mouseInChild.value=!0;return}c.mouseInChild.value=!0,f?.(),{stop:f}=Ee(()=>{i.openMenu(t.index,e.value)},x),q.value&&((g=h.value.vnode.el)==null||g.dispatchEvent(new MouseEvent("mouseenter")))}},S=(u=!1)=>{var x;if(i.props.menuTrigger==="click"&&i.props.mode==="horizontal"||!i.props.collapse&&i.props.mode==="vertical"){c.mouseInChild.value=!1;return}f?.(),c.mouseInChild.value=!1,{stop:f}=Ee(()=>!_.value&&i.closeMenu(t.index,e.value),o.value),q.value&&u&&((x=c.handleMouseleave)==null||x.call(c,!0))};Q(()=>i.props.collapse,u=>r(!!u));{const u=g=>{y.value[g.index]=g},x=g=>{delete y.value[g.index]};me(`${se}${a.uid}`,{addSubMenu:u,removeSubMenu:x,handleMouseleave:S,mouseInChild:_,level:c.level+1})}return s({opened:k}),ye(()=>{i.addSubMenu(L),c.addSubMenu(L)}),Ne(()=>{c.removeSubMenu(L),i.removeSubMenu(L)}),()=>{var u;const x=[(u=n.title)==null?void 0:u.call(n),I(Pe,{class:M.e("icon-arrow"),style:{transform:k.value?t.expandCloseIcon&&t.expandOpenIcon||t.collapseCloseIcon&&t.collapseOpenIcon&&i.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>j(D.value)?I(a.appContext.components[D.value]):I(D.value)})],g=i.isMenuPopup?I(ze,{ref:F,visible:k.value,effect:"light",pure:!0,offset:G.value,showArrow:!1,persistent:ie.value,popperClass:U.value,placement:z.value,teleported:q.value,fallbackPlacements:K.value,transition:ue.value,gpuAcceleration:!1},{content:()=>{var P;return I("div",{class:[v.m(H.value),v.m("popup-container"),U.value],onMouseenter:$=>p($,100),onMouseleave:()=>S(!0),onFocus:$=>p($,100)},[I("ul",{class:[v.b(),v.m("popup"),v.m(`popup-${z.value}`)],style:V.value},[(P=n.default)==null?void 0:P.call(n)])])},default:()=>I("div",{class:M.e("title"),onClick:d},x)}):I(Ie,{},[I("div",{class:M.e("title"),ref:w,onClick:d},x),I(rt,{},{default:()=>{var P;return $e(I("ul",{role:"menu",class:[v.b(),v.m("inline")],style:V.value},[(P=n.default)==null?void 0:P.call(n)]),[[Ue,k.value]])}})]);return I("li",{class:[M.b(),M.is("active",R.value),M.is("opened",k.value),M.is("disabled",t.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:k.value,onMouseenter:p,onMouseleave:()=>S(),onFocus:p},[g])}}});const gt=be({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:ne(Array),default:()=>Re([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:J,default:()=>Ze},popperEffect:{type:ne(String),default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),pe=t=>Be(t)&&t.every(n=>j(n)),Mt={close:(t,n)=>j(t)&&pe(n),open:(t,n)=>j(t)&&pe(n),select:(t,n,s,a)=>j(t)&&pe(n)&&Je(s)&&(Oe(a)||a instanceof Promise)};var yt=N({name:"ElMenu",props:gt,emits:Mt,setup(t,{emit:n,slots:s,expose:a}){const e=Me(),h=e.appContext.config.globalProperties.$router,v=E(),M=O("menu"),i=O("sub-menu"),c=E(-1),b=E(t.defaultOpeneds&&!t.collapse?t.defaultOpeneds.slice(0):[]),y=E(t.defaultActive),f=E({}),_=E({}),w=m(()=>t.mode==="horizontal"||t.mode==="vertical"&&t.collapse),F=()=>{const o=y.value&&f.value[y.value];if(!o||t.mode==="horizontal"||t.collapse)return;o.indexPath.forEach(r=>{const d=_.value[r];d&&z(r,d.indexPath)})},z=(o,l)=>{b.value.includes(o)||(t.uniqueOpened&&(b.value=b.value.filter(r=>l.includes(r))),b.value.push(o),n("open",o,l))},D=o=>{const l=b.value.indexOf(o);l!==-1&&b.value.splice(l,1)},A=(o,l)=>{D(o),n("close",o,l)},q=({index:o,indexPath:l})=>{b.value.includes(o)?A(o,l):z(o,l)},ue=o=>{(t.mode==="horizontal"||t.collapse)&&(b.value=[]);const{index:l,indexPath:r}=o;if(!(Te(l)||Te(r)))if(t.router&&h){const d=o.route||l,p=h.push(d).then(S=>(S||(y.value=l),S));n("select",l,r,{index:l,indexPath:r,route:d},p)}else y.value=l,n("select",l,r,{index:l,indexPath:r})},K=o=>{var l;const r=f.value,d=r[o]||y.value&&r[y.value]||r[t.defaultActive];y.value=(l=d?.index)!=null?l:o},k=o=>{const l=getComputedStyle(o),r=Number.parseInt(l.marginLeft,10),d=Number.parseInt(l.marginRight,10);return o.offsetWidth+r+d||0},R=()=>{var o,l;if(!v.value)return-1;const r=Array.from((l=(o=v.value)==null?void 0:o.childNodes)!=null?l:[]).filter($=>$.nodeName!=="#text"||$.nodeValue),d=64,p=getComputedStyle(v.value),S=Number.parseInt(p.paddingLeft,10),u=Number.parseInt(p.paddingRight,10),x=v.value.clientWidth-S-u;let g=0,P=0;return r.forEach(($,De)=>{$.nodeName!=="#comment"&&(g+=k($),g<=x-d&&(P=De+1))}),P===r.length?-1:P},H=o=>_.value[o].indexPath,ie=(o,l=33.34)=>{let r;return()=>{r&&clearTimeout(r),r=setTimeout(()=>{o()},l)}};let L=!0;const V=()=>{if(c.value===R())return;const o=()=>{c.value=-1,Qe(()=>{c.value=R()})};L?o():ie(o)(),L=!1};Q(()=>t.defaultActive,o=>{f.value[o]||(y.value=""),K(o)}),Q(()=>t.collapse,o=>{o&&(b.value=[])}),Q(f.value,F);let G;Ke(()=>{t.mode==="horizontal"&&t.ellipsis?G=je(v,V).stop:G?.()});const U=E(!1);{const o=p=>{_.value[p.index]=p},l=p=>{delete _.value[p.index]};me(Ce,ge({props:t,openedMenus:b,items:f,subMenus:_,activeIndex:y,isMenuPopup:w,addMenuItem:p=>{f.value[p.index]=p},removeMenuItem:p=>{delete f.value[p.index]},addSubMenu:o,removeSubMenu:l,openMenu:z,closeMenu:A,handleMenuItemClick:ue,handleSubMenuClick:q})),me(`${se}${e.uid}`,{addSubMenu:o,removeSubMenu:l,mouseInChild:U,level:0})}ye(()=>{t.mode==="horizontal"&&new pt(e.vnode.el,M.namespace.value)}),a({open:l=>{const{indexPath:r}=_.value[l];r.forEach(d=>z(d,r))},close:D,updateActiveIndex:K,handleResize:V});const re=He(t,0);return()=>{var o,l;let r=(l=(o=s.default)==null?void 0:o.call(s))!=null?l:[];const d=[];if(t.mode==="horizontal"&&v.value){const u=Ye(r),x=c.value===-1?u:u.slice(0,c.value),g=c.value===-1?[]:u.slice(c.value);g?.length&&t.ellipsis&&(r=x,d.push(I(_e,{index:"sub-menu-more",class:i.e("hide-arrow"),popperOffset:t.popperOffset},{title:()=>I(Pe,{class:i.e("icon-more")},{default:()=>I(t.ellipsisIcon)}),default:()=>g})))}const p=t.closeOnClickOutside?[[st,()=>{b.value.length&&(U.value||(b.value.forEach(u=>n("close",u,H(u))),b.value=[]))}]]:[],S=$e(I("ul",{key:String(t.collapse),role:"menubar",ref:v,style:re.value,class:{[M.b()]:!0,[M.m(t.mode)]:!0,[M.m("collapse")]:t.collapse}},[...r,...d]),p);return t.collapseTransition&&t.mode==="vertical"?I(ft,()=>S):S}}});const It=be({index:{type:ne([String,null]),default:null},route:{type:ne([String,Object])},disabled:Boolean}),xt={click:t=>j(t.index)&&Be(t.indexPath)},fe="ElMenuItem",Ct=N({name:fe}),_t=N({...Ct,props:It,emits:xt,setup(t,{expose:n,emit:s}){const a=t;Xe(a.index)&&et();const e=Me(),h=ee(Ce),v=O("menu"),M=O("menu-item");h||te(fe,"can not inject root menu");const{parentMenu:i,indexPath:c}=Ae(e,tt(a,"index")),b=ee(`${se}${i.value.uid}`);b||te(fe,"can not inject sub menu");const y=m(()=>a.index===h.activeIndex),f=ge({index:a.index,indexPath:c,active:y}),_=()=>{a.disabled||(h.handleMenuItemClick({index:a.index,indexPath:c.value,route:a.route}),s("click",f))};return ye(()=>{b.addSubMenu(f),h.addMenuItem(f)}),Ne(()=>{b.removeSubMenu(f),h.removeMenuItem(f)}),n({parentMenu:i,rootMenu:h,active:y,nsMenu:v,nsMenuItem:M,handleClick:_}),(w,F)=>(W(),ae("li",{class:oe([C(M).b(),C(M).is("active",C(y)),C(M).is("disabled",w.disabled)]),role:"menuitem",tabindex:"-1",onClick:_},[C(i).type.name==="ElMenu"&&C(h).props.collapse&&w.$slots.title?(W(),he(C(ze),{key:0,effect:C(h).props.popperEffect,placement:"right","fallback-placements":["left"],persistent:C(h).props.persistent},{content:X(()=>[B(w.$slots,"title")]),default:X(()=>[ve("div",{class:oe(C(v).be("tooltip","trigger"))},[B(w.$slots,"default")],2)]),_:3},8,["effect","persistent"])):(W(),ae(Ie,{key:1},[B(w.$slots,"default"),B(w.$slots,"title")],64))],2))}});var Le=le(_t,[["__file","menu-item.vue"]]);const Et={title:String},Tt=N({name:"ElMenuItemGroup"}),St=N({...Tt,props:Et,setup(t){const n=O("menu-item-group");return(s,a)=>(W(),ae("li",{class:oe(C(n).b())},[ve("div",{class:oe(C(n).e("title"))},[s.$slots.title?B(s.$slots,"title",{key:1}):(W(),ae(Ie,{key:0},[nt(at(s.title),1)],64))],2),ve("ul",null,[B(s.$slots,"default")])],2))}});var We=le(St,[["__file","menu-item-group.vue"]]);const At=ke(yt,{MenuItem:Le,MenuItemGroup:We,SubMenu:_e}),Ht=xe(Le);xe(We);xe(_e);export{Ht as E,At as a};
|