rayyy-vue-table-components 1.3.3 → 1.3.4

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
@@ -16557,7 +16557,7 @@ const bi = /* @__PURE__ */ IA(pI), vI = /* @__PURE__ */ J({
16557
16557
  }
16558
16558
  );
16559
16559
  const p = () => {
16560
- console.log("state.localColumns", s.localColumns), l("update:submit", s.localColumns);
16560
+ l("update:submit", s.localColumns);
16561
16561
  }, f = (y) => {
16562
16562
  const T = r.columnsValue.map((x) => x.prop);
16563
16563
  s.checkList = y ? T : [], v(s.checkList);
@@ -16846,7 +16846,7 @@ const bi = /* @__PURE__ */ IA(pI), vI = /* @__PURE__ */ J({
16846
16846
  re("div", LI, [
16847
16847
  re("div", PI, [
16848
16848
  re("div", {
16849
- class: "cursor-pointer text-blue-800 text-xl flex items-center justify-center hover:text-blue-600",
16849
+ class: "cursor-pointer text-text text-xl flex items-center justify-center hover:text-blue-600",
16850
16850
  onClick: l
16851
16851
  }, [
16852
16852
  me(f, null, {
package/dist/index.umd.js CHANGED
@@ -41,4 +41,4 @@ __p += '`),Le&&(Y+=`' +
41
41
  function print() { __p += __j.call(arguments, '') }
42
42
  `:`;
43
43
  `)+Y+`return __p
44
- }`;var Ee=bg(function(){return ze(E,ie+"return "+Y).apply(o,N)});if(Ee.source=Y,Zc(Ee))throw Ee;return Ee}function v3(n){return De(n).toLowerCase()}function w3(n){return De(n).toUpperCase()}function _3(n,l,i){if(n=De(n),n&&(i||l===o))return xh(n);if(!n||!(l=nn(l)))return n;var p=Tn(n),C=Tn(l),E=Bh(p,C),N=Th(p,C)+1;return Or(p,E,N).join("")}function S3(n,l,i){if(n=De(n),n&&(i||l===o))return n.slice(0,Nh(n)+1);if(!n||!(l=nn(l)))return n;var p=Tn(n),C=Th(p,Tn(l))+1;return Or(p,0,C).join("")}function E3(n,l,i){if(n=De(n),n&&(i||l===o))return n.replace(No,"");if(!n||!(l=nn(l)))return n;var p=Tn(n),C=Bh(p,Tn(l));return Or(p,C).join("")}function k3(n,l){var i=U,p=D;if(tt(l)){var C="separator"in l?l.separator:C;i="length"in l?_e(l.length):i,p="omission"in l?nn(l.omission):p}n=De(n);var E=n.length;if(Po(n)){var N=Tn(n);E=N.length}if(i>=E)return n;var I=i-Mo(p);if(I<1)return p;var M=N?Or(N,0,I).join(""):n.slice(0,I);if(C===o)return M+p;if(N&&(I+=M.length-I),Jc(C)){if(n.slice(I).search(C)){var K,j=M;for(C.global||(C=hc(C.source,De(rt.exec(C))+"g")),C.lastIndex=0;K=C.exec(j);)var Y=K.index;M=M.slice(0,Y===o?I:Y)}}else if(n.indexOf(nn(C),I)!=I){var ee=M.lastIndexOf(C);ee>-1&&(M=M.slice(0,ee))}return M+p}function x3(n){return n=De(n),n&&zs.test(n)?n.replace(Qn,tB):n}var B3=Ho(function(n,l,i){return n+(i?" ":"")+l.toUpperCase()}),tu=ym("toUpperCase");function gg(n,l,i){return n=De(n),l=i?o:l,l===o?Xx(n)?oB(n):Dx(n):n.match(l)||[]}var bg=Be(function(n,l){try{return en(n,o,l)}catch(i){return Zc(i)?i:new me(i)}}),T3=or(function(n,l){return mn(l,function(i){i=Un(i),nr(n,i,Yc(n[i],n))}),n});function O3(n){var l=n==null?0:n.length,i=ue();return n=l?Qe(n,function(p){if(typeof p[1]!="function")throw new gn(u);return[i(p[0]),p[1]]}):[],Be(function(p){for(var C=-1;++C<l;){var E=n[C];if(en(E[0],this,p))return en(E[1],this,p)}})}function N3(n){return tT(yn(n,g))}function nu(n){return function(){return n}}function A3(n,l){return n==null||n!==n?l:n}var L3=vm(),I3=vm(!0);function jt(n){return n}function ru(n){return Xh(typeof n=="function"?n:yn(n,g))}function R3(n){return Jh(yn(n,g))}function P3(n,l){return Qh(n,yn(l,g))}var M3=Be(function(n,l){return function(i){return Tl(i,n,l)}}),$3=Be(function(n,l){return function(i){return Tl(n,i,l)}});function ou(n,l,i){var p=pt(l),C=Ya(l,p);i==null&&!(tt(l)&&(C.length||!p.length))&&(i=l,l=n,n=this,C=Ya(l,pt(l)));var E=!(tt(i)&&"chain"in i)||!!i.chain,N=ar(n);return mn(C,function(I){var M=l[I];n[I]=M,N&&(n.prototype[I]=function(){var K=this.__chain__;if(E||K){var j=n(this.__wrapped__),Y=j.__actions__=Ht(this.__actions__);return Y.push({func:M,args:arguments,thisArg:n}),j.__chain__=K,j}return M.apply(n,Sr([this.value()],arguments))})}),n}function V3(){return Ct._===this&&(Ct._=uB),this}function lu(){}function F3(n){return n=_e(n),Be(function(l){return em(l,n)})}var z3=Mc(Qe),D3=Mc(wh),W3=Mc(ic);function yg(n){return Hc(n)?sc(Un(n)):yT(n)}function H3(n){return function(l){return n==null?o:no(n,l)}}var U3=_m(),K3=_m(!0);function au(){return[]}function iu(){return!1}function j3(){return{}}function G3(){return""}function q3(){return!0}function Y3(n,l){if(n=_e(n),n<1||n>W)return[];var i=Q,p=Et(n,Q);l=ue(l),n-=Q;for(var C=fc(p,l);++i<n;)l(i);return C}function X3(n){return be(n)?Qe(n,Un):rn(n)?[n]:Ht(Vm(De(n)))}function Z3(n){var l=++sB;return De(n)+l}var J3=ti(function(n,l){return n+l},0),Q3=$c("ceil"),eA=ti(function(n,l){return n/l},1),tA=$c("floor");function nA(n){return n&&n.length?qa(n,jt,_c):o}function rA(n,l){return n&&n.length?qa(n,ue(l,2),_c):o}function oA(n){return Eh(n,jt)}function lA(n,l){return Eh(n,ue(l,2))}function aA(n){return n&&n.length?qa(n,jt,xc):o}function iA(n,l){return n&&n.length?qa(n,ue(l,2),xc):o}var sA=ti(function(n,l){return n*l},1),cA=$c("round"),uA=ti(function(n,l){return n-l},0);function fA(n){return n&&n.length?uc(n,jt):0}function dA(n,l){return n&&n.length?uc(n,ue(l,2)):0}return _.after=R4,_.ary=Ym,_.assign=wN,_.assignIn=cg,_.assignInWith=hi,_.assignWith=_N,_.at=SN,_.before=Xm,_.bind=Yc,_.bindAll=T3,_.bindKey=Zm,_.castArray=j4,_.chain=jm,_.chunk=tO,_.compact=nO,_.concat=rO,_.cond=O3,_.conforms=N3,_.constant=nu,_.countBy=f4,_.create=EN,_.curry=Jm,_.curryRight=Qm,_.debounce=eg,_.defaults=kN,_.defaultsDeep=xN,_.defer=P4,_.delay=M4,_.difference=oO,_.differenceBy=lO,_.differenceWith=aO,_.drop=iO,_.dropRight=sO,_.dropRightWhile=cO,_.dropWhile=uO,_.fill=fO,_.filter=p4,_.flatMap=g4,_.flatMapDeep=b4,_.flatMapDepth=y4,_.flatten=Wm,_.flattenDeep=dO,_.flattenDepth=pO,_.flip=$4,_.flow=L3,_.flowRight=I3,_.fromPairs=hO,_.functions=IN,_.functionsIn=RN,_.groupBy=C4,_.initial=gO,_.intersection=bO,_.intersectionBy=yO,_.intersectionWith=CO,_.invert=MN,_.invertBy=$N,_.invokeMap=w4,_.iteratee=ru,_.keyBy=_4,_.keys=pt,_.keysIn=Kt,_.map=si,_.mapKeys=FN,_.mapValues=zN,_.matches=R3,_.matchesProperty=P3,_.memoize=ui,_.merge=DN,_.mergeWith=ug,_.method=M3,_.methodOf=$3,_.mixin=ou,_.negate=fi,_.nthArg=F3,_.omit=WN,_.omitBy=HN,_.once=V4,_.orderBy=S4,_.over=z3,_.overArgs=F4,_.overEvery=D3,_.overSome=W3,_.partial=Xc,_.partialRight=tg,_.partition=E4,_.pick=UN,_.pickBy=fg,_.property=yg,_.propertyOf=H3,_.pull=SO,_.pullAll=Um,_.pullAllBy=EO,_.pullAllWith=kO,_.pullAt=xO,_.range=U3,_.rangeRight=K3,_.rearg=z4,_.reject=B4,_.remove=BO,_.rest=D4,_.reverse=Gc,_.sampleSize=O4,_.set=jN,_.setWith=GN,_.shuffle=N4,_.slice=TO,_.sortBy=I4,_.sortedUniq=PO,_.sortedUniqBy=MO,_.split=g3,_.spread=W4,_.tail=$O,_.take=VO,_.takeRight=FO,_.takeRightWhile=zO,_.takeWhile=DO,_.tap=n4,_.throttle=H4,_.thru=ii,_.toArray=ag,_.toPairs=dg,_.toPairsIn=pg,_.toPath=X3,_.toPlainObject=sg,_.transform=qN,_.unary=U4,_.union=WO,_.unionBy=HO,_.unionWith=UO,_.uniq=KO,_.uniqBy=jO,_.uniqWith=GO,_.unset=YN,_.unzip=qc,_.unzipWith=Km,_.update=XN,_.updateWith=ZN,_.values=jo,_.valuesIn=JN,_.without=qO,_.words=gg,_.wrap=K4,_.xor=YO,_.xorBy=XO,_.xorWith=ZO,_.zip=JO,_.zipObject=QO,_.zipObjectDeep=e4,_.zipWith=t4,_.entries=dg,_.entriesIn=pg,_.extend=cg,_.extendWith=hi,ou(_,_),_.add=J3,_.attempt=bg,_.camelCase=n3,_.capitalize=hg,_.ceil=Q3,_.clamp=QN,_.clone=G4,_.cloneDeep=Y4,_.cloneDeepWith=X4,_.cloneWith=q4,_.conformsTo=Z4,_.deburr=mg,_.defaultTo=A3,_.divide=eA,_.endsWith=r3,_.eq=Nn,_.escape=o3,_.escapeRegExp=l3,_.every=d4,_.find=h4,_.findIndex=zm,_.findKey=BN,_.findLast=m4,_.findLastIndex=Dm,_.findLastKey=TN,_.floor=tA,_.forEach=Gm,_.forEachRight=qm,_.forIn=ON,_.forInRight=NN,_.forOwn=AN,_.forOwnRight=LN,_.get=Qc,_.gt=J4,_.gte=Q4,_.has=PN,_.hasIn=eu,_.head=Hm,_.identity=jt,_.includes=v4,_.indexOf=mO,_.inRange=e3,_.invoke=VN,_.isArguments=lo,_.isArray=be,_.isArrayBuffer=eN,_.isArrayLike=Ut,_.isArrayLikeObject=at,_.isBoolean=tN,_.isBuffer=Nr,_.isDate=nN,_.isElement=rN,_.isEmpty=oN,_.isEqual=lN,_.isEqualWith=aN,_.isError=Zc,_.isFinite=iN,_.isFunction=ar,_.isInteger=ng,_.isLength=di,_.isMap=rg,_.isMatch=sN,_.isMatchWith=cN,_.isNaN=uN,_.isNative=fN,_.isNil=pN,_.isNull=dN,_.isNumber=og,_.isObject=tt,_.isObjectLike=ot,_.isPlainObject=Rl,_.isRegExp=Jc,_.isSafeInteger=hN,_.isSet=lg,_.isString=pi,_.isSymbol=rn,_.isTypedArray=Ko,_.isUndefined=mN,_.isWeakMap=gN,_.isWeakSet=bN,_.join=vO,_.kebabCase=a3,_.last=vn,_.lastIndexOf=wO,_.lowerCase=i3,_.lowerFirst=s3,_.lt=yN,_.lte=CN,_.max=nA,_.maxBy=rA,_.mean=oA,_.meanBy=lA,_.min=aA,_.minBy=iA,_.stubArray=au,_.stubFalse=iu,_.stubObject=j3,_.stubString=G3,_.stubTrue=q3,_.multiply=sA,_.nth=_O,_.noConflict=V3,_.noop=lu,_.now=ci,_.pad=c3,_.padEnd=u3,_.padStart=f3,_.parseInt=d3,_.random=t3,_.reduce=k4,_.reduceRight=x4,_.repeat=p3,_.replace=h3,_.result=KN,_.round=cA,_.runInContext=P,_.sample=T4,_.size=A4,_.snakeCase=m3,_.some=L4,_.sortedIndex=OO,_.sortedIndexBy=NO,_.sortedIndexOf=AO,_.sortedLastIndex=LO,_.sortedLastIndexBy=IO,_.sortedLastIndexOf=RO,_.startCase=b3,_.startsWith=y3,_.subtract=uA,_.sum=fA,_.sumBy=dA,_.template=C3,_.times=Y3,_.toFinite=ir,_.toInteger=_e,_.toLength=ig,_.toLower=v3,_.toNumber=wn,_.toSafeInteger=vN,_.toString=De,_.toUpper=w3,_.trim=_3,_.trimEnd=S3,_.trimStart=E3,_.truncate=k3,_.unescape=x3,_.uniqueId=Z3,_.upperCase=B3,_.upperFirst=tu,_.each=Gm,_.eachRight=qm,_.first=Hm,ou(_,(function(){var n={};return Wn(_,function(l,i){Ue.call(_.prototype,i)||(n[i]=l)}),n})(),{chain:!1}),_.VERSION=a,mn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){_[n].placeholder=_}),mn(["drop","take"],function(n,l){Ae.prototype[n]=function(i){i=i===o?1:ft(_e(i),0);var p=this.__filtered__&&!l?new Ae(this):this.clone();return p.__filtered__?p.__takeCount__=Et(i,p.__takeCount__):p.__views__.push({size:Et(i,Q),type:n+(p.__dir__<0?"Right":"")}),p},Ae.prototype[n+"Right"]=function(i){return this.reverse()[n](i).reverse()}}),mn(["filter","map","takeWhile"],function(n,l){var i=l+1,p=i==oe||i==re;Ae.prototype[n]=function(C){var E=this.clone();return E.__iteratees__.push({iteratee:ue(C,3),type:i}),E.__filtered__=E.__filtered__||p,E}}),mn(["head","last"],function(n,l){var i="take"+(l?"Right":"");Ae.prototype[n]=function(){return this[i](1).value()[0]}}),mn(["initial","tail"],function(n,l){var i="drop"+(l?"":"Right");Ae.prototype[n]=function(){return this.__filtered__?new Ae(this):this[i](1)}}),Ae.prototype.compact=function(){return this.filter(jt)},Ae.prototype.find=function(n){return this.filter(n).head()},Ae.prototype.findLast=function(n){return this.reverse().find(n)},Ae.prototype.invokeMap=Be(function(n,l){return typeof n=="function"?new Ae(this):this.map(function(i){return Tl(i,n,l)})}),Ae.prototype.reject=function(n){return this.filter(fi(ue(n)))},Ae.prototype.slice=function(n,l){n=_e(n);var i=this;return i.__filtered__&&(n>0||l<0)?new Ae(i):(n<0?i=i.takeRight(-n):n&&(i=i.drop(n)),l!==o&&(l=_e(l),i=l<0?i.dropRight(-l):i.take(l-n)),i)},Ae.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ae.prototype.toArray=function(){return this.take(Q)},Wn(Ae.prototype,function(n,l){var i=/^(?:filter|find|map|reject)|While$/.test(l),p=/^(?:head|last)$/.test(l),C=_[p?"take"+(l=="last"?"Right":""):l],E=p||/^find/.test(l);C&&(_.prototype[l]=function(){var N=this.__wrapped__,I=p?[1]:arguments,M=N instanceof Ae,K=I[0],j=M||be(N),Y=function(Ne){var Le=C.apply(_,Sr([Ne],I));return p&&ee?Le[0]:Le};j&&i&&typeof K=="function"&&K.length!=1&&(M=j=!1);var ee=this.__chain__,ie=!!this.__actions__.length,fe=E&&!ee,Ee=M&&!ie;if(!E&&j){N=Ee?N:new Ae(this);var de=n.apply(N,I);return de.__actions__.push({func:ii,args:[Y],thisArg:o}),new bn(de,ee)}return fe&&Ee?n.apply(this,I):(de=this.thru(Y),fe?p?de.value()[0]:de.value():de)})}),mn(["pop","push","shift","sort","splice","unshift"],function(n){var l=Ia[n],i=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",p=/^(?:pop|shift)$/.test(n);_.prototype[n]=function(){var C=arguments;if(p&&!this.__chain__){var E=this.value();return l.apply(be(E)?E:[],C)}return this[i](function(N){return l.apply(be(N)?N:[],C)})}}),Wn(Ae.prototype,function(n,l){var i=_[l];if(i){var p=i.name+"";Ue.call(zo,p)||(zo[p]=[]),zo[p].push({name:l,func:i})}}),zo[ei(o,x).name]=[{name:"wrapper",func:o}],Ae.prototype.clone=xB,Ae.prototype.reverse=BB,Ae.prototype.value=TB,_.prototype.at=r4,_.prototype.chain=o4,_.prototype.commit=l4,_.prototype.next=a4,_.prototype.plant=s4,_.prototype.reverse=c4,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=u4,_.prototype.first=_.prototype.head,wl&&(_.prototype[wl]=i4),_}),$o=lB();Zr?((Zr.exports=$o)._=$o,rc._=$o):Ct._=$o}).call(Fk)})(gl,gl.exports)),gl.exports}var Dk=zk();const xa=s2(Dk),Up=t.defineComponent({__name:"transferItem",props:{dialogModalVisible:{type:Boolean},columnsValue:{},columnsIndex:{},columnsLen:{}},emits:["update:toTop","update:toPre","update:toNext","update:toBottom"],setup(e){const r=e,o=t.reactive({itemOnHover:!1,itemOnClick:!1}),a=()=>{o.itemOnClick=!0,o.itemOnHover=!1},s=()=>{o.itemOnClick=!1,o.itemOnHover=!0};return t.watch(()=>r.dialogModalVisible,c=>{c||(o.itemOnClick=!1,o.itemOnHover=!1)}),(c,u)=>{const f=yr,h=A2,d=XS;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["transfer-item-wrapper",{"cursor-grab":o.itemOnHover,"cursor-grabbing":o.itemOnClick}]),onMouseenter:u[4]||(u[4]=m=>o.itemOnHover=!0),onMouseleave:u[5]||(u[5]=m=>o.itemOnHover=!1),onMousedown:a,onMouseup:s},[(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(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(Xt),{icon:t.unref(Qv),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:u[0]||(u[0]=m=>c.$emit("update:toTop"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(Xt),{icon:t.unref(Uf),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:u[1]||(u[1]=m=>c.$emit("update:toPre"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(Xt),{icon:t.unref(Fi),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:u[2]||(u[2]=m=>c.$emit("update:toNext"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(Xt),{icon:t.unref(Pv),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:u[3]||(u[3]=m=>c.$emit("update:toBottom"))},null,8,["icon","disabled"])]),_:1})]),_:1})):t.createCommentVNode("",!0)],34)}}}),Wk={class:"search-bar"},Hk={class:"transfer-sort-wrapper"},Uk=t.defineComponent({__name:"TransferDialog",props:{modelValue:{type:Boolean},columnsValue:{},transferTitle:{}},emits:["update:modelValue","update:submit","update:checkChange"],setup(e,{emit:r}){const o=e,a=r,s=t.computed({get:()=>o.modelValue,set:v=>a("update:modelValue",v)}),c=t.reactive({localColumns:xa.cloneDeep(o.columnsValue),clickItemProp:"",checkList:o.columnsValue.map(v=>v.prop)}),u={toTop:v=>{if(v<=0)return;const k=c.localColumns.splice(v,1)[0];c.localColumns.unshift(k)},toBottom:v=>{if(v>=c.localColumns.length-1)return;const k=c.localColumns.splice(v,1)[0];c.localColumns.push(k)},toPre:v=>{if(v>0){const k=c.localColumns[v];c.localColumns[v]=c.localColumns[v-1],c.localColumns[v-1]=k}},toNext:v=>{if(v<c.localColumns.length-1){const k=c.localColumns[v];c.localColumns[v]=c.localColumns[v+1],c.localColumns[v+1]=k}}},f=()=>{c.localColumns=xa.cloneDeep(o.columnsValue),c.checkList=o.columnsValue.filter(v=>v.checkActive).map(v=>v.prop||"")};t.watch(()=>s.value,v=>{v?f():(c.clickItemProp="",c.localColumns=[],c.checkList=[])});const h=()=>{console.log("state.localColumns",c.localColumns),a("update:submit",c.localColumns)},d=v=>{const k=o.columnsValue.map(x=>x.prop);c.checkList=v?k:[],m(c.checkList)},m=v=>{const k=v.map(x=>String(x));c.localColumns.forEach(x=>{x.checkActive=k.includes(x.prop)}),a("update:checkChange",{columns:c.localColumns,checkList:c.checkList})},g=t.computed(()=>c.localColumns.length>0&&c.checkList.length===c.localColumns.length),w=t.computed({get:()=>g.value,set:v=>d(v)}),y=()=>{c.localColumns=xa.cloneDeep(o.columnsValue)},b=v=>{if(v.length>0){const k=xa.cloneDeep(c.localColumns);c.localColumns=k.filter(x=>x.label.includes(v))}else y()};return(v,k)=>{const x=yr,A=_2;return t.openBlock(),t.createBlock(To,{modelValue:s.value,"onUpdate:modelValue":k[2]||(k[2]=B=>s.value=B),title:v.transferTitle,"onClick:submit":h},{default:t.withCtx(()=>[t.createElementVNode("div",Wk,[t.createVNode(Gr,{"show-search":!0,"onUpdate:clear":y,"onKeydown:enter":b})]),t.createElementVNode("div",Hk,[t.createVNode(x,{modelValue:w.value,"onUpdate:modelValue":k[0]||(k[0]=B=>w.value=B),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(A,{modelValue:c.checkList,"onUpdate:modelValue":k[1]||(k[1]=B=>c.checkList=B),onChange:m},{default:t.withCtx(()=>[t.renderSlot(v.$slots,"list-container",{columns:c.localColumns,clickItemProp:c.clickItemProp,handleItemEvents:u,handleMousedown:B=>c.clickItemProp=B},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.localColumns,(B,S)=>(t.openBlock(),t.createBlock(Up,{key:B.prop,"dialog-modal-visible":s.value,"columns-value":B,"columns-index":S,"columns-len":c.localColumns.length,class:t.normalizeClass({"transfer-active-bg":B.checkActive,"transfer-active-border":c.clickItemProp==B.prop}),onMousedown:T=>c.clickItemProp=B.prop||"","onUpdate:toTop":T=>u.toTop(S),"onUpdate:toBottom":T=>u.toBottom(S),"onUpdate:toPre":T=>u.toPre(S),"onUpdate:toNext":T=>u.toNext(S)},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"])}}}),Kk={class:"h-header px-4 py-4 flex justify-between items-center bg-primary-10"},jk={class:"flex items-center gap-2"},Gk={key:0,class:"flex items-center text-black"},qk={class:"font-bold text-text text-xl md:text-2xl;"},Yk={class:"flex items-center gap-3"},Kp=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:r}){const o=e,a=r,s=()=>{const c={};switch(typeof o.showBack){case"string":c.path=o.showBack;break;case"object":Object.assign(c,o.showBack);break;default:c.path=""}a("back",c)};return(c,u)=>{const f=st;return t.openBlock(),t.createElementBlock("div",Kk,[t.createElementVNode("div",jk,[e.showBack?(t.openBlock(),t.createElementBlock("div",Gk,[t.createVNode(f,{size:16,class:"cursor-pointer",onClick:s},{default:t.withCtx(()=>[t.createVNode(t.unref(Ov))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",qk,t.toDisplayString(o.title),1)]),t.createElementVNode("div",Yk,[t.renderSlot(c.$slots,"default")])])}}}),Xk={key:0,class:"px-4 pt-1.5"},Zk={key:1,class:"py-1.5 px-4"},Jk={key:0,class:"flex justify-start pl-1.5 pt-0"},jp=ka(t.defineComponent({__name:"MainPanel",props:{title:{default:""},showBack:{type:[Boolean,String,Object],default:!1},depth:{default:1}},emits:["click:back"],setup(e,{emit:r}){const o=e,a=r,s=()=>{a("click:back")};return(c,u)=>{const f=oa;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(Kp),{title:o.title,showBack:o.showBack,onBack:s,depth:o.depth},null,8,["title","showBack","depth"]),t.createVNode(f,{class:"panel-scrollbar"},{default:t.withCtx(()=>[c.$slots.searchBar?(t.openBlock(),t.createElementBlock("div",Xk,[t.renderSlot(c.$slots,"searchBar",{},void 0,!0)])):t.createCommentVNode("",!0),c.$slots.main?(t.openBlock(),t.createElementBlock("div",Zk,[t.renderSlot(c.$slots,"main",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3}),c.$slots.footer?(t.openBlock(),t.createElementBlock("div",Jk,[t.renderSlot(c.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-c88d2537"]]),Qk=t.defineComponent({__name:"SearchableListPanel",props:{title:{},pagination:{},showBack:{type:[Boolean,String,Object]},showSearch:{type:Boolean},showEdit:{type:Boolean},showFilter:{type:Boolean},showDefaultSearch:{type:Boolean}},emits:["search","updatePage","updatePageSize","click:back"],setup(e,{emit:r}){const o=e,{pagination:a}=t.toRefs(o),s=r,c=t.computed(()=>o.showDefaultSearch||o.showSearch&&o.showEdit&&o.showFilter),u=g=>{s("search",g)},f=()=>{s("search",null)},h=g=>{s("updatePage",g)},d=g=>{s("updatePageSize",g)},m=()=>{s("click:back")};return(g,w)=>{const y=KS;return t.openBlock(),t.createBlock(t.unref(jp),{title:o.title,"show-back":g.showBack,"onClick:back":m},{searchBar:t.withCtx(()=>[t.createVNode(t.unref(Gr),{"show-filter":c.value||g.showFilter,"show-search":c.value||g.showSearch,"onKeydown:enter":u,"onUpdate:clear":f},{button:t.withCtx(()=>[t.renderSlot(g.$slots,"firstButton"),c.value||g.showEdit?t.renderSlot(g.$slots,"customButton",{key:0}):t.createCommentVNode("",!0),t.renderSlot(g.$slots,"lastButton")]),customerFilter:t.withCtx(()=>[t.renderSlot(g.$slots,"filterButton")]),_:3},8,["show-filter","show-search"])]),main:t.withCtx(()=>[t.renderSlot(g.$slots,"main")]),footer:t.withCtx(()=>[t.unref(a).totalCount>0?(t.openBlock(),t.createBlock(y,{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:h,onSizeChange:d},null,8,["current-page","page-size","total"])):t.createCommentVNode("",!0)]),_:3},8,["title","show-back"])}}}),ex={class:"w-full mb-4"},tx={class:"flex items-center h-12 bg-gray-200 px-1.5 rounded-t justify-end"},nx={class:"flex items-center mr-4"},bl=t.defineComponent({__name:"SortTable",props:{data:{},columns:{},tableTitle:{},showSelection:{type:Boolean},loading:{type:Boolean},showSummary:{type:Boolean},showOverFlowTooltip:{type:Boolean},summaryMethod:{type:Function},sortTableRowClassName:{type:Function}},emits:["open:transfer","update:selectRow","click:cell","click:columnSort"],setup(e,{emit:r}){const o=r,a=()=>{o("open:transfer")},s=f=>{o("update:selectRow",f)},c=(f,h)=>{o("click:cell",f,h)},u=f=>{o("click:columnSort",f)};return(f,h)=>{const d=st,m=xo;return t.openBlock(),t.createElementBlock("div",ex,[t.createElementVNode("div",tx,[t.createElementVNode("div",nx,[t.createElementVNode("div",{class:"cursor-pointer text-blue-800 text-xl flex items-center justify-center hover:text-blue-600",onClick:a},[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(t.unref(Zv))]),_:1})])])]),t.withDirectives(t.createVNode(t.unref(jr),{"element-loading-text":"數據加載中...",data:f.data,columns:f.columns,"show-summary":f.showSummary,"show-over-flow-tooltip":f.showOverFlowTooltip,"summary-method":f.summaryMethod,"show-selection":f.showSelection,"base-table-row-class-name":f.sortTableRowClassName,onSelectionChange:s,onCellClick:c,onColumnSortChange:u},null,8,["data","columns","show-summary","show-over-flow-tooltip","summary-method","show-selection","base-table-row-class-name"]),[[m,f.loading]])])}}});function rx(e){return e.map(r=>({...r,checkActive:!0}))}const Gp=[jr,Xt,Bo,To,bl,ml,Gr];function qp(e,r){Gp.forEach(o=>{e.component(o.name||"VueTableComponent",o)})}const ox={install:qp,...Gp};jr.install=e=>{e.component(jr.name||"BaseTable",jr)},Xt.install=e=>{e.component(Xt.name||"BaseBtn",Xt)},Bo.install=e=>{e.component(Bo.name||"BaseInput",Bo)},To.install=e=>{e.component(To.name||"BaseDialog",To)},bl.install=e=>{e.component(bl.name||"SortTable",bl)},ml.install=e=>{e.component(ml.name||"TitleTable",ml)},Gr.install=e=>{e.component(Gr.name||"SearchBar",Gr)},Ie.BaseBtn=Xt,Ie.BaseDialog=To,Ie.BaseInput=Bo,Ie.BaseMultipleInput=Nk,Ie.BaseTable=jr,Ie.FunctionHeader=Kp,Ie.MainPanel=jp,Ie.SearchBar=Gr,Ie.SearchableListPanel=Qk,Ie.SortTable=bl,Ie.TitleTable=ml,Ie.TransferDialog=Uk,Ie.TransferItem=Up,Ie.default=ox,Ie.install=qp,Ie.setActiveColumn=rx,Object.defineProperties(Ie,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
44
+ }`;var Ee=bg(function(){return ze(E,ie+"return "+Y).apply(o,N)});if(Ee.source=Y,Zc(Ee))throw Ee;return Ee}function v3(n){return De(n).toLowerCase()}function w3(n){return De(n).toUpperCase()}function _3(n,l,i){if(n=De(n),n&&(i||l===o))return xh(n);if(!n||!(l=nn(l)))return n;var p=Tn(n),C=Tn(l),E=Bh(p,C),N=Th(p,C)+1;return Or(p,E,N).join("")}function S3(n,l,i){if(n=De(n),n&&(i||l===o))return n.slice(0,Nh(n)+1);if(!n||!(l=nn(l)))return n;var p=Tn(n),C=Th(p,Tn(l))+1;return Or(p,0,C).join("")}function E3(n,l,i){if(n=De(n),n&&(i||l===o))return n.replace(No,"");if(!n||!(l=nn(l)))return n;var p=Tn(n),C=Bh(p,Tn(l));return Or(p,C).join("")}function k3(n,l){var i=U,p=D;if(tt(l)){var C="separator"in l?l.separator:C;i="length"in l?_e(l.length):i,p="omission"in l?nn(l.omission):p}n=De(n);var E=n.length;if(Po(n)){var N=Tn(n);E=N.length}if(i>=E)return n;var I=i-Mo(p);if(I<1)return p;var M=N?Or(N,0,I).join(""):n.slice(0,I);if(C===o)return M+p;if(N&&(I+=M.length-I),Jc(C)){if(n.slice(I).search(C)){var K,j=M;for(C.global||(C=hc(C.source,De(rt.exec(C))+"g")),C.lastIndex=0;K=C.exec(j);)var Y=K.index;M=M.slice(0,Y===o?I:Y)}}else if(n.indexOf(nn(C),I)!=I){var ee=M.lastIndexOf(C);ee>-1&&(M=M.slice(0,ee))}return M+p}function x3(n){return n=De(n),n&&zs.test(n)?n.replace(Qn,tB):n}var B3=Ho(function(n,l,i){return n+(i?" ":"")+l.toUpperCase()}),tu=ym("toUpperCase");function gg(n,l,i){return n=De(n),l=i?o:l,l===o?Xx(n)?oB(n):Dx(n):n.match(l)||[]}var bg=Be(function(n,l){try{return en(n,o,l)}catch(i){return Zc(i)?i:new me(i)}}),T3=or(function(n,l){return mn(l,function(i){i=Un(i),nr(n,i,Yc(n[i],n))}),n});function O3(n){var l=n==null?0:n.length,i=ue();return n=l?Qe(n,function(p){if(typeof p[1]!="function")throw new gn(u);return[i(p[0]),p[1]]}):[],Be(function(p){for(var C=-1;++C<l;){var E=n[C];if(en(E[0],this,p))return en(E[1],this,p)}})}function N3(n){return tT(yn(n,g))}function nu(n){return function(){return n}}function A3(n,l){return n==null||n!==n?l:n}var L3=vm(),I3=vm(!0);function jt(n){return n}function ru(n){return Xh(typeof n=="function"?n:yn(n,g))}function R3(n){return Jh(yn(n,g))}function P3(n,l){return Qh(n,yn(l,g))}var M3=Be(function(n,l){return function(i){return Tl(i,n,l)}}),$3=Be(function(n,l){return function(i){return Tl(n,i,l)}});function ou(n,l,i){var p=pt(l),C=Ya(l,p);i==null&&!(tt(l)&&(C.length||!p.length))&&(i=l,l=n,n=this,C=Ya(l,pt(l)));var E=!(tt(i)&&"chain"in i)||!!i.chain,N=ar(n);return mn(C,function(I){var M=l[I];n[I]=M,N&&(n.prototype[I]=function(){var K=this.__chain__;if(E||K){var j=n(this.__wrapped__),Y=j.__actions__=Ht(this.__actions__);return Y.push({func:M,args:arguments,thisArg:n}),j.__chain__=K,j}return M.apply(n,Sr([this.value()],arguments))})}),n}function V3(){return Ct._===this&&(Ct._=uB),this}function lu(){}function F3(n){return n=_e(n),Be(function(l){return em(l,n)})}var z3=Mc(Qe),D3=Mc(wh),W3=Mc(ic);function yg(n){return Hc(n)?sc(Un(n)):yT(n)}function H3(n){return function(l){return n==null?o:no(n,l)}}var U3=_m(),K3=_m(!0);function au(){return[]}function iu(){return!1}function j3(){return{}}function G3(){return""}function q3(){return!0}function Y3(n,l){if(n=_e(n),n<1||n>W)return[];var i=Q,p=Et(n,Q);l=ue(l),n-=Q;for(var C=fc(p,l);++i<n;)l(i);return C}function X3(n){return be(n)?Qe(n,Un):rn(n)?[n]:Ht(Vm(De(n)))}function Z3(n){var l=++sB;return De(n)+l}var J3=ti(function(n,l){return n+l},0),Q3=$c("ceil"),eA=ti(function(n,l){return n/l},1),tA=$c("floor");function nA(n){return n&&n.length?qa(n,jt,_c):o}function rA(n,l){return n&&n.length?qa(n,ue(l,2),_c):o}function oA(n){return Eh(n,jt)}function lA(n,l){return Eh(n,ue(l,2))}function aA(n){return n&&n.length?qa(n,jt,xc):o}function iA(n,l){return n&&n.length?qa(n,ue(l,2),xc):o}var sA=ti(function(n,l){return n*l},1),cA=$c("round"),uA=ti(function(n,l){return n-l},0);function fA(n){return n&&n.length?uc(n,jt):0}function dA(n,l){return n&&n.length?uc(n,ue(l,2)):0}return _.after=R4,_.ary=Ym,_.assign=wN,_.assignIn=cg,_.assignInWith=hi,_.assignWith=_N,_.at=SN,_.before=Xm,_.bind=Yc,_.bindAll=T3,_.bindKey=Zm,_.castArray=j4,_.chain=jm,_.chunk=tO,_.compact=nO,_.concat=rO,_.cond=O3,_.conforms=N3,_.constant=nu,_.countBy=f4,_.create=EN,_.curry=Jm,_.curryRight=Qm,_.debounce=eg,_.defaults=kN,_.defaultsDeep=xN,_.defer=P4,_.delay=M4,_.difference=oO,_.differenceBy=lO,_.differenceWith=aO,_.drop=iO,_.dropRight=sO,_.dropRightWhile=cO,_.dropWhile=uO,_.fill=fO,_.filter=p4,_.flatMap=g4,_.flatMapDeep=b4,_.flatMapDepth=y4,_.flatten=Wm,_.flattenDeep=dO,_.flattenDepth=pO,_.flip=$4,_.flow=L3,_.flowRight=I3,_.fromPairs=hO,_.functions=IN,_.functionsIn=RN,_.groupBy=C4,_.initial=gO,_.intersection=bO,_.intersectionBy=yO,_.intersectionWith=CO,_.invert=MN,_.invertBy=$N,_.invokeMap=w4,_.iteratee=ru,_.keyBy=_4,_.keys=pt,_.keysIn=Kt,_.map=si,_.mapKeys=FN,_.mapValues=zN,_.matches=R3,_.matchesProperty=P3,_.memoize=ui,_.merge=DN,_.mergeWith=ug,_.method=M3,_.methodOf=$3,_.mixin=ou,_.negate=fi,_.nthArg=F3,_.omit=WN,_.omitBy=HN,_.once=V4,_.orderBy=S4,_.over=z3,_.overArgs=F4,_.overEvery=D3,_.overSome=W3,_.partial=Xc,_.partialRight=tg,_.partition=E4,_.pick=UN,_.pickBy=fg,_.property=yg,_.propertyOf=H3,_.pull=SO,_.pullAll=Um,_.pullAllBy=EO,_.pullAllWith=kO,_.pullAt=xO,_.range=U3,_.rangeRight=K3,_.rearg=z4,_.reject=B4,_.remove=BO,_.rest=D4,_.reverse=Gc,_.sampleSize=O4,_.set=jN,_.setWith=GN,_.shuffle=N4,_.slice=TO,_.sortBy=I4,_.sortedUniq=PO,_.sortedUniqBy=MO,_.split=g3,_.spread=W4,_.tail=$O,_.take=VO,_.takeRight=FO,_.takeRightWhile=zO,_.takeWhile=DO,_.tap=n4,_.throttle=H4,_.thru=ii,_.toArray=ag,_.toPairs=dg,_.toPairsIn=pg,_.toPath=X3,_.toPlainObject=sg,_.transform=qN,_.unary=U4,_.union=WO,_.unionBy=HO,_.unionWith=UO,_.uniq=KO,_.uniqBy=jO,_.uniqWith=GO,_.unset=YN,_.unzip=qc,_.unzipWith=Km,_.update=XN,_.updateWith=ZN,_.values=jo,_.valuesIn=JN,_.without=qO,_.words=gg,_.wrap=K4,_.xor=YO,_.xorBy=XO,_.xorWith=ZO,_.zip=JO,_.zipObject=QO,_.zipObjectDeep=e4,_.zipWith=t4,_.entries=dg,_.entriesIn=pg,_.extend=cg,_.extendWith=hi,ou(_,_),_.add=J3,_.attempt=bg,_.camelCase=n3,_.capitalize=hg,_.ceil=Q3,_.clamp=QN,_.clone=G4,_.cloneDeep=Y4,_.cloneDeepWith=X4,_.cloneWith=q4,_.conformsTo=Z4,_.deburr=mg,_.defaultTo=A3,_.divide=eA,_.endsWith=r3,_.eq=Nn,_.escape=o3,_.escapeRegExp=l3,_.every=d4,_.find=h4,_.findIndex=zm,_.findKey=BN,_.findLast=m4,_.findLastIndex=Dm,_.findLastKey=TN,_.floor=tA,_.forEach=Gm,_.forEachRight=qm,_.forIn=ON,_.forInRight=NN,_.forOwn=AN,_.forOwnRight=LN,_.get=Qc,_.gt=J4,_.gte=Q4,_.has=PN,_.hasIn=eu,_.head=Hm,_.identity=jt,_.includes=v4,_.indexOf=mO,_.inRange=e3,_.invoke=VN,_.isArguments=lo,_.isArray=be,_.isArrayBuffer=eN,_.isArrayLike=Ut,_.isArrayLikeObject=at,_.isBoolean=tN,_.isBuffer=Nr,_.isDate=nN,_.isElement=rN,_.isEmpty=oN,_.isEqual=lN,_.isEqualWith=aN,_.isError=Zc,_.isFinite=iN,_.isFunction=ar,_.isInteger=ng,_.isLength=di,_.isMap=rg,_.isMatch=sN,_.isMatchWith=cN,_.isNaN=uN,_.isNative=fN,_.isNil=pN,_.isNull=dN,_.isNumber=og,_.isObject=tt,_.isObjectLike=ot,_.isPlainObject=Rl,_.isRegExp=Jc,_.isSafeInteger=hN,_.isSet=lg,_.isString=pi,_.isSymbol=rn,_.isTypedArray=Ko,_.isUndefined=mN,_.isWeakMap=gN,_.isWeakSet=bN,_.join=vO,_.kebabCase=a3,_.last=vn,_.lastIndexOf=wO,_.lowerCase=i3,_.lowerFirst=s3,_.lt=yN,_.lte=CN,_.max=nA,_.maxBy=rA,_.mean=oA,_.meanBy=lA,_.min=aA,_.minBy=iA,_.stubArray=au,_.stubFalse=iu,_.stubObject=j3,_.stubString=G3,_.stubTrue=q3,_.multiply=sA,_.nth=_O,_.noConflict=V3,_.noop=lu,_.now=ci,_.pad=c3,_.padEnd=u3,_.padStart=f3,_.parseInt=d3,_.random=t3,_.reduce=k4,_.reduceRight=x4,_.repeat=p3,_.replace=h3,_.result=KN,_.round=cA,_.runInContext=P,_.sample=T4,_.size=A4,_.snakeCase=m3,_.some=L4,_.sortedIndex=OO,_.sortedIndexBy=NO,_.sortedIndexOf=AO,_.sortedLastIndex=LO,_.sortedLastIndexBy=IO,_.sortedLastIndexOf=RO,_.startCase=b3,_.startsWith=y3,_.subtract=uA,_.sum=fA,_.sumBy=dA,_.template=C3,_.times=Y3,_.toFinite=ir,_.toInteger=_e,_.toLength=ig,_.toLower=v3,_.toNumber=wn,_.toSafeInteger=vN,_.toString=De,_.toUpper=w3,_.trim=_3,_.trimEnd=S3,_.trimStart=E3,_.truncate=k3,_.unescape=x3,_.uniqueId=Z3,_.upperCase=B3,_.upperFirst=tu,_.each=Gm,_.eachRight=qm,_.first=Hm,ou(_,(function(){var n={};return Wn(_,function(l,i){Ue.call(_.prototype,i)||(n[i]=l)}),n})(),{chain:!1}),_.VERSION=a,mn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){_[n].placeholder=_}),mn(["drop","take"],function(n,l){Ae.prototype[n]=function(i){i=i===o?1:ft(_e(i),0);var p=this.__filtered__&&!l?new Ae(this):this.clone();return p.__filtered__?p.__takeCount__=Et(i,p.__takeCount__):p.__views__.push({size:Et(i,Q),type:n+(p.__dir__<0?"Right":"")}),p},Ae.prototype[n+"Right"]=function(i){return this.reverse()[n](i).reverse()}}),mn(["filter","map","takeWhile"],function(n,l){var i=l+1,p=i==oe||i==re;Ae.prototype[n]=function(C){var E=this.clone();return E.__iteratees__.push({iteratee:ue(C,3),type:i}),E.__filtered__=E.__filtered__||p,E}}),mn(["head","last"],function(n,l){var i="take"+(l?"Right":"");Ae.prototype[n]=function(){return this[i](1).value()[0]}}),mn(["initial","tail"],function(n,l){var i="drop"+(l?"":"Right");Ae.prototype[n]=function(){return this.__filtered__?new Ae(this):this[i](1)}}),Ae.prototype.compact=function(){return this.filter(jt)},Ae.prototype.find=function(n){return this.filter(n).head()},Ae.prototype.findLast=function(n){return this.reverse().find(n)},Ae.prototype.invokeMap=Be(function(n,l){return typeof n=="function"?new Ae(this):this.map(function(i){return Tl(i,n,l)})}),Ae.prototype.reject=function(n){return this.filter(fi(ue(n)))},Ae.prototype.slice=function(n,l){n=_e(n);var i=this;return i.__filtered__&&(n>0||l<0)?new Ae(i):(n<0?i=i.takeRight(-n):n&&(i=i.drop(n)),l!==o&&(l=_e(l),i=l<0?i.dropRight(-l):i.take(l-n)),i)},Ae.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ae.prototype.toArray=function(){return this.take(Q)},Wn(Ae.prototype,function(n,l){var i=/^(?:filter|find|map|reject)|While$/.test(l),p=/^(?:head|last)$/.test(l),C=_[p?"take"+(l=="last"?"Right":""):l],E=p||/^find/.test(l);C&&(_.prototype[l]=function(){var N=this.__wrapped__,I=p?[1]:arguments,M=N instanceof Ae,K=I[0],j=M||be(N),Y=function(Ne){var Le=C.apply(_,Sr([Ne],I));return p&&ee?Le[0]:Le};j&&i&&typeof K=="function"&&K.length!=1&&(M=j=!1);var ee=this.__chain__,ie=!!this.__actions__.length,fe=E&&!ee,Ee=M&&!ie;if(!E&&j){N=Ee?N:new Ae(this);var de=n.apply(N,I);return de.__actions__.push({func:ii,args:[Y],thisArg:o}),new bn(de,ee)}return fe&&Ee?n.apply(this,I):(de=this.thru(Y),fe?p?de.value()[0]:de.value():de)})}),mn(["pop","push","shift","sort","splice","unshift"],function(n){var l=Ia[n],i=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",p=/^(?:pop|shift)$/.test(n);_.prototype[n]=function(){var C=arguments;if(p&&!this.__chain__){var E=this.value();return l.apply(be(E)?E:[],C)}return this[i](function(N){return l.apply(be(N)?N:[],C)})}}),Wn(Ae.prototype,function(n,l){var i=_[l];if(i){var p=i.name+"";Ue.call(zo,p)||(zo[p]=[]),zo[p].push({name:l,func:i})}}),zo[ei(o,x).name]=[{name:"wrapper",func:o}],Ae.prototype.clone=xB,Ae.prototype.reverse=BB,Ae.prototype.value=TB,_.prototype.at=r4,_.prototype.chain=o4,_.prototype.commit=l4,_.prototype.next=a4,_.prototype.plant=s4,_.prototype.reverse=c4,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=u4,_.prototype.first=_.prototype.head,wl&&(_.prototype[wl]=i4),_}),$o=lB();Zr?((Zr.exports=$o)._=$o,rc._=$o):Ct._=$o}).call(Fk)})(gl,gl.exports)),gl.exports}var Dk=zk();const xa=s2(Dk),Up=t.defineComponent({__name:"transferItem",props:{dialogModalVisible:{type:Boolean},columnsValue:{},columnsIndex:{},columnsLen:{}},emits:["update:toTop","update:toPre","update:toNext","update:toBottom"],setup(e){const r=e,o=t.reactive({itemOnHover:!1,itemOnClick:!1}),a=()=>{o.itemOnClick=!0,o.itemOnHover=!1},s=()=>{o.itemOnClick=!1,o.itemOnHover=!0};return t.watch(()=>r.dialogModalVisible,c=>{c||(o.itemOnClick=!1,o.itemOnHover=!1)}),(c,u)=>{const f=yr,h=A2,d=XS;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["transfer-item-wrapper",{"cursor-grab":o.itemOnHover,"cursor-grabbing":o.itemOnClick}]),onMouseenter:u[4]||(u[4]=m=>o.itemOnHover=!0),onMouseleave:u[5]||(u[5]=m=>o.itemOnHover=!1),onMousedown:a,onMouseup:s},[(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(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(Xt),{icon:t.unref(Qv),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:u[0]||(u[0]=m=>c.$emit("update:toTop"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(Xt),{icon:t.unref(Uf),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:u[1]||(u[1]=m=>c.$emit("update:toPre"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(Xt),{icon:t.unref(Fi),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:u[2]||(u[2]=m=>c.$emit("update:toNext"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(Xt),{icon:t.unref(Pv),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:u[3]||(u[3]=m=>c.$emit("update:toBottom"))},null,8,["icon","disabled"])]),_:1})]),_:1})):t.createCommentVNode("",!0)],34)}}}),Wk={class:"search-bar"},Hk={class:"transfer-sort-wrapper"},Uk=t.defineComponent({__name:"TransferDialog",props:{modelValue:{type:Boolean},columnsValue:{},transferTitle:{}},emits:["update:modelValue","update:submit","update:checkChange"],setup(e,{emit:r}){const o=e,a=r,s=t.computed({get:()=>o.modelValue,set:v=>a("update:modelValue",v)}),c=t.reactive({localColumns:xa.cloneDeep(o.columnsValue),clickItemProp:"",checkList:o.columnsValue.map(v=>v.prop)}),u={toTop:v=>{if(v<=0)return;const k=c.localColumns.splice(v,1)[0];c.localColumns.unshift(k)},toBottom:v=>{if(v>=c.localColumns.length-1)return;const k=c.localColumns.splice(v,1)[0];c.localColumns.push(k)},toPre:v=>{if(v>0){const k=c.localColumns[v];c.localColumns[v]=c.localColumns[v-1],c.localColumns[v-1]=k}},toNext:v=>{if(v<c.localColumns.length-1){const k=c.localColumns[v];c.localColumns[v]=c.localColumns[v+1],c.localColumns[v+1]=k}}},f=()=>{c.localColumns=xa.cloneDeep(o.columnsValue),c.checkList=o.columnsValue.filter(v=>v.checkActive).map(v=>v.prop||"")};t.watch(()=>s.value,v=>{v?f():(c.clickItemProp="",c.localColumns=[],c.checkList=[])});const h=()=>{a("update:submit",c.localColumns)},d=v=>{const k=o.columnsValue.map(x=>x.prop);c.checkList=v?k:[],m(c.checkList)},m=v=>{const k=v.map(x=>String(x));c.localColumns.forEach(x=>{x.checkActive=k.includes(x.prop)}),a("update:checkChange",{columns:c.localColumns,checkList:c.checkList})},g=t.computed(()=>c.localColumns.length>0&&c.checkList.length===c.localColumns.length),w=t.computed({get:()=>g.value,set:v=>d(v)}),y=()=>{c.localColumns=xa.cloneDeep(o.columnsValue)},b=v=>{if(v.length>0){const k=xa.cloneDeep(c.localColumns);c.localColumns=k.filter(x=>x.label.includes(v))}else y()};return(v,k)=>{const x=yr,A=_2;return t.openBlock(),t.createBlock(To,{modelValue:s.value,"onUpdate:modelValue":k[2]||(k[2]=B=>s.value=B),title:v.transferTitle,"onClick:submit":h},{default:t.withCtx(()=>[t.createElementVNode("div",Wk,[t.createVNode(Gr,{"show-search":!0,"onUpdate:clear":y,"onKeydown:enter":b})]),t.createElementVNode("div",Hk,[t.createVNode(x,{modelValue:w.value,"onUpdate:modelValue":k[0]||(k[0]=B=>w.value=B),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(A,{modelValue:c.checkList,"onUpdate:modelValue":k[1]||(k[1]=B=>c.checkList=B),onChange:m},{default:t.withCtx(()=>[t.renderSlot(v.$slots,"list-container",{columns:c.localColumns,clickItemProp:c.clickItemProp,handleItemEvents:u,handleMousedown:B=>c.clickItemProp=B},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.localColumns,(B,S)=>(t.openBlock(),t.createBlock(Up,{key:B.prop,"dialog-modal-visible":s.value,"columns-value":B,"columns-index":S,"columns-len":c.localColumns.length,class:t.normalizeClass({"transfer-active-bg":B.checkActive,"transfer-active-border":c.clickItemProp==B.prop}),onMousedown:T=>c.clickItemProp=B.prop||"","onUpdate:toTop":T=>u.toTop(S),"onUpdate:toBottom":T=>u.toBottom(S),"onUpdate:toPre":T=>u.toPre(S),"onUpdate:toNext":T=>u.toNext(S)},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"])}}}),Kk={class:"h-header px-4 py-4 flex justify-between items-center bg-primary-10"},jk={class:"flex items-center gap-2"},Gk={key:0,class:"flex items-center text-black"},qk={class:"font-bold text-text text-xl md:text-2xl;"},Yk={class:"flex items-center gap-3"},Kp=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:r}){const o=e,a=r,s=()=>{const c={};switch(typeof o.showBack){case"string":c.path=o.showBack;break;case"object":Object.assign(c,o.showBack);break;default:c.path=""}a("back",c)};return(c,u)=>{const f=st;return t.openBlock(),t.createElementBlock("div",Kk,[t.createElementVNode("div",jk,[e.showBack?(t.openBlock(),t.createElementBlock("div",Gk,[t.createVNode(f,{size:16,class:"cursor-pointer",onClick:s},{default:t.withCtx(()=>[t.createVNode(t.unref(Ov))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",qk,t.toDisplayString(o.title),1)]),t.createElementVNode("div",Yk,[t.renderSlot(c.$slots,"default")])])}}}),Xk={key:0,class:"px-4 pt-1.5"},Zk={key:1,class:"py-1.5 px-4"},Jk={key:0,class:"flex justify-start pl-1.5 pt-0"},jp=ka(t.defineComponent({__name:"MainPanel",props:{title:{default:""},showBack:{type:[Boolean,String,Object],default:!1},depth:{default:1}},emits:["click:back"],setup(e,{emit:r}){const o=e,a=r,s=()=>{a("click:back")};return(c,u)=>{const f=oa;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(Kp),{title:o.title,showBack:o.showBack,onBack:s,depth:o.depth},null,8,["title","showBack","depth"]),t.createVNode(f,{class:"panel-scrollbar"},{default:t.withCtx(()=>[c.$slots.searchBar?(t.openBlock(),t.createElementBlock("div",Xk,[t.renderSlot(c.$slots,"searchBar",{},void 0,!0)])):t.createCommentVNode("",!0),c.$slots.main?(t.openBlock(),t.createElementBlock("div",Zk,[t.renderSlot(c.$slots,"main",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3}),c.$slots.footer?(t.openBlock(),t.createElementBlock("div",Jk,[t.renderSlot(c.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-c88d2537"]]),Qk=t.defineComponent({__name:"SearchableListPanel",props:{title:{},pagination:{},showBack:{type:[Boolean,String,Object]},showSearch:{type:Boolean},showEdit:{type:Boolean},showFilter:{type:Boolean},showDefaultSearch:{type:Boolean}},emits:["search","updatePage","updatePageSize","click:back"],setup(e,{emit:r}){const o=e,{pagination:a}=t.toRefs(o),s=r,c=t.computed(()=>o.showDefaultSearch||o.showSearch&&o.showEdit&&o.showFilter),u=g=>{s("search",g)},f=()=>{s("search",null)},h=g=>{s("updatePage",g)},d=g=>{s("updatePageSize",g)},m=()=>{s("click:back")};return(g,w)=>{const y=KS;return t.openBlock(),t.createBlock(t.unref(jp),{title:o.title,"show-back":g.showBack,"onClick:back":m},{searchBar:t.withCtx(()=>[t.createVNode(t.unref(Gr),{"show-filter":c.value||g.showFilter,"show-search":c.value||g.showSearch,"onKeydown:enter":u,"onUpdate:clear":f},{button:t.withCtx(()=>[t.renderSlot(g.$slots,"firstButton"),c.value||g.showEdit?t.renderSlot(g.$slots,"customButton",{key:0}):t.createCommentVNode("",!0),t.renderSlot(g.$slots,"lastButton")]),customerFilter:t.withCtx(()=>[t.renderSlot(g.$slots,"filterButton")]),_:3},8,["show-filter","show-search"])]),main:t.withCtx(()=>[t.renderSlot(g.$slots,"main")]),footer:t.withCtx(()=>[t.unref(a).totalCount>0?(t.openBlock(),t.createBlock(y,{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:h,onSizeChange:d},null,8,["current-page","page-size","total"])):t.createCommentVNode("",!0)]),_:3},8,["title","show-back"])}}}),ex={class:"w-full mb-4"},tx={class:"flex items-center h-12 bg-gray-200 px-1.5 rounded-t justify-end"},nx={class:"flex items-center mr-4"},bl=t.defineComponent({__name:"SortTable",props:{data:{},columns:{},tableTitle:{},showSelection:{type:Boolean},loading:{type:Boolean},showSummary:{type:Boolean},showOverFlowTooltip:{type:Boolean},summaryMethod:{type:Function},sortTableRowClassName:{type:Function}},emits:["open:transfer","update:selectRow","click:cell","click:columnSort"],setup(e,{emit:r}){const o=r,a=()=>{o("open:transfer")},s=f=>{o("update:selectRow",f)},c=(f,h)=>{o("click:cell",f,h)},u=f=>{o("click:columnSort",f)};return(f,h)=>{const d=st,m=xo;return t.openBlock(),t.createElementBlock("div",ex,[t.createElementVNode("div",tx,[t.createElementVNode("div",nx,[t.createElementVNode("div",{class:"cursor-pointer text-text text-xl flex items-center justify-center hover:text-blue-600",onClick:a},[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(t.unref(Zv))]),_:1})])])]),t.withDirectives(t.createVNode(t.unref(jr),{"element-loading-text":"數據加載中...",data:f.data,columns:f.columns,"show-summary":f.showSummary,"show-over-flow-tooltip":f.showOverFlowTooltip,"summary-method":f.summaryMethod,"show-selection":f.showSelection,"base-table-row-class-name":f.sortTableRowClassName,onSelectionChange:s,onCellClick:c,onColumnSortChange:u},null,8,["data","columns","show-summary","show-over-flow-tooltip","summary-method","show-selection","base-table-row-class-name"]),[[m,f.loading]])])}}});function rx(e){return e.map(r=>({...r,checkActive:!0}))}const Gp=[jr,Xt,Bo,To,bl,ml,Gr];function qp(e,r){Gp.forEach(o=>{e.component(o.name||"VueTableComponent",o)})}const ox={install:qp,...Gp};jr.install=e=>{e.component(jr.name||"BaseTable",jr)},Xt.install=e=>{e.component(Xt.name||"BaseBtn",Xt)},Bo.install=e=>{e.component(Bo.name||"BaseInput",Bo)},To.install=e=>{e.component(To.name||"BaseDialog",To)},bl.install=e=>{e.component(bl.name||"SortTable",bl)},ml.install=e=>{e.component(ml.name||"TitleTable",ml)},Gr.install=e=>{e.component(Gr.name||"SearchBar",Gr)},Ie.BaseBtn=Xt,Ie.BaseDialog=To,Ie.BaseInput=Bo,Ie.BaseMultipleInput=Nk,Ie.BaseTable=jr,Ie.FunctionHeader=Kp,Ie.MainPanel=jp,Ie.SearchBar=Gr,Ie.SearchableListPanel=Qk,Ie.SortTable=bl,Ie.TitleTable=ml,Ie.TransferDialog=Uk,Ie.TransferItem=Up,Ie.default=ox,Ie.install=qp,Ie.setActiveColumn=rx,Object.defineProperties(Ie,{__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.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "Vue 3 + Element Plus 表格組件庫",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.js",
@@ -48,7 +48,7 @@ const handleColumnSortChange = (data: SortChangValue<T>) => {
48
48
  <div class="flex items-center h-12 bg-gray-200 px-1.5 rounded-t justify-end">
49
49
  <div class="flex items-center mr-4">
50
50
  <div
51
- class="cursor-pointer text-blue-800 text-xl flex items-center justify-center hover:text-blue-600"
51
+ class="cursor-pointer text-text text-xl flex items-center justify-center hover:text-blue-600"
52
52
  @click="openTransferDialog"
53
53
  >
54
54
  <el-icon><Setting /></el-icon>
@@ -82,7 +82,6 @@ watch(
82
82
  },
83
83
  )
84
84
  const handlerSubmit = () => {
85
- console.log('state.localColumns', state.localColumns)
86
85
  emit('update:submit', state.localColumns)
87
86
  }
88
87