@ehfuse/taskbox 0.5.109 → 0.5.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`).replace(/<\/(p|div|li|h[1-6]|blockquote)>/gi,`
|
|
4
4
|
`),t=document.createElement("div");return t.innerHTML=o,(t.textContent??"").replace(/\n{3,}/g,`
|
|
5
5
|
|
|
6
|
-
`).trim()}function mi({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180}){let a=(0,_n.useRef)(null),l=(0,_n.useRef)(null),s=(0,_n.useRef)(Date.now()+800),[d,m]=(0,_n.useState)(!1),c=io();return(0,_n.useEffect)(()=>{if(n)return;let p=Pl(o);l.current===p||l.current===o||(l.current=p,s.current=Date.now()+800,a.current?.setHtml(p))},[e,o,n]),n?(0,Vt.jsxs)(wn.Box,{sx:{position:"relative",mt:1},children:[(0,Vt.jsx)(wn.Box,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:r,fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word",userSelect:"none","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0}},dangerouslySetInnerHTML:{__html:Pl(o)}}),(0,Vt.jsx)(wn.Tooltip,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,Vt.jsx)(wn.IconButton,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(_p(o)).then(()=>{m(!0),window.setTimeout(()=>m(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:d?(0,Vt.jsx)(Ip.default,{sx:{fontSize:17,color:"#2f9e5b"}}):(0,Vt.jsx)(vp.default,{sx:{fontSize:17}})})})]}):(0,Vt.jsx)(wn.Box,{onDragOver:p=>p.stopPropagation(),onDrop:p=>p.stopPropagation(),sx:{mt:1,"& .ehfuse-editor-content > p:first-of-type":{mt:0},"& .ehfuse-editor-content > p:last-of-type":{mb:0},"& .ehfuse-editor-content.ehfuse-editor-empty::before":{top:"12px",left:"12px"}},children:(0,Vt.jsx)(da.EhfuseEditor,{ref:a,defaultValue:Pl(o),resizable:!c,showToolbar:!c,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:da.minimalToolbarOptions,locale:"ko",minHeight:r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:p=>{let f=Date.now()<s.current,u=p===l.current;l.current=p,!(f||u)&&t(p)}})})}var wr=require("react"),Pe=require("@mui/material"),Rl=i(require("@mui/icons-material/Close"),1),Rp=i(require("@mui/icons-material/AddCircle"),1),zl=i(require("@mui/icons-material/AddTask"),1),zp=i(require("@mui/icons-material/Checklist"),1),qp=i(require("@mui/icons-material/CheckCircle"),1),Ap=i(require("@mui/icons-material/Launch"),1),Lp=i(require("@mui/icons-material/LinkOutlined"),1),Np=i(require("@mui/icons-material/RadioButtonUnchecked"),1);var Dn=require("react"),pt=require("@mui/material"),Dp=i(require("@mui/icons-material/Check"),1),Ep=require("@ehfuse/mui-form-dialog"),Mp=require("@ehfuse/mui-form-controls"),Op=require("@ehfuse/alerts"),Pp=require("@ehfuse/overlay-scrollbar");var Po=require("react/jsx-runtime"),wp=[{type:"related",label:"\uAD00\uB828",hint:"\uB2E8\uC21C\uD788 \uAD00\uB828 \uC788\uB294 \uC5C5\uBB34\uB85C \uC5F0\uACB0\uD569\uB2C8\uB2E4"},{type:"follow_up",label:"\uC774\uC804 \uC5C5\uBB34",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C4 \uD6C4\uC18D\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4(\uC774\uB825 \uD0C0\uC784\uB77C\uC778)"},{type:"duplicate_of",label:"\uC911\uBCF5(\uC6D0\uBCF8)",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC6D0\uBCF8 \uC5C5\uBB34\uC758 \uC911\uBCF5\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4"}];function ui({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:a,hideRelationType:l=!1,title:s="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:d="\uC5F0\uACB0"}){let[m,c]=(0,Dn.useState)("related"),[p,f]=(0,Dn.useState)(""),[u,g]=(0,Dn.useState)(0);(0,Dn.useEffect)(()=>{e&&(c("related"),f(""),g(0))},[e]);let O=(0,Dn.useMemo)(()=>{let b=new Set([o.seq,...n]),T=p.trim().toLowerCase();return t.filter(B=>b.has(B.seq)||B.is_event||B.is_notice?!1:T?B.title.toLowerCase().includes(T)||(B.ticket_no??"").toLowerCase().includes(T):!0)},[t,o.seq,n,p]),w=()=>{if(!u){(0,Op.ErrorAlert)("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}a(u,m),r()},k=wp.find(b=>b.type===m)?.hint??"",x=(0,Po.jsxs)(pt.Box,{children:[l?null:(0,Po.jsx)(pt.Tabs,{value:m,onChange:(b,T)=>c(T),sx:{minHeight:38,mb:.75,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:wp.map(b=>(0,Po.jsx)(pt.Tab,{value:b.type,label:b.label},b.type))}),l?null:(0,Po.jsx)(pt.Box,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:k}),(0,Po.jsx)(Mp.ClearTextField,{label:"\uC5C5\uBB34 \uAC80\uC0C9",placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:p,onChange:b=>f(b.target.value),fullWidth:!0,autoFocus:!0}),(0,Po.jsx)(pt.Box,{sx:{mt:1.5,height:300,border:"1px solid #e6e6e3",borderRadius:1},children:(0,Po.jsx)(Pp.OverlayScrollbar,{style:{height:"100%"},children:O.length===0?(0,Po.jsx)(pt.Box,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):O.map(b=>{let T=co(b.icon||Ye),B=b.seq===u;return(0,Po.jsxs)(pt.Box,{onClick:()=>g(B?0:b.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.75,cursor:"pointer",bgcolor:B?"#e3eefb":"transparent","&:hover":{bgcolor:B?"#e3eefb":"#f7f7f5"}},children:[T?(0,Po.jsx)(T,{sx:{fontSize:17,flexShrink:0,color:b.icon_color||"#1e3a8a"}}):null,(0,Po.jsxs)(pt.Box,{component:"span",sx:{flex:1,minWidth:0,fontSize:14,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[b.ticket_no?`${b.ticket_no} `:"",b.title]}),(0,Po.jsx)(je,{option:Vo(b),small:!0}),B?(0,Po.jsx)(Dp.default,{sx:{fontSize:17,flexShrink:0,color:"#2f80ed"}}):null]},b.seq)})})})]});return(0,Po.jsx)(Ep.FormDialog,{open:e,onClose:r,maxWidth:"sm",title:s,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:x}],actions:{showCancelButton:!0,right:(0,Po.jsx)(pt.Button,{variant:"contained",disabled:!u,onClick:w,children:d})}})}var ae=require("react/jsx-runtime");function di({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:a,removeLocked:l=!1,onConvertToTask:s,onOpenLinkedTask:d,linkCandidates:m,linkBaseTask:c,onLinkExistingTask:p,resolveLinkedTask:f}){let[u,g]=(0,wr.useState)(""),[O,w]=(0,wr.useState)(!1),[k,x]=(0,wr.useState)(null),b=io(),[T,B]=(0,wr.useState)(null),[I,P]=(0,wr.useState)(null),S=q=>{let h=q.task_seq?f?.(q.task_seq):void 0;return h?h.completed:q.checked},C=o.filter(S).length,M=()=>{u.trim()&&(t(e,u),g(""))};return(0,ae.jsxs)(dt,{icon:(0,ae.jsx)(zp.default,{sx:{fontSize:19,display:"block"}}),title:(0,ae.jsxs)(ae.Fragment,{children:["\uD560\uC77C",o.length>0?(0,ae.jsxs)(Pe.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[C," / ",o.length]}):null]}),titleExtra:o.length>0?(0,ae.jsx)(Pe.Box,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:(0,ae.jsx)(Pe.Box,{sx:{height:"100%",borderRadius:3,width:`${Math.round(C/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[(0,ae.jsx)(Pe.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((q,h)=>{let y=q.task_seq?f?.(q.task_seq):void 0,N=S(q),L=!!q.task_seq;return(0,ae.jsxs)(Pe.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1}},children:[(0,ae.jsx)(Pe.Box,{component:"span",onClick:()=>n(e,h,!N),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:N?(0,ae.jsx)(qp.default,{sx:{fontSize:18,color:"#2f80ed"}}):(0,ae.jsx)(Np.default,{sx:{fontSize:18,color:"#9a9a97"}})}),k?.index===h?(0,ae.jsx)(Pe.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:k.label,enterKeyHint:"done",onChange:H=>x({index:h,label:H.target.value}),onBlur:()=>{k.label.trim()&&k.label.trim()!==q.label&&a?.(e,h,k.label),x(null)},onKeyDown:H=>{H.key==="Enter"&&H.target.blur(),H.key==="Escape"&&x(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):(0,ae.jsx)(Pe.Box,{component:"span",onClick:L?q.task_seq&&d?()=>d(q.task_seq):void 0:l||!a?void 0:b?()=>B({index:h,label:q.label}):()=>x({index:h,label:q.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:N?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...L?d?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:l||!a?{}:{cursor:"text"}},children:q.label}),L?(0,ae.jsxs)(Pe.Box,{component:"span",onClick:q.task_seq&&d?()=>d(q.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...d?{cursor:"pointer"}:{}},children:[(0,ae.jsx)(Ap.default,{sx:{fontSize:12}}),y?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!l&&!L&&s?(0,ae.jsx)(Pe.Tooltip,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:(0,ae.jsx)(Pe.IconButton,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:H=>P({anchorEl:H.currentTarget,index:h,label:q.label}),sx:{display:b?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,ae.jsx)(zl.default,{sx:{fontSize:16}})})}):null,l?null:(0,ae.jsx)(Pe.IconButton,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,h),sx:{display:b?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,ae.jsx)(Rl.default,{sx:{fontSize:15}})})]},`${q.label}-${h}`)})}),(0,ae.jsxs)(Pe.Box,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[(0,ae.jsx)(Pe.Box,{component:"input",spellCheck:!1,value:u,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:q=>g(q.target.value),onKeyDown:q=>{q.key==="Enter"&&M()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),m&&c&&p?(0,ae.jsx)(Pe.Tooltip,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:(0,ae.jsx)(Pe.IconButton,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:q=>q.preventDefault(),onClick:()=>w(!0),sx:{flexShrink:0,color:"#9a9a97"},children:(0,ae.jsx)(Lp.default,{sx:{fontSize:20}})})}):null,(0,ae.jsx)(Pe.IconButton,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!u.trim(),onMouseDown:q=>q.preventDefault(),onClick:M,sx:{flexShrink:0,color:u.trim()?"#2f80ed":"#c9c8c5"},children:(0,ae.jsx)(Rp.default,{sx:{fontSize:20}})})]}),m&&c&&p?(0,ae.jsx)(ui,{open:O,task:c,tasks:m,excludeSeqs:o.map(q=>Number(q.task_seq??0)).filter(q=>q>0),hideRelationType:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>w(!1),onSubmit:q=>{let h=m.find(y=>y.seq===q);p(e,q,String(h?.title??"").trim())}}):null,(0,ae.jsx)(uo,{open:!!I,anchorEl:I?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>P(null),onConfirm:()=>{I&&s?.(e,I.index,I.label),P(null)}}),(0,ae.jsx)(Pe.Dialog,{open:!!T,onClose:()=>B(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:(0,ae.jsxs)(Pe.Box,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[(0,ae.jsx)(Pe.Box,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),(0,ae.jsx)(Pe.TextField,{autoFocus:!0,fullWidth:!0,size:"medium",value:T?.label??"",onChange:q=>B(h=>h&&{...h,label:q.target.value}),onKeyDown:q=>{if(q.key!=="Enter")return;let h=T;h&&h.label.trim()&&a?.(e,h.index,h.label.trim()),B(null)}}),(0,ae.jsxs)(Pe.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[!l&&s&&T&&!o[T.index]?.task_seq?(0,ae.jsx)(Pe.IconButton,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{s(e,T.index,o[T.index]?.label??""),B(null)},sx:{color:"#57564f"},children:(0,ae.jsx)(zl.default,{sx:{fontSize:20}})}):null,!l&&T?(0,ae.jsx)(Pe.IconButton,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{r(e,T.index),B(null)},sx:{color:"#e5484d"},children:(0,ae.jsx)(Rl.default,{sx:{fontSize:19}})}):null,(0,ae.jsx)(Pe.Box,{sx:{flex:1}}),(0,ae.jsx)(Pe.Button,{color:"inherit",onClick:()=>B(null),children:"\uCDE8\uC18C"}),(0,ae.jsx)(Pe.Button,{variant:"contained",disabled:!T?.label.trim(),onClick:()=>{T&&T.label.trim()&&a?.(e,T.index,T.label.trim()),B(null)},children:"\uD655\uC778"})]})]})})]})}var ha=require("react"),ft=require("@mui/material"),Hp=i(require("@mui/icons-material/Close"),1),Ll=i(require("@mui/icons-material/AttachFileOutlined"),1);var Bh=new Set(["jpg","jpeg","png","gif","bmp","webp","svg","pdf","txt","json","xml","log","md","markdown","csv","xls","xlsx","html","htm","js","jsx","ts","tsx","css","scss","sass","less","php","py","java","c","cpp","h","hpp","cs","go","rs","rb","swift","kt","scala","sql","sh","bash","bat","ps1","yml","yaml","toml","ini","conf","mp4","avi","mov","wmv","flv","webm","mp3","wav","ogg","m4a","aac"]),pa=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return Bh.has(o)};var Fp=require("@mui/material");var Dr=require("react/jsx-runtime");function ql(e){let o=At(),t=o.useValue("attachmentUpload.taskSeq"),n=o.useValue("attachmentUpload.index"),r=o.useValue("attachmentUpload.total"),a=o.useValue("attachmentUpload.queue"),l=n??0;return!l||e>0&&(t??0)!==e?null:{index:l,total:r??0,queue:a??[]}}function fa(){let o=At().useValue("attachmentUpload.progress");return(0,Dr.jsxs)(Dr.Fragment,{children:[o??0,"%"]})}function Al(){let o=At().useValue("attachmentUpload.progress");return(0,Dr.jsx)(Fp.LinearProgress,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}var go=require("react/jsx-runtime");function xa(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var ga={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function pi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:a,onDownload:l}){let[s,d]=(0,ha.useState)(!1),m=(0,ha.useRef)(null),c=io(),p=lr(),f=ar(),u=ql(e),g=e===0,O=T=>{if(a){a(T);return}window.open(f(T.uuid??""),"_blank","noopener,noreferrer")},w=T=>{if(l){l(T);return}window.open(f(T.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},k=T=>u?T+1<u.index?"done":T+1===u.index?"uploading":"waiting":"waiting",x=(T,B,I,P={})=>(0,go.jsxs)(ft.Box,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:P.uploading?"#d5e6fb":"#e6e6e3",bgcolor:P.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[(0,go.jsxs)(ft.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,go.jsx)(Ll.default,{sx:{fontSize:16,color:"#9a9a97"}}),B,(0,go.jsx)(ft.Box,{component:"span",sx:{fontSize:12,color:P.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:I}),P.removeIndex!==void 0?(0,go.jsx)(ft.IconButton,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,P.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,go.jsx)(Hp.default,{sx:{fontSize:15}})}):null]}),P.uploading?(0,go.jsx)(Al,{}):null]},T),b=T=>{let B=pa(T.name);return(0,go.jsx)(ft.Box,{component:"button",type:"button",onClick:()=>B?O(T):w(T),title:`${T.name} ${B?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...ga,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:T.name})};return(0,go.jsxs)(dt,{icon:(0,go.jsx)(Ll.default,{sx:{fontSize:18,display:"block"}}),title:(0,go.jsxs)(go.Fragment,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[(0,go.jsxs)(ft.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((T,B)=>{let I=`${T.uuid||T.name}-${B}`;if(g){let P=k(B),S=P==="uploading";return x(I,(0,go.jsx)(ft.Box,{component:"span",sx:{...ga,color:P==="done"?"#37352f":"#9a9a97"},children:T.name}),S?(0,go.jsx)(fa,{}):xa(T.size),{uploading:S,removeIndex:!r&&!u?B:void 0})}return T.uuid?x(I,b(T),xa(T.size),{removeIndex:r?void 0:B}):x(I,(0,go.jsx)(ft.Box,{component:"span",title:"\uC2E4\uD30C\uC77C\uC774 \uC5C6\uB294 \uC774\uC804 \uBC29\uC2DD \uCCA8\uBD80\uC785\uB2C8\uB2E4(\uB2E4\uC6B4\uB85C\uB4DC \uBD88\uAC00) \u2014 \uB2E4\uC2DC \uCCA8\uBD80\uD574 \uC8FC\uC138\uC694.",sx:{...ga,color:"#9a9a97"},children:T.name}),xa(T.size),{removeIndex:r?void 0:B})}),!g&&u?u.queue.slice(u.index-1).map((T,B)=>{let I=B===0;return x(`uploading-${u.index+B}-${T.name}`,(0,go.jsx)(ft.Box,{component:"span",sx:{...ga,color:"#9a9a97"},children:T.name}),I?(0,go.jsx)(fa,{}):xa(T.size),{uploading:I})}):null]}),(0,go.jsx)(ft.Box,{onClick:()=>m.current?.click(),onDragOver:T=>{T.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:T=>{T.preventDefault(),d(!1);let B=Array.from(T.dataTransfer.files);B.length>0&&t(e,B)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:s?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:s?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:c?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${p}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${p}MB)`}),(0,go.jsx)(ft.Box,{component:"input",ref:m,type:"file",multiple:!0,onChange:T=>{let B=Array.from(T.target.files??[]);B.length>0&&t(e,B),T.target.value=""},sx:{display:"none"}})]})}var Gp=require("react"),Et=require("@mui/material"),Yp=i(require("@mui/icons-material/Add"),1);var fi=require("react"),Er=require("@mui/material"),$p=require("@ehfuse/mui-form-dialog"),Kp=require("@ehfuse/mui-form-controls"),Up=require("@ehfuse/mui-color-picker"),Vp=require("@ehfuse/alerts");var Gt=require("react/jsx-runtime"),Wp="#2f80ed";function Nl({open:e,onClose:o,onSubmit:t}){let[n,r]=(0,fi.useState)(""),[a,l]=(0,fi.useState)(Wp);(0,fi.useEffect)(()=>{e&&(r(""),l(Wp))},[e]);let s=()=>{let c=n.trim();if(!c){(0,Vp.ErrorAlert)("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(c,a),o()},d=Ha(a),m=(0,Gt.jsxs)(Er.Box,{children:[(0,Gt.jsxs)(Er.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[(0,Gt.jsx)(Kp.ClearTextField,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:c=>r(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),s())},fullWidth:!0,autoFocus:!0}),(0,Gt.jsx)(Up.ColorPicker,{value:a,onChange:c=>l(c),shape:"circle",colorSize:28})]}),(0,Gt.jsxs)(Er.Box,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",(0,Gt.jsx)(je,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...d}})]})]});return(0,Gt.jsx)($p.FormDialog,{open:e,onClose:o,maxWidth:"xs",title:"\uC0C8 \uB77C\uBCA8 \uCD94\uAC00",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-label",sections:[{id:"add-label",showTitle:!1,children:m}],actions:{showCancelButton:!0,right:(0,Gt.jsx)(Er.Button,{variant:"contained",onClick:s,children:"\uCD94\uAC00"})}})}var it=require("react/jsx-runtime");function xi({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:a}){let[l,s]=(0,Gp.useState)(!1),d=Lt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(Et.Menu,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,...d,children:[t.map(m=>{let c=o.includes(m.key);return(0,it.jsxs)(Et.MenuItem,{onClick:()=>n(m.key),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,it.jsx)(Et.Checkbox,{size:"small",checked:c,sx:{p:0}}),(0,it.jsx)(je,{option:m})]},m.key)}),(0,it.jsx)(Et.Divider,{}),(0,it.jsxs)(Et.MenuItem,{onClick:()=>s(!0),sx:{fontSize:14,color:"#787774"},children:[(0,it.jsx)(Et.ListItemIcon,{children:(0,it.jsx)(Yp.default,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),(0,it.jsx)(Nl,{open:l,onClose:()=>s(!1),onSubmit:r})]})}function jp(e,o){let t=Number(e.author_account_seq??0);return o.filter(n=>{let r=Number(n.account_seq??0);return r>0&&r!==t})}function Xp(e,o){let t=(e.target_account_seqs??[]).filter(p=>p>0);if(t.length===0)return null;let n=new Set(t),r=jp(e,o),a=new Map;for(let p of r){let f=String(p.department??"").trim();if(!f)continue;let u=a.get(f)??[];u.push(p),a.set(f,u)}let l=[],s=new Set;for(let[p,f]of a)if(f.every(g=>n.has(Number(g.account_seq??0)))){l.push(p);for(let g of f)s.add(Number(g.account_seq??0))}let d=new Map(r.map(p=>[Number(p.account_seq??0),p.name])),m=e.target_names??[],c=[];return t.forEach((p,f)=>{s.has(p)||c.push(d.get(p)??m[f]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:l,individualNames:c}}function gi(e,o){let t=Xp(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function Ch(e,o){let t=Xp(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function Fl(e,o,t){let n=(e.target_account_seqs??[]).filter(c=>c>0),r=jp(e,o),a=n.length>0?n.length:r.length,l=e.acks??[],s=t>0&&l.some(c=>c.account_seq===t),d=t>0&&Number(e.author_account_seq??0)===t,m=n.length===0||n.includes(t);return{count:l.length,total:a,acked:s,canAck:t>0&&!d&&m&&!s&&!e.completed}}function Hl(e,o){let t=Number(o)||50,n=t*1024*1024,r=e.filter(s=>s.size>n),a=e.filter(s=>s.size<=n),l=r.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${t}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
|
|
6
|
+
`).trim()}function mi({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180}){let a=(0,_n.useRef)(null),l=(0,_n.useRef)(null),s=(0,_n.useRef)(Date.now()+800),[d,m]=(0,_n.useState)(!1),c=io();return(0,_n.useEffect)(()=>{if(n)return;let p=Pl(o);l.current===p||l.current===o||(l.current=p,s.current=Date.now()+800,a.current?.setHtml(p))},[e,o,n]),n?(0,Vt.jsxs)(wn.Box,{sx:{position:"relative",mt:1},children:[(0,Vt.jsx)(wn.Box,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:r,fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word",userSelect:"none","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0}},dangerouslySetInnerHTML:{__html:Pl(o)}}),(0,Vt.jsx)(wn.Tooltip,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,Vt.jsx)(wn.IconButton,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(_p(o)).then(()=>{m(!0),window.setTimeout(()=>m(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:d?(0,Vt.jsx)(Ip.default,{sx:{fontSize:17,color:"#2f9e5b"}}):(0,Vt.jsx)(vp.default,{sx:{fontSize:17}})})})]}):(0,Vt.jsx)(wn.Box,{onDragOver:p=>p.stopPropagation(),onDrop:p=>p.stopPropagation(),sx:{mt:1,"& .ehfuse-editor-content > p:first-of-type":{mt:0},"& .ehfuse-editor-content > p:last-of-type":{mb:0},"& .ehfuse-editor-content.ehfuse-editor-empty::before":{top:"12px",left:"12px"}},children:(0,Vt.jsx)(da.EhfuseEditor,{ref:a,defaultValue:Pl(o),autoHeight:c,resizable:!c,showToolbar:!c,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:da.minimalToolbarOptions,locale:"ko",minHeight:r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:p=>{let f=Date.now()<s.current,u=p===l.current;l.current=p,!(f||u)&&t(p)}})})}var wr=require("react"),Pe=require("@mui/material"),Rl=i(require("@mui/icons-material/Close"),1),Rp=i(require("@mui/icons-material/AddCircle"),1),zl=i(require("@mui/icons-material/AddTask"),1),zp=i(require("@mui/icons-material/Checklist"),1),qp=i(require("@mui/icons-material/CheckCircle"),1),Ap=i(require("@mui/icons-material/Launch"),1),Lp=i(require("@mui/icons-material/LinkOutlined"),1),Np=i(require("@mui/icons-material/RadioButtonUnchecked"),1);var Dn=require("react"),pt=require("@mui/material"),Dp=i(require("@mui/icons-material/Check"),1),Ep=require("@ehfuse/mui-form-dialog"),Mp=require("@ehfuse/mui-form-controls"),Op=require("@ehfuse/alerts"),Pp=require("@ehfuse/overlay-scrollbar");var Po=require("react/jsx-runtime"),wp=[{type:"related",label:"\uAD00\uB828",hint:"\uB2E8\uC21C\uD788 \uAD00\uB828 \uC788\uB294 \uC5C5\uBB34\uB85C \uC5F0\uACB0\uD569\uB2C8\uB2E4"},{type:"follow_up",label:"\uC774\uC804 \uC5C5\uBB34",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C4 \uD6C4\uC18D\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4(\uC774\uB825 \uD0C0\uC784\uB77C\uC778)"},{type:"duplicate_of",label:"\uC911\uBCF5(\uC6D0\uBCF8)",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC6D0\uBCF8 \uC5C5\uBB34\uC758 \uC911\uBCF5\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4"}];function ui({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:a,hideRelationType:l=!1,title:s="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:d="\uC5F0\uACB0"}){let[m,c]=(0,Dn.useState)("related"),[p,f]=(0,Dn.useState)(""),[u,g]=(0,Dn.useState)(0);(0,Dn.useEffect)(()=>{e&&(c("related"),f(""),g(0))},[e]);let O=(0,Dn.useMemo)(()=>{let b=new Set([o.seq,...n]),T=p.trim().toLowerCase();return t.filter(B=>b.has(B.seq)||B.is_event||B.is_notice?!1:T?B.title.toLowerCase().includes(T)||(B.ticket_no??"").toLowerCase().includes(T):!0)},[t,o.seq,n,p]),w=()=>{if(!u){(0,Op.ErrorAlert)("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}a(u,m),r()},k=wp.find(b=>b.type===m)?.hint??"",x=(0,Po.jsxs)(pt.Box,{children:[l?null:(0,Po.jsx)(pt.Tabs,{value:m,onChange:(b,T)=>c(T),sx:{minHeight:38,mb:.75,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:wp.map(b=>(0,Po.jsx)(pt.Tab,{value:b.type,label:b.label},b.type))}),l?null:(0,Po.jsx)(pt.Box,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:k}),(0,Po.jsx)(Mp.ClearTextField,{label:"\uC5C5\uBB34 \uAC80\uC0C9",placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:p,onChange:b=>f(b.target.value),fullWidth:!0,autoFocus:!0}),(0,Po.jsx)(pt.Box,{sx:{mt:1.5,height:300,border:"1px solid #e6e6e3",borderRadius:1},children:(0,Po.jsx)(Pp.OverlayScrollbar,{style:{height:"100%"},children:O.length===0?(0,Po.jsx)(pt.Box,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):O.map(b=>{let T=co(b.icon||Ye),B=b.seq===u;return(0,Po.jsxs)(pt.Box,{onClick:()=>g(B?0:b.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.75,cursor:"pointer",bgcolor:B?"#e3eefb":"transparent","&:hover":{bgcolor:B?"#e3eefb":"#f7f7f5"}},children:[T?(0,Po.jsx)(T,{sx:{fontSize:17,flexShrink:0,color:b.icon_color||"#1e3a8a"}}):null,(0,Po.jsxs)(pt.Box,{component:"span",sx:{flex:1,minWidth:0,fontSize:14,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[b.ticket_no?`${b.ticket_no} `:"",b.title]}),(0,Po.jsx)(je,{option:Vo(b),small:!0}),B?(0,Po.jsx)(Dp.default,{sx:{fontSize:17,flexShrink:0,color:"#2f80ed"}}):null]},b.seq)})})})]});return(0,Po.jsx)(Ep.FormDialog,{open:e,onClose:r,maxWidth:"sm",title:s,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:x}],actions:{showCancelButton:!0,right:(0,Po.jsx)(pt.Button,{variant:"contained",disabled:!u,onClick:w,children:d})}})}var ae=require("react/jsx-runtime");function di({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:a,removeLocked:l=!1,onConvertToTask:s,onOpenLinkedTask:d,linkCandidates:m,linkBaseTask:c,onLinkExistingTask:p,resolveLinkedTask:f}){let[u,g]=(0,wr.useState)(""),[O,w]=(0,wr.useState)(!1),[k,x]=(0,wr.useState)(null),b=io(),[T,B]=(0,wr.useState)(null),[I,P]=(0,wr.useState)(null),S=q=>{let h=q.task_seq?f?.(q.task_seq):void 0;return h?h.completed:q.checked},C=o.filter(S).length,M=()=>{u.trim()&&(t(e,u),g(""))};return(0,ae.jsxs)(dt,{icon:(0,ae.jsx)(zp.default,{sx:{fontSize:19,display:"block"}}),title:(0,ae.jsxs)(ae.Fragment,{children:["\uD560\uC77C",o.length>0?(0,ae.jsxs)(Pe.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[C," / ",o.length]}):null]}),titleExtra:o.length>0?(0,ae.jsx)(Pe.Box,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:(0,ae.jsx)(Pe.Box,{sx:{height:"100%",borderRadius:3,width:`${Math.round(C/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[(0,ae.jsx)(Pe.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((q,h)=>{let y=q.task_seq?f?.(q.task_seq):void 0,N=S(q),L=!!q.task_seq;return(0,ae.jsxs)(Pe.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1}},children:[(0,ae.jsx)(Pe.Box,{component:"span",onClick:()=>n(e,h,!N),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:N?(0,ae.jsx)(qp.default,{sx:{fontSize:18,color:"#2f80ed"}}):(0,ae.jsx)(Np.default,{sx:{fontSize:18,color:"#9a9a97"}})}),k?.index===h?(0,ae.jsx)(Pe.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:k.label,enterKeyHint:"done",onChange:H=>x({index:h,label:H.target.value}),onBlur:()=>{k.label.trim()&&k.label.trim()!==q.label&&a?.(e,h,k.label),x(null)},onKeyDown:H=>{H.key==="Enter"&&H.target.blur(),H.key==="Escape"&&x(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):(0,ae.jsx)(Pe.Box,{component:"span",onClick:L?q.task_seq&&d?()=>d(q.task_seq):void 0:l||!a?void 0:b?()=>B({index:h,label:q.label}):()=>x({index:h,label:q.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:N?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...L?d?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:l||!a?{}:{cursor:"text"}},children:q.label}),L?(0,ae.jsxs)(Pe.Box,{component:"span",onClick:q.task_seq&&d?()=>d(q.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...d?{cursor:"pointer"}:{}},children:[(0,ae.jsx)(Ap.default,{sx:{fontSize:12}}),y?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!l&&!L&&s?(0,ae.jsx)(Pe.Tooltip,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:(0,ae.jsx)(Pe.IconButton,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:H=>P({anchorEl:H.currentTarget,index:h,label:q.label}),sx:{display:b?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,ae.jsx)(zl.default,{sx:{fontSize:16}})})}):null,l?null:(0,ae.jsx)(Pe.IconButton,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,h),sx:{display:b?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,ae.jsx)(Rl.default,{sx:{fontSize:15}})})]},`${q.label}-${h}`)})}),(0,ae.jsxs)(Pe.Box,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[(0,ae.jsx)(Pe.Box,{component:"input",spellCheck:!1,value:u,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:q=>g(q.target.value),onKeyDown:q=>{q.key==="Enter"&&M()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),m&&c&&p?(0,ae.jsx)(Pe.Tooltip,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:(0,ae.jsx)(Pe.IconButton,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:q=>q.preventDefault(),onClick:()=>w(!0),sx:{flexShrink:0,color:"#9a9a97"},children:(0,ae.jsx)(Lp.default,{sx:{fontSize:20}})})}):null,(0,ae.jsx)(Pe.IconButton,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!u.trim(),onMouseDown:q=>q.preventDefault(),onClick:M,sx:{flexShrink:0,color:u.trim()?"#2f80ed":"#c9c8c5"},children:(0,ae.jsx)(Rp.default,{sx:{fontSize:20}})})]}),m&&c&&p?(0,ae.jsx)(ui,{open:O,task:c,tasks:m,excludeSeqs:o.map(q=>Number(q.task_seq??0)).filter(q=>q>0),hideRelationType:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>w(!1),onSubmit:q=>{let h=m.find(y=>y.seq===q);p(e,q,String(h?.title??"").trim())}}):null,(0,ae.jsx)(uo,{open:!!I,anchorEl:I?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>P(null),onConfirm:()=>{I&&s?.(e,I.index,I.label),P(null)}}),(0,ae.jsx)(Pe.Dialog,{open:!!T,onClose:()=>B(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:(0,ae.jsxs)(Pe.Box,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[(0,ae.jsx)(Pe.Box,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),(0,ae.jsx)(Pe.TextField,{autoFocus:!0,fullWidth:!0,size:"medium",value:T?.label??"",onChange:q=>B(h=>h&&{...h,label:q.target.value}),onKeyDown:q=>{if(q.key!=="Enter")return;let h=T;h&&h.label.trim()&&a?.(e,h.index,h.label.trim()),B(null)}}),(0,ae.jsxs)(Pe.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[!l&&s&&T&&!o[T.index]?.task_seq?(0,ae.jsx)(Pe.IconButton,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{s(e,T.index,o[T.index]?.label??""),B(null)},sx:{color:"#57564f"},children:(0,ae.jsx)(zl.default,{sx:{fontSize:20}})}):null,!l&&T?(0,ae.jsx)(Pe.IconButton,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{r(e,T.index),B(null)},sx:{color:"#e5484d"},children:(0,ae.jsx)(Rl.default,{sx:{fontSize:19}})}):null,(0,ae.jsx)(Pe.Box,{sx:{flex:1}}),(0,ae.jsx)(Pe.Button,{color:"inherit",onClick:()=>B(null),children:"\uCDE8\uC18C"}),(0,ae.jsx)(Pe.Button,{variant:"contained",disabled:!T?.label.trim(),onClick:()=>{T&&T.label.trim()&&a?.(e,T.index,T.label.trim()),B(null)},children:"\uD655\uC778"})]})]})})]})}var ha=require("react"),ft=require("@mui/material"),Hp=i(require("@mui/icons-material/Close"),1),Ll=i(require("@mui/icons-material/AttachFileOutlined"),1);var Bh=new Set(["jpg","jpeg","png","gif","bmp","webp","svg","pdf","txt","json","xml","log","md","markdown","csv","xls","xlsx","html","htm","js","jsx","ts","tsx","css","scss","sass","less","php","py","java","c","cpp","h","hpp","cs","go","rs","rb","swift","kt","scala","sql","sh","bash","bat","ps1","yml","yaml","toml","ini","conf","mp4","avi","mov","wmv","flv","webm","mp3","wav","ogg","m4a","aac"]),pa=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return Bh.has(o)};var Fp=require("@mui/material");var Dr=require("react/jsx-runtime");function ql(e){let o=At(),t=o.useValue("attachmentUpload.taskSeq"),n=o.useValue("attachmentUpload.index"),r=o.useValue("attachmentUpload.total"),a=o.useValue("attachmentUpload.queue"),l=n??0;return!l||e>0&&(t??0)!==e?null:{index:l,total:r??0,queue:a??[]}}function fa(){let o=At().useValue("attachmentUpload.progress");return(0,Dr.jsxs)(Dr.Fragment,{children:[o??0,"%"]})}function Al(){let o=At().useValue("attachmentUpload.progress");return(0,Dr.jsx)(Fp.LinearProgress,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}var go=require("react/jsx-runtime");function xa(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var ga={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function pi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:a,onDownload:l}){let[s,d]=(0,ha.useState)(!1),m=(0,ha.useRef)(null),c=io(),p=lr(),f=ar(),u=ql(e),g=e===0,O=T=>{if(a){a(T);return}window.open(f(T.uuid??""),"_blank","noopener,noreferrer")},w=T=>{if(l){l(T);return}window.open(f(T.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},k=T=>u?T+1<u.index?"done":T+1===u.index?"uploading":"waiting":"waiting",x=(T,B,I,P={})=>(0,go.jsxs)(ft.Box,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:P.uploading?"#d5e6fb":"#e6e6e3",bgcolor:P.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[(0,go.jsxs)(ft.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,go.jsx)(Ll.default,{sx:{fontSize:16,color:"#9a9a97"}}),B,(0,go.jsx)(ft.Box,{component:"span",sx:{fontSize:12,color:P.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:I}),P.removeIndex!==void 0?(0,go.jsx)(ft.IconButton,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,P.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,go.jsx)(Hp.default,{sx:{fontSize:15}})}):null]}),P.uploading?(0,go.jsx)(Al,{}):null]},T),b=T=>{let B=pa(T.name);return(0,go.jsx)(ft.Box,{component:"button",type:"button",onClick:()=>B?O(T):w(T),title:`${T.name} ${B?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...ga,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:T.name})};return(0,go.jsxs)(dt,{icon:(0,go.jsx)(Ll.default,{sx:{fontSize:18,display:"block"}}),title:(0,go.jsxs)(go.Fragment,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[(0,go.jsxs)(ft.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((T,B)=>{let I=`${T.uuid||T.name}-${B}`;if(g){let P=k(B),S=P==="uploading";return x(I,(0,go.jsx)(ft.Box,{component:"span",sx:{...ga,color:P==="done"?"#37352f":"#9a9a97"},children:T.name}),S?(0,go.jsx)(fa,{}):xa(T.size),{uploading:S,removeIndex:!r&&!u?B:void 0})}return T.uuid?x(I,b(T),xa(T.size),{removeIndex:r?void 0:B}):x(I,(0,go.jsx)(ft.Box,{component:"span",title:"\uC2E4\uD30C\uC77C\uC774 \uC5C6\uB294 \uC774\uC804 \uBC29\uC2DD \uCCA8\uBD80\uC785\uB2C8\uB2E4(\uB2E4\uC6B4\uB85C\uB4DC \uBD88\uAC00) \u2014 \uB2E4\uC2DC \uCCA8\uBD80\uD574 \uC8FC\uC138\uC694.",sx:{...ga,color:"#9a9a97"},children:T.name}),xa(T.size),{removeIndex:r?void 0:B})}),!g&&u?u.queue.slice(u.index-1).map((T,B)=>{let I=B===0;return x(`uploading-${u.index+B}-${T.name}`,(0,go.jsx)(ft.Box,{component:"span",sx:{...ga,color:"#9a9a97"},children:T.name}),I?(0,go.jsx)(fa,{}):xa(T.size),{uploading:I})}):null]}),(0,go.jsx)(ft.Box,{onClick:()=>m.current?.click(),onDragOver:T=>{T.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:T=>{T.preventDefault(),d(!1);let B=Array.from(T.dataTransfer.files);B.length>0&&t(e,B)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:s?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:s?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:c?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${p}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${p}MB)`}),(0,go.jsx)(ft.Box,{component:"input",ref:m,type:"file",multiple:!0,onChange:T=>{let B=Array.from(T.target.files??[]);B.length>0&&t(e,B),T.target.value=""},sx:{display:"none"}})]})}var Gp=require("react"),Et=require("@mui/material"),Yp=i(require("@mui/icons-material/Add"),1);var fi=require("react"),Er=require("@mui/material"),$p=require("@ehfuse/mui-form-dialog"),Kp=require("@ehfuse/mui-form-controls"),Up=require("@ehfuse/mui-color-picker"),Vp=require("@ehfuse/alerts");var Gt=require("react/jsx-runtime"),Wp="#2f80ed";function Nl({open:e,onClose:o,onSubmit:t}){let[n,r]=(0,fi.useState)(""),[a,l]=(0,fi.useState)(Wp);(0,fi.useEffect)(()=>{e&&(r(""),l(Wp))},[e]);let s=()=>{let c=n.trim();if(!c){(0,Vp.ErrorAlert)("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(c,a),o()},d=Ha(a),m=(0,Gt.jsxs)(Er.Box,{children:[(0,Gt.jsxs)(Er.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[(0,Gt.jsx)(Kp.ClearTextField,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:c=>r(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),s())},fullWidth:!0,autoFocus:!0}),(0,Gt.jsx)(Up.ColorPicker,{value:a,onChange:c=>l(c),shape:"circle",colorSize:28})]}),(0,Gt.jsxs)(Er.Box,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",(0,Gt.jsx)(je,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...d}})]})]});return(0,Gt.jsx)($p.FormDialog,{open:e,onClose:o,maxWidth:"xs",title:"\uC0C8 \uB77C\uBCA8 \uCD94\uAC00",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-label",sections:[{id:"add-label",showTitle:!1,children:m}],actions:{showCancelButton:!0,right:(0,Gt.jsx)(Er.Button,{variant:"contained",onClick:s,children:"\uCD94\uAC00"})}})}var it=require("react/jsx-runtime");function xi({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:a}){let[l,s]=(0,Gp.useState)(!1),d=Lt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(Et.Menu,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,...d,children:[t.map(m=>{let c=o.includes(m.key);return(0,it.jsxs)(Et.MenuItem,{onClick:()=>n(m.key),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,it.jsx)(Et.Checkbox,{size:"small",checked:c,sx:{p:0}}),(0,it.jsx)(je,{option:m})]},m.key)}),(0,it.jsx)(Et.Divider,{}),(0,it.jsxs)(Et.MenuItem,{onClick:()=>s(!0),sx:{fontSize:14,color:"#787774"},children:[(0,it.jsx)(Et.ListItemIcon,{children:(0,it.jsx)(Yp.default,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),(0,it.jsx)(Nl,{open:l,onClose:()=>s(!1),onSubmit:r})]})}function jp(e,o){let t=Number(e.author_account_seq??0);return o.filter(n=>{let r=Number(n.account_seq??0);return r>0&&r!==t})}function Xp(e,o){let t=(e.target_account_seqs??[]).filter(p=>p>0);if(t.length===0)return null;let n=new Set(t),r=jp(e,o),a=new Map;for(let p of r){let f=String(p.department??"").trim();if(!f)continue;let u=a.get(f)??[];u.push(p),a.set(f,u)}let l=[],s=new Set;for(let[p,f]of a)if(f.every(g=>n.has(Number(g.account_seq??0)))){l.push(p);for(let g of f)s.add(Number(g.account_seq??0))}let d=new Map(r.map(p=>[Number(p.account_seq??0),p.name])),m=e.target_names??[],c=[];return t.forEach((p,f)=>{s.has(p)||c.push(d.get(p)??m[f]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:l,individualNames:c}}function gi(e,o){let t=Xp(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function Ch(e,o){let t=Xp(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function Fl(e,o,t){let n=(e.target_account_seqs??[]).filter(c=>c>0),r=jp(e,o),a=n.length>0?n.length:r.length,l=e.acks??[],s=t>0&&l.some(c=>c.account_seq===t),d=t>0&&Number(e.author_account_seq??0)===t,m=n.length===0||n.includes(t);return{count:l.length,total:a,acked:s,canAck:t>0&&!d&&m&&!s&&!e.completed}}function Hl(e,o){let t=Number(o)||50,n=t*1024*1024,r=e.filter(s=>s.size>n),a=e.filter(s=>s.size<=n),l=r.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${t}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
|
|
7
7
|
\uC81C\uC678\uB41C \uD30C\uC77C: ${r.map(s=>s.name).join(", ")}`:null;return{accepted:a,rejected:r,message:l}}var me=require("react/jsx-runtime"),$l="#0f9d58";function ba({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:a=!1,hideProject:l=!1,hideBug:s=!1,leadingRow:d,hideLabel:m=!1,employees:c=[],myAccountSeq:p=0,onMemberEdit:f,onAddProject:u,onAddLabelOption:g,contentSyncKey:O="create"}){let w=At(),k=lr(),x=e.useFormValue("manager_name"),b=e.useFormValue("receiver_names"),T=e.useFormValue("start_date"),B=!!e.useFormValue("is_event"),I=!!e.useFormValue("is_bug"),P=e.useFormValue("bug_repro")??"",S=e.useFormValue("bug_device")??"",C=e.useFormValue("bug_where")??"",M=e.useFormValue("bug_version")??"",q=e.useFormValue("event_time")??"",h=e.useFormValue("event_place")??"",y=e.useFormValue("event_address")??"",N=e.useFormValue("due_date"),L=e.useFormValue("estimated_time")??"",H=e.useFormValue("reminder"),F=e.useFormValue("priority"),ue=e.useFormValue("content"),Ie=e.useFormValue("checklist")??[],he=e.useFormValue("tab_key"),qe=e.useFormValue("sprint_seq")??0,_e=e.useFormValue("story_points")??0,Z=t.find(z=>z.key===he&&z.useSprints),Ne=Z?n.filter(z=>`custom-${z.group_seq}`===he):[],[we,no]=(0,Wl.useState)(null),V=e.useFormValue("label_keys"),[$,ne]=(0,Wl.useState)(null),v=e.useFormValue("target_names"),E=e.useFormValue("target_account_seqs"),le=w.useValue("createAttachmentFiles")??[],Ue=a?gi({author_account_seq:p,target_names:v,target_account_seqs:E},c):"";return(0,me.jsxs)(me.Fragment,{children:[d,a?null:(0,me.jsx)(wo.Box,{sx:{display:"flex",gap:1.25,px:2,pt:1.5,pb:1.5,flexShrink:0},children:[{value:"task",label:"\uC5C5\uBB34"},{value:"event",label:"\uC77C\uC815"},...s?[]:[{value:"bug",label:"\uC624\uB958"}]].map(z=>{let ve=I?"bug":B?"event":"task",Ae=ve===z.value;return(0,me.jsx)(wo.ButtonBase,{onClick:()=>{if(ve===z.value)return;e.setFormValue("is_event",z.value==="event"),e.setFormValue("is_bug",z.value==="bug"),e.setFormValue("is_open",z.value==="bug");let ke=e.getFormValue("icon"),X=e.getFormValue("icon_color"),He=[Ye,"event",sr].includes(ke),j=!X||X===$l||X===cr;He&&e.setFormValue("icon",z.value==="event"?"event":z.value==="bug"?sr:Ye),j&&e.setFormValue("icon_color",z.value==="event"?$l:z.value==="bug"?cr:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:Ae?600:400,color:Ae?"#ffffff":"#787774",bgcolor:Ae?"#2563eb":"#f4f4f2"},children:z.label},z.label)})}),(0,me.jsx)(wo.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,me.jsxs)(wo.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[(0,me.jsx)(si,{hideProject:l,showEstimatedTime:!B,values:{tabKey:he,managerName:x,receiverNames:b,startDate:T,dueDate:N,reminder:H,priority:F,estimatedTime:L,eventTime:q,eventPlace:h,eventAddress:y},onChangeEstimatedTime:z=>e.setFormValue("estimated_time",z),customTabs:t,avatarSrcByName:r,notice:a,event:B,onChangeEventTime:z=>e.setFormValue("event_time",z),onChangeEventPlace:z=>e.setFormValue("event_place",z),onChangeEventAddress:z=>e.setFormValue("event_address",z),targetSummary:Ue,onChangeProject:z=>e.setFormValue("tab_key",z),onAddProject:u,onChangeStartDate:z=>e.setFormValue("start_date",z),onChangeDueDate:z=>e.setFormValue("due_date",z),onChangeReminder:z=>e.setFormValue("reminder",z),onChangePriority:z=>e.setFormValue("priority",z),onMemberEdit:f,trailing:(0,me.jsxs)(me.Fragment,{children:[Z&&!B&&!a?(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)(Be,{icon:(0,me.jsx)(ef.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:z=>no(z),children:qe>0?Ne.find(z=>z.seq===qe)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":(0,me.jsx)(wo.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),(0,me.jsx)(Be,{icon:(0,me.jsx)(of.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:(0,me.jsx)(Ut,{value:_e>0?String(_e):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:z=>e.setFormValue("story_points",Number(z.replace(/[^0-9.]/g,""))||0)})})]}):null,I?(0,me.jsx)(ci,{values:{repro:P,device:S,where:C,version:M},onChangeRepro:z=>e.setFormValue("bug_repro",z),onChangeDevice:z=>e.setFormValue("bug_device",z),onChangeWhere:z=>e.setFormValue("bug_where",z),onChangeVersion:z=>e.setFormValue("bug_version",z)}):null]}),leading:B||m?null:(0,me.jsx)(wo.Box,{sx:{gridColumn:"1 / -1"},children:(0,me.jsx)(Be,{icon:(0,me.jsx)(Zp.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:z=>ne(z),children:(V??[]).length>0?(0,me.jsx)(rn,{labelKeys:V??[],labelOptions:o}):(0,me.jsx)(wo.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),(0,me.jsx)(wo.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,me.jsx)(dt,{icon:(0,me.jsx)(Qp.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,me.jsx)(mi,{syncKey:O,value:ue,onChange:z=>e.setFormValue("content",z)})}),B?null:(0,me.jsx)(wo.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),B?null:(0,me.jsx)(di,{taskSeq:0,checklist:Ie,onAdd:(z,ve)=>e.setFormValue("checklist",[...Ie,{label:ve,checked:!1}]),onToggle:(z,ve,Ae)=>e.setFormValue("checklist",Ie.map((ke,X)=>X===ve?{...ke,checked:Ae}:ke)),onRemove:(z,ve)=>e.setFormValue("checklist",Ie.filter((Ae,ke)=>ke!==ve)),onUpdate:(z,ve,Ae)=>e.setFormValue("checklist",Ie.map((ke,X)=>X===ve?{...ke,label:Ae}:ke))}),(0,me.jsx)(wo.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,me.jsx)(pi,{taskSeq:0,attachments:le.map(z=>({name:z.name,size:z.size})),onAdd:(z,ve)=>{let Ae=Hl(ve,k);Ae.message&&(0,nf.InfoAlert)(Ae.message),Ae.accepted.length!==0&&w.setValue("createAttachmentFiles",[...w.getValue("createAttachmentFiles")??[],...Ae.accepted])},onRemove:(z,ve)=>w.setValue("createAttachmentFiles",le.filter((Ae,ke)=>ke!==ve))}),I?null:(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)(wo.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,me.jsx)(dt,{icon:(0,me.jsx)(Jp.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,me.jsx)(tf.TextField,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),(0,me.jsx)(wo.Menu,{transitionDuration:0,anchorEl:we,open:!!we,onClose:()=>no(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Ne.map(z=>({seq:z.seq,label:ut(z)}))].map(z=>(0,me.jsx)(wo.MenuItem,{onClick:()=>{e.setFormValue("sprint_seq",z.seq),no(null)},sx:{fontSize:14,minWidth:170},children:z.label},z.seq))}),(0,me.jsx)(xi,{anchorEl:$,selectedKeys:V??[],labelOptions:o,onToggle:z=>e.setFormValue("label_keys",Hr(V??[],z)),onAddLabel:(z,ve)=>g?.(z,ve),onClose:()=>ne(null)})]})}var Re=require("react/jsx-runtime");function vh({open:e,onClose:o,...t}){let{form:n,presetDueDate:r="",presetTabKey:a="",presetManager:l=null,isNotice:s=!1,defaultBug:d=!1}=t,m=At(),c=(0,er.useRef)(!1),[p,f]=(0,er.useState)(0),[u,g]=(0,er.useState)(null),O=n.useFormValue("title"),w=n.useFormValue("icon"),k=n.useFormValue("icon_color"),x=!!n.useFormValue("is_event"),b=!!n.useFormValue("is_bug"),T=io(),I=m.useValue("createSubmitting")??!1,P=Hn(w||Ye),S=s?"\uACF5\uC9C0 \uB4F1\uB85D":x?"\uC77C\uC815 \uB4F1\uB85D":b?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",C=s?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":x?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":b?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";(0,er.useEffect)(()=>{let h=c.current;c.current=e,!(!e||h)&&(n.setFormValues({...n.getFormValues(),title:"",icon:s?Uo:d?sr:Ye,icon_color:s?"#e5484d":d?cr:"",manager_name:l?.name??"",manager_account_seq:l?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:s,is_event:!1,is_bug:d,is_open:d,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:mo(new Date),due_date:r,reminder:"none",priority:"medium",note:"",content:"",checklist:[],tab_key:a}),m.setValue("createAttachmentFiles",[]),f(y=>y+1))},[e]);let M=(0,Re.jsxs)(lo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[(0,Re.jsx)(lo.IconButton,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:h=>g(h.currentTarget),sx:{p:0,color:k||"#1e3a8a"},children:(0,Re.jsx)(P,{sx:{fontSize:20}})}),(0,Re.jsx)(lo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:O,placeholder:C,onChange:h=>n.setFormValue("title",h.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}})]}),q=(0,Re.jsx)(Jn,{anchorEl:u,value:w,color:k||"#1e3a8a",onSelect:h=>n.setFormValue("icon",h),onSelectColor:h=>n.setFormValue("icon_color",h),onClose:()=>g(null)});return T?(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(lf.FormDialog,{open:e,onClose:o,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:S,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:(0,Re.jsx)(lo.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:I,onClick:I?void 0:n.submit,sx:{ml:2,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"}},children:"\uC800\uC7A5"}),tooltip:I?"\uC800\uC7A5 \uC911\u2026":""}]},fullScreen:!0,mobilePresentation:"slide",tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!1},sections:[{id:"task-create",title:"",showTitle:!1,children:(0,Re.jsx)(lo.Box,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:(0,Re.jsx)(ba,{...t,contentSyncKey:`create-${p}`,leadingRow:M})})}]}),q]}):(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(lo.Drawer,{anchor:"right",open:e,onClose:o,sx:{zIndex:h=>h.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,Re.jsxs)(lo.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,Re.jsxs)(lo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[(0,Re.jsx)(lo.Tooltip,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:(0,Re.jsx)(lo.IconButton,{size:"small",onClick:h=>g(h.currentTarget),sx:{color:k||"#1e3a8a"},children:(0,Re.jsx)(P,{sx:{fontSize:20}})})}),(0,Re.jsx)(lo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:O,placeholder:C,onChange:h=>n.setFormValue("title",h.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}}),(0,Re.jsx)(lo.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:(0,Re.jsx)(rf.default,{})})]}),(0,Re.jsx)(lo.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Re.jsx)(lo.Box,{sx:{flex:1,minHeight:0},children:(0,Re.jsx)(af.default,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,Re.jsx)(ba,{...t,contentSyncKey:`create-${p}`})})}),(0,Re.jsx)(lo.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Re.jsxs)(lo.Box,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[(0,Re.jsx)(lo.Button,{onClick:o,color:"inherit",disabled:I,children:"\uCDE8\uC18C"}),(0,Re.jsx)(lo.Button,{onClick:n.submit,variant:"contained",disabled:I,children:I?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),q]})}var On=require("react"),St=require("@mui/material"),Gf=i(require("@mui/icons-material/ShareOutlined"),1),Yf=i(require("@ehfuse/overlay-scrollbar"),1),jf=require("@ehfuse/mui-form-dialog"),ns=require("@ehfuse/alerts");var Yt=require("react"),Q=require("@mui/material"),Ul=i(require("@mui/icons-material/Send"),1),cf=require("@ehfuse/mui-form-controls"),Vl=i(require("@mui/icons-material/Close"),1),mf=i(require("@mui/icons-material/EditOutlined"),1),uf=i(require("@mui/icons-material/Favorite"),1),df=i(require("@mui/icons-material/FavoriteBorderOutlined"),1),pf=i(require("@mui/icons-material/CheckCircle"),1),ff=i(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),En=i(require("@mui/icons-material/AttachFileOutlined"),1),xf=i(require("@mui/icons-material/ImageOutlined"),1);var Kl=e=>{if(e===0)return"0 Bytes";let o=1024,t=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(o));return parseFloat((e/Math.pow(o,n)).toFixed(2))+" "+t[n]};var W=require("react/jsx-runtime");function sf({kind:e,reactions:o,myAccountSeq:t,onToggle:n}){let r=o??[],a=t>0&&r.some(m=>m.account_seq===t),l=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",s=r.length===0?l:(0,W.jsx)(Q.Box,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(m=>`${m.name} \xB7 ${m.time}`).join(`
|
|
8
8
|
`)}),d=e==="like"?"#e5484d":"#2f80ed";return(0,W.jsx)(Q.Tooltip,{title:s,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,W.jsxs)(Q.Box,{sx:{display:"inline-flex",alignItems:"center"},children:[(0,W.jsx)(Q.IconButton,{size:"small","aria-label":`\uB313\uAE00 ${l}`,onClick:n,sx:{color:a?d:"#c9c8c5",p:.5},children:e==="like"?a?(0,W.jsx)(uf.default,{sx:{fontSize:16}}):(0,W.jsx)(df.default,{sx:{fontSize:16}}):a?(0,W.jsx)(pf.default,{sx:{fontSize:16}}):(0,W.jsx)(ff.default,{sx:{fontSize:16}})}),r.length>0?(0,W.jsx)(Q.Box,{component:"span",sx:{fontSize:12,color:a?d:"#9a9a97",ml:-.25},children:r.length}):null]})})}function Gl({taskSeq:e,comments:o,currentUserName:t="",myAccountSeq:n=0,avatarSrcByName:r,onUpdate:a,onRemove:l,onToggleReaction:s,onPreview:d,onDownload:m}){let[c,p]=(0,Yt.useState)(null),f=(0,Yt.useRef)(null),[u,g]=(0,Yt.useState)(null),O=ar(),w=b=>{if(d){d(b);return}window.open(O(b.uuid??""),"_blank","noopener,noreferrer")},k=b=>{if(m){m(b);return}window.open(O(b.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},x=Zo().slots?.avatar;return(0,W.jsxs)(Q.Box,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[(0,W.jsxs)(Q.Box,{sx:{fontSize:14.5,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),o.length===0?(0,W.jsx)(Q.Box,{sx:{mt:1,fontSize:13.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(0,W.jsx)(Q.Box,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:o.map((b,T)=>(0,W.jsxs)(Q.Box,{sx:{display:"flex",gap:1.5,alignItems:"flex-start","&:hover .taskbox-comment-actions":{opacity:1,pointerEvents:"auto"},"&:not(:last-child)":{borderBottom:"1px dashed #e0dfdc",pb:1}},children:[(()=>{let B=r?.get(b.author)??"";return x?(0,W.jsx)(Q.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,W.jsx)(x,{name:b.author,src:B||void 0,size:44})}):(0,W.jsx)(Q.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,W.jsx)(Ft,{src:B,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...$n[0]},iconFontSize:24})})})(),(0,W.jsxs)(Q.Box,{sx:{flex:1,minWidth:0},children:[(0,W.jsxs)(Q.Box,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[(0,W.jsx)(Q.Box,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:b.author}),(0,W.jsx)(Q.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:b.time}),(0,W.jsxs)(Q.Box,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[(0,W.jsx)(sf,{kind:"like",reactions:b.likes,myAccountSeq:n,onToggle:()=>s?.(e,T,"like")}),(0,W.jsx)(sf,{kind:"ack",reactions:b.acks,myAccountSeq:n,onToggle:()=>s?.(e,T,"ack")})]}),t&&b.author===t?(0,W.jsxs)(Q.Box,{className:"taskbox-comment-actions",sx:{display:"flex",alignItems:"center",gap:.25,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",backgroundColor:"#fff",opacity:0,transition:"opacity 0.15s"},children:[(0,W.jsx)(Q.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>p({index:T,text:b.text,attachments:[...b.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:(0,W.jsx)(mf.default,{sx:{fontSize:15}})}),(0,W.jsx)(Q.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:B=>g({anchorEl:B.currentTarget,index:T}),sx:{color:"#9a9a97"},children:(0,W.jsx)(Vl.default,{sx:{fontSize:15}})})]}):null]}),c?.index===T?(0,W.jsxs)(Q.Box,{sx:{mt:.5},children:[(0,W.jsx)(Q.Box,{component:"textarea",autoFocus:!0,spellCheck:!1,value:c.text,onChange:B=>p({...c,text:B.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),c.attachments.length>0||c.files.length>0?(0,W.jsxs)(Q.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[c.attachments.map((B,I)=>(0,W.jsx)(Q.Chip,{size:"small",icon:(0,W.jsx)(En.default,{sx:{fontSize:14}}),label:B.name,onDelete:()=>p({...c,attachments:c.attachments.filter((P,S)=>S!==I)}),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${B.uuid??B.name}-${I}`)),c.files.map((B,I)=>(0,W.jsx)(Q.Chip,{size:"small",icon:(0,W.jsx)(En.default,{sx:{fontSize:14}}),label:`${B.name} (\uC0C8 \uD30C\uC77C)`,onDelete:()=>p({...c,files:c.files.filter((P,S)=>S!==I)}),sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${B.name}-${I}`))]}):null,(0,W.jsxs)(Q.Box,{sx:{display:"flex",alignItems:"center",gap:.75,mt:.5},children:[(0,W.jsx)(Q.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>f.current?.click(),sx:{color:"#9a9a97"},children:(0,W.jsx)(En.default,{sx:{fontSize:18}})}),(0,W.jsx)(Q.Box,{sx:{flex:1}}),(0,W.jsx)(Q.Button,{size:"small",color:"inherit",onClick:()=>p(null),children:"\uCDE8\uC18C"}),(0,W.jsx)(Q.Button,{size:"small",variant:"contained",disabled:!c.text.trim()&&c.attachments.length===0&&c.files.length===0,onClick:()=>{a(e,T,c.text,{attachments:c.attachments,files:c.files}),p(null)},children:"\uC800\uC7A5"})]}),(0,W.jsx)(Q.Box,{component:"input",type:"file",multiple:!0,ref:f,sx:{display:"none"},onChange:B=>{let I=Array.from(B.target.files??[]);I.length>0&&p({...c,files:[...c.files,...I].slice(0,10)}),B.target.value=""}})]}):(0,W.jsxs)(Q.Box,{children:[b.text?(0,W.jsx)(Q.Box,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:b.text}):null,(b.attachments??[]).length>0?(0,W.jsx)(Q.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(b.attachments??[]).map((B,I)=>{let P=!!B.uuid;if(gf(B.name)&&P)return(0,W.jsx)(Q.Box,{component:"img",src:O(B.uuid??"",{thumb:"md"}),alt:B.name,title:`${B.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>w(B),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${B.name}-${I}`);let C=pa(B.name);return(0,W.jsx)(Q.Chip,{size:"small",icon:(0,W.jsx)(En.default,{sx:{fontSize:14}}),label:`${B.name} (${Kl(B.size)})`,clickable:P,onClick:P?()=>C?w(B):k(B):void 0,title:P?`${B.name} ${C?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:B.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${B.name}-${I}`)})}):null]})]})]},`${b.time}-${T}`))}),(0,W.jsx)(uo,{open:!!u,anchorEl:u?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>g(null),onConfirm:()=>{u&&(l(e,u.index),p(null)),g(null)}})]})}function gf(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function Yl({onSubmit:e}){let[o,t]=(0,Yt.useState)(""),[n,r]=(0,Yt.useState)([]),[a,l]=(0,Yt.useState)(!1),s=(0,Yt.useRef)(null),d=(0,Yt.useRef)(null),m=io(),c=u=>{let g=Array.from(u??[]);g.length!==0&&r(O=>[...O,...g].slice(0,10))},p=()=>{let u=o.trim();!u&&n.length===0||(e(u,n.length>0?n:void 0),t(""),r([]))},f=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Q.IconButton,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>s.current?.click(),sx:{color:"#9a9a97"},children:(0,W.jsx)(En.default,{sx:{fontSize:20}})}),(0,W.jsx)(Q.IconButton,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>d.current?.click(),sx:{color:"#9a9a97"},children:(0,W.jsx)(xf.default,{sx:{fontSize:20}})})]});return(0,W.jsxs)(Q.Box,{children:[n.length>0?(0,W.jsx)(Q.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,px:2,pt:1},children:n.map((u,g)=>gf(u.name)?(0,W.jsxs)(Q.Box,{sx:{position:"relative"},children:[(0,W.jsx)(Q.Box,{component:"img",src:URL.createObjectURL(u),alt:u.name,title:u.name,onLoad:O=>URL.revokeObjectURL(O.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),(0,W.jsx)(Q.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>r(O=>O.filter((w,k)=>k!==g)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,W.jsx)(Vl.default,{sx:{fontSize:14}})})]},`${u.name}-${g}`):(0,W.jsx)(Q.Chip,{size:"small",icon:(0,W.jsx)(En.default,{sx:{fontSize:14}}),label:`${u.name} (${Kl(u.size)})`,onDelete:()=>r(O=>O.filter((w,k)=>k!==g)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${u.name}-${g}`))}):null,(0,W.jsxs)(Q.Box,{sx:{position:"relative",display:"flex"},onDragOver:u=>{Array.from(u.dataTransfer?.types??[]).includes("Files")&&(u.preventDefault(),l(!0))},onDragLeave:u=>{u.currentTarget.contains(u.relatedTarget)||l(!1)},onDrop:u=>{Array.from(u.dataTransfer?.types??[]).includes("Files")&&(u.preventDefault(),l(!1),c(u.dataTransfer?.files??null))},children:[a?(0,W.jsxs)(Q.Box,{sx:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",gap:.75,borderRadius:1,border:"2px dashed #2f80ed",bgcolor:"rgba(47,128,237,0.08)",color:"#2f80ed",fontSize:14,fontWeight:600,pointerEvents:"none"},children:[(0,W.jsx)(En.default,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,(0,W.jsx)(cf.TextField,{value:o,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:u=>t(u.target.value),fullWidth:!0,multiline:!0,minRows:m?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:m?15:6.5,pb:m?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),m?(0,W.jsxs)(Q.Box,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[f,(0,W.jsx)(Q.IconButton,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:p,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:(0,W.jsx)(Ul.default,{sx:{fontSize:22}})})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Q.Box,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:f}),(0,W.jsx)(Q.IconButton,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:p,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:(0,W.jsx)(Ul.default,{sx:{fontSize:22}})})]})]}),(0,W.jsx)(Q.Box,{component:"input",ref:s,type:"file",multiple:!0,onChange:u=>{c(u.target.files),u.target.value=""},sx:{display:"none"}}),(0,W.jsx)(Q.Box,{component:"input",ref:d,type:"file",accept:"image/*",multiple:!0,onChange:u=>{c(u.target.files),u.target.value=""},sx:{display:"none"}})]})}var jl=require("react"),Ho=require("@mui/material"),Tf=i(require("@mui/icons-material/Close"),1),yf=i(require("@mui/icons-material/ArrowBack"),1),Sf=i(require("@mui/icons-material/ShareOutlined"),1),Bf=i(require("@mui/icons-material/ContentCopyOutlined"),1),Cf=i(require("@mui/icons-material/CheckCircle"),1),vf=i(require("@mui/icons-material/CheckCircleOutlineOutlined"),1);var ka=require("@ehfuse/alerts");var hf=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
|
|
9
9
|
`).replace(/<\/(p|div|li|h[1-6]|tr)>/gi,`
|