iris-gantt 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +279 -0
- package/dist/iris-gantt.css +1 -0
- package/dist/iris-gantt.js +3048 -0
- package/dist/iris-gantt.umd.cjs +23 -0
- package/dist/vite.svg +1 -0
- package/package.json +59 -0
- package/src/components/Gantt/gantt.css +2167 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
(function(W,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("react"),require("antd"),require("@fortawesome/react-fontawesome"),require("@fortawesome/free-solid-svg-icons")):typeof define=="function"&&define.amd?define(["exports","react","antd","@fortawesome/react-fontawesome","@fortawesome/free-solid-svg-icons"],F):(W=typeof globalThis<"u"?globalThis:W||self,F(W.IrisGantt={},W.React,W.antd,W.ReactFontawesome,W.FontAwesomeSolid))})(this,(function(W,F,o,U,z){"use strict";function ft(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Me={exports:{}},Se={};var Re;function pt(){if(Re)return Se;Re=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(a,s,m){var c=null;if(m!==void 0&&(c=""+m),s.key!==void 0&&(c=""+s.key),"key"in s){m={};for(var l in s)l!=="key"&&(m[l]=s[l])}else m=s;return s=m.ref,{$$typeof:t,type:a,key:c,ref:s!==void 0?s:null,props:m}}return Se.Fragment=r,Se.jsx=i,Se.jsxs=i,Se}var ve={};var ze;function mt(){return ze||(ze=1,process.env.NODE_ENV!=="production"&&(function(){function t(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===I?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case O:return"Fragment";case T:return"Profiler";case x:return"StrictMode";case H:return"Suspense";case Z:return"SuspenseList";case L:return"Activity"}if(typeof n=="object")switch(typeof n.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case $:return"Portal";case B:return n.displayName||"Context";case _:return(n._context.displayName||"Context")+".Consumer";case Y:var w=n.render;return n=n.displayName,n||(n=w.displayName||w.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case se:return w=n.displayName||null,w!==null?w:t(n.type)||"Memo";case y:w=n._payload,n=n._init;try{return t(n(w))}catch{}}return null}function r(n){return""+n}function i(n){try{r(n);var w=!1}catch{w=!0}if(w){w=console;var E=w.error,A=typeof Symbol=="function"&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object";return E.call(w,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",A),r(n)}}function a(n){if(n===O)return"<>";if(typeof n=="object"&&n!==null&&n.$$typeof===y)return"<...>";try{var w=t(n);return w?"<"+w+">":"<...>"}catch{return"<...>"}}function s(){var n=q.A;return n===null?null:n.getOwner()}function m(){return Error("react-stack-top-frame")}function c(n){if(G.call(n,"key")){var w=Object.getOwnPropertyDescriptor(n,"key").get;if(w&&w.isReactWarning)return!1}return n.key!==void 0}function l(n,w){function E(){g||(g=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",w))}E.isReactWarning=!0,Object.defineProperty(n,"key",{get:E,configurable:!0})}function d(){var n=t(this.type);return k[n]||(k[n]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),n=this.props.ref,n!==void 0?n:null}function S(n,w,E,A,J,ee){var R=E.ref;return n={$$typeof:h,type:n,key:w,props:E,_owner:A},(R!==void 0?R:null)!==null?Object.defineProperty(n,"ref",{enumerable:!1,get:d}):Object.defineProperty(n,"ref",{enumerable:!1,value:null}),n._store={},Object.defineProperty(n._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(n,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(n,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(n,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n}function v(n,w,E,A,J,ee){var R=w.children;if(R!==void 0)if(A)if(N(R)){for(A=0;A<R.length;A++)b(R[A]);Object.freeze&&Object.freeze(R)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else b(R);if(G.call(w,"key")){R=t(n);var ne=Object.keys(w).filter(function(K){return K!=="key"});A=0<ne.length?"{key: someKey, "+ne.join(": ..., ")+": ...}":"{key: someKey}",p[R+A]||(ne=0<ne.length?"{"+ne.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
|
+
let props = %s;
|
|
3
|
+
<%s {...props} />
|
|
4
|
+
React keys must be passed directly to JSX without using spread:
|
|
5
|
+
let props = %s;
|
|
6
|
+
<%s key={someKey} {...props} />`,A,R,ne,R),p[R+A]=!0)}if(R=null,E!==void 0&&(i(E),R=""+E),c(w)&&(i(w.key),R=""+w.key),"key"in w){E={};for(var re in w)re!=="key"&&(E[re]=w[re])}else E=w;return R&&l(E,typeof n=="function"?n.displayName||n.name||"Unknown":n),S(n,R,E,s(),J,ee)}function b(n){C(n)?n._store&&(n._store.validated=1):typeof n=="object"&&n!==null&&n.$$typeof===y&&(n._payload.status==="fulfilled"?C(n._payload.value)&&n._payload.value._store&&(n._payload.value._store.validated=1):n._store&&(n._store.validated=1))}function C(n){return typeof n=="object"&&n!==null&&n.$$typeof===h}var u=F,h=Symbol.for("react.transitional.element"),$=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),B=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),se=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),I=Symbol.for("react.client.reference"),q=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=Object.prototype.hasOwnProperty,N=Array.isArray,D=console.createTask?console.createTask:function(){return null};u={react_stack_bottom_frame:function(n){return n()}};var g,k={},j=u.react_stack_bottom_frame.bind(u,m)(),f=D(a(m)),p={};ve.Fragment=O,ve.jsx=function(n,w,E){var A=1e4>q.recentlyCreatedOwnerStacks++;return v(n,w,E,!1,A?Error("react-stack-top-frame"):j,A?D(a(n)):f)},ve.jsxs=function(n,w,E){var A=1e4>q.recentlyCreatedOwnerStacks++;return v(n,w,E,!0,A?Error("react-stack-top-frame"):j,A?D(a(n)):f)}})()),ve}var He;function gt(){return He||(He=1,process.env.NODE_ENV==="production"?Me.exports=pt():Me.exports=mt()),Me.exports}var e=gt();const ie=(t,r,i)=>{const a=new Date(t);switch(i){case"hour":a.setHours(a.getHours()+r);break;case"day":a.setDate(a.getDate()+r);break;case"week":a.setDate(a.getDate()+r*7);break;case"month":a.setMonth(a.getMonth()+r);break;case"quarter":a.setMonth(a.getMonth()+r*3);break;case"year":a.setFullYear(a.getFullYear()+r);break}return a},De=(t,r)=>{const i=r.getTime()-t.getTime();return Math.ceil(i/(1e3*60*60*24))},We=(t,r)=>{const i=r.getTime()-t.getTime();return Math.ceil(i/(1e3*60*60))},ae=(t,r)=>{const i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],a=["January","February","March","April","May","June","July","August","September","October","November","December"],s=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],m={YYYY:t.getFullYear().toString(),YY:t.getFullYear().toString().slice(-2),MMMM:a[t.getMonth()],MMM:i[t.getMonth()],MM:String(t.getMonth()+1).padStart(2,"0"),M:String(t.getMonth()+1),DD:String(t.getDate()).padStart(2,"0"),D:String(t.getDate()),dddd:s[t.getDay()],HH:String(t.getHours()).padStart(2,"0"),H:String(t.getHours()),mm:String(t.getMinutes()).padStart(2,"0"),m:String(t.getMinutes())};return r.replace(/YYYY|YY|MMMM|MMM|MM|M|DD|D|dddd|HH|H|mm|m/g,c=>m[c])},Ne=t=>{const r=t.getDay();return r===0||r===6},Pe=(t,r)=>r.some(i=>i.getFullYear()===t.getFullYear()&&i.getMonth()===t.getMonth()&&i.getDate()===t.getDate()),Te=t=>{const r=new Date(t);return r.setHours(0,0,0,0),r},xt=t=>{const r=new Date(t);return r.setHours(23,59,59,999),r},yt=(t,r,i="day")=>{switch(i){case"hour":return We(t,r);case"day":return De(t,r);case"week":return Math.ceil(De(t,r)/7);case"month":return(r.getFullYear()-t.getFullYear())*12+(r.getMonth()-t.getMonth());default:return De(t,r)}};function wt(t){if(!t||typeof t!="string")return null;const r=t.trim(),i=/^(\d+)(FS|SS|FF|SF)(([+-])(\d+)([dhwm]))?$/i,a=r.match(i);if(!a)return null;const s=parseInt(a[1],10),m=a[2].toUpperCase();let c=0,l="day";if(a[3]){const d=a[4]==="-"?-1:1;switch(c=parseInt(a[5],10)*d,a[6].toLowerCase()){case"d":l="day";break;case"h":l="hour";break;case"w":l="week";break;case"m":l="month";break}}return{taskNumber:s,type:m,lag:c,lagUnit:l}}function Ae(t,r){switch(r){case"hour":return t/24;case"day":return t;case"week":return t*7;case"month":return t*30;default:return t}}function jt(t,r){const a={e2s:"FS",s2s:"SS",e2e:"FF",s2e:"SF"}[t.type];let s=`${r}${a}`;if(t.lag&&t.lag!==0){const m=t.lag>0?"+":"",l=(t.lagUnit||"day").charAt(0);let d=t.lag;if(t.lagUnit&&t.lagUnit!=="day")switch(t.lagUnit){case"hour":d=t.lag*24;break;case"week":d=t.lag/7;break;case"month":d=t.lag/30;break}s+=`${m}${Math.round(d)}${l}`}return s}function bt(t){return{FS:"e2s",SS:"s2s",FF:"e2e",SF:"s2e"}[t]}const{Text:ge,Paragraph:St,Link:vt}=o.Typography,{Option:Ue}=o.Select,Dt=({task:t,allTasks:r,onAddDependency:i,children:a})=>{const[s,m]=F.useState(!1),[c,l]=F.useState(""),[d,S]=F.useState(null),[v,b]=F.useState("e2s"),[C,u]=F.useState("lag"),[h,$]=F.useState(0),[O,x]=F.useState(!0),T="day",_=F.useMemo(()=>{if(!c)return r.filter(L=>L.id!==t.id);const y=c.toLowerCase();return r.filter(L=>L.id!==t.id&&(L.text.toLowerCase().includes(y)||(r.indexOf(L)+1).toString().includes(y)))},[r,c,t.id]),B=()=>{if(d){const y=C==="lag"?h:-h,L=Ae(y,T);i(d,t.id,v,L),m(!1),Y()}},Y=()=>{l(""),S(null),b("e2s"),u("lag"),$(0)},H=()=>{if(!O)return null;const y=v==="e2s",L=v==="s2s",I=v==="e2e",q=v==="s2e";let G=0,N=0,D="",g=0,k=-1;return y?(G=20,N=160,g=140,k=160,D="M 140 40 L 150 40 C 160 40, 160 90, 150 90 L 160 90"):I?(G=60,N=60,g=180,k=-1,D="M 180 40 L 200 40 L 200 90 L 180 90"):L?(G=100,N=100,g=100,k=-1,D="M 100 40 L 80 40 L 80 90 L 100 90"):q&&(G=160,N=20,g=160,k=140,D="M 160 40 L 150 40 C 140 40, 140 90, 150 90 L 140 90"),e.jsx("div",{style:{width:"100%",height:120,backgroundColor:"#fff",borderRadius:4,marginBottom:10,border:"1px solid #e9ecef",position:"relative",overflow:"hidden"},children:e.jsxs("svg",{viewBox:"0 0 300 120",style:{width:"100%",height:"100%"},children:[e.jsx("line",{x1:g,x2:g,y1:"0",y2:"120",stroke:"#f0f0f0",strokeDasharray:"3,3"}),k!==-1&&e.jsx("line",{x1:k,x2:k,y1:"0",y2:"120",stroke:"#f0f0f0",strokeDasharray:"3,3"}),e.jsx("rect",{x:G,y:"28",width:"120",height:"24",rx:"4",fill:"#bae7ff",stroke:"#69c0ff"}),e.jsx("text",{x:G+60,y:"44",fontSize:"11",textAnchor:"middle",fill:"#0050b3",children:"Task 2"}),e.jsx("rect",{x:N,y:"78",width:"120",height:"24",rx:"4",fill:"#bae7ff",stroke:"#69c0ff"}),e.jsx("text",{x:N+60,y:"94",fontSize:"11",textAnchor:"middle",fill:"#0050b3",children:"Task 3"}),e.jsx("path",{d:D,fill:"none",stroke:"#8c8c8c",strokeWidth:"1.5",markerEnd:"url(#arrowhead)"}),e.jsx("defs",{children:e.jsx("marker",{id:"arrowhead",markerWidth:"10",markerHeight:"7",refX:"9",refY:"3.5",orient:"auto",children:e.jsx("polygon",{points:"0 0, 10 3.5, 0 7",fill:"#8c8c8c"})})})]})})},Z=()=>{const y=r.find(G=>G.id===d);if(!y)return"Select a task from the list to see how it will relate to the current task.";const L=r.indexOf(t)+1,I=r.indexOf(y)+1;let q="";switch(v){case"e2s":q=`Task ${L} starts after Task ${I} finishes`;break;case"s2s":q=`Task ${L} starts when Task ${I} starts`;break;case"e2e":q=`Task ${L} finishes when Task ${I} finishes`;break;case"s2e":q=`Task ${L} finishes when Task ${I} starts`;break}if(h>0){const G=`${h} ${T}${h>1?"s":""}`;C==="lag"?q+=` + ${G} delay`:q+=` - ${G} overlap`}return q+"."},se=e.jsxs("div",{style:{display:"flex",width:620,height:480,backgroundColor:"#fff",borderRadius:"8px",overflow:"hidden"},children:[e.jsxs("div",{style:{flex:1,borderRight:"1px solid #f0f0f0",display:"flex",flexDirection:"column",padding:0},children:[e.jsx("div",{style:{padding:"12px"},children:e.jsx(o.Input,{placeholder:"Search task...",value:c,onChange:y=>l(y.target.value),style:{marginBottom:8},autoFocus:!0,size:"large"})}),e.jsx("div",{style:{flex:1,overflowY:"auto"},children:e.jsx(o.List,{size:"small",dataSource:_,renderItem:y=>e.jsxs(o.List.Item,{className:`task-list-item ${d===y.id?"selected":""}`,onClick:()=>S(y.id),style:{cursor:"pointer",padding:"8px 16px",backgroundColor:d===y.id?"#f0f7ff":"transparent",display:"flex",justifyContent:"space-between"},children:[e.jsxs("div",{style:{display:"flex",gap:12},children:[e.jsx(ge,{type:"secondary",style:{width:20},children:r.indexOf(y)+1}),e.jsx(ge,{children:y.text})]}),e.jsx(U.FontAwesomeIcon,{icon:z.faChevronRight,style:{fontSize:10,color:"#bfbfbf"}})]})})})]}),e.jsxs("div",{style:{width:340,padding:"24px",display:"flex",flexDirection:"column",borderLeft:"1px solid #f0f0f0"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:15},children:[e.jsx(ge,{strong:!0,children:"Dependency type"}),e.jsx(vt,{style:{fontSize:"12px"},onClick:()=>x(!O),children:O?"Hide preview":"Show preview"})]}),H(),e.jsx(St,{style:{fontSize:"13px",color:"#262626",marginBottom:20,minHeight:48,lineHeight:"1.6"},children:Z()}),e.jsx(o.Radio.Group,{value:v,onChange:y=>b(y.target.value),style:{width:"100%",marginBottom:20},children:e.jsxs(o.Space,{direction:"vertical",style:{width:"100%"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",width:"100%"},children:[e.jsx(o.Radio,{value:"e2s",children:"Finish to Start"}),e.jsx(ge,{type:"secondary",children:"FS"})]}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",width:"100%"},children:[e.jsx(o.Radio,{value:"e2e",children:"Finish to Finish"}),e.jsx(ge,{type:"secondary",children:"FF"})]}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",width:"100%"},children:[e.jsx(o.Radio,{value:"s2s",children:"Start to Start"}),e.jsx(ge,{type:"secondary",children:"SS"})]}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",width:"100%"},children:[e.jsx(o.Radio,{value:"s2e",children:"Start to Finish"}),e.jsx(ge,{type:"secondary",children:"SF"})]})]})}),e.jsxs("div",{style:{display:"flex",gap:"10px",marginBottom:20},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx(ge,{type:"secondary",style:{fontSize:"11px",display:"block",marginBottom:4},children:"Delay type"}),e.jsxs(o.Select,{value:C,onChange:y=>u(y),style:{width:"100%"},size:"large",children:[e.jsx(Ue,{value:"lag",children:"Lag by"}),e.jsx(Ue,{value:"lead",children:"Lead by"})]})]}),e.jsxs("div",{style:{width:100},children:[e.jsx(ge,{type:"secondary",style:{fontSize:"11px",display:"block",marginBottom:4},children:"Days"}),e.jsx(o.Space.Compact,{style:{width:"100%"},children:e.jsx(o.InputNumber,{min:0,value:h,onChange:y=>$(y||0),style:{width:"100%"},placeholder:"0",size:"large"})})]})]}),e.jsx(o.Button,{type:"primary",block:!0,onClick:B,disabled:!d,style:{marginTop:"auto",backgroundColor:"#5c67f2",height:44,borderRadius:"6px"},children:"Add"})]})]});return e.jsx(o.Popover,{content:se,trigger:"click",open:s,onOpenChange:m,placement:"bottomLeft",overlayClassName:"dependency-popover",overlayInnerStyle:{padding:0},children:a})},Ie=F.forwardRef(({tasks:t,allTasks:r=[],columns:i,selectedTask:a,onTaskClick:s,onTaskContextMenu:m,onTaskUpdate:c,onTaskDragStart:l,onAddTask:d,onAddDependency:S,links:v=[],dropIndicator:b,reorderTask:C},u)=>{const h=F.useRef(null);F.useImperativeHandle(u,()=>h.current);const $=(x,T=0)=>{if(!x.parent)return T;const _=t.find(B=>B.id===x.parent);return _?$(_,T+1):T},O=(x,T)=>{if(T.template)return T.template(x);switch(T.name){case"text":const _=$(x);return e.jsxs("div",{className:"gantt-grid-cell-text",style:{paddingLeft:_*14},children:[e.jsx("div",{className:"gantt-row-drag-handle",onMouseDown:Y=>{Y.preventDefault(),l?.(x.id,Y.clientX,Y.clientY,"reorder")},children:e.jsx(U.FontAwesomeIcon,{icon:z.faGripVertical})}),x.type==="project"?e.jsx("span",{className:"gantt-tree-icon",onClick:Y=>{Y.stopPropagation(),c?.({...x,open:!x.open})},children:e.jsx(U.FontAwesomeIcon,{icon:x.open?z.faChevronDown:z.faChevronRight})}):e.jsx("span",{style:{width:16,display:"inline-block"}}),e.jsx("span",{className:"gantt-task-name-text",children:x.text})]});case"start":return ae(x.start,"DD-MM-YYYY");case"end":return ae(x.end,"DD-MM-YYYY");case"duration":return e.jsxs("div",{style:{backgroundColor:"#f6e7db",padding:"4px 12px",borderRadius:"4px",fontWeight:600,color:"#434343",display:"inline-block",minWidth:"70px",textAlign:"center"},children:[x.duration," day",x.duration!==1?"s":""]});case"predecessors":const B=v.filter(Y=>Y.target===x.id);return e.jsx(Dt,{task:x,allTasks:r,links:v,onAddDependency:(Y,H,Z,se)=>S?.(Y,H,Z,se),children:e.jsx("div",{style:{cursor:"pointer",minHeight:"24px",width:"100%",display:"flex",alignItems:"center",gap:"4px"},children:B.map(Y=>{const H=r.find(se=>se.id===Y.source),Z=H?r.indexOf(H)+1:0;return e.jsx("span",{style:{fontSize:"11px",backgroundColor:"#e6f7ff",border:"1px solid #91d5ff",color:"#0050b3",padding:"1px 6px",borderRadius:"4px",whiteSpace:"nowrap"},children:jt(Y,Z)},Y.id)})})});case"add":return e.jsx(o.Button,{type:"text",size:"small",icon:e.jsx(U.FontAwesomeIcon,{icon:z.faPlus,style:{fontSize:12,color:"#adb5bd"}}),onClick:Y=>{Y.stopPropagation(),d?.(x.id)}});case"progress":return e.jsxs("div",{className:"gantt-progress-cell",children:[e.jsx("div",{className:"gantt-progress-bar-bg",children:e.jsx("div",{className:"gantt-progress-bar-fill",style:{width:`${x.progress}%`}})}),e.jsxs("span",{className:"gantt-progress-text",children:[x.progress,"%"]})]});case"index":return e.jsx("span",{style:{color:"#8c8c8c"},children:r.indexOf(x)+1});default:return x[T.name]||""}};return e.jsxs("div",{className:"gantt-grid",ref:h,children:[e.jsx("div",{className:"gantt-grid-header",children:i.map(x=>e.jsx("div",{className:"gantt-grid-header-cell",style:{width:x.width,justifyContent:x.align==="center"?"center":"flex-start"},children:x.name==="add"?e.jsx(U.FontAwesomeIcon,{icon:z.faPlus,style:{fontSize:12,color:"#64748b",cursor:"pointer"},onClick:()=>d?.()}):e.jsxs(e.Fragment,{children:[x.label,x.name==="start"&&e.jsx(U.FontAwesomeIcon,{icon:z.faChevronDown,style:{marginLeft:8,fontSize:10,color:"#64748b"}})]})},x.name))}),e.jsx("div",{className:"gantt-grid-body",children:t.map(x=>{const T=C?.id===x.id,_=C?.descendantIds.includes(x.id);return e.jsxs("div",{className:`gantt-grid-row ${a===x.id?"selected":""} ${T?"dragging-row":""} ${_?"descendant-dragging-row":""} ${b?.taskId===x.id?`drop-target-${b.position}`:""}`,onClick:()=>s(x.id),onContextMenu:B=>m?.(B,x.id),children:[i.map(B=>e.jsx("div",{className:"gantt-grid-cell",style:{width:B.width,textAlign:B.align||"left"},children:O(x,B)},`${x.id}-${B.name}`)),b?.taskId===x.id&&e.jsx("div",{className:`gantt-drop-indicator ${b.position}`})]},x.id)})})]})});Ie.displayName="Grid";const Je=({task:t,position:r,selected:i,dragging:a,onClick:s,onDragStart:m,dragDeltaX:c=0,dragType:l=null,readonly:d=!1})=>{const S=(h,$)=>{d||(h.preventDefault(),h.stopPropagation(),m(h.clientX,h.clientY,$))},v=()=>{const h=["gantt-task-bar"];return t.type==="milestone"&&h.push("milestone"),t.type==="project"&&h.push("project"),i&&h.push("selected"),a&&h.push("dragging"),h.join(" ")},b=()=>{let h=r.left,$=r.width;return a&&l&&(l==="move"?h+=c:l==="resize-left"?(h+=c,$-=c):l==="resize-right"&&($+=c)),{left:`${h}px`,width:`${Math.max($,0)}px`,backgroundColor:t.color||void 0}},C=(h=!1)=>e.jsxs(e.Fragment,{children:[!d&&t.type!=="milestone"&&!h&&e.jsx("div",{className:"gantt-task-resize-handle gantt-task-resize-left",onMouseDown:$=>S($,"resize-left")}),!h&&t.type!=="milestone"&&e.jsx("div",{className:"gantt-task-progress",style:{width:`${t.progress}%`}}),e.jsx("div",{className:"gantt-task-content",children:!h&&t.type!=="milestone"&&e.jsx("span",{className:"gantt-task-text",children:t.text})}),t.type==="milestone"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"gantt-milestone-diamond"}),e.jsx("span",{className:"gantt-milestone-text",children:t.text})]}),!d&&t.type!=="milestone"&&!h&&e.jsx("div",{className:"gantt-task-resize-handle gantt-task-resize-right",onMouseDown:$=>S($,"resize-right")})]}),u=e.jsxs("div",{className:"gantt-tooltip",children:[e.jsx("div",{className:"gantt-tooltip-title",children:t.text}),e.jsxs("div",{className:"gantt-tooltip-dates",children:[ae(t.start,"MMM D")," - ",ae(t.end,"MMM D")]}),e.jsxs("div",{className:"gantt-tooltip-progress",children:["Progress: ",t.progress,"%"]}),t.owner&&e.jsxs("div",{className:"gantt-tooltip-owner",children:["Owner: ",t.owner]})]});return t.segments&&t.segments.length>0?e.jsx("div",{className:"gantt-task-group",children:t.segments.map((h,$)=>e.jsx(o.Tooltip,{title:u,mouseEnterDelay:.5,children:e.jsx("div",{className:v()+" segment",style:{left:`${r.left+(h.start.getTime()-t.start.getTime())/(t.end.getTime()-t.start.getTime())*r.width}px`,width:`${(h.end.getTime()-h.start.getTime())/(t.end.getTime()-t.start.getTime())*r.width}px`,backgroundColor:t.color||"#ADCFFE"},onClick:s,onMouseDown:O=>S(O,"move"),children:C(!0)})},$))}):e.jsx(o.Tooltip,{title:u,mouseEnterDelay:.5,children:e.jsx("div",{className:v(),style:b(),onClick:s,onMouseDown:h=>S(h,"move"),children:C()})})},Tt=({links:t,tasks:r,getTaskPosition:i})=>{const a=c=>r.find(l=>l.id===c),s=c=>{const l=a(c.source),d=a(c.target);if(!l||!d)return"";const S=i(l),v=i(d),b=S.top+S.height/2,C=v.top+v.height/2;let u=0,h=0;switch(c.type){case"e2s":u=S.left+S.width,h=v.left;break;case"s2s":u=S.left,h=v.left;break;case"e2e":u=S.left+S.width,h=v.left+v.width;break;case"s2e":u=S.left,h=v.left+v.width;break}const $=h-u,O=C-b,x=20;if(c.type==="e2s")if($>=x){const T=u+$/2;return`M ${u},${b} L ${T},${b} L ${T},${C} L ${h},${C}`}else{const T=x/2,_=b+O/2;return`M ${u},${b} L ${u+T},${b} L ${u+T},${_} L ${h-T},${_} L ${h-T},${C} L ${h},${C}`}else if(c.type==="s2s"){const T=Math.min(u,h)-x/2;return`M ${u},${b} L ${T},${b} L ${T},${C} L ${h},${C}`}else if(c.type==="e2e"){const T=Math.max(u,h)+x/2;return`M ${u},${b} L ${T},${b} L ${T},${C} L ${h},${C}`}else if(c.type==="s2e")if($<=-x){const T=u+$/2;return`M ${u},${b} L ${T},${b} L ${T},${C} L ${h},${C}`}else{const T=x/2,_=b+O/2;return`M ${u},${b} L ${u-T},${b} L ${u-T},${_} L ${h+T},${_} L ${h+T},${C} L ${h},${C}`}return""},m=c=>{const l=a(c.target);if(!l)return"";const d=i(l),S=d.top+d.height/2,v=8,b=6;let C=0,u=!0;return c.type==="e2s"||c.type==="s2s"?(C=d.left,u=!0):(C=d.left+d.width,u=!1),u?`M ${C},${S} L ${C-v},${S-b/2} L ${C-v},${S+b/2} Z`:`M ${C},${S} L ${C+v},${S-b/2} L ${C+v},${S+b/2} Z`};return e.jsx("svg",{className:"gantt-links-layer",style:{overflow:"visible"},children:t.map(c=>{const l=a(c.source),d=a(c.target);if(!l||!d)return null;const S=s(c),v=m(c);return e.jsxs("g",{className:"gantt-link",children:[e.jsx("path",{d:S,fill:"none",strokeWidth:"1.5",className:"gantt-link-line"}),e.jsx("path",{d:v,className:"gantt-link-arrow"})]},c.id)})})},Mt=(t,r,i=60,a="day",s=1)=>{const[m,c]=F.useState({taskId:null,initialX:0,initialY:0,initialStart:new Date,initialEnd:new Date,type:null,dragDeltaX:0,dragDeltaY:0}),l=F.useCallback((v,b,C,u)=>{const h=t.find($=>$.id===v);h&&c({taskId:v,initialX:b,initialY:C,initialStart:new Date(h.start),initialEnd:new Date(h.end),type:u,dragDeltaX:0,dragDeltaY:0})},[t]),d=F.useCallback((v,b)=>{if(!m.taskId||!m.type)return null;const C=v-m.initialX,u=b-m.initialY;if(c(_=>({..._,dragDeltaX:C,dragDeltaY:u})),m.type==="reorder")return null;const h=t.find(_=>_.id===m.taskId);if(!h)return null;const $=Math.round(C/i);let O=new Date(m.initialStart),x=new Date(m.initialEnd);switch(m.type){case"move":O=ie(m.initialStart,$*s,a),x=ie(m.initialEnd,$*s,a);break;case"resize-left":O=ie(m.initialStart,$*s,a),O>=x&&(O=ie(x,-s,a));break;case"resize-right":x=ie(m.initialEnd,$*s,a),x<=O&&(x=ie(O,s,a));break}const T=De(O,x);return{...h,start:O,end:x,duration:T}},[m,t,i]),S=F.useCallback(v=>{if(v&&r){const{id:b,...C}=v;r(b,C)}c({taskId:null,initialX:0,initialY:0,initialStart:new Date,initialEnd:new Date,type:null,dragDeltaX:0,dragDeltaY:0})},[r]);return{dragState:m,handleDragStart:l,handleDrag:d,handleDragEnd:S}},Le=F.forwardRef(({tasks:t,links:r,range:i,scales:a,config:s,selectedTask:m,onTaskClick:c,onTaskDragStart:l,onTaskDragEnd:d,onTaskUpdate:S,zoomLevel:v,baselines:b},C)=>{const[u,h]=F.useState(t),$=(s.columnWidth||60)*v,O=s.baselines&&b&&b.size>0,{dragState:x,handleDragStart:T,handleDrag:_,handleDragEnd:B}=Mt(u,S,$,a[1].unit,a[1].step);F.useEffect(()=>{h(t)},[t]);const Y=f=>{const p=[];let n=new Date(i.start);for(;n<=i.end;)p.push({date:new Date(n),label:ae(n,f.format||"D")}),n=ie(n,f.step,f.unit);return p},H=f=>{const p=a[1],n=i.start.getTime(),E=f.getTime()-n,J={hour:36e5,day:864e5,week:6048e5,month:2592e6,quarter:7776e6,year:31536e6}[p.unit]||864e5;return E/(J*p.step)*$},Z=f=>{const p=H(f.start),n=H(f.end);return{left:p,width:Math.max(n-p,0)}},se=f=>{const p=H(f.start),n=H(f.end);return{left:p,width:Math.max(n-p,0)}},y=f=>{const p=Z(f),n=u.findIndex(J=>J.id===f.id),w=s.rowHeight||48,E=32,A=(w-E)/2;return{left:p.left,width:p.width,top:n*w+A,height:E}},L=F.useCallback(f=>{if(x.taskId&&x.type){const p=_(f.clientX,f.clientY);p&&h(n=>n.map(w=>w.id===p.id?p:w))}},[x,_]),I=F.useCallback(()=>{if(x.taskId){const f=u.find(p=>p.id===x.taskId);B(f||null),d()}},[x,u,B,d]),q=a[1],G=Y(q),N=()=>{const f=[];let p=-1,n=-1,w=0,E="";return G.forEach(A=>{const J=A.date.getMonth(),ee=A.date.getFullYear(),R=ae(A.date,"MMM YYYY");J!==p||ee!==n?(p!==-1&&f.push({label:E,width:w}),p=J,n=ee,w=$,E=R):w+=$}),p!==-1&&f.push({label:E,width:w}),f},D=()=>{const f=[];let p=-1,n=0,w=-1,E=-1,A="";return G.forEach(J=>{const R=J.date.getDate()<=15?0:1,ne=J.date.getMonth(),re=J.date.getFullYear(),K=ae(J.date,"MMM"),he=new Date(re,ne+1,0).getDate(),fe=R===0?`${K} 1 - 15`:`${K} 16 - ${he}`;R!==p||ne!==w||re!==E?(p!==-1&&f.push({label:A,width:n}),p=R,w=ne,E=re,n=$,A=fe):n+=$}),p!==-1&&f.push({label:A,width:n}),f},g=N(),k=D(),j=G.length*$;return e.jsxs("div",{className:"gantt-timeline-container",ref:C,onMouseMove:L,onMouseUp:I,style:{width:j},children:[e.jsxs("div",{className:"gantt-timeline-header",style:{width:j,minWidth:j},children:[e.jsx("div",{className:"gantt-timeline-scale gantt-timeline-scale-month",style:{width:j},children:g.map((f,p)=>e.jsx("div",{className:"gantt-timeline-cell",style:{width:f.width,minWidth:f.width,maxWidth:f.width,borderRight:p===g.length-1?"none":"var(--wx-gantt-border)"},children:f.label},`top-${p}`))}),e.jsx("div",{className:"gantt-timeline-scale gantt-timeline-scale-range",style:{width:j},children:k.map((f,p)=>e.jsx("div",{className:"gantt-timeline-cell",style:{width:f.width,minWidth:f.width,maxWidth:f.width,borderRight:p===k.length-1?"none":"var(--wx-gantt-border)"},children:f.label},`mid-${p}`))}),e.jsx("div",{className:"gantt-timeline-scale gantt-timeline-scale-day",style:{width:j},children:G.map((f,p)=>{const n=s.weekends&&Ne(f.date),w=s.holidays&&Pe(f.date,s.holidays);return e.jsx("div",{className:`gantt-timeline-cell ${n?"weekend":""} ${w?"holiday":""}`,style:{width:$,minWidth:$,maxWidth:$,borderRight:p===G.length-1?"none":"var(--wx-gantt-border)"},children:f.label},`day-${p}`)})})]}),e.jsxs("div",{className:"gantt-timeline-body",style:{width:j},children:[e.jsx("div",{className:"gantt-timeline-grid",children:G.map((f,p)=>{const n=s.weekends&&Ne(f.date),w=s.holidays&&Pe(f.date,s.holidays);return e.jsx("div",{className:`gantt-timeline-grid-column ${n?"weekend":""} ${w?"holiday":""}`,style:{width:$,minWidth:$}},p)})}),r.length>0&&e.jsx(Tt,{links:r,tasks:u,getTaskPosition:y}),e.jsx("div",{className:"gantt-timeline-tasks",style:{width:j},children:u.map(f=>{const p=Z(f),n=O?b?.get(f.id):void 0,w=n?se(n):void 0;return e.jsxs("div",{className:"gantt-timeline-row",children:[n&&w&&f.type!=="milestone"&&e.jsx("div",{className:"gantt-baseline-bar",style:{left:`${w.left}px`,width:`${w.width}px`},title:`Baseline: ${n.start.toLocaleDateString()} - ${n.end.toLocaleDateString()}`}),e.jsx(Je,{task:f,position:p,selected:m===f.id,dragging:x.taskId===f.id,dragDeltaX:x.dragDeltaX,dragType:x.type,onClick:()=>c(f.id),onDragStart:(E,A,J)=>{T(f.id,E,A,J),l(f.id,E,A)},readonly:s.readonly})]},f.id)})})]})]})});Le.displayName="Timeline";const Oe=F.forwardRef((t,r)=>e.jsx("div",{className:"gantt-chart-wrapper",style:{flex:1,minWidth:0},children:e.jsx(Le,{...t,ref:r})}));Oe.displayName="Chart";const{Search:$t}=o.Input,Ve=({onFilterChange:t,owners:r})=>{const[i,a]=F.useState({searchText:"",status:"all",priority:"all",owner:""}),s=l=>{const d={...i,...l};a(d),t(d)},m=()=>{const l={searchText:"",status:"all",priority:"all",owner:""};a(l),t(l)},c=i.searchText!==""||i.status!=="all"||i.priority!=="all"||i.owner!=="";return e.jsx("div",{className:"gantt-filter-container",children:e.jsxs("div",{className:"gantt-filter-bar",children:[e.jsx("div",{className:"gantt-filter-left",children:e.jsx($t,{placeholder:"Search tasks...",value:i.searchText,onChange:l=>s({searchText:l.target.value}),allowClear:!0,className:"gantt-search-antd",style:{width:250}})}),e.jsxs("div",{className:"gantt-filter-right",children:[e.jsx(o.Select,{value:i.status,onChange:l=>s({status:l}),className:"gantt-filter-select-antd",style:{width:140},options:[{value:"all",label:"All Status"},{value:"not-started",label:"Not Started"},{value:"in-progress",label:"In Progress"},{value:"completed",label:"Completed"}]}),e.jsx(o.Select,{value:i.priority,onChange:l=>s({priority:l}),className:"gantt-filter-select-antd",style:{width:130},options:[{value:"all",label:"All Priority"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}]}),e.jsx(o.Select,{value:i.owner||void 0,onChange:l=>s({owner:l||""}),className:"gantt-filter-select-antd",style:{width:130},placeholder:"All Owners",allowClear:!0,options:[{value:"",label:"All Owners"},...r.map(l=>({value:l,label:l}))]}),c&&e.jsx(o.Button,{type:"default",danger:!0,icon:e.jsx(U.FontAwesomeIcon,{icon:z.faTimesCircle}),onClick:m,className:"gantt-filter-clear-antd",children:"Clear"})]})]})})},Ge=(t,r)=>t.filter(i=>{if(r.searchText){const a=r.searchText.toLowerCase(),s=i.text.toLowerCase().includes(a),m=i.owner?.toLowerCase().includes(a),c=i.details?.toLowerCase().includes(a);if(!s&&!m&&!c)return!1}if(r.status!=="all"&&(i.progress===0?"not-started":i.progress===100?"completed":"in-progress")!==r.status||r.priority!=="all"&&i.priority!==r.priority||r.owner&&i.owner!==r.owner)return!1;if(r.dateRange){const a=i.start.getTime(),s=r.dateRange.start.getTime(),m=r.dateRange.end.getTime();if(a<s||a>m)return!1}return!0}),qe=({zoomLevel:t,setZoomLevel:r,onBaselineToggle:i,showBaselines:a,onExport:s,onFilterChange:m,owners:c,onAddTask:l})=>e.jsxs("div",{className:"gantt-toolbar-wrapper",children:[e.jsxs("div",{className:"gantt-toolbar",children:[e.jsx("div",{className:"gantt-toolbar-left",children:e.jsxs(o.Space,{size:8,children:[e.jsx(o.Button,{type:"primary",icon:e.jsx(U.FontAwesomeIcon,{icon:z.faPlus}),onClick:l,children:"New Task"}),e.jsx(o.Tooltip,{title:a?"Hide Baselines":"Show Baselines",children:e.jsx(o.Button,{type:a?"primary":"default",icon:e.jsx(U.FontAwesomeIcon,{icon:z.faCalendarCheck}),onClick:i,children:a?"Baselines":"Set Baseline"})})]})}),e.jsx("div",{className:"gantt-toolbar-right",children:e.jsxs(o.Space,{size:4,children:[e.jsx(o.Tooltip,{title:"Zoom Out",children:e.jsx(o.Button,{icon:e.jsx(U.FontAwesomeIcon,{icon:z.faSearchMinus}),onClick:()=>r(Math.max(.5,t-.25))})}),e.jsx(o.Tooltip,{title:"Zoom In",children:e.jsx(o.Button,{icon:e.jsx(U.FontAwesomeIcon,{icon:z.faSearchPlus}),onClick:()=>r(Math.min(2,t+.25))})}),e.jsx(o.Tooltip,{title:"Reset Zoom",children:e.jsx(o.Button,{icon:e.jsx(U.FontAwesomeIcon,{icon:z.faRotateLeft}),onClick:()=>r(1)})}),e.jsx(o.Divider,{type:"vertical",style:{height:24,margin:"0 4px"}}),e.jsx(o.Tooltip,{title:"Export to CSV",children:e.jsx(o.Button,{icon:e.jsx(U.FontAwesomeIcon,{icon:z.faFileCsv}),onClick:()=>s("csv")})}),e.jsx(o.Tooltip,{title:"Export to Excel",children:e.jsx(o.Button,{icon:e.jsx(U.FontAwesomeIcon,{icon:z.faFileExcel}),onClick:()=>s("excel")})}),e.jsx(o.Tooltip,{title:"Export to JSON",children:e.jsx(o.Button,{icon:e.jsx(U.FontAwesomeIcon,{icon:z.faFileCode}),onClick:()=>s("json")})}),e.jsx(o.Tooltip,{title:"Export to PDF",children:e.jsx(o.Button,{icon:e.jsx(U.FontAwesomeIcon,{icon:z.faFilePdf}),onClick:()=>s("pdf")})})]})})]}),e.jsx(Ve,{onFilterChange:m,owners:c})]});var $e={exports:{}},kt=$e.exports,Xe;function Ct(){return Xe||(Xe=1,(function(t,r){(function(i,a){t.exports=a()})(kt,(function(){var i=1e3,a=6e4,s=36e5,m="millisecond",c="second",l="minute",d="hour",S="day",v="week",b="month",C="quarter",u="year",h="date",$="Invalid Date",O=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var D=["th","st","nd","rd"],g=N%100;return"["+N+(D[(g-20)%10]||D[g]||D[0])+"]"}},_=function(N,D,g){var k=String(N);return!k||k.length>=D?N:""+Array(D+1-k.length).join(g)+N},B={s:_,z:function(N){var D=-N.utcOffset(),g=Math.abs(D),k=Math.floor(g/60),j=g%60;return(D<=0?"+":"-")+_(k,2,"0")+":"+_(j,2,"0")},m:function N(D,g){if(D.date()<g.date())return-N(g,D);var k=12*(g.year()-D.year())+(g.month()-D.month()),j=D.clone().add(k,b),f=g-j<0,p=D.clone().add(k+(f?-1:1),b);return+(-(k+(g-j)/(f?j-p:p-j))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:b,y:u,w:v,d:S,D:h,h:d,m:l,s:c,ms:m,Q:C}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},Y="en",H={};H[Y]=T;var Z="$isDayjsObject",se=function(N){return N instanceof q||!(!N||!N[Z])},y=function N(D,g,k){var j;if(!D)return Y;if(typeof D=="string"){var f=D.toLowerCase();H[f]&&(j=f),g&&(H[f]=g,j=f);var p=D.split("-");if(!j&&p.length>1)return N(p[0])}else{var n=D.name;H[n]=D,j=n}return!k&&j&&(Y=j),j||!k&&Y},L=function(N,D){if(se(N))return N.clone();var g=typeof D=="object"?D:{};return g.date=N,g.args=arguments,new q(g)},I=B;I.l=y,I.i=se,I.w=function(N,D){return L(N,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var q=(function(){function N(g){this.$L=y(g.locale,null,!0),this.parse(g),this.$x=this.$x||g.x||{},this[Z]=!0}var D=N.prototype;return D.parse=function(g){this.$d=(function(k){var j=k.date,f=k.utc;if(j===null)return new Date(NaN);if(I.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var p=j.match(O);if(p){var n=p[2]-1||0,w=(p[7]||"0").substring(0,3);return f?new Date(Date.UTC(p[1],n,p[3]||1,p[4]||0,p[5]||0,p[6]||0,w)):new Date(p[1],n,p[3]||1,p[4]||0,p[5]||0,p[6]||0,w)}}return new Date(j)})(g),this.init()},D.init=function(){var g=this.$d;this.$y=g.getFullYear(),this.$M=g.getMonth(),this.$D=g.getDate(),this.$W=g.getDay(),this.$H=g.getHours(),this.$m=g.getMinutes(),this.$s=g.getSeconds(),this.$ms=g.getMilliseconds()},D.$utils=function(){return I},D.isValid=function(){return this.$d.toString()!==$},D.isSame=function(g,k){var j=L(g);return this.startOf(k)<=j&&j<=this.endOf(k)},D.isAfter=function(g,k){return L(g)<this.startOf(k)},D.isBefore=function(g,k){return this.endOf(k)<L(g)},D.$g=function(g,k,j){return I.u(g)?this[k]:this.set(j,g)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(g,k){var j=this,f=!!I.u(k)||k,p=I.p(g),n=function(re,K){var he=I.w(j.$u?Date.UTC(j.$y,K,re):new Date(j.$y,K,re),j);return f?he:he.endOf(S)},w=function(re,K){return I.w(j.toDate()[re].apply(j.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(K)),j)},E=this.$W,A=this.$M,J=this.$D,ee="set"+(this.$u?"UTC":"");switch(p){case u:return f?n(1,0):n(31,11);case b:return f?n(1,A):n(0,A+1);case v:var R=this.$locale().weekStart||0,ne=(E<R?E+7:E)-R;return n(f?J-ne:J+(6-ne),A);case S:case h:return w(ee+"Hours",0);case d:return w(ee+"Minutes",1);case l:return w(ee+"Seconds",2);case c:return w(ee+"Milliseconds",3);default:return this.clone()}},D.endOf=function(g){return this.startOf(g,!1)},D.$set=function(g,k){var j,f=I.p(g),p="set"+(this.$u?"UTC":""),n=(j={},j[S]=p+"Date",j[h]=p+"Date",j[b]=p+"Month",j[u]=p+"FullYear",j[d]=p+"Hours",j[l]=p+"Minutes",j[c]=p+"Seconds",j[m]=p+"Milliseconds",j)[f],w=f===S?this.$D+(k-this.$W):k;if(f===b||f===u){var E=this.clone().set(h,1);E.$d[n](w),E.init(),this.$d=E.set(h,Math.min(this.$D,E.daysInMonth())).$d}else n&&this.$d[n](w);return this.init(),this},D.set=function(g,k){return this.clone().$set(g,k)},D.get=function(g){return this[I.p(g)]()},D.add=function(g,k){var j,f=this;g=Number(g);var p=I.p(k),n=function(A){var J=L(f);return I.w(J.date(J.date()+Math.round(A*g)),f)};if(p===b)return this.set(b,this.$M+g);if(p===u)return this.set(u,this.$y+g);if(p===S)return n(1);if(p===v)return n(7);var w=(j={},j[l]=a,j[d]=s,j[c]=i,j)[p]||1,E=this.$d.getTime()+g*w;return I.w(E,this)},D.subtract=function(g,k){return this.add(-1*g,k)},D.format=function(g){var k=this,j=this.$locale();if(!this.isValid())return j.invalidDate||$;var f=g||"YYYY-MM-DDTHH:mm:ssZ",p=I.z(this),n=this.$H,w=this.$m,E=this.$M,A=j.weekdays,J=j.months,ee=j.meridiem,R=function(K,he,fe,je){return K&&(K[he]||K(k,f))||fe[he].slice(0,je)},ne=function(K){return I.s(n%12||12,K,"0")},re=ee||function(K,he,fe){var je=K<12?"AM":"PM";return fe?je.toLowerCase():je};return f.replace(x,(function(K,he){return he||(function(fe){switch(fe){case"YY":return String(k.$y).slice(-2);case"YYYY":return I.s(k.$y,4,"0");case"M":return E+1;case"MM":return I.s(E+1,2,"0");case"MMM":return R(j.monthsShort,E,J,3);case"MMMM":return R(J,E);case"D":return k.$D;case"DD":return I.s(k.$D,2,"0");case"d":return String(k.$W);case"dd":return R(j.weekdaysMin,k.$W,A,2);case"ddd":return R(j.weekdaysShort,k.$W,A,3);case"dddd":return A[k.$W];case"H":return String(n);case"HH":return I.s(n,2,"0");case"h":return ne(1);case"hh":return ne(2);case"a":return re(n,w,!0);case"A":return re(n,w,!1);case"m":return String(w);case"mm":return I.s(w,2,"0");case"s":return String(k.$s);case"ss":return I.s(k.$s,2,"0");case"SSS":return I.s(k.$ms,3,"0");case"Z":return p}return null})(K)||p.replace(":","")}))},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(g,k,j){var f,p=this,n=I.p(k),w=L(g),E=(w.utcOffset()-this.utcOffset())*a,A=this-w,J=function(){return I.m(p,w)};switch(n){case u:f=J()/12;break;case b:f=J();break;case C:f=J()/3;break;case v:f=(A-E)/6048e5;break;case S:f=(A-E)/864e5;break;case d:f=A/s;break;case l:f=A/a;break;case c:f=A/i;break;default:f=A}return j?f:I.a(f)},D.daysInMonth=function(){return this.endOf(b).$D},D.$locale=function(){return H[this.$L]},D.locale=function(g,k){if(!g)return this.$L;var j=this.clone(),f=y(g,k,!0);return f&&(j.$L=f),j},D.clone=function(){return I.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},N})(),G=q.prototype;return L.prototype=G,[["$ms",m],["$s",c],["$m",l],["$H",d],["$W",S],["$M",b],["$y",u],["$D",h]].forEach((function(N){G[N[1]]=function(D){return this.$g(D,N[0],N[1])}})),L.extend=function(N,D){return N.$i||(N(D,q,L),N.$i=!0),L},L.locale=y,L.isDayjs=se,L.unix=function(N){return L(1e3*N)},L.en=H[Y],L.Ls=H,L.p={},L}))})($e)),$e.exports}var Ft=Ct();const Ze=ft(Ft),{Option:ye}=o.Select,{TextArea:Et}=o.Input,Ke=({onCreateTask:t,onClose:r})=>{const[i]=o.Form.useForm(),a=s=>{const m=s.start.toDate(),c=new Date(m);c.setDate(c.getDate()+(s.duration||1)),t({text:s.text,start:m,end:c,duration:s.duration||1,progress:s.progress||0,type:s.type,color:typeof s.color=="string"?s.color:s.color?.toHexString?.()||"#4A90E2",owner:s.owner||"",priority:s.priority||"medium",details:s.details||""}),r()};return e.jsx(o.Modal,{title:"Create New Task",open:!0,onCancel:r,onOk:()=>i.submit(),okText:"Create Task",cancelText:"Cancel",width:600,className:"gantt-modal-antd",children:e.jsxs(o.Form,{form:i,layout:"vertical",onFinish:a,initialValues:{type:"task",priority:"medium",start:Ze(),duration:1,progress:0,color:"#4A90E2"},children:[e.jsx(o.Form.Item,{name:"text",label:"Task Name",rules:[{required:!0,message:"Please enter task name"}],children:e.jsx(o.Input,{placeholder:"Enter task name",autoFocus:!0})}),e.jsxs("div",{style:{display:"flex",gap:16},children:[e.jsx(o.Form.Item,{name:"type",label:"Type",style:{flex:1},children:e.jsxs(o.Select,{children:[e.jsx(ye,{value:"task",children:"Task"}),e.jsx(ye,{value:"milestone",children:"Milestone"}),e.jsx(ye,{value:"project",children:"Project"})]})}),e.jsx(o.Form.Item,{name:"priority",label:"Priority",style:{flex:1},children:e.jsxs(o.Select,{children:[e.jsx(ye,{value:"low",children:"Low"}),e.jsx(ye,{value:"medium",children:"Medium"}),e.jsx(ye,{value:"high",children:"High"})]})})]}),e.jsxs("div",{style:{display:"flex",gap:16},children:[e.jsx(o.Form.Item,{name:"start",label:"Start Date",style:{flex:1},children:e.jsx(o.DatePicker,{style:{width:"100%"}})}),e.jsx(o.Form.Item,{name:"duration",label:"Duration (days)",style:{flex:1},children:e.jsx(o.InputNumber,{min:0,style:{width:"100%"}})})]}),e.jsxs("div",{style:{display:"flex",gap:16},children:[e.jsx(o.Form.Item,{name:"color",label:"Color",style:{flex:1},children:e.jsx(o.ColorPicker,{showText:!0})}),e.jsx(o.Form.Item,{name:"progress",label:"Progress (%)",style:{flex:1},children:e.jsx(o.InputNumber,{min:0,max:100,style:{width:"100%"}})})]}),e.jsx(o.Form.Item,{name:"owner",label:"Owner",children:e.jsx(o.Input,{placeholder:"Assign to..."})}),e.jsx(o.Form.Item,{name:"details",label:"Details",children:e.jsx(Et,{placeholder:"Add task description...",rows:3})})]})})},{Option:we}=o.Select,{TextArea:Nt}=o.Input,{confirm:Pt}=o.Modal,Qe=({task:t,onUpdate:r,onDelete:i,onClose:a})=>{const[s]=o.Form.useForm(),m=l=>{const d=l.start.toDate(),S=new Date(d);S.setDate(S.getDate()+(l.duration||1)),r({...t,text:l.text,start:d,end:S,duration:l.duration||1,progress:l.progress||0,type:l.type,color:typeof l.color=="string"?l.color:l.color?.toHexString?.()||"#4A90E2",owner:l.owner||"",priority:l.priority||"medium",details:l.details||""}),a()},c=()=>{Pt({title:`Are you sure you want to delete "${t.text}"?`,icon:e.jsx(U.FontAwesomeIcon,{icon:z.faExclamationTriangle,style:{color:"#faad14",marginRight:8}}),content:"This action cannot be undone.",okText:"Yes, Delete",okType:"danger",cancelText:"No",onOk(){i(t.id),a()}})};return e.jsx(o.Modal,{title:"Edit Task",open:!0,onCancel:a,footer:[e.jsx(o.Button,{danger:!0,onClick:c,style:{float:"left"},children:"Delete"},"delete"),e.jsx(o.Button,{onClick:a,children:"Cancel"},"cancel"),e.jsx(o.Button,{type:"primary",onClick:()=>s.submit(),children:"Save Changes"},"submit")],width:600,className:"gantt-modal-antd",children:e.jsxs(o.Form,{form:s,layout:"vertical",onFinish:m,initialValues:{text:t.text,type:t.type||"task",priority:t.priority||"medium",start:Ze(t.start),duration:t.duration,progress:t.progress,color:t.color||"#4A90E2",owner:t.owner||"",details:t.details||""},children:[e.jsx(o.Form.Item,{name:"text",label:"Task Name",rules:[{required:!0,message:"Please enter task name"}],children:e.jsx(o.Input,{placeholder:"Enter task name"})}),e.jsxs("div",{style:{display:"flex",gap:16},children:[e.jsx(o.Form.Item,{name:"type",label:"Type",style:{flex:1},children:e.jsxs(o.Select,{children:[e.jsx(we,{value:"task",children:"Task"}),e.jsx(we,{value:"milestone",children:"Milestone"}),e.jsx(we,{value:"project",children:"Project"})]})}),e.jsx(o.Form.Item,{name:"priority",label:"Priority",style:{flex:1},children:e.jsxs(o.Select,{children:[e.jsx(we,{value:"low",children:"Low"}),e.jsx(we,{value:"medium",children:"Medium"}),e.jsx(we,{value:"high",children:"High"})]})})]}),e.jsxs("div",{style:{display:"flex",gap:16},children:[e.jsx(o.Form.Item,{name:"start",label:"Start Date",style:{flex:1},children:e.jsx(o.DatePicker,{style:{width:"100%"}})}),e.jsx(o.Form.Item,{name:"duration",label:"Duration (days)",style:{flex:1},children:e.jsx(o.InputNumber,{min:0,style:{width:"100%"}})})]}),e.jsxs("div",{style:{display:"flex",gap:16},children:[e.jsx(o.Form.Item,{name:"color",label:"Color",style:{flex:1},children:e.jsx(o.ColorPicker,{showText:!0})}),e.jsx(o.Form.Item,{name:"progress",label:"Progress (%)",style:{flex:1},children:e.jsx(o.InputNumber,{min:0,max:100,style:{width:"100%"}})})]}),e.jsx(o.Form.Item,{name:"owner",label:"Owner",children:e.jsx(o.Input,{placeholder:"Assign to..."})}),e.jsx(o.Form.Item,{name:"details",label:"Details",children:e.jsx(Nt,{placeholder:"Add task description...",rows:3})})]})})},{Title:ke,Text:ue,Paragraph:et}=o.Typography,{Option:xe}=o.Select,tt=({task:t,allTasks:r,links:i,onAddDependency:a,onRemoveDependency:s,onClose:m})=>{const[c,l]=F.useState(""),[d,S]=F.useState("e2s"),[v,b]=F.useState(0),[C,u]=F.useState("day"),[h,$]=F.useState(""),O=i.filter(y=>y.target===t.id),x=i.filter(y=>y.source===t.id),T=r.filter(y=>y.id!==t.id&&y.id!==t.parent),_=()=>{if(c){const y=Ae(v,C);a(c,t.id,d,y),l(""),b(0),u("day")}},B=()=>{if(!h.trim())return;const y=wt(h.trim());if(!y){alert(`Invalid format. Use: [TaskNumber][Type][+/-][Lag][Unit]
|
|
7
|
+
Example: 3FS+10d`);return}const L=y.taskNumber-1,I=r[L];if(!I){alert(`Task ${y.taskNumber} not found`);return}const q=bt(y.type),G=Ae(y.lag,y.lagUnit);a(I.id,t.id,q,G),$("")},Y=y=>{switch(y){case"e2s":return"Finish-to-Start (FS)";case"s2s":return"Start-to-Start (SS)";case"e2e":return"Finish-to-Finish (FF)";case"s2e":return"Start-to-Finish (SF)"}},H=y=>{switch(y){case"e2s":return"blue";case"s2s":return"green";case"e2e":return"purple";case"s2e":return"orange"}},Z=y=>!y||y===0?null:y>0?e.jsxs(o.Tag,{color:"warning",children:["+",y,"d lag"]}):e.jsxs(o.Tag,{color:"processing",children:[y,"d lead"]}),se=(y,L)=>{const I=r.find(q=>q.id===(L==="source"?y.source:y.target));return e.jsx(o.List.Item,{actions:[e.jsx(o.Button,{type:"text",danger:!0,icon:e.jsx(U.FontAwesomeIcon,{icon:z.faTrash}),onClick:()=>s(y.id),children:"Remove"})],children:e.jsx(o.List.Item.Meta,{title:e.jsxs(o.Space,{children:[e.jsx(ue,{strong:!0,style:{fontFamily:"IBM Plex Sans, sans-serif"},children:I?.text||(L==="source"?y.source:y.target)}),e.jsx(o.Tag,{color:H(y.type),children:Y(y.type)}),Z(y.lag)]}),description:e.jsxs(ue,{type:"secondary",style:{fontFamily:"IBM Plex Sans, sans-serif",fontSize:"12px"},children:[I?.owner&&`Owner: ${I.owner}`,I?.priority&&` • Priority: ${I.priority}`]})})})};return e.jsxs(o.Modal,{title:e.jsxs(o.Space,{children:[e.jsx(U.FontAwesomeIcon,{icon:z.faLink,style:{fontSize:"20px"}}),e.jsx(ke,{level:4,style:{margin:0,fontFamily:"IBM Plex Mono, monospace"},children:"Task Dependencies"})]}),open:!0,onCancel:m,width:900,footer:null,className:"gantt-dependency-modal",styles:{body:{maxHeight:"70vh",overflowY:"auto",fontFamily:"IBM Plex Sans, sans-serif"}},children:[e.jsx(o.Card,{size:"small",style:{marginBottom:24,backgroundColor:"#f5f5f5",borderColor:"#d9d9d9"},children:e.jsxs(o.Space,{direction:"vertical",size:4,children:[e.jsx(ue,{strong:!0,style:{fontFamily:"IBM Plex Mono, monospace",fontSize:"16px"},children:t.text}),e.jsxs(ue,{type:"secondary",style:{fontFamily:"IBM Plex Sans, sans-serif",fontSize:"13px"},children:[t.start.toLocaleDateString()," → ",t.end.toLocaleDateString(),t.owner&&` • Owner: ${t.owner}`,t.priority&&` • Priority: ${t.priority}`]})]})}),e.jsxs("div",{style:{marginBottom:32},children:[e.jsxs(ke,{level:5,style:{fontFamily:"IBM Plex Mono, monospace",textTransform:"uppercase",letterSpacing:"0.5px",fontSize:"13px",color:"#595959"},children:[e.jsx(U.FontAwesomeIcon,{icon:z.faArrowDown,style:{marginRight:"8px"}}),"Depends On (Predecessors)"]}),O.length===0?e.jsx(o.Alert,{message:"No dependencies",description:"This task doesn't depend on any other tasks.",type:"info",showIcon:!0,style:{fontFamily:"IBM Plex Sans, sans-serif"}}):e.jsx(o.List,{dataSource:O,renderItem:y=>se(y,"source"),bordered:!0,style:{fontFamily:"IBM Plex Sans, sans-serif"}})]}),e.jsxs("div",{style:{marginBottom:32},children:[e.jsxs(ke,{level:5,style:{fontFamily:"IBM Plex Mono, monospace",textTransform:"uppercase",letterSpacing:"0.5px",fontSize:"13px",color:"#595959"},children:[e.jsx(U.FontAwesomeIcon,{icon:z.faArrowUp,style:{marginRight:"8px"}}),"Dependents (Successors)"]}),x.length===0?e.jsx(o.Alert,{message:"No dependent tasks",description:"No other tasks depend on this task.",type:"info",showIcon:!0,style:{fontFamily:"IBM Plex Sans, sans-serif"}}):e.jsx(o.List,{dataSource:x,renderItem:y=>se(y,"target"),bordered:!0,style:{fontFamily:"IBM Plex Sans, sans-serif"}})]}),e.jsx(o.Divider,{}),e.jsx(o.Card,{title:e.jsxs(ke,{level:5,style:{margin:0,fontFamily:"IBM Plex Mono, monospace",fontSize:"14px"},children:[e.jsx(U.FontAwesomeIcon,{icon:z.faPlus,style:{marginRight:"8px"}}),"Add New Dependency"]}),style:{marginBottom:24},children:e.jsxs(o.Space,{direction:"vertical",size:"large",style:{width:"100%"},children:[e.jsxs("div",{children:[e.jsx(ue,{strong:!0,style:{fontFamily:"IBM Plex Sans, sans-serif",display:"block",marginBottom:8},children:"Quick Add (Keyboard Shortcut):"}),e.jsx(ue,{type:"secondary",style:{fontFamily:"IBM Plex Sans, sans-serif",fontSize:"12px",display:"block",marginBottom:8},children:"Format: [TaskNumber][Type][+/-][Lag][Unit] • Example: 3FS+10d, 5SS-2w"}),e.jsxs(o.Space.Compact,{style:{width:"100%"},children:[e.jsx(o.Input,{placeholder:"e.g., 3FS+10d",value:h,onChange:y=>$(y.target.value),onPressEnter:B,size:"large",style:{fontFamily:"IBM Plex Mono, monospace"}}),e.jsx(o.Button,{type:"primary",size:"large",onClick:B,style:{fontFamily:"IBM Plex Sans, sans-serif"},children:"Add"})]})]}),e.jsx(o.Divider,{style:{margin:"8px 0"},children:"OR"}),e.jsxs("div",{children:[e.jsx(ue,{strong:!0,style:{fontFamily:"IBM Plex Sans, sans-serif",display:"block",marginBottom:8},children:"Select Task:"}),e.jsx(o.Select,{placeholder:"Choose a task...",value:c||void 0,onChange:l,style:{width:"100%",fontFamily:"IBM Plex Sans, sans-serif"},size:"large",showSearch:!0,filterOption:(y,L)=>String(L?.children||"").toLowerCase().includes(y.toLowerCase()),children:T.map(y=>e.jsx(xe,{value:y.id,children:y.text},y.id))})]}),e.jsxs("div",{children:[e.jsx(ue,{strong:!0,style:{fontFamily:"IBM Plex Sans, sans-serif",display:"block",marginBottom:8},children:"Dependency Type:"}),e.jsxs(o.Select,{value:d,onChange:S,style:{width:"100%",fontFamily:"IBM Plex Sans, sans-serif"},size:"large",children:[e.jsxs(xe,{value:"e2s",children:[e.jsx(o.Tag,{color:"blue",children:"FS"})," Finish-to-Start"]}),e.jsxs(xe,{value:"s2s",children:[e.jsx(o.Tag,{color:"green",children:"SS"})," Start-to-Start"]}),e.jsxs(xe,{value:"e2e",children:[e.jsx(o.Tag,{color:"purple",children:"FF"})," Finish-to-Finish"]}),e.jsxs(xe,{value:"s2e",children:[e.jsx(o.Tag,{color:"orange",children:"SF"})," Start-to-Finish"]})]})]}),e.jsx("div",{children:e.jsxs(o.Space,{direction:"vertical",size:4,style:{width:"100%"},children:[e.jsx(ue,{strong:!0,style:{fontFamily:"IBM Plex Sans, sans-serif"},children:"Lead/Lag Time:"}),e.jsx(ue,{type:"secondary",style:{fontFamily:"IBM Plex Sans, sans-serif",fontSize:"12px"},children:"Negative = lead time (overlap), Positive = lag time (delay)"}),e.jsxs(o.Space.Compact,{style:{width:"100%"},children:[e.jsx(o.InputNumber,{value:v,onChange:y=>b(y||0),style:{flex:1,fontFamily:"IBM Plex Sans, sans-serif"},size:"large",placeholder:"0",min:-365,max:365}),e.jsxs(o.Select,{value:C,onChange:u,style:{width:120,fontFamily:"IBM Plex Sans, sans-serif"},size:"large",children:[e.jsx(xe,{value:"day",children:"Days"}),e.jsx(xe,{value:"hour",children:"Hours"}),e.jsx(xe,{value:"week",children:"Weeks"}),e.jsx(xe,{value:"month",children:"Months"})]})]})]})}),e.jsx(o.Button,{type:"primary",size:"large",icon:e.jsx(U.FontAwesomeIcon,{icon:z.faPlus}),onClick:_,disabled:!c,block:!0,style:{fontFamily:"IBM Plex Sans, sans-serif",fontWeight:600},children:"Add Dependency"})]})}),e.jsx(o.Alert,{message:e.jsxs(ue,{strong:!0,style:{fontFamily:"IBM Plex Mono, monospace"},children:[e.jsx(U.FontAwesomeIcon,{icon:z.faInfoCircle,style:{marginRight:"8px"}}),"Dependency Types Explained"]}),description:e.jsxs("div",{style:{fontFamily:"IBM Plex Sans, sans-serif"},children:[e.jsxs("ul",{style:{marginBottom:12,paddingLeft:20},children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Finish-to-Start (FS):"})," Successor starts after predecessor finishes"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Start-to-Start (SS):"})," Both tasks start at the same time"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Finish-to-Finish (FF):"})," Both tasks finish at the same time"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Start-to-Finish (SF):"})," Successor finishes when predecessor starts"]})]}),e.jsx(o.Divider,{style:{margin:"12px 0"}}),e.jsx(ue,{strong:!0,style:{display:"block",marginBottom:4},children:"Keyboard Shortcuts:"}),e.jsx(et,{style:{margin:0,fontSize:"12px"},code:!0,children:"[TaskID][Type]+/-[Days]d"}),e.jsxs(et,{style:{margin:0,fontSize:"12px"},children:["Example: ",e.jsx("code",{children:"3FS+10d"})," = Task 3, Finish-to-Start, 10 days lag"]})]}),type:"info",showIcon:!0,icon:e.jsx(U.FontAwesomeIcon,{icon:z.faInfoCircle}),style:{marginTop:16}})]})},At=({x:t,y:r,task:i,onEdit:a,onDelete:s,onCopy:m,onDependencies:c,onConvertToMilestone:l,onConvertToTask:d,onConvertToProject:S,onAutoSchedule:v,onClose:b})=>{if(!i)return null;const C=[{key:"edit",label:"Edit",icon:e.jsx(U.FontAwesomeIcon,{icon:z.faEdit}),onClick:()=>{a(),b()}},{key:"copy",label:"Copy",icon:e.jsx(U.FontAwesomeIcon,{icon:z.faCopy}),onClick:()=>{m(),b()}},{key:"dependencies",label:"Dependencies",icon:e.jsx(U.FontAwesomeIcon,{icon:z.faLink}),onClick:()=>{c(),b()}},{type:"divider"},{key:"convert",label:"Convert to",type:"submenu",children:[{key:"milestone",label:"Milestone",icon:e.jsx(U.FontAwesomeIcon,{icon:z.faFlag}),disabled:i.type==="milestone",onClick:()=>{l(),b()}},{key:"task",label:"Task",icon:e.jsx(U.FontAwesomeIcon,{icon:z.faTasks}),disabled:i.type==="task",onClick:()=>{d(),b()}},{key:"project",label:"Project",icon:e.jsx(U.FontAwesomeIcon,{icon:z.faFolder}),disabled:i.type==="project",onClick:()=>{S(),b()}}]},{key:"auto-schedule",label:"Auto Schedule",icon:e.jsx(U.FontAwesomeIcon,{icon:z.faRotateLeft}),onClick:()=>{v?.(),b()}},{type:"divider"},{key:"delete",label:"Delete",icon:e.jsx(U.FontAwesomeIcon,{icon:z.faTrash}),danger:!0,onClick:()=>{s(),b()}}];return e.jsx("div",{className:"gantt-context-menu",style:{position:"fixed",left:`${t}px`,top:`${r}px`,zIndex:1e4},onClick:u=>u.stopPropagation(),children:e.jsx(o.Menu,{items:C,style:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"6px",border:"1px solid #e0e0e0"}})})},nt=(t,r=[])=>{const[i,a]=F.useState([]),[s,m]=F.useState(-1),[c,l]=F.useState(t),[d,S]=F.useState(r),v=F.useCallback((T,_,B)=>{const Y={type:T,before:_,after:B,timestamp:Date.now()},H=i.slice(0,s+1);H.push(Y),H.length>50?H.shift():m(s+1),a(H)},[i,s]),b=F.useCallback(()=>{if(s<0)return;const T=i[s];l(T.before.tasks),S(T.before.links),m(s-1)},[i,s]),C=F.useCallback(()=>{if(s>=i.length-1)return;const T=i[s+1];l(T.after.tasks),S(T.after.links),m(s+1)},[i,s]),u=s>=0,h=s<i.length-1,$=F.useCallback(T=>{const _={tasks:c,links:d},B=c.map(H=>H.id===T.id?T:H);v("task_update",_,{tasks:B,links:d}),l(B)},[c,d,v]),O=F.useCallback(T=>{const _={tasks:c,links:d},B=[...c,T];v("task_create",_,{tasks:B,links:d}),l(B)},[c,d,v]),x=F.useCallback(T=>{const _={tasks:c,links:d},B=c.filter(Z=>Z.id!==T),Y=d.filter(Z=>Z.source!==T&&Z.target!==T);v("task_delete",_,{tasks:B,links:Y}),l(B),S(Y)},[c,d,v]);return{tasks:c,links:d,setTasks:l,setLinks:S,undo:b,redo:C,canUndo:u,canRedo:h,updateTask:$,createTask:O,deleteTask:x,saveState:v,history:i}},st=(t,r,i={mode:"forward"})=>{const a=new Map,s=new Map;return t.forEach(m=>{a.set(m.id,[]),s.set(m.id,[])}),r.forEach(m=>{m.type==="e2s"&&(a.get(m.target)?.push(m.source),s.get(m.source)?.push(m.target))}),i.mode==="forward"?It(t,a,i):Lt(t,s,i)},It=(t,r,i)=>{const a=new Map,s=new Set,m=i.projectStart||new Date,c=l=>{if(s.has(l))return;const d=t.find(h=>h.id===l);if(!d)return;const S=r.get(l)||[];S.forEach(h=>c(h));let v=m;S.forEach(h=>{const $=a.get(h);$&&$.end>v&&(v=new Date($.end))});const b=new Date(v),C=ie(b,d.duration,"day"),u={...d,start:b,end:C};a.set(l,u),s.add(l)};return t.forEach(l=>c(l.id)),t.map(l=>a.get(l.id)||l)},Lt=(t,r,i)=>{const a=new Map,s=new Set,m=i.projectEnd||new Date(Math.max(...t.map(l=>l.end.getTime()))),c=l=>{if(s.has(l))return;const d=t.find(h=>h.id===l);if(!d)return;const S=r.get(l)||[];S.forEach(h=>c(h));let v=m;S.forEach(h=>{const $=a.get(h);$&&$.start<v&&(v=new Date($.start))});const b=new Date(v),C=ie(b,-d.duration,"day"),u={...d,start:C,end:b};a.set(l,u),s.add(l)};return t.forEach(l=>c(l.id)),t.map(l=>a.get(l.id)||l)},Ot=Object.freeze(Object.defineProperty({__proto__:null,autoSchedule:st,levelResources:t=>{const r=new Map;t.forEach(a=>{a.owner&&(r.has(a.owner)||r.set(a.owner,[]),r.get(a.owner).push(a))});const i=[...t];return r.forEach((a,s)=>{const m=a.sort((c,l)=>c.start.getTime()-l.start.getTime());for(let c=1;c<m.length;c++){const l=m[c],d=m[c-1];if(l.start<d.end){const S=i.findIndex(v=>v.id===l.id);if(S>=0){const v=new Date(d.end),b=ie(v,l.duration,"day");i[S]={...l,start:v,end:b}}}}}),i}},Symbol.toStringTag,{value:"Module"})),rt=t=>{const r=new Map;return t.forEach(i=>{r.set(i.id,{taskId:i.id,start:new Date(i.start),end:new Date(i.end)})}),r},it=t=>{const r=["ID","Task Name","Start Date","End Date","Duration","Progress","Type","Owner","Priority"],i=t.map(s=>[s.id,s.text,ae(s.start,"YYYY-MM-DD"),ae(s.end,"YYYY-MM-DD"),s.duration.toString(),`${s.progress}%`,s.type||"task",s.owner||"",s.priority||"medium"]),a=[r.join(","),...i.map(s=>s.map(m=>`"${m}"`).join(","))].join(`
|
|
8
|
+
`);Ce(a,"gantt-tasks.csv","text/csv")},at=t=>{const r=["ID","Task Name","Start Date","End Date","Duration","Progress","Type","Owner","Priority","Details"],i=t.map(s=>[s.id,s.text,ae(s.start,"MM/DD/YYYY"),ae(s.end,"MM/DD/YYYY"),s.duration.toString(),s.progress.toString(),s.type||"task",s.owner||"",s.priority||"medium",s.details||""]),a="\uFEFF"+[r.join(" "),...i.map(s=>s.map(m=>m.replace(/\t/g," ")).join(" "))].join(`
|
|
9
|
+
`);Ce(a,"gantt-tasks.xls","application/vnd.ms-excel")},ot=(t,r)=>{const i={tasks:t,links:r,exported:new Date().toISOString(),version:"1.0"},a=JSON.stringify(i,null,2);Ce(a,"gantt-project.json","application/json")},lt=t=>{const r=`
|
|
10
|
+
GANTT CHART PROJECT
|
|
11
|
+
Generated: ${new Date().toLocaleString()}
|
|
12
|
+
|
|
13
|
+
Tasks:
|
|
14
|
+
${t.map((i,a)=>`
|
|
15
|
+
${a+1}. ${i.text}
|
|
16
|
+
Start: ${ae(i.start,"MM/DD/YYYY")}
|
|
17
|
+
End: ${ae(i.end,"MM/DD/YYYY")}
|
|
18
|
+
Duration: ${i.duration} days
|
|
19
|
+
Progress: ${i.progress}%
|
|
20
|
+
${i.owner?`Owner: ${i.owner}`:""}
|
|
21
|
+
`).join(`
|
|
22
|
+
`)}
|
|
23
|
+
`.trim();Ce(r,"gantt-report.txt","text/plain"),alert("PDF export is a simplified text version. For full PDF with charts, a PDF library would be needed.")},_t=(t,r,i="png")=>{if(!document.getElementById(t)){alert("Could not find Gantt chart element to export");return}if(i==="svg"){alert("SVG export requires additional library. Use PNG or implement with dom-to-svg.");return}alert("Image export requires html2canvas library. Install with: npm install html2canvas")},Ce=(t,r,i)=>{const a=new Blob([t],{type:i}),s=URL.createObjectURL(a);Yt(s,r),URL.revokeObjectURL(s)},Yt=(t,r)=>{const i=document.createElement("a");i.href=t,i.download=r,document.body.appendChild(i),i.click(),document.body.removeChild(i)},Bt=Object.freeze(Object.defineProperty({__proto__:null,exportToCSV:it,exportToExcel:at,exportToImage:_t,exportToJSON:ot,exportToPDF:lt,importFromJSON:t=>new Promise((r,i)=>{const a=new FileReader;a.onload=s=>{try{const m=s.target?.result,c=JSON.parse(m),l=c.tasks.map(d=>({...d,start:new Date(d.start),end:new Date(d.end)}));r({tasks:l,links:c.links||[]})}catch{i(new Error("Invalid JSON file"))}},a.onerror=()=>i(new Error("Failed to read file")),a.readAsText(t)})},Symbol.toStringTag,{value:"Module"})),Rt=[{name:"index",label:"",width:40,align:"center"},{name:"text",label:"Name",width:300,align:"left",resize:!0},{name:"predecessors",label:"Depends on",width:120,align:"left"},{name:"duration",label:"Duration",width:100,align:"left"},{name:"start",label:"Start",width:120,align:"left"},{name:"add",label:"",width:40,align:"center"}],zt=[{unit:"month",step:1,format:"MMM"},{unit:"day",step:1,format:"D"}],Ht=({tasks:t,links:r=[],config:i={},onTaskUpdate:a,onTaskCreate:s,onTaskDelete:m,onLinkCreate:c,onLinkDelete:l})=>{const{tasks:d,links:S,setTasks:v,setLinks:b,undo:C,redo:u,updateTask:h,createTask:$,deleteTask:O,saveState:x}=nt(t,r),[T,_]=F.useState(d),[B,Y]=F.useState(null),[H,Z]=F.useState(null),[se,y]=F.useState(!1),[L,I]=F.useState(!1),[q,G]=F.useState(null),[N,D]=F.useState(null),[g,k]=F.useState(null),[j,f]=F.useState(null),[p,n]=F.useState(null),[w,E]=F.useState(1),[A,J]=F.useState(new Map),[ee,R]=F.useState(!1),[ne]=F.useState(i.theme||"light"),[re,K]=F.useState({searchText:"",status:"all",priority:"all",owner:""}),he=F.useRef(null),fe=F.useRef(null),je=F.useRef(null),me={columns:Rt,scales:zt,readonly:!1,editable:!0,taskHeight:28,rowHeight:44,scaleHeight:28,columnWidth:80,minColumnWidth:60,autoSchedule:!1,criticalPath:!1,baselines:ee,weekends:!0,holidays:[],theme:ne,locale:"en",...i};F.useEffect(()=>{const M=Ge(d,re);_((V=>{const te=[],le=X=>{if(!X)return!1;const de=V.find(Q=>Q.id===X);return de&&!de.open&&de.type==="project"?!0:le(de?.parent)};return V.forEach(X=>{le(X.parent)||te.push(X)}),te})(M))},[d,re]);const Ut=Array.from(new Set(d.map(M=>M.owner).filter(Boolean))),Jt=(()=>{const M=T.length>0?T:d;if(M.length===0){const X=new Date;return{start:Te(ie(X,-30,"day")),end:Te(ie(X,60,"day"))}}const P=M.map(X=>X.start.getTime()),V=M.map(X=>X.end.getTime()),te=new Date(Math.min(...P)),le=new Date(Math.max(...V));return{start:Te(ie(te,-7,"day")),end:Te(le)}})(),Vt=M=>{Y(M)},Gt=(M,P)=>{if(me.readonly)return;M.preventDefault();const V=d.find(te=>te.id===P);V&&n({x:M.clientX,y:M.clientY,task:V})},qt=()=>{if(!p?.task)return;const M=p.task,P={...M,id:`task-${Date.now()}`,text:`${M.text} (Copy)`,start:ie(M.start,7,"day"),end:ie(M.end,7,"day")};$(P),s&&s(P)},_e=M=>{if(!p?.task)return;const P={...p.task,type:M};h(P),a&&a(P)},Xt=(M,P,V,te)=>{if(!me.readonly)if(te==="reorder"){const le=T.findIndex(Q=>Q.id===M),X=(Q,ce)=>{let be=[];return ce.filter(pe=>pe.parent===Q).forEach(pe=>{be.push(pe.id),be=[...be,...X(pe.id,ce)]}),be},de=X(M,d);k({id:M,initialIndex:le,currentY:V,descendantIds:de}),document.body.classList.add("gantt-dragging")}else D(M)},Zt=()=>{if(g&&j){const M=d.find(V=>V.id===g.id),P=d.find(V=>V.id===j.taskId);if(M&&P&&M.id!==P.id){const V=[M.id,...g.descendantIds];if(!V.includes(P.id)){const te=[...d];let le=j.position==="inside"?P.id:P.parent;const X=te.findIndex(oe=>oe.id===M.id);X!==-1&&(te[X]={...te[X],parent:le});const de=te.filter(oe=>V.includes(oe.id)),Q=te.filter(oe=>!V.includes(oe.id));let ce=Q.findIndex(oe=>oe.id===P.id);if(j.position==="inside"){const oe=Q.filter(pe=>pe.parent===P.id);oe.length>0?ce=Q.findIndex(pe=>pe.id===oe[oe.length-1].id)+1:ce++}else if(j.position==="below"){const oe=(Be,ht)=>{let Fe=[];return ht.filter(Ee=>Ee.parent===Be).forEach(Ee=>{Fe.push(Ee.id),Fe=[...Fe,...oe(Ee.id,ht)]}),Fe},pe=oe(P.id,Q);pe.length>0?ce=Q.findIndex(Be=>Be.id===pe[pe.length-1])+1:ce++}const be={tasks:[...d],links:[...S]};Q.splice(ce,0,...de),v(Q),x("task_update",be,{tasks:Q,links:S})}}}D(null),k(null),f(null),document.body.classList.remove("gantt-dragging")},Kt=M=>{if(g){const P=me.rowHeight||44,V=fe.current?.querySelector(".gantt-grid-body");if(!V)return;const te=V.getBoundingClientRect(),le=M.clientY-te.top;let X=Math.floor(le/P);X=Math.max(0,Math.min(X,T.length-1));const de=T[X];if(de){const Q=le-X*P;let ce="above";de.type==="project"?Q<P*.3?ce="above":Q>P*.7?ce="below":ce="inside":ce=Q<P/2?"above":"below",de.id!==g.id?f({taskId:de.id,position:ce}):f(null)}k(Q=>Q?{...Q,currentY:M.clientY}:null)}},ct=()=>{g&&Zt()},Qt=M=>{const P={...M,id:`task-${Date.now()}`};$(P),s&&s(P)},Ye=M=>{h(M),a&&a(M)},dt=M=>{O(M),m&&m(M)},ut=(M,P,V,te)=>{const le={id:`link-${Date.now()}`,source:M,target:P,type:V,lag:te};b([...S,le]),c&&c(le)},en=M=>{const P=S.filter(V=>V.id!==M);b(P),l&&l(M)},tn=()=>{if(!ee&&A.size===0){const M=rt(d);J(M),R(!0)}else R(!ee)};return F.useEffect(()=>{const M=P=>{(P.ctrlKey||P.metaKey)&&(P.key==="z"&&!P.shiftKey?(P.preventDefault(),C()):(P.key==="y"||P.key==="z"&&P.shiftKey)&&(P.preventDefault(),u()))};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[C,u]),e.jsxs("div",{className:`gantt-page-wrapper theme-${ne}`,children:[e.jsx("div",{className:"gantt-page-header",children:e.jsx("div",{className:"gantt-page-header-left",children:e.jsx("h1",{className:"gantt-page-title",children:"Iris Gantt"})})}),e.jsxs("div",{className:`gantt-container theme-${me.theme}`,children:[e.jsx(qe,{zoomLevel:w,setZoomLevel:E,onBaselineToggle:tn,showBaselines:ee,onExport:M=>{M==="csv"&&it(d),M==="excel"&&at(d),M==="json"&&ot(d,S),M==="pdf"&<(d)},onFilterChange:M=>K(M),owners:Ut,onAddTask:()=>y(!0)}),e.jsxs("div",{className:"gantt-layout",ref:je,onMouseMove:Kt,onMouseUp:ct,onMouseLeave:ct,children:[e.jsx(Ie,{ref:fe,tasks:T,columns:me.columns||[],selectedTask:B,onTaskClick:Vt,onTaskContextMenu:Gt,onTaskUpdate:Ye,onTaskDragStart:Xt,onAddTask:()=>y(!0),onAddDependency:ut,onDependencyClick:M=>{const P=d.find(V=>V.id===M);P&&(G(P),I(!0))},links:S,allTasks:d,dropIndicator:j,reorderTask:g}),e.jsx(Oe,{ref:he,tasks:T,links:S,range:Jt,scales:me.scales,config:me,selectedTask:B,draggedTask:N,onTaskClick:()=>{},onTaskDragStart:()=>{},onTaskDragEnd:()=>{},onTaskUpdate:(M,P)=>{const V=d.find(te=>te.id===M);V&&Ye({...V,...P})},zoomLevel:w,baselines:ee?A:new Map})]}),se&&e.jsx(Ke,{onCreateTask:Qt,onClose:()=>y(!1)}),H&&e.jsx(Qe,{task:H,onUpdate:Ye,onDelete:dt,onClose:()=>Z(null)}),L&&q&&e.jsx(tt,{task:q,allTasks:d,links:S,onAddDependency:ut,onRemoveDependency:en,onClose:()=>{I(!1),G(null)}}),p&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"gantt-context-menu-overlay",onClick:()=>n(null),onContextMenu:M=>{M.preventDefault(),n(null)}}),e.jsx(At,{x:p.x,y:p.y,task:p.task,onEdit:()=>{p.task&&Z(p.task)},onDelete:()=>{p.task&&dt(p.task.id)},onCopy:qt,onDependencies:()=>{p.task&&(G(p.task),I(!0))},onConvertToMilestone:()=>_e("milestone"),onConvertToTask:()=>_e("task"),onConvertToProject:()=>_e("project"),onClose:()=>n(null),onAutoSchedule:()=>{const M=st(d,S,{mode:"forward"});v(M),n(null)}})]}),g&&e.jsx("div",{className:"gantt-grid-row ghost-row",style:{height:me.rowHeight,top:g.currentY-(me.rowHeight||48)/2,left:fe.current?.getBoundingClientRect().left,position:"fixed",pointerEvents:"none",opacity:.8,zIndex:9999,width:fe.current?.offsetWidth,backgroundColor:"#ffffff",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"1px solid #2196F3",display:"flex"},children:me.columns?.map(M=>e.jsx("div",{className:"gantt-grid-cell",style:{width:M.width,textAlign:M.align||"left"},children:(()=>{const P=d.find(V=>V.id===g.id);if(!P)return null;if(M.template)return M.template(P);switch(M.name){case"text":return e.jsxs("div",{className:"gantt-grid-cell-text",children:[e.jsx(U.FontAwesomeIcon,{icon:z.faGripVertical,style:{marginRight:8,color:"#adb5bd"}}),e.jsxs("span",{className:"gantt-task-name-text",children:[P.text,g.descendantIds.length>0&&e.jsxs("span",{children:[" +",g.descendantIds.length," subtasks"]})]})]});case"start":return ae(P.start,"DD MMM YYYY");case"duration":return`${P.duration}`;default:return P[M.name]||""}})()},`ghost-${M.name}`))})]})]})},Wt=Object.freeze(Object.defineProperty({__proto__:null,calculateCriticalPath:(t,r)=>{const i=new Set,a=new Map,s=new Map,m=new Map;t.forEach(u=>{s.set(u.id,[]),m.set(u.id,[])}),r.forEach(u=>{u.type==="e2s"&&(s.get(u.source)?.push(u.target),m.get(u.target)?.push(u.source))});const c=new Map,l=new Map,d=(u,h=new Set)=>{if(h.has(u))return;h.add(u);const $=t.find(x=>x.id===u);if(!$)return;const O=m.get(u)||[];if(O.length===0)c.set(u,0),l.set(u,$.duration);else{let x=0;O.forEach(T=>{d(T,h);const _=l.get(T)||0;x=Math.max(x,_)}),c.set(u,x),l.set(u,x+$.duration)}};t.forEach(u=>d(u.id));const S=new Map,v=new Map,b=Math.max(...Array.from(l.values())),C=(u,h=new Set)=>{if(h.has(u))return;h.add(u);const $=t.find(x=>x.id===u);if(!$)return;const O=s.get(u)||[];if(O.length===0)v.set(u,b),S.set(u,b-$.duration);else{let x=1/0;O.forEach(T=>{C(T,h);const _=S.get(T)||0;x=Math.min(x,_)}),v.set(u,x),S.set(u,x-$.duration)}};return t.forEach(u=>C(u.id)),t.forEach(u=>{const h=c.get(u.id)||0,O=(S.get(u.id)||0)-h;a.set(u.id,O),Math.abs(O)<.01&&i.add(u.id)}),{criticalTasks:i,taskFloats:a,projectDuration:b}},getTaskFloat:(t,r)=>r.taskFloats.get(t)||0,isCriticalTask:(t,r)=>r.criticalTasks.has(t)},Symbol.toStringTag,{value:"Module"}));W.AutoScheduler=Ot,W.Chart=Oe,W.CriticalPath=Wt,W.DependencyEditor=tt,W.ExportUtils=Bt,W.FilterSearch=Ve,W.Gantt=Ht,W.Grid=Ie,W.TaskBar=Je,W.TaskCreator=Ke,W.TaskEditor=Qe,W.Timeline=Le,W.Toolbar=qe,W.addToDate=ie,W.applyFilters=Ge,W.calculateDuration=yt,W.createBaseline=rt,W.formatDate=ae,W.getDaysBetween=De,W.getEndOfDay=xt,W.getHoursBetween=We,W.getStartOfDay=Te,W.isHoliday=Pe,W.isWeekend=Ne,W.useUndoRedo=nt,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "iris-gantt",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/iris-gantt.umd.cjs",
|
|
7
|
+
"module": "dist/iris-gantt.es.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"src/components/Gantt/gantt.css"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"dev": "vite",
|
|
15
|
+
"build": "vite build",
|
|
16
|
+
"lint": "eslint .",
|
|
17
|
+
"preview": "vite preview",
|
|
18
|
+
"storybook": "storybook dev -p 6006",
|
|
19
|
+
"build-storybook": "storybook build"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
23
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
24
|
+
"antd": "^6.0.0",
|
|
25
|
+
"@fortawesome/react-fontawesome": "^3.1.0",
|
|
26
|
+
"@fortawesome/fontawesome-svg-core": "^7.1.0",
|
|
27
|
+
"@fortawesome/free-solid-svg-icons": "^7.1.0"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@ant-design/icons": "^6.1.0",
|
|
31
|
+
"@fontsource/ibm-plex-mono": "^5.2.7",
|
|
32
|
+
"@fontsource/ibm-plex-sans": "^5.2.8"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@chromatic-com/storybook": "^4.1.3",
|
|
36
|
+
"@eslint/js": "^9.39.1",
|
|
37
|
+
"@storybook/addon-a11y": "^10.1.11",
|
|
38
|
+
"@storybook/addon-docs": "^10.1.11",
|
|
39
|
+
"@storybook/addon-onboarding": "^10.1.11",
|
|
40
|
+
"@storybook/addon-vitest": "^10.1.11",
|
|
41
|
+
"@storybook/react-vite": "^10.1.11",
|
|
42
|
+
"@types/node": "^24.10.1",
|
|
43
|
+
"@types/react": "^19.2.5",
|
|
44
|
+
"@types/react-dom": "^19.2.3",
|
|
45
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
46
|
+
"@vitest/browser-playwright": "^4.0.17",
|
|
47
|
+
"@vitest/coverage-v8": "^4.0.17",
|
|
48
|
+
"eslint": "^9.39.1",
|
|
49
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
50
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
51
|
+
"globals": "^16.5.0",
|
|
52
|
+
"playwright": "^1.57.0",
|
|
53
|
+
"storybook": "^10.1.11",
|
|
54
|
+
"typescript": "~5.9.3",
|
|
55
|
+
"typescript-eslint": "^8.46.4",
|
|
56
|
+
"vite": "^7.2.4",
|
|
57
|
+
"vitest": "^4.0.17"
|
|
58
|
+
}
|
|
59
|
+
}
|