rayyy-vue-table-components 1.2.28 → 1.2.29
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/README.md +4 -2
- package/dist/index.es.js +4 -3
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,8 +54,10 @@ import App from './App.vue'
|
|
|
54
54
|
|
|
55
55
|
const app = createApp(App)
|
|
56
56
|
|
|
57
|
-
//
|
|
58
|
-
app.use(ElementPlus
|
|
57
|
+
// 方式一:分別安裝(推薦,完全控制語系)
|
|
58
|
+
app.use(ElementPlus, {
|
|
59
|
+
locale: zhTw // 設定繁體中文
|
|
60
|
+
})
|
|
59
61
|
app.use(VueTableComponents)
|
|
60
62
|
|
|
61
63
|
// 方式二:使用組件庫內建的 Element Plus(自動設定繁體中文)
|
package/dist/index.es.js
CHANGED
|
@@ -19230,10 +19230,11 @@ const hI = (e) => {
|
|
|
19230
19230
|
Aa
|
|
19231
19231
|
];
|
|
19232
19232
|
function iI(e, t) {
|
|
19233
|
-
|
|
19233
|
+
var a, l;
|
|
19234
|
+
((l = (a = e._context) == null ? void 0 : a.provides) == null ? void 0 : l.__ELEMENT_PLUS__) !== void 0 || e.use(IC, {
|
|
19234
19235
|
locale: (t == null ? void 0 : t.locale) || KC
|
|
19235
|
-
}), E0.forEach((
|
|
19236
|
-
e.component(
|
|
19236
|
+
}), E0.forEach((s) => {
|
|
19237
|
+
e.component(s.name || "VueTableComponent", s);
|
|
19237
19238
|
});
|
|
19238
19239
|
}
|
|
19239
19240
|
const bI = {
|
package/dist/index.umd.js
CHANGED
|
@@ -52,4 +52,4 @@ __p += '`),ze&&(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,Fu(Oe))throw Oe;return Oe}function J6(o){return qe(o).toLowerCase()}function Q6(o){return qe(o).toUpperCase()}function eP(o,l,u){if(o=qe(o),o&&(u||l===r))return $m(o);if(!o||!(l=fn(l)))return o;var m=Mn(o),_=Mn(l),T=Fm(m,_),R=Mm(m,_)+1;return $r(m,T,R).join("")}function tP(o,l,u){if(o=qe(o),o&&(u||l===r))return o.slice(0,Vm(o)+1);if(!o||!(l=fn(l)))return o;var m=Mn(o),_=Mm(m,Mn(l))+1;return $r(m,0,_).join("")}function nP(o,l,u){if(o=qe(o),o&&(u||l===r))return o.replace(Wo,"");if(!o||!(l=fn(l)))return o;var m=Mn(o),_=Fm(m,Mn(l));return $r(m,_).join("")}function rP(o,l){var u=W,m=V;if(at(l)){var _="separator"in l?l.separator:_;u="length"in l?ke(l.length):u,m="omission"in l?fn(l.omission):m}o=qe(o);var T=o.length;if(qo(o)){var R=Mn(o);T=R.length}if(u>=T)return o;var L=u-Go(m);if(L<1)return m;var F=R?$r(R,0,L).join(""):o.slice(0,L);if(_===r)return F+m;if(R&&(L+=F.length-L),Mu(_)){if(o.slice(L).search(_)){var j,K=F;for(_.global||(_=eu(_.source,qe(st.exec(_))+"g")),_.lastIndex=0;j=_.exec(K);)var Z=j.index;F=F.slice(0,Z===r?L:Z)}}else if(o.indexOf(fn(_),L)!=L){var ne=F.lastIndexOf(_);ne>-1&&(F=F.slice(0,ne))}return F+m}function oP(o){return o=qe(o),o&&Bc.test(o)?o.replace(sr,RO):o}var lP=tl(function(o,l,u){return o+(u?" ":"")+l.toUpperCase()}),Du=Tg("toUpperCase");function B0(o,l,u){return o=qe(o),l=u?r:l,l===r?TO(o)?$O(o):CO(o):o.match(l)||[]}var k0=Pe(function(o,l){try{return cn(o,r,l)}catch(u){return Fu(u)?u:new Ce(u)}}),aP=pr(function(o,l){return _n(l,function(u){u=Qn(u),fr(o,u,Iu(o[u],o))}),o});function iP(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]]}):[],Pe(function(m){for(var _=-1;++_<l;){var T=o[_];if(cn(T[0],this,m))return cn(T[1],this,m)}})}function sP(o){return R3(xn(o,g))}function Wu(o){return function(){return o}}function cP(o,l){return o==null||o!==o?l:o}var uP=Ng(),fP=Ng(!0);function Qt(o){return o}function Hu(o){return ag(typeof o=="function"?o:xn(o,g))}function dP(o){return sg(xn(o,g))}function pP(o,l){return cg(o,xn(l,g))}var hP=Pe(function(o,l){return function(u){return Yl(u,o,l)}}),mP=Pe(function(o,l){return function(u){return Yl(o,u,l)}});function Uu(o,l,u){var m=wt(l),_=Ci(l,m);u==null&&!(at(l)&&(_.length||!m.length))&&(u=l,l=o,o=this,_=Ci(l,wt(l)));var T=!(at(u)&&"chain"in u)||!!u.chain,R=mr(o);return _n(_,function(L){var F=l[L];o[L]=F,R&&(o.prototype[L]=function(){var j=this.__chain__;if(T||j){var K=o(this.__wrapped__),Z=K.__actions__=Xt(this.__actions__);return Z.push({func:F,args:arguments,thisArg:o}),K.__chain__=j,K}return F.apply(o,Nr([this.value()],arguments))})}),o}function gP(){return xt._===this&&(xt._=WO),this}function ju(){}function bP(o){return o=ke(o),Pe(function(l){return ug(l,o)})}var yP=_u(lt),CP=_u(Am),wP=_u(qc);function T0(o){return Ou(o)?Gc(Qn(o)):X3(o)}function vP(o){return function(l){return o==null?r:fo(o,l)}}var _P=Pg(),SP=Pg(!0);function Ku(){return[]}function qu(){return!1}function EP(){return{}}function xP(){return""}function BP(){return!0}function kP(o,l){if(o=ke(o),o<1||o>H)return[];var u=ee,m=Nt(o,ee);l=de(l),o-=ee;for(var _=Zc(m,l);++u<o;)l(u);return _}function TP(o){return ve(o)?lt(o,Qn):dn(o)?[o]:Xt(Gg(qe(o)))}function OP(o){var l=++VO;return qe(o)+l}var NP=xi(function(o,l){return o+l},0),AP=Su("ceil"),PP=xi(function(o,l){return o/l},1),RP=Su("floor");function LP(o){return o&&o.length?yi(o,Qt,su):r}function IP(o,l){return o&&o.length?yi(o,de(l,2),su):r}function $P(o){return Lm(o,Qt)}function FP(o,l){return Lm(o,de(l,2))}function MP(o){return o&&o.length?yi(o,Qt,du):r}function zP(o,l){return o&&o.length?yi(o,de(l,2),du):r}var VP=xi(function(o,l){return o*l},1),DP=Su("round"),WP=xi(function(o,l){return o-l},0);function HP(o){return o&&o.length?Xc(o,Qt):0}function UP(o,l){return o&&o.length?Xc(o,de(l,2)):0}return B.after=dA,B.ary=l0,B.assign=QA,B.assignIn=C0,B.assignInWith=Mi,B.assignWith=e6,B.at=t6,B.before=a0,B.bind=Iu,B.bindAll=aP,B.bindKey=i0,B.castArray=EA,B.chain=n0,B.chunk=R8,B.compact=L8,B.concat=I8,B.cond=iP,B.conforms=sP,B.constant=Wu,B.countBy=HN,B.create=n6,B.curry=s0,B.curryRight=c0,B.debounce=u0,B.defaults=r6,B.defaultsDeep=o6,B.defer=pA,B.delay=hA,B.difference=$8,B.differenceBy=F8,B.differenceWith=M8,B.drop=z8,B.dropRight=V8,B.dropRightWhile=D8,B.dropWhile=W8,B.fill=H8,B.filter=jN,B.flatMap=GN,B.flatMapDeep=YN,B.flatMapDepth=XN,B.flatten=Jg,B.flattenDeep=U8,B.flattenDepth=j8,B.flip=mA,B.flow=uP,B.flowRight=fP,B.fromPairs=K8,B.functions=f6,B.functionsIn=d6,B.groupBy=ZN,B.initial=G8,B.intersection=Y8,B.intersectionBy=X8,B.intersectionWith=Z8,B.invert=h6,B.invertBy=m6,B.invokeMap=QN,B.iteratee=Hu,B.keyBy=eA,B.keys=wt,B.keysIn=Jt,B.map=Pi,B.mapKeys=b6,B.mapValues=y6,B.matches=dP,B.matchesProperty=pP,B.memoize=Li,B.merge=C6,B.mergeWith=w0,B.method=hP,B.methodOf=mP,B.mixin=Uu,B.negate=Ii,B.nthArg=bP,B.omit=w6,B.omitBy=v6,B.once=gA,B.orderBy=tA,B.over=yP,B.overArgs=bA,B.overEvery=CP,B.overSome=wP,B.partial=$u,B.partialRight=f0,B.partition=nA,B.pick=_6,B.pickBy=v0,B.property=T0,B.propertyOf=vP,B.pull=tN,B.pullAll=e0,B.pullAllBy=nN,B.pullAllWith=rN,B.pullAt=oN,B.range=_P,B.rangeRight=SP,B.rearg=yA,B.reject=lA,B.remove=lN,B.rest=CA,B.reverse=Ru,B.sampleSize=iA,B.set=E6,B.setWith=x6,B.shuffle=sA,B.slice=aN,B.sortBy=fA,B.sortedUniq=pN,B.sortedUniqBy=hN,B.split=G6,B.spread=wA,B.tail=mN,B.take=gN,B.takeRight=bN,B.takeRightWhile=yN,B.takeWhile=CN,B.tap=LN,B.throttle=vA,B.thru=Ai,B.toArray=g0,B.toPairs=_0,B.toPairsIn=S0,B.toPath=TP,B.toPlainObject=y0,B.transform=B6,B.unary=_A,B.union=wN,B.unionBy=vN,B.unionWith=_N,B.uniq=SN,B.uniqBy=EN,B.uniqWith=xN,B.unset=k6,B.unzip=Lu,B.unzipWith=t0,B.update=T6,B.updateWith=O6,B.values=ol,B.valuesIn=N6,B.without=BN,B.words=B0,B.wrap=SA,B.xor=kN,B.xorBy=TN,B.xorWith=ON,B.zip=NN,B.zipObject=AN,B.zipObjectDeep=PN,B.zipWith=RN,B.entries=_0,B.entriesIn=S0,B.extend=C0,B.extendWith=Mi,Uu(B,B),B.add=NP,B.attempt=k0,B.camelCase=L6,B.capitalize=E0,B.ceil=AP,B.clamp=A6,B.clone=xA,B.cloneDeep=kA,B.cloneDeepWith=TA,B.cloneWith=BA,B.conformsTo=OA,B.deburr=x0,B.defaultTo=cP,B.divide=PP,B.endsWith=I6,B.eq=Vn,B.escape=$6,B.escapeRegExp=F6,B.every=UN,B.find=KN,B.findIndex=Xg,B.findKey=l6,B.findLast=qN,B.findLastIndex=Zg,B.findLastKey=a6,B.floor=RP,B.forEach=r0,B.forEachRight=o0,B.forIn=i6,B.forInRight=s6,B.forOwn=c6,B.forOwnRight=u6,B.get=zu,B.gt=NA,B.gte=AA,B.has=p6,B.hasIn=Vu,B.head=Qg,B.identity=Qt,B.includes=JN,B.indexOf=q8,B.inRange=P6,B.invoke=g6,B.isArguments=mo,B.isArray=ve,B.isArrayBuffer=PA,B.isArrayLike=Zt,B.isArrayLikeObject=dt,B.isBoolean=RA,B.isBuffer=Fr,B.isDate=LA,B.isElement=IA,B.isEmpty=$A,B.isEqual=FA,B.isEqualWith=MA,B.isError=Fu,B.isFinite=zA,B.isFunction=mr,B.isInteger=d0,B.isLength=$i,B.isMap=p0,B.isMatch=VA,B.isMatchWith=DA,B.isNaN=WA,B.isNative=HA,B.isNil=jA,B.isNull=UA,B.isNumber=h0,B.isObject=at,B.isObjectLike=ct,B.isPlainObject=ta,B.isRegExp=Mu,B.isSafeInteger=KA,B.isSet=m0,B.isString=Fi,B.isSymbol=dn,B.isTypedArray=rl,B.isUndefined=qA,B.isWeakMap=GA,B.isWeakSet=YA,B.join=J8,B.kebabCase=M6,B.last=kn,B.lastIndexOf=Q8,B.lowerCase=z6,B.lowerFirst=V6,B.lt=XA,B.lte=ZA,B.max=LP,B.maxBy=IP,B.mean=$P,B.meanBy=FP,B.min=MP,B.minBy=zP,B.stubArray=Ku,B.stubFalse=qu,B.stubObject=EP,B.stubString=xP,B.stubTrue=BP,B.multiply=VP,B.nth=eN,B.noConflict=gP,B.noop=ju,B.now=Ri,B.pad=D6,B.padEnd=W6,B.padStart=H6,B.parseInt=U6,B.random=R6,B.reduce=rA,B.reduceRight=oA,B.repeat=j6,B.replace=K6,B.result=S6,B.round=DP,B.runInContext=$,B.sample=aA,B.size=cA,B.snakeCase=q6,B.some=uA,B.sortedIndex=iN,B.sortedIndexBy=sN,B.sortedIndexOf=cN,B.sortedLastIndex=uN,B.sortedLastIndexBy=fN,B.sortedLastIndexOf=dN,B.startCase=Y6,B.startsWith=X6,B.subtract=WP,B.sum=HP,B.sumBy=UP,B.template=Z6,B.times=kP,B.toFinite=gr,B.toInteger=ke,B.toLength=b0,B.toLower=J6,B.toNumber=Tn,B.toSafeInteger=JA,B.toString=qe,B.toUpper=Q6,B.trim=eP,B.trimEnd=tP,B.trimStart=nP,B.truncate=rP,B.unescape=oP,B.uniqueId=OP,B.upperCase=lP,B.upperFirst=Du,B.each=r0,B.eachRight=o0,B.first=Qg,Uu(B,(function(){var o={};return Zn(B,function(l,u){Ge.call(B.prototype,u)||(o[u]=l)}),o})(),{chain:!1}),B.VERSION=a,_n(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){B[o].placeholder=B}),_n(["drop","take"],function(o,l){Fe.prototype[o]=function(u){u=u===r?1:yt(ke(u),0);var m=this.__filtered__&&!l?new Fe(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},Fe.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;Fe.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":"");Fe.prototype[o]=function(){return this[u](1).value()[0]}}),_n(["initial","tail"],function(o,l){var u="drop"+(l?"":"Right");Fe.prototype[o]=function(){return this.__filtered__?new Fe(this):this[u](1)}}),Fe.prototype.compact=function(){return this.filter(Qt)},Fe.prototype.find=function(o){return this.filter(o).head()},Fe.prototype.findLast=function(o){return this.reverse().find(o)},Fe.prototype.invokeMap=Pe(function(o,l){return typeof o=="function"?new Fe(this):this.map(function(u){return Yl(u,o,l)})}),Fe.prototype.reject=function(o){return this.filter(Ii(de(o)))},Fe.prototype.slice=function(o,l){o=ke(o);var u=this;return u.__filtered__&&(o>0||l<0)?new Fe(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),l!==r&&(l=ke(l),u=l<0?u.dropRight(-l):u.take(l-o)),u)},Fe.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Fe.prototype.toArray=function(){return this.take(ee)},Zn(Fe.prototype,function(o,l){var u=/^(?:filter|find|map|reject)|While$/.test(l),m=/^(?:head|last)$/.test(l),_=B[m?"take"+(l=="last"?"Right":""):l],T=m||/^find/.test(l);_&&(B.prototype[l]=function(){var R=this.__wrapped__,L=m?[1]:arguments,F=R instanceof Fe,j=L[0],K=F||ve(R),Z=function(Ie){var ze=_.apply(B,Nr([Ie],L));return m&&ne?ze[0]:ze};K&&u&&typeof j=="function"&&j.length!=1&&(F=K=!1);var ne=this.__chain__,ce=!!this.__actions__.length,pe=T&&!ne,Oe=F&&!ce;if(!T&&K){R=Oe?R:new Fe(this);var he=o.apply(R,L);return he.__actions__.push({func:Ai,args:[Z],thisArg:r}),new En(he,ne)}return pe&&Oe?o.apply(this,L):(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);B.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(Fe.prototype,function(o,l){var u=B[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}],Fe.prototype.clone=o3,Fe.prototype.reverse=l3,Fe.prototype.value=a3,B.prototype.at=IN,B.prototype.chain=$N,B.prototype.commit=FN,B.prototype.next=MN,B.prototype.plant=VN,B.prototype.reverse=DN,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=WN,B.prototype.first=B.prototype.head,Wl&&(B.prototype[Wl]=zN),B}),Yo=FO();ao?((ao.exports=Yo)._=Yo,Hc._=Yo):xt._=Yo}).call(g4)})(Ml,Ml.exports)),Ml.exports}var y4=b4();const Xa=AE(y4),em=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=nx,d=Tk;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(b2),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(Qv),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)}}}),C4={class:"search-bar"},w4={class:"transfer-sort-wrapper"},v4={class:"max-h-96 overflow-y-auto"},_4=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:C=>a("update:modelValue",C)}),c=t.reactive({localColumns:Xa.cloneDeep(r.columnsValue),clickItemProp:"",checkList:r.columnsValue.map(C=>C.prop)}),s={toTop:C=>{if(C<=0)return;const E=c.localColumns.splice(C,1)[0];c.localColumns.unshift(E)},toBottom:C=>{if(C>=c.localColumns.length-1)return;const E=c.localColumns.splice(C,1)[0];c.localColumns.push(E)},toPre:C=>{if(C>0){const E=c.localColumns[C];c.localColumns[C]=c.localColumns[C-1],c.localColumns[C-1]=E}},toNext:C=>{if(C<c.localColumns.length-1){const E=c.localColumns[C];c.localColumns[C]=c.localColumns[C+1],c.localColumns[C+1]=E}}},f=()=>{c.localColumns=Xa.cloneDeep(r.columnsValue),c.checkList=r.columnsValue.filter(C=>C.checkActive).map(C=>C.prop||"")};t.watch(()=>i.value,C=>{C?f():(c.clickItemProp="",c.localColumns=[],c.checkList=[])});const p=()=>{a("update:submit",c.localColumns)},d=C=>{const E=r.columnsValue.map(S=>S.prop);c.checkList=C?E:[],h(c.checkList)},h=C=>{const E=C.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),w=t.computed({get:()=>g.value,set:C=>d(C)}),y=()=>{c.localColumns=Xa.cloneDeep(r.columnsValue)},b=C=>{if(C.length>0){const E=Xa.cloneDeep(c.localColumns);c.localColumns=E.filter(S=>S.label.includes(C))}else y()};return(C,E)=>{const S=xr,N=qE;return t.openBlock(),t.createBlock(zo,{modelValue:i.value,"onUpdate:modelValue":E[2]||(E[2]=x=>i.value=x),title:C.transferTitle,"onClick:submit":p},{default:t.withCtx(()=>[t.createElementVNode("div",C4,[t.createVNode(no,{"show-filter":!1,"show-search":!0,"full-input":!0,"onUpdate:clear":y,"onKeydown:enter":b})]),t.createElementVNode("div",w4,[t.createVNode(S,{modelValue:w.value,"onUpdate:modelValue":E[0]||(E[0]=x=>w.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(C.$slots,"list-container",{columns:c.localColumns,clickItemProp:c.clickItemProp,handleItemEvents:s,handleMousedown:x=>c.clickItemProp=x},()=>[t.createElementVNode("div",v4,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.localColumns,(x,v)=>(t.openBlock(),t.createBlock(em,{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:k=>c.clickItemProp=x.prop||"","onUpdate:toTop":k=>s.toTop(v),"onUpdate:toBottom":k=>s.toBottom(v),"onUpdate:toPre":k=>s.toPre(v),"onUpdate:toNext":k=>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"])}}}),S4={class:"h-header px-4 py-4 flex justify-between items-center bg-primary-10"},E4={class:"flex items-center gap-2"},x4={key:0,class:"flex items-center text-black"},B4={class:"font-bold text-text text-xl md:text-2xl;"},k4={class:"flex items-center gap-3"},tm=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",S4,[t.createElementVNode("div",E4,[e.showBack?(t.openBlock(),t.createElementBlock("div",x4,[t.createVNode(f,{size:16,class:"cursor-pointer",onClick:i},{default:t.withCtx(()=>[t.createVNode(t.unref(Gv))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",B4,t.toDisplayString(r.title),1)]),t.createElementVNode("div",k4,[t.renderSlot(c.$slots,"default")])])}}}),T4={key:0,class:"px-4 pt-1.5"},O4={key:1,class:"py-1.5 px-4"},N4={key:0,class:"flex justify-start pl-1.5 pt-0"},nm=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=Ba;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(tm),{title:n.title,showBack:n.showBack,depth:n.depth},null,8,["title","showBack","depth"]),t.createVNode(i,{"max-height":r.maxHeight,class:"max-h-fit max-w-screen-xl overflow-auto"},{default:t.withCtx(()=>[r.$slots.searchBar?(t.openBlock(),t.createElementBlock("div",T4,[t.renderSlot(r.$slots,"searchBar")])):t.createCommentVNode("",!0),r.$slots.main?(t.openBlock(),t.createElementBlock("div",O4,[t.renderSlot(r.$slots,"main")])):t.createCommentVNode("",!0)]),_:3},8,["max-height"]),r.$slots.footer?(t.openBlock(),t.createElementBlock("div",N4,[t.renderSlot(r.$slots,"footer")])):t.createCommentVNode("",!0)],64)}}}),A4=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 w=Sk;return t.openBlock(),t.createBlock(t.unref(nm),{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(w,{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:{}},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=iE,w=Mx;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(w,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=y=>a.value=y),"append-to-body":"",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(Vd))]),_: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 P4(e){return e.map(n=>({...n,checkActive:!0}))}const R4=e=>{const n=["p-0 h-10"];return e!=null&&e.isDismissed&&n.push("bg-blue-20"),e!=null&&e.isHeader&&n.push("bg-primary-15 font-bold text-text text-sm leading-4"),n.join(" ")},L4=(e="normal")=>{switch(e){case"blue":return"text-blue-10";case"red":return"text-redText";default:return""}},I4={tableCell:"table-cell",tableHeader:"table-header",tableCellContent:"table-cell-content",dismissedRow:"dismissed-row",tableFooter:"table-footer",blueText:"blue-text",redText:"red-text",sortTableContainer:"sort-table-container",sortTableFunctionBar:"sort-table-function-bar",sortTableSettingsBtn:"sort-table-settings-btn",filterBtn:"filter-btn",filterBtnText:"filter-btn-text",filterBtnIcon:"filter-btn-icon",transferSortWrapper:"transfer-sort-wrapper",transferActiveBg:"transfer-active-bg",transferActiveBorder:"transfer-active-border",transferItemWrapper:"transfer-item-wrapper",transferArrowWrapper:"transfer-arrow-wrapper",baseDialogTitle:"base-dialog-title",cursorGrab:"cursor-grab",cursorGrabbing:"cursor-grabbing",dataTableConfig:"data-table-config",componentStyles:"component-styles"},rm=[Fo,on,Mo,Vo,zo,Fl,no];function om(e,n){e.use(ll,{locale:(n==null?void 0:n.locale)||N0}),rm.forEach(r=>{e.component(r.name||"VueTableComponent",r)})}const $4={install:om,...rm};Fo.install=e=>{e.component(Fo.name||"BaseTable",Fo)},on.install=e=>{e.component(on.name||"BaseBtn",on)},Mo.install=e=>{e.component(Mo.name||"BaseInput",Mo)},Vo.install=e=>{e.component(Vo.name||"FilterBtn",Vo)},zo.install=e=>{e.component(zo.name||"BaseDialog",zo)},Fl.install=e=>{e.component(Fl.name||"SortTable",Fl)},no.install=e=>{e.component(no.name||"SearchBar",no)},Ne.BaseBtn=on,Ne.BaseDialog=zo,Ne.BaseForm=i4,Ne.BaseInput=Mo,Ne.BaseMultipleInput=s4,Ne.BaseTable=Fo,Ne.FilterBtn=Vo,Ne.FunctionHeader=tm,Ne.MainPanel=nm,Ne.STYLE_CLASSES=I4,Ne.SearchBar=no,Ne.SearchableListPanel=A4,Ne.SortTable=Fl,Ne.TransferDialog=_4,Ne.TransferItem=em,Ne.createTableCellClass=R4,Ne.createTextClass=L4,Ne.default=$4,Ne.install=om,Ne.setActiveColumn=P4,Object.defineProperties(Ne,{__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,Fu(Oe))throw Oe;return Oe}function J6(o){return qe(o).toLowerCase()}function Q6(o){return qe(o).toUpperCase()}function eP(o,l,u){if(o=qe(o),o&&(u||l===r))return $m(o);if(!o||!(l=fn(l)))return o;var m=Mn(o),_=Mn(l),T=Fm(m,_),R=Mm(m,_)+1;return $r(m,T,R).join("")}function tP(o,l,u){if(o=qe(o),o&&(u||l===r))return o.slice(0,Vm(o)+1);if(!o||!(l=fn(l)))return o;var m=Mn(o),_=Mm(m,Mn(l))+1;return $r(m,0,_).join("")}function nP(o,l,u){if(o=qe(o),o&&(u||l===r))return o.replace(Wo,"");if(!o||!(l=fn(l)))return o;var m=Mn(o),_=Fm(m,Mn(l));return $r(m,_).join("")}function rP(o,l){var u=W,m=V;if(at(l)){var _="separator"in l?l.separator:_;u="length"in l?ke(l.length):u,m="omission"in l?fn(l.omission):m}o=qe(o);var T=o.length;if(qo(o)){var R=Mn(o);T=R.length}if(u>=T)return o;var L=u-Go(m);if(L<1)return m;var F=R?$r(R,0,L).join(""):o.slice(0,L);if(_===r)return F+m;if(R&&(L+=F.length-L),Mu(_)){if(o.slice(L).search(_)){var j,K=F;for(_.global||(_=eu(_.source,qe(st.exec(_))+"g")),_.lastIndex=0;j=_.exec(K);)var Z=j.index;F=F.slice(0,Z===r?L:Z)}}else if(o.indexOf(fn(_),L)!=L){var ne=F.lastIndexOf(_);ne>-1&&(F=F.slice(0,ne))}return F+m}function oP(o){return o=qe(o),o&&Bc.test(o)?o.replace(sr,RO):o}var lP=tl(function(o,l,u){return o+(u?" ":"")+l.toUpperCase()}),Du=Tg("toUpperCase");function B0(o,l,u){return o=qe(o),l=u?r:l,l===r?TO(o)?$O(o):CO(o):o.match(l)||[]}var k0=Pe(function(o,l){try{return cn(o,r,l)}catch(u){return Fu(u)?u:new Ce(u)}}),aP=pr(function(o,l){return _n(l,function(u){u=Qn(u),fr(o,u,Iu(o[u],o))}),o});function iP(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]]}):[],Pe(function(m){for(var _=-1;++_<l;){var T=o[_];if(cn(T[0],this,m))return cn(T[1],this,m)}})}function sP(o){return R3(xn(o,g))}function Wu(o){return function(){return o}}function cP(o,l){return o==null||o!==o?l:o}var uP=Ng(),fP=Ng(!0);function Qt(o){return o}function Hu(o){return ag(typeof o=="function"?o:xn(o,g))}function dP(o){return sg(xn(o,g))}function pP(o,l){return cg(o,xn(l,g))}var hP=Pe(function(o,l){return function(u){return Yl(u,o,l)}}),mP=Pe(function(o,l){return function(u){return Yl(o,u,l)}});function Uu(o,l,u){var m=wt(l),_=Ci(l,m);u==null&&!(at(l)&&(_.length||!m.length))&&(u=l,l=o,o=this,_=Ci(l,wt(l)));var T=!(at(u)&&"chain"in u)||!!u.chain,R=mr(o);return _n(_,function(L){var F=l[L];o[L]=F,R&&(o.prototype[L]=function(){var j=this.__chain__;if(T||j){var K=o(this.__wrapped__),Z=K.__actions__=Xt(this.__actions__);return Z.push({func:F,args:arguments,thisArg:o}),K.__chain__=j,K}return F.apply(o,Nr([this.value()],arguments))})}),o}function gP(){return xt._===this&&(xt._=WO),this}function ju(){}function bP(o){return o=ke(o),Pe(function(l){return ug(l,o)})}var yP=_u(lt),CP=_u(Am),wP=_u(qc);function T0(o){return Ou(o)?Gc(Qn(o)):X3(o)}function vP(o){return function(l){return o==null?r:fo(o,l)}}var _P=Pg(),SP=Pg(!0);function Ku(){return[]}function qu(){return!1}function EP(){return{}}function xP(){return""}function BP(){return!0}function kP(o,l){if(o=ke(o),o<1||o>H)return[];var u=ee,m=Nt(o,ee);l=de(l),o-=ee;for(var _=Zc(m,l);++u<o;)l(u);return _}function TP(o){return ve(o)?lt(o,Qn):dn(o)?[o]:Xt(Gg(qe(o)))}function OP(o){var l=++VO;return qe(o)+l}var NP=xi(function(o,l){return o+l},0),AP=Su("ceil"),PP=xi(function(o,l){return o/l},1),RP=Su("floor");function LP(o){return o&&o.length?yi(o,Qt,su):r}function IP(o,l){return o&&o.length?yi(o,de(l,2),su):r}function $P(o){return Lm(o,Qt)}function FP(o,l){return Lm(o,de(l,2))}function MP(o){return o&&o.length?yi(o,Qt,du):r}function zP(o,l){return o&&o.length?yi(o,de(l,2),du):r}var VP=xi(function(o,l){return o*l},1),DP=Su("round"),WP=xi(function(o,l){return o-l},0);function HP(o){return o&&o.length?Xc(o,Qt):0}function UP(o,l){return o&&o.length?Xc(o,de(l,2)):0}return B.after=dA,B.ary=l0,B.assign=QA,B.assignIn=C0,B.assignInWith=Mi,B.assignWith=e6,B.at=t6,B.before=a0,B.bind=Iu,B.bindAll=aP,B.bindKey=i0,B.castArray=EA,B.chain=n0,B.chunk=R8,B.compact=L8,B.concat=I8,B.cond=iP,B.conforms=sP,B.constant=Wu,B.countBy=HN,B.create=n6,B.curry=s0,B.curryRight=c0,B.debounce=u0,B.defaults=r6,B.defaultsDeep=o6,B.defer=pA,B.delay=hA,B.difference=$8,B.differenceBy=F8,B.differenceWith=M8,B.drop=z8,B.dropRight=V8,B.dropRightWhile=D8,B.dropWhile=W8,B.fill=H8,B.filter=jN,B.flatMap=GN,B.flatMapDeep=YN,B.flatMapDepth=XN,B.flatten=Jg,B.flattenDeep=U8,B.flattenDepth=j8,B.flip=mA,B.flow=uP,B.flowRight=fP,B.fromPairs=K8,B.functions=f6,B.functionsIn=d6,B.groupBy=ZN,B.initial=G8,B.intersection=Y8,B.intersectionBy=X8,B.intersectionWith=Z8,B.invert=h6,B.invertBy=m6,B.invokeMap=QN,B.iteratee=Hu,B.keyBy=eA,B.keys=wt,B.keysIn=Jt,B.map=Pi,B.mapKeys=b6,B.mapValues=y6,B.matches=dP,B.matchesProperty=pP,B.memoize=Li,B.merge=C6,B.mergeWith=w0,B.method=hP,B.methodOf=mP,B.mixin=Uu,B.negate=Ii,B.nthArg=bP,B.omit=w6,B.omitBy=v6,B.once=gA,B.orderBy=tA,B.over=yP,B.overArgs=bA,B.overEvery=CP,B.overSome=wP,B.partial=$u,B.partialRight=f0,B.partition=nA,B.pick=_6,B.pickBy=v0,B.property=T0,B.propertyOf=vP,B.pull=tN,B.pullAll=e0,B.pullAllBy=nN,B.pullAllWith=rN,B.pullAt=oN,B.range=_P,B.rangeRight=SP,B.rearg=yA,B.reject=lA,B.remove=lN,B.rest=CA,B.reverse=Ru,B.sampleSize=iA,B.set=E6,B.setWith=x6,B.shuffle=sA,B.slice=aN,B.sortBy=fA,B.sortedUniq=pN,B.sortedUniqBy=hN,B.split=G6,B.spread=wA,B.tail=mN,B.take=gN,B.takeRight=bN,B.takeRightWhile=yN,B.takeWhile=CN,B.tap=LN,B.throttle=vA,B.thru=Ai,B.toArray=g0,B.toPairs=_0,B.toPairsIn=S0,B.toPath=TP,B.toPlainObject=y0,B.transform=B6,B.unary=_A,B.union=wN,B.unionBy=vN,B.unionWith=_N,B.uniq=SN,B.uniqBy=EN,B.uniqWith=xN,B.unset=k6,B.unzip=Lu,B.unzipWith=t0,B.update=T6,B.updateWith=O6,B.values=ol,B.valuesIn=N6,B.without=BN,B.words=B0,B.wrap=SA,B.xor=kN,B.xorBy=TN,B.xorWith=ON,B.zip=NN,B.zipObject=AN,B.zipObjectDeep=PN,B.zipWith=RN,B.entries=_0,B.entriesIn=S0,B.extend=C0,B.extendWith=Mi,Uu(B,B),B.add=NP,B.attempt=k0,B.camelCase=L6,B.capitalize=E0,B.ceil=AP,B.clamp=A6,B.clone=xA,B.cloneDeep=kA,B.cloneDeepWith=TA,B.cloneWith=BA,B.conformsTo=OA,B.deburr=x0,B.defaultTo=cP,B.divide=PP,B.endsWith=I6,B.eq=Vn,B.escape=$6,B.escapeRegExp=F6,B.every=UN,B.find=KN,B.findIndex=Xg,B.findKey=l6,B.findLast=qN,B.findLastIndex=Zg,B.findLastKey=a6,B.floor=RP,B.forEach=r0,B.forEachRight=o0,B.forIn=i6,B.forInRight=s6,B.forOwn=c6,B.forOwnRight=u6,B.get=zu,B.gt=NA,B.gte=AA,B.has=p6,B.hasIn=Vu,B.head=Qg,B.identity=Qt,B.includes=JN,B.indexOf=q8,B.inRange=P6,B.invoke=g6,B.isArguments=mo,B.isArray=ve,B.isArrayBuffer=PA,B.isArrayLike=Zt,B.isArrayLikeObject=dt,B.isBoolean=RA,B.isBuffer=Fr,B.isDate=LA,B.isElement=IA,B.isEmpty=$A,B.isEqual=FA,B.isEqualWith=MA,B.isError=Fu,B.isFinite=zA,B.isFunction=mr,B.isInteger=d0,B.isLength=$i,B.isMap=p0,B.isMatch=VA,B.isMatchWith=DA,B.isNaN=WA,B.isNative=HA,B.isNil=jA,B.isNull=UA,B.isNumber=h0,B.isObject=at,B.isObjectLike=ct,B.isPlainObject=ta,B.isRegExp=Mu,B.isSafeInteger=KA,B.isSet=m0,B.isString=Fi,B.isSymbol=dn,B.isTypedArray=rl,B.isUndefined=qA,B.isWeakMap=GA,B.isWeakSet=YA,B.join=J8,B.kebabCase=M6,B.last=kn,B.lastIndexOf=Q8,B.lowerCase=z6,B.lowerFirst=V6,B.lt=XA,B.lte=ZA,B.max=LP,B.maxBy=IP,B.mean=$P,B.meanBy=FP,B.min=MP,B.minBy=zP,B.stubArray=Ku,B.stubFalse=qu,B.stubObject=EP,B.stubString=xP,B.stubTrue=BP,B.multiply=VP,B.nth=eN,B.noConflict=gP,B.noop=ju,B.now=Ri,B.pad=D6,B.padEnd=W6,B.padStart=H6,B.parseInt=U6,B.random=R6,B.reduce=rA,B.reduceRight=oA,B.repeat=j6,B.replace=K6,B.result=S6,B.round=DP,B.runInContext=$,B.sample=aA,B.size=cA,B.snakeCase=q6,B.some=uA,B.sortedIndex=iN,B.sortedIndexBy=sN,B.sortedIndexOf=cN,B.sortedLastIndex=uN,B.sortedLastIndexBy=fN,B.sortedLastIndexOf=dN,B.startCase=Y6,B.startsWith=X6,B.subtract=WP,B.sum=HP,B.sumBy=UP,B.template=Z6,B.times=kP,B.toFinite=gr,B.toInteger=ke,B.toLength=b0,B.toLower=J6,B.toNumber=Tn,B.toSafeInteger=JA,B.toString=qe,B.toUpper=Q6,B.trim=eP,B.trimEnd=tP,B.trimStart=nP,B.truncate=rP,B.unescape=oP,B.uniqueId=OP,B.upperCase=lP,B.upperFirst=Du,B.each=r0,B.eachRight=o0,B.first=Qg,Uu(B,(function(){var o={};return Zn(B,function(l,u){Ge.call(B.prototype,u)||(o[u]=l)}),o})(),{chain:!1}),B.VERSION=a,_n(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){B[o].placeholder=B}),_n(["drop","take"],function(o,l){Fe.prototype[o]=function(u){u=u===r?1:yt(ke(u),0);var m=this.__filtered__&&!l?new Fe(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},Fe.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;Fe.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":"");Fe.prototype[o]=function(){return this[u](1).value()[0]}}),_n(["initial","tail"],function(o,l){var u="drop"+(l?"":"Right");Fe.prototype[o]=function(){return this.__filtered__?new Fe(this):this[u](1)}}),Fe.prototype.compact=function(){return this.filter(Qt)},Fe.prototype.find=function(o){return this.filter(o).head()},Fe.prototype.findLast=function(o){return this.reverse().find(o)},Fe.prototype.invokeMap=Pe(function(o,l){return typeof o=="function"?new Fe(this):this.map(function(u){return Yl(u,o,l)})}),Fe.prototype.reject=function(o){return this.filter(Ii(de(o)))},Fe.prototype.slice=function(o,l){o=ke(o);var u=this;return u.__filtered__&&(o>0||l<0)?new Fe(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),l!==r&&(l=ke(l),u=l<0?u.dropRight(-l):u.take(l-o)),u)},Fe.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Fe.prototype.toArray=function(){return this.take(ee)},Zn(Fe.prototype,function(o,l){var u=/^(?:filter|find|map|reject)|While$/.test(l),m=/^(?:head|last)$/.test(l),_=B[m?"take"+(l=="last"?"Right":""):l],T=m||/^find/.test(l);_&&(B.prototype[l]=function(){var R=this.__wrapped__,L=m?[1]:arguments,F=R instanceof Fe,j=L[0],K=F||ve(R),Z=function(Ie){var ze=_.apply(B,Nr([Ie],L));return m&&ne?ze[0]:ze};K&&u&&typeof j=="function"&&j.length!=1&&(F=K=!1);var ne=this.__chain__,ce=!!this.__actions__.length,pe=T&&!ne,Oe=F&&!ce;if(!T&&K){R=Oe?R:new Fe(this);var he=o.apply(R,L);return he.__actions__.push({func:Ai,args:[Z],thisArg:r}),new En(he,ne)}return pe&&Oe?o.apply(this,L):(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);B.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(Fe.prototype,function(o,l){var u=B[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}],Fe.prototype.clone=o3,Fe.prototype.reverse=l3,Fe.prototype.value=a3,B.prototype.at=IN,B.prototype.chain=$N,B.prototype.commit=FN,B.prototype.next=MN,B.prototype.plant=VN,B.prototype.reverse=DN,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=WN,B.prototype.first=B.prototype.head,Wl&&(B.prototype[Wl]=zN),B}),Yo=FO();ao?((ao.exports=Yo)._=Yo,Hc._=Yo):xt._=Yo}).call(g4)})(Ml,Ml.exports)),Ml.exports}var y4=b4();const Xa=AE(y4),em=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=nx,d=Tk;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(b2),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(Qv),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)}}}),C4={class:"search-bar"},w4={class:"transfer-sort-wrapper"},v4={class:"max-h-96 overflow-y-auto"},_4=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:C=>a("update:modelValue",C)}),c=t.reactive({localColumns:Xa.cloneDeep(r.columnsValue),clickItemProp:"",checkList:r.columnsValue.map(C=>C.prop)}),s={toTop:C=>{if(C<=0)return;const E=c.localColumns.splice(C,1)[0];c.localColumns.unshift(E)},toBottom:C=>{if(C>=c.localColumns.length-1)return;const E=c.localColumns.splice(C,1)[0];c.localColumns.push(E)},toPre:C=>{if(C>0){const E=c.localColumns[C];c.localColumns[C]=c.localColumns[C-1],c.localColumns[C-1]=E}},toNext:C=>{if(C<c.localColumns.length-1){const E=c.localColumns[C];c.localColumns[C]=c.localColumns[C+1],c.localColumns[C+1]=E}}},f=()=>{c.localColumns=Xa.cloneDeep(r.columnsValue),c.checkList=r.columnsValue.filter(C=>C.checkActive).map(C=>C.prop||"")};t.watch(()=>i.value,C=>{C?f():(c.clickItemProp="",c.localColumns=[],c.checkList=[])});const p=()=>{a("update:submit",c.localColumns)},d=C=>{const E=r.columnsValue.map(S=>S.prop);c.checkList=C?E:[],h(c.checkList)},h=C=>{const E=C.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),w=t.computed({get:()=>g.value,set:C=>d(C)}),y=()=>{c.localColumns=Xa.cloneDeep(r.columnsValue)},b=C=>{if(C.length>0){const E=Xa.cloneDeep(c.localColumns);c.localColumns=E.filter(S=>S.label.includes(C))}else y()};return(C,E)=>{const S=xr,N=qE;return t.openBlock(),t.createBlock(zo,{modelValue:i.value,"onUpdate:modelValue":E[2]||(E[2]=x=>i.value=x),title:C.transferTitle,"onClick:submit":p},{default:t.withCtx(()=>[t.createElementVNode("div",C4,[t.createVNode(no,{"show-filter":!1,"show-search":!0,"full-input":!0,"onUpdate:clear":y,"onKeydown:enter":b})]),t.createElementVNode("div",w4,[t.createVNode(S,{modelValue:w.value,"onUpdate:modelValue":E[0]||(E[0]=x=>w.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(C.$slots,"list-container",{columns:c.localColumns,clickItemProp:c.clickItemProp,handleItemEvents:s,handleMousedown:x=>c.clickItemProp=x},()=>[t.createElementVNode("div",v4,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.localColumns,(x,v)=>(t.openBlock(),t.createBlock(em,{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:k=>c.clickItemProp=x.prop||"","onUpdate:toTop":k=>s.toTop(v),"onUpdate:toBottom":k=>s.toBottom(v),"onUpdate:toPre":k=>s.toPre(v),"onUpdate:toNext":k=>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"])}}}),S4={class:"h-header px-4 py-4 flex justify-between items-center bg-primary-10"},E4={class:"flex items-center gap-2"},x4={key:0,class:"flex items-center text-black"},B4={class:"font-bold text-text text-xl md:text-2xl;"},k4={class:"flex items-center gap-3"},tm=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",S4,[t.createElementVNode("div",E4,[e.showBack?(t.openBlock(),t.createElementBlock("div",x4,[t.createVNode(f,{size:16,class:"cursor-pointer",onClick:i},{default:t.withCtx(()=>[t.createVNode(t.unref(Gv))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",B4,t.toDisplayString(r.title),1)]),t.createElementVNode("div",k4,[t.renderSlot(c.$slots,"default")])])}}}),T4={key:0,class:"px-4 pt-1.5"},O4={key:1,class:"py-1.5 px-4"},N4={key:0,class:"flex justify-start pl-1.5 pt-0"},nm=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=Ba;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(tm),{title:n.title,showBack:n.showBack,depth:n.depth},null,8,["title","showBack","depth"]),t.createVNode(i,{"max-height":r.maxHeight,class:"max-h-fit max-w-screen-xl overflow-auto"},{default:t.withCtx(()=>[r.$slots.searchBar?(t.openBlock(),t.createElementBlock("div",T4,[t.renderSlot(r.$slots,"searchBar")])):t.createCommentVNode("",!0),r.$slots.main?(t.openBlock(),t.createElementBlock("div",O4,[t.renderSlot(r.$slots,"main")])):t.createCommentVNode("",!0)]),_:3},8,["max-height"]),r.$slots.footer?(t.openBlock(),t.createElementBlock("div",N4,[t.renderSlot(r.$slots,"footer")])):t.createCommentVNode("",!0)],64)}}}),A4=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 w=Sk;return t.openBlock(),t.createBlock(t.unref(nm),{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(w,{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:{}},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=iE,w=Mx;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(w,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=y=>a.value=y),"append-to-body":"",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(Vd))]),_: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 P4(e){return e.map(n=>({...n,checkActive:!0}))}const R4=e=>{const n=["p-0 h-10"];return e!=null&&e.isDismissed&&n.push("bg-blue-20"),e!=null&&e.isHeader&&n.push("bg-primary-15 font-bold text-text text-sm leading-4"),n.join(" ")},L4=(e="normal")=>{switch(e){case"blue":return"text-blue-10";case"red":return"text-redText";default:return""}},I4={tableCell:"table-cell",tableHeader:"table-header",tableCellContent:"table-cell-content",dismissedRow:"dismissed-row",tableFooter:"table-footer",blueText:"blue-text",redText:"red-text",sortTableContainer:"sort-table-container",sortTableFunctionBar:"sort-table-function-bar",sortTableSettingsBtn:"sort-table-settings-btn",filterBtn:"filter-btn",filterBtnText:"filter-btn-text",filterBtnIcon:"filter-btn-icon",transferSortWrapper:"transfer-sort-wrapper",transferActiveBg:"transfer-active-bg",transferActiveBorder:"transfer-active-border",transferItemWrapper:"transfer-item-wrapper",transferArrowWrapper:"transfer-arrow-wrapper",baseDialogTitle:"base-dialog-title",cursorGrab:"cursor-grab",cursorGrabbing:"cursor-grabbing",dataTableConfig:"data-table-config",componentStyles:"component-styles"},rm=[Fo,on,Mo,Vo,zo,Fl,no];function om(e,n){var a,i;((i=(a=e._context)==null?void 0:a.provides)==null?void 0:i.__ELEMENT_PLUS__)!==void 0||e.use(ll,{locale:(n==null?void 0:n.locale)||N0}),rm.forEach(c=>{e.component(c.name||"VueTableComponent",c)})}const $4={install:om,...rm};Fo.install=e=>{e.component(Fo.name||"BaseTable",Fo)},on.install=e=>{e.component(on.name||"BaseBtn",on)},Mo.install=e=>{e.component(Mo.name||"BaseInput",Mo)},Vo.install=e=>{e.component(Vo.name||"FilterBtn",Vo)},zo.install=e=>{e.component(zo.name||"BaseDialog",zo)},Fl.install=e=>{e.component(Fl.name||"SortTable",Fl)},no.install=e=>{e.component(no.name||"SearchBar",no)},Ne.BaseBtn=on,Ne.BaseDialog=zo,Ne.BaseForm=i4,Ne.BaseInput=Mo,Ne.BaseMultipleInput=s4,Ne.BaseTable=Fo,Ne.FilterBtn=Vo,Ne.FunctionHeader=tm,Ne.MainPanel=nm,Ne.STYLE_CLASSES=I4,Ne.SearchBar=no,Ne.SearchableListPanel=A4,Ne.SortTable=Fl,Ne.TransferDialog=_4,Ne.TransferItem=em,Ne.createTableCellClass=R4,Ne.createTextClass=L4,Ne.default=$4,Ne.install=om,Ne.setActiveColumn=P4,Object.defineProperties(Ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|