rayyy-vue-table-components 1.2.33 → 1.2.34

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/index.es.js CHANGED
@@ -18945,7 +18945,7 @@ const Wi = /* @__PURE__ */ eL(U6), K6 = /* @__PURE__ */ X({
18945
18945
  pe(w, {
18946
18946
  modelValue: l.value,
18947
18947
  "onUpdate:modelValue": f[0] || (f[0] = (b) => l.value = b),
18948
- "append-to-body": ""
18948
+ size: d.drawerSize
18949
18949
  }, {
18950
18950
  header: ne(() => f[1] || (f[1] = [
18951
18951
  ae("div", { class: "flex justify-center text-base text-black font-semibold" }, [
@@ -18982,7 +18982,7 @@ const Wi = /* @__PURE__ */ eL(U6), K6 = /* @__PURE__ */ X({
18982
18982
  ie(d.$slots, "default")
18983
18983
  ]),
18984
18984
  _: 3
18985
- }, 8, ["modelValue"])
18985
+ }, 8, ["modelValue", "size"])
18986
18986
  ], 64);
18987
18987
  };
18988
18988
  }
package/dist/index.umd.js CHANGED
@@ -52,4 +52,4 @@ __p += '`),Fe&&(Z+=`' +
52
52
  function print() { __p += __j.call(arguments, '') }
53
53
  `:`;
54
54
  `)+Z+`return __p
55
- }`;var Oe=k0(function(){return Ke(T,ce+"return "+Z).apply(r,R)});if(Oe.source=Z,$u(Oe))throw Oe;return Oe}function qR(o){return qe(o).toLowerCase()}function GR(o){return qe(o).toUpperCase()}function YR(o,l,u){if(o=qe(o),o&&(u||l===r))return Lm(o);if(!o||!(l=fn(l)))return o;var m=zn(o),_=zn(l),T=$m(m,_),R=Mm(m,_)+1;return $r(m,T,R).join("")}function XR(o,l,u){if(o=qe(o),o&&(u||l===r))return o.slice(0,Fm(o)+1);if(!o||!(l=fn(l)))return o;var m=zn(o),_=Mm(m,zn(l))+1;return $r(m,0,_).join("")}function ZR(o,l,u){if(o=qe(o),o&&(u||l===r))return o.replace(Wo,"");if(!o||!(l=fn(l)))return o;var m=zn(o),_=$m(m,zn(l));return $r(m,_).join("")}function JR(o,l){var u=W,m=V;if(at(l)){var _="separator"in l?l.separator:_;u="length"in l?Be(l.length):u,m="omission"in l?fn(l.omission):m}o=qe(o);var T=o.length;if(qo(o)){var R=zn(o);T=R.length}if(u>=T)return o;var I=u-Go(m);if(I<1)return m;var M=R?$r(R,0,I).join(""):o.slice(0,I);if(_===r)return M+m;if(R&&(I+=M.length-I),Mu(_)){if(o.slice(I).search(_)){var j,K=M;for(_.global||(_=Qc(_.source,qe(st.exec(_))+"g")),_.lastIndex=0;j=_.exec(K);)var Z=j.index;M=M.slice(0,Z===r?I:Z)}}else if(o.indexOf(fn(_),I)!=I){var ne=M.lastIndexOf(_);ne>-1&&(M=M.slice(0,ne))}return M+m}function QR(o){return o=qe(o),o&&xc.test(o)?o.replace(sr,TN):o}var eI=tl(function(o,l,u){return o+(u?" ":"")+l.toUpperCase()}),Vu=Bg("toUpperCase");function x0(o,l,u){return o=qe(o),l=u?r:l,l===r?SN(o)?AN(o):hN(o):o.match(l)||[]}var k0=Ae(function(o,l){try{return cn(o,r,l)}catch(u){return $u(u)?u:new we(u)}}),tI=pr(function(o,l){return _n(l,function(u){u=Qn(u),fr(o,u,Iu(o[u],o))}),o});function nI(o){var l=o==null?0:o.length,u=de();return o=l?lt(o,function(m){if(typeof m[1]!="function")throw new Sn(s);return[u(m[0]),m[1]]}):[],Ae(function(m){for(var _=-1;++_<l;){var T=o[_];if(cn(T[0],this,m))return cn(T[1],this,m)}})}function rI(o){return T3(xn(o,g))}function Du(o){return function(){return o}}function oI(o,l){return o==null||o!==o?l:o}var lI=Og(),aI=Og(!0);function Qt(o){return o}function Wu(o){return lg(typeof o=="function"?o:xn(o,g))}function iI(o){return ig(xn(o,g))}function sI(o,l){return sg(o,xn(l,g))}var cI=Ae(function(o,l){return function(u){return Gl(u,o,l)}}),uI=Ae(function(o,l){return function(u){return Gl(o,u,l)}});function Hu(o,l,u){var m=Ct(l),_=wi(l,m);u==null&&!(at(l)&&(_.length||!m.length))&&(u=l,l=o,o=this,_=wi(l,Ct(l)));var T=!(at(u)&&"chain"in u)||!!u.chain,R=mr(o);return _n(_,function(I){var M=l[I];o[I]=M,R&&(o.prototype[I]=function(){var j=this.__chain__;if(T||j){var K=o(this.__wrapped__),Z=K.__actions__=Xt(this.__actions__);return Z.push({func:M,args:arguments,thisArg:o}),K.__chain__=j,K}return M.apply(o,Nr([this.value()],arguments))})}),o}function fI(){return xt._===this&&(xt._=MN),this}function Uu(){}function dI(o){return o=Be(o),Ae(function(l){return cg(l,o)})}var pI=vu(lt),hI=vu(Nm),mI=vu(Kc);function B0(o){return Tu(o)?qc(Qn(o)):j3(o)}function gI(o){return function(l){return o==null?r:fo(o,l)}}var bI=Ag(),yI=Ag(!0);function ju(){return[]}function Ku(){return!1}function wI(){return{}}function CI(){return""}function vI(){return!0}function _I(o,l){if(o=Be(o),o<1||o>H)return[];var u=ee,m=Nt(o,ee);l=de(l),o-=ee;for(var _=Xc(m,l);++u<o;)l(u);return _}function SI(o){return ve(o)?lt(o,Qn):dn(o)?[o]:Xt(qg(qe(o)))}function EI(o){var l=++LN;return qe(o)+l}var xI=xi(function(o,l){return o+l},0),kI=_u("ceil"),BI=xi(function(o,l){return o/l},1),TI=_u("floor");function OI(o){return o&&o.length?yi(o,Qt,iu):r}function NI(o,l){return o&&o.length?yi(o,de(l,2),iu):r}function AI(o){return Rm(o,Qt)}function PI(o,l){return Rm(o,de(l,2))}function RI(o){return o&&o.length?yi(o,Qt,fu):r}function II(o,l){return o&&o.length?yi(o,de(l,2),fu):r}var LI=xi(function(o,l){return o*l},1),$I=_u("round"),MI=xi(function(o,l){return o-l},0);function zI(o){return o&&o.length?Yc(o,Qt):0}function FI(o,l){return o&&o.length?Yc(o,de(l,2)):0}return k.after=iP,k.ary=o0,k.assign=GP,k.assignIn=y0,k.assignInWith=zi,k.assignWith=YP,k.at=XP,k.before=l0,k.bind=Iu,k.bindAll=tI,k.bindKey=a0,k.castArray=wP,k.chain=t0,k.chunk=T4,k.compact=O4,k.concat=N4,k.cond=nI,k.conforms=rI,k.constant=Du,k.countBy=zA,k.create=ZP,k.curry=i0,k.curryRight=s0,k.debounce=c0,k.defaults=JP,k.defaultsDeep=QP,k.defer=sP,k.delay=cP,k.difference=A4,k.differenceBy=P4,k.differenceWith=R4,k.drop=I4,k.dropRight=L4,k.dropRightWhile=$4,k.dropWhile=M4,k.fill=z4,k.filter=VA,k.flatMap=HA,k.flatMapDeep=UA,k.flatMapDepth=jA,k.flatten=Zg,k.flattenDeep=F4,k.flattenDepth=V4,k.flip=uP,k.flow=lI,k.flowRight=aI,k.fromPairs=D4,k.functions=aR,k.functionsIn=iR,k.groupBy=KA,k.initial=H4,k.intersection=U4,k.intersectionBy=j4,k.intersectionWith=K4,k.invert=cR,k.invertBy=uR,k.invokeMap=GA,k.iteratee=Wu,k.keyBy=YA,k.keys=Ct,k.keysIn=Jt,k.map=Pi,k.mapKeys=dR,k.mapValues=pR,k.matches=iI,k.matchesProperty=sI,k.memoize=Ii,k.merge=hR,k.mergeWith=w0,k.method=cI,k.methodOf=uI,k.mixin=Hu,k.negate=Li,k.nthArg=dI,k.omit=mR,k.omitBy=gR,k.once=fP,k.orderBy=XA,k.over=pI,k.overArgs=dP,k.overEvery=hI,k.overSome=mI,k.partial=Lu,k.partialRight=u0,k.partition=ZA,k.pick=bR,k.pickBy=C0,k.property=B0,k.propertyOf=gI,k.pull=X4,k.pullAll=Qg,k.pullAllBy=Z4,k.pullAllWith=J4,k.pullAt=Q4,k.range=bI,k.rangeRight=yI,k.rearg=pP,k.reject=eP,k.remove=eA,k.rest=hP,k.reverse=Pu,k.sampleSize=nP,k.set=wR,k.setWith=CR,k.shuffle=rP,k.slice=tA,k.sortBy=aP,k.sortedUniq=sA,k.sortedUniqBy=cA,k.split=HR,k.spread=mP,k.tail=uA,k.take=fA,k.takeRight=dA,k.takeRightWhile=pA,k.takeWhile=hA,k.tap=OA,k.throttle=gP,k.thru=Ai,k.toArray=m0,k.toPairs=v0,k.toPairsIn=_0,k.toPath=SI,k.toPlainObject=b0,k.transform=vR,k.unary=bP,k.union=mA,k.unionBy=gA,k.unionWith=bA,k.uniq=yA,k.uniqBy=wA,k.uniqWith=CA,k.unset=_R,k.unzip=Ru,k.unzipWith=e0,k.update=SR,k.updateWith=ER,k.values=ol,k.valuesIn=xR,k.without=vA,k.words=x0,k.wrap=yP,k.xor=_A,k.xorBy=SA,k.xorWith=EA,k.zip=xA,k.zipObject=kA,k.zipObjectDeep=BA,k.zipWith=TA,k.entries=v0,k.entriesIn=_0,k.extend=y0,k.extendWith=zi,Hu(k,k),k.add=xI,k.attempt=k0,k.camelCase=OR,k.capitalize=S0,k.ceil=kI,k.clamp=kR,k.clone=CP,k.cloneDeep=_P,k.cloneDeepWith=SP,k.cloneWith=vP,k.conformsTo=EP,k.deburr=E0,k.defaultTo=oI,k.divide=BI,k.endsWith=NR,k.eq=Vn,k.escape=AR,k.escapeRegExp=PR,k.every=FA,k.find=DA,k.findIndex=Yg,k.findKey=eR,k.findLast=WA,k.findLastIndex=Xg,k.findLastKey=tR,k.floor=TI,k.forEach=n0,k.forEachRight=r0,k.forIn=nR,k.forInRight=rR,k.forOwn=oR,k.forOwnRight=lR,k.get=zu,k.gt=xP,k.gte=kP,k.has=sR,k.hasIn=Fu,k.head=Jg,k.identity=Qt,k.includes=qA,k.indexOf=W4,k.inRange=BR,k.invoke=fR,k.isArguments=mo,k.isArray=ve,k.isArrayBuffer=BP,k.isArrayLike=Zt,k.isArrayLikeObject=dt,k.isBoolean=TP,k.isBuffer=Mr,k.isDate=OP,k.isElement=NP,k.isEmpty=AP,k.isEqual=PP,k.isEqualWith=RP,k.isError=$u,k.isFinite=IP,k.isFunction=mr,k.isInteger=f0,k.isLength=$i,k.isMap=d0,k.isMatch=LP,k.isMatchWith=$P,k.isNaN=MP,k.isNative=zP,k.isNil=VP,k.isNull=FP,k.isNumber=p0,k.isObject=at,k.isObjectLike=ct,k.isPlainObject=ea,k.isRegExp=Mu,k.isSafeInteger=DP,k.isSet=h0,k.isString=Mi,k.isSymbol=dn,k.isTypedArray=rl,k.isUndefined=WP,k.isWeakMap=HP,k.isWeakSet=UP,k.join=q4,k.kebabCase=RR,k.last=Bn,k.lastIndexOf=G4,k.lowerCase=IR,k.lowerFirst=LR,k.lt=jP,k.lte=KP,k.max=OI,k.maxBy=NI,k.mean=AI,k.meanBy=PI,k.min=RI,k.minBy=II,k.stubArray=ju,k.stubFalse=Ku,k.stubObject=wI,k.stubString=CI,k.stubTrue=vI,k.multiply=LI,k.nth=Y4,k.noConflict=fI,k.noop=Uu,k.now=Ri,k.pad=$R,k.padEnd=MR,k.padStart=zR,k.parseInt=FR,k.random=TR,k.reduce=JA,k.reduceRight=QA,k.repeat=VR,k.replace=DR,k.result=yR,k.round=$I,k.runInContext=$,k.sample=tP,k.size=oP,k.snakeCase=WR,k.some=lP,k.sortedIndex=nA,k.sortedIndexBy=rA,k.sortedIndexOf=oA,k.sortedLastIndex=lA,k.sortedLastIndexBy=aA,k.sortedLastIndexOf=iA,k.startCase=UR,k.startsWith=jR,k.subtract=MI,k.sum=zI,k.sumBy=FI,k.template=KR,k.times=_I,k.toFinite=gr,k.toInteger=Be,k.toLength=g0,k.toLower=qR,k.toNumber=Tn,k.toSafeInteger=qP,k.toString=qe,k.toUpper=GR,k.trim=YR,k.trimEnd=XR,k.trimStart=ZR,k.truncate=JR,k.unescape=QR,k.uniqueId=EI,k.upperCase=eI,k.upperFirst=Vu,k.each=n0,k.eachRight=r0,k.first=Jg,Hu(k,(function(){var o={};return Zn(k,function(l,u){Ge.call(k.prototype,u)||(o[u]=l)}),o})(),{chain:!1}),k.VERSION=a,_n(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){k[o].placeholder=k}),_n(["drop","take"],function(o,l){$e.prototype[o]=function(u){u=u===r?1:yt(Be(u),0);var m=this.__filtered__&&!l?new $e(this):this.clone();return m.__filtered__?m.__takeCount__=Nt(u,m.__takeCount__):m.__views__.push({size:Nt(u,ee),type:o+(m.__dir__<0?"Right":"")}),m},$e.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),_n(["filter","map","takeWhile"],function(o,l){var u=l+1,m=u==re||u==J;$e.prototype[o]=function(_){var T=this.clone();return T.__iteratees__.push({iteratee:de(_,3),type:u}),T.__filtered__=T.__filtered__||m,T}}),_n(["head","last"],function(o,l){var u="take"+(l?"Right":"");$e.prototype[o]=function(){return this[u](1).value()[0]}}),_n(["initial","tail"],function(o,l){var u="drop"+(l?"":"Right");$e.prototype[o]=function(){return this.__filtered__?new $e(this):this[u](1)}}),$e.prototype.compact=function(){return this.filter(Qt)},$e.prototype.find=function(o){return this.filter(o).head()},$e.prototype.findLast=function(o){return this.reverse().find(o)},$e.prototype.invokeMap=Ae(function(o,l){return typeof o=="function"?new $e(this):this.map(function(u){return Gl(u,o,l)})}),$e.prototype.reject=function(o){return this.filter(Li(de(o)))},$e.prototype.slice=function(o,l){o=Be(o);var u=this;return u.__filtered__&&(o>0||l<0)?new $e(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),l!==r&&(l=Be(l),u=l<0?u.dropRight(-l):u.take(l-o)),u)},$e.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},$e.prototype.toArray=function(){return this.take(ee)},Zn($e.prototype,function(o,l){var u=/^(?:filter|find|map|reject)|While$/.test(l),m=/^(?:head|last)$/.test(l),_=k[m?"take"+(l=="last"?"Right":""):l],T=m||/^find/.test(l);_&&(k.prototype[l]=function(){var R=this.__wrapped__,I=m?[1]:arguments,M=R instanceof $e,j=I[0],K=M||ve(R),Z=function(Ie){var Fe=_.apply(k,Nr([Ie],I));return m&&ne?Fe[0]:Fe};K&&u&&typeof j=="function"&&j.length!=1&&(M=K=!1);var ne=this.__chain__,ce=!!this.__actions__.length,pe=T&&!ne,Oe=M&&!ce;if(!T&&K){R=Oe?R:new $e(this);var he=o.apply(R,I);return he.__actions__.push({func:Ai,args:[Z],thisArg:r}),new En(he,ne)}return pe&&Oe?o.apply(this,I):(he=this.thru(Z),pe?m?he.value()[0]:he.value():he)})}),_n(["pop","push","shift","sort","splice","unshift"],function(o){var l=ri[o],u=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",m=/^(?:pop|shift)$/.test(o);k.prototype[o]=function(){var _=arguments;if(m&&!this.__chain__){var T=this.value();return l.apply(ve(T)?T:[],_)}return this[u](function(R){return l.apply(ve(R)?R:[],_)})}}),Zn($e.prototype,function(o,l){var u=k[l];if(u){var m=u.name+"";Ge.call(Jo,m)||(Jo[m]=[]),Jo[m].push({name:l,func:u})}}),Jo[Ei(r,S).name]=[{name:"wrapper",func:r}],$e.prototype.clone=QN,$e.prototype.reverse=e3,$e.prototype.value=t3,k.prototype.at=NA,k.prototype.chain=AA,k.prototype.commit=PA,k.prototype.next=RA,k.prototype.plant=LA,k.prototype.reverse=$A,k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=MA,k.prototype.first=k.prototype.head,Dl&&(k.prototype[Dl]=IA),k}),Yo=PN();ao?((ao.exports=Yo)._=Yo,Wc._=Yo):xt._=Yo}).call(hO)})(Ml,Ml.exports)),Ml.exports}var gO=mO();const Xa=OE(gO),Qh=t.defineComponent({__name:"transferItem",props:{dialogModalVisible:{type:Boolean},columnsValue:{},columnsIndex:{},columnsLen:{}},emits:["update:toTop","update:toPre","update:toNext","update:toBottom"],setup(e){const n=e,r=t.reactive({itemOnHover:!1,itemOnClick:!1}),a=()=>{r.itemOnClick=!0,r.itemOnHover=!1},i=()=>{r.itemOnClick=!1,r.itemOnHover=!0};return t.watch(()=>n.dialogModalVisible,c=>{c||(r.itemOnClick=!1,r.itemOnHover=!1)}),(c,s)=>{const f=xr,p=ex,d=kB;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["transfer-item-wrapper",{"cursor-grab":r.itemOnHover,"cursor-grabbing":r.itemOnClick}]),onMouseenter:s[4]||(s[4]=h=>r.itemOnHover=!0),onMouseleave:s[5]||(s[5]=h=>r.itemOnHover=!1),onMousedown:a,onMouseup:i},[(t.openBlock(),t.createBlock(f,{label:c.columnsValue.label,value:c.columnsValue.prop,key:c.columnsValue.prop},null,8,["label","value"])),c.columnsValue.checkActive?(t.openBlock(),t.createBlock(d,{key:0,class:"transfer-arrow-wrapper"},{default:t.withCtx(()=>[t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(m_),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:s[0]||(s[0]=h=>c.$emit("update:toTop"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(hs),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:s[1]||(s[1]=h=>c.$emit("update:toPre"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(wa),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:s[2]||(s[2]=h=>c.$emit("update:toNext"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(Z1),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:s[3]||(s[3]=h=>c.$emit("update:toBottom"))},null,8,["icon","disabled"])]),_:1})]),_:1})):t.createCommentVNode("",!0)],34)}}}),bO={class:"search-bar"},yO={class:"transfer-sort-wrapper"},wO={class:"max-h-96 overflow-y-auto"},CO=t.defineComponent({__name:"TransferDialog",props:{modelValue:{type:Boolean},columnsValue:{},transferTitle:{}},emits:["update:modelValue","update:submit"],setup(e,{emit:n}){const r=e,a=n,i=t.computed({get:()=>r.modelValue,set:w=>a("update:modelValue",w)}),c=t.reactive({localColumns:Xa.cloneDeep(r.columnsValue),clickItemProp:"",checkList:r.columnsValue.map(w=>w.prop)}),s={toTop:w=>{if(w<=0)return;const E=c.localColumns.splice(w,1)[0];c.localColumns.unshift(E)},toBottom:w=>{if(w>=c.localColumns.length-1)return;const E=c.localColumns.splice(w,1)[0];c.localColumns.push(E)},toPre:w=>{if(w>0){const E=c.localColumns[w];c.localColumns[w]=c.localColumns[w-1],c.localColumns[w-1]=E}},toNext:w=>{if(w<c.localColumns.length-1){const E=c.localColumns[w];c.localColumns[w]=c.localColumns[w+1],c.localColumns[w+1]=E}}},f=()=>{c.localColumns=Xa.cloneDeep(r.columnsValue),c.checkList=r.columnsValue.filter(w=>w.checkActive).map(w=>w.prop||"")};t.watch(()=>i.value,w=>{w?f():(c.clickItemProp="",c.localColumns=[],c.checkList=[])});const p=()=>{a("update:submit",c.localColumns)},d=w=>{const E=r.columnsValue.map(S=>S.prop);c.checkList=w?E:[],h(c.checkList)},h=w=>{const E=w.map(S=>String(S));c.localColumns.forEach(S=>{S.checkActive=E.includes(S.prop)})},g=t.computed(()=>c.localColumns.length>0&&c.checkList.length===c.localColumns.length),C=t.computed({get:()=>g.value,set:w=>d(w)}),y=()=>{c.localColumns=Xa.cloneDeep(r.columnsValue)},b=w=>{if(w.length>0){const E=Xa.cloneDeep(c.localColumns);c.localColumns=E.filter(S=>S.label.includes(w))}else y()};return(w,E)=>{const S=xr,N=jE;return t.openBlock(),t.createBlock(Fo,{modelValue:i.value,"onUpdate:modelValue":E[2]||(E[2]=x=>i.value=x),title:w.transferTitle,"onClick:submit":p},{default:t.withCtx(()=>[t.createElementVNode("div",bO,[t.createVNode(no,{"show-filter":!1,"show-search":!0,"full-input":!0,"onUpdate:clear":y,"onKeydown:enter":b})]),t.createElementVNode("div",yO,[t.createVNode(S,{modelValue:C.value,"onUpdate:modelValue":E[0]||(E[0]=x=>C.value=x),class:"px-4",onChange:d},{default:t.withCtx(()=>[t.createTextVNode(" 欄 ("+t.toDisplayString(c.checkList.length)+"/"+t.toDisplayString(c.localColumns.length)+") ",1)]),_:1},8,["modelValue"]),t.createVNode(N,{modelValue:c.checkList,"onUpdate:modelValue":E[1]||(E[1]=x=>c.checkList=x),onChange:h},{default:t.withCtx(()=>[t.renderSlot(w.$slots,"list-container",{columns:c.localColumns,clickItemProp:c.clickItemProp,handleItemEvents:s,handleMousedown:x=>c.clickItemProp=x},()=>[t.createElementVNode("div",wO,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.localColumns,(x,v)=>(t.openBlock(),t.createBlock(Qh,{key:x.prop,"dialog-modal-visible":i.value,"columns-value":x,"columns-index":v,"columns-len":c.localColumns.length,class:t.normalizeClass({"transfer-active-bg":x.checkActive,"transfer-active-border":c.clickItemProp==x.prop}),onMousedown:B=>c.clickItemProp=x.prop||"","onUpdate:toTop":B=>s.toTop(v),"onUpdate:toBottom":B=>s.toBottom(v),"onUpdate:toPre":B=>s.toPre(v),"onUpdate:toNext":B=>s.toNext(v)},null,8,["dialog-modal-visible","columns-value","columns-index","columns-len","class","onMousedown","onUpdate:toTop","onUpdate:toBottom","onUpdate:toPre","onUpdate:toNext"]))),128))])])]),_:3},8,["modelValue"])])]),_:3},8,["modelValue","title"])}}}),vO={class:"h-header px-4 py-4 flex justify-between items-center bg-primary-10"},_O={class:"flex items-center gap-2"},SO={key:0,class:"flex items-center text-black"},EO={class:"font-bold text-text text-xl md:text-2xl;"},xO={class:"flex items-center gap-3"},em=t.defineComponent({__name:"FunctionHeader",props:{title:{type:String,required:!1,default:""},showBack:{type:[Boolean,String,Object],required:!1,default:!1},depth:{type:Number,required:!1,default:1}},emits:["back"],setup(e,{emit:n}){const r=e,a=n,i=()=>{const c={};switch(typeof r.showBack){case"string":c.path=r.showBack;break;case"object":Object.assign(c,r.showBack);break;default:c.path=""}a("back",c)};return(c,s)=>{const f=ut;return t.openBlock(),t.createElementBlock("div",vO,[t.createElementVNode("div",_O,[e.showBack?(t.openBlock(),t.createElementBlock("div",SO,[t.createVNode(f,{size:16,class:"cursor-pointer",onClick:i},{default:t.withCtx(()=>[t.createVNode(t.unref(K1))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",EO,t.toDisplayString(r.title),1)]),t.createElementVNode("div",xO,[t.renderSlot(c.$slots,"default")])])}}}),kO={key:0,class:"px-4 pt-1.5"},BO={key:1,class:"py-1.5 px-4"},TO={key:0,class:"flex justify-start pl-1.5 pt-0"},tm=Ya(t.defineComponent({__name:"MainPanel",props:{title:{default:""},showBack:{type:[Boolean,String,Object],default:!1},depth:{default:1},maxHeight:{default:"800px"}},setup(e){const n=e;return(r,a)=>{const i=xa;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(em),{title:n.title,showBack:n.showBack,depth:n.depth},null,8,["title","showBack","depth"]),t.createVNode(i,{class:"panel-scrollbar"},{default:t.withCtx(()=>[r.$slots.searchBar?(t.openBlock(),t.createElementBlock("div",kO,[t.renderSlot(r.$slots,"searchBar",{},void 0,!0)])):t.createCommentVNode("",!0),r.$slots.main?(t.openBlock(),t.createElementBlock("div",BO,[t.renderSlot(r.$slots,"main",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3}),r.$slots.footer?(t.openBlock(),t.createElementBlock("div",TO,[t.renderSlot(r.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-6c0518cd"]]),OO=t.defineComponent({__name:"SearchableListPanel",props:{title:{},pagination:{},showBack:{type:[Boolean,String,Object]},showSearch:{type:Boolean},showEdit:{type:Boolean},showFilter:{type:Boolean},showDefaultSearch:{type:Boolean},badgeValue:{},filterDrawerSize:{default:"50%"},pageDefaultHeight:{default:"800px"}},emits:["search","updatePage","updatePageSize"],setup(e,{emit:n}){const r=e,{pagination:a}=t.toRefs(r),i=n,c=t.computed(()=>r.showDefaultSearch||r.showSearch&&r.showEdit&&r.showFilter),s=h=>{i("search",h)},f=()=>{i("search",null)},p=h=>{i("updatePage",h)},d=h=>{i("updatePageSize",h)};return(h,g)=>{const C=vB;return t.openBlock(),t.createBlock(t.unref(tm),{title:r.title,"show-back":h.showBack,"max-height":h.pageDefaultHeight},{searchBar:t.withCtx(()=>[t.createVNode(t.unref(no),{"show-filter":c.value||h.showFilter,"show-search":c.value||h.showSearch,"badge-value":h.badgeValue,"filter-drawer-size":h.filterDrawerSize,"onKeydown:enter":s,"onUpdate:clear":f},{button:t.withCtx(()=>[t.renderSlot(h.$slots,"firstButton"),c.value||h.showEdit?t.renderSlot(h.$slots,"customButton",{key:0}):t.createCommentVNode("",!0),t.renderSlot(h.$slots,"lastButton")]),filterBody:t.withCtx(()=>[t.renderSlot(h.$slots,"filterDrawBody")]),_:3},8,["show-filter","show-search","badge-value","filter-drawer-size"])]),main:t.withCtx(()=>[t.renderSlot(h.$slots,"main")]),footer:t.withCtx(()=>[t.unref(a).totalCount>0?(t.openBlock(),t.createBlock(C,{key:0,layout:"jumper, prev, pager, next, total, sizes","page-sizes":[10,20,30,40,50],"current-page":t.unref(a).page,"page-size":t.unref(a).limit,total:t.unref(a).totalCount,onCurrentChange:p,onSizeChange:d},null,8,["current-page","page-size","total"])):t.createCommentVNode("",!0)]),_:3},8,["title","show-back","max-height"])}}}),Vo=t.defineComponent({__name:"FilterBtn",props:{badgeValue:{},drawerSize:{default:"50%"}},emits:["update:reset","update:submit"],setup(e,{emit:n}){const r=t.useAttrs(),a=t.ref(!1);function i(){a.value=!a.value}const c=n,s=()=>{c("update:reset")},f=()=>{a.value=!1};return(p,d)=>{const h=ut,g=lE,C=$x;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(on),t.mergeProps(t.unref(r),{type:"primary",class:"filter-btn",onClick:i}),{default:t.withCtx(()=>[p.badgeValue&&p.badgeValue>0?(t.openBlock(),t.createBlock(g,{key:0,value:p.badgeValue,class:"!flex justify-center items-center",type:"primary"},{default:t.withCtx(()=>[t.renderSlot(p.$slots,"fill-filter",{},()=>[t.createVNode(h,{class:"filter-icon fill-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Md))]),_:1})])]),_:3},8,["value"])):t.renderSlot(p.$slots,"filter-icon",{key:1},()=>[t.createVNode(h,{class:"filter-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Md))]),_:1})])]),_:3},16),t.createVNode(C,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=y=>a.value=y),"append-to-body":""},{header:t.withCtx(()=>d[1]||(d[1]=[t.createElementVNode("div",{class:"flex justify-center text-base text-black font-semibold"},[t.createElementVNode("span",null,"查詢條件")],-1)])),footer:t.withCtx(()=>[t.createVNode(t.unref(on),{type:"primary",class:"filter-btn",onClick:f},{default:t.withCtx(()=>[t.createVNode(h,null,{default:t.withCtx(()=>[t.createVNode(t.unref(Fd))]),_:1}),d[3]||(d[3]=t.createElementVNode("p",null,"查詢",-1))]),_:1,__:[3]})]),default:t.withCtx(()=>[t.createElementVNode("div",{class:"flex justify-between items-center pb-5 font-semibold"},[d[2]||(d[2]=t.createElementVNode("div",{class:"text-base text-black/70"},"篩選條件",-1)),t.createElementVNode("div",{class:"text-base text-primary cursor-pointer",onClick:s},"重置")]),t.renderSlot(p.$slots,"default")]),_:3},8,["modelValue"])],64)}}});function NO(e){return e.map(n=>({...n,checkActive:!0}))}const nm=[Mo,on,zo,Vo,Fo,$l,no];function rm(e,n){nm.forEach(r=>{e.component(r.name||"VueTableComponent",r)})}const AO={install:rm,...nm};Mo.install=e=>{e.component(Mo.name||"BaseTable",Mo)},on.install=e=>{e.component(on.name||"BaseBtn",on)},zo.install=e=>{e.component(zo.name||"BaseInput",zo)},Vo.install=e=>{e.component(Vo.name||"FilterBtn",Vo)},Fo.install=e=>{e.component(Fo.name||"BaseDialog",Fo)},$l.install=e=>{e.component($l.name||"SortTable",$l)},no.install=e=>{e.component(no.name||"SearchBar",no)},Me.BaseBtn=on,Me.BaseDialog=Fo,Me.BaseForm=lO,Me.BaseInput=zo,Me.BaseMultipleInput=aO,Me.BaseTable=Mo,Me.FilterBtn=Vo,Me.FunctionHeader=em,Me.MainPanel=tm,Me.SearchBar=no,Me.SearchableListPanel=OO,Me.SortTable=$l,Me.TransferDialog=CO,Me.TransferItem=Qh,Me.default=AO,Me.install=rm,Me.setActiveColumn=NO,Object.defineProperties(Me,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
55
+ }`;var Oe=k0(function(){return Ke(T,ce+"return "+Z).apply(r,R)});if(Oe.source=Z,$u(Oe))throw Oe;return Oe}function qR(o){return qe(o).toLowerCase()}function GR(o){return qe(o).toUpperCase()}function YR(o,l,u){if(o=qe(o),o&&(u||l===r))return Lm(o);if(!o||!(l=fn(l)))return o;var m=zn(o),_=zn(l),T=$m(m,_),R=Mm(m,_)+1;return $r(m,T,R).join("")}function XR(o,l,u){if(o=qe(o),o&&(u||l===r))return o.slice(0,Fm(o)+1);if(!o||!(l=fn(l)))return o;var m=zn(o),_=Mm(m,zn(l))+1;return $r(m,0,_).join("")}function ZR(o,l,u){if(o=qe(o),o&&(u||l===r))return o.replace(Wo,"");if(!o||!(l=fn(l)))return o;var m=zn(o),_=$m(m,zn(l));return $r(m,_).join("")}function JR(o,l){var u=W,m=V;if(at(l)){var _="separator"in l?l.separator:_;u="length"in l?Be(l.length):u,m="omission"in l?fn(l.omission):m}o=qe(o);var T=o.length;if(qo(o)){var R=zn(o);T=R.length}if(u>=T)return o;var I=u-Go(m);if(I<1)return m;var M=R?$r(R,0,I).join(""):o.slice(0,I);if(_===r)return M+m;if(R&&(I+=M.length-I),Mu(_)){if(o.slice(I).search(_)){var j,K=M;for(_.global||(_=Qc(_.source,qe(st.exec(_))+"g")),_.lastIndex=0;j=_.exec(K);)var Z=j.index;M=M.slice(0,Z===r?I:Z)}}else if(o.indexOf(fn(_),I)!=I){var ne=M.lastIndexOf(_);ne>-1&&(M=M.slice(0,ne))}return M+m}function QR(o){return o=qe(o),o&&xc.test(o)?o.replace(sr,TN):o}var eI=tl(function(o,l,u){return o+(u?" ":"")+l.toUpperCase()}),Vu=Bg("toUpperCase");function x0(o,l,u){return o=qe(o),l=u?r:l,l===r?SN(o)?AN(o):hN(o):o.match(l)||[]}var k0=Ae(function(o,l){try{return cn(o,r,l)}catch(u){return $u(u)?u:new we(u)}}),tI=pr(function(o,l){return _n(l,function(u){u=Qn(u),fr(o,u,Iu(o[u],o))}),o});function nI(o){var l=o==null?0:o.length,u=de();return o=l?lt(o,function(m){if(typeof m[1]!="function")throw new Sn(s);return[u(m[0]),m[1]]}):[],Ae(function(m){for(var _=-1;++_<l;){var T=o[_];if(cn(T[0],this,m))return cn(T[1],this,m)}})}function rI(o){return T3(xn(o,g))}function Du(o){return function(){return o}}function oI(o,l){return o==null||o!==o?l:o}var lI=Og(),aI=Og(!0);function Qt(o){return o}function Wu(o){return lg(typeof o=="function"?o:xn(o,g))}function iI(o){return ig(xn(o,g))}function sI(o,l){return sg(o,xn(l,g))}var cI=Ae(function(o,l){return function(u){return Gl(u,o,l)}}),uI=Ae(function(o,l){return function(u){return Gl(o,u,l)}});function Hu(o,l,u){var m=Ct(l),_=wi(l,m);u==null&&!(at(l)&&(_.length||!m.length))&&(u=l,l=o,o=this,_=wi(l,Ct(l)));var T=!(at(u)&&"chain"in u)||!!u.chain,R=mr(o);return _n(_,function(I){var M=l[I];o[I]=M,R&&(o.prototype[I]=function(){var j=this.__chain__;if(T||j){var K=o(this.__wrapped__),Z=K.__actions__=Xt(this.__actions__);return Z.push({func:M,args:arguments,thisArg:o}),K.__chain__=j,K}return M.apply(o,Nr([this.value()],arguments))})}),o}function fI(){return xt._===this&&(xt._=MN),this}function Uu(){}function dI(o){return o=Be(o),Ae(function(l){return cg(l,o)})}var pI=vu(lt),hI=vu(Nm),mI=vu(Kc);function B0(o){return Tu(o)?qc(Qn(o)):j3(o)}function gI(o){return function(l){return o==null?r:fo(o,l)}}var bI=Ag(),yI=Ag(!0);function ju(){return[]}function Ku(){return!1}function wI(){return{}}function CI(){return""}function vI(){return!0}function _I(o,l){if(o=Be(o),o<1||o>H)return[];var u=ee,m=Nt(o,ee);l=de(l),o-=ee;for(var _=Xc(m,l);++u<o;)l(u);return _}function SI(o){return ve(o)?lt(o,Qn):dn(o)?[o]:Xt(qg(qe(o)))}function EI(o){var l=++LN;return qe(o)+l}var xI=xi(function(o,l){return o+l},0),kI=_u("ceil"),BI=xi(function(o,l){return o/l},1),TI=_u("floor");function OI(o){return o&&o.length?yi(o,Qt,iu):r}function NI(o,l){return o&&o.length?yi(o,de(l,2),iu):r}function AI(o){return Rm(o,Qt)}function PI(o,l){return Rm(o,de(l,2))}function RI(o){return o&&o.length?yi(o,Qt,fu):r}function II(o,l){return o&&o.length?yi(o,de(l,2),fu):r}var LI=xi(function(o,l){return o*l},1),$I=_u("round"),MI=xi(function(o,l){return o-l},0);function zI(o){return o&&o.length?Yc(o,Qt):0}function FI(o,l){return o&&o.length?Yc(o,de(l,2)):0}return k.after=iP,k.ary=o0,k.assign=GP,k.assignIn=y0,k.assignInWith=zi,k.assignWith=YP,k.at=XP,k.before=l0,k.bind=Iu,k.bindAll=tI,k.bindKey=a0,k.castArray=wP,k.chain=t0,k.chunk=T4,k.compact=O4,k.concat=N4,k.cond=nI,k.conforms=rI,k.constant=Du,k.countBy=zA,k.create=ZP,k.curry=i0,k.curryRight=s0,k.debounce=c0,k.defaults=JP,k.defaultsDeep=QP,k.defer=sP,k.delay=cP,k.difference=A4,k.differenceBy=P4,k.differenceWith=R4,k.drop=I4,k.dropRight=L4,k.dropRightWhile=$4,k.dropWhile=M4,k.fill=z4,k.filter=VA,k.flatMap=HA,k.flatMapDeep=UA,k.flatMapDepth=jA,k.flatten=Zg,k.flattenDeep=F4,k.flattenDepth=V4,k.flip=uP,k.flow=lI,k.flowRight=aI,k.fromPairs=D4,k.functions=aR,k.functionsIn=iR,k.groupBy=KA,k.initial=H4,k.intersection=U4,k.intersectionBy=j4,k.intersectionWith=K4,k.invert=cR,k.invertBy=uR,k.invokeMap=GA,k.iteratee=Wu,k.keyBy=YA,k.keys=Ct,k.keysIn=Jt,k.map=Pi,k.mapKeys=dR,k.mapValues=pR,k.matches=iI,k.matchesProperty=sI,k.memoize=Ii,k.merge=hR,k.mergeWith=w0,k.method=cI,k.methodOf=uI,k.mixin=Hu,k.negate=Li,k.nthArg=dI,k.omit=mR,k.omitBy=gR,k.once=fP,k.orderBy=XA,k.over=pI,k.overArgs=dP,k.overEvery=hI,k.overSome=mI,k.partial=Lu,k.partialRight=u0,k.partition=ZA,k.pick=bR,k.pickBy=C0,k.property=B0,k.propertyOf=gI,k.pull=X4,k.pullAll=Qg,k.pullAllBy=Z4,k.pullAllWith=J4,k.pullAt=Q4,k.range=bI,k.rangeRight=yI,k.rearg=pP,k.reject=eP,k.remove=eA,k.rest=hP,k.reverse=Pu,k.sampleSize=nP,k.set=wR,k.setWith=CR,k.shuffle=rP,k.slice=tA,k.sortBy=aP,k.sortedUniq=sA,k.sortedUniqBy=cA,k.split=HR,k.spread=mP,k.tail=uA,k.take=fA,k.takeRight=dA,k.takeRightWhile=pA,k.takeWhile=hA,k.tap=OA,k.throttle=gP,k.thru=Ai,k.toArray=m0,k.toPairs=v0,k.toPairsIn=_0,k.toPath=SI,k.toPlainObject=b0,k.transform=vR,k.unary=bP,k.union=mA,k.unionBy=gA,k.unionWith=bA,k.uniq=yA,k.uniqBy=wA,k.uniqWith=CA,k.unset=_R,k.unzip=Ru,k.unzipWith=e0,k.update=SR,k.updateWith=ER,k.values=ol,k.valuesIn=xR,k.without=vA,k.words=x0,k.wrap=yP,k.xor=_A,k.xorBy=SA,k.xorWith=EA,k.zip=xA,k.zipObject=kA,k.zipObjectDeep=BA,k.zipWith=TA,k.entries=v0,k.entriesIn=_0,k.extend=y0,k.extendWith=zi,Hu(k,k),k.add=xI,k.attempt=k0,k.camelCase=OR,k.capitalize=S0,k.ceil=kI,k.clamp=kR,k.clone=CP,k.cloneDeep=_P,k.cloneDeepWith=SP,k.cloneWith=vP,k.conformsTo=EP,k.deburr=E0,k.defaultTo=oI,k.divide=BI,k.endsWith=NR,k.eq=Vn,k.escape=AR,k.escapeRegExp=PR,k.every=FA,k.find=DA,k.findIndex=Yg,k.findKey=eR,k.findLast=WA,k.findLastIndex=Xg,k.findLastKey=tR,k.floor=TI,k.forEach=n0,k.forEachRight=r0,k.forIn=nR,k.forInRight=rR,k.forOwn=oR,k.forOwnRight=lR,k.get=zu,k.gt=xP,k.gte=kP,k.has=sR,k.hasIn=Fu,k.head=Jg,k.identity=Qt,k.includes=qA,k.indexOf=W4,k.inRange=BR,k.invoke=fR,k.isArguments=mo,k.isArray=ve,k.isArrayBuffer=BP,k.isArrayLike=Zt,k.isArrayLikeObject=dt,k.isBoolean=TP,k.isBuffer=Mr,k.isDate=OP,k.isElement=NP,k.isEmpty=AP,k.isEqual=PP,k.isEqualWith=RP,k.isError=$u,k.isFinite=IP,k.isFunction=mr,k.isInteger=f0,k.isLength=$i,k.isMap=d0,k.isMatch=LP,k.isMatchWith=$P,k.isNaN=MP,k.isNative=zP,k.isNil=VP,k.isNull=FP,k.isNumber=p0,k.isObject=at,k.isObjectLike=ct,k.isPlainObject=ea,k.isRegExp=Mu,k.isSafeInteger=DP,k.isSet=h0,k.isString=Mi,k.isSymbol=dn,k.isTypedArray=rl,k.isUndefined=WP,k.isWeakMap=HP,k.isWeakSet=UP,k.join=q4,k.kebabCase=RR,k.last=Bn,k.lastIndexOf=G4,k.lowerCase=IR,k.lowerFirst=LR,k.lt=jP,k.lte=KP,k.max=OI,k.maxBy=NI,k.mean=AI,k.meanBy=PI,k.min=RI,k.minBy=II,k.stubArray=ju,k.stubFalse=Ku,k.stubObject=wI,k.stubString=CI,k.stubTrue=vI,k.multiply=LI,k.nth=Y4,k.noConflict=fI,k.noop=Uu,k.now=Ri,k.pad=$R,k.padEnd=MR,k.padStart=zR,k.parseInt=FR,k.random=TR,k.reduce=JA,k.reduceRight=QA,k.repeat=VR,k.replace=DR,k.result=yR,k.round=$I,k.runInContext=$,k.sample=tP,k.size=oP,k.snakeCase=WR,k.some=lP,k.sortedIndex=nA,k.sortedIndexBy=rA,k.sortedIndexOf=oA,k.sortedLastIndex=lA,k.sortedLastIndexBy=aA,k.sortedLastIndexOf=iA,k.startCase=UR,k.startsWith=jR,k.subtract=MI,k.sum=zI,k.sumBy=FI,k.template=KR,k.times=_I,k.toFinite=gr,k.toInteger=Be,k.toLength=g0,k.toLower=qR,k.toNumber=Tn,k.toSafeInteger=qP,k.toString=qe,k.toUpper=GR,k.trim=YR,k.trimEnd=XR,k.trimStart=ZR,k.truncate=JR,k.unescape=QR,k.uniqueId=EI,k.upperCase=eI,k.upperFirst=Vu,k.each=n0,k.eachRight=r0,k.first=Jg,Hu(k,(function(){var o={};return Zn(k,function(l,u){Ge.call(k.prototype,u)||(o[u]=l)}),o})(),{chain:!1}),k.VERSION=a,_n(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){k[o].placeholder=k}),_n(["drop","take"],function(o,l){$e.prototype[o]=function(u){u=u===r?1:yt(Be(u),0);var m=this.__filtered__&&!l?new $e(this):this.clone();return m.__filtered__?m.__takeCount__=Nt(u,m.__takeCount__):m.__views__.push({size:Nt(u,ee),type:o+(m.__dir__<0?"Right":"")}),m},$e.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),_n(["filter","map","takeWhile"],function(o,l){var u=l+1,m=u==re||u==J;$e.prototype[o]=function(_){var T=this.clone();return T.__iteratees__.push({iteratee:de(_,3),type:u}),T.__filtered__=T.__filtered__||m,T}}),_n(["head","last"],function(o,l){var u="take"+(l?"Right":"");$e.prototype[o]=function(){return this[u](1).value()[0]}}),_n(["initial","tail"],function(o,l){var u="drop"+(l?"":"Right");$e.prototype[o]=function(){return this.__filtered__?new $e(this):this[u](1)}}),$e.prototype.compact=function(){return this.filter(Qt)},$e.prototype.find=function(o){return this.filter(o).head()},$e.prototype.findLast=function(o){return this.reverse().find(o)},$e.prototype.invokeMap=Ae(function(o,l){return typeof o=="function"?new $e(this):this.map(function(u){return Gl(u,o,l)})}),$e.prototype.reject=function(o){return this.filter(Li(de(o)))},$e.prototype.slice=function(o,l){o=Be(o);var u=this;return u.__filtered__&&(o>0||l<0)?new $e(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),l!==r&&(l=Be(l),u=l<0?u.dropRight(-l):u.take(l-o)),u)},$e.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},$e.prototype.toArray=function(){return this.take(ee)},Zn($e.prototype,function(o,l){var u=/^(?:filter|find|map|reject)|While$/.test(l),m=/^(?:head|last)$/.test(l),_=k[m?"take"+(l=="last"?"Right":""):l],T=m||/^find/.test(l);_&&(k.prototype[l]=function(){var R=this.__wrapped__,I=m?[1]:arguments,M=R instanceof $e,j=I[0],K=M||ve(R),Z=function(Ie){var Fe=_.apply(k,Nr([Ie],I));return m&&ne?Fe[0]:Fe};K&&u&&typeof j=="function"&&j.length!=1&&(M=K=!1);var ne=this.__chain__,ce=!!this.__actions__.length,pe=T&&!ne,Oe=M&&!ce;if(!T&&K){R=Oe?R:new $e(this);var he=o.apply(R,I);return he.__actions__.push({func:Ai,args:[Z],thisArg:r}),new En(he,ne)}return pe&&Oe?o.apply(this,I):(he=this.thru(Z),pe?m?he.value()[0]:he.value():he)})}),_n(["pop","push","shift","sort","splice","unshift"],function(o){var l=ri[o],u=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",m=/^(?:pop|shift)$/.test(o);k.prototype[o]=function(){var _=arguments;if(m&&!this.__chain__){var T=this.value();return l.apply(ve(T)?T:[],_)}return this[u](function(R){return l.apply(ve(R)?R:[],_)})}}),Zn($e.prototype,function(o,l){var u=k[l];if(u){var m=u.name+"";Ge.call(Jo,m)||(Jo[m]=[]),Jo[m].push({name:l,func:u})}}),Jo[Ei(r,S).name]=[{name:"wrapper",func:r}],$e.prototype.clone=QN,$e.prototype.reverse=e3,$e.prototype.value=t3,k.prototype.at=NA,k.prototype.chain=AA,k.prototype.commit=PA,k.prototype.next=RA,k.prototype.plant=LA,k.prototype.reverse=$A,k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=MA,k.prototype.first=k.prototype.head,Dl&&(k.prototype[Dl]=IA),k}),Yo=PN();ao?((ao.exports=Yo)._=Yo,Wc._=Yo):xt._=Yo}).call(hO)})(Ml,Ml.exports)),Ml.exports}var gO=mO();const Xa=OE(gO),Qh=t.defineComponent({__name:"transferItem",props:{dialogModalVisible:{type:Boolean},columnsValue:{},columnsIndex:{},columnsLen:{}},emits:["update:toTop","update:toPre","update:toNext","update:toBottom"],setup(e){const n=e,r=t.reactive({itemOnHover:!1,itemOnClick:!1}),a=()=>{r.itemOnClick=!0,r.itemOnHover=!1},i=()=>{r.itemOnClick=!1,r.itemOnHover=!0};return t.watch(()=>n.dialogModalVisible,c=>{c||(r.itemOnClick=!1,r.itemOnHover=!1)}),(c,s)=>{const f=xr,p=ex,d=kB;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["transfer-item-wrapper",{"cursor-grab":r.itemOnHover,"cursor-grabbing":r.itemOnClick}]),onMouseenter:s[4]||(s[4]=h=>r.itemOnHover=!0),onMouseleave:s[5]||(s[5]=h=>r.itemOnHover=!1),onMousedown:a,onMouseup:i},[(t.openBlock(),t.createBlock(f,{label:c.columnsValue.label,value:c.columnsValue.prop,key:c.columnsValue.prop},null,8,["label","value"])),c.columnsValue.checkActive?(t.openBlock(),t.createBlock(d,{key:0,class:"transfer-arrow-wrapper"},{default:t.withCtx(()=>[t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(m_),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:s[0]||(s[0]=h=>c.$emit("update:toTop"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(hs),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:s[1]||(s[1]=h=>c.$emit("update:toPre"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(wa),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:s[2]||(s[2]=h=>c.$emit("update:toNext"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(p,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(on),{icon:t.unref(Z1),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:s[3]||(s[3]=h=>c.$emit("update:toBottom"))},null,8,["icon","disabled"])]),_:1})]),_:1})):t.createCommentVNode("",!0)],34)}}}),bO={class:"search-bar"},yO={class:"transfer-sort-wrapper"},wO={class:"max-h-96 overflow-y-auto"},CO=t.defineComponent({__name:"TransferDialog",props:{modelValue:{type:Boolean},columnsValue:{},transferTitle:{}},emits:["update:modelValue","update:submit"],setup(e,{emit:n}){const r=e,a=n,i=t.computed({get:()=>r.modelValue,set:w=>a("update:modelValue",w)}),c=t.reactive({localColumns:Xa.cloneDeep(r.columnsValue),clickItemProp:"",checkList:r.columnsValue.map(w=>w.prop)}),s={toTop:w=>{if(w<=0)return;const E=c.localColumns.splice(w,1)[0];c.localColumns.unshift(E)},toBottom:w=>{if(w>=c.localColumns.length-1)return;const E=c.localColumns.splice(w,1)[0];c.localColumns.push(E)},toPre:w=>{if(w>0){const E=c.localColumns[w];c.localColumns[w]=c.localColumns[w-1],c.localColumns[w-1]=E}},toNext:w=>{if(w<c.localColumns.length-1){const E=c.localColumns[w];c.localColumns[w]=c.localColumns[w+1],c.localColumns[w+1]=E}}},f=()=>{c.localColumns=Xa.cloneDeep(r.columnsValue),c.checkList=r.columnsValue.filter(w=>w.checkActive).map(w=>w.prop||"")};t.watch(()=>i.value,w=>{w?f():(c.clickItemProp="",c.localColumns=[],c.checkList=[])});const p=()=>{a("update:submit",c.localColumns)},d=w=>{const E=r.columnsValue.map(S=>S.prop);c.checkList=w?E:[],h(c.checkList)},h=w=>{const E=w.map(S=>String(S));c.localColumns.forEach(S=>{S.checkActive=E.includes(S.prop)})},g=t.computed(()=>c.localColumns.length>0&&c.checkList.length===c.localColumns.length),C=t.computed({get:()=>g.value,set:w=>d(w)}),y=()=>{c.localColumns=Xa.cloneDeep(r.columnsValue)},b=w=>{if(w.length>0){const E=Xa.cloneDeep(c.localColumns);c.localColumns=E.filter(S=>S.label.includes(w))}else y()};return(w,E)=>{const S=xr,N=jE;return t.openBlock(),t.createBlock(Fo,{modelValue:i.value,"onUpdate:modelValue":E[2]||(E[2]=x=>i.value=x),title:w.transferTitle,"onClick:submit":p},{default:t.withCtx(()=>[t.createElementVNode("div",bO,[t.createVNode(no,{"show-filter":!1,"show-search":!0,"full-input":!0,"onUpdate:clear":y,"onKeydown:enter":b})]),t.createElementVNode("div",yO,[t.createVNode(S,{modelValue:C.value,"onUpdate:modelValue":E[0]||(E[0]=x=>C.value=x),class:"px-4",onChange:d},{default:t.withCtx(()=>[t.createTextVNode(" 欄 ("+t.toDisplayString(c.checkList.length)+"/"+t.toDisplayString(c.localColumns.length)+") ",1)]),_:1},8,["modelValue"]),t.createVNode(N,{modelValue:c.checkList,"onUpdate:modelValue":E[1]||(E[1]=x=>c.checkList=x),onChange:h},{default:t.withCtx(()=>[t.renderSlot(w.$slots,"list-container",{columns:c.localColumns,clickItemProp:c.clickItemProp,handleItemEvents:s,handleMousedown:x=>c.clickItemProp=x},()=>[t.createElementVNode("div",wO,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.localColumns,(x,v)=>(t.openBlock(),t.createBlock(Qh,{key:x.prop,"dialog-modal-visible":i.value,"columns-value":x,"columns-index":v,"columns-len":c.localColumns.length,class:t.normalizeClass({"transfer-active-bg":x.checkActive,"transfer-active-border":c.clickItemProp==x.prop}),onMousedown:B=>c.clickItemProp=x.prop||"","onUpdate:toTop":B=>s.toTop(v),"onUpdate:toBottom":B=>s.toBottom(v),"onUpdate:toPre":B=>s.toPre(v),"onUpdate:toNext":B=>s.toNext(v)},null,8,["dialog-modal-visible","columns-value","columns-index","columns-len","class","onMousedown","onUpdate:toTop","onUpdate:toBottom","onUpdate:toPre","onUpdate:toNext"]))),128))])])]),_:3},8,["modelValue"])])]),_:3},8,["modelValue","title"])}}}),vO={class:"h-header px-4 py-4 flex justify-between items-center bg-primary-10"},_O={class:"flex items-center gap-2"},SO={key:0,class:"flex items-center text-black"},EO={class:"font-bold text-text text-xl md:text-2xl;"},xO={class:"flex items-center gap-3"},em=t.defineComponent({__name:"FunctionHeader",props:{title:{type:String,required:!1,default:""},showBack:{type:[Boolean,String,Object],required:!1,default:!1},depth:{type:Number,required:!1,default:1}},emits:["back"],setup(e,{emit:n}){const r=e,a=n,i=()=>{const c={};switch(typeof r.showBack){case"string":c.path=r.showBack;break;case"object":Object.assign(c,r.showBack);break;default:c.path=""}a("back",c)};return(c,s)=>{const f=ut;return t.openBlock(),t.createElementBlock("div",vO,[t.createElementVNode("div",_O,[e.showBack?(t.openBlock(),t.createElementBlock("div",SO,[t.createVNode(f,{size:16,class:"cursor-pointer",onClick:i},{default:t.withCtx(()=>[t.createVNode(t.unref(K1))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",EO,t.toDisplayString(r.title),1)]),t.createElementVNode("div",xO,[t.renderSlot(c.$slots,"default")])])}}}),kO={key:0,class:"px-4 pt-1.5"},BO={key:1,class:"py-1.5 px-4"},TO={key:0,class:"flex justify-start pl-1.5 pt-0"},tm=Ya(t.defineComponent({__name:"MainPanel",props:{title:{default:""},showBack:{type:[Boolean,String,Object],default:!1},depth:{default:1},maxHeight:{default:"800px"}},setup(e){const n=e;return(r,a)=>{const i=xa;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(em),{title:n.title,showBack:n.showBack,depth:n.depth},null,8,["title","showBack","depth"]),t.createVNode(i,{class:"panel-scrollbar"},{default:t.withCtx(()=>[r.$slots.searchBar?(t.openBlock(),t.createElementBlock("div",kO,[t.renderSlot(r.$slots,"searchBar",{},void 0,!0)])):t.createCommentVNode("",!0),r.$slots.main?(t.openBlock(),t.createElementBlock("div",BO,[t.renderSlot(r.$slots,"main",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3}),r.$slots.footer?(t.openBlock(),t.createElementBlock("div",TO,[t.renderSlot(r.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-6c0518cd"]]),OO=t.defineComponent({__name:"SearchableListPanel",props:{title:{},pagination:{},showBack:{type:[Boolean,String,Object]},showSearch:{type:Boolean},showEdit:{type:Boolean},showFilter:{type:Boolean},showDefaultSearch:{type:Boolean},badgeValue:{},filterDrawerSize:{default:"50%"},pageDefaultHeight:{default:"800px"}},emits:["search","updatePage","updatePageSize"],setup(e,{emit:n}){const r=e,{pagination:a}=t.toRefs(r),i=n,c=t.computed(()=>r.showDefaultSearch||r.showSearch&&r.showEdit&&r.showFilter),s=h=>{i("search",h)},f=()=>{i("search",null)},p=h=>{i("updatePage",h)},d=h=>{i("updatePageSize",h)};return(h,g)=>{const C=vB;return t.openBlock(),t.createBlock(t.unref(tm),{title:r.title,"show-back":h.showBack,"max-height":h.pageDefaultHeight},{searchBar:t.withCtx(()=>[t.createVNode(t.unref(no),{"show-filter":c.value||h.showFilter,"show-search":c.value||h.showSearch,"badge-value":h.badgeValue,"filter-drawer-size":h.filterDrawerSize,"onKeydown:enter":s,"onUpdate:clear":f},{button:t.withCtx(()=>[t.renderSlot(h.$slots,"firstButton"),c.value||h.showEdit?t.renderSlot(h.$slots,"customButton",{key:0}):t.createCommentVNode("",!0),t.renderSlot(h.$slots,"lastButton")]),filterBody:t.withCtx(()=>[t.renderSlot(h.$slots,"filterDrawBody")]),_:3},8,["show-filter","show-search","badge-value","filter-drawer-size"])]),main:t.withCtx(()=>[t.renderSlot(h.$slots,"main")]),footer:t.withCtx(()=>[t.unref(a).totalCount>0?(t.openBlock(),t.createBlock(C,{key:0,layout:"jumper, prev, pager, next, total, sizes","page-sizes":[10,20,30,40,50],"current-page":t.unref(a).page,"page-size":t.unref(a).limit,total:t.unref(a).totalCount,onCurrentChange:p,onSizeChange:d},null,8,["current-page","page-size","total"])):t.createCommentVNode("",!0)]),_:3},8,["title","show-back","max-height"])}}}),Vo=t.defineComponent({__name:"FilterBtn",props:{badgeValue:{},drawerSize:{default:"50%"}},emits:["update:reset","update:submit"],setup(e,{emit:n}){const r=t.useAttrs(),a=t.ref(!1);function i(){a.value=!a.value}const c=n,s=()=>{c("update:reset")},f=()=>{a.value=!1};return(p,d)=>{const h=ut,g=lE,C=$x;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(on),t.mergeProps(t.unref(r),{type:"primary",class:"filter-btn",onClick:i}),{default:t.withCtx(()=>[p.badgeValue&&p.badgeValue>0?(t.openBlock(),t.createBlock(g,{key:0,value:p.badgeValue,class:"!flex justify-center items-center",type:"primary"},{default:t.withCtx(()=>[t.renderSlot(p.$slots,"fill-filter",{},()=>[t.createVNode(h,{class:"filter-icon fill-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Md))]),_:1})])]),_:3},8,["value"])):t.renderSlot(p.$slots,"filter-icon",{key:1},()=>[t.createVNode(h,{class:"filter-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Md))]),_:1})])]),_:3},16),t.createVNode(C,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=y=>a.value=y),size:p.drawerSize},{header:t.withCtx(()=>d[1]||(d[1]=[t.createElementVNode("div",{class:"flex justify-center text-base text-black font-semibold"},[t.createElementVNode("span",null,"查詢條件")],-1)])),footer:t.withCtx(()=>[t.createVNode(t.unref(on),{type:"primary",class:"filter-btn",onClick:f},{default:t.withCtx(()=>[t.createVNode(h,null,{default:t.withCtx(()=>[t.createVNode(t.unref(Fd))]),_:1}),d[3]||(d[3]=t.createElementVNode("p",null,"查詢",-1))]),_:1,__:[3]})]),default:t.withCtx(()=>[t.createElementVNode("div",{class:"flex justify-between items-center pb-5 font-semibold"},[d[2]||(d[2]=t.createElementVNode("div",{class:"text-base text-black/70"},"篩選條件",-1)),t.createElementVNode("div",{class:"text-base text-primary cursor-pointer",onClick:s},"重置")]),t.renderSlot(p.$slots,"default")]),_:3},8,["modelValue","size"])],64)}}});function NO(e){return e.map(n=>({...n,checkActive:!0}))}const nm=[Mo,on,zo,Vo,Fo,$l,no];function rm(e,n){nm.forEach(r=>{e.component(r.name||"VueTableComponent",r)})}const AO={install:rm,...nm};Mo.install=e=>{e.component(Mo.name||"BaseTable",Mo)},on.install=e=>{e.component(on.name||"BaseBtn",on)},zo.install=e=>{e.component(zo.name||"BaseInput",zo)},Vo.install=e=>{e.component(Vo.name||"FilterBtn",Vo)},Fo.install=e=>{e.component(Fo.name||"BaseDialog",Fo)},$l.install=e=>{e.component($l.name||"SortTable",$l)},no.install=e=>{e.component(no.name||"SearchBar",no)},Me.BaseBtn=on,Me.BaseDialog=Fo,Me.BaseForm=lO,Me.BaseInput=zo,Me.BaseMultipleInput=aO,Me.BaseTable=Mo,Me.FilterBtn=Vo,Me.FunctionHeader=em,Me.MainPanel=tm,Me.SearchBar=no,Me.SearchableListPanel=OO,Me.SortTable=$l,Me.TransferDialog=CO,Me.TransferItem=Qh,Me.default=AO,Me.install=rm,Me.setActiveColumn=NO,Object.defineProperties(Me,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rayyy-vue-table-components",
3
- "version": "1.2.33",
3
+ "version": "1.2.34",
4
4
  "description": "Vue 3 + Element Plus 表格組件庫",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.js",
@@ -55,7 +55,7 @@ const submitFilter = () => {
55
55
  </el-icon>
56
56
  </slot>
57
57
  </base-btn>
58
- <el-drawer v-model="showDrawer" append-to-body>
58
+ <el-drawer v-model="showDrawer" :size="drawerSize">
59
59
  <template #header>
60
60
  <div class="flex justify-center text-base text-black font-semibold">
61
61
  <span>查詢條件</span>