fone-design-system_v2 1.0.42 → 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.
@@ -2,6 +2,10 @@ import { Cell as TableCell } from '@tanstack/react-table';
2
2
  interface Props<T extends object> {
3
3
  cell: TableCell<T, unknown>;
4
4
  setTableData: React.Dispatch<React.SetStateAction<T[]>>;
5
+ radio: boolean;
6
+ setRowSelection: React.Dispatch<React.SetStateAction<Record<string, boolean>>>;
7
+ isClicked: boolean;
8
+ isSelected: boolean;
5
9
  }
6
- declare const CellFile: <T extends object>({ cell, setTableData }: Props<T>) => import("react/jsx-runtime").JSX.Element;
10
+ declare const CellFile: <T extends object>({ cell, setTableData, setRowSelection, radio, isClicked, isSelected, }: Props<T>) => import("react/jsx-runtime").JSX.Element;
7
11
  export default CellFile;
@@ -68004,12 +68004,64 @@ const exe = ({
68004
68004
  border-color: #9ca3af !important;
68005
68005
  box-shadow: none;
68006
68006
  }
68007
- `, sxe = ({ cell: e, setTableData: t }) => {
68008
- const n = e.column.columnDef.onChange, r = e.column.columnDef.onCellChange, o = e.column.columnDef.accept, a = e.column.columnDef.icon, s = (l) => {
68009
- var u;
68010
- n && n(l);
68011
- const c = (u = l.target.files) == null ? void 0 : u[0];
68012
- c && t((d) => d.map((A, p) => p !== e.row.index ? A : r ? { ...r(A), [e.column.id]: c } : { ...A, [e.column.id]: c }));
68007
+ `, sxe = ({
68008
+ cell: e,
68009
+ setTableData: t,
68010
+ setRowSelection: n,
68011
+ radio: r,
68012
+ isClicked: o,
68013
+ isSelected: a
68014
+ }) => {
68015
+ const s = e.column.columnDef.onChange, l = e.column.columnDef.onCellChange, c = e.column.columnDef.accept, u = e.column.columnDef.icon, d = async (A) => {
68016
+ var v;
68017
+ const p = ((v = A.target.files) == null ? void 0 : v[0]) ?? null;
68018
+ let g;
68019
+ try {
68020
+ const h = s == null ? void 0 : s(A);
68021
+ g = h && typeof h.then == "function" ? await h : h;
68022
+ } catch {
68023
+ return;
68024
+ }
68025
+ try {
68026
+ A.target.value = "";
68027
+ } catch {
68028
+ }
68029
+ t((h) => h.map((y, x) => {
68030
+ if (x !== e.row.index) return y;
68031
+ if (typeof g == "function")
68032
+ try {
68033
+ const C = {
68034
+ file: p,
68035
+ event: A,
68036
+ cell: e,
68037
+ columnId: e.column.id,
68038
+ rowIndex: e.row.index
68039
+ }, w = g(y, C);
68040
+ if (w) return w;
68041
+ } catch {
68042
+ }
68043
+ else {
68044
+ if (g && typeof g == "object" && !(g instanceof File))
68045
+ return { ...y, ...g };
68046
+ if (g !== void 0 && typeof g != "object")
68047
+ return { ...y, [e.column.id]: g };
68048
+ }
68049
+ if (typeof l == "function")
68050
+ try {
68051
+ const C = {
68052
+ file: p,
68053
+ event: A,
68054
+ cell: e,
68055
+ columnId: e.column.id,
68056
+ rowIndex: e.row.index,
68057
+ changeResult: g
68058
+ };
68059
+ return l(y, C) ?? y;
68060
+ } catch {
68061
+ return y;
68062
+ }
68063
+ return p ? { ...y, [e.column.id]: p } : y;
68064
+ })), n(r ? { [e.row.id]: !0 } : (h) => ({ ...h, [e.row.id]: !0 }));
68013
68065
  };
68014
68066
  return /* @__PURE__ */ O.jsx(
68015
68067
  "span",
@@ -68022,8 +68074,8 @@ const exe = ({
68022
68074
  lineHeight: "var( --ds-table-body-font-size)",
68023
68075
  justifyContent: "center"
68024
68076
  },
68025
- children: /* @__PURE__ */ O.jsxs(wr, { variant: "outlined", size: "small", fullWidth: !0, children: [
68026
- a,
68077
+ children: o || a ? /* @__PURE__ */ O.jsxs(wr, { variant: "outlined", size: "small", fullWidth: !0, children: [
68078
+ u,
68027
68079
  /* @__PURE__ */ O.jsx(
68028
68080
  "input",
68029
68081
  {
@@ -68036,12 +68088,12 @@ const exe = ({
68036
68088
  cursor: "pointer",
68037
68089
  opacity: 0
68038
68090
  },
68039
- onChange: s,
68091
+ onChange: d,
68040
68092
  "aria-label": "파일 업로드",
68041
- accept: o
68093
+ accept: c
68042
68094
  }
68043
68095
  )
68044
- ] })
68096
+ ] }) : u
68045
68097
  }
68046
68098
  );
68047
68099
  }, lxe = ({
@@ -68770,7 +68822,17 @@ const pxe = ({
68770
68822
  cell: e,
68771
68823
  setCurrentEditingCell: s
68772
68824
  }
68773
- ) : x === "custom" ? /* @__PURE__ */ O.jsx(rxe, { id: A, cell: e }) : x === "file" ? /* @__PURE__ */ O.jsx(sxe, { cell: e, setTableData: o }) : null : x === "date" ? /* @__PURE__ */ O.jsx(oxe, { id: A, align: g, cell: e }) : /* @__PURE__ */ O.jsx(
68825
+ ) : x === "custom" ? /* @__PURE__ */ O.jsx(rxe, { id: A, cell: e }) : x === "file" ? /* @__PURE__ */ O.jsx(
68826
+ sxe,
68827
+ {
68828
+ cell: e,
68829
+ setTableData: o,
68830
+ radio: l,
68831
+ setRowSelection: a,
68832
+ isClicked: r,
68833
+ isSelected: e.row.getIsSelected()
68834
+ }
68835
+ ) : null : x === "date" ? /* @__PURE__ */ O.jsx(oxe, { id: A, align: g, cell: e }) : /* @__PURE__ */ O.jsx(
68774
68836
  FM,
68775
68837
  {
68776
68838
  id: A,
@@ -76738,7 +76800,7 @@ const jSe = ({
76738
76800
  defaultExpanded: g,
76739
76801
  isLoading: v,
76740
76802
  maxLevel: h = 999,
76741
- minLevel: y = 0,
76803
+ minLevel: y = void 0,
76742
76804
  scrollTo: x,
76743
76805
  editItems: C,
76744
76806
  tableData: w
@@ -76771,7 +76833,7 @@ const jSe = ({
76771
76833
  });
76772
76834
  return;
76773
76835
  }
76774
- if (M(S) <= y) {
76836
+ if (y && M(S) <= y) {
76775
76837
  k({
76776
76838
  open: !0,
76777
76839
  type: "info",
@@ -77480,7 +77542,7 @@ const jSe = ({
77480
77542
  getSpan: o,
77481
77543
  colGroup: a
77482
77544
  }) => /* @__PURE__ */ O.jsx("tr", { children: n == null ? void 0 : n.map((s, l) => {
77483
- if (console.log("cellItem : ", s), !s || typeof s != "object") return null;
77545
+ if (!s || typeof s != "object") return null;
77484
77546
  if (s.kind === "title") {
77485
77547
  const c = o("th", s.accessorKey);
77486
77548
  return /* @__PURE__ */ O.jsx(
@@ -770,7 +770,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Iv]+=1);const Fj=G.forwardRef
770
770
  border-color: #9ca3af !important;
771
771
  box-shadow: none;
772
772
  }
773
- `,Wge=({cell:e,setTableData:t})=>{const n=e.column.columnDef.onChange,r=e.column.columnDef.onCellChange,o=e.column.columnDef.accept,a=e.column.columnDef.icon,s=l=>{var u;n&&n(l);const c=(u=l.target.files)==null?void 0:u[0];c&&t(d=>d.map((A,p)=>p!==e.row.index?A:r?{...r(A),[e.column.id]:c}:{...A,[e.column.id]:c}))};return O.jsx("span",{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",lineHeight:"var( --ds-table-body-font-size)",justifyContent:"center"},children:O.jsxs(fr,{variant:"outlined",size:"small",fullWidth:!0,children:[a,O.jsx("input",{type:"file",style:{position:"absolute",inset:0,height:"100%",width:"100%",cursor:"pointer",opacity:0},onChange:s,"aria-label":"파일 업로드",accept:o})]})})},Uge=({align:e,cell:t,radio:n,rowSelection:r,setRowSelection:o})=>{if(n&&o&&r){const a=!!r[t.row.id],s=()=>{o({[t.row.id]:!0})};return O.jsx("span",{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},children:O.jsx(os,{checked:a,onChange:s})})}return O.jsx("span",{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},children:SS(t.column.columnDef.cell,t.getContext())})},Yge=({align:e,cell:t,isHover:n,isClicked:r,setTableData:o,setRowSelection:a,radio:s,type:l,isSelected:c})=>{const u=G.useRef(null),d=t.getValue(),[A,p]=G.useState(d),g=G.useRef(null),v=t.column.columnDef.tags,h=typeof v=="function"?v(t.row.original):void 0,y=t.column.columnDef.maxLength,x=t.column.columnDef.numRange,C=t.column.columnDef.onChange;G.useEffect(()=>{const S=u.current;if(!S)return;const R=()=>{S.style.height=S.scrollHeight+"px"},I=new ResizeObserver(()=>{if(!S.dataset.initialized){S.dataset.initialized="true",S.style.height="3rem";return}R()});return I.observe(S),()=>I.disconnect()},[n]),G.useEffect(()=>{d!==A&&p(d)},[d]);const w=S=>{o(R=>{const I=R.map((k,M)=>M===t.row.index?{...k,[t.column.id]:S}:k);return a(s?{[t.row.id]:!0}:k=>({...k,[t.row.id]:!0})),I})},E=S=>{g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{w(S),g.current=null},300)};return G.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),O.jsxs("span",{style:{position:"relative",display:"flex",height:"100%",width:"100%",alignItems:"center",overflow:"hidden"},children:[h==null?void 0:h.map((S,R)=>S),O.jsx(qge,{ref:u,spellCheck:!1,style:{display:"block",minHeight:"inherit",height:"100% !important",overflowY:"hidden",backgroundColor:r||c?void 0:"inherit",resize:"none",fontSize:"var(--ds-table-body-font-size)",width:"100%",borderRadius:"0.375rem",borderWidth:1,padding:"0.9rem 1rem",lineHeight:"var( --ds-table-body-font-size)",outline:"none",textAlign:e==="center"?"center":e==="right"||e==="end"?"right":"left"},$active:r||c,className:void 0,value:A??"",onChange:S=>{const R=S.target.value;if(!(y&&R.length>y)){if(l==="inputNum"){if(!/^\d*$/.test(R)||R.length>1&&R.startsWith("0"))return;if(x){if(R===""){o(k=>k.map((M,P)=>P===t.row.index?{...M,[t.column.id]:R}:M));return}const I=Number(R);if(I<x[0]||I>x[1])return}p(R),E(R),C==null||C(R);return}if(l==="inputEng"){if(!/^[a-zA-Z]*$/.test(R))return;p(R),E(R),C==null||C(R);return}p(R),E(R),C==null||C(R)}}})]})},qge=fs.textarea`
773
+ `,Wge=({cell:e,setTableData:t,setRowSelection:n,radio:r,isClicked:o,isSelected:a})=>{const s=e.column.columnDef.onChange,l=e.column.columnDef.onCellChange,c=e.column.columnDef.accept,u=e.column.columnDef.icon,d=async A=>{var v;const p=((v=A.target.files)==null?void 0:v[0])??null;let g;try{const h=s==null?void 0:s(A);g=h&&typeof h.then=="function"?await h:h}catch{return}try{A.target.value=""}catch{}t(h=>h.map((y,x)=>{if(x!==e.row.index)return y;if(typeof g=="function")try{const C={file:p,event:A,cell:e,columnId:e.column.id,rowIndex:e.row.index},w=g(y,C);if(w)return w}catch{}else{if(g&&typeof g=="object"&&!(g instanceof File))return{...y,...g};if(g!==void 0&&typeof g!="object")return{...y,[e.column.id]:g}}if(typeof l=="function")try{const C={file:p,event:A,cell:e,columnId:e.column.id,rowIndex:e.row.index,changeResult:g};return l(y,C)??y}catch{return y}return p?{...y,[e.column.id]:p}:y})),n(r?{[e.row.id]:!0}:h=>({...h,[e.row.id]:!0}))};return O.jsx("span",{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",lineHeight:"var( --ds-table-body-font-size)",justifyContent:"center"},children:o||a?O.jsxs(fr,{variant:"outlined",size:"small",fullWidth:!0,children:[u,O.jsx("input",{type:"file",style:{position:"absolute",inset:0,height:"100%",width:"100%",cursor:"pointer",opacity:0},onChange:d,"aria-label":"파일 업로드",accept:c})]}):u})},Uge=({align:e,cell:t,radio:n,rowSelection:r,setRowSelection:o})=>{if(n&&o&&r){const a=!!r[t.row.id],s=()=>{o({[t.row.id]:!0})};return O.jsx("span",{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},children:O.jsx(os,{checked:a,onChange:s})})}return O.jsx("span",{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},children:SS(t.column.columnDef.cell,t.getContext())})},Yge=({align:e,cell:t,isHover:n,isClicked:r,setTableData:o,setRowSelection:a,radio:s,type:l,isSelected:c})=>{const u=G.useRef(null),d=t.getValue(),[A,p]=G.useState(d),g=G.useRef(null),v=t.column.columnDef.tags,h=typeof v=="function"?v(t.row.original):void 0,y=t.column.columnDef.maxLength,x=t.column.columnDef.numRange,C=t.column.columnDef.onChange;G.useEffect(()=>{const S=u.current;if(!S)return;const R=()=>{S.style.height=S.scrollHeight+"px"},I=new ResizeObserver(()=>{if(!S.dataset.initialized){S.dataset.initialized="true",S.style.height="3rem";return}R()});return I.observe(S),()=>I.disconnect()},[n]),G.useEffect(()=>{d!==A&&p(d)},[d]);const w=S=>{o(R=>{const I=R.map((k,M)=>M===t.row.index?{...k,[t.column.id]:S}:k);return a(s?{[t.row.id]:!0}:k=>({...k,[t.row.id]:!0})),I})},E=S=>{g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{w(S),g.current=null},300)};return G.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),O.jsxs("span",{style:{position:"relative",display:"flex",height:"100%",width:"100%",alignItems:"center",overflow:"hidden"},children:[h==null?void 0:h.map((S,R)=>S),O.jsx(qge,{ref:u,spellCheck:!1,style:{display:"block",minHeight:"inherit",height:"100% !important",overflowY:"hidden",backgroundColor:r||c?void 0:"inherit",resize:"none",fontSize:"var(--ds-table-body-font-size)",width:"100%",borderRadius:"0.375rem",borderWidth:1,padding:"0.9rem 1rem",lineHeight:"var( --ds-table-body-font-size)",outline:"none",textAlign:e==="center"?"center":e==="right"||e==="end"?"right":"left"},$active:r||c,className:void 0,value:A??"",onChange:S=>{const R=S.target.value;if(!(y&&R.length>y)){if(l==="inputNum"){if(!/^\d*$/.test(R)||R.length>1&&R.startsWith("0"))return;if(x){if(R===""){o(k=>k.map((M,P)=>P===t.row.index?{...M,[t.column.id]:R}:M));return}const I=Number(R);if(I<x[0]||I>x[1])return}p(R),E(R),C==null||C(R);return}if(l==="inputEng"){if(!/^[a-zA-Z]*$/.test(R))return;p(R),E(R),C==null||C(R);return}p(R),E(R),C==null||C(R)}}})]})},qge=fs.textarea`
774
774
  border-color: ${e=>e.$active?"#d1d5db":"transparent"};
775
775
 
776
776
  &:focus {
@@ -784,7 +784,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Iv]+=1);const Fj=G.forwardRef
784
784
  &:focus {
785
785
  border-color: #9ca3af;
786
786
  }
787
- `,ehe=({cell:e,idx:t,isHover:n,isClicked:r,setTableData:o,setRowSelection:a,setCurrentEditingCell:s,radio:l,rowSelection:c,pagination:u,isScrollHighlighted:d})=>{const A=e.column.id,p=e.column.columnDef.width,g=e.column.columnDef.align,v=e.column.columnDef.editable,h=e.column.columnDef.type,y=e.row.original,x=typeof h=="function"?h(y):h;return O.jsx("div",{style:{display:"flex",alignItems:"center",minHeight:"inherit",minWidth:"4rem",fontSize:"var( --ds-table-body-font-size)",...p?{width:p}:{flex:A==="no"?"0 1 50px":1},borderLeft:t===0?void 0:"1px solid var(--ds-table-body-border-bottom-color)"},children:A==="select"?O.jsx(Uge,{cell:e,align:g,radio:l,rowSelection:c,setRowSelection:a}):A==="No"?O.jsx("div",{style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center"},children:e.row.index+1+((u==null?void 0:u.page)||0)*((u==null?void 0:u.size)||0)}):v?x==="input"||!x?O.jsx(Jge,{id:A,align:g,cell:e,isHover:n,isClicked:r,isSelected:e.row.getIsSelected(),setTableData:o,setRowSelection:a,radio:l}):x.includes("input")?O.jsx(Yge,{id:A,align:g,cell:e,isHover:n,isClicked:r,isSelected:e.row.getIsSelected(),setTableData:o,setRowSelection:a,radio:l,type:x}):x==="select"?O.jsx(Kge,{id:A,align:g,cell:e,isHover:n,setTableData:o,isClicked:r,isSelected:e.row.getIsSelected(),setRowSelection:a,radio:l,isScrollHighlighted:d}):x==="checkbox"?O.jsx(Lge,{id:A,align:g,cell:e,isHover:n,setTableData:o,setRowSelection:a,radio:l}):x==="checkboxN"?O.jsx($ge,{cell:e}):x==="datePicker"?O.jsx(zge,{id:A,cell:e,setTableData:o,isSelected:e.row.getIsSelected(),setRowSelection:a,isClicked:r,radio:l}):x==="modal"?O.jsx(Gge,{align:g,cell:e,setTableData:o,isSelected:e.row.getIsSelected(),setRowSelection:a,setCurrentEditingCell:s,radio:l,isClicked:r}):x==="text"?O.jsx(D4,{id:A,align:g,cell:e,isHover:n,isClicked:r}):x==="button"?O.jsx(Fge,{align:g,cell:e,setCurrentEditingCell:s}):x==="custom"?O.jsx(Vge,{id:A,cell:e}):x==="file"?O.jsx(Wge,{cell:e,setTableData:o}):null:x==="date"?O.jsx(Hge,{id:A,align:g,cell:e}):O.jsx(D4,{id:A,align:g,cell:e,isHover:n,isClicked:r})})},N4=G.forwardRef(({row:e,setTableData:t,setRowSelection:n,onRowClick:r,onRowDoubleClick:o,setCurrentEditingCell:a,isScrollHighlighted:s=!1,isClicked:l=!1,radio:c,rowSelection:u,isClickedCheckbox:d,pagination:A,isTriggerHighlight:p},g)=>{const[v,h]=G.useState(!1),y=s||e.getIsSelected()||l,x=()=>{h(!1),d&&n({[e.id]:!0}),r==null||r(e.original,e.index)};return O.jsx(the,{ref:g,$enableHover:!y,style:{display:"flex",width:"100%",height:"100%",minHeight:"inherit",justifyContent:"space-around",backgroundColor:y||p?"#F0F7FD":void 0},onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onClick:x,onDoubleClick:()=>o==null?void 0:o(e.original,e.index),children:e.getVisibleCells().map((C,w)=>O.jsx(ehe,{cell:C,idx:w,isHover:v,setTableData:t,setRowSelection:n,setCurrentEditingCell:a,isClicked:l,radio:c,rowSelection:u,pagination:A,isScrollHighlighted:s},C.id))})});N4.displayName="Row";const the=fs.div`
787
+ `,ehe=({cell:e,idx:t,isHover:n,isClicked:r,setTableData:o,setRowSelection:a,setCurrentEditingCell:s,radio:l,rowSelection:c,pagination:u,isScrollHighlighted:d})=>{const A=e.column.id,p=e.column.columnDef.width,g=e.column.columnDef.align,v=e.column.columnDef.editable,h=e.column.columnDef.type,y=e.row.original,x=typeof h=="function"?h(y):h;return O.jsx("div",{style:{display:"flex",alignItems:"center",minHeight:"inherit",minWidth:"4rem",fontSize:"var( --ds-table-body-font-size)",...p?{width:p}:{flex:A==="no"?"0 1 50px":1},borderLeft:t===0?void 0:"1px solid var(--ds-table-body-border-bottom-color)"},children:A==="select"?O.jsx(Uge,{cell:e,align:g,radio:l,rowSelection:c,setRowSelection:a}):A==="No"?O.jsx("div",{style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center"},children:e.row.index+1+((u==null?void 0:u.page)||0)*((u==null?void 0:u.size)||0)}):v?x==="input"||!x?O.jsx(Jge,{id:A,align:g,cell:e,isHover:n,isClicked:r,isSelected:e.row.getIsSelected(),setTableData:o,setRowSelection:a,radio:l}):x.includes("input")?O.jsx(Yge,{id:A,align:g,cell:e,isHover:n,isClicked:r,isSelected:e.row.getIsSelected(),setTableData:o,setRowSelection:a,radio:l,type:x}):x==="select"?O.jsx(Kge,{id:A,align:g,cell:e,isHover:n,setTableData:o,isClicked:r,isSelected:e.row.getIsSelected(),setRowSelection:a,radio:l,isScrollHighlighted:d}):x==="checkbox"?O.jsx(Lge,{id:A,align:g,cell:e,isHover:n,setTableData:o,setRowSelection:a,radio:l}):x==="checkboxN"?O.jsx($ge,{cell:e}):x==="datePicker"?O.jsx(zge,{id:A,cell:e,setTableData:o,isSelected:e.row.getIsSelected(),setRowSelection:a,isClicked:r,radio:l}):x==="modal"?O.jsx(Gge,{align:g,cell:e,setTableData:o,isSelected:e.row.getIsSelected(),setRowSelection:a,setCurrentEditingCell:s,radio:l,isClicked:r}):x==="text"?O.jsx(D4,{id:A,align:g,cell:e,isHover:n,isClicked:r}):x==="button"?O.jsx(Fge,{align:g,cell:e,setCurrentEditingCell:s}):x==="custom"?O.jsx(Vge,{id:A,cell:e}):x==="file"?O.jsx(Wge,{cell:e,setTableData:o,radio:l,setRowSelection:a,isClicked:r,isSelected:e.row.getIsSelected()}):null:x==="date"?O.jsx(Hge,{id:A,align:g,cell:e}):O.jsx(D4,{id:A,align:g,cell:e,isHover:n,isClicked:r})})},N4=G.forwardRef(({row:e,setTableData:t,setRowSelection:n,onRowClick:r,onRowDoubleClick:o,setCurrentEditingCell:a,isScrollHighlighted:s=!1,isClicked:l=!1,radio:c,rowSelection:u,isClickedCheckbox:d,pagination:A,isTriggerHighlight:p},g)=>{const[v,h]=G.useState(!1),y=s||e.getIsSelected()||l,x=()=>{h(!1),d&&n({[e.id]:!0}),r==null||r(e.original,e.index)};return O.jsx(the,{ref:g,$enableHover:!y,style:{display:"flex",width:"100%",height:"100%",minHeight:"inherit",justifyContent:"space-around",backgroundColor:y||p?"#F0F7FD":void 0},onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onClick:x,onDoubleClick:()=>o==null?void 0:o(e.original,e.index),children:e.getVisibleCells().map((C,w)=>O.jsx(ehe,{cell:C,idx:w,isHover:v,setTableData:t,setRowSelection:n,setCurrentEditingCell:a,isClicked:l,radio:c,rowSelection:u,pagination:A,isScrollHighlighted:s},C.id))})});N4.displayName="Row";const the=fs.div`
788
788
  ${({$enableHover:e})=>e&&`
789
789
  &:hover {
790
790
  background-color: #EBEBEB;
@@ -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);
@@ -864,4 +864,4 @@ function print() { __p += __j.call(arguments, '') }
864
864
  outline: none !important;
865
865
  box-shadow: none !important;
866
866
  }
867
- `,Fve=({accessorKey:e,formData:t,setField:n,icon:r,disabled:o,readOnly:a,maxLength:s})=>O.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:O.jsx(PA,{value:t[e],name:t[e],disabled:o,readOnly:a,sx:{width:"100%",height:"2.532rem","& .MuiInputBase-input":{padding:r?"0.27rem 1rem 0.2rem 3rem !important":"0.27rem 1rem 0.2rem 1rem !important",fontSize:"1.2rem"},"& .MuiOutlinedInput-root":{"&.Mui-focused .MuiOutlinedInput-notchedOutline":{outline:"none !important",boxShadow:"none",border:"1px solid #9ca3af"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#9ca3af"}}},spellCheck:!1,onChange:l=>{let c=l.currentTarget.value;typeof s=="number"&&(c=c.slice(0,s)),n(e,c)}})}),Lve=({accessorKey:e,formData:t,setField:n,icon:r,disabled:o,readOnly:a})=>O.jsx(PA,{value:t[e],name:t[e],disabled:o,readOnly:a,sx:{width:"100%",height:"2.532rem","& .MuiInputBase-input":{padding:r?"0.27rem 1rem 0.2rem 3rem !important":"0.27rem 1rem 0.2rem 1rem !important",fontSize:"1.2rem"},"& .MuiOutlinedInput-root":{"&.Mui-focused .MuiOutlinedInput-notchedOutline":{outline:"none !important",boxShadow:"none",border:"1px solid #9ca3af"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#9ca3af"}}},onChange:s=>{const l=s.currentTarget.value.replace(/[^0-9]/g,"");n(e,l)}}),$ve=({formData:e,cellItem:t,setField:n})=>O.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:O.jsx(Mv,{MenuItems:t==null?void 0:t.menuItems,select:t==null?void 0:t.required,defaultValue:typeof t.value=="string"?t.value:void 0,value:e[t.accessorKey],name:t.accessorKey,onChange:r=>{n(t.accessorKey,r.target.value)},sx:{width:"100%",height:"2.7rem","& .MuiSelect-select":{padding:"0.1rem 1rem 0 1rem !important"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{border:"1px solid #9ca3af !important"},"&:hover .MuiOutlinedInput-notchedOutline":{border:"1px solid #9ca3af !important"}},fontSize:"1.2rem"})}),AF=({value:e,icon:t})=>O.jsx("span",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",padding:t?"0 3rem":"0 1rem"},children:e}),Vve=({value:e,vSpan:t,buttons:n,cellItem:r,formData:o,setField:a})=>{const s=(()=>{var l,c,u,d;switch(r.type){case"text":return O.jsx(AF,{value:r.value??"",icon:(l=r.startIcon)==null?void 0:l.icon});case"input":return O.jsx(Fve,{accessorKey:r.accessorKey,formData:o,setField:a,icon:(c=r.startIcon)==null?void 0:c.icon,disabled:r==null?void 0:r.disabled,readOnly:r==null?void 0:r.readOnly,maxLength:r==null?void 0:r.maxLength});case"inputNum":return O.jsx(Lve,{accessorKey:r.accessorKey,formData:o,setField:a,icon:(u=r.startIcon)==null?void 0:u.icon,disabled:r==null?void 0:r.disabled,readOnly:r==null?void 0:r.readOnly});case"select":return O.jsx($ve,{formData:o,cellItem:r,setField:a});case"checkbox":return O.jsx(kve,{accessorKey:r.accessorKey,formData:o,setField:a});case"datepicker":return O.jsx(Mve,{accessorKey:r.accessorKey,formData:o,setField:a});case"dateRangePicker":return O.jsx(Bve,{accessorKey:r.accessorKey,formData:o,setField:a});case void 0:return r==null?void 0:r.value;default:return O.jsx(AF,{value:(r==null?void 0:r.value)??"",icon:(d=r.startIcon)==null?void 0:d.icon})}})();return O.jsx(O.Fragment,{children:e!==void 0&&O.jsx(Rve,{colSpan:t,style:{verticalAlign:"middle"},children:n&&n.length>0?O.jsxs("div",{style:{display:"flex",height:"100%",alignItems:"center",justifyContent:"space-between",paddingLeft:typeof s=="string"?"1rem":"0"},children:[s,O.jsx("div",{style:{flexShrink:0},children:n.map((l,c)=>O.jsx(fr,{size:"xsmall",variant:l==null?void 0:l.variant,disabled:l==null?void 0:l.disabled,sx:{marginLeft:"0.2rem",flex:"0 0 auto"},style:{fontSize:"1.2rem"},onClick:l==null?void 0:l.onClick,type:"button",children:l==null?void 0:l.title},(l==null?void 0:l.title)+"-"+c))})]}):(()=>{var p,g;const l=r.type===void 0,c=!!(r!=null&&r.startIcon||r!=null&&r.endIcon),u={width:"100%",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},d=typeof(r==null?void 0:r.value)=="string"?{padding:"0 1rem"}:{},A=l?c?u:d:c?u:{};return O.jsxs("div",{style:A,children:[r.startIcon&&O.jsx("button",{onClick:(p=r.startIcon)==null?void 0:p.onClick,style:{position:"absolute",left:"0.4rem",background:"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",height:"100%",zIndex:2},type:"button",children:r.startIcon.icon}),s,r.endIcon&&O.jsx("button",{onClick:(g=r.endIcon)==null?void 0:g.onClick,style:{position:"absolute",right:"1.4rem",background:"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",height:"100%",zIndex:2},type:"button",children:r.endIcon.icon})]})})()})})},Hve=({title:e,required:t,colGroup:n,tSpan:r})=>O.jsx(O.Fragment,{children:e&&O.jsxs(Tve,{style:{width:n?"auto":"11rem",verticalAlign:"middle"},colSpan:r,children:[e,t&&O.jsx("span",{style:{color:"#ec193a",fontSize:"2rem",lineHeight:"1.2rem"},children:"*"})]})}),zve=({formData:e,setField:t,row:n,rowIdx:r,getSpan:o,colGroup:a})=>O.jsx("tr",{children:n==null?void 0:n.map((s,l)=>{if(console.log("cellItem : ",s),!s||typeof s!="object")return null;if(s.kind==="title"){const c=o("th",s.accessorKey);return O.jsx(Hve,{title:s.title,required:s.required,colGroup:a,tSpan:c},l)}if(s.kind==="value"){const c=o("td",s.accessorKey);return O.jsx(Vve,{value:s.value,vSpan:c,buttons:s.buttons,cellItem:s,formData:e,setField:t},l)}return null})},r),_ve=({formData:e,setField:t,rows:n,getSpan:r,colGroup:o})=>O.jsx(O.Fragment,{children:n==null?void 0:n.map((a,s)=>O.jsx(zve,{formData:e,setField:t,row:a,rowIdx:s,getSpan:r,colGroup:o},s))}),Wve=({formData:e,setField:t,rows:n,getSpan:r,colGroup:o})=>O.jsx(Ove,{children:O.jsxs(Ive,{border:1,children:[O.jsx(Pve,{colGroup:o}),O.jsx("tbody",{children:O.jsx(_ve,{formData:e,setField:t,rows:n,getSpan:r,colGroup:o})})]})}),Uve=({onSave:e,formData:t,items:n})=>{const[r,o]=G.useState({open:!1,type:"confirm",message:""}),a=()=>{if(n.filter(c=>c.required).map(c=>c.accessorKey).filter(c=>{const u=t[c];return u==null||u===""||Array.isArray(u)&&u.length===0}).length>0){o({open:!0,type:"error",message:"모든 필수 항목을 입력해주세요"});return}o({open:!0,type:"confirm",message:"저장하시겠습니까?"})};return O.jsxs(O.Fragment,{children:[e&&O.jsx(fr,{onClick:a,startIcon:O.jsx(WT,{style:{fontSize:"2rem"}}),size:"xsmall",variant:"contained",type:"button",children:"저장"}),O.jsx(cl,{open:r.open,onClose:()=>o({...r,open:!1}),type:r.type,dialogContent:r.message,onOk:()=>{e==null||e(t),o({...r,open:!1})}})]})},Yve=({title:e})=>O.jsx(O.Fragment,{children:e&&O.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},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("h2",{style:{fontWeight:600,lineHeight:1,margin:0,padding:0,boxSizing:"border-box",fontSize:"var(--ds-table-title-font-size)"},children:e})]})}),qve=({title:e,onSave:t,formData:n,items:r})=>O.jsxs(RA,{justifyContent:e?"space-between":"flex-end",alignItems:"flex-end",style:{display:!e&&!t?"none":"flex",marginBottom:"1rem",minHeight:"2.6rem"},children:[O.jsx(Yve,{title:e}),O.jsx(Uve,{onSave:t,formData:n,items:r})]}),pF=G.forwardRef(({items:e,data:t,title:n,totalColumns:r=4,colGroup:o,onSave:a,onTableChange:s},l)=>{const[c,u]=G.useState([]),{thSpanMap:d,tdSpanMap:A}=G.useMemo(()=>{const y=new Map,x=new Map;return e==null||e.forEach(C=>{var w,E,S,R;C!=null&&C.colSpan&&(((w=C==null?void 0:C.colSpan)==null?void 0:w.target)==="th"&&y.set(C.accessorKey,(E=C==null?void 0:C.colSpan)==null?void 0:E.span),((S=C==null?void 0:C.colSpan)==null?void 0:S.target)==="td"&&x.set(C.accessorKey,(R=C==null?void 0:C.colSpan)==null?void 0:R.span))}),{thSpanMap:y,tdSpanMap:x}},[e]),p=(y,x)=>(y==="th"?d:A).get(x)??1;G.useMemo(()=>{const y=[];let x=[],C=0;e.forEach(w=>{const E=p("th",w.accessorKey),S=p("td",w.accessorKey),R=E+S,I={kind:"title",accessorKey:w.accessorKey,title:w.title,span:E,required:w.required},k={kind:"value",accessorKey:w.accessorKey,type:w.type,value:Array.isArray(t==null?void 0:t[w.accessorKey])?(t==null?void 0:t[w.accessorKey]).join(", "):(t==null?void 0:t[w.accessorKey])??w.value??"",span:S,required:w.required,menuItems:w.menuItems,textAlign:w.textAlign,buttons:w.buttons,onClick:w.onClick,startIcon:w.startIcon,endIcon:w.endIcon,disabled:w.disabled,readOnly:w.readOnly,maxLength:w.maxLength};x.push(I,k),C+=R,C===r&&(y.push(x),x=[],C=0)}),x.length&&y.push(x),u(y)},[e,r]);const[g,v]=G.useState(()=>({...t}));G.useEffect(()=>{v(y=>JSON.stringify(y)===JSON.stringify(t)?y:{...y,...t})},[t]),G.useEffect(()=>{const y=setTimeout(()=>{s==null||s(g)},100);return()=>clearTimeout(y)},[g,s]);const h=G.useCallback((y,x)=>{v(C=>({...C,[y]:x}))},[]);return O.jsxs(Eve,{ref:l,children:[O.jsx(qve,{title:n,onSave:a,formData:g,items:e}),O.jsx(Wve,{formData:g,setField:h,rows:c,getSpan:p,colGroup:o})]})});pF.displayName="VerticalTable",tt.Accordion=KT,tt.ArrowDropDownSolid=tve,tt.ArrowDropDownSolid2=nve,tt.ArrowDropUpSolid=rve,tt.Autocomplete=JT,tt.Backdrop=sG,tt.Badge=lG,tt.BarChart=IM,tt.BottomNavigation=TM,tt.Box=mx,tt.Breadcrumbs=RM,tt.Button=fr,tt.Card=Bne,tt.ChatOutlined=Hme,tt.Checkbox=os,tt.DatePicker=Fj,tt.DatePicker3=Zw,tt.DateRangePicker=eS,tt.DesignSystemProvider=Kq,tt.Dialog=cl,tt.Divider=ape,tt.DropdownMenu=spe,tt.EmptyBox=Zme,tt.EyeNoVisibleOutlined=zme,tt.EyeVisibleOutlined=_me,tt.Flex=RA,tt.FloatingButton=cpe,tt.FolderOutlined=Wme,tt.Grid=hc,tt.HomePageSolid=ove,tt.HomeSolid=ive,tt.IconButton=upe,tt.IconMainTitle=dve,tt.InfoBlueSolid=ave,tt.Label=cF,tt.Logo2Solid=uve,tt.LogoSolid=sve,tt.Menu=e4,tt.MenuOutlined=Ume,tt.MinusBoxOutlined=Yme,tt.MinusSolid=lve,tt.MobileMenu=t4,tt.Notification=fpe,tt.Pagination=n4,tt.PieChart=r4,tt.PlusBoxOutlined=qme,tt.PlusSolid=cve,tt.Progress=kA,tt.RHFCheckboxController=zM,tt.RHFDatePicker3Controller=$j,tt.RHFDateRangeController=Hj,tt.RHFSelect2Controller=hpe,tt.RHFTextField2Controller=dpe,tt.Radio=ppe,tt.RadioGroup=gpe,tt.Require=eve,tt.ScrollArea=NA,tt.ScrollBar=bc,tt.SearchOutlined=Gme,tt.Select=Mv,tt.SettingOutlined=Qme,tt.Skeleton=vpe,tt.Snackbar=o4,tt.StarOutlined=Xme,tt.Switch=ype,tt.Table2=Fhe,tt.Tabs=Vhe,tt.Tag=Hhe,tt.TextField2=PA,tt.Tooltip=zhe,tt.TransferList=_he,tt.TreeView=$me,tt.TreeView2=Sve,tt.Typography=lF,tt.User2Outlined=Kme,tt.UserOutlined=Jme,tt.VerticalTable=pF,Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"})}));
867
+ `,Fve=({accessorKey:e,formData:t,setField:n,icon:r,disabled:o,readOnly:a,maxLength:s})=>O.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:O.jsx(PA,{value:t[e],name:t[e],disabled:o,readOnly:a,sx:{width:"100%",height:"2.532rem","& .MuiInputBase-input":{padding:r?"0.27rem 1rem 0.2rem 3rem !important":"0.27rem 1rem 0.2rem 1rem !important",fontSize:"1.2rem"},"& .MuiOutlinedInput-root":{"&.Mui-focused .MuiOutlinedInput-notchedOutline":{outline:"none !important",boxShadow:"none",border:"1px solid #9ca3af"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#9ca3af"}}},spellCheck:!1,onChange:l=>{let c=l.currentTarget.value;typeof s=="number"&&(c=c.slice(0,s)),n(e,c)}})}),Lve=({accessorKey:e,formData:t,setField:n,icon:r,disabled:o,readOnly:a})=>O.jsx(PA,{value:t[e],name:t[e],disabled:o,readOnly:a,sx:{width:"100%",height:"2.532rem","& .MuiInputBase-input":{padding:r?"0.27rem 1rem 0.2rem 3rem !important":"0.27rem 1rem 0.2rem 1rem !important",fontSize:"1.2rem"},"& .MuiOutlinedInput-root":{"&.Mui-focused .MuiOutlinedInput-notchedOutline":{outline:"none !important",boxShadow:"none",border:"1px solid #9ca3af"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#9ca3af"}}},onChange:s=>{const l=s.currentTarget.value.replace(/[^0-9]/g,"");n(e,l)}}),$ve=({formData:e,cellItem:t,setField:n})=>O.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:O.jsx(Mv,{MenuItems:t==null?void 0:t.menuItems,select:t==null?void 0:t.required,defaultValue:typeof t.value=="string"?t.value:void 0,value:e[t.accessorKey],name:t.accessorKey,onChange:r=>{n(t.accessorKey,r.target.value)},sx:{width:"100%",height:"2.7rem","& .MuiSelect-select":{padding:"0.1rem 1rem 0 1rem !important"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{border:"1px solid #9ca3af !important"},"&:hover .MuiOutlinedInput-notchedOutline":{border:"1px solid #9ca3af !important"}},fontSize:"1.2rem"})}),AF=({value:e,icon:t})=>O.jsx("span",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",padding:t?"0 3rem":"0 1rem"},children:e}),Vve=({value:e,vSpan:t,buttons:n,cellItem:r,formData:o,setField:a})=>{const s=(()=>{var l,c,u,d;switch(r.type){case"text":return O.jsx(AF,{value:r.value??"",icon:(l=r.startIcon)==null?void 0:l.icon});case"input":return O.jsx(Fve,{accessorKey:r.accessorKey,formData:o,setField:a,icon:(c=r.startIcon)==null?void 0:c.icon,disabled:r==null?void 0:r.disabled,readOnly:r==null?void 0:r.readOnly,maxLength:r==null?void 0:r.maxLength});case"inputNum":return O.jsx(Lve,{accessorKey:r.accessorKey,formData:o,setField:a,icon:(u=r.startIcon)==null?void 0:u.icon,disabled:r==null?void 0:r.disabled,readOnly:r==null?void 0:r.readOnly});case"select":return O.jsx($ve,{formData:o,cellItem:r,setField:a});case"checkbox":return O.jsx(kve,{accessorKey:r.accessorKey,formData:o,setField:a});case"datepicker":return O.jsx(Mve,{accessorKey:r.accessorKey,formData:o,setField:a});case"dateRangePicker":return O.jsx(Bve,{accessorKey:r.accessorKey,formData:o,setField:a});case void 0:return r==null?void 0:r.value;default:return O.jsx(AF,{value:(r==null?void 0:r.value)??"",icon:(d=r.startIcon)==null?void 0:d.icon})}})();return O.jsx(O.Fragment,{children:e!==void 0&&O.jsx(Rve,{colSpan:t,style:{verticalAlign:"middle"},children:n&&n.length>0?O.jsxs("div",{style:{display:"flex",height:"100%",alignItems:"center",justifyContent:"space-between",paddingLeft:typeof s=="string"?"1rem":"0"},children:[s,O.jsx("div",{style:{flexShrink:0},children:n.map((l,c)=>O.jsx(fr,{size:"xsmall",variant:l==null?void 0:l.variant,disabled:l==null?void 0:l.disabled,sx:{marginLeft:"0.2rem",flex:"0 0 auto"},style:{fontSize:"1.2rem"},onClick:l==null?void 0:l.onClick,type:"button",children:l==null?void 0:l.title},(l==null?void 0:l.title)+"-"+c))})]}):(()=>{var p,g;const l=r.type===void 0,c=!!(r!=null&&r.startIcon||r!=null&&r.endIcon),u={width:"100%",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},d=typeof(r==null?void 0:r.value)=="string"?{padding:"0 1rem"}:{},A=l?c?u:d:c?u:{};return O.jsxs("div",{style:A,children:[r.startIcon&&O.jsx("button",{onClick:(p=r.startIcon)==null?void 0:p.onClick,style:{position:"absolute",left:"0.4rem",background:"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",height:"100%",zIndex:2},type:"button",children:r.startIcon.icon}),s,r.endIcon&&O.jsx("button",{onClick:(g=r.endIcon)==null?void 0:g.onClick,style:{position:"absolute",right:"1.4rem",background:"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",height:"100%",zIndex:2},type:"button",children:r.endIcon.icon})]})})()})})},Hve=({title:e,required:t,colGroup:n,tSpan:r})=>O.jsx(O.Fragment,{children:e&&O.jsxs(Tve,{style:{width:n?"auto":"11rem",verticalAlign:"middle"},colSpan:r,children:[e,t&&O.jsx("span",{style:{color:"#ec193a",fontSize:"2rem",lineHeight:"1.2rem"},children:"*"})]})}),zve=({formData:e,setField:t,row:n,rowIdx:r,getSpan:o,colGroup:a})=>O.jsx("tr",{children:n==null?void 0:n.map((s,l)=>{if(!s||typeof s!="object")return null;if(s.kind==="title"){const c=o("th",s.accessorKey);return O.jsx(Hve,{title:s.title,required:s.required,colGroup:a,tSpan:c},l)}if(s.kind==="value"){const c=o("td",s.accessorKey);return O.jsx(Vve,{value:s.value,vSpan:c,buttons:s.buttons,cellItem:s,formData:e,setField:t},l)}return null})},r),_ve=({formData:e,setField:t,rows:n,getSpan:r,colGroup:o})=>O.jsx(O.Fragment,{children:n==null?void 0:n.map((a,s)=>O.jsx(zve,{formData:e,setField:t,row:a,rowIdx:s,getSpan:r,colGroup:o},s))}),Wve=({formData:e,setField:t,rows:n,getSpan:r,colGroup:o})=>O.jsx(Ove,{children:O.jsxs(Ive,{border:1,children:[O.jsx(Pve,{colGroup:o}),O.jsx("tbody",{children:O.jsx(_ve,{formData:e,setField:t,rows:n,getSpan:r,colGroup:o})})]})}),Uve=({onSave:e,formData:t,items:n})=>{const[r,o]=G.useState({open:!1,type:"confirm",message:""}),a=()=>{if(n.filter(c=>c.required).map(c=>c.accessorKey).filter(c=>{const u=t[c];return u==null||u===""||Array.isArray(u)&&u.length===0}).length>0){o({open:!0,type:"error",message:"모든 필수 항목을 입력해주세요"});return}o({open:!0,type:"confirm",message:"저장하시겠습니까?"})};return O.jsxs(O.Fragment,{children:[e&&O.jsx(fr,{onClick:a,startIcon:O.jsx(WT,{style:{fontSize:"2rem"}}),size:"xsmall",variant:"contained",type:"button",children:"저장"}),O.jsx(cl,{open:r.open,onClose:()=>o({...r,open:!1}),type:r.type,dialogContent:r.message,onOk:()=>{e==null||e(t),o({...r,open:!1})}})]})},Yve=({title:e})=>O.jsx(O.Fragment,{children:e&&O.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},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("h2",{style:{fontWeight:600,lineHeight:1,margin:0,padding:0,boxSizing:"border-box",fontSize:"var(--ds-table-title-font-size)"},children:e})]})}),qve=({title:e,onSave:t,formData:n,items:r})=>O.jsxs(RA,{justifyContent:e?"space-between":"flex-end",alignItems:"flex-end",style:{display:!e&&!t?"none":"flex",marginBottom:"1rem",minHeight:"2.6rem"},children:[O.jsx(Yve,{title:e}),O.jsx(Uve,{onSave:t,formData:n,items:r})]}),pF=G.forwardRef(({items:e,data:t,title:n,totalColumns:r=4,colGroup:o,onSave:a,onTableChange:s},l)=>{const[c,u]=G.useState([]),{thSpanMap:d,tdSpanMap:A}=G.useMemo(()=>{const y=new Map,x=new Map;return e==null||e.forEach(C=>{var w,E,S,R;C!=null&&C.colSpan&&(((w=C==null?void 0:C.colSpan)==null?void 0:w.target)==="th"&&y.set(C.accessorKey,(E=C==null?void 0:C.colSpan)==null?void 0:E.span),((S=C==null?void 0:C.colSpan)==null?void 0:S.target)==="td"&&x.set(C.accessorKey,(R=C==null?void 0:C.colSpan)==null?void 0:R.span))}),{thSpanMap:y,tdSpanMap:x}},[e]),p=(y,x)=>(y==="th"?d:A).get(x)??1;G.useMemo(()=>{const y=[];let x=[],C=0;e.forEach(w=>{const E=p("th",w.accessorKey),S=p("td",w.accessorKey),R=E+S,I={kind:"title",accessorKey:w.accessorKey,title:w.title,span:E,required:w.required},k={kind:"value",accessorKey:w.accessorKey,type:w.type,value:Array.isArray(t==null?void 0:t[w.accessorKey])?(t==null?void 0:t[w.accessorKey]).join(", "):(t==null?void 0:t[w.accessorKey])??w.value??"",span:S,required:w.required,menuItems:w.menuItems,textAlign:w.textAlign,buttons:w.buttons,onClick:w.onClick,startIcon:w.startIcon,endIcon:w.endIcon,disabled:w.disabled,readOnly:w.readOnly,maxLength:w.maxLength};x.push(I,k),C+=R,C===r&&(y.push(x),x=[],C=0)}),x.length&&y.push(x),u(y)},[e,r]);const[g,v]=G.useState(()=>({...t}));G.useEffect(()=>{v(y=>JSON.stringify(y)===JSON.stringify(t)?y:{...y,...t})},[t]),G.useEffect(()=>{const y=setTimeout(()=>{s==null||s(g)},100);return()=>clearTimeout(y)},[g,s]);const h=G.useCallback((y,x)=>{v(C=>({...C,[y]:x}))},[]);return O.jsxs(Eve,{ref:l,children:[O.jsx(qve,{title:n,onSave:a,formData:g,items:e}),O.jsx(Wve,{formData:g,setField:h,rows:c,getSpan:p,colGroup:o})]})});pF.displayName="VerticalTable",tt.Accordion=KT,tt.ArrowDropDownSolid=tve,tt.ArrowDropDownSolid2=nve,tt.ArrowDropUpSolid=rve,tt.Autocomplete=JT,tt.Backdrop=sG,tt.Badge=lG,tt.BarChart=IM,tt.BottomNavigation=TM,tt.Box=mx,tt.Breadcrumbs=RM,tt.Button=fr,tt.Card=Bne,tt.ChatOutlined=Hme,tt.Checkbox=os,tt.DatePicker=Fj,tt.DatePicker3=Zw,tt.DateRangePicker=eS,tt.DesignSystemProvider=Kq,tt.Dialog=cl,tt.Divider=ape,tt.DropdownMenu=spe,tt.EmptyBox=Zme,tt.EyeNoVisibleOutlined=zme,tt.EyeVisibleOutlined=_me,tt.Flex=RA,tt.FloatingButton=cpe,tt.FolderOutlined=Wme,tt.Grid=hc,tt.HomePageSolid=ove,tt.HomeSolid=ive,tt.IconButton=upe,tt.IconMainTitle=dve,tt.InfoBlueSolid=ave,tt.Label=cF,tt.Logo2Solid=uve,tt.LogoSolid=sve,tt.Menu=e4,tt.MenuOutlined=Ume,tt.MinusBoxOutlined=Yme,tt.MinusSolid=lve,tt.MobileMenu=t4,tt.Notification=fpe,tt.Pagination=n4,tt.PieChart=r4,tt.PlusBoxOutlined=qme,tt.PlusSolid=cve,tt.Progress=kA,tt.RHFCheckboxController=zM,tt.RHFDatePicker3Controller=$j,tt.RHFDateRangeController=Hj,tt.RHFSelect2Controller=hpe,tt.RHFTextField2Controller=dpe,tt.Radio=ppe,tt.RadioGroup=gpe,tt.Require=eve,tt.ScrollArea=NA,tt.ScrollBar=bc,tt.SearchOutlined=Gme,tt.Select=Mv,tt.SettingOutlined=Qme,tt.Skeleton=vpe,tt.Snackbar=o4,tt.StarOutlined=Xme,tt.Switch=ype,tt.Table2=Fhe,tt.Tabs=Vhe,tt.Tag=Hhe,tt.TextField2=PA,tt.Tooltip=zhe,tt.TransferList=_he,tt.TreeView=$me,tt.TreeView2=Sve,tt.Typography=lF,tt.User2Outlined=Kme,tt.UserOutlined=Jme,tt.VerticalTable=pF,Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "license": "MIT",
4
4
  "name": "fone-design-system_v2",
5
- "version": "1.0.42",
5
+ "version": "1.0.44",
6
6
  "description": "FoneTech-Systems 전용 컴포넌트 라이브러리",
7
7
  "main": "./dist/index.js",
8
8
  "module": "./dist/fone-design-system.es.js",