rayyy-vue-table-components 2.0.20 → 2.0.21
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 +15 -15
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
- package/src/utils/i18n.ts +24 -23
package/dist/index.es.js
CHANGED
|
@@ -17273,21 +17273,21 @@ function rA() {
|
|
|
17273
17273
|
return console.log("🔍 [useI18n] 返回內部 i18n,locale:", n.locale.value), n;
|
|
17274
17274
|
}
|
|
17275
17275
|
function oA() {
|
|
17276
|
-
console.log("🔍 [useComponentElementLocale] 開始執行")
|
|
17277
|
-
|
|
17278
|
-
|
|
17279
|
-
|
|
17280
|
-
|
|
17281
|
-
|
|
17282
|
-
|
|
17283
|
-
|
|
17284
|
-
|
|
17285
|
-
|
|
17286
|
-
|
|
17287
|
-
|
|
17288
|
-
|
|
17289
|
-
|
|
17290
|
-
console.log("🔍 [useComponentElementLocale]
|
|
17276
|
+
return console.log("🔍 [useComponentElementLocale] 開始執行"), R(() => {
|
|
17277
|
+
console.log("🔍 [useComponentElementLocale] computed 開始執行");
|
|
17278
|
+
const e = Ue();
|
|
17279
|
+
let n;
|
|
17280
|
+
try {
|
|
17281
|
+
console.log("🔍 [useComponentElementLocale] 嘗試獲取外部 i18n");
|
|
17282
|
+
const u = e == null ? void 0 : e.appContext.config.globalProperties, s = u == null ? void 0 : u.$i18n;
|
|
17283
|
+
s && "global" in s ? (n = s.global.locale, console.log("🔍 [useComponentElementLocale] 成功獲取外部 locale:", n.value)) : console.log("🔍 [useComponentElementLocale] 外部 i18n 不存在");
|
|
17284
|
+
} catch (u) {
|
|
17285
|
+
console.log("❌ [useComponentElementLocale] 獲取外部 i18n 失敗:", u);
|
|
17286
|
+
}
|
|
17287
|
+
const { locale: r } = rA();
|
|
17288
|
+
console.log("🔍 [useComponentElementLocale] 內部 locale:", r.value);
|
|
17289
|
+
const l = n || r;
|
|
17290
|
+
console.log("🔍 [useComponentElementLocale] 最終使用 locale:", l.value);
|
|
17291
17291
|
const a = l.value === "zh-TW" ? tA : Q2;
|
|
17292
17292
|
return console.log("🔍 [useComponentElementLocale] 返回結果:", a.name), a;
|
|
17293
17293
|
});
|
package/dist/index.umd.js
CHANGED
|
@@ -41,4 +41,4 @@ __p += '`),Re&&(Y+=`' +
|
|
|
41
41
|
function print() { __p += __j.call(arguments, '') }
|
|
42
42
|
`:`;
|
|
43
43
|
`)+Y+`return __p
|
|
44
|
-
}`;var ke=Nh(function(){return De(k,se+"return "+Y).apply(r,A)});if(ke.source=Y,eu(ke))throw ke;return ke}function iB(n){return ze(n).toLowerCase()}function sB(n){return ze(n).toUpperCase()}function cB(n,l,s){if(n=ze(n),n&&(s||l===r))return Vp(n);if(!n||!(l=nn(l)))return n;var p=Tn(n),w=Tn(l),k=Dp(p,w),A=zp(p,w)+1;return Lo(p,k,A).join("")}function uB(n,l,s){if(n=ze(n),n&&(s||l===r))return n.slice(0,Hp(n)+1);if(!n||!(l=nn(l)))return n;var p=Tn(n),w=zp(p,Tn(l))+1;return Lo(p,0,w).join("")}function fB(n,l,s){if(n=ze(n),n&&(s||l===r))return n.replace(Lr,"");if(!n||!(l=nn(l)))return n;var p=Tn(n),w=Dp(p,Tn(l));return Lo(p,w).join("")}function dB(n,l){var s=U,p=z;if(tt(l)){var w="separator"in l?l.separator:w;s="length"in l?Se(l.length):s,p="omission"in l?nn(l.omission):p}n=ze(n);var k=n.length;if($r(n)){var A=Tn(n);k=A.length}if(s>=k)return n;var I=s-Fr(p);if(I<1)return p;var M=A?Lo(A,0,I).join(""):n.slice(0,I);if(w===r)return M+p;if(A&&(I+=M.length-I),tu(w)){if(n.slice(I).search(w)){var K,j=M;for(w.global||(w=bc(w.source,ze(ot.exec(w))+"g")),w.lastIndex=0;K=w.exec(j);)var Y=K.index;M=M.slice(0,Y===r?I:Y)}}else if(n.indexOf(nn(w),I)!=I){var ee=M.lastIndexOf(w);ee>-1&&(M=M.slice(0,ee))}return M+p}function pB(n){return n=ze(n),n&&Hs.test(n)?n.replace(eo,Ww):n}var hB=Kr(function(n,l,s){return n+(s?" ":"")+l.toUpperCase()}),ru=A2("toUpperCase");function Oh(n,l,s){return n=ze(n),l=s?r:l,l===r?$w(n)?Kw(n):Tw(n):n.match(l)||[]}var Nh=Te(function(n,l){try{return en(n,r,l)}catch(s){return eu(s)?s:new ge(s)}}),mB=lo(function(n,l){return mn(l,function(s){s=Un(s),oo(n,s,Jc(n[s],n))}),n});function gB(n){var l=n==null?0:n.length,s=ue();return n=l?Qe(n,function(p){if(typeof p[1]!="function")throw new gn(c);return[s(p[0]),p[1]]}):[],Te(function(p){for(var w=-1;++w<l;){var k=n[w];if(en(k[0],this,p))return en(k[1],this,p)}})}function bB(n){return Wv(Cn(n,g))}function lu(n){return function(){return n}}function CB(n,l){return n==null||n!==n?l:n}var yB=I2(),wB=I2(!0);function Gt(n){return n}function au(n){return c2(typeof n=="function"?n:Cn(n,g))}function vB(n){return f2(Cn(n,g))}function _B(n,l){return d2(n,Cn(l,g))}var SB=Te(function(n,l){return function(s){return Nl(s,n,l)}}),EB=Te(function(n,l){return function(s){return Nl(n,s,l)}});function iu(n,l,s){var p=pt(l),w=Za(l,p);s==null&&!(tt(l)&&(w.length||!p.length))&&(s=l,l=n,n=this,w=Za(l,pt(l)));var k=!(tt(s)&&"chain"in s)||!!s.chain,A=io(n);return mn(w,function(I){var M=l[I];n[I]=M,A&&(n.prototype[I]=function(){var K=this.__chain__;if(k||K){var j=n(this.__wrapped__),Y=j.__actions__=Ut(this.__actions__);return Y.push({func:M,args:arguments,thisArg:n}),j.__chain__=K,j}return M.apply(n,Bo([this.value()],arguments))})}),n}function kB(){return wt._===this&&(wt._=Zw),this}function su(){}function BB(n){return n=Se(n),Te(function(l){return p2(l,n)})}var xB=Vc(Qe),TB=Vc(Rp),OB=Vc(uc);function Ah(n){return jc(n)?fc(Un(n)):l_(n)}function NB(n){return function(l){return n==null?r:ar(n,l)}}var AB=P2(),LB=P2(!0);function cu(){return[]}function uu(){return!1}function IB(){return{}}function RB(){return""}function PB(){return!0}function MB(n,l){if(n=Se(n),n<1||n>W)return[];var s=Q,p=kt(n,Q);l=ue(l),n-=Q;for(var w=hc(p,l);++s<n;)l(s);return w}function $B(n){return Ce(n)?Qe(n,Un):on(n)?[n]:Ut(Z2(ze(n)))}function FB(n){var l=++Yw;return ze(n)+l}var VB=oi(function(n,l){return n+l},0),DB=Dc("ceil"),zB=oi(function(n,l){return n/l},1),WB=Dc("floor");function HB(n){return n&&n.length?Xa(n,Gt,kc):r}function UB(n,l){return n&&n.length?Xa(n,ue(l,2),kc):r}function KB(n){return $p(n,Gt)}function jB(n,l){return $p(n,ue(l,2))}function GB(n){return n&&n.length?Xa(n,Gt,Oc):r}function qB(n,l){return n&&n.length?Xa(n,ue(l,2),Oc):r}var YB=oi(function(n,l){return n*l},1),XB=Dc("round"),ZB=oi(function(n,l){return n-l},0);function JB(n){return n&&n.length?pc(n,Gt):0}function QB(n,l){return n&&n.length?pc(n,ue(l,2)):0}return S.after=vE,S.ary=sh,S.assign=sk,S.assignIn=_h,S.assignInWith=gi,S.assignWith=ck,S.at=uk,S.before=ch,S.bind=Jc,S.bindAll=mB,S.bindKey=uh,S.castArray=IE,S.chain=lh,S.chunk=W_,S.compact=H_,S.concat=U_,S.cond=gB,S.conforms=bB,S.constant=lu,S.countBy=JS,S.create=fk,S.curry=fh,S.curryRight=dh,S.debounce=ph,S.defaults=dk,S.defaultsDeep=pk,S.defer=_E,S.delay=SE,S.difference=K_,S.differenceBy=j_,S.differenceWith=G_,S.drop=q_,S.dropRight=Y_,S.dropRightWhile=X_,S.dropWhile=Z_,S.fill=J_,S.filter=eE,S.flatMap=oE,S.flatMapDeep=rE,S.flatMapDepth=lE,S.flatten=th,S.flattenDeep=Q_,S.flattenDepth=eS,S.flip=EE,S.flow=yB,S.flowRight=wB,S.fromPairs=tS,S.functions=wk,S.functionsIn=vk,S.groupBy=aE,S.initial=oS,S.intersection=rS,S.intersectionBy=lS,S.intersectionWith=aS,S.invert=Sk,S.invertBy=Ek,S.invokeMap=sE,S.iteratee=au,S.keyBy=cE,S.keys=pt,S.keysIn=jt,S.map=ui,S.mapKeys=Bk,S.mapValues=xk,S.matches=vB,S.matchesProperty=_B,S.memoize=di,S.merge=Tk,S.mergeWith=Sh,S.method=SB,S.methodOf=EB,S.mixin=iu,S.negate=pi,S.nthArg=BB,S.omit=Ok,S.omitBy=Nk,S.once=kE,S.orderBy=uE,S.over=xB,S.overArgs=BE,S.overEvery=TB,S.overSome=OB,S.partial=Qc,S.partialRight=hh,S.partition=fE,S.pick=Ak,S.pickBy=Eh,S.property=Ah,S.propertyOf=NB,S.pull=uS,S.pullAll=oh,S.pullAllBy=fS,S.pullAllWith=dS,S.pullAt=pS,S.range=AB,S.rangeRight=LB,S.rearg=xE,S.reject=hE,S.remove=hS,S.rest=TE,S.reverse=Xc,S.sampleSize=gE,S.set=Ik,S.setWith=Rk,S.shuffle=bE,S.slice=mS,S.sortBy=wE,S.sortedUniq=_S,S.sortedUniqBy=SS,S.split=oB,S.spread=OE,S.tail=ES,S.take=kS,S.takeRight=BS,S.takeRightWhile=xS,S.takeWhile=TS,S.tap=HS,S.throttle=NE,S.thru=ci,S.toArray=yh,S.toPairs=kh,S.toPairsIn=Bh,S.toPath=$B,S.toPlainObject=vh,S.transform=Pk,S.unary=AE,S.union=OS,S.unionBy=NS,S.unionWith=AS,S.uniq=LS,S.uniqBy=IS,S.uniqWith=RS,S.unset=Mk,S.unzip=Zc,S.unzipWith=rh,S.update=$k,S.updateWith=Fk,S.values=qr,S.valuesIn=Vk,S.without=PS,S.words=Oh,S.wrap=LE,S.xor=MS,S.xorBy=$S,S.xorWith=FS,S.zip=VS,S.zipObject=DS,S.zipObjectDeep=zS,S.zipWith=WS,S.entries=kh,S.entriesIn=Bh,S.extend=_h,S.extendWith=gi,iu(S,S),S.add=VB,S.attempt=Nh,S.camelCase=Hk,S.capitalize=xh,S.ceil=DB,S.clamp=Dk,S.clone=RE,S.cloneDeep=ME,S.cloneDeepWith=$E,S.cloneWith=PE,S.conformsTo=FE,S.deburr=Th,S.defaultTo=CB,S.divide=zB,S.endsWith=Uk,S.eq=Nn,S.escape=Kk,S.escapeRegExp=jk,S.every=QS,S.find=tE,S.findIndex=Q2,S.findKey=hk,S.findLast=nE,S.findLastIndex=eh,S.findLastKey=mk,S.floor=WB,S.forEach=ah,S.forEachRight=ih,S.forIn=gk,S.forInRight=bk,S.forOwn=Ck,S.forOwnRight=yk,S.get=nu,S.gt=VE,S.gte=DE,S.has=_k,S.hasIn=ou,S.head=nh,S.identity=Gt,S.includes=iE,S.indexOf=nS,S.inRange=zk,S.invoke=kk,S.isArguments=cr,S.isArray=Ce,S.isArrayBuffer=zE,S.isArrayLike=Kt,S.isArrayLikeObject=at,S.isBoolean=WE,S.isBuffer=Io,S.isDate=HE,S.isElement=UE,S.isEmpty=KE,S.isEqual=jE,S.isEqualWith=GE,S.isError=eu,S.isFinite=qE,S.isFunction=io,S.isInteger=mh,S.isLength=hi,S.isMap=gh,S.isMatch=YE,S.isMatchWith=XE,S.isNaN=ZE,S.isNative=JE,S.isNil=ek,S.isNull=QE,S.isNumber=bh,S.isObject=tt,S.isObjectLike=rt,S.isPlainObject=Ml,S.isRegExp=tu,S.isSafeInteger=tk,S.isSet=Ch,S.isString=mi,S.isSymbol=on,S.isTypedArray=Gr,S.isUndefined=nk,S.isWeakMap=ok,S.isWeakSet=rk,S.join=iS,S.kebabCase=Gk,S.last=wn,S.lastIndexOf=sS,S.lowerCase=qk,S.lowerFirst=Yk,S.lt=lk,S.lte=ak,S.max=HB,S.maxBy=UB,S.mean=KB,S.meanBy=jB,S.min=GB,S.minBy=qB,S.stubArray=cu,S.stubFalse=uu,S.stubObject=IB,S.stubString=RB,S.stubTrue=PB,S.multiply=YB,S.nth=cS,S.noConflict=kB,S.noop=su,S.now=fi,S.pad=Xk,S.padEnd=Zk,S.padStart=Jk,S.parseInt=Qk,S.random=Wk,S.reduce=dE,S.reduceRight=pE,S.repeat=eB,S.replace=tB,S.result=Lk,S.round=XB,S.runInContext=P,S.sample=mE,S.size=CE,S.snakeCase=nB,S.some=yE,S.sortedIndex=gS,S.sortedIndexBy=bS,S.sortedIndexOf=CS,S.sortedLastIndex=yS,S.sortedLastIndexBy=wS,S.sortedLastIndexOf=vS,S.startCase=rB,S.startsWith=lB,S.subtract=ZB,S.sum=JB,S.sumBy=QB,S.template=aB,S.times=MB,S.toFinite=so,S.toInteger=Se,S.toLength=wh,S.toLower=iB,S.toNumber=vn,S.toSafeInteger=ik,S.toString=ze,S.toUpper=sB,S.trim=cB,S.trimEnd=uB,S.trimStart=fB,S.truncate=dB,S.unescape=pB,S.uniqueId=FB,S.upperCase=hB,S.upperFirst=ru,S.each=ah,S.eachRight=ih,S.first=nh,iu(S,(function(){var n={};return Wn(S,function(l,s){Ue.call(S.prototype,s)||(n[s]=l)}),n})(),{chain:!1}),S.VERSION=a,mn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){S[n].placeholder=S}),mn(["drop","take"],function(n,l){Ie.prototype[n]=function(s){s=s===r?1:ft(Se(s),0);var p=this.__filtered__&&!l?new Ie(this):this.clone();return p.__filtered__?p.__takeCount__=kt(s,p.__takeCount__):p.__views__.push({size:kt(s,Q),type:n+(p.__dir__<0?"Right":"")}),p},Ie.prototype[n+"Right"]=function(s){return this.reverse()[n](s).reverse()}}),mn(["filter","map","takeWhile"],function(n,l){var s=l+1,p=s==re||s==oe;Ie.prototype[n]=function(w){var k=this.clone();return k.__iteratees__.push({iteratee:ue(w,3),type:s}),k.__filtered__=k.__filtered__||p,k}}),mn(["head","last"],function(n,l){var s="take"+(l?"Right":"");Ie.prototype[n]=function(){return this[s](1).value()[0]}}),mn(["initial","tail"],function(n,l){var s="drop"+(l?"":"Right");Ie.prototype[n]=function(){return this.__filtered__?new Ie(this):this[s](1)}}),Ie.prototype.compact=function(){return this.filter(Gt)},Ie.prototype.find=function(n){return this.filter(n).head()},Ie.prototype.findLast=function(n){return this.reverse().find(n)},Ie.prototype.invokeMap=Te(function(n,l){return typeof n=="function"?new Ie(this):this.map(function(s){return Nl(s,n,l)})}),Ie.prototype.reject=function(n){return this.filter(pi(ue(n)))},Ie.prototype.slice=function(n,l){n=Se(n);var s=this;return s.__filtered__&&(n>0||l<0)?new Ie(s):(n<0?s=s.takeRight(-n):n&&(s=s.drop(n)),l!==r&&(l=Se(l),s=l<0?s.dropRight(-l):s.take(l-n)),s)},Ie.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ie.prototype.toArray=function(){return this.take(Q)},Wn(Ie.prototype,function(n,l){var s=/^(?:filter|find|map|reject)|While$/.test(l),p=/^(?:head|last)$/.test(l),w=S[p?"take"+(l=="last"?"Right":""):l],k=p||/^find/.test(l);w&&(S.prototype[l]=function(){var A=this.__wrapped__,I=p?[1]:arguments,M=A instanceof Ie,K=I[0],j=M||Ce(A),Y=function(Ae){var Re=w.apply(S,Bo([Ae],I));return p&&ee?Re[0]:Re};j&&s&&typeof K=="function"&&K.length!=1&&(M=j=!1);var ee=this.__chain__,se=!!this.__actions__.length,fe=k&&!ee,ke=M&&!se;if(!k&&j){A=ke?A:new Ie(this);var de=n.apply(A,I);return de.__actions__.push({func:ci,args:[Y],thisArg:r}),new bn(de,ee)}return fe&&ke?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=Pa[n],s=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",p=/^(?:pop|shift)$/.test(n);S.prototype[n]=function(){var w=arguments;if(p&&!this.__chain__){var k=this.value();return l.apply(Ce(k)?k:[],w)}return this[s](function(A){return l.apply(Ce(A)?A:[],w)})}}),Wn(Ie.prototype,function(n,l){var s=S[l];if(s){var p=s.name+"";Ue.call(Wr,p)||(Wr[p]=[]),Wr[p].push({name:l,func:s})}}),Wr[ni(r,B).name]=[{name:"wrapper",func:r}],Ie.prototype.clone=pv,Ie.prototype.reverse=hv,Ie.prototype.value=mv,S.prototype.at=US,S.prototype.chain=KS,S.prototype.commit=jS,S.prototype.next=GS,S.prototype.plant=YS,S.prototype.reverse=XS,S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=ZS,S.prototype.first=S.prototype.head,Sl&&(S.prototype[Sl]=qS),S}),Vr=jw();tr?((tr.exports=Vr)._=Vr,ac._=Vr):wt._=Vr}).call(m9)})(Cl,Cl.exports)),Cl.exports}var b9=g9();const xa=_7(b9),X0=t.defineComponent({__name:"transferItem",props:{dialogModalVisible:{type:Boolean},columnsValue:{},columnsIndex:{},columnsLen:{}},emits:["update:toUnLock","update:toLock","update:toTop","update:toPre","update:toNext","update:toBottom"],setup(e,{emit:o}){const r=e,a=t.reactive({itemOnHover:!1,itemOnClick:!1}),i=o,u=()=>{a.itemOnClick=!0,a.itemOnHover=!1},c=()=>{a.itemOnClick=!1,a.itemOnHover=!0};t.watch(()=>r.dialogModalVisible,g=>{g||(a.itemOnClick=!1,a.itemOnHover=!1)});const f=t.computed(()=>!!r.columnsValue.fixed),h=t.computed(()=>[{icon:p3,emitKey:"update:toUnLock",isDisabled:!f.value},{icon:r3,emitKey:"update:toLock",isDisabled:f.value},{icon:f3,emitKey:"update:toTop",isDisabled:r.columnsIndex===0},{icon:Xf,emitKey:"update:toPre",isDisabled:r.columnsIndex===0},{icon:zi,emitKey:"update:toNext",isDisabled:r.columnsIndex===r.columnsLen-1},{icon:K5,emitKey:"update:toBottom",isDisabled:r.columnsIndex===r.columnsLen-1}]),d=24/h.value.length,m=g=>{i(g)};return(g,y)=>{const b=vo,C=K7,v=yC;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["transfer-item-wrapper",{"cursor-grab":a.itemOnHover,"cursor-grabbing":a.itemOnClick}]),onMouseenter:y[0]||(y[0]=E=>a.itemOnHover=!0),onMouseleave:y[1]||(y[1]=E=>a.itemOnHover=!1),onMousedown:u,onMouseup:c},[(t.openBlock(),t.createBlock(b,{label:g.columnsValue.label,value:g.columnsValue.prop,key:g.columnsValue.prop},null,8,["label","value"])),t.createVNode(v,{class:"transfer-arrow-wrapper",justify:"space-around",gutter:8},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,E=>(t.openBlock(),t.createBlock(C,{span:d},{default:t.withCtx(()=>[t.createVNode(t.unref(Nt),{icon:E.icon,disabled:E.isDisabled,link:"",type:"primary",onClick:B=>m(E.emitKey)},null,8,["icon","disabled","onClick"])]),_:2},1024))),256))]),_:1})],34)}}}),C9={class:"search-bar"},y9={class:"transfer-sort-wrapper"},w9=t.defineComponent({__name:"TransferDialog",props:{modelValue:{type:Boolean},columnsValue:{},transferTitle:{}},emits:["update:modelValue","update:submit","update:checkChange"],setup(e,{emit:o}){const{t:r}=Kn.useI18n(),a=e,i=o,u=t.computed({get:()=>a.modelValue,set:E=>i("update:modelValue",E)}),c=t.reactive({localColumns:xa.cloneDeep(a.columnsValue),clickItemProp:"",checkList:a.columnsValue.map(E=>E.prop)}),f={toTop:E=>{if(E<=0)return;const B=c.localColumns.splice(E,1)[0];c.localColumns.unshift(B)},toBottom:E=>{if(E>=c.localColumns.length-1)return;const B=c.localColumns.splice(E,1)[0];c.localColumns.push(B)},toPre:E=>{if(E>0){const B=c.localColumns[E];c.localColumns[E]=c.localColumns[E-1],c.localColumns[E-1]=B}},toNext:E=>{if(E<c.localColumns.length-1){const B=c.localColumns[E];c.localColumns[E]=c.localColumns[E+1],c.localColumns[E+1]=B}},toLock:E=>{if(E<=0)return;const B=c.localColumns.splice(E,1)[0];B.fixed="left",c.localColumns.unshift(B)},toUnLock:E=>{if(E<c.localColumns.length-1){const B=c.localColumns[E];delete B.fixed}}},h=()=>{c.localColumns=xa.cloneDeep(a.columnsValue),c.checkList=a.columnsValue.filter(E=>E.checkActive).map(E=>E.prop||"")};t.watch(()=>u.value,E=>{E?h():(c.clickItemProp="",c.localColumns=[],c.checkList=[])});const d=()=>{i("update:submit",c.localColumns)},m=E=>{const B=a.columnsValue.map(O=>O.prop);c.checkList=E?B:[],g(c.checkList)},g=E=>{const B=E.map(O=>String(O));c.localColumns.forEach(O=>{O.checkActive=B.includes(O.prop)}),i("update:checkChange",{columns:c.localColumns,checkList:c.checkList})},y=t.computed(()=>c.localColumns.length>0&&c.checkList.length===c.localColumns.length),b=t.computed({get:()=>y.value,set:E=>m(E)}),C=()=>{c.localColumns=xa.cloneDeep(a.columnsValue)},v=E=>{if(E.length>0){const B=xa.cloneDeep(c.localColumns);c.localColumns=B.filter(O=>O.label.includes(E))}else C()};return(E,B)=>{const O=vo,T=M7;return t.openBlock(),t.createBlock(Xo,{modelValue:u.value,"onUpdate:modelValue":B[2]||(B[2]=_=>u.value=_),title:E.transferTitle,"onClick:submit":d},{default:t.withCtx(()=>[t.createElementVNode("div",C9,[t.createVNode(Zo,{"show-search":!0,"onUpdate:clear":C,"onKeydown:enter":v})]),t.createElementVNode("div",y9,[t.createVNode(O,{modelValue:b.value,"onUpdate:modelValue":B[0]||(B[0]=_=>b.value=_),class:"px-4",onChange:m},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("common.column"))+" ("+t.toDisplayString(c.checkList.length)+"/"+t.toDisplayString(c.localColumns.length)+") ",1)]),_:1},8,["modelValue"]),t.createVNode(T,{modelValue:c.checkList,"onUpdate:modelValue":B[1]||(B[1]=_=>c.checkList=_),onChange:g},{default:t.withCtx(()=>[t.renderSlot(E.$slots,"list-container",{columns:c.localColumns,clickItemProp:c.clickItemProp,handleItemEvents:f,handleMousedown:_=>c.clickItemProp=_},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.localColumns,(_,x)=>(t.openBlock(),t.createBlock(X0,{key:_.prop,"dialog-modal-visible":u.value,"columns-value":_,"columns-index":x,"columns-len":c.localColumns.length,class:t.normalizeClass({"transfer-active-bg":_.checkActive,"transfer-active-border":c.clickItemProp==_.prop}),onMousedown:N=>c.clickItemProp=_.prop||"","onUpdate:toTop":N=>f.toTop(x),"onUpdate:toBottom":N=>f.toBottom(x),"onUpdate:toPre":N=>f.toPre(x),"onUpdate:toNext":N=>f.toNext(x),"onUpdate:toLock":N=>f.toLock(x),"onUpdate:toUnLock":N=>f.toUnLock(x)},null,8,["dialog-modal-visible","columns-value","columns-index","columns-len","class","onMousedown","onUpdate:toTop","onUpdate:toBottom","onUpdate:toPre","onUpdate:toNext","onUpdate:toLock","onUpdate:toUnLock"]))),128))])]),_:3},8,["modelValue"])])]),_:3},8,["modelValue","title"])}}}),v9={class:"h-header px-4 py-4 flex justify-between items-center bg-primary-10"},_9={class:"flex items-center gap-2"},S9={key:0,class:"flex items-center text-black"},E9={class:"font-bold text-text text-xl md:text-2xl;"},k9={class:"flex items-center gap-3"},Z0=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:o}){const r=e,a=o,i=()=>{const u={};switch(typeof r.showBack){case"string":u.path=r.showBack;break;case"object":Object.assign(u,r.showBack);break;default:u.path=""}a("back",u)};return(u,c)=>{const f=st;return t.openBlock(),t.createElementBlock("div",v9,[t.createElementVNode("div",_9,[e.showBack?(t.openBlock(),t.createElementBlock("div",S9,[t.createVNode(f,{size:16,class:"cursor-pointer",onClick:i},{default:t.withCtx(()=>[t.createVNode(t.unref(V5))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",E9,t.toDisplayString(r.title),1)]),t.createElementVNode("div",k9,[t.renderSlot(u.$slots,"default")])])}}}),B9={key:0,class:"px-4 pt-1.5"},x9={key:1,class:"py-1.5 px-4"},T9={key:0,class:"flex justify-start pl-1.5 pt-0"},Ta=Or(t.defineComponent({__name:"MainPanel",props:{title:{default:""},showBack:{type:[Boolean,String,Object],default:!1},depth:{default:1}},emits:["click:back"],setup(e,{emit:o}){const r=e,a=o,i=()=>{a("click:back")};return(u,c)=>{const f=aa;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(Z0),{title:r.title,showBack:r.showBack,onBack:i,depth:r.depth},null,8,["title","showBack","depth"]),t.createVNode(f,{class:"panel-scrollbar"},{default:t.withCtx(()=>[u.$slots.searchBar?(t.openBlock(),t.createElementBlock("div",B9,[t.renderSlot(u.$slots,"searchBar",{},void 0,!0)])):t.createCommentVNode("",!0),u.$slots.main?(t.openBlock(),t.createElementBlock("div",x9,[t.renderSlot(u.$slots,"main",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3}),u.$slots.footer?(t.openBlock(),t.createElementBlock("div",T9,[t.renderSlot(u.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-a95f0b83"]]),J0={"common.select":"請選擇","common.confirm":"確定","common.cancel":"取消","dialog.confirmRemoveUser":"請問是否確認移除該使用者","common.warning":"警告","search.placeholder":"請輸入關鍵字搜尋列表","common.execute":"執行","common.reset":"重設","common.loading":"數據加載中","common.view":"查看","common.edit":"編輯","common.column":"欄","common.close":"關閉","demo.componentDemo":"組件示範","button.title":"按鈕","button.primary ":"主要","button.default":"默認","button.danger":"危險","button.success":"成功","button.warning":"警告","button.info":"信息","button.style":"樣式","button.size":"尺寸","button.small":"小","button.medium":"中","button.large ":"大","status.title":"狀態","status.normal ":"正常","status.loading":"載入中","status.disabled":"禁用","button.withIcon ":"帶圖標的","button.add":"添加","button.delete":"刪除","common.save":"儲存","common.discard":"捨棄"},Q0={"common.select":"Please select","common.confirm":"Confirm","common.cancel":"Cancel","dialog.confirmRemoveUser":"Are you sure you want to remove this user?","common.warning":"Warning","search.placeholder":"Please enter keywords to search the list","common.execute":"Execute","common.reset":"Reset","common.loading":"Data loading","common.view":"View","common.edit":"Edit","common.column":"Column","common.close":"Close","demo.componentDemo":"Component Demo","button.title":"Button","button.primary ":"Primary","button.default":"Default","button.danger":"Danger","button.success":"Success","button.warning":"Warning","button.info":"Info","button.style":"Style","button.size":"Size","button.small":"Small","button.medium":"Medium","button.large ":"Large","status.title":"Status","status.normal ":"Normal","status.loading":"Loading","status.disabled":"Disabled","button.withIcon ":"With Icon","button.add":"Add","button.delete":"Delete","common.save":"Save","common.discard":"Discard"},ep={"zh-TW":J0,"en-US":Q0};var O9={name:"zh-tw",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"確認",clear:"清空",defaultLabel:"色彩選擇器",description:"目前色彩為 {color}。按一下 Enter 以選擇新色彩。",alphaLabel:"選擇透明度的值"},datepicker:{now:"現在",today:"今天",cancel:"取消",clear:"清空",confirm:"確認",dateTablePrompt:"使用方向鍵與 Enter 鍵以選擇日期",monthTablePrompt:"使用方向鍵與 Enter 鍵以選擇月份",yearTablePrompt:"使用方向鍵與 Enter 鍵以選擇年份",selectedDate:"已選日期",selectDate:"選擇日期",selectTime:"選擇時間",startDate:"開始日期",startTime:"開始時間",endDate:"結束日期",endTime:"結束時間",prevYear:"前一年",nextYear:"後一年",prevMonth:"上個月",nextMonth:"下個月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"減少數值",increase:"增加數值"},select:{loading:"載入中",noMatch:"無相符資料",noData:"無資料",placeholder:"請選擇"},mention:{loading:"載入中"},dropdown:{toggleDropdown:"切換下拉選單"},cascader:{noMatch:"無相符資料",loading:"載入中",placeholder:"請選擇",noData:"無資料"},pagination:{goto:"前往",pagesize:"項/頁",total:"共 {total} 項",pageClassifier:"頁",page:"頁",prev:"上一頁",next:"下一頁",currentPage:"第 {pager} 頁",prevPages:"向前 {pager} 頁",nextPages:"向後 {pager} 頁",deprecationWarning:"偵測到已過時的使用方式,請參閱 el-pagination 說明文件以了解更多資訊"},dialog:{close:"關閉此對話框"},drawer:{close:"關閉此對話框"},messagebox:{title:"提示",confirm:"確定",cancel:"取消",error:"輸入的資料不符合規定!",close:"關閉此對話框"},upload:{deleteTip:"按 Delete 鍵以刪除",delete:"刪除",preview:"查看圖片",continue:"繼續上傳"},slider:{defaultLabel:"滑桿介於 {min} 至 {max}",defaultRangeStartLabel:"選擇起始值",defaultRangeEndLabel:"選擇結束值"},table:{emptyText:"暫無資料",confirmFilter:"篩選",resetFilter:"重置",clearFilter:"全部",sumText:"合計"},tour:{next:"下一步",previous:"上一步",finish:"結束導覽"},tree:{emptyText:"暫無資料"},transfer:{noMatch:"無相符資料",noData:"無資料",titles:["列表 1","列表 2"],filterPlaceholder:"請輸入搜尋內容",noCheckedFormat:"共 {total} 項",hasCheckedFormat:"已選 {checked}/{total} 項"},image:{error:"載入失敗"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"確認",cancelButtonText:"取消"},carousel:{leftArrow:"上一張投影片",rightArrow:"下一張投影片",indicator:"投影片切換至索引 {index}"}}};let Ws=null;const tp="zh-TW";function np(){return Ws||(Ws=Kn.createI18n({legacy:!1,locale:tp,fallbackLocale:tp,messages:ep,silentTranslationWarn:!0,missingWarn:!1,fallbackWarn:!1})),Ws}function op(e){const r=np().global;r.locale.value=e}function rp(){console.log("🔍 [useI18n] 開始執行");const o=np().global;return console.log("🔍 [useI18n] 返回內部 i18n,locale:",o.locale.value),o}function lp(){console.log("🔍 [useComponentElementLocale] 開始執行");const e=t.getCurrentInstance();let o;try{console.log("🔍 [useComponentElementLocale] 嘗試獲取外部 i18n");const i=e==null?void 0:e.appContext.config.globalProperties,u=i==null?void 0:i.$i18n;u&&"global"in u?(o=u.global.locale,console.log("🔍 [useComponentElementLocale] 成功獲取外部 locale:",o.value)):console.log("🔍 [useComponentElementLocale] 外部 i18n 不存在,使用內部 i18n")}catch(i){console.log("❌ [useComponentElementLocale] 獲取外部 i18n 失敗:",i)}const{locale:r}=rp();console.log("🔍 [useComponentElementLocale] 內部 locale:",r.value);const a=o||r;return console.log("🔍 [useComponentElementLocale] 最終使用 locale:",a.value),t.computed(()=>{console.log("🔍 [useComponentElementLocale] computed 重新計算,locale.value:",a.value);const i=a.value==="zh-TW"?O9:$f;return console.log("🔍 [useComponentElementLocale] 返回結果:",i.name),i})}const N9=t.defineComponent({__name:"SearchableListPanel",props:{title:{},pagination:{},showBack:{type:[Boolean,String,Object]},showSearch:{type:Boolean},pageSizeList:{default:()=>[10,25,50,100,200]},showPagination:{type:Boolean},locale:{}},emits:["search","updatePage","updatePageSize","click:back"],setup(e,{emit:o}){const r=e,{pagination:a}=t.toRefs(r),i=o,u=b=>{i("search",b)},c=()=>{i("search",null)},f=b=>{i("updatePage",b)},h=b=>{i("updatePageSize",b)},d=()=>{i("click:back")},m=t.computed(()=>r.showPagination?r.showPagination:r.pagination.totalCount>0),g=lp();t.watch(g,(b,C)=>{console.log("🔄 [SearchableListPanel] fallbackLocale 變化:",{old:C==null?void 0:C.name,new:b==null?void 0:b.name})},{immediate:!0});const y=t.computed(()=>(console.log("🔍 [SearchableListPanel] elementLocale computed 執行"),r.locale&&typeof r.locale=="object"&&"name"in r.locale?(console.log("🔍 [SearchableListPanel] 使用 props.locale:",r.locale.name),r.locale):(console.log("🔍 [SearchableListPanel] 使用 fallbackLocale:",g.value.name),g.value)));return(b,C)=>{const v=hC,E=Y7;return t.openBlock(),t.createBlock(t.unref(Ta),{title:r.title,"show-back":b.showBack,"onClick:back":d},{searchBar:t.withCtx(()=>[t.createVNode(t.unref(Zo),{"show-search":b.showSearch,"onKeydown:enter":u,"onUpdate:clear":c},{button:t.withCtx(()=>[t.renderSlot(b.$slots,"firstButton"),t.renderSlot(b.$slots,"customButton"),t.renderSlot(b.$slots,"lastButton")]),customerFilter:t.withCtx(()=>[t.renderSlot(b.$slots,"filterButton")]),_:3},8,["show-search"])]),main:t.withCtx(()=>[t.renderSlot(b.$slots,"main")]),footer:t.withCtx(()=>[t.createVNode(E,{locale:y.value},{default:t.withCtx(()=>[m.value?(t.openBlock(),t.createBlock(v,{key:0,layout:"jumper, prev, pager, next, total, sizes","page-sizes":b.pageSizeList,"current-page":t.unref(a).page,"page-size":t.unref(a).limit,total:t.unref(a).totalCount,onCurrentChange:f,onSizeChange:h},null,8,["page-sizes","current-page","page-size","total"])):t.createCommentVNode("",!0)]),_:1},8,["locale"])]),_:3},8,["title","show-back"])}}}),A9={class:"detail-container"},L9={class:"content-wrapper"},I9={key:0,class:"border-t py-4 w-full flex items-center justify-end"},R9=Or(t.defineComponent({__name:"DetailLayout",props:{title:{},showBack:{type:[Boolean,String,Object]},isEditable:{type:Boolean},pageLoading:{type:Boolean}},emits:["update:saveEdit","update:cancelEdit","click:back"],setup(e,{emit:o}){const{t:r}=Kn.useI18n(),a=o,i=()=>{a("update:saveEdit",!1)},u=()=>{a("update:cancelEdit")},c=()=>{a("click:back")};return(f,h)=>{const d=qo;return t.openBlock(),t.createBlock(t.unref(Ta),{title:f.title,"show-back":f.showBack,"onClick:back":c},{main:t.withCtx(()=>[t.withDirectives((t.openBlock(),t.createElementBlock("div",A9,[t.renderSlot(f.$slots,"detailHeader",{},void 0,!0),t.createElementVNode("div",L9,[t.renderSlot(f.$slots,"main",{},void 0,!0)])])),[[d,f.pageLoading]])]),footer:t.withCtx(()=>[f.isEditable?(t.openBlock(),t.createElementBlock("div",I9,[t.createVNode(t.unref(Nt),{text:t.unref(r)("common.save"),type:"primary","is-fill":"",onClick:i},null,8,["text"]),t.createVNode(t.unref(Nt),{text:t.unref(r)("common.discard"),type:"primary",onClick:u},null,8,["text"])])):t.createCommentVNode("",!0)]),_:3},8,["title","show-back"])}}}),[["__scopeId","data-v-3b4bc285"]]),P9={class:"filter-container"},M9={class:"filter-header"},$9={class:"submit-row"},F9=Or(t.defineComponent({__name:"FilterLayout",props:{mainTitle:{},showBack:{type:[Boolean,String,Object]},filterTitle:{}},emits:["submitEmit","resetEmit","click:back"],setup(e,{emit:o}){const{t:r}=Kn.useI18n(),a=o,i=()=>{a("submitEmit")},u=()=>{a("resetEmit")},c=()=>{a("click:back")};return(f,h)=>(t.openBlock(),t.createBlock(t.unref(Ta),{title:f.mainTitle,"show-back":f.showBack,"onClick:back":c},{main:t.withCtx(()=>[t.createElementVNode("div",P9,[t.createElementVNode("div",M9,t.toDisplayString(f.filterTitle),1),t.renderSlot(f.$slots,"default",{},void 0,!0)])]),footer:t.withCtx(()=>[t.createElementVNode("div",$9,[t.createVNode(t.unref(Nt),{text:t.unref(r)("common.execute"),"is-fill":"",type:"primary",onClick:i},null,8,["text"]),t.createVNode(t.unref(Nt),{text:t.unref(r)("common.reset"),type:"primary",onClick:u},null,8,["text"])])]),_:3},8,["title","show-back"]))}}),[["__scopeId","data-v-32b37758"]]),V9={class:"w-full mb-4"},D9={class:"flex items-center h-12 bg-gray-200 px-1.5 rounded-t justify-end"},z9={class:"flex items-center mr-4"},W9={key:0,src:n9,alt:"Excel",class:"w-6 h-6"},H9={key:1,src:o9,alt:"Excel-active",class:"w-6 h-6"},yl=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},showCheckBtn:{type:Boolean},showEditBtn:{type:Boolean}},emits:["open:transfer","click:downloadExcelFile","update:selectRow","click:cell","click:columnSort","click:checkRow","click:editRow"],setup(e,{emit:o}){const r=o,a=()=>{r("open:transfer")},i=g=>{r("update:selectRow",g)},u=(g,y)=>{r("click:cell",g,y)},c=g=>{r("click:columnSort",g)},f=g=>{r("click:checkRow",g)},h=g=>{r("click:editRow",g)},d=()=>{r("click:downloadExcelFile")},m=t.reactive({itemOnHover:!1});return(g,y)=>{const b=st,C=qo;return t.openBlock(),t.createElementBlock("div",V9,[t.createElementVNode("div",D9,[t.createElementVNode("div",z9,[t.createElementVNode("div",{class:"cursor-pointer text-text text-xl flex items-center justify-center hover:text-blue-600",onClick:a},[t.createVNode(b,null,{default:t.withCtx(()=>[t.createVNode(t.unref(c3))]),_:1})]),t.createElementVNode("div",{class:"cursor-pointer flex items-center justify-center ml-1",onMouseenter:y[0]||(y[0]=v=>m.itemOnHover=!0),onMouseleave:y[1]||(y[1]=v=>m.itemOnHover=!1),onClick:d},[m.itemOnHover?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("img",W9)),m.itemOnHover?(t.openBlock(),t.createElementBlock("img",H9)):t.createCommentVNode("",!0)],32)])]),t.withDirectives(t.createVNode(t.unref(Yo),{data:g.data,columns:g.columns,"show-summary":g.showSummary,"show-over-flow-tooltip":g.showOverFlowTooltip,"summary-method":g.summaryMethod,"show-selection":g.showSelection,"base-table-row-class-name":g.sortTableRowClassName,"show-check-btn":g.showCheckBtn,"show-edit-btn":g.showEditBtn,onSelectionChange:i,onCellClick:u,onColumnSortChange:c,"onClick:checkRow":f,"onClick:editRow":h},null,8,["data","columns","show-summary","show-over-flow-tooltip","summary-method","show-selection","base-table-row-class-name","show-check-btn","show-edit-btn"]),[[C,g.loading]])])}}});function U9(e){return e.map(o=>({...o,checkActive:!0}))}const ap=[Yo,Nt,Nr,Xo,yl,bl,Zo];function ip(e,o){o!=null&&o.locale&&op(o.locale),ap.forEach(r=>{e.component(r.name||"VueTableComponent",r)})}const K9={install:ip,...ap};Yo.install=e=>{e.component(Yo.name||"BaseTable",Yo)},Nt.install=e=>{e.component(Nt.name||"BaseBtn",Nt)},Nr.install=e=>{e.component(Nr.name||"BaseInput",Nr)},Xo.install=e=>{e.component(Xo.name||"BaseDialog",Xo)},yl.install=e=>{e.component(yl.name||"SortTable",yl)},bl.install=e=>{e.component(bl.name||"TitleTable",bl)},Zo.install=e=>{e.component(Zo.name||"SearchBar",Zo)},me.BaseBtn=Nt,me.BaseDialog=Xo,me.BaseInput=Nr,me.BaseMultipleInput=a9,me.BaseTable=Yo,me.BaseWaringDialog=l9,me.DetailLayout=R9,me.FilterLayout=F9,me.FunctionHeader=Z0,me.MainPanel=Ta,me.SearchBar=Zo,me.SearchableListPanel=N9,me.SortTable=yl,me.TitleTable=bl,me.TransferDialog=w9,me.TransferItem=X0,me.default=K9,me.enUS=Q0,me.install=ip,me.messages=ep,me.setActiveColumn=U9,me.setLocale=op,me.useComponentElementLocale=lp,me.useI18n=rp,me.zhTW=J0,Object.defineProperties(me,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
44
|
+
}`;var ke=Nh(function(){return De(k,se+"return "+Y).apply(r,A)});if(ke.source=Y,eu(ke))throw ke;return ke}function iB(n){return ze(n).toLowerCase()}function sB(n){return ze(n).toUpperCase()}function cB(n,l,s){if(n=ze(n),n&&(s||l===r))return Vp(n);if(!n||!(l=nn(l)))return n;var p=Tn(n),w=Tn(l),k=Dp(p,w),A=zp(p,w)+1;return Lo(p,k,A).join("")}function uB(n,l,s){if(n=ze(n),n&&(s||l===r))return n.slice(0,Hp(n)+1);if(!n||!(l=nn(l)))return n;var p=Tn(n),w=zp(p,Tn(l))+1;return Lo(p,0,w).join("")}function fB(n,l,s){if(n=ze(n),n&&(s||l===r))return n.replace(Lr,"");if(!n||!(l=nn(l)))return n;var p=Tn(n),w=Dp(p,Tn(l));return Lo(p,w).join("")}function dB(n,l){var s=U,p=z;if(tt(l)){var w="separator"in l?l.separator:w;s="length"in l?Se(l.length):s,p="omission"in l?nn(l.omission):p}n=ze(n);var k=n.length;if($r(n)){var A=Tn(n);k=A.length}if(s>=k)return n;var I=s-Fr(p);if(I<1)return p;var M=A?Lo(A,0,I).join(""):n.slice(0,I);if(w===r)return M+p;if(A&&(I+=M.length-I),tu(w)){if(n.slice(I).search(w)){var K,j=M;for(w.global||(w=bc(w.source,ze(ot.exec(w))+"g")),w.lastIndex=0;K=w.exec(j);)var Y=K.index;M=M.slice(0,Y===r?I:Y)}}else if(n.indexOf(nn(w),I)!=I){var ee=M.lastIndexOf(w);ee>-1&&(M=M.slice(0,ee))}return M+p}function pB(n){return n=ze(n),n&&Hs.test(n)?n.replace(eo,Ww):n}var hB=Kr(function(n,l,s){return n+(s?" ":"")+l.toUpperCase()}),ru=A2("toUpperCase");function Oh(n,l,s){return n=ze(n),l=s?r:l,l===r?$w(n)?Kw(n):Tw(n):n.match(l)||[]}var Nh=Te(function(n,l){try{return en(n,r,l)}catch(s){return eu(s)?s:new ge(s)}}),mB=lo(function(n,l){return mn(l,function(s){s=Un(s),oo(n,s,Jc(n[s],n))}),n});function gB(n){var l=n==null?0:n.length,s=ue();return n=l?Qe(n,function(p){if(typeof p[1]!="function")throw new gn(c);return[s(p[0]),p[1]]}):[],Te(function(p){for(var w=-1;++w<l;){var k=n[w];if(en(k[0],this,p))return en(k[1],this,p)}})}function bB(n){return Wv(Cn(n,g))}function lu(n){return function(){return n}}function CB(n,l){return n==null||n!==n?l:n}var yB=I2(),wB=I2(!0);function Gt(n){return n}function au(n){return c2(typeof n=="function"?n:Cn(n,g))}function vB(n){return f2(Cn(n,g))}function _B(n,l){return d2(n,Cn(l,g))}var SB=Te(function(n,l){return function(s){return Nl(s,n,l)}}),EB=Te(function(n,l){return function(s){return Nl(n,s,l)}});function iu(n,l,s){var p=pt(l),w=Za(l,p);s==null&&!(tt(l)&&(w.length||!p.length))&&(s=l,l=n,n=this,w=Za(l,pt(l)));var k=!(tt(s)&&"chain"in s)||!!s.chain,A=io(n);return mn(w,function(I){var M=l[I];n[I]=M,A&&(n.prototype[I]=function(){var K=this.__chain__;if(k||K){var j=n(this.__wrapped__),Y=j.__actions__=Ut(this.__actions__);return Y.push({func:M,args:arguments,thisArg:n}),j.__chain__=K,j}return M.apply(n,Bo([this.value()],arguments))})}),n}function kB(){return wt._===this&&(wt._=Zw),this}function su(){}function BB(n){return n=Se(n),Te(function(l){return p2(l,n)})}var xB=Vc(Qe),TB=Vc(Rp),OB=Vc(uc);function Ah(n){return jc(n)?fc(Un(n)):l_(n)}function NB(n){return function(l){return n==null?r:ar(n,l)}}var AB=P2(),LB=P2(!0);function cu(){return[]}function uu(){return!1}function IB(){return{}}function RB(){return""}function PB(){return!0}function MB(n,l){if(n=Se(n),n<1||n>W)return[];var s=Q,p=kt(n,Q);l=ue(l),n-=Q;for(var w=hc(p,l);++s<n;)l(s);return w}function $B(n){return Ce(n)?Qe(n,Un):on(n)?[n]:Ut(Z2(ze(n)))}function FB(n){var l=++Yw;return ze(n)+l}var VB=oi(function(n,l){return n+l},0),DB=Dc("ceil"),zB=oi(function(n,l){return n/l},1),WB=Dc("floor");function HB(n){return n&&n.length?Xa(n,Gt,kc):r}function UB(n,l){return n&&n.length?Xa(n,ue(l,2),kc):r}function KB(n){return $p(n,Gt)}function jB(n,l){return $p(n,ue(l,2))}function GB(n){return n&&n.length?Xa(n,Gt,Oc):r}function qB(n,l){return n&&n.length?Xa(n,ue(l,2),Oc):r}var YB=oi(function(n,l){return n*l},1),XB=Dc("round"),ZB=oi(function(n,l){return n-l},0);function JB(n){return n&&n.length?pc(n,Gt):0}function QB(n,l){return n&&n.length?pc(n,ue(l,2)):0}return S.after=vE,S.ary=sh,S.assign=sk,S.assignIn=_h,S.assignInWith=gi,S.assignWith=ck,S.at=uk,S.before=ch,S.bind=Jc,S.bindAll=mB,S.bindKey=uh,S.castArray=IE,S.chain=lh,S.chunk=W_,S.compact=H_,S.concat=U_,S.cond=gB,S.conforms=bB,S.constant=lu,S.countBy=JS,S.create=fk,S.curry=fh,S.curryRight=dh,S.debounce=ph,S.defaults=dk,S.defaultsDeep=pk,S.defer=_E,S.delay=SE,S.difference=K_,S.differenceBy=j_,S.differenceWith=G_,S.drop=q_,S.dropRight=Y_,S.dropRightWhile=X_,S.dropWhile=Z_,S.fill=J_,S.filter=eE,S.flatMap=oE,S.flatMapDeep=rE,S.flatMapDepth=lE,S.flatten=th,S.flattenDeep=Q_,S.flattenDepth=eS,S.flip=EE,S.flow=yB,S.flowRight=wB,S.fromPairs=tS,S.functions=wk,S.functionsIn=vk,S.groupBy=aE,S.initial=oS,S.intersection=rS,S.intersectionBy=lS,S.intersectionWith=aS,S.invert=Sk,S.invertBy=Ek,S.invokeMap=sE,S.iteratee=au,S.keyBy=cE,S.keys=pt,S.keysIn=jt,S.map=ui,S.mapKeys=Bk,S.mapValues=xk,S.matches=vB,S.matchesProperty=_B,S.memoize=di,S.merge=Tk,S.mergeWith=Sh,S.method=SB,S.methodOf=EB,S.mixin=iu,S.negate=pi,S.nthArg=BB,S.omit=Ok,S.omitBy=Nk,S.once=kE,S.orderBy=uE,S.over=xB,S.overArgs=BE,S.overEvery=TB,S.overSome=OB,S.partial=Qc,S.partialRight=hh,S.partition=fE,S.pick=Ak,S.pickBy=Eh,S.property=Ah,S.propertyOf=NB,S.pull=uS,S.pullAll=oh,S.pullAllBy=fS,S.pullAllWith=dS,S.pullAt=pS,S.range=AB,S.rangeRight=LB,S.rearg=xE,S.reject=hE,S.remove=hS,S.rest=TE,S.reverse=Xc,S.sampleSize=gE,S.set=Ik,S.setWith=Rk,S.shuffle=bE,S.slice=mS,S.sortBy=wE,S.sortedUniq=_S,S.sortedUniqBy=SS,S.split=oB,S.spread=OE,S.tail=ES,S.take=kS,S.takeRight=BS,S.takeRightWhile=xS,S.takeWhile=TS,S.tap=HS,S.throttle=NE,S.thru=ci,S.toArray=yh,S.toPairs=kh,S.toPairsIn=Bh,S.toPath=$B,S.toPlainObject=vh,S.transform=Pk,S.unary=AE,S.union=OS,S.unionBy=NS,S.unionWith=AS,S.uniq=LS,S.uniqBy=IS,S.uniqWith=RS,S.unset=Mk,S.unzip=Zc,S.unzipWith=rh,S.update=$k,S.updateWith=Fk,S.values=qr,S.valuesIn=Vk,S.without=PS,S.words=Oh,S.wrap=LE,S.xor=MS,S.xorBy=$S,S.xorWith=FS,S.zip=VS,S.zipObject=DS,S.zipObjectDeep=zS,S.zipWith=WS,S.entries=kh,S.entriesIn=Bh,S.extend=_h,S.extendWith=gi,iu(S,S),S.add=VB,S.attempt=Nh,S.camelCase=Hk,S.capitalize=xh,S.ceil=DB,S.clamp=Dk,S.clone=RE,S.cloneDeep=ME,S.cloneDeepWith=$E,S.cloneWith=PE,S.conformsTo=FE,S.deburr=Th,S.defaultTo=CB,S.divide=zB,S.endsWith=Uk,S.eq=Nn,S.escape=Kk,S.escapeRegExp=jk,S.every=QS,S.find=tE,S.findIndex=Q2,S.findKey=hk,S.findLast=nE,S.findLastIndex=eh,S.findLastKey=mk,S.floor=WB,S.forEach=ah,S.forEachRight=ih,S.forIn=gk,S.forInRight=bk,S.forOwn=Ck,S.forOwnRight=yk,S.get=nu,S.gt=VE,S.gte=DE,S.has=_k,S.hasIn=ou,S.head=nh,S.identity=Gt,S.includes=iE,S.indexOf=nS,S.inRange=zk,S.invoke=kk,S.isArguments=cr,S.isArray=Ce,S.isArrayBuffer=zE,S.isArrayLike=Kt,S.isArrayLikeObject=at,S.isBoolean=WE,S.isBuffer=Io,S.isDate=HE,S.isElement=UE,S.isEmpty=KE,S.isEqual=jE,S.isEqualWith=GE,S.isError=eu,S.isFinite=qE,S.isFunction=io,S.isInteger=mh,S.isLength=hi,S.isMap=gh,S.isMatch=YE,S.isMatchWith=XE,S.isNaN=ZE,S.isNative=JE,S.isNil=ek,S.isNull=QE,S.isNumber=bh,S.isObject=tt,S.isObjectLike=rt,S.isPlainObject=Ml,S.isRegExp=tu,S.isSafeInteger=tk,S.isSet=Ch,S.isString=mi,S.isSymbol=on,S.isTypedArray=Gr,S.isUndefined=nk,S.isWeakMap=ok,S.isWeakSet=rk,S.join=iS,S.kebabCase=Gk,S.last=wn,S.lastIndexOf=sS,S.lowerCase=qk,S.lowerFirst=Yk,S.lt=lk,S.lte=ak,S.max=HB,S.maxBy=UB,S.mean=KB,S.meanBy=jB,S.min=GB,S.minBy=qB,S.stubArray=cu,S.stubFalse=uu,S.stubObject=IB,S.stubString=RB,S.stubTrue=PB,S.multiply=YB,S.nth=cS,S.noConflict=kB,S.noop=su,S.now=fi,S.pad=Xk,S.padEnd=Zk,S.padStart=Jk,S.parseInt=Qk,S.random=Wk,S.reduce=dE,S.reduceRight=pE,S.repeat=eB,S.replace=tB,S.result=Lk,S.round=XB,S.runInContext=P,S.sample=mE,S.size=CE,S.snakeCase=nB,S.some=yE,S.sortedIndex=gS,S.sortedIndexBy=bS,S.sortedIndexOf=CS,S.sortedLastIndex=yS,S.sortedLastIndexBy=wS,S.sortedLastIndexOf=vS,S.startCase=rB,S.startsWith=lB,S.subtract=ZB,S.sum=JB,S.sumBy=QB,S.template=aB,S.times=MB,S.toFinite=so,S.toInteger=Se,S.toLength=wh,S.toLower=iB,S.toNumber=vn,S.toSafeInteger=ik,S.toString=ze,S.toUpper=sB,S.trim=cB,S.trimEnd=uB,S.trimStart=fB,S.truncate=dB,S.unescape=pB,S.uniqueId=FB,S.upperCase=hB,S.upperFirst=ru,S.each=ah,S.eachRight=ih,S.first=nh,iu(S,(function(){var n={};return Wn(S,function(l,s){Ue.call(S.prototype,s)||(n[s]=l)}),n})(),{chain:!1}),S.VERSION=a,mn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){S[n].placeholder=S}),mn(["drop","take"],function(n,l){Ie.prototype[n]=function(s){s=s===r?1:ft(Se(s),0);var p=this.__filtered__&&!l?new Ie(this):this.clone();return p.__filtered__?p.__takeCount__=kt(s,p.__takeCount__):p.__views__.push({size:kt(s,Q),type:n+(p.__dir__<0?"Right":"")}),p},Ie.prototype[n+"Right"]=function(s){return this.reverse()[n](s).reverse()}}),mn(["filter","map","takeWhile"],function(n,l){var s=l+1,p=s==re||s==oe;Ie.prototype[n]=function(w){var k=this.clone();return k.__iteratees__.push({iteratee:ue(w,3),type:s}),k.__filtered__=k.__filtered__||p,k}}),mn(["head","last"],function(n,l){var s="take"+(l?"Right":"");Ie.prototype[n]=function(){return this[s](1).value()[0]}}),mn(["initial","tail"],function(n,l){var s="drop"+(l?"":"Right");Ie.prototype[n]=function(){return this.__filtered__?new Ie(this):this[s](1)}}),Ie.prototype.compact=function(){return this.filter(Gt)},Ie.prototype.find=function(n){return this.filter(n).head()},Ie.prototype.findLast=function(n){return this.reverse().find(n)},Ie.prototype.invokeMap=Te(function(n,l){return typeof n=="function"?new Ie(this):this.map(function(s){return Nl(s,n,l)})}),Ie.prototype.reject=function(n){return this.filter(pi(ue(n)))},Ie.prototype.slice=function(n,l){n=Se(n);var s=this;return s.__filtered__&&(n>0||l<0)?new Ie(s):(n<0?s=s.takeRight(-n):n&&(s=s.drop(n)),l!==r&&(l=Se(l),s=l<0?s.dropRight(-l):s.take(l-n)),s)},Ie.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ie.prototype.toArray=function(){return this.take(Q)},Wn(Ie.prototype,function(n,l){var s=/^(?:filter|find|map|reject)|While$/.test(l),p=/^(?:head|last)$/.test(l),w=S[p?"take"+(l=="last"?"Right":""):l],k=p||/^find/.test(l);w&&(S.prototype[l]=function(){var A=this.__wrapped__,I=p?[1]:arguments,M=A instanceof Ie,K=I[0],j=M||Ce(A),Y=function(Ae){var Re=w.apply(S,Bo([Ae],I));return p&&ee?Re[0]:Re};j&&s&&typeof K=="function"&&K.length!=1&&(M=j=!1);var ee=this.__chain__,se=!!this.__actions__.length,fe=k&&!ee,ke=M&&!se;if(!k&&j){A=ke?A:new Ie(this);var de=n.apply(A,I);return de.__actions__.push({func:ci,args:[Y],thisArg:r}),new bn(de,ee)}return fe&&ke?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=Pa[n],s=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",p=/^(?:pop|shift)$/.test(n);S.prototype[n]=function(){var w=arguments;if(p&&!this.__chain__){var k=this.value();return l.apply(Ce(k)?k:[],w)}return this[s](function(A){return l.apply(Ce(A)?A:[],w)})}}),Wn(Ie.prototype,function(n,l){var s=S[l];if(s){var p=s.name+"";Ue.call(Wr,p)||(Wr[p]=[]),Wr[p].push({name:l,func:s})}}),Wr[ni(r,B).name]=[{name:"wrapper",func:r}],Ie.prototype.clone=pv,Ie.prototype.reverse=hv,Ie.prototype.value=mv,S.prototype.at=US,S.prototype.chain=KS,S.prototype.commit=jS,S.prototype.next=GS,S.prototype.plant=YS,S.prototype.reverse=XS,S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=ZS,S.prototype.first=S.prototype.head,Sl&&(S.prototype[Sl]=qS),S}),Vr=jw();tr?((tr.exports=Vr)._=Vr,ac._=Vr):wt._=Vr}).call(m9)})(Cl,Cl.exports)),Cl.exports}var b9=g9();const xa=_7(b9),X0=t.defineComponent({__name:"transferItem",props:{dialogModalVisible:{type:Boolean},columnsValue:{},columnsIndex:{},columnsLen:{}},emits:["update:toUnLock","update:toLock","update:toTop","update:toPre","update:toNext","update:toBottom"],setup(e,{emit:o}){const r=e,a=t.reactive({itemOnHover:!1,itemOnClick:!1}),i=o,u=()=>{a.itemOnClick=!0,a.itemOnHover=!1},c=()=>{a.itemOnClick=!1,a.itemOnHover=!0};t.watch(()=>r.dialogModalVisible,g=>{g||(a.itemOnClick=!1,a.itemOnHover=!1)});const f=t.computed(()=>!!r.columnsValue.fixed),h=t.computed(()=>[{icon:p3,emitKey:"update:toUnLock",isDisabled:!f.value},{icon:r3,emitKey:"update:toLock",isDisabled:f.value},{icon:f3,emitKey:"update:toTop",isDisabled:r.columnsIndex===0},{icon:Xf,emitKey:"update:toPre",isDisabled:r.columnsIndex===0},{icon:zi,emitKey:"update:toNext",isDisabled:r.columnsIndex===r.columnsLen-1},{icon:K5,emitKey:"update:toBottom",isDisabled:r.columnsIndex===r.columnsLen-1}]),d=24/h.value.length,m=g=>{i(g)};return(g,y)=>{const b=vo,C=K7,v=yC;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["transfer-item-wrapper",{"cursor-grab":a.itemOnHover,"cursor-grabbing":a.itemOnClick}]),onMouseenter:y[0]||(y[0]=E=>a.itemOnHover=!0),onMouseleave:y[1]||(y[1]=E=>a.itemOnHover=!1),onMousedown:u,onMouseup:c},[(t.openBlock(),t.createBlock(b,{label:g.columnsValue.label,value:g.columnsValue.prop,key:g.columnsValue.prop},null,8,["label","value"])),t.createVNode(v,{class:"transfer-arrow-wrapper",justify:"space-around",gutter:8},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,E=>(t.openBlock(),t.createBlock(C,{span:d},{default:t.withCtx(()=>[t.createVNode(t.unref(Nt),{icon:E.icon,disabled:E.isDisabled,link:"",type:"primary",onClick:B=>m(E.emitKey)},null,8,["icon","disabled","onClick"])]),_:2},1024))),256))]),_:1})],34)}}}),C9={class:"search-bar"},y9={class:"transfer-sort-wrapper"},w9=t.defineComponent({__name:"TransferDialog",props:{modelValue:{type:Boolean},columnsValue:{},transferTitle:{}},emits:["update:modelValue","update:submit","update:checkChange"],setup(e,{emit:o}){const{t:r}=Kn.useI18n(),a=e,i=o,u=t.computed({get:()=>a.modelValue,set:E=>i("update:modelValue",E)}),c=t.reactive({localColumns:xa.cloneDeep(a.columnsValue),clickItemProp:"",checkList:a.columnsValue.map(E=>E.prop)}),f={toTop:E=>{if(E<=0)return;const B=c.localColumns.splice(E,1)[0];c.localColumns.unshift(B)},toBottom:E=>{if(E>=c.localColumns.length-1)return;const B=c.localColumns.splice(E,1)[0];c.localColumns.push(B)},toPre:E=>{if(E>0){const B=c.localColumns[E];c.localColumns[E]=c.localColumns[E-1],c.localColumns[E-1]=B}},toNext:E=>{if(E<c.localColumns.length-1){const B=c.localColumns[E];c.localColumns[E]=c.localColumns[E+1],c.localColumns[E+1]=B}},toLock:E=>{if(E<=0)return;const B=c.localColumns.splice(E,1)[0];B.fixed="left",c.localColumns.unshift(B)},toUnLock:E=>{if(E<c.localColumns.length-1){const B=c.localColumns[E];delete B.fixed}}},h=()=>{c.localColumns=xa.cloneDeep(a.columnsValue),c.checkList=a.columnsValue.filter(E=>E.checkActive).map(E=>E.prop||"")};t.watch(()=>u.value,E=>{E?h():(c.clickItemProp="",c.localColumns=[],c.checkList=[])});const d=()=>{i("update:submit",c.localColumns)},m=E=>{const B=a.columnsValue.map(O=>O.prop);c.checkList=E?B:[],g(c.checkList)},g=E=>{const B=E.map(O=>String(O));c.localColumns.forEach(O=>{O.checkActive=B.includes(O.prop)}),i("update:checkChange",{columns:c.localColumns,checkList:c.checkList})},y=t.computed(()=>c.localColumns.length>0&&c.checkList.length===c.localColumns.length),b=t.computed({get:()=>y.value,set:E=>m(E)}),C=()=>{c.localColumns=xa.cloneDeep(a.columnsValue)},v=E=>{if(E.length>0){const B=xa.cloneDeep(c.localColumns);c.localColumns=B.filter(O=>O.label.includes(E))}else C()};return(E,B)=>{const O=vo,T=M7;return t.openBlock(),t.createBlock(Xo,{modelValue:u.value,"onUpdate:modelValue":B[2]||(B[2]=_=>u.value=_),title:E.transferTitle,"onClick:submit":d},{default:t.withCtx(()=>[t.createElementVNode("div",C9,[t.createVNode(Zo,{"show-search":!0,"onUpdate:clear":C,"onKeydown:enter":v})]),t.createElementVNode("div",y9,[t.createVNode(O,{modelValue:b.value,"onUpdate:modelValue":B[0]||(B[0]=_=>b.value=_),class:"px-4",onChange:m},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("common.column"))+" ("+t.toDisplayString(c.checkList.length)+"/"+t.toDisplayString(c.localColumns.length)+") ",1)]),_:1},8,["modelValue"]),t.createVNode(T,{modelValue:c.checkList,"onUpdate:modelValue":B[1]||(B[1]=_=>c.checkList=_),onChange:g},{default:t.withCtx(()=>[t.renderSlot(E.$slots,"list-container",{columns:c.localColumns,clickItemProp:c.clickItemProp,handleItemEvents:f,handleMousedown:_=>c.clickItemProp=_},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.localColumns,(_,x)=>(t.openBlock(),t.createBlock(X0,{key:_.prop,"dialog-modal-visible":u.value,"columns-value":_,"columns-index":x,"columns-len":c.localColumns.length,class:t.normalizeClass({"transfer-active-bg":_.checkActive,"transfer-active-border":c.clickItemProp==_.prop}),onMousedown:N=>c.clickItemProp=_.prop||"","onUpdate:toTop":N=>f.toTop(x),"onUpdate:toBottom":N=>f.toBottom(x),"onUpdate:toPre":N=>f.toPre(x),"onUpdate:toNext":N=>f.toNext(x),"onUpdate:toLock":N=>f.toLock(x),"onUpdate:toUnLock":N=>f.toUnLock(x)},null,8,["dialog-modal-visible","columns-value","columns-index","columns-len","class","onMousedown","onUpdate:toTop","onUpdate:toBottom","onUpdate:toPre","onUpdate:toNext","onUpdate:toLock","onUpdate:toUnLock"]))),128))])]),_:3},8,["modelValue"])])]),_:3},8,["modelValue","title"])}}}),v9={class:"h-header px-4 py-4 flex justify-between items-center bg-primary-10"},_9={class:"flex items-center gap-2"},S9={key:0,class:"flex items-center text-black"},E9={class:"font-bold text-text text-xl md:text-2xl;"},k9={class:"flex items-center gap-3"},Z0=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:o}){const r=e,a=o,i=()=>{const u={};switch(typeof r.showBack){case"string":u.path=r.showBack;break;case"object":Object.assign(u,r.showBack);break;default:u.path=""}a("back",u)};return(u,c)=>{const f=st;return t.openBlock(),t.createElementBlock("div",v9,[t.createElementVNode("div",_9,[e.showBack?(t.openBlock(),t.createElementBlock("div",S9,[t.createVNode(f,{size:16,class:"cursor-pointer",onClick:i},{default:t.withCtx(()=>[t.createVNode(t.unref(V5))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",E9,t.toDisplayString(r.title),1)]),t.createElementVNode("div",k9,[t.renderSlot(u.$slots,"default")])])}}}),B9={key:0,class:"px-4 pt-1.5"},x9={key:1,class:"py-1.5 px-4"},T9={key:0,class:"flex justify-start pl-1.5 pt-0"},Ta=Or(t.defineComponent({__name:"MainPanel",props:{title:{default:""},showBack:{type:[Boolean,String,Object],default:!1},depth:{default:1}},emits:["click:back"],setup(e,{emit:o}){const r=e,a=o,i=()=>{a("click:back")};return(u,c)=>{const f=aa;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(Z0),{title:r.title,showBack:r.showBack,onBack:i,depth:r.depth},null,8,["title","showBack","depth"]),t.createVNode(f,{class:"panel-scrollbar"},{default:t.withCtx(()=>[u.$slots.searchBar?(t.openBlock(),t.createElementBlock("div",B9,[t.renderSlot(u.$slots,"searchBar",{},void 0,!0)])):t.createCommentVNode("",!0),u.$slots.main?(t.openBlock(),t.createElementBlock("div",x9,[t.renderSlot(u.$slots,"main",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3}),u.$slots.footer?(t.openBlock(),t.createElementBlock("div",T9,[t.renderSlot(u.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-a95f0b83"]]),J0={"common.select":"請選擇","common.confirm":"確定","common.cancel":"取消","dialog.confirmRemoveUser":"請問是否確認移除該使用者","common.warning":"警告","search.placeholder":"請輸入關鍵字搜尋列表","common.execute":"執行","common.reset":"重設","common.loading":"數據加載中","common.view":"查看","common.edit":"編輯","common.column":"欄","common.close":"關閉","demo.componentDemo":"組件示範","button.title":"按鈕","button.primary ":"主要","button.default":"默認","button.danger":"危險","button.success":"成功","button.warning":"警告","button.info":"信息","button.style":"樣式","button.size":"尺寸","button.small":"小","button.medium":"中","button.large ":"大","status.title":"狀態","status.normal ":"正常","status.loading":"載入中","status.disabled":"禁用","button.withIcon ":"帶圖標的","button.add":"添加","button.delete":"刪除","common.save":"儲存","common.discard":"捨棄"},Q0={"common.select":"Please select","common.confirm":"Confirm","common.cancel":"Cancel","dialog.confirmRemoveUser":"Are you sure you want to remove this user?","common.warning":"Warning","search.placeholder":"Please enter keywords to search the list","common.execute":"Execute","common.reset":"Reset","common.loading":"Data loading","common.view":"View","common.edit":"Edit","common.column":"Column","common.close":"Close","demo.componentDemo":"Component Demo","button.title":"Button","button.primary ":"Primary","button.default":"Default","button.danger":"Danger","button.success":"Success","button.warning":"Warning","button.info":"Info","button.style":"Style","button.size":"Size","button.small":"Small","button.medium":"Medium","button.large ":"Large","status.title":"Status","status.normal ":"Normal","status.loading":"Loading","status.disabled":"Disabled","button.withIcon ":"With Icon","button.add":"Add","button.delete":"Delete","common.save":"Save","common.discard":"Discard"},ep={"zh-TW":J0,"en-US":Q0};var O9={name:"zh-tw",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"確認",clear:"清空",defaultLabel:"色彩選擇器",description:"目前色彩為 {color}。按一下 Enter 以選擇新色彩。",alphaLabel:"選擇透明度的值"},datepicker:{now:"現在",today:"今天",cancel:"取消",clear:"清空",confirm:"確認",dateTablePrompt:"使用方向鍵與 Enter 鍵以選擇日期",monthTablePrompt:"使用方向鍵與 Enter 鍵以選擇月份",yearTablePrompt:"使用方向鍵與 Enter 鍵以選擇年份",selectedDate:"已選日期",selectDate:"選擇日期",selectTime:"選擇時間",startDate:"開始日期",startTime:"開始時間",endDate:"結束日期",endTime:"結束時間",prevYear:"前一年",nextYear:"後一年",prevMonth:"上個月",nextMonth:"下個月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"減少數值",increase:"增加數值"},select:{loading:"載入中",noMatch:"無相符資料",noData:"無資料",placeholder:"請選擇"},mention:{loading:"載入中"},dropdown:{toggleDropdown:"切換下拉選單"},cascader:{noMatch:"無相符資料",loading:"載入中",placeholder:"請選擇",noData:"無資料"},pagination:{goto:"前往",pagesize:"項/頁",total:"共 {total} 項",pageClassifier:"頁",page:"頁",prev:"上一頁",next:"下一頁",currentPage:"第 {pager} 頁",prevPages:"向前 {pager} 頁",nextPages:"向後 {pager} 頁",deprecationWarning:"偵測到已過時的使用方式,請參閱 el-pagination 說明文件以了解更多資訊"},dialog:{close:"關閉此對話框"},drawer:{close:"關閉此對話框"},messagebox:{title:"提示",confirm:"確定",cancel:"取消",error:"輸入的資料不符合規定!",close:"關閉此對話框"},upload:{deleteTip:"按 Delete 鍵以刪除",delete:"刪除",preview:"查看圖片",continue:"繼續上傳"},slider:{defaultLabel:"滑桿介於 {min} 至 {max}",defaultRangeStartLabel:"選擇起始值",defaultRangeEndLabel:"選擇結束值"},table:{emptyText:"暫無資料",confirmFilter:"篩選",resetFilter:"重置",clearFilter:"全部",sumText:"合計"},tour:{next:"下一步",previous:"上一步",finish:"結束導覽"},tree:{emptyText:"暫無資料"},transfer:{noMatch:"無相符資料",noData:"無資料",titles:["列表 1","列表 2"],filterPlaceholder:"請輸入搜尋內容",noCheckedFormat:"共 {total} 項",hasCheckedFormat:"已選 {checked}/{total} 項"},image:{error:"載入失敗"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"確認",cancelButtonText:"取消"},carousel:{leftArrow:"上一張投影片",rightArrow:"下一張投影片",indicator:"投影片切換至索引 {index}"}}};let Ws=null;const tp="zh-TW";function np(){return Ws||(Ws=Kn.createI18n({legacy:!1,locale:tp,fallbackLocale:tp,messages:ep,silentTranslationWarn:!0,missingWarn:!1,fallbackWarn:!1})),Ws}function op(e){const r=np().global;r.locale.value=e}function rp(){console.log("🔍 [useI18n] 開始執行");const o=np().global;return console.log("🔍 [useI18n] 返回內部 i18n,locale:",o.locale.value),o}function lp(){return console.log("🔍 [useComponentElementLocale] 開始執行"),t.computed(()=>{console.log("🔍 [useComponentElementLocale] computed 開始執行");const e=t.getCurrentInstance();let o;try{console.log("🔍 [useComponentElementLocale] 嘗試獲取外部 i18n");const u=e==null?void 0:e.appContext.config.globalProperties,c=u==null?void 0:u.$i18n;c&&"global"in c?(o=c.global.locale,console.log("🔍 [useComponentElementLocale] 成功獲取外部 locale:",o.value)):console.log("🔍 [useComponentElementLocale] 外部 i18n 不存在")}catch(u){console.log("❌ [useComponentElementLocale] 獲取外部 i18n 失敗:",u)}const{locale:r}=rp();console.log("🔍 [useComponentElementLocale] 內部 locale:",r.value);const a=o||r;console.log("🔍 [useComponentElementLocale] 最終使用 locale:",a.value);const i=a.value==="zh-TW"?O9:$f;return console.log("🔍 [useComponentElementLocale] 返回結果:",i.name),i})}const N9=t.defineComponent({__name:"SearchableListPanel",props:{title:{},pagination:{},showBack:{type:[Boolean,String,Object]},showSearch:{type:Boolean},pageSizeList:{default:()=>[10,25,50,100,200]},showPagination:{type:Boolean},locale:{}},emits:["search","updatePage","updatePageSize","click:back"],setup(e,{emit:o}){const r=e,{pagination:a}=t.toRefs(r),i=o,u=b=>{i("search",b)},c=()=>{i("search",null)},f=b=>{i("updatePage",b)},h=b=>{i("updatePageSize",b)},d=()=>{i("click:back")},m=t.computed(()=>r.showPagination?r.showPagination:r.pagination.totalCount>0),g=lp();t.watch(g,(b,C)=>{console.log("🔄 [SearchableListPanel] fallbackLocale 變化:",{old:C==null?void 0:C.name,new:b==null?void 0:b.name})},{immediate:!0});const y=t.computed(()=>(console.log("🔍 [SearchableListPanel] elementLocale computed 執行"),r.locale&&typeof r.locale=="object"&&"name"in r.locale?(console.log("🔍 [SearchableListPanel] 使用 props.locale:",r.locale.name),r.locale):(console.log("🔍 [SearchableListPanel] 使用 fallbackLocale:",g.value.name),g.value)));return(b,C)=>{const v=hC,E=Y7;return t.openBlock(),t.createBlock(t.unref(Ta),{title:r.title,"show-back":b.showBack,"onClick:back":d},{searchBar:t.withCtx(()=>[t.createVNode(t.unref(Zo),{"show-search":b.showSearch,"onKeydown:enter":u,"onUpdate:clear":c},{button:t.withCtx(()=>[t.renderSlot(b.$slots,"firstButton"),t.renderSlot(b.$slots,"customButton"),t.renderSlot(b.$slots,"lastButton")]),customerFilter:t.withCtx(()=>[t.renderSlot(b.$slots,"filterButton")]),_:3},8,["show-search"])]),main:t.withCtx(()=>[t.renderSlot(b.$slots,"main")]),footer:t.withCtx(()=>[t.createVNode(E,{locale:y.value},{default:t.withCtx(()=>[m.value?(t.openBlock(),t.createBlock(v,{key:0,layout:"jumper, prev, pager, next, total, sizes","page-sizes":b.pageSizeList,"current-page":t.unref(a).page,"page-size":t.unref(a).limit,total:t.unref(a).totalCount,onCurrentChange:f,onSizeChange:h},null,8,["page-sizes","current-page","page-size","total"])):t.createCommentVNode("",!0)]),_:1},8,["locale"])]),_:3},8,["title","show-back"])}}}),A9={class:"detail-container"},L9={class:"content-wrapper"},I9={key:0,class:"border-t py-4 w-full flex items-center justify-end"},R9=Or(t.defineComponent({__name:"DetailLayout",props:{title:{},showBack:{type:[Boolean,String,Object]},isEditable:{type:Boolean},pageLoading:{type:Boolean}},emits:["update:saveEdit","update:cancelEdit","click:back"],setup(e,{emit:o}){const{t:r}=Kn.useI18n(),a=o,i=()=>{a("update:saveEdit",!1)},u=()=>{a("update:cancelEdit")},c=()=>{a("click:back")};return(f,h)=>{const d=qo;return t.openBlock(),t.createBlock(t.unref(Ta),{title:f.title,"show-back":f.showBack,"onClick:back":c},{main:t.withCtx(()=>[t.withDirectives((t.openBlock(),t.createElementBlock("div",A9,[t.renderSlot(f.$slots,"detailHeader",{},void 0,!0),t.createElementVNode("div",L9,[t.renderSlot(f.$slots,"main",{},void 0,!0)])])),[[d,f.pageLoading]])]),footer:t.withCtx(()=>[f.isEditable?(t.openBlock(),t.createElementBlock("div",I9,[t.createVNode(t.unref(Nt),{text:t.unref(r)("common.save"),type:"primary","is-fill":"",onClick:i},null,8,["text"]),t.createVNode(t.unref(Nt),{text:t.unref(r)("common.discard"),type:"primary",onClick:u},null,8,["text"])])):t.createCommentVNode("",!0)]),_:3},8,["title","show-back"])}}}),[["__scopeId","data-v-3b4bc285"]]),P9={class:"filter-container"},M9={class:"filter-header"},$9={class:"submit-row"},F9=Or(t.defineComponent({__name:"FilterLayout",props:{mainTitle:{},showBack:{type:[Boolean,String,Object]},filterTitle:{}},emits:["submitEmit","resetEmit","click:back"],setup(e,{emit:o}){const{t:r}=Kn.useI18n(),a=o,i=()=>{a("submitEmit")},u=()=>{a("resetEmit")},c=()=>{a("click:back")};return(f,h)=>(t.openBlock(),t.createBlock(t.unref(Ta),{title:f.mainTitle,"show-back":f.showBack,"onClick:back":c},{main:t.withCtx(()=>[t.createElementVNode("div",P9,[t.createElementVNode("div",M9,t.toDisplayString(f.filterTitle),1),t.renderSlot(f.$slots,"default",{},void 0,!0)])]),footer:t.withCtx(()=>[t.createElementVNode("div",$9,[t.createVNode(t.unref(Nt),{text:t.unref(r)("common.execute"),"is-fill":"",type:"primary",onClick:i},null,8,["text"]),t.createVNode(t.unref(Nt),{text:t.unref(r)("common.reset"),type:"primary",onClick:u},null,8,["text"])])]),_:3},8,["title","show-back"]))}}),[["__scopeId","data-v-32b37758"]]),V9={class:"w-full mb-4"},D9={class:"flex items-center h-12 bg-gray-200 px-1.5 rounded-t justify-end"},z9={class:"flex items-center mr-4"},W9={key:0,src:n9,alt:"Excel",class:"w-6 h-6"},H9={key:1,src:o9,alt:"Excel-active",class:"w-6 h-6"},yl=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},showCheckBtn:{type:Boolean},showEditBtn:{type:Boolean}},emits:["open:transfer","click:downloadExcelFile","update:selectRow","click:cell","click:columnSort","click:checkRow","click:editRow"],setup(e,{emit:o}){const r=o,a=()=>{r("open:transfer")},i=g=>{r("update:selectRow",g)},u=(g,y)=>{r("click:cell",g,y)},c=g=>{r("click:columnSort",g)},f=g=>{r("click:checkRow",g)},h=g=>{r("click:editRow",g)},d=()=>{r("click:downloadExcelFile")},m=t.reactive({itemOnHover:!1});return(g,y)=>{const b=st,C=qo;return t.openBlock(),t.createElementBlock("div",V9,[t.createElementVNode("div",D9,[t.createElementVNode("div",z9,[t.createElementVNode("div",{class:"cursor-pointer text-text text-xl flex items-center justify-center hover:text-blue-600",onClick:a},[t.createVNode(b,null,{default:t.withCtx(()=>[t.createVNode(t.unref(c3))]),_:1})]),t.createElementVNode("div",{class:"cursor-pointer flex items-center justify-center ml-1",onMouseenter:y[0]||(y[0]=v=>m.itemOnHover=!0),onMouseleave:y[1]||(y[1]=v=>m.itemOnHover=!1),onClick:d},[m.itemOnHover?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("img",W9)),m.itemOnHover?(t.openBlock(),t.createElementBlock("img",H9)):t.createCommentVNode("",!0)],32)])]),t.withDirectives(t.createVNode(t.unref(Yo),{data:g.data,columns:g.columns,"show-summary":g.showSummary,"show-over-flow-tooltip":g.showOverFlowTooltip,"summary-method":g.summaryMethod,"show-selection":g.showSelection,"base-table-row-class-name":g.sortTableRowClassName,"show-check-btn":g.showCheckBtn,"show-edit-btn":g.showEditBtn,onSelectionChange:i,onCellClick:u,onColumnSortChange:c,"onClick:checkRow":f,"onClick:editRow":h},null,8,["data","columns","show-summary","show-over-flow-tooltip","summary-method","show-selection","base-table-row-class-name","show-check-btn","show-edit-btn"]),[[C,g.loading]])])}}});function U9(e){return e.map(o=>({...o,checkActive:!0}))}const ap=[Yo,Nt,Nr,Xo,yl,bl,Zo];function ip(e,o){o!=null&&o.locale&&op(o.locale),ap.forEach(r=>{e.component(r.name||"VueTableComponent",r)})}const K9={install:ip,...ap};Yo.install=e=>{e.component(Yo.name||"BaseTable",Yo)},Nt.install=e=>{e.component(Nt.name||"BaseBtn",Nt)},Nr.install=e=>{e.component(Nr.name||"BaseInput",Nr)},Xo.install=e=>{e.component(Xo.name||"BaseDialog",Xo)},yl.install=e=>{e.component(yl.name||"SortTable",yl)},bl.install=e=>{e.component(bl.name||"TitleTable",bl)},Zo.install=e=>{e.component(Zo.name||"SearchBar",Zo)},me.BaseBtn=Nt,me.BaseDialog=Xo,me.BaseInput=Nr,me.BaseMultipleInput=a9,me.BaseTable=Yo,me.BaseWaringDialog=l9,me.DetailLayout=R9,me.FilterLayout=F9,me.FunctionHeader=Z0,me.MainPanel=Ta,me.SearchBar=Zo,me.SearchableListPanel=N9,me.SortTable=yl,me.TitleTable=bl,me.TransferDialog=w9,me.TransferItem=X0,me.default=K9,me.enUS=Q0,me.install=ip,me.messages=ep,me.setActiveColumn=U9,me.setLocale=op,me.useComponentElementLocale=lp,me.useI18n=rp,me.zhTW=J0,Object.defineProperties(me,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/package.json
CHANGED
package/src/utils/i18n.ts
CHANGED
|
@@ -55,35 +55,36 @@ export function useI18n() {
|
|
|
55
55
|
export function useComponentElementLocale() {
|
|
56
56
|
console.log('🔍 [useComponentElementLocale] 開始執行')
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
return computed(() => {
|
|
59
|
+
console.log('🔍 [useComponentElementLocale] computed 開始執行')
|
|
60
|
+
|
|
61
|
+
// 在 computed 內部嘗試獲取外部 i18n(確保響應式)
|
|
62
|
+
const instance = getCurrentInstance()
|
|
63
|
+
let externalLocale: any = undefined
|
|
61
64
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
try {
|
|
66
|
+
console.log('🔍 [useComponentElementLocale] 嘗試獲取外部 i18n')
|
|
67
|
+
const globalProperties = instance?.appContext.config.globalProperties
|
|
68
|
+
const externalI18nInstance = globalProperties?.$i18n as I18n | undefined
|
|
66
69
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
if (externalI18nInstance && 'global' in externalI18nInstance) {
|
|
71
|
+
externalLocale = externalI18nInstance.global.locale
|
|
72
|
+
console.log('🔍 [useComponentElementLocale] 成功獲取外部 locale:', externalLocale.value)
|
|
73
|
+
} else {
|
|
74
|
+
console.log('🔍 [useComponentElementLocale] 外部 i18n 不存在')
|
|
75
|
+
}
|
|
76
|
+
} catch (e) {
|
|
77
|
+
console.log('❌ [useComponentElementLocale] 獲取外部 i18n 失敗:', e)
|
|
72
78
|
}
|
|
73
|
-
} catch (e) {
|
|
74
|
-
console.log('❌ [useComponentElementLocale] 獲取外部 i18n 失敗:', e)
|
|
75
|
-
}
|
|
76
79
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
// 獲取內部 i18n(回退)
|
|
81
|
+
const { locale: internalLocale } = useI18n()
|
|
82
|
+
console.log('🔍 [useComponentElementLocale] 內部 locale:', internalLocale.value)
|
|
80
83
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
// 決定使用哪個 locale
|
|
85
|
+
const currentLocale = externalLocale || internalLocale
|
|
86
|
+
console.log('🔍 [useComponentElementLocale] 最終使用 locale:', currentLocale.value)
|
|
84
87
|
|
|
85
|
-
return computed(() => {
|
|
86
|
-
console.log('🔍 [useComponentElementLocale] computed 重新計算,locale.value:', currentLocale.value)
|
|
87
88
|
const result = currentLocale.value === 'zh-TW' ? zhTw : enUs
|
|
88
89
|
console.log('🔍 [useComponentElementLocale] 返回結果:', result.name)
|
|
89
90
|
return result
|