fone-design-system_v2 1.0.43 → 1.0.44
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.
|
@@ -76800,7 +76800,7 @@ const jSe = ({
|
|
|
76800
76800
|
defaultExpanded: g,
|
|
76801
76801
|
isLoading: v,
|
|
76802
76802
|
maxLevel: h = 999,
|
|
76803
|
-
minLevel: y = 0,
|
|
76803
|
+
minLevel: y = void 0,
|
|
76804
76804
|
scrollTo: x,
|
|
76805
76805
|
editItems: C,
|
|
76806
76806
|
tableData: w
|
|
@@ -76833,7 +76833,7 @@ const jSe = ({
|
|
|
76833
76833
|
});
|
|
76834
76834
|
return;
|
|
76835
76835
|
}
|
|
76836
|
-
if (M(S) <= y) {
|
|
76836
|
+
if (y && M(S) <= y) {
|
|
76837
76837
|
k({
|
|
76838
76838
|
open: !0,
|
|
76839
76839
|
type: "info",
|
|
@@ -824,7 +824,7 @@ __p += '`),bn&&(Ke+=`' +
|
|
|
824
824
|
function print() { __p += __j.call(arguments, '') }
|
|
825
825
|
`:`;
|
|
826
826
|
`)+Ke+`return __p
|
|
827
|
-
}`;var cn=y$(function(){return En(ee,Rt+"return "+Ke).apply(n,ce)});if(cn.source=Ke,T2(cn))throw cn;return cn}function LCe(f){return Nn(f).toLowerCase()}function $Ce(f){return Nn(f).toUpperCase()}function VCe(f,m,T){if(f=Nn(f),f&&(T||m===n))return TF(f);if(!f||!(m=oi(m)))return f;var B=fa(f),U=fa(m),ee=RF(B,U),ce=PF(B,U)+1;return Cl(B,ee,ce).join("")}function HCe(f,m,T){if(f=Nn(f),f&&(T||m===n))return f.slice(0,MF(f)+1);if(!f||!(m=oi(m)))return f;var B=fa(f),U=PF(B,fa(m))+1;return Cl(B,0,U).join("")}function zCe(f,m,T){if(f=Nn(f),f&&(T||m===n))return f.replace(Pt,"");if(!f||!(m=oi(m)))return f;var B=fa(f),U=RF(B,fa(m));return Cl(B,U).join("")}function _Ce(f,m){var T=P,B=D;if(sr(m)){var U="separator"in m?m.separator:U;T="length"in m?nn(m.length):T,B="omission"in m?oi(m.omission):B}f=Nn(f);var ee=f.length;if(sd(f)){var ce=fa(f);ee=ce.length}if(T>=ee)return f;var de=T-ld(B);if(de<1)return B;var ve=ce?Cl(ce,0,de).join(""):f.slice(0,de);if(U===n)return ve+B;if(ce&&(de+=ve.length-de),R2(U)){if(f.slice(de).search(U)){var ze,We=ve;for(U.global||(U=US(U.source,Nn(Se.exec(U))+"g")),U.lastIndex=0;ze=U.exec(We);)var Ke=ze.index;ve=ve.slice(0,Ke===n?de:Ke)}}else if(f.indexOf(oi(U),de)!=de){var ht=ve.lastIndexOf(U);ht>-1&&(ve=ve.slice(0,ht))}return ve+B}function WCe(f){return f=Nn(f),f&&Gt.test(f)?f.replace(st,y0e):f}var UCe=gd(function(f,m,T){return f+(T?" ":"")+m.toUpperCase()}),M2=bL("toUpperCase");function v$(f,m,T){return f=Nn(f),m=T?n:m,m===n?p0e(f)?C0e(f):i0e(f):f.match(m)||[]}var y$=fn(function(f,m){try{return ni(f,n,m)}catch(T){return T2(T)?T:new Jt(T)}}),YCe=xs(function(f,m){return Fi(m,function(T){T=Ua(T),ys(f,T,O2(f[T],f))}),f});function qCe(f){var m=f==null?0:f.length,T=Ft();return f=m?or(f,function(B){if(typeof B[1]!="function")throw new Li(s);return[T(B[0]),B[1]]}):[],fn(function(B){for(var U=-1;++U<m;){var ee=f[U];if(ni(ee[0],this,B))return ni(ee[1],this,B)}})}function GCe(f){return yye(Vi(f,A))}function D2(f){return function(){return f}}function QCe(f,m){return f==null||f!==f?m:f}var XCe=CL(),KCe=CL(!0);function $o(f){return f}function N2(f){return JF(typeof f=="function"?f:Vi(f,A))}function JCe(f){return eL(Vi(f,A))}function ZCe(f,m){return tL(f,Vi(m,A))}var ewe=fn(function(f,m){return function(T){return JA(T,f,m)}}),twe=fn(function(f,m){return function(T){return JA(f,T,m)}});function B2(f,m,T){var B=Gr(m),U=g0(m,B);T==null&&!(sr(m)&&(U.length||!B.length))&&(T=m,m=f,f=this,U=g0(m,Gr(m)));var ee=!(sr(T)&&"chain"in T)||!!T.chain,ce=ws(f);return Fi(U,function(de){var ve=m[de];f[de]=ve,ce&&(f.prototype[de]=function(){var ze=this.__chain__;if(ee||ze){var We=f(this.__wrapped__),Ke=We.__actions__=jo(this.__actions__);return Ke.push({func:ve,args:arguments,thisArg:f}),We.__chain__=ze,We}return ve.apply(f,hl([this.value()],arguments))})}),f}function nwe(){return Jr._===this&&(Jr._=T0e),this}function j2(){}function rwe(f){return f=nn(f),fn(function(m){return nL(m,f)})}var owe=A2(or),iwe=A2(wF),awe=A2(LS);function b$(f){return b2(f)?$S(Ua(f)):jye(f)}function swe(f){return function(m){return f==null?n:Oc(f,m)}}var lwe=SL(),cwe=SL(!0);function F2(){return[]}function L2(){return!1}function uwe(){return{}}function dwe(){return""}function fwe(){return!0}function Awe(f,m){if(f=nn(f),f<1||f>_)return[];var T=z,B=fo(f,z);m=Ft(m),f-=z;for(var U=zS(B,m);++T<f;)m(T);return U}function pwe(f){return en(f)?or(f,Ua):ii(f)?[f]:jo(VL(Nn(f)))}function gwe(f){var m=++O0e;return Nn(f)+m}var hwe=x0(function(f,m){return f+m},0),mwe=p2("ceil"),vwe=x0(function(f,m){return f/m},1),ywe=p2("floor");function bwe(f){return f&&f.length?p0(f,$o,ZS):n}function xwe(f,m){return f&&f.length?p0(f,Ft(m,2),ZS):n}function Cwe(f){return OF(f,$o)}function wwe(f,m){return OF(f,Ft(m,2))}function Swe(f){return f&&f.length?p0(f,$o,r2):n}function Ewe(f,m){return f&&f.length?p0(f,Ft(m,2),r2):n}var Owe=x0(function(f,m){return f*m},1),Iwe=p2("round"),Twe=x0(function(f,m){return f-m},0);function Rwe(f){return f&&f.length?HS(f,$o):0}function Pwe(f,m){return f&&f.length?HS(f,Ft(m,2)):0}return K.after=J1e,K.ary=KL,K.assign=$xe,K.assignIn=d$,K.assignInWith=N0,K.assignWith=Vxe,K.at=Hxe,K.before=JL,K.bind=O2,K.bindAll=YCe,K.bindKey=ZL,K.castArray=uxe,K.chain=GL,K.chunk=ybe,K.compact=bbe,K.concat=xbe,K.cond=qCe,K.conforms=GCe,K.constant=D2,K.countBy=R1e,K.create=zxe,K.curry=e$,K.curryRight=t$,K.debounce=n$,K.defaults=_xe,K.defaultsDeep=Wxe,K.defer=Z1e,K.delay=exe,K.difference=Cbe,K.differenceBy=wbe,K.differenceWith=Sbe,K.drop=Ebe,K.dropRight=Obe,K.dropRightWhile=Ibe,K.dropWhile=Tbe,K.fill=Rbe,K.filter=k1e,K.flatMap=N1e,K.flatMapDeep=B1e,K.flatMapDepth=j1e,K.flatten=WL,K.flattenDeep=Pbe,K.flattenDepth=kbe,K.flip=txe,K.flow=XCe,K.flowRight=KCe,K.fromPairs=Mbe,K.functions=Kxe,K.functionsIn=Jxe,K.groupBy=F1e,K.initial=Nbe,K.intersection=Bbe,K.intersectionBy=jbe,K.intersectionWith=Fbe,K.invert=eCe,K.invertBy=tCe,K.invokeMap=$1e,K.iteratee=N2,K.keyBy=V1e,K.keys=Gr,K.keysIn=Lo,K.map=T0,K.mapKeys=rCe,K.mapValues=oCe,K.matches=JCe,K.matchesProperty=ZCe,K.memoize=P0,K.merge=iCe,K.mergeWith=f$,K.method=ewe,K.methodOf=twe,K.mixin=B2,K.negate=k0,K.nthArg=rwe,K.omit=aCe,K.omitBy=sCe,K.once=nxe,K.orderBy=H1e,K.over=owe,K.overArgs=rxe,K.overEvery=iwe,K.overSome=awe,K.partial=I2,K.partialRight=r$,K.partition=z1e,K.pick=lCe,K.pickBy=A$,K.property=b$,K.propertyOf=swe,K.pull=Hbe,K.pullAll=YL,K.pullAllBy=zbe,K.pullAllWith=_be,K.pullAt=Wbe,K.range=lwe,K.rangeRight=cwe,K.rearg=oxe,K.reject=U1e,K.remove=Ube,K.rest=ixe,K.reverse=S2,K.sampleSize=q1e,K.set=uCe,K.setWith=dCe,K.shuffle=G1e,K.slice=Ybe,K.sortBy=K1e,K.sortedUniq=Zbe,K.sortedUniqBy=e1e,K.split=NCe,K.spread=axe,K.tail=t1e,K.take=n1e,K.takeRight=r1e,K.takeRightWhile=o1e,K.takeWhile=i1e,K.tap=b1e,K.throttle=sxe,K.thru=I0,K.toArray=l$,K.toPairs=p$,K.toPairsIn=g$,K.toPath=pwe,K.toPlainObject=u$,K.transform=fCe,K.unary=lxe,K.union=a1e,K.unionBy=s1e,K.unionWith=l1e,K.uniq=c1e,K.uniqBy=u1e,K.uniqWith=d1e,K.unset=ACe,K.unzip=E2,K.unzipWith=qL,K.update=pCe,K.updateWith=gCe,K.values=vd,K.valuesIn=hCe,K.without=f1e,K.words=v$,K.wrap=cxe,K.xor=A1e,K.xorBy=p1e,K.xorWith=g1e,K.zip=h1e,K.zipObject=m1e,K.zipObjectDeep=v1e,K.zipWith=y1e,K.entries=p$,K.entriesIn=g$,K.extend=d$,K.extendWith=N0,B2(K,K),K.add=hwe,K.attempt=y$,K.camelCase=bCe,K.capitalize=h$,K.ceil=mwe,K.clamp=mCe,K.clone=dxe,K.cloneDeep=Axe,K.cloneDeepWith=pxe,K.cloneWith=fxe,K.conformsTo=gxe,K.deburr=m$,K.defaultTo=QCe,K.divide=vwe,K.endsWith=xCe,K.eq=pa,K.escape=CCe,K.escapeRegExp=wCe,K.every=P1e,K.find=M1e,K.findIndex=zL,K.findKey=Uxe,K.findLast=D1e,K.findLastIndex=_L,K.findLastKey=Yxe,K.floor=ywe,K.forEach=QL,K.forEachRight=XL,K.forIn=qxe,K.forInRight=Gxe,K.forOwn=Qxe,K.forOwnRight=Xxe,K.get=P2,K.gt=hxe,K.gte=mxe,K.has=Zxe,K.hasIn=k2,K.head=UL,K.identity=$o,K.includes=L1e,K.indexOf=Dbe,K.inRange=vCe,K.invoke=nCe,K.isArguments=Rc,K.isArray=en,K.isArrayBuffer=vxe,K.isArrayLike=Fo,K.isArrayLikeObject=Cr,K.isBoolean=yxe,K.isBuffer=wl,K.isDate=bxe,K.isElement=xxe,K.isEmpty=Cxe,K.isEqual=wxe,K.isEqualWith=Sxe,K.isError=T2,K.isFinite=Exe,K.isFunction=ws,K.isInteger=o$,K.isLength=M0,K.isMap=i$,K.isMatch=Oxe,K.isMatchWith=Ixe,K.isNaN=Txe,K.isNative=Rxe,K.isNil=kxe,K.isNull=Pxe,K.isNumber=a$,K.isObject=sr,K.isObjectLike=gr,K.isPlainObject=op,K.isRegExp=R2,K.isSafeInteger=Mxe,K.isSet=s$,K.isString=D0,K.isSymbol=ii,K.isTypedArray=md,K.isUndefined=Dxe,K.isWeakMap=Nxe,K.isWeakSet=Bxe,K.join=Lbe,K.kebabCase=SCe,K.last=zi,K.lastIndexOf=$be,K.lowerCase=ECe,K.lowerFirst=OCe,K.lt=jxe,K.lte=Fxe,K.max=bwe,K.maxBy=xwe,K.mean=Cwe,K.meanBy=wwe,K.min=Swe,K.minBy=Ewe,K.stubArray=F2,K.stubFalse=L2,K.stubObject=uwe,K.stubString=dwe,K.stubTrue=fwe,K.multiply=Owe,K.nth=Vbe,K.noConflict=nwe,K.noop=j2,K.now=R0,K.pad=ICe,K.padEnd=TCe,K.padStart=RCe,K.parseInt=PCe,K.random=yCe,K.reduce=_1e,K.reduceRight=W1e,K.repeat=kCe,K.replace=MCe,K.result=cCe,K.round=Iwe,K.runInContext=ge,K.sample=Y1e,K.size=Q1e,K.snakeCase=DCe,K.some=X1e,K.sortedIndex=qbe,K.sortedIndexBy=Gbe,K.sortedIndexOf=Qbe,K.sortedLastIndex=Xbe,K.sortedLastIndexBy=Kbe,K.sortedLastIndexOf=Jbe,K.startCase=BCe,K.startsWith=jCe,K.subtract=Twe,K.sum=Rwe,K.sumBy=Pwe,K.template=FCe,K.times=Awe,K.toFinite=Ss,K.toInteger=nn,K.toLength=c$,K.toLower=LCe,K.toNumber=_i,K.toSafeInteger=Lxe,K.toString=Nn,K.toUpper=$Ce,K.trim=VCe,K.trimEnd=HCe,K.trimStart=zCe,K.truncate=_Ce,K.unescape=WCe,K.uniqueId=gwe,K.upperCase=UCe,K.upperFirst=M2,K.each=QL,K.eachRight=XL,K.first=UL,B2(K,(function(){var f={};return _a(K,function(m,T){Ln.call(K.prototype,T)||(f[T]=m)}),f})(),{chain:!1}),K.VERSION=r,Fi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(f){K[f].placeholder=K}),Fi(["drop","take"],function(f,m){mn.prototype[f]=function(T){T=T===n?1:Fr(nn(T),0);var B=this.__filtered__&&!m?new mn(this):this.clone();return B.__filtered__?B.__takeCount__=fo(T,B.__takeCount__):B.__views__.push({size:fo(T,z),type:f+(B.__dir__<0?"Right":"")}),B},mn.prototype[f+"Right"]=function(T){return this.reverse()[f](T).reverse()}}),Fi(["filter","map","takeWhile"],function(f,m){var T=m+1,B=T==N||T==$;mn.prototype[f]=function(U){var ee=this.clone();return ee.__iteratees__.push({iteratee:Ft(U,3),type:T}),ee.__filtered__=ee.__filtered__||B,ee}}),Fi(["head","last"],function(f,m){var T="take"+(m?"Right":"");mn.prototype[f]=function(){return this[T](1).value()[0]}}),Fi(["initial","tail"],function(f,m){var T="drop"+(m?"":"Right");mn.prototype[f]=function(){return this.__filtered__?new mn(this):this[T](1)}}),mn.prototype.compact=function(){return this.filter($o)},mn.prototype.find=function(f){return this.filter(f).head()},mn.prototype.findLast=function(f){return this.reverse().find(f)},mn.prototype.invokeMap=fn(function(f,m){return typeof f=="function"?new mn(this):this.map(function(T){return JA(T,f,m)})}),mn.prototype.reject=function(f){return this.filter(k0(Ft(f)))},mn.prototype.slice=function(f,m){f=nn(f);var T=this;return T.__filtered__&&(f>0||m<0)?new mn(T):(f<0?T=T.takeRight(-f):f&&(T=T.drop(f)),m!==n&&(m=nn(m),T=m<0?T.dropRight(-m):T.take(m-f)),T)},mn.prototype.takeRightWhile=function(f){return this.reverse().takeWhile(f).reverse()},mn.prototype.toArray=function(){return this.take(z)},_a(mn.prototype,function(f,m){var T=/^(?:filter|find|map|reject)|While$/.test(m),B=/^(?:head|last)$/.test(m),U=K[B?"take"+(m=="last"?"Right":""):m],ee=B||/^find/.test(m);U&&(K.prototype[m]=function(){var ce=this.__wrapped__,de=B?[1]:arguments,ve=ce instanceof mn,ze=de[0],We=ve||en(ce),Ke=function(gn){var bn=U.apply(K,hl([gn],de));return B&&ht?bn[0]:bn};We&&T&&typeof ze=="function"&&ze.length!=1&&(ve=We=!1);var ht=this.__chain__,Rt=!!this.__actions__.length,Vt=ee&&!ht,cn=ve&&!Rt;if(!ee&&We){ce=cn?ce:new mn(this);var Ht=f.apply(ce,de);return Ht.__actions__.push({func:I0,args:[Ke],thisArg:n}),new $i(Ht,ht)}return Vt&&cn?f.apply(this,de):(Ht=this.thru(Ke),Vt?B?Ht.value()[0]:Ht.value():Ht)})}),Fi(["pop","push","shift","sort","splice","unshift"],function(f){var m=Zv[f],T=/^(?:push|sort|unshift)$/.test(f)?"tap":"thru",B=/^(?:pop|shift)$/.test(f);K.prototype[f]=function(){var U=arguments;if(B&&!this.__chain__){var ee=this.value();return m.apply(en(ee)?ee:[],U)}return this[T](function(ce){return m.apply(en(ce)?ce:[],U)})}}),_a(mn.prototype,function(f,m){var T=K[m];if(T){var B=T.name+"";Ln.call(fd,B)||(fd[B]=[]),fd[B].push({name:m,func:T})}}),fd[b0(n,x).name]=[{name:"wrapper",func:n}],mn.prototype.clone=W0e,mn.prototype.reverse=U0e,mn.prototype.value=Y0e,K.prototype.at=x1e,K.prototype.chain=C1e,K.prototype.commit=w1e,K.prototype.next=S1e,K.prototype.plant=O1e,K.prototype.reverse=I1e,K.prototype.toJSON=K.prototype.valueOf=K.prototype.value=T1e,K.prototype.first=K.prototype.head,UA&&(K.prototype[UA]=E1e),K}),cd=w0e();xc?((xc.exports=cd)._=cd,NS._=cd):Jr._=cd}).call(bve)})(VA,VA.exports)),VA.exports}var Cve=xve();const wve=()=>{const e=G.useRef(null),[t,n]=G.useState(0);return G.useEffect(()=>{if(!e.current)return;const r=new ResizeObserver(Cve.debounce(o=>{const a=o[0].contentRect.height;n(a)},100));return r.observe(e.current),()=>r.disconnect()},[]),[e,t]},dF=G.forwardRef(({items:e,defaultExpanded:t,isItemDisabled:n,checkboxSelection:r,multiSelect:o,onItemSelectionToggle:a,onItemClick:s,onItemDoubleClick:l,onSelectedItemChange:c,scrollTo:u,editItems:d,onInlineCreate:A},p)=>{const[g,v]=G.useState([]),[h,y]=G.useState(()=>new Set),[x,C]=G.useState(()=>new Set),[w,E]=G.useState(e),[S,R]=G.useState(null),I=G.useCallback((V,H)=>{var z;for(const q of V){if(String(q.id)===String(H))return q;if((z=q.children)!=null&&z.length){const Q=I(q.children,H);if(Q)return Q}}return null},[]),k=G.useCallback(()=>{const V=[],H=z=>{var q;(q=z.children)!=null&&q.length&&(V.push(String(z.id)),z.children.forEach(H))};return w.forEach(H),V},[w]),M=V=>!!(n!=null&&n(V));G.useEffect(()=>{t&&w.length>0&&v(k())},[t,w.length,k]),G.useEffect(()=>{if(!(d!=null&&d.length))return;const V=new Map(d.map(z=>[String(z.id),z.label])),H=z=>{console.log(z);let q=!1;const Q=z.map(X=>{const J=V.get(String(X.id));let Z=X.children;if(Z!=null&&Z.length){const re=H(Z);re!==Z&&(Z=re)}return J!==void 0&&J!==X.label||Z!==X.children?(q=!0,{...X,label:J??X.label,...Z!==X.children?{children:Z}:{}}):X});return q?Q:z};E(z=>H(z))},[d]),G.useEffect(()=>{E(e)},[e]);const P=G.useCallback((V,H,z=[])=>{var q;for(const Q of V){const X=[...z,String(Q.id)];if(String(Q.id)===H)return X;if((q=Q.children)!=null&&q.length){const J=P(Q.children,H,X);if(J)return J}}return null},[]);G.useEffect(()=>{if(!u)return;const V=P(w,u);if(!V)return;const H=V.slice(0,-1);v(q=>Array.from(new Set([...q,...H])));const z=I(w,u);R(u),o||y(new Set([u])),c==null||c(z),requestAnimationFrame(()=>{const q=document.querySelector(`[data-tree-id='${u}']`);q&&"scrollIntoView"in q&&q.scrollIntoView({block:"nearest",behavior:"smooth"})})},[u,w,o,P,I,c]);const D=G.useCallback((V,H)=>{let z=!1;const q=V.map(Q=>{var X;if(String(Q.id)===H)return z=!0,null;if((X=Q.children)!=null&&X.length){const J=D(Q.children,H);if(J!==Q.children)return z=!0,{...Q,children:J}}return Q}).filter(Boolean);return z?q:V},[]);G.useImperativeHandle(p,()=>({expandAll:()=>v(k()),collapseAll:()=>v([]),getSelectedItemId:()=>S,expand:V=>{const z=(P(w,String(V))??[String(V)]).slice(0,-1);v(q=>Array.from(new Set([...q,...z,String(V)])))},startInlineAdd:V=>{var X;const H=I(w,V);if(!H)return null;const z=Number(H.menuLvSeq??1)+1,q={id:`${V}_new_${(((X=H.children)==null?void 0:X.length)??0)+1}_${Date.now()}`,parentId:V,label:"+",crud:"C",menuLvSeq:String(z),children:[]},Q=J=>J.map(Z=>String(Z.id)===V?{...Z,children:[q,...Z.children??[]]}:Z.children?{...Z,children:Q(Z.children)}:Z);return E(J=>Q(J)),v(J=>J.includes(V)?J:[...J,V]),R(q.id),o||y(new Set([q.id])),c==null||c(q),A==null||A(H,q),requestAnimationFrame(()=>{const J=document.querySelector(`[data-tree-id='${q.id}']`);J&&"scrollIntoView"in J&&J.scrollIntoView({block:"center",behavior:"smooth"})}),q},remove:V=>{E(H=>D(H,String(V))),v(H=>H.filter(z=>z!==String(V))),y(H=>{const z=new Set(H);return z.delete(String(V)),z}),C(H=>{const z=new Set(H);return z.delete(String(V)),z}),S===String(V)&&(R(null),c==null||c(null))}}));const L=V=>v(H=>H.includes(V)?H.filter(z=>z!==V):[...H,V]),F=(V,H,z=!1)=>{if(M(H))return;if(r&&z){const Q=new Set(x),X=String(H.id);Q.has(X)?Q.delete(X):Q.add(X),C(Q),a==null||a(V,X,Q.has(X));return}const q=String(H.id);if(R(q),o){const Q=new Set(h);Q.has(q)?Q.delete(q):Q.add(q),y(Q),a==null||a(V,q,Q.has(q))}else y(new Set([q])),a==null||a(V,q,!0);c==null||c(H),s==null||s(V,q,H)},N=200,j=G.useRef(null),$=G.useRef(null),W=(V,H)=>{const z=String(H.id),q=V.timeStamp,Q=j.current;if(Q&&Q.id===z&&q-Q.t<N){$.current&&(clearTimeout($.current),$.current=null),j.current=null,l==null||l(z,H);return}j.current={id:z,t:q},$.current&&clearTimeout($.current),$.current=window.setTimeout(()=>{F(V,H),$.current=null},0)},_=({item:V,depth:H,index:z,siblings:q,ancestorHasNext:Q})=>{var le;const X=!!((le=V.children)!=null&&le.length),J=g.includes(String(V.id)),Z=M(V),re=h.has(String(V.id)),oe="2.2",te=z===q.length-1,ne=()=>{switch(H){case 1:return X&&J?O.jsx(nG,{sx:{fontSize:"var(--ds-font-size-xl)"}}):O.jsx(YT,{sx:{fontSize:"var(--ds-font-size-xl)"}});default:return X?J?O.jsx(qT,{sx:{fontSize:"var(--ds-font-size-xl)"},htmlColor:"#ADB8C2"}):O.jsx(Jq,{sx:{fontSize:"var(--ds-font-size-xl)"},htmlColor:"#ADB8C2"}):O.jsx("div",{style:{width:`${oe}rem`,height:`${oe}rem`}})}};return O.jsxs("div",{"data-tree-id":String(V.id),style:{marginLeft:H===1||H===0?0:H>3?`${oe}rem`:H===2&&X?`${oe}rem`:`${Number(oe)/2}rem`,borderLeft:"1px solid transparent",position:"relative",...H>2?{backgroundImage:"linear-gradient(#D9D9D9, #D9D9D9)",backgroundRepeat:"no-repeat",backgroundPosition:"0 0",backgroundSize:`1px ${te?`${Number(oe)/2+.3}rem`:"100%"}`}:{}},children:[O.jsxs("div",{style:{display:"flex",alignItems:"center",minHeight:28,opacity:Z?.6:1,cursor:Z?"not-allowed":"default",position:"relative",paddingLeft:H>2&&X?12:0,width:"fit-content"},children:[H>2&&O.jsx("span",{style:{position:"absolute",left:0,top:"50%",width:`${Number(oe)/2}rem`,height:1,backgroundColor:"#D9D9D9",transform:"translateY(-50%)",pointerEvents:"none"}}),X&&O.jsx("button",{type:"button","aria-label":J?"collapse":"expand",onClick:()=>L(String(V.id)),disabled:Z,style:{width:`${oe}rem`,height:`${oe}rem`,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",background:"transparent",padding:0,cursor:"pointer"},children:ne()}),r?O.jsx("input",{type:"checkbox",checked:x.has(String(V.id)),onChange:Y=>F(Y,V,!0),disabled:Z}):null,O.jsx("button",{type:"button",onClick:Y=>{W(Y,V)},disabled:Z,style:{border:"none",background:"transparent",padding:X?"0.4rem 0.6rem":`0.4rem ${Number(oe)/2+.6}rem`,textAlign:"left",cursor:Z?"not-allowed":"pointer",fontWeight:re?"600":"500",fontSize:H===1?"var(--ds-font-size-base)":H===2?"var(--ds-font-size-14)":"var(--ds-font-size-sm)",color:re?"#0075F6":H===1?"#2D2D2D":H===2?"#333333":"#515A6E"},children:String(V.label??"")})]}),J&&X?O.jsx("div",{style:{margin:0,paddingLeft:0},children:V.children.map((Y,pe,ie)=>O.jsx(_,{item:Y,depth:H+1,index:pe,siblings:ie,ancestorHasNext:[...Q,z<q.length-1]},String(Y.id)))}):null]})};return O.jsx("div",{style:{margin:0,padding:0},children:w.map((V,H,z)=>O.jsx(_,{item:V,depth:1,index:H,siblings:z,ancestorHasNext:[]},String(V.id)))})});dF.displayName="PlainTree";const Sve=({className:e,items:t,title:n,isItemDisabled:r,checkboxSelection:o=!1,multiSelect:a=!1,onItemSelectionToggle:s,onItemClick:l,onItemDoubleClick:c,onAddRow:u,onDeleteRow:d,onSave:A,previewText:p,defaultExpanded:g,isLoading:v,maxLevel:h=999,minLevel:y=0,scrollTo:x,editItems:C,tableData:w})=>{const E=G.useRef(null),[S,R]=G.useState(null),[I,k]=G.useState({open:!1,type:"info",content:"",onOk:()=>{}}),M=N=>Number((N==null?void 0:N.menuLvSeq)??1),P=()=>{var j,$;if(!u||typeof u!="function")return;if(!S){k({open:!0,type:"info",content:"선택된 행이 없습니다. 행을 선택해주세요."});return}if(String(S.label)==="+"){k({open:!0,type:"info",content:"추가 중인 항목에는 하위 항목을 추가할 수 없습니다."});return}if((j=E.current)==null||j.expand(String(S.id)),M(S)>=h){k({open:!0,type:"info",content:`${h}번째 레벨 이상은 추가할 수 없습니다.`});return}if(M(S)<=y){k({open:!0,type:"info",content:`${y}번째 레벨 이하로는 추가할 수 없습니다.`});return}if(w&&w.findIndex(W=>W.id===S.id)===-1){k({open:!0,type:"info",content:"테이블에 없는 항목에는 하위 항목을 추가할 수 없습니다."});return}const N=(($=E.current)==null?void 0:$.startInlineAdd(String(S.id)))||null;N&&u(N,String(S.id))},[D,L]=wve(),F=L||0;return O.jsxs(fve,{className:e,children:[O.jsxs(Ave,{direction:"row",spacing:2,ref:D,children:[n?O.jsxs(pve,{children:[O.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("path",{d:"M6.17576 21.8775L0.884971 19.3548C0.345741 19.0955 0 18.548 0 17.9462V7.2375C0 6.3219 0.945237 5.71683 1.7636 6.1106L7.05439 8.6333C7.59362 8.89262 7.93936 9.44006 7.93936 10.0419V20.7506C7.93936 21.6662 6.99412 22.2713 6.17576 21.8775Z",fill:"#F83A3A",fillOpacity:"0.6"}),O.jsx("path",{d:"M11.7969 18.8846L6.50606 16.3619C5.96684 16.1026 5.62109 15.5551 5.62109 14.9533V4.2414C5.62109 3.3258 6.56633 2.72074 7.38469 3.11451L12.6755 5.63721C13.2147 5.89652 13.5605 6.44396 13.5605 7.04583V17.7545C13.5605 18.6701 12.6152 19.2752 11.7969 18.8814V18.8846Z",fill:"#4A6DFD"}),O.jsx("path",{d:"M17.4209 15.8924L12.1301 13.3697C11.5909 13.1104 11.2451 12.563 11.2451 11.9611V1.24921C11.2451 0.333616 12.1904 -0.271448 13.0087 0.122323L18.2995 2.64502C18.8387 2.90434 19.1845 3.45178 19.1845 4.05364V14.7623C19.1845 15.6779 18.2392 16.283 17.4209 15.8892V15.8924Z",fill:"#1D3475",fillOpacity:"0.8"}),O.jsx("path",{d:"M7.05457 8.62916L5.62402 7.94727V14.9487C5.62402 15.5506 5.96976 16.1012 6.50899 16.3573L7.93954 17.0392V10.041C7.93954 9.43912 7.5938 8.88848 7.05457 8.63236V8.62916Z",fill:"#5652FF"}),O.jsx("path",{d:"M12.6757 5.63698L11.2451 4.95508V11.9565C11.2451 12.5584 11.5909 13.109 12.1301 13.3651L13.5606 14.047V7.04879C13.5606 6.44693 13.2149 5.89629 12.6757 5.64018V5.63698Z",fill:"#365DEA"})]}),O.jsx(gve,{children:n})]}):O.jsx("span",{}),O.jsxs(hve,{children:[u&&O.jsx(fr,{variant:"outlined",size:"xsmall",iconOnly:!0,onClick:P,children:O.jsx(Db,{fontSize:"small"})}),d&&O.jsx(fr,{variant:"outlined",size:"xsmall",iconOnly:!0,onClick:()=>{k({open:!0,type:"confirm",content:"삭제하시겠습니까?",onOk:()=>{var N;S&&((S==null?void 0:S.crud)==="C"&&((N=E.current)==null||N.remove(String(S.id))),d==null||d(S),R(null),k({open:!1,type:"info",content:"",onOk:()=>{}}))}})},disabled:!S,children:O.jsx(Bb,{fontSize:"small"})}),O.jsx(fr,{variant:"outlined",size:"xsmall",iconOnly:!0,onClick:()=>{var N;return(N=E.current)==null?void 0:N.expandAll()},title:"모두 펼치기",children:O.jsx(QT,{fontSize:"small"})}),O.jsx(fr,{variant:"outlined",size:"xsmall",iconOnly:!0,onClick:()=>{var N;return(N=E.current)==null?void 0:N.collapseAll()},title:"모두 접기",children:O.jsx(GT,{fontSize:"small"})})]})]}),O.jsxs("div",{style:{height:F>0?`calc(100% - (${F}px + 1rem))`:"100%"},children:[p?O.jsx(mve,{children:p}):null,O.jsx(vve,{style:{height:p?"calc(100% - 4.8rem)":"100%"},children:O.jsxs(NA,{children:[O.jsx(yve,{children:v?O.jsx("div",{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center",backgroundColor:"white",paddingBottom:"2rem"},children:O.jsx(kA,{color:"inherit",style:{opacity:.4},disableShrink:!0})}):O.jsx(dF,{ref:E,items:t,defaultExpanded:g,isItemDisabled:r,checkboxSelection:o,multiSelect:a,onItemSelectionToggle:s,onItemClick:(N,j,$)=>{R($),l==null||l(N,j,$)},onItemDoubleClick:(N,j)=>c==null?void 0:c(N,j),onSelectedItemChange:N=>R(N),scrollTo:x,editItems:C,onInlineCreate:()=>A==null?void 0:A()})}),O.jsx(bc,{}),O.jsx(bc,{orientation:"horizontal"})]})})]}),O.jsx(cl,{open:I.open,type:I.type==="confirm"?"confirm":I.type,...I.type==="confirm"?{onOk:I.onOk}:{},onClose:()=>k({...I,open:!1}),dialogContent:I.content,size:"sm"})]})},fF={height:"3rem",color:"var(--ds-table-text-color)",fontSize:"1.2rem",border:"1px solid #D5D7DC"},Eve=Xl("div")({width:"100%"}),Ove=Xl("div")({width:"100%",borderTop:"1px solid #333333"}),Ive=Xl("table")({width:"100%",borderCollapse:"collapse"}),Tve=Xl("th")({...fF,padding:"0 1rem",backgroundColor:"#fafafa",textAlign:"left",fontWeight:"600",color:"var(--ds-table-header-color)"}),Rve=Xl("td")({...fF}),Pve=({colGroup:e})=>O.jsx("colgroup",{children:e&&e.map((t,n)=>O.jsx("col",{style:{width:t}},n))}),kve=({formData:e,setField:t,accessorKey:n})=>O.jsx(os,{checked:(e==null?void 0:e[n])==="Y",onChange:r=>t==null?void 0:t(n,r.target.checked?"Y":"N"),name:n}),Mve=({accessorKey:e,formData:t,setField:n})=>{const r=t[e];let o=null;return typeof r=="string"&&/^\d{8}$/.test(r)?o=An(r,"YYYYMMDD"):r&&(o=An.isDayjs(r)?r:An(r)),O.jsx(Dve,{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},children:O.jsx(ia,{value:o,locale:lv,onChange:a=>n(e,a?An(a).format("YYYYMMDD"):""),name:e,style:{width:"100%",borderRadius:"var(--ds-radius-sm)",fontSize:"var(--ds-table-body-font-size)",textAlign:"center",outline:"none",height:"2.5rem"}})})},Dve=fs.span`
|
|
827
|
+
}`;var cn=y$(function(){return En(ee,Rt+"return "+Ke).apply(n,ce)});if(cn.source=Ke,T2(cn))throw cn;return cn}function LCe(f){return Nn(f).toLowerCase()}function $Ce(f){return Nn(f).toUpperCase()}function VCe(f,m,T){if(f=Nn(f),f&&(T||m===n))return TF(f);if(!f||!(m=oi(m)))return f;var B=fa(f),U=fa(m),ee=RF(B,U),ce=PF(B,U)+1;return Cl(B,ee,ce).join("")}function HCe(f,m,T){if(f=Nn(f),f&&(T||m===n))return f.slice(0,MF(f)+1);if(!f||!(m=oi(m)))return f;var B=fa(f),U=PF(B,fa(m))+1;return Cl(B,0,U).join("")}function zCe(f,m,T){if(f=Nn(f),f&&(T||m===n))return f.replace(Pt,"");if(!f||!(m=oi(m)))return f;var B=fa(f),U=RF(B,fa(m));return Cl(B,U).join("")}function _Ce(f,m){var T=P,B=D;if(sr(m)){var U="separator"in m?m.separator:U;T="length"in m?nn(m.length):T,B="omission"in m?oi(m.omission):B}f=Nn(f);var ee=f.length;if(sd(f)){var ce=fa(f);ee=ce.length}if(T>=ee)return f;var de=T-ld(B);if(de<1)return B;var ve=ce?Cl(ce,0,de).join(""):f.slice(0,de);if(U===n)return ve+B;if(ce&&(de+=ve.length-de),R2(U)){if(f.slice(de).search(U)){var ze,We=ve;for(U.global||(U=US(U.source,Nn(Se.exec(U))+"g")),U.lastIndex=0;ze=U.exec(We);)var Ke=ze.index;ve=ve.slice(0,Ke===n?de:Ke)}}else if(f.indexOf(oi(U),de)!=de){var ht=ve.lastIndexOf(U);ht>-1&&(ve=ve.slice(0,ht))}return ve+B}function WCe(f){return f=Nn(f),f&&Gt.test(f)?f.replace(st,y0e):f}var UCe=gd(function(f,m,T){return f+(T?" ":"")+m.toUpperCase()}),M2=bL("toUpperCase");function v$(f,m,T){return f=Nn(f),m=T?n:m,m===n?p0e(f)?C0e(f):i0e(f):f.match(m)||[]}var y$=fn(function(f,m){try{return ni(f,n,m)}catch(T){return T2(T)?T:new Jt(T)}}),YCe=xs(function(f,m){return Fi(m,function(T){T=Ua(T),ys(f,T,O2(f[T],f))}),f});function qCe(f){var m=f==null?0:f.length,T=Ft();return f=m?or(f,function(B){if(typeof B[1]!="function")throw new Li(s);return[T(B[0]),B[1]]}):[],fn(function(B){for(var U=-1;++U<m;){var ee=f[U];if(ni(ee[0],this,B))return ni(ee[1],this,B)}})}function GCe(f){return yye(Vi(f,A))}function D2(f){return function(){return f}}function QCe(f,m){return f==null||f!==f?m:f}var XCe=CL(),KCe=CL(!0);function $o(f){return f}function N2(f){return JF(typeof f=="function"?f:Vi(f,A))}function JCe(f){return eL(Vi(f,A))}function ZCe(f,m){return tL(f,Vi(m,A))}var ewe=fn(function(f,m){return function(T){return JA(T,f,m)}}),twe=fn(function(f,m){return function(T){return JA(f,T,m)}});function B2(f,m,T){var B=Gr(m),U=g0(m,B);T==null&&!(sr(m)&&(U.length||!B.length))&&(T=m,m=f,f=this,U=g0(m,Gr(m)));var ee=!(sr(T)&&"chain"in T)||!!T.chain,ce=ws(f);return Fi(U,function(de){var ve=m[de];f[de]=ve,ce&&(f.prototype[de]=function(){var ze=this.__chain__;if(ee||ze){var We=f(this.__wrapped__),Ke=We.__actions__=jo(this.__actions__);return Ke.push({func:ve,args:arguments,thisArg:f}),We.__chain__=ze,We}return ve.apply(f,hl([this.value()],arguments))})}),f}function nwe(){return Jr._===this&&(Jr._=T0e),this}function j2(){}function rwe(f){return f=nn(f),fn(function(m){return nL(m,f)})}var owe=A2(or),iwe=A2(wF),awe=A2(LS);function b$(f){return b2(f)?$S(Ua(f)):jye(f)}function swe(f){return function(m){return f==null?n:Oc(f,m)}}var lwe=SL(),cwe=SL(!0);function F2(){return[]}function L2(){return!1}function uwe(){return{}}function dwe(){return""}function fwe(){return!0}function Awe(f,m){if(f=nn(f),f<1||f>_)return[];var T=z,B=fo(f,z);m=Ft(m),f-=z;for(var U=zS(B,m);++T<f;)m(T);return U}function pwe(f){return en(f)?or(f,Ua):ii(f)?[f]:jo(VL(Nn(f)))}function gwe(f){var m=++O0e;return Nn(f)+m}var hwe=x0(function(f,m){return f+m},0),mwe=p2("ceil"),vwe=x0(function(f,m){return f/m},1),ywe=p2("floor");function bwe(f){return f&&f.length?p0(f,$o,ZS):n}function xwe(f,m){return f&&f.length?p0(f,Ft(m,2),ZS):n}function Cwe(f){return OF(f,$o)}function wwe(f,m){return OF(f,Ft(m,2))}function Swe(f){return f&&f.length?p0(f,$o,r2):n}function Ewe(f,m){return f&&f.length?p0(f,Ft(m,2),r2):n}var Owe=x0(function(f,m){return f*m},1),Iwe=p2("round"),Twe=x0(function(f,m){return f-m},0);function Rwe(f){return f&&f.length?HS(f,$o):0}function Pwe(f,m){return f&&f.length?HS(f,Ft(m,2)):0}return K.after=J1e,K.ary=KL,K.assign=$xe,K.assignIn=d$,K.assignInWith=N0,K.assignWith=Vxe,K.at=Hxe,K.before=JL,K.bind=O2,K.bindAll=YCe,K.bindKey=ZL,K.castArray=uxe,K.chain=GL,K.chunk=ybe,K.compact=bbe,K.concat=xbe,K.cond=qCe,K.conforms=GCe,K.constant=D2,K.countBy=R1e,K.create=zxe,K.curry=e$,K.curryRight=t$,K.debounce=n$,K.defaults=_xe,K.defaultsDeep=Wxe,K.defer=Z1e,K.delay=exe,K.difference=Cbe,K.differenceBy=wbe,K.differenceWith=Sbe,K.drop=Ebe,K.dropRight=Obe,K.dropRightWhile=Ibe,K.dropWhile=Tbe,K.fill=Rbe,K.filter=k1e,K.flatMap=N1e,K.flatMapDeep=B1e,K.flatMapDepth=j1e,K.flatten=WL,K.flattenDeep=Pbe,K.flattenDepth=kbe,K.flip=txe,K.flow=XCe,K.flowRight=KCe,K.fromPairs=Mbe,K.functions=Kxe,K.functionsIn=Jxe,K.groupBy=F1e,K.initial=Nbe,K.intersection=Bbe,K.intersectionBy=jbe,K.intersectionWith=Fbe,K.invert=eCe,K.invertBy=tCe,K.invokeMap=$1e,K.iteratee=N2,K.keyBy=V1e,K.keys=Gr,K.keysIn=Lo,K.map=T0,K.mapKeys=rCe,K.mapValues=oCe,K.matches=JCe,K.matchesProperty=ZCe,K.memoize=P0,K.merge=iCe,K.mergeWith=f$,K.method=ewe,K.methodOf=twe,K.mixin=B2,K.negate=k0,K.nthArg=rwe,K.omit=aCe,K.omitBy=sCe,K.once=nxe,K.orderBy=H1e,K.over=owe,K.overArgs=rxe,K.overEvery=iwe,K.overSome=awe,K.partial=I2,K.partialRight=r$,K.partition=z1e,K.pick=lCe,K.pickBy=A$,K.property=b$,K.propertyOf=swe,K.pull=Hbe,K.pullAll=YL,K.pullAllBy=zbe,K.pullAllWith=_be,K.pullAt=Wbe,K.range=lwe,K.rangeRight=cwe,K.rearg=oxe,K.reject=U1e,K.remove=Ube,K.rest=ixe,K.reverse=S2,K.sampleSize=q1e,K.set=uCe,K.setWith=dCe,K.shuffle=G1e,K.slice=Ybe,K.sortBy=K1e,K.sortedUniq=Zbe,K.sortedUniqBy=e1e,K.split=NCe,K.spread=axe,K.tail=t1e,K.take=n1e,K.takeRight=r1e,K.takeRightWhile=o1e,K.takeWhile=i1e,K.tap=b1e,K.throttle=sxe,K.thru=I0,K.toArray=l$,K.toPairs=p$,K.toPairsIn=g$,K.toPath=pwe,K.toPlainObject=u$,K.transform=fCe,K.unary=lxe,K.union=a1e,K.unionBy=s1e,K.unionWith=l1e,K.uniq=c1e,K.uniqBy=u1e,K.uniqWith=d1e,K.unset=ACe,K.unzip=E2,K.unzipWith=qL,K.update=pCe,K.updateWith=gCe,K.values=vd,K.valuesIn=hCe,K.without=f1e,K.words=v$,K.wrap=cxe,K.xor=A1e,K.xorBy=p1e,K.xorWith=g1e,K.zip=h1e,K.zipObject=m1e,K.zipObjectDeep=v1e,K.zipWith=y1e,K.entries=p$,K.entriesIn=g$,K.extend=d$,K.extendWith=N0,B2(K,K),K.add=hwe,K.attempt=y$,K.camelCase=bCe,K.capitalize=h$,K.ceil=mwe,K.clamp=mCe,K.clone=dxe,K.cloneDeep=Axe,K.cloneDeepWith=pxe,K.cloneWith=fxe,K.conformsTo=gxe,K.deburr=m$,K.defaultTo=QCe,K.divide=vwe,K.endsWith=xCe,K.eq=pa,K.escape=CCe,K.escapeRegExp=wCe,K.every=P1e,K.find=M1e,K.findIndex=zL,K.findKey=Uxe,K.findLast=D1e,K.findLastIndex=_L,K.findLastKey=Yxe,K.floor=ywe,K.forEach=QL,K.forEachRight=XL,K.forIn=qxe,K.forInRight=Gxe,K.forOwn=Qxe,K.forOwnRight=Xxe,K.get=P2,K.gt=hxe,K.gte=mxe,K.has=Zxe,K.hasIn=k2,K.head=UL,K.identity=$o,K.includes=L1e,K.indexOf=Dbe,K.inRange=vCe,K.invoke=nCe,K.isArguments=Rc,K.isArray=en,K.isArrayBuffer=vxe,K.isArrayLike=Fo,K.isArrayLikeObject=Cr,K.isBoolean=yxe,K.isBuffer=wl,K.isDate=bxe,K.isElement=xxe,K.isEmpty=Cxe,K.isEqual=wxe,K.isEqualWith=Sxe,K.isError=T2,K.isFinite=Exe,K.isFunction=ws,K.isInteger=o$,K.isLength=M0,K.isMap=i$,K.isMatch=Oxe,K.isMatchWith=Ixe,K.isNaN=Txe,K.isNative=Rxe,K.isNil=kxe,K.isNull=Pxe,K.isNumber=a$,K.isObject=sr,K.isObjectLike=gr,K.isPlainObject=op,K.isRegExp=R2,K.isSafeInteger=Mxe,K.isSet=s$,K.isString=D0,K.isSymbol=ii,K.isTypedArray=md,K.isUndefined=Dxe,K.isWeakMap=Nxe,K.isWeakSet=Bxe,K.join=Lbe,K.kebabCase=SCe,K.last=zi,K.lastIndexOf=$be,K.lowerCase=ECe,K.lowerFirst=OCe,K.lt=jxe,K.lte=Fxe,K.max=bwe,K.maxBy=xwe,K.mean=Cwe,K.meanBy=wwe,K.min=Swe,K.minBy=Ewe,K.stubArray=F2,K.stubFalse=L2,K.stubObject=uwe,K.stubString=dwe,K.stubTrue=fwe,K.multiply=Owe,K.nth=Vbe,K.noConflict=nwe,K.noop=j2,K.now=R0,K.pad=ICe,K.padEnd=TCe,K.padStart=RCe,K.parseInt=PCe,K.random=yCe,K.reduce=_1e,K.reduceRight=W1e,K.repeat=kCe,K.replace=MCe,K.result=cCe,K.round=Iwe,K.runInContext=ge,K.sample=Y1e,K.size=Q1e,K.snakeCase=DCe,K.some=X1e,K.sortedIndex=qbe,K.sortedIndexBy=Gbe,K.sortedIndexOf=Qbe,K.sortedLastIndex=Xbe,K.sortedLastIndexBy=Kbe,K.sortedLastIndexOf=Jbe,K.startCase=BCe,K.startsWith=jCe,K.subtract=Twe,K.sum=Rwe,K.sumBy=Pwe,K.template=FCe,K.times=Awe,K.toFinite=Ss,K.toInteger=nn,K.toLength=c$,K.toLower=LCe,K.toNumber=_i,K.toSafeInteger=Lxe,K.toString=Nn,K.toUpper=$Ce,K.trim=VCe,K.trimEnd=HCe,K.trimStart=zCe,K.truncate=_Ce,K.unescape=WCe,K.uniqueId=gwe,K.upperCase=UCe,K.upperFirst=M2,K.each=QL,K.eachRight=XL,K.first=UL,B2(K,(function(){var f={};return _a(K,function(m,T){Ln.call(K.prototype,T)||(f[T]=m)}),f})(),{chain:!1}),K.VERSION=r,Fi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(f){K[f].placeholder=K}),Fi(["drop","take"],function(f,m){mn.prototype[f]=function(T){T=T===n?1:Fr(nn(T),0);var B=this.__filtered__&&!m?new mn(this):this.clone();return B.__filtered__?B.__takeCount__=fo(T,B.__takeCount__):B.__views__.push({size:fo(T,z),type:f+(B.__dir__<0?"Right":"")}),B},mn.prototype[f+"Right"]=function(T){return this.reverse()[f](T).reverse()}}),Fi(["filter","map","takeWhile"],function(f,m){var T=m+1,B=T==N||T==$;mn.prototype[f]=function(U){var ee=this.clone();return ee.__iteratees__.push({iteratee:Ft(U,3),type:T}),ee.__filtered__=ee.__filtered__||B,ee}}),Fi(["head","last"],function(f,m){var T="take"+(m?"Right":"");mn.prototype[f]=function(){return this[T](1).value()[0]}}),Fi(["initial","tail"],function(f,m){var T="drop"+(m?"":"Right");mn.prototype[f]=function(){return this.__filtered__?new mn(this):this[T](1)}}),mn.prototype.compact=function(){return this.filter($o)},mn.prototype.find=function(f){return this.filter(f).head()},mn.prototype.findLast=function(f){return this.reverse().find(f)},mn.prototype.invokeMap=fn(function(f,m){return typeof f=="function"?new mn(this):this.map(function(T){return JA(T,f,m)})}),mn.prototype.reject=function(f){return this.filter(k0(Ft(f)))},mn.prototype.slice=function(f,m){f=nn(f);var T=this;return T.__filtered__&&(f>0||m<0)?new mn(T):(f<0?T=T.takeRight(-f):f&&(T=T.drop(f)),m!==n&&(m=nn(m),T=m<0?T.dropRight(-m):T.take(m-f)),T)},mn.prototype.takeRightWhile=function(f){return this.reverse().takeWhile(f).reverse()},mn.prototype.toArray=function(){return this.take(z)},_a(mn.prototype,function(f,m){var T=/^(?:filter|find|map|reject)|While$/.test(m),B=/^(?:head|last)$/.test(m),U=K[B?"take"+(m=="last"?"Right":""):m],ee=B||/^find/.test(m);U&&(K.prototype[m]=function(){var ce=this.__wrapped__,de=B?[1]:arguments,ve=ce instanceof mn,ze=de[0],We=ve||en(ce),Ke=function(gn){var bn=U.apply(K,hl([gn],de));return B&&ht?bn[0]:bn};We&&T&&typeof ze=="function"&&ze.length!=1&&(ve=We=!1);var ht=this.__chain__,Rt=!!this.__actions__.length,Vt=ee&&!ht,cn=ve&&!Rt;if(!ee&&We){ce=cn?ce:new mn(this);var Ht=f.apply(ce,de);return Ht.__actions__.push({func:I0,args:[Ke],thisArg:n}),new $i(Ht,ht)}return Vt&&cn?f.apply(this,de):(Ht=this.thru(Ke),Vt?B?Ht.value()[0]:Ht.value():Ht)})}),Fi(["pop","push","shift","sort","splice","unshift"],function(f){var m=Zv[f],T=/^(?:push|sort|unshift)$/.test(f)?"tap":"thru",B=/^(?:pop|shift)$/.test(f);K.prototype[f]=function(){var U=arguments;if(B&&!this.__chain__){var ee=this.value();return m.apply(en(ee)?ee:[],U)}return this[T](function(ce){return m.apply(en(ce)?ce:[],U)})}}),_a(mn.prototype,function(f,m){var T=K[m];if(T){var B=T.name+"";Ln.call(fd,B)||(fd[B]=[]),fd[B].push({name:m,func:T})}}),fd[b0(n,x).name]=[{name:"wrapper",func:n}],mn.prototype.clone=W0e,mn.prototype.reverse=U0e,mn.prototype.value=Y0e,K.prototype.at=x1e,K.prototype.chain=C1e,K.prototype.commit=w1e,K.prototype.next=S1e,K.prototype.plant=O1e,K.prototype.reverse=I1e,K.prototype.toJSON=K.prototype.valueOf=K.prototype.value=T1e,K.prototype.first=K.prototype.head,UA&&(K.prototype[UA]=E1e),K}),cd=w0e();xc?((xc.exports=cd)._=cd,NS._=cd):Jr._=cd}).call(bve)})(VA,VA.exports)),VA.exports}var Cve=xve();const wve=()=>{const e=G.useRef(null),[t,n]=G.useState(0);return G.useEffect(()=>{if(!e.current)return;const r=new ResizeObserver(Cve.debounce(o=>{const a=o[0].contentRect.height;n(a)},100));return r.observe(e.current),()=>r.disconnect()},[]),[e,t]},dF=G.forwardRef(({items:e,defaultExpanded:t,isItemDisabled:n,checkboxSelection:r,multiSelect:o,onItemSelectionToggle:a,onItemClick:s,onItemDoubleClick:l,onSelectedItemChange:c,scrollTo:u,editItems:d,onInlineCreate:A},p)=>{const[g,v]=G.useState([]),[h,y]=G.useState(()=>new Set),[x,C]=G.useState(()=>new Set),[w,E]=G.useState(e),[S,R]=G.useState(null),I=G.useCallback((V,H)=>{var z;for(const q of V){if(String(q.id)===String(H))return q;if((z=q.children)!=null&&z.length){const Q=I(q.children,H);if(Q)return Q}}return null},[]),k=G.useCallback(()=>{const V=[],H=z=>{var q;(q=z.children)!=null&&q.length&&(V.push(String(z.id)),z.children.forEach(H))};return w.forEach(H),V},[w]),M=V=>!!(n!=null&&n(V));G.useEffect(()=>{t&&w.length>0&&v(k())},[t,w.length,k]),G.useEffect(()=>{if(!(d!=null&&d.length))return;const V=new Map(d.map(z=>[String(z.id),z.label])),H=z=>{console.log(z);let q=!1;const Q=z.map(X=>{const J=V.get(String(X.id));let Z=X.children;if(Z!=null&&Z.length){const re=H(Z);re!==Z&&(Z=re)}return J!==void 0&&J!==X.label||Z!==X.children?(q=!0,{...X,label:J??X.label,...Z!==X.children?{children:Z}:{}}):X});return q?Q:z};E(z=>H(z))},[d]),G.useEffect(()=>{E(e)},[e]);const P=G.useCallback((V,H,z=[])=>{var q;for(const Q of V){const X=[...z,String(Q.id)];if(String(Q.id)===H)return X;if((q=Q.children)!=null&&q.length){const J=P(Q.children,H,X);if(J)return J}}return null},[]);G.useEffect(()=>{if(!u)return;const V=P(w,u);if(!V)return;const H=V.slice(0,-1);v(q=>Array.from(new Set([...q,...H])));const z=I(w,u);R(u),o||y(new Set([u])),c==null||c(z),requestAnimationFrame(()=>{const q=document.querySelector(`[data-tree-id='${u}']`);q&&"scrollIntoView"in q&&q.scrollIntoView({block:"nearest",behavior:"smooth"})})},[u,w,o,P,I,c]);const D=G.useCallback((V,H)=>{let z=!1;const q=V.map(Q=>{var X;if(String(Q.id)===H)return z=!0,null;if((X=Q.children)!=null&&X.length){const J=D(Q.children,H);if(J!==Q.children)return z=!0,{...Q,children:J}}return Q}).filter(Boolean);return z?q:V},[]);G.useImperativeHandle(p,()=>({expandAll:()=>v(k()),collapseAll:()=>v([]),getSelectedItemId:()=>S,expand:V=>{const z=(P(w,String(V))??[String(V)]).slice(0,-1);v(q=>Array.from(new Set([...q,...z,String(V)])))},startInlineAdd:V=>{var X;const H=I(w,V);if(!H)return null;const z=Number(H.menuLvSeq??1)+1,q={id:`${V}_new_${(((X=H.children)==null?void 0:X.length)??0)+1}_${Date.now()}`,parentId:V,label:"+",crud:"C",menuLvSeq:String(z),children:[]},Q=J=>J.map(Z=>String(Z.id)===V?{...Z,children:[q,...Z.children??[]]}:Z.children?{...Z,children:Q(Z.children)}:Z);return E(J=>Q(J)),v(J=>J.includes(V)?J:[...J,V]),R(q.id),o||y(new Set([q.id])),c==null||c(q),A==null||A(H,q),requestAnimationFrame(()=>{const J=document.querySelector(`[data-tree-id='${q.id}']`);J&&"scrollIntoView"in J&&J.scrollIntoView({block:"center",behavior:"smooth"})}),q},remove:V=>{E(H=>D(H,String(V))),v(H=>H.filter(z=>z!==String(V))),y(H=>{const z=new Set(H);return z.delete(String(V)),z}),C(H=>{const z=new Set(H);return z.delete(String(V)),z}),S===String(V)&&(R(null),c==null||c(null))}}));const L=V=>v(H=>H.includes(V)?H.filter(z=>z!==V):[...H,V]),F=(V,H,z=!1)=>{if(M(H))return;if(r&&z){const Q=new Set(x),X=String(H.id);Q.has(X)?Q.delete(X):Q.add(X),C(Q),a==null||a(V,X,Q.has(X));return}const q=String(H.id);if(R(q),o){const Q=new Set(h);Q.has(q)?Q.delete(q):Q.add(q),y(Q),a==null||a(V,q,Q.has(q))}else y(new Set([q])),a==null||a(V,q,!0);c==null||c(H),s==null||s(V,q,H)},N=200,j=G.useRef(null),$=G.useRef(null),W=(V,H)=>{const z=String(H.id),q=V.timeStamp,Q=j.current;if(Q&&Q.id===z&&q-Q.t<N){$.current&&(clearTimeout($.current),$.current=null),j.current=null,l==null||l(z,H);return}j.current={id:z,t:q},$.current&&clearTimeout($.current),$.current=window.setTimeout(()=>{F(V,H),$.current=null},0)},_=({item:V,depth:H,index:z,siblings:q,ancestorHasNext:Q})=>{var le;const X=!!((le=V.children)!=null&&le.length),J=g.includes(String(V.id)),Z=M(V),re=h.has(String(V.id)),oe="2.2",te=z===q.length-1,ne=()=>{switch(H){case 1:return X&&J?O.jsx(nG,{sx:{fontSize:"var(--ds-font-size-xl)"}}):O.jsx(YT,{sx:{fontSize:"var(--ds-font-size-xl)"}});default:return X?J?O.jsx(qT,{sx:{fontSize:"var(--ds-font-size-xl)"},htmlColor:"#ADB8C2"}):O.jsx(Jq,{sx:{fontSize:"var(--ds-font-size-xl)"},htmlColor:"#ADB8C2"}):O.jsx("div",{style:{width:`${oe}rem`,height:`${oe}rem`}})}};return O.jsxs("div",{"data-tree-id":String(V.id),style:{marginLeft:H===1||H===0?0:H>3?`${oe}rem`:H===2&&X?`${oe}rem`:`${Number(oe)/2}rem`,borderLeft:"1px solid transparent",position:"relative",...H>2?{backgroundImage:"linear-gradient(#D9D9D9, #D9D9D9)",backgroundRepeat:"no-repeat",backgroundPosition:"0 0",backgroundSize:`1px ${te?`${Number(oe)/2+.3}rem`:"100%"}`}:{}},children:[O.jsxs("div",{style:{display:"flex",alignItems:"center",minHeight:28,opacity:Z?.6:1,cursor:Z?"not-allowed":"default",position:"relative",paddingLeft:H>2&&X?12:0,width:"fit-content"},children:[H>2&&O.jsx("span",{style:{position:"absolute",left:0,top:"50%",width:`${Number(oe)/2}rem`,height:1,backgroundColor:"#D9D9D9",transform:"translateY(-50%)",pointerEvents:"none"}}),X&&O.jsx("button",{type:"button","aria-label":J?"collapse":"expand",onClick:()=>L(String(V.id)),disabled:Z,style:{width:`${oe}rem`,height:`${oe}rem`,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",background:"transparent",padding:0,cursor:"pointer"},children:ne()}),r?O.jsx("input",{type:"checkbox",checked:x.has(String(V.id)),onChange:Y=>F(Y,V,!0),disabled:Z}):null,O.jsx("button",{type:"button",onClick:Y=>{W(Y,V)},disabled:Z,style:{border:"none",background:"transparent",padding:X?"0.4rem 0.6rem":`0.4rem ${Number(oe)/2+.6}rem`,textAlign:"left",cursor:Z?"not-allowed":"pointer",fontWeight:re?"600":"500",fontSize:H===1?"var(--ds-font-size-base)":H===2?"var(--ds-font-size-14)":"var(--ds-font-size-sm)",color:re?"#0075F6":H===1?"#2D2D2D":H===2?"#333333":"#515A6E"},children:String(V.label??"")})]}),J&&X?O.jsx("div",{style:{margin:0,paddingLeft:0},children:V.children.map((Y,pe,ie)=>O.jsx(_,{item:Y,depth:H+1,index:pe,siblings:ie,ancestorHasNext:[...Q,z<q.length-1]},String(Y.id)))}):null]})};return O.jsx("div",{style:{margin:0,padding:0},children:w.map((V,H,z)=>O.jsx(_,{item:V,depth:1,index:H,siblings:z,ancestorHasNext:[]},String(V.id)))})});dF.displayName="PlainTree";const Sve=({className:e,items:t,title:n,isItemDisabled:r,checkboxSelection:o=!1,multiSelect:a=!1,onItemSelectionToggle:s,onItemClick:l,onItemDoubleClick:c,onAddRow:u,onDeleteRow:d,onSave:A,previewText:p,defaultExpanded:g,isLoading:v,maxLevel:h=999,minLevel:y=void 0,scrollTo:x,editItems:C,tableData:w})=>{const E=G.useRef(null),[S,R]=G.useState(null),[I,k]=G.useState({open:!1,type:"info",content:"",onOk:()=>{}}),M=N=>Number((N==null?void 0:N.menuLvSeq)??1),P=()=>{var j,$;if(!u||typeof u!="function")return;if(!S){k({open:!0,type:"info",content:"선택된 행이 없습니다. 행을 선택해주세요."});return}if(String(S.label)==="+"){k({open:!0,type:"info",content:"추가 중인 항목에는 하위 항목을 추가할 수 없습니다."});return}if((j=E.current)==null||j.expand(String(S.id)),M(S)>=h){k({open:!0,type:"info",content:`${h}번째 레벨 이상은 추가할 수 없습니다.`});return}if(y&&M(S)<=y){k({open:!0,type:"info",content:`${y}번째 레벨 이하로는 추가할 수 없습니다.`});return}if(w&&w.findIndex(W=>W.id===S.id)===-1){k({open:!0,type:"info",content:"테이블에 없는 항목에는 하위 항목을 추가할 수 없습니다."});return}const N=(($=E.current)==null?void 0:$.startInlineAdd(String(S.id)))||null;N&&u(N,String(S.id))},[D,L]=wve(),F=L||0;return O.jsxs(fve,{className:e,children:[O.jsxs(Ave,{direction:"row",spacing:2,ref:D,children:[n?O.jsxs(pve,{children:[O.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("path",{d:"M6.17576 21.8775L0.884971 19.3548C0.345741 19.0955 0 18.548 0 17.9462V7.2375C0 6.3219 0.945237 5.71683 1.7636 6.1106L7.05439 8.6333C7.59362 8.89262 7.93936 9.44006 7.93936 10.0419V20.7506C7.93936 21.6662 6.99412 22.2713 6.17576 21.8775Z",fill:"#F83A3A",fillOpacity:"0.6"}),O.jsx("path",{d:"M11.7969 18.8846L6.50606 16.3619C5.96684 16.1026 5.62109 15.5551 5.62109 14.9533V4.2414C5.62109 3.3258 6.56633 2.72074 7.38469 3.11451L12.6755 5.63721C13.2147 5.89652 13.5605 6.44396 13.5605 7.04583V17.7545C13.5605 18.6701 12.6152 19.2752 11.7969 18.8814V18.8846Z",fill:"#4A6DFD"}),O.jsx("path",{d:"M17.4209 15.8924L12.1301 13.3697C11.5909 13.1104 11.2451 12.563 11.2451 11.9611V1.24921C11.2451 0.333616 12.1904 -0.271448 13.0087 0.122323L18.2995 2.64502C18.8387 2.90434 19.1845 3.45178 19.1845 4.05364V14.7623C19.1845 15.6779 18.2392 16.283 17.4209 15.8892V15.8924Z",fill:"#1D3475",fillOpacity:"0.8"}),O.jsx("path",{d:"M7.05457 8.62916L5.62402 7.94727V14.9487C5.62402 15.5506 5.96976 16.1012 6.50899 16.3573L7.93954 17.0392V10.041C7.93954 9.43912 7.5938 8.88848 7.05457 8.63236V8.62916Z",fill:"#5652FF"}),O.jsx("path",{d:"M12.6757 5.63698L11.2451 4.95508V11.9565C11.2451 12.5584 11.5909 13.109 12.1301 13.3651L13.5606 14.047V7.04879C13.5606 6.44693 13.2149 5.89629 12.6757 5.64018V5.63698Z",fill:"#365DEA"})]}),O.jsx(gve,{children:n})]}):O.jsx("span",{}),O.jsxs(hve,{children:[u&&O.jsx(fr,{variant:"outlined",size:"xsmall",iconOnly:!0,onClick:P,children:O.jsx(Db,{fontSize:"small"})}),d&&O.jsx(fr,{variant:"outlined",size:"xsmall",iconOnly:!0,onClick:()=>{k({open:!0,type:"confirm",content:"삭제하시겠습니까?",onOk:()=>{var N;S&&((S==null?void 0:S.crud)==="C"&&((N=E.current)==null||N.remove(String(S.id))),d==null||d(S),R(null),k({open:!1,type:"info",content:"",onOk:()=>{}}))}})},disabled:!S,children:O.jsx(Bb,{fontSize:"small"})}),O.jsx(fr,{variant:"outlined",size:"xsmall",iconOnly:!0,onClick:()=>{var N;return(N=E.current)==null?void 0:N.expandAll()},title:"모두 펼치기",children:O.jsx(QT,{fontSize:"small"})}),O.jsx(fr,{variant:"outlined",size:"xsmall",iconOnly:!0,onClick:()=>{var N;return(N=E.current)==null?void 0:N.collapseAll()},title:"모두 접기",children:O.jsx(GT,{fontSize:"small"})})]})]}),O.jsxs("div",{style:{height:F>0?`calc(100% - (${F}px + 1rem))`:"100%"},children:[p?O.jsx(mve,{children:p}):null,O.jsx(vve,{style:{height:p?"calc(100% - 4.8rem)":"100%"},children:O.jsxs(NA,{children:[O.jsx(yve,{children:v?O.jsx("div",{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center",backgroundColor:"white",paddingBottom:"2rem"},children:O.jsx(kA,{color:"inherit",style:{opacity:.4},disableShrink:!0})}):O.jsx(dF,{ref:E,items:t,defaultExpanded:g,isItemDisabled:r,checkboxSelection:o,multiSelect:a,onItemSelectionToggle:s,onItemClick:(N,j,$)=>{R($),l==null||l(N,j,$)},onItemDoubleClick:(N,j)=>c==null?void 0:c(N,j),onSelectedItemChange:N=>R(N),scrollTo:x,editItems:C,onInlineCreate:()=>A==null?void 0:A()})}),O.jsx(bc,{}),O.jsx(bc,{orientation:"horizontal"})]})})]}),O.jsx(cl,{open:I.open,type:I.type==="confirm"?"confirm":I.type,...I.type==="confirm"?{onOk:I.onOk}:{},onClose:()=>k({...I,open:!1}),dialogContent:I.content,size:"sm"})]})},fF={height:"3rem",color:"var(--ds-table-text-color)",fontSize:"1.2rem",border:"1px solid #D5D7DC"},Eve=Xl("div")({width:"100%"}),Ove=Xl("div")({width:"100%",borderTop:"1px solid #333333"}),Ive=Xl("table")({width:"100%",borderCollapse:"collapse"}),Tve=Xl("th")({...fF,padding:"0 1rem",backgroundColor:"#fafafa",textAlign:"left",fontWeight:"600",color:"var(--ds-table-header-color)"}),Rve=Xl("td")({...fF}),Pve=({colGroup:e})=>O.jsx("colgroup",{children:e&&e.map((t,n)=>O.jsx("col",{style:{width:t}},n))}),kve=({formData:e,setField:t,accessorKey:n})=>O.jsx(os,{checked:(e==null?void 0:e[n])==="Y",onChange:r=>t==null?void 0:t(n,r.target.checked?"Y":"N"),name:n}),Mve=({accessorKey:e,formData:t,setField:n})=>{const r=t[e];let o=null;return typeof r=="string"&&/^\d{8}$/.test(r)?o=An(r,"YYYYMMDD"):r&&(o=An.isDayjs(r)?r:An(r)),O.jsx(Dve,{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},children:O.jsx(ia,{value:o,locale:lv,onChange:a=>n(e,a?An(a).format("YYYYMMDD"):""),name:e,style:{width:"100%",borderRadius:"var(--ds-radius-sm)",fontSize:"var(--ds-table-body-font-size)",textAlign:"center",outline:"none",height:"2.5rem"}})})},Dve=fs.span`
|
|
828
828
|
.ant-picker-input input {
|
|
829
829
|
background: transparent;
|
|
830
830
|
font-size: var(--ds-table-body-font-size);
|
package/package.json
CHANGED