@progress/kendo-react-gantt 7.0.3-develop.9 → 7.1.0-develop.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- (function(b,Se){typeof exports=="object"&&typeof module<"u"?Se(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-date-math"),require("@progress/kendo-react-data-tools"),require("@progress/kendo-react-treelist"),require("@progress/kendo-react-intl"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-buttons"),require("react-dom"),require("@progress/kendo-react-form"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-dateinputs")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-date-math","@progress/kendo-react-data-tools","@progress/kendo-react-treelist","@progress/kendo-react-intl","@progress/kendo-svg-icons","@progress/kendo-react-buttons","react-dom","@progress/kendo-react-form","@progress/kendo-react-dialogs","@progress/kendo-react-labels","@progress/kendo-react-inputs","@progress/kendo-react-dateinputs"],Se):(b=typeof globalThis<"u"?globalThis:b||self,Se(b.KendoReactGantt={},b.React,b.PropTypes,b.KendoReactCommon,b.KendoDateMath,b.KendoReactDataTools,b.KendoReactTreelist,b.KendoReactIntl,b.KendoSvgIcons,b.KendoReactButtons,b.ReactDOM,b.KendoReactForm,b.KendoReactDialogs,b.KendoReactLabels,b.KendoReactInputs,b.KendoReactDateinputs))})(this,function(b,Se,i,h,w,S,de,U,Je,ae,na,oe,Me,le,Mt,aa){"use strict";"use client";function At(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return a.default=e,Object.freeze(a)}const t=At(Se),Vt=At(na),ra=S.TABLE_ROW_INDEX_ATTRIBUTE,sa=S.TABLE_COL_INDEX_ATTRIBUTE,oa=S.TABLE_PREVENT_SELECTION_ELEMENT,Ot=new Date().getTime(),Gt=7,la="hh:mm a",Qe={skeleton:"MEd"},ia="MMM",ca="yyyy",ke=100,da=6,Ae="data-dependency-drag-handle",ua="start",ga="finish",Wt={[Ae]:ua},_t={[Ae]:ga},Ve="data-task-id",Kt={id:"id",start:"start",end:"end",title:"title",percentComplete:"percentComplete",isRollup:"isRollup",isExpanded:"isExpanded",isInEdit:"isInEdit",children:"children",isSelected:"isSelected"},Bt={id:"id",fromId:"fromId",toId:"toId",type:"type"},fa=S.orderBy,ha=S.filterBy,Oe=h.mapTree,ma=h.extendDataItem,Ca=de.createDataTree,Ea=e=>({fields:{...Kt,...e}}),wa=e=>({fields:{...Bt,...e}}),Ut=e=>w.getDate(e),Pe=(e,a)=>w.getDate(w.addDays(e,a||1)),pa=(e,a,n,r)=>n<a&&e<=r;function ie(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}const re=4,et=10,va=(e,a,n,r)=>{const o=[];let l=0,s=0;const c=et,g=Math.floor(n/2),f=e.top<a.top,d=()=>o.push({left:s,top:l});if(r===0||r===3){const u=r===3?"start":"end";l=e.top,s=e[u],d(),s=Math[u==="start"?"min":"max"](e[u],a[u]),s=u==="start"?s-c:s+c,d(),l=a.top,d(),s=u==="start"?a[u]-re:a[u]+re,d(),qt(l,s,o,u!=="start")}else{const u=r===2?"start":"end",m=r===2?"end":"start",E=r===2?e[u]-et*2>=a[m]:e[u]+et*2<=a[m];l=e.top,s=e[u],d(),s=u==="start"?s-c:s+c,d(),E||(l=f?l+g:l-g,d(),s=u==="start"?a[m]+c:a[m]-c,d()),l=a.top,d(),s=m==="start"?a[m]-re:a[m]+re,d(),qt(l,s,o,m!=="start")}return o},qt=(e,a,n,r)=>r?Da(e,a,n):ba(e,a,n),Da=(e,a,n)=>{n.push({top:e-re/2,left:a}),n.push({top:e,left:a-re+1}),n.push({top:e+re/2,left:a}),n.push({top:e,left:a})},ba=(e,a,n)=>{n.push({top:e+re/2,left:a}),n.push({top:e,left:a+re-1}),n.push({top:e-re/2,left:a}),n.push({top:e,left:a})},$t=e=>{if(e.workWeekStart===void 0||e.workWeekEnd===void 0)return[];const a=[];let n=e.workWeekStart;for(a.push(n);e.workWeekEnd!==n;)n>6?n-=7:n++,a.push(n);return a},Sa=(e,a)=>{const n=e.getDay();return a.indexOf(n)>-1},Yt=(e,{step:a,timezone:n})=>{const r=[],o=w.ZonedDate.fromLocalDate(e.start,n),l=w.ZonedDate.fromLocalDate(e.end,n);let s=o.clone();for(;s.getTime()<l.getTime();){const c=s.clone(),g=c.clone().addTime(a),f=new Date(c.getTime()),u={end:new Date(g.getTime()),start:f,zonedStart:c,zonedEnd:g};r.push(u),s=s.addTime(a)}return r},ka=(e,{timezone:a},n)=>{const r=[],o=w.ZonedDate.fromLocalDate(e.start,a),l=w.ZonedDate.fromLocalDate(e.end,a);for(let s=o.clone(),c=0;s.getTime()<l.getTime();c++){const g=s.clone(),f=Pe(w.firstDayInWeek(w.getDate(g),n.firstDay()),Gt),d=w.ZonedDate.fromUTCDate(ie(f),a),u=d.getTime()>l.getTime()?l.clone():d;s=u.clone();const m=new Date(g.getTime()),p={end:new Date(u.getTime()),start:m,zonedStart:g,zonedEnd:u};r.push(p)}return r},Ia=(e,{timezone:a})=>{const n=[],r=w.ZonedDate.fromLocalDate(e.start,a),o=w.ZonedDate.fromLocalDate(e.end,a);for(let l=r.clone(),s=0;l.getTime()<o.getTime();s++){const c=l.clone(),g=w.ZonedDate.fromLocalDate(w.addMonths(new Date(c.getTime()),1),a);l=g.clone();const f=new Date(c.getTime()),u={end:new Date(g.getTime()),start:f,zonedStart:c,zonedEnd:g};n.push(u)}return n},xa=(e,{timezone:a})=>{const n=[],r=w.ZonedDate.fromLocalDate(e.start,a),o=w.ZonedDate.fromLocalDate(e.end,a);for(let l=r.clone(),s=0;l.getTime()<o.getTime();s++){const c=l.clone(),g=w.ZonedDate.fromLocalDate(w.addMonths(new Date(c.getTime()),12),a);l=g.clone();const f=new Date(c.getTime()),u={end:new Date(g.getTime()),start:f,zonedStart:c,zonedEnd:g};n.push(u)}return n},ya=(e,a,n)=>{const r=n.parseDate(a.workDayStart).getHours(),o=n.parseDate(a.workDayEnd).getHours();return Yt(e,{step:w.MS_PER_MINUTE*a.slotDuration,timezone:a.timezone}).map(s=>{const c=s.zonedStart.getHours();return{range:s,isWork:c>=r&&c<o,span:1,text:n.formatDate(s.zonedStart,la),type:"time"}})},Zt=(e,a,n)=>Yt(e,{step:w.MS_PER_DAY,timezone:a.timezone}).map(o=>({range:o,isWork:Sa(o.start,a.workDays),span:1,text:n.formatDate(o.zonedStart,Qe),type:"day"})),jt=(e,a,n)=>ka(e,{timezone:a.timezone},n).map(o=>{const l=Math.round((o.zonedEnd.getTime()-o.zonedStart.getTime())/w.MS_PER_DAY);return{range:o,isWork:!1,span:l,text:`${n.formatDate(o.zonedStart,Qe)} - ${n.formatDate(o.zonedEnd,Qe)}`,type:"week"}}),Xt=(e,a,n)=>Ia(e,{timezone:a.timezone}).map(o=>{const l=Math.round((o.zonedEnd.getTime()-o.zonedStart.getTime())/w.MS_PER_DAY);return{range:o,isWork:!1,span:l,text:n.formatDate(o.zonedStart,ia),type:"month"}}),Ta=(e,a,n)=>xa(e,{timezone:a.timezone}).map(o=>{const l=Math.round((o.zonedEnd.getTime()-o.zonedStart.getTime())/w.MS_PER_DAY);return{range:o,isWork:!1,span:l,text:n.formatDate(o.zonedStart,ca),type:"year"}}),Ra=(e,a,n)=>{const r=n;return t.createElement("table",{className:"k-table k-table-md",ref:a,"aria-hidden":!0},t.createElement("tbody",{className:"k-table-tbody"},e.map((o,l)=>t.createElement("tr",{className:"k-table-row",key:l},o.map((s,c)=>t.createElement("td",{key:s.range.start.getTime(),colSpan:s.span,className:h.classNames("k-table-th",{"k-header":!0,"k-nonwork-hour":!s.isWork})},r?t.createElement(r,{rowIndex:l,index:c,range:s.range,text:s.text,isWork:s.isWork,type:s.type}):s.text))))))},Na=(e,a)=>{const n=e[e.length-1];return t.createElement("table",{className:"k-table k-table-md k-gantt-columns",ref:a,"aria-hidden":!0},t.createElement("tbody",{className:"k-table-tbody"},t.createElement("tr",{className:"k-table-row"},n.map(r=>t.createElement("td",{key:r.range.start.getTime(),colSpan:r.span,className:h.classNames("k-table-td",{"k-nonwork-hour":!r.isWork})})))))},Fa=(e,a)=>{const n=e[e.length-1];let r=0,o=0;return n.forEach(l=>{const s=l.span;o+=s,s>r&&(r=s)}),Math.round(o*a/r)},tt=(e,a)=>!!h.getter(a)(e),Jt=(e,a)=>!!h.getter(a)(e),La=(e,a)=>n=>tt(n,e)&&Jt(n,a)?[...h.getter(a)(n)]:[],nt=t.createContext([]),za=()=>t.useContext(nt);nt.displayName="KendoReactGanttTaskDataContext";const at=t.createContext([]),Ha=()=>t.useContext(at);at.displayName="KendoReactGanttDependencyDataContext";const rt=t.createContext(Kt),st=()=>t.useContext(rt);rt.displayName="KendoReactGanttTaskModelFieldsContext";const ot=t.createContext(Bt),Qt=()=>t.useContext(ot);ot.displayName="KendoReactGanttDependencyModelFieldsContext";const lt=t.createContext({}),Ie=()=>t.useContext(lt);lt.displayName="KendoReactGanttPropsContext";const it=t.createContext({start:new Date,end:new Date,zonedStart:w.ZonedDate.fromLocalDate(new Date),zonedEnd:w.ZonedDate.fromLocalDate(new Date)}),xe=()=>t.useContext(it);it.displayName="KendoReactGanttDateRangeContext";const ct=t.createContext([]),Ma=()=>t.useContext(ct);ct.displayName="KendoReactGanttViewsContext";const dt=t.createContext(["week",h.noop]),Pt=()=>t.useContext(dt);dt.displayName="KendoReactGanttActiveViewContext";const ut=t.createContext(0),en=()=>t.useContext(ut);ut.displayName="KendoReactGanttRowHeightContext";const gt=t.createContext(0),Aa=()=>t.useContext(gt);gt.displayName="KendoReactGanttToolbarHeightContext";const ft=t.createContext({onDataStateChange:h.noop,onSortChange:h.noop,onFilterChange:h.noop,onColumnMenuFilterChange:h.noop,onExpandChange:h.noop,onRowClick:h.noop,onRowDoubleClick:h.noop,onRowContextMenu:h.noop,onColumnResize:h.noop,onColumnReorder:h.noop,onDependencyCreate:h.noop,onKeyDown:h.noop,onSelectionChange:h.noop,onHeaderSelectionChange:h.noop}),Va=()=>t.useContext(ft);ft.displayName="KendoReactGanttEventsContext";const ht=t.createContext({onTaskClick:h.noop,onTaskDoubleClick:h.noop,onTaskContextMenu:h.noop}),Oa=()=>t.useContext(ht);ht.displayName="KendoReactGanttTaskEventsContext";const tn=({children:e,taskData:a,dependencyData:n,taskModelFields:r,dependencyModelFields:o,props:l,dateRange:s,views:c,activeView:g,rowHeight:f,toolbarHeight:d,events:u,taskEvents:m})=>t.createElement(lt.Provider,{value:l},t.createElement(nt.Provider,{value:a},t.createElement(at.Provider,{value:n},t.createElement(rt.Provider,{value:r},t.createElement(ot.Provider,{value:o},t.createElement(it.Provider,{value:s},t.createElement(ct.Provider,{value:c},t.createElement(dt.Provider,{value:g},t.createElement(ut.Provider,{value:f},t.createElement(gt.Provider,{value:d},t.createElement(ft.Provider,{value:u},t.createElement(ht.Provider,{value:m},e))))))))))));tn.displayName="KendoReactGanttContext";const mt=t.createContext([{current:{}},h.noop]),nn=()=>t.useContext(mt);mt.displayName="KendoReactGanttViewContext";const Ct=t.createContext(0),Ga=()=>t.useContext(Ct);Ct.displayName="KendoReactGanttViewTimelineWidthContext";const Et=t.createContext({onDependencyHandlePress:h.noop,onDependencyHandleDrag:h.noop,onDependencyHandleRelease:h.noop,isEnabled:!1,draggedId:null}),Wa=()=>t.useContext(Et);Et.displayName="KendoReactGanttViewDependencyDragContext";const an=({children:e,tasksStore:a,timelineWidth:n,dependencyDrag:r})=>t.createElement(mt.Provider,{value:a},t.createElement(Ct.Provider,{value:n},t.createElement(Et.Provider,{value:r},e)));an.displayName="KendoReactGanttViewContext";var wt=(e=>(e[e.add=0]="add",e[e.remove=1]="remove",e))(wt||{});const _a=()=>{const e=t.useRef({}),a=t.useCallback(n=>{switch(n.type){case 0:e.current[n.id]=n.itemRef;break;case 1:delete e.current[n.id];break}},[]);return[e,a]},Ka=(e,a,n,r)=>{const o=t.useRef(null),[,l]=nn();t.useImperativeHandle(o,()=>({element:r.current,dataItem:e})),t.useImperativeHandle(n,()=>o.current),t.useLayoutEffect(()=>{const s=o.current;if(s)return l({type:wt.add,itemRef:s,id:a}),()=>{l({type:wt.remove,itemRef:s,id:a})}})},rn=t.forwardRef((e,a)=>{const n=xe(),r=st(),o=Ga(),l=Wa(),s=Oa(),c=t.useRef(null),g=t.useRef(null);Ka(e.dataItem,h.getter(r.id)(e.dataItem),a,c);const f=t.useRef(null),d=h.getter(r.id)(e.dataItem),u=h.getter(r.start)(e.dataItem),m=h.getter(r.end)(e.dataItem),E=h.getter(r.title)(e.dataItem),p=h.getter(r.percentComplete)(e.dataItem),C=h.getter(r.children)(e.dataItem),x=h.getter(r.isSelected)(e.dataItem),H=u&&u.getTime(),V=m&&m.getTime(),L=C&&C.length,N=!L&&H===V,O=H&&V&&pa(n.start,n.end,u,m),[ee,T]=t.useState(!1),J=t.useRef(null),A=t.useRef(null);h.useDraggable(J,{onPress:l.onDependencyHandlePress,onDrag:l.onDependencyHandleDrag,onRelease:l.onDependencyHandleRelease}),h.useDraggable(A,{onPress:l.onDependencyHandlePress,onDrag:l.onDependencyHandleDrag,onRelease:l.onDependencyHandleRelease});const Q=t.useCallback(k=>{s.onTaskClick&&s.onTaskClick({dataItem:e.dataItem,level:e.level,nativeEvent:k&&k.nativeEvent,syntheticEvent:k,target:null})},[e.dataItem,e.level]),G=t.useCallback(k=>{s.onTaskDoubleClick&&s.onTaskDoubleClick({dataItem:e.dataItem,level:e.level,nativeEvent:k&&k.nativeEvent,syntheticEvent:k,target:null})},[e.dataItem,e.level]),$=t.useCallback(k=>{s.onTaskContextMenu&&s.onTaskContextMenu({dataItem:e.dataItem,level:e.level,nativeEvent:k&&k.nativeEvent,syntheticEvent:k,target:null})},[e.dataItem,e.level]),D=t.useCallback(k=>{s.onTaskRemoveClick&&s.onTaskRemoveClick({dataItem:e.dataItem,level:e.level,nativeEvent:k&&k.nativeEvent,syntheticEvent:k,target:null})},[e.dataItem,e.level]),M=t.useCallback(()=>{const k=n.start,P=n.end,y=f.current,R=c.current,q=g.current;if(!O||y===null||R===null)return;const j=y.clientWidth/(P.getTime()-k.getTime()),W=(u.getTime()-k.getTime())*j,_=(m.getTime()-u.getTime())*j,Ce=(y.offsetHeight-R.offsetHeight)/2;R.style.left=`${Math.round(N?W-da:W)}px`,R.style.top=`${Math.round(Ce)}px`,N||(R.style.width=`${Math.round(_)}px`,q!==null&&(q.style.width=`${Math.round(_*(p||0))}px`)),T(!0)},[n.start.getTime(),n.end.getTime(),H,V,O,p,o]);t.useEffect(M,[M]);const te={visibility:ee?void 0:"hidden",display:O?void 0:"none"},B={userSelect:"none",display:l.draggedId===String(d)?"block":void 0};return t.createElement("td",{ref:f,key:d,role:"presentation"},N?t.createElement("div",{"aria-hidden":!0,className:h.classNames({"k-task":!0,"k-task-milestone":!0,"k-selected":x&&!Array.isArray(x)}),style:te,ref:c,[Ve]:d,onClick:Q,onDoubleClick:G,onContextMenu:$},t.createElement("div",{className:"k-task-milestone-content"}),l.isEnabled&&t.createElement("div",{className:"k-task-dot k-task-start",ref:J,style:B,...Wt}),l.isEnabled&&t.createElement("div",{className:"k-task-dot k-task-end",ref:A,style:B,..._t})):t.createElement("div",{"aria-hidden":!0,className:h.classNames({"k-task":!0,"k-task-summary":L,"k-task-single":!L,"k-selected":x&&!Array.isArray(x)}),ref:c,style:te,[Ve]:d,onClick:Q,onDoubleClick:G,onContextMenu:$},L?t.createElement("div",{className:"k-task-summary-progress",ref:g},t.createElement("div",{className:"k-task-summary-complete"})):t.createElement("div",{className:"k-task-complete",ref:g}),!L&&t.createElement(t.Fragment,null,t.createElement("div",{className:"k-task-content"},E),s.onTaskRemoveClick?t.createElement("span",{className:"k-task-actions"},t.createElement("span",{onClick:D,className:"k-link k-task-delete","aria-label":"Delete"},t.createElement(h.IconWrap,{name:"x",icon:Je.xIcon}))):null),l.isEnabled&&t.createElement("div",{className:"k-task-dot k-task-start",ref:J,style:B,...Wt}),l.isEnabled&&t.createElement("div",{className:"k-task-dot k-task-end",ref:A,style:B,..._t})))});rn.displayName="KendoReactGanttTask";const sn=e=>{const{dependency:a}=e,[n]=nn(),r=t.useRef(null),o=Qt(),l=en(),[s,c]=t.useState(!1),g=()=>{if(r.current===null||n.current===null){c(!1);return}const f=n.current[h.getter(o.fromId)(a)],d=n.current[h.getter(o.toId)(a)];if(!f||!d){c(!1);return}const u=f.element,m=d.element;if(!u||!m){c(!1);return}if(s===!1){c(!0);return}const E={top:u.offsetTop+u.offsetHeight/2,start:u.offsetLeft,end:u.offsetLeft+u.offsetWidth},p={top:m.offsetTop+m.offsetHeight/2,start:m.offsetLeft,end:m.offsetLeft+m.offsetWidth},C=h.getter(o.type)(a),x=va(E,p,l,C);x&&x.length&&r.current.setAttribute("points",x.map(H=>`${H.left},${H.top}`).join(" "))};return t.useEffect(g),t.createElement("polyline",{ref:r,style:{display:s?void 0:"none"}})};sn.displayName="KendoReactGanttDependency";class pt extends t.Component{constructor(a){super(a),this.state={activeId:void 0,level:0},this.tableElement=null,this.tbodyElement=null,this.wrapperScrollLeft=0,this.wrapperScrollTop=0,this.updateOnScroll=!1,this.tbodyOffsetTop=0,this.prevData=[],this.flattedData=[],this.element=null,this.contextStateRef={current:void 0},this.navigationStateRef={current:void 0},this.scrollIntoView=n=>{if(!this.element)return;const{rowIndex:r=0}=n,{rowHeight:o=0}=this.props;this.element.scroll(0,(r-1)*o)},this.getColumns=n=>{const r=n.filter(l=>l.declarationIndex>=0&&l.parentIndex===-1),o=l=>(l.sort((s,c)=>s.declarationIndex-c.declarationIndex),l.map(s=>{const{declarationIndex:c,parentIndex:g,depth:f,colSpan:d,rowSpan:u,index:m,kFirst:E,groupable:p,children:C,...x}=s;return C.length?{children:o(C),...x}:x}));return o(r)},this.onKeyDown=n=>{if(S.tableKeyboardNavigation.onKeyDown(n,{contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef}),this.props.onKeyDown){const{mode:r,cell:o}=S.getSelectionOptions(this.props.selectable),l={dataItems:this.getLeafDataItems(),mode:r,cell:o,componentId:this.props.treelistId,selectedField:this.props.selectedField,...this.getEventArguments(n)};this.props.onKeyDown.call(void 0,l)}},this.onFocus=n=>{S.tableKeyboardNavigation.onFocus(n,{contextStateRef:this.contextStateRef})},this.onRowDrag=n=>{if(this.props.onRowDrag){const r={...n,target:this};this.props.onRowDrag.call(void 0,r)}},this.onRowDrop=n=>{if(this.props.onRowDrop){const r={...n,target:this};this.props.onRowDrop.call(void 0,r)}},this.onColumnReorder=(n,r,o)=>{const{extendedColumns:l}=this.props,s=l[n].depth,c=d=>{do d++;while(d<l.length&&l[d].depth>s);return d},g=[...l],f=g.splice(n,c(n)-n);if(g.splice(n<r?c(r-f.length):r,0,...f),g.filter(d=>d.declarationIndex>=0).forEach((d,u)=>d.orderIndex=u),this.props.onColumnReorder){const d={target:this,columns:this.getColumns(g),nativeEvent:o};this.props.onColumnReorder.call(void 0,d)}},this.onColumnResize=(n,r,o,l,s)=>{if(this.props.onColumnResize){const c=this.props.extendedColumns.filter(f=>f.children.length===0).reduce((f,d)=>f+=parseFloat(String(d.width)),0);this.tableElement&&(this.tableElement.style.width=c+"px");const g={columns:this.getColumns(this.props.extendedColumns),totalWidth:c,index:n,nativeEvent:l,newWidth:r,oldWidth:o,end:s,target:this};this.props.onColumnResize.call(void 0,g)}},this.onScroll=n=>{const r=n.currentTarget.scrollLeft,o=n.currentTarget.scrollTop,{columnVirtualization:l,scrollable:s,rowHeight:c=0}=this.props,g=c,f=0;let d=!1;l&&Math.abs(this.wrapperScrollLeft-r)>f&&(this.wrapperScrollLeft=r,d=!0),s==="virtual"&&Math.abs(this.wrapperScrollTop-o)>g&&(this.wrapperScrollTop=o,d=!0),d&&(this.updateOnScroll=!0,this.forceUpdate())},this.calculateSizes=n=>{if(!n||this.props.scrollable==="none")return;const r=Array.from(n.childNodes),o=r.find(c=>c.nodeName==="TABLE"),l=this.props.toolbar&&r.find(c=>c.nodeType===1&&c.classList.contains("k-grid-toolbar"));let s=0;if(l){const c=l.style.boxSizing;l.style.boxSizing="border-box",s=parseFloat(String(window.getComputedStyle(l).height))||l.offsetHeight,l.style.boxSizing=c,l.getAttribute("style")||l.removeAttribute("style")}this.tbodyOffsetTop=o.tBodies[0].offsetTop,de.setHeaderRowsTop(o,s)},this.onItemChange=n=>{if(n.field===this.props.expandField){const r=this.props.onExpandChange;if(r){const o={...this.getEventArguments(n.syntheticEvent),dataItem:n.dataItem,level:n.level,value:n.value};r.call(void 0,o)}return}if(this.props.onItemChange){const r={...this.getEventArguments(n.syntheticEvent),dataItem:n.dataItem,level:n.level,field:n.field,value:n.value};this.props.onItemChange.call(void 0,r)}},this.onHeaderSelectionChange=n=>{if(this.props.onHeaderSelectionChange){const r={field:n.field,nativeEvent:n.syntheticEvent&&n.syntheticEvent.nativeEvent,syntheticEvent:n.syntheticEvent,target:this,dataItems:this.getLeafDataItems()};this.props.onHeaderSelectionChange.call(void 0,r)}},this.selectionRelease=n=>{if(this.props.onSelectionChange){const r={syntheticEvent:void 0,target:this,selectedField:this.props.selectedField||"",componentId:this.props.treelistId,dataItems:this.getLeafDataItems(),dataItem:null,level:[],...n};this.props.onSelectionChange.call(void 0,r)}},this.onSortChange=(n,r,o)=>{this.onDataStateChange(this.props.onSortChange,{sort:r,field:o},n)},this.onFilterChange=n=>{const{filter:r,field:o}=n;this.onDataStateChange(this.props.onFilterChange,{filter:r,field:o},n.syntheticEvent)},this.onColumnMenuFilterChange=(n,r,o)=>{if(!o)return;const{onColumnMenuFilterChange:l}=this.props;if(!l)return;const s={syntheticEvent:n,filter:r,field:o,target:this,nativeEvent:n.nativeEvent};l.call(void 0,s)},this.onExpandChange=(n,r,o)=>{const{expandField:l,onExpandChange:s}=this.props;if(l&&s){const c={...this.getEventArguments(n),dataItem:r,level:o,value:tt(r,this.props.expandField)};s.call(void 0,c)}},this.onRowClick=(n,r)=>{if(this.props.onRowClick&&n.target.nodeName==="TD"){const o={dataItem:r.dataItem,level:r.level,...this.getEventArguments(n)};this.props.onRowClick.call(void 0,o)}},this.rowDoubleClick=(n,r)=>{if(this.props.onRowDoubleClick&&n.target.nodeName==="TD"){const o={dataItem:r.dataItem,level:r.level,...this.getEventArguments(n)};this.props.onRowDoubleClick.call(void 0,o)}},this.rowContextMenu=(n,r)=>{if(this.props.onRowContextMenu&&n.target.nodeName==="TD"){const o={dataItem:r.dataItem,level:r.level,...this.getEventArguments(n)};this.props.onRowContextMenu.call(void 0,o)}},this.onPageChange=n=>{if(this.props.onPageChange){const r={...this.getEventArguments(n.syntheticEvent),skip:n.skip,take:n.take};this.props.onPageChange.call(void 0,r)}},this.onDataStateChange=(n,r,o)=>{if(n&&n.call(void 0,{...this.getEventArguments(o),...r}),this.props.onDataStateChange){const l={...this.getEventArguments(o),dataState:{...this.getDataState(),...r}};this.props.onDataStateChange.call(void 0,l)}},this.getDataState=()=>({filter:this.props.filter,sort:this.props.sort}),this.getEventArguments=n=>({nativeEvent:n&&n.nativeEvent,syntheticEvent:n,target:this}),this.getLeafDataItems=()=>this.flatData.map(n=>n.dataItem),this.dragLogic=new S.CommonDragLogic(this.onColumnReorder,h.noop,h.noop),this.columnResize=new S.ColumnResize(this.onColumnResize),S.tableKeyboardNavigation.onConstructor({navigatable:!!a.navigatable,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef,idPrefix:a.idPrefix})}get document(){if(h.canUseDOM)return this.element&&this.element.ownerDocument||document}componentDidMount(){this.calculateSizes(this.element),S.tableKeyboardNavigation.onComponentDidMount({scope:this.element||void 0,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef})}getSnapshotBeforeUpdate(){return S.tableKeyboardNavigation.onGetSnapshotBeforeUpdate({document:this.document,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef}),null}componentDidUpdate(a){a.columns!==this.props.columns&&this.calculateSizes(this.element),S.tableKeyboardNavigation.onComponentDidUpdate({scope:this.element||void 0,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef})}componentWillUnmount(){this.columnResize.columns=[],this.dragLogic.columns=[],this.prevData=[],this.flattedData=[],this.updateOnScroll=!1}render(){const{filterRow:a,scrollable:n="scrollable",resizable:r=!1,reorderable:o=!1,skip:l,take:s,afterContent:c,extendedColumns:g=[],columnsMap:f}=this.props,d=g.some(D=>!!D.filter)||a!==void 0,u=a||S.FilterRow,m=S.tableKeyboardNavigationTools.getIdPrefix(this.navigationStateRef);this.columnResize.columns=g,this.columnResize.resizable=r,this.dragLogic.columns=g,this.dragLogic.reorderable=o,this.dragLogic.groupable=!1;const E=g.filter(D=>D.children.length===0),p=t.createElement(S.Header,{headerRow:t.createElement(S.HeaderRow,{sort:this.props.sort,sortable:this.props.sortable,sortChange:this.onSortChange,selectionChange:this.onHeaderSelectionChange,columns:g,columnsMap:f,cellRender:this.props.headerCellRender,columnResize:this.columnResize,columnMenu:this.props.columnMenu,columnMenuFilter:this.props.columnMenuFilter,columnMenuFilterChange:this.onColumnMenuFilterChange,pressHandler:this.dragLogic.pressHandler,dragHandler:this.dragLogic.dragHandler,releaseHandler:this.dragLogic.releaseHandler}),filterRow:d&&t.createElement(u,{columns:E,filter:this.props.filter,filterChange:this.onFilterChange,sort:this.props.sort,ariaRowIndex:f.length+1})||void 0,columnResize:this.columnResize}),C=this.props.style||{},{colSpans:x,hiddenColumns:H}=S.tableColumnsVirtualization({enabled:this.props.columnVirtualization,columns:E,scrollLeft:this.wrapperScrollLeft,tableViewPortWidth:parseFloat((C.width||"").toString())}),V=(D,M,te,B,k,P)=>E.map((y,R)=>{if(H[R])return null;const q=y.id?y.id:R,j=`k-table-td ${y.className?y.className+" ":""}${y.locked?"k-grid-content-sticky":""}`,W={id:S.tableKeyboardNavigationTools.generateNavigatableId(`${te}-${String(R)}`,m),colSpan:x[R],dataItem:D.dataItem,field:y.field,format:y.format,className:j||void 0,render:this.props.cellRender,onChange:this.onItemChange,selectionChange:this.props.onSelectionChange?_=>{this.onSelectionChange({event:_,item:D,columnIndex:R,dataIndex:k})}:void 0,level:D.level,expandable:y.expandable,expanded:B,hasChildren:Jt(D.dataItem,this.props.subItemsField),colIndex:R,ariaColumnIndex:y.ariaColumnIndex,onExpandChange:this.onExpandChange,style:y.left!==void 0&&{left:y.left,right:y.right,borderRightWidth:y.rightBorder?"1px":""}||{},isSelected:Array.isArray(P)&&P.indexOf(R)>-1};return M&&y.editCell?t.createElement(y.editCell,{...W,onChange:this.onItemChange,key:q}):y.cell?t.createElement(y.cell,{key:q,...W}):t.createElement(de.TreeListCell,{key:q,...W})});let L=this.flatData;const N=L.length;l!==void 0&&s!==void 0&&(L=L.slice(l,l+s)),n==="virtual"&&(L=de.tableRowsVirtualization({rows:L,tableViewPortHeight:parseFloat((C.height||C.maxHeight||"").toString()),scrollTop:this.wrapperScrollTop}),this.updateOnScroll=!1);const O=L.map(D=>D.level),ee=f.length+(d?1:0)+1,T=L.length>0&&L.map((D,M)=>{const te=h.getter(this.props.editField||"")(D.dataItem),B=h.getter(this.props.dataItemKey)(D.dataItem),k=String(B||D.level.join(".")),P=tt(D.dataItem,this.props.expandField),y=this.props.selectedField?h.getter(this.props.selectedField)(D.dataItem):void 0,R={key:k,level:D.level,levels:O,dataItem:D.dataItem,selectedField:this.props.selectedField,rowHeight:D.height,render:this.props.rowRender,onDrop:this.onRowDrop,onDrag:this.onRowDrag,onClick:_=>this.onRowClick(_,D),onDoubleClick:_=>this.rowDoubleClick(_,D),onContextMenu:_=>this.rowContextMenu(_,D),isAltRow:M%2!==0,expanded:P,rowIndex:M,ariaRowIndex:ee+M,ariaSetSize:D.levelCount,ariaPosInSet:D.level[D.level.length-1]+1,isSelected:typeof y=="boolean"&&y},q=this.props.editRow,j=this.props.row||de.TreeListRow,W=V(D,te,k,P,M,y);return te&&q?t.createElement(q,{...R,key:R.key},W):t.createElement(j,{...R,key:R.key},W)})||t.createElement("tr",{className:"k-table-row k-grid-norecords"},t.createElement("td",{className:"k-table-td",colSpan:E.length},this.props.noRecords||t.createElement(de.TreeListNoRecords,null))),J=D=>this.props.sort&&this.props.sort.some(M=>M.field===D),A=t.createElement("colgroup",{ref:D=>{this.columnResize.colGroupMain=D}},E.map((D,M)=>t.createElement("col",{key:M.toString(),className:J(D.field)?"k-sorted":void 0,style:D.width!==void 0?{width:D.width}:void 0}))),Q=this.props.columnVirtualization||this.props.scrollable==="virtual",G=this.props.selectable&&this.props.selectable.drag?"none":void 0,$=this.props.tableProps||{};return t.createElement(S.TableKeyboardNavigationContext.Provider,{value:this.contextStateRef.current},t.createElement("div",{id:this.props.treelistId,style:this.props.style,className:h.classNames("k-grid k-grid-md",this.props.className,{"k-treelist-scrollable":n!=="none"}),ref:D=>this.element=D,onScroll:Q?this.onScroll:void 0,onKeyDown:this.onKeyDown,onFocus:this.onFocus,"aria-rowcount":N,"aria-colcount":E.length,role:"treegrid",...S.tableKeyboardNavigationScopeAttributes},this.props.toolbar,t.createElement(S.TableSelection,{selectable:this.props.selectable,onRelease:this.selectionRelease,childRef:D=>{this.tableElement=D}},t.createElement("table",{className:"k-table k-table-md",...this.props.tableProps||{},style:{...$.style||{},userSelect:G},role:"presentation"},A,p,t.createElement("tbody",{className:"k-table-tbody",...S.tableKeyboardNavigationBodyAttributes,ref:D=>this.tbodyElement=D,role:"presentation"},T))),this.props.pager&&t.createElement(this.props.pager,{className:"k-grid-pager",total:N,skip:l,take:s,onPageChange:this.onPageChange}),o&&t.createElement(t.Fragment,null,t.createElement(S.DropClue,{ref:this.dragLogic.refDropElementClue}),t.createElement(S.DragClue,{ref:this.dragLogic.refDragElementClue})),c))}get flatData(){const{data:a=[],rowHeight:n=0}=this.props;let r=0;const o=()=>{const s={height:n,offsetTop:r};return r+=s.height,s},l=this.updateOnScroll&&this.prevData===a&&this.tbodyOffsetTop>0&&this.flattedData.length?this.flattedData:a.map(s=>({...s,...o()}));return this.prevData=a,this.flattedData=l,l}onSelectionChange(a){if(this.props.onSelectionChange){const{event:n,item:r,dataIndex:o,columnIndex:l}=a,{mode:s,cell:c}=S.getSelectionOptions(this.props.selectable),g={...this.getEventArguments(n.syntheticEvent),dataItem:r.dataItem,level:r.level,startColIndex:l,endColIndex:l,startRowIndex:o,endRowIndex:o,dataItems:this.getLeafDataItems(),altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,mode:s,cell:c,isDrag:!1,componentId:this.props.treelistId,selectedField:this.props.selectedField||""};this.props.onSelectionChange.call(void 0,g)}}}pt.propTypes={data:i.array,resizable:i.bool,reorderable:i.bool,sortable:i.oneOfType([i.bool,i.shape({mode:i.oneOf(["single","multiple"]),allowUnsort:i.bool})]),onSortChange:i.func,sort:i.array,columns:i.arrayOf(i.object),columnVirtualization:i.bool,filter:i.array,onFilterChange:i.func,filterRow:i.any,toolbar:i.any,noRecords:i.any,onExpandChange:i.func,expandField:i.string,subItemsField:i.string,selectedField:i.string,onSelectionChange:i.func,onHeaderSelectionChange:i.func,onRowClick:i.func,onItemChange:i.func,editField:i.string,scrollable:i.oneOf(["none","scrollable","virtual"]),rowHeight:i.number,style:i.object,tableProps:i.object,pager:i.any,skip:i.number,take:i.number,onPageChange:i.func,onDataStateChange:i.func,onColumnResize:i.func,onColumnReorder:i.func,extendedColumns:i.arrayOf(i.object),columnsMap:i.arrayOf(i.array),dataItemKey:i.string.isRequired,afterContent:i.any,navigatable:i.bool,idPrefix:i.string,treelistId:i.string},pt.contextType=S.TableKeyboardNavigationContext;const ye=t.forwardRef((e,a)=>{const{slotLevels:n,slotWidth:r,timelineHeaderCell:o}=e,{columns:l,noRecords:s,resizable:c,reorderable:g,sortable:f,sort:d,filter:u,columnMenuFilter:m,columnMenu:E,navigatable:p,row:C,selectable:x}=Ie(),{onDataStateChange:H,onSortChange:V,onFilterChange:L,onColumnMenuFilterChange:N,onExpandChange:O,onRowClick:ee,onRowDoubleClick:T,onRowContextMenu:J,onColumnResize:A,onColumnReorder:Q,onDependencyCreate:G,onKeyDown:$,onSelectionChange:D,onHeaderSelectionChange:M}=Va(),te=en(),B=Aa(),k=st(),P=Qt(),y=za(),R=Ha(),q=t.useRef(null),j=t.useRef(null),W=t.useRef(null),_=t.useRef(null),Ce=t.useRef(0),Ne=t.useRef(h.useId()),z=t.useRef(h.useId()),ne=t.useRef(null),Xe=t.useRef(null),xt=t.useCallback(I=>{W.current&&W.current.scrollIntoView(I)},[]);t.useImperativeHandle(Xe,()=>({scrollIntoView:xt})),t.useImperativeHandle(a,()=>Xe.current);const Ee=t.useRef(0),we=t.useRef(0),pe=t.useRef(0),ve=t.useRef(0),he=t.useRef(null),Fe=t.useRef(null),[me,Le]=t.useState(null),yt=Ra(n,q,o),Tt=Na(n,j),De=Fa(n,r),{extendedColumns:Rt,columnsWidth:Nt,columnsMap:Ft}=t.useMemo(()=>{const I=S.readColumns([...l,{title:"",sortable:!1,resizable:!1,reorderable:!1,width:De,headerCell:()=>yt,cell:rn,orderIndex:Number.MAX_SAFE_INTEGER,navigatable:!1}],{prevId:0,idPrefix:Ne.current});let K=0;return I.forEach((F,Y,X)=>{const Z=Y+1===X.length,ge=F.children.length===0;Z?F.isAccessible=!1:(F.locked=!0,ge&&(F.width=F.width||ke)),ge&&(K+=parseFloat(String(F.width)))}),{extendedColumns:I,columnsWidth:K,columnsMap:S.mapColumns(I)}},[l,De]),[Lt,zt]=_a(),v=t.useCallback(()=>q.current&&q.current.parentElement,[]),ce=()=>{const I=v(),K=j.current,F=W.current&&W.current.tbodyElement;if(!I||!K||!F)return;const Y=F.offsetTop,X=I.offsetLeft,Z=De;K.style.top=Y+"px",K.style.left=X+"px",K.style.width=Z+"px",K.style.height=F.offsetHeight+"px"},ue=()=>{const I=v();I&&(Ce.current=I.offsetLeft)};t.useEffect(ce),t.useEffect(ue);const ze=t.useCallback(I=>{if(!_.current)return;const K=I.columns.slice(0,I.columns.length-1);if(I.end)_.current.style.left="0px";else{const F=v();if(!F)return;_.current.style.left=F.offsetLeft-Ce.current+"px",ce()}A({...I,columns:K})},[A]),He=t.useCallback(I=>{const K=I.columns.slice(0,I.columns.length-1);Q({...I,columns:K})},[A]),Ht=t.useCallback(I=>{const F=(ne.current&&ne.current.ownerDocument?ne.current.ownerDocument:document).elementFromPoint(I.clientX,I.clientY),Y=ne.current;if(!F||!F.parentElement||!Y)return;const X=Y.parentElement,Z=Y.firstElementChild;if(!X||!Z)return;const ge=F.getAttribute(Ae);if(ge){const lr=Y.offsetTop,ir=Y.offsetLeft,cr=X.offsetTop,dr=X.offsetLeft,ur=Z.scrollTop,gr=Z.scrollLeft;pe.current=ir+dr,ve.current=lr+cr,Ee.current=I.clientX-pe.current+gr,we.current=I.clientY-ve.current+ur,he.current=F.parentElement.getAttribute(Ve),Fe.current=ge}},[]),be=t.useCallback(I=>{const K=ne.current;if(!K)return;const F=K.firstElementChild;if(!F)return;const Y=F.scrollTop,X=F.scrollLeft,Z=I.clientX-pe.current+X,ge=I.clientY-ve.current+Y;Math.abs(Ee.current-Z)<10&&Math.abs(we.current-ge)<10||Le({startX:Ee.current,startY:we.current,endX:Z,endY:ge})},[]),or=t.useCallback(I=>{const F=(ne.current&&ne.current.ownerDocument?ne.current.ownerDocument:document).elementFromPoint(I.clientX,I.clientY);if(!F||!F.parentElement)return;const Y=F.parentElement.getAttribute(Ve),X=F.getAttribute(Ae);if(X&&Y!==he.current&&G){let Z;Fe.current==="start"?Z=X==="start"?3:2:Z=X==="start"?1:0,G({fromId:he.current,toId:Y,type:Z})}Ee.current=0,we.current=0,pe.current=0,ve.current=0,he.current=null,Fe.current=null,Le(null)},[G,Le]);return t.createElement(an,{tasksStore:[Lt,zt],timelineWidth:De,dependencyDrag:{isEnabled:!!G,draggedId:he.current,onDependencyHandlePress:Ht,onDependencyHandleDrag:be,onDependencyHandleRelease:or}},t.createElement("div",{className:"k-gantt-content",ref:ne,style:{height:`calc(100% - ${B}px)`}},t.createElement(pt,{treelistId:z.current,ref:W,extendedColumns:Rt,columnsMap:Ft,dataItemKey:k.id,data:y,idPrefix:Ne.current,navigatable:p,expandField:k.isExpanded,subItemsField:k.children,editField:k.isInEdit,selectedField:k.isSelected,onDataStateChange:H,onSortChange:V,onFilterChange:L,onExpandChange:O,onRowClick:ee,onRowDoubleClick:T,onRowContextMenu:J,onColumnResize:ze,onColumnReorder:He,onColumnMenuFilterChange:N,onKeyDown:$,onSelectionChange:D,onHeaderSelectionChange:M,tableProps:{style:{width:Nt},className:"k-table k-table-md k-table-layout-fixed"},noRecords:s,rowHeight:te,resizable:c,reorderable:g,sortable:f,sort:d,filter:u,columnMenuFilter:m,columnMenu:E,row:C,selectable:x,afterContent:t.createElement(t.Fragment,null,t.createElement("svg",{className:"k-gantt-dependencies-svg",ref:_,style:{left:0,top:0}},R.map(I=>t.createElement(sn,{key:h.getter(P.id)(I),dependency:I}))),t.createElement("svg",{className:"k-gantt-dependencies-svg",style:{left:0,top:0,zIndex:3}},me&&t.createElement("polyline",{points:`${me.startX},${me.startY} ${me.endX},${me.endY}`})),y&&y.length?Tt:null)})))});ye.displayName="KendoReactGanttBaseView";const vt="gantt.weekViewTitle",Dt="gantt.dayViewTitle",bt="gantt.monthViewTitle",St="gantt.yearViewTitle",kt="gantt.filterClearButton",Ge="gantt.filterEqOperator",We="gantt.filterNotEqOperator",_e="gantt.filterIsNullOperator",Ke="gantt.filterIsNotNullOperator",on="gantt.filterIsEmptyOperator",ln="gantt.filterIsNotEmptyOperator",cn="gantt.filterStartsWithOperator",dn="gantt.filterContainsOperator",un="gantt.filterNotContainsOperator",gn="gantt.filterEndsWithOperator",fn="gantt.filterGteOperator",hn="gantt.filterGtOperator",mn="gantt.filterLteOperator",Cn="gantt.filterLtOperator",En="gantt.filterIsTrue",wn="gantt.filterIsFalse",pn="gantt.filterBooleanAll",vn="gantt.filterAfterOrEqualOperator",Dn="gantt.filterAfterOperator",bn="gantt.filterBeforeOperator",Sn="gantt.filterBeforeOrEqualOperator",Ba="gantt.noRecords",kn="gantt.editSave",It="gantt.editCancel",In="gantt.editorTitle",xn="gantt.editorTaskTitle",yn="gantt.editorTaskStart",Tn="gantt.editorTaskEnd",Rn="gantt.editorTaskComplete",Nn="gantt.editorValidationRequired",Fn="gantt.editorValidationStart",Ln="gantt.editorValidationEnd",zn="gantt.addTask",Hn="gantt.addChild",Mn="gantt.addAbove",An="gantt.addBelow",Vn="gantt.editorDelete",On="gantt.deleteConfirmation",Gn="gantt.deleteDialogTitle",se={[vt]:"Week",[Dt]:"Day",[bt]:"Month",[St]:"Year",[kt]:"Clear",[Ge]:"Is equal to",[We]:"Is not equal to",[_e]:"Is null",[Ke]:"Is not null",[on]:"Is empty",[ln]:"Is not empty",[cn]:"Starts with",[dn]:"Contains",[un]:"Does not contain",[gn]:"Ends with",[fn]:"Is greater than or equal to",[hn]:"Is greater than",[mn]:"Is less than or equal to",[Cn]:"Is less than",[En]:"Is true",[wn]:"Is false",[pn]:"(All)",[vn]:"Is after or equal to",[Dn]:"Is after",[bn]:"Is before",[Sn]:"Is before or equal to",[Ba]:"No records available",[kn]:"Save",[It]:"Cancel",[In]:"Task",[xn]:"Title",[yn]:"Start",[Tn]:"End",[Rn]:"Complete",[Nn]:"Field is required.",[Fn]:"Start time must be be before End time.",[Ln]:"End time must be after Start time.",[zn]:"Add Task",[Hn]:"Add Child",[Mn]:"Add Above",[An]:"Add Below",[Vn]:"Delete",[On]:"Are you sure you want to delete this event?",[Gn]:"Delete Event"},Te=t.forwardRef((e,a)=>{const{slotWidth:n=Be.slotWidth,firstSlotRangeRef:r,timelineHeaderCell:o}=e,{timezone:l}=Ie(),s=U.useInternationalization(),c=t.useRef(null),g=t.useRef(null),f=t.useCallback(p=>{g.current&&g.current.scrollIntoView(p)},[]);t.useImperativeHandle(c,()=>({scrollIntoView:f})),t.useImperativeHandle(a,()=>c.current);const d=xe(),u=e.workWeekStart||Be.workWeekStart,m=e.workWeekEnd||Be.workWeekEnd,E=t.useMemo(()=>{const p=$t({workWeekStart:u,workWeekEnd:m}),C=[],x=jt(d,{timezone:l},s);return x.forEach(H=>{const V=Zt(H.range,{workDays:p,timezone:l},s);C.push.apply(C,V)}),r&&C[0]&&(r.current=C[0].range),[x,C]},[l,d.start.getTime(),d.end.getTime(),s,u,m]);return t.createElement(ye,{ref:g,slotWidth:n,slotLevels:E,timelineHeaderCell:o})}),Be={name:"week",dateRange:({intl:e,tasksStart:a,tasksEnd:n,timezone:r})=>{const o=w.ZonedDate.fromLocalDate(a,r),l=w.ZonedDate.fromLocalDate(n,r),s=Ut(w.firstDayInWeek(w.getDate(o),e.firstDay())),c=Pe(w.firstDayInWeek(w.getDate(l),e.firstDay()),Gt),g=w.ZonedDate.fromUTCDate(ie(s),r),f=w.ZonedDate.fromUTCDate(ie(c),r);return{start:new Date(g.getTime()),end:new Date(f.getTime()),zonedStart:g,zonedEnd:f}},title:e=>e.toLanguageString(vt,se[vt]),slotWidth:ke,workWeekStart:1,workWeekEnd:5,workDayStart:"08:00",workDayEnd:"17:00"};Te.defaultProps=Be,Te.propTypes={name:i.string,dateRange:i.oneOfType([i.func,i.object]),title:i.oneOfType([i.string,i.func]),slotWidth:i.number,workWeekStart:i.number,workWeekEnd:i.number,workDayStart:i.string,workDayEnd:i.string},Te.displayName="KendoReactGanttWeekView";const Ua=(e,a,n)=>{const[r,o]=t.useState(a||e),l=t.useCallback((s,c)=>{o(s),n&&n.call(void 0,{...c,value:s})},[n,o]);return[a!==void 0?a:r,l]},Wn=e=>{const[a,n]=Pt(),r=U.useLocalization(),o=t.useMemo(()=>typeof e.view.title=="function"?e.view.title.call(void 0,r):e.view.title,[e.view.title,r]),l=t.useCallback(()=>{e.view.name&&n(e.view.name)},[n,e.view.name]);return t.createElement(ae.Button,{role:"button",type:"button",tabIndex:-1,togglable:!0,selected:e.view.name===a,onClick:l},o)};Wn.displayName="KendoReactGanttViewSelectorItem";const _n=t.forwardRef(()=>{const e=Ma(),[a,n]=Pt(),r=e.find(s=>s.props.name===a),o=U.useLocalization(),l=t.useCallback(s=>{n&&(s.syntheticEvent.preventDefault(),n(s.item.name))},[n]);return t.createElement("div",{className:"k-gantt-views-wrapper"},t.createElement(ae.ButtonGroup,{className:"k-gantt-views"},e.map(s=>t.createElement(Wn,{key:s.props.name,view:s.props}))),r&&t.createElement(ae.DropDownButton,{className:"k-views-dropdown",onItemClick:l,popupSettings:{popupClass:"k-gantt-toolbar"},textField:"title",items:e.map(s=>({...s.props,selected:s.props.name===a,title:typeof s.props.title=="function"?s.props.title.call(void 0,o):s.props.title})),text:t.createElement(t.Fragment,null,typeof r.props.title=="function"?r.props.title.call(void 0,o):r.props.title,t.createElement(h.IconWrap,{name:"caret-alt-down",icon:Je.caretAltDownIcon}))}))});_n.displayName="KendoReactGanttViewSelectorList";const Kn=t.forwardRef((e,a)=>{const{className:n,...r}=e,o=t.useRef(null);return t.useImperativeHandle(a,()=>({element:o.current,props:e})),t.createElement(ae.ToolbarItem,{ref:l=>{l&&(o.current=l.element)},className:h.classNames("k-gantt-views",n),...r},e.children)});Kn.displayName="KendoReactGanttViewSelector";const Bn=t.forwardRef((e,a)=>{const{className:n,...r}=e,o=t.useRef(null),l=t.useRef(null);t.useImperativeHandle(l,()=>({element:o.current,props:e})),t.useImperativeHandle(a,()=>l.current);const s=t.useMemo(()=>h.classNames("k-gantt-toolbar k-gantt-header",n),[n]);return t.createElement(ae.Toolbar,{ref:c=>{c&&(o.current=c.element)},className:s,...r},e.children)});Bn.displayName="KendoReactGanttToolbar";const Un={name:"@progress/kendo-react-gantt",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},qn=t.forwardRef((e,a)=>{const n=U.useLocalization(),r=u=>n.toLanguageString(u,se[u]),o=r(zn),l=r(Hn),s=r(Mn),c=r(An),g=t.useCallback(u=>{u.syntheticEvent.preventDefault();const m=u.item&&u.item.direction?u.item.direction:"none";e.onClick&&e.onClick({nativeEvent:u.nativeEvent,syntheticEvent:u.syntheticEvent,direction:m})},[e.onClick]),f=t.useCallback(u=>{u.preventDefault(),e.onClick&&e.onClick({nativeEvent:u&&u.nativeEvent,syntheticEvent:u,direction:"none"})},[e.onClick]),d=t.createElement(t.Fragment,null,t.createElement(h.IconWrap,{name:"plus",icon:Je.plusIcon}),o);return e.selectedTask?t.createElement(ae.DropDownButton,{className:"k-views-dropdown",onItemClick:g,popupSettings:{popupClass:"k-gantt-toolbar"},textField:"title",items:[{title:l,direction:"child"},{title:s,direction:"above"},{title:c,direction:"below"}],text:d}):t.createElement(ae.Button,{onClick:f},d)});qn.displayName="KendoReactGanttAddButton";const Ue=t.forwardRef((e,a)=>{h.validatePackage(Un);const n=h.shouldShowValidationUI(Un),{columns:r=Re.columns,taskData:o=Re.taskData,dependencyData:l=Re.dependencyData,style:s,className:c,noRecords:g,timezone:f,rowHeight:d=Re.rowHeight,resizable:u,reorderable:m,sortable:E,sort:p,filter:C,columnMenuFilter:x,columnMenu:H,navigatable:V,toolbar:L,row:N,selectable:O}=e,ee=U.useInternationalization(),{fields:T}=t.useMemo(()=>Ea(e.taskModelFields),[e.taskModelFields]),{fields:J}=t.useMemo(()=>wa(e.dependencyModelFields),[e.dependencyModelFields]),A=t.useCallback(La(T.isExpanded,T.children),[T.isExpanded,T.children]),Q=t.useRef(null),G=t.useRef(null),$=t.useRef(null),D=t.useRef(null),M=t.useRef(null),te=t.useCallback(v=>{const ce=h.getter(T.start)(v),ue=h.getter(T.end)(v),ze=h.getter(T.isSelected)(v);(!G.current||ce<G.current)&&(G.current=ce),(!$.current||ue>$.current)&&($.current=ue),ze&&(D.current=v)},[T.start,T.end]),B=t.useMemo(()=>(G.current=null,$.current=null,D.current=null,de.flatData(o,A,te)),[o,A]);(!G.current||!$.current)&&(G.current=new Date(Ot),$.current=new Date(Ot));const k=t.Children.toArray(e.children||[t.createElement(Te,{key:"week",firstSlotRangeRef:M})]),[P,y]=Ua(e.defaultView||k[0].props.name,e.view,e.onViewChange),R=k.find(v=>v.props.name===P)||k[0],q=typeof R.props.dateRange=="function"?R.props.dateRange.call(void 0,{intl:ee,tasksStart:G.current,tasksEnd:$.current,timezone:f}):R.props.dateRange,j=t.useRef(null),[W,_]=t.useState(0);t.useLayoutEffect(()=>{j.current&&_(j.current.element.offsetHeight)},[]);const Ce=t.useCallback(v=>{Q.current&&Q.current.scrollIntoView(v)},[]),Ne=t.useRef(null),z=t.useRef(null);t.useImperativeHandle(z,()=>({props:e,element:Ne.current,scrollIntoView:Ce})),t.useImperativeHandle(a,()=>z.current);const ne=t.useCallback(v=>{e.onDataStateChange&&e.onDataStateChange.call(void 0,{...v,target:z.current})},[e.onDataStateChange]),Xe=t.useCallback(v=>{e.onSortChange&&e.onSortChange.call(void 0,{...v,target:z.current})},[e.onSortChange]),xt=t.useCallback(v=>{e.onKeyDown&&e.onKeyDown.call(void 0,{...v,target:z.current})},[e.onKeyDown]),Ee=t.useCallback(v=>{e.onSelectionChange&&e.onSelectionChange.call(void 0,{...v,target:z.current})},[e.onSelectionChange]),we=t.useCallback(v=>{e.onHeaderSelectionChange&&e.onHeaderSelectionChange.call(void 0,{...v,target:z.current})},[e.onHeaderSelectionChange]),pe=t.useCallback(v=>{e.onFilterChange&&e.onFilterChange.call(void 0,{...v,target:z.current})},[e.onFilterChange]),ve=t.useCallback(v=>{e.onColumnMenuFilterChange&&e.onColumnMenuFilterChange.call(void 0,{...v,target:z.current})},[e.onColumnMenuFilterChange]),he=t.useCallback(v=>{e.onExpandChange&&e.onExpandChange.call(void 0,{...v,target:z.current})},[e.onExpandChange]),Fe=t.useCallback(v=>{e.onAddClick&&e.onAddClick.call(void 0,{...v,target:z.current,selectedDataItem:D.current,slotStart:M.current&&new Date(M.current.start.getTime()),slotEnd:M.current&&new Date(M.current.end.getTime())})},[e.onAddClick]),me=t.useCallback(v=>{e.onColumnResize&&e.onColumnResize.call(void 0,{...v,target:z.current})},[e.onColumnResize]),Le=t.useCallback(v=>{e.onColumnReorder&&e.onColumnReorder.call(void 0,{...v,target:z.current})},[e.onColumnReorder]),yt=t.useCallback(v=>{e.onRowClick&&e.onRowClick.call(void 0,{...v,target:z.current})},[e.onRowClick]),Tt=t.useCallback(v=>{e.onRowDoubleClick&&e.onRowDoubleClick.call(void 0,{...v,target:z.current})},[e.onRowClick]),De=t.useCallback(v=>{e.onRowContextMenu&&e.onRowContextMenu.call(void 0,{...v,target:z.current})},[e.onRowClick]),Rt=t.useCallback(v=>{e.onTaskClick&&e.onTaskClick.call(void 0,{...v,target:z.current})},[e.onTaskClick]),Nt=t.useCallback(v=>{e.onTaskDoubleClick&&e.onTaskDoubleClick.call(void 0,{...v,target:z.current})},[e.onTaskDoubleClick]),Ft=t.useCallback(v=>{e.onTaskContextMenu&&e.onTaskContextMenu.call(void 0,{...v,target:z.current})},[e.onTaskContextMenu]),Lt=t.useCallback(v=>{e.onTaskRemoveClick&&e.onTaskRemoveClick.call(void 0,{...v,target:z.current})},[e.onTaskRemoveClick]),zt=t.useCallback(v=>{if(e.onDependencyCreate){let ce,ue;const ze=h.getter(T.id);for(let He=0;He<B.length;He++){const Ht=B[He],be=ze(Ht.dataItem);if(String(be)===v.fromId&&(ce=be),String(be)===v.toId&&(ue=be),ce&&ue)break}e.onDependencyCreate.call(void 0,{fromId:ce,toId:ue,target:z.current,type:v.type})}},[e.onDependencyCreate,T,B]);return t.createElement(tn,{dateRange:q,taskData:B,dependencyData:l,taskModelFields:T,dependencyModelFields:J,views:k,activeView:[P,y],rowHeight:d,toolbarHeight:W,props:{columns:r,noRecords:g,timezone:f,resizable:u,reorderable:m,sortable:E,sort:p,filter:C,columnMenuFilter:x,columnMenu:H,navigatable:V,row:N,selectable:O},events:{onDataStateChange:ne,onSortChange:Xe,onFilterChange:pe,onColumnMenuFilterChange:ve,onExpandChange:he,onRowClick:yt,onRowDoubleClick:Tt,onRowContextMenu:De,onColumnResize:me,onColumnReorder:Le,onDependencyCreate:e.onDependencyCreate&&zt,onKeyDown:xt,onSelectionChange:Ee,onHeaderSelectionChange:we},taskEvents:{onTaskClick:Rt,onTaskDoubleClick:Nt,onTaskContextMenu:Ft,onTaskRemoveClick:e.onTaskRemoveClick&&Lt}},t.createElement("div",{ref:Ne,role:"application",style:s,className:h.classNames("k-gantt",c)},t.createElement(Bn,{ref:j},L&&L.addTaskButton?t.createElement(qn,{selectedTask:D.current,onClick:Fe}):null,t.createElement(ae.ToolbarSpacer,null),t.createElement(Kn,null,t.createElement(_n,null))),R&&t.createElement(R.type,{key:R.props.name,ref:Q,...R.props,firstSlotRangeRef:M}),n&&t.createElement(h.WatermarkOverlay,null)))}),Re={taskData:[],dependencyData:[],columns:[],rowHeight:40};Ue.propTypes={taskData:i.array,taskModelFields:i.shape({id:i.string,start:i.string,end:i.string,title:i.string,percentComplete:i.string,isRollup:i.string,isExpanded:i.string,children:i.string,isInEdit:i.string}),dependencyData:i.array,dependencyModelFields:i.shape({id:i.string,fromId:i.string,toId:i.string,type:i.string}),columns:i.arrayOf(i.shape({width:i.number,cell:i.any,editCell:i.any,headerCell:i.any,filter:i.any,children:i.any,field:i.string,title:i.string,sortable:i.any,expandable:i.bool,headerSelectionValue:i.bool,format:i.string,headerClassName:i.string,className:i.string,resizable:i.bool,reorderable:i.bool,minResizableWidth:i.number,orderIndex:i.number,columnMenu:i.any})),sort:i.array,filter:i.array,columnMenuFilter:i.array,columnMenu:i.any,style:i.object,className:i.string,children:i.any,timezone:i.string,defaultView:i.string,view:i.string,rowHeight:i.number,navigatable:i.bool,onViewChange:i.func,onDataStateChange:i.func,onSortChange:i.func,onFilterChange:i.func,onExpandChange:i.func,onRowClick:i.func,onColumnResize:i.func,onColumnReorder:i.func},Ue.defaultProps=Re,Ue.displayName="KendoReactGantt";const qe=t.forwardRef((e,a)=>{const{slotWidth:n=fe.slotWidth,slotDuration:r=fe.slotDuration,firstSlotRangeRef:o,timelineHeaderCell:l}=e,{timezone:s}=Ie(),c=U.useInternationalization(),g=t.useRef(null),f=t.useRef(null),d=t.useCallback(H=>{f.current&&f.current.scrollIntoView(H)},[]);t.useImperativeHandle(g,()=>({scrollIntoView:d})),t.useImperativeHandle(a,()=>g.current);const u=xe(),m=e.workWeekStart||fe.workWeekStart,E=e.workWeekEnd||fe.workWeekEnd,p=e.workDayStart||fe.workDayStart,C=e.workDayEnd||fe.workDayEnd,x=t.useMemo(()=>{const H=$t({workWeekStart:m,workWeekEnd:E}),V=[],L=Zt(u,{workDays:H,timezone:s},c);return L.forEach(N=>{const O=ya(N.range,{workDayStart:p,workDayEnd:C,timezone:s,slotDuration:r},c);N.span=O.length,V.push.apply(V,O)}),o&&V[0]&&(o.current=V[0].range),[L,V]},[s,u.start.getTime(),u.end.getTime(),c,m,E,p,C]);return t.createElement(ye,{ref:f,slotWidth:n,slotLevels:x,timelineHeaderCell:l})}),fe={name:"day",dateRange:({tasksStart:e,tasksEnd:a,timezone:n})=>{const r=w.ZonedDate.fromLocalDate(e,n),o=w.ZonedDate.fromLocalDate(a,n),l=Ut(r),s=Pe(o),c=w.ZonedDate.fromUTCDate(ie(l),n),g=w.ZonedDate.fromUTCDate(ie(s),n);return{start:new Date(c.getTime()),end:new Date(g.getTime()),zonedStart:c,zonedEnd:g}},title:e=>e.toLanguageString(Dt,se[Dt]),slotWidth:ke,slotDuration:60,workWeekStart:1,workWeekEnd:5,workDayStart:"08:00",workDayEnd:"17:00"};qe.defaultProps=fe,qe.propTypes={name:i.string,dateRange:i.oneOfType([i.func,i.object]),title:i.oneOfType([i.string,i.func]),slotWidth:i.number,slotDuration:i.number,workWeekStart:i.number,workWeekEnd:i.number,workDayStart:i.string,workDayEnd:i.string},qe.displayName="KendoReactGanttDayView";const $e=t.forwardRef((e,a)=>{const{slotWidth:n=$n.slotWidth,firstSlotRangeRef:r,timelineHeaderCell:o}=e,{timezone:l}=Ie(),s=U.useInternationalization(),c=t.useRef(null),g=t.useRef(null),f=t.useCallback(m=>{g.current&&g.current.scrollIntoView(m)},[]);t.useImperativeHandle(c,()=>({scrollIntoView:f})),t.useImperativeHandle(a,()=>c.current);const d=xe(),u=t.useMemo(()=>{const m=[],E=Xt(d,{timezone:l},s);return E.forEach(p=>{const C=jt(p.range,{timezone:l},s);m.push.apply(m,C)}),r&&m[0]&&(r.current=m[0].range),[E,m]},[l,d.start.getTime(),d.end.getTime(),s]);return t.createElement(ye,{ref:g,slotWidth:n,slotLevels:u,timelineHeaderCell:o})}),$n={name:"month",dateRange:({tasksStart:e,tasksEnd:a,timezone:n})=>{const r=w.ZonedDate.fromLocalDate(e,n),o=w.ZonedDate.fromLocalDate(a,n),l=w.firstDayOfMonth(w.getDate(r)),s=w.addDays(w.lastDayOfMonth(w.getDate(o)),1),c=w.ZonedDate.fromUTCDate(ie(l),n),g=w.ZonedDate.fromUTCDate(ie(s),n);return{start:new Date(c.getTime()),end:new Date(g.getTime()),zonedStart:c,zonedEnd:g}},title:e=>e.toLanguageString(bt,se[bt]),slotWidth:ke,workWeekStart:1,workWeekEnd:5,workDayStart:"08:00",workDayEnd:"17:00"};$e.defaultProps=$n,$e.propTypes={name:i.string,dateRange:i.oneOfType([i.func,i.object]),title:i.oneOfType([i.string,i.func]),slotWidth:i.number,workWeekStart:i.number,workWeekEnd:i.number,workDayStart:i.string,workDayEnd:i.string},$e.displayName="GanttMonthView";const Ye=t.forwardRef((e,a)=>{const{slotWidth:n=Yn.slotWidth,firstSlotRangeRef:r,timelineHeaderCell:o}=e,{timezone:l}=Ie(),s=U.useInternationalization(),c=t.useRef(null),g=t.useRef(null),f=t.useCallback(m=>{g.current&&g.current.scrollIntoView(m)},[]);t.useImperativeHandle(c,()=>({scrollIntoView:f})),t.useImperativeHandle(a,()=>c.current);const d=xe(),u=t.useMemo(()=>{const m=Ta(d,{timezone:l},s),E=[];return m.forEach(p=>{const C=Xt(p.range,{timezone:l},s);E.push.apply(E,C)}),r&&E[0]&&(r.current=E[0].range),[m,E]},[l,d.start.getTime(),d.end.getTime(),s]);return t.createElement(ye,{slotWidth:n,slotLevels:u,timelineHeaderCell:o})}),Yn={name:"year",dateRange:({tasksStart:e,tasksEnd:a,timezone:n})=>{const r=w.ZonedDate.fromLocalDate(e,n),o=w.ZonedDate.fromLocalDate(a,n),l=w.firstDayOfMonth(w.firstMonthOfYear(w.getDate(r))),s=w.addDays(w.lastDayOfMonth(w.lastMonthOfYear(w.getDate(o))),1),c=w.ZonedDate.fromUTCDate(ie(l),n),g=w.ZonedDate.fromUTCDate(ie(s),n);return{start:new Date(c.getTime()),end:new Date(g.getTime()),zonedStart:c,zonedEnd:g}},title:e=>e.toLanguageString(St,se[St]),slotWidth:ke};Ye.defaultProps=Yn,Ye.propTypes={name:i.string,dateRange:i.oneOfType([i.func,i.object]),title:i.oneOfType([i.string,i.func]),slotWidth:i.number},Ye.displayName="GanttYearView";const qa=[{text:dn,operator:"contains"},{text:un,operator:"doesnotcontain"},{text:Ge,operator:"eq"},{text:We,operator:"neq"},{text:cn,operator:"startswith"},{text:gn,operator:"endswith"},{text:_e,operator:"isnull"},{text:Ke,operator:"isnotnull"},{text:on,operator:"isempty"},{text:ln,operator:"isnotempty"}],$a=[{text:Ge,operator:"eq"},{text:We,operator:"neq"},{text:fn,operator:"gte"},{text:hn,operator:"gt"},{text:mn,operator:"lte"},{text:Cn,operator:"lt"},{text:_e,operator:"isnull"},{text:Ke,operator:"isnotnull"}],Ya=[{text:Ge,operator:"eq"},{text:We,operator:"neq"},{text:vn,operator:"gte"},{text:Dn,operator:"gt"},{text:bn,operator:"lt"},{text:Sn,operator:"lte"},{text:_e,operator:"isnull"},{text:Ke,operator:"isnotnull"}],Za=[{text:pn,operator:""},{text:En,operator:!0},{text:wn,operator:!1}];function Ze(e,a){return{clearButtonTitle:e.toLanguageString(kt,se[kt]),operators:a.map(n=>({text:e.toLanguageString(n.text,se[n.text]),operator:n.operator}))}}const Zn=e=>{const{operators:a,...n}=e;return t.createElement(S.TextFilterCell,{ariaLabel:"text filter",...Ze(U.useLocalization(),a||qa),...n})};Zn.displayName="KendoReactGanttTextFilter";const jn=e=>{const{operators:a,...n}=e;return t.createElement(S.NumericFilterCell,{ariaLabel:"numeric filter",...Ze(U.useLocalization(),a||$a),...n})};jn.displayName="KendoReactGanttNumericFilter";const Xn=e=>{const{operators:a,...n}=e;return t.createElement(S.BooleanFilterCell,{ariaLabel:"boolean filter",...Ze(U.useLocalization(),a||Za),...n})};Xn.displayName="KendoReactGanttBooleanFilter";const Jn=e=>{const{operators:a,...n}=e;return t.createElement(S.DateFilterCell,{ariaLabel:"date filter",...Ze(U.useLocalization(),a||Ya),...n})};Jn.displayName="KendoReactGanttDateFilter";const ja=e=>{const{dependencyData:a,dependencyModelFields:n,defaultDataItem:r,fromId:o,toId:l,type:s}=e,c=a.map(m=>({...m})),g=h.setter(n.fromId),f=h.setter(n.toId),d=h.setter(n.type),u=r?{...r}:{};return g(u,o),f(u,l),d(u,s),c.push(u),c},Xa=e=>{const{defaultDataItem:a,selectedDataItem:n,direction:r,taskModelFields:o,dataTree:l,slotStart:s,slotEnd:c}=e,g=Oe(l,o.children,C=>({...C})),f=h.setter(o.start),d=h.setter(o.end),u=h.getter(o.start),m=h.getter(o.end),E=a?{...a}:{},p=u(E)&&m(E);if(!n||r==="none")p||(f(E,s),d(E,c)),g.unshift(E);else{const C=[{task:{[o.children]:g},childrenIndex:0}],x=h.getter(o.id),H=h.getter(o.children),V=h.setter(o.children),L=x(n);for(;C.length>0;){const N=C[C.length-1],O=N.task,ee=x(O),T=H(O);if(ee&&ee===L)break;T&&T.length&&T.length>N.childrenIndex?(C.push({task:T[N.childrenIndex],childrenIndex:0}),N.childrenIndex++):C.pop()}if(C.length>1){const N=C[C.length-1].task,O=C[C.length-2].childrenIndex,T=C[C.length-2].task,J=H(T);switch(r){case"child":{let A=H(N);A||(A=[],V(N,A)),p||(f(E,new Date(u(N).getTime())),d(E,new Date(m(N).getTime()))),A.push(E),je(C.splice(1,C.length-1).map(Q=>Q.task),o);break}case"above":{u(T)&&m(T)&&!p?(f(E,new Date(u(N).getTime())),d(E,new Date(m(N).getTime()))):(f(E,s),d(E,c)),J.splice(O-1,0,E),je(C.splice(1,C.length-2).map(A=>A.task),o);break}case"below":{u(T)&&m(T)&&!p?(f(E,new Date(u(N).getTime())),d(E,new Date(m(N).getTime()))):(f(E,s),d(E,c)),J.splice(O,0,E),je(C.splice(1,C.length-2).map(A=>A.task),o);break}}}}return g},Ja=e=>{const{updatedDataItem:a,taskModelFields:n,dataTree:r}=e,o=h.getter(n.id),l=h.getter(n.children),s=o(a);let c;const g=Oe(r,n.children,d=>o(d)===s?(c=d,{...a}):{...d});let f=[{task:{[n.children]:g},childrenIndex:0}];for(;f.length>0;){const d=f[f.length-1],u=d.task,m=o(u),E=l(u);if(m&&m===s)break;E&&E.length&&E.length>d.childrenIndex?(f.push({task:E[d.childrenIndex],childrenIndex:0}),d.childrenIndex++):f.pop()}if(f.length>1){f=f.splice(1,f.length-2);const d=h.getter(n.start),u=h.getter(n.end),m=h.getter(n.percentComplete);if(d(c).getTime()!==d(a).getTime()){Qn(f.map(p=>p.task),n);const E=d(a).getTime()-d(c).getTime();Pa(l(a),n,E)}u(c).getTime()!==u(a).getTime()&&Pn(f.map(E=>E.task),n),m(c)!==m(a)&&ea(f.map(E=>E.task),n)}return g},Qa=e=>{const{removedDataItem:a,taskModelFields:n,dataTree:r}=e,o=Oe(r,n.children,f=>({...f}));let l=[{task:{[n.children]:o},childrenIndex:0}];const s=h.getter(n.id),c=h.getter(n.children),g=s(a);for(;l.length>0;){const f=l[l.length-1],d=f.task,u=s(d),m=c(d);if(u&&u===g)break;m&&m.length&&m.length>f.childrenIndex?(l.push({task:m[f.childrenIndex],childrenIndex:0}),f.childrenIndex++):l.pop()}if(l.length>1){const f=l[l.length-2],d=f.task;c(d).splice(f.childrenIndex-1,1),l=l.splice(1,l.length-2),je(l.map(m=>m.task),n)}return o},je=(e,a)=>{Qn(e,a),Pn(e,a),ea(e,a)},Qn=(e,a)=>{if(!e.length)return;const n=h.getter(a.children),r=h.getter(a.start),o=h.setter(a.start);for(let l=e.length-1;l>=0;l--){const s=e[l],c=n(s);if(c&&c.length){const g=c.reduce((f,d)=>Math.min(f,r(d).getTime()),r(c[0]).getTime());o(s,new Date(g))}}},Pn=(e,a)=>{if(!e.length)return;const n=h.getter(a.children),r=h.getter(a.end),o=h.setter(a.end);for(let l=e.length-1;l>=0;l--){const s=e[l],c=n(s);if(c&&c.length){const g=c.reduce((f,d)=>Math.max(f,r(d).getTime()),r(c[0]).getTime());o(s,new Date(g))}}},ea=(e,a)=>{if(!e.length)return;const n=h.getter(a.children),r=h.getter(a.percentComplete),o=h.setter(a.percentComplete),l=({avg:s,n:c},g)=>({avg:((r(g)||0)+c*s)/(c+1),n:c+1});for(let s=e.length-1;s>=0;s--){const c=e[s],g=n(c);if(g&&g.length){const f=g.reduce(l,{avg:0,n:0}).avg;o(c,f)}}},Pa=(e,a,n)=>{if(!e)return;const r=h.getter(a.children),o=h.getter(a.start),l=h.setter(a.start),s=h.getter(a.end),c=h.setter(a.end),g=e.map(f=>({task:f,childrenIndex:0}));for(;g.length>0;){const f=g[g.length-1],d=f.task,u=r(d);u&&u.length&&u.length>f.childrenIndex?(g.push({task:u[f.childrenIndex],childrenIndex:0}),f.childrenIndex++):(g.pop(),l(d,new Date(o(d).getTime()+n)),c(d,new Date(s(d).getTime()+n)))}},er=e=>{const{validationMessage:a,touched:n,label:r,id:o,valid:l,disabled:s,hint:c,type:g,optional:f,...d}=e,u=n&&a,m=!u&&c,E=m?`${o}_hint`:"",p=u?`${o}_error`:"";return t.createElement(oe.FieldWrapper,null,t.createElement(le.Label,{editorId:o,editorValid:l,editorDisabled:s,optional:f},r),t.createElement("div",{className:"k-form-field-wrap"},t.createElement(Mt.Input,{valid:l,type:g,id:o,disabled:s,ariaDescribedBy:`${E} ${p}`,...d}),m&&t.createElement(le.Hint,{id:E},c),u&&t.createElement(le.Error,{id:p},a)))},ta=e=>{const{validationMessage:a,touched:n,label:r,id:o,valid:l,disabled:s,hint:c,wrapperStyle:g,...f}=e,d=n&&a,u=!d&&c,m=u?`${o}_hint`:"",E=d?`${o}_error`:"",p=r?`${o}_label`:"";return t.createElement(oe.FieldWrapper,{style:g},t.createElement(le.Label,{id:p,editorId:o,editorValid:l,editorDisabled:s},r),t.createElement("div",{className:"k-form-field-wrap"},t.createElement(aa.DateTimePicker,{ariaLabelledBy:p,ariaDescribedBy:`${m} ${E}`,valid:l,id:o,disabled:s,...f}),u&&t.createElement(le.Hint,{id:m},c),d&&t.createElement(le.Error,{id:E},a)))},tr=e=>{const{validationMessage:a,touched:n,label:r,id:o,valid:l,disabled:s,hint:c,...g}=e,f=n&&a,d=!f&&c,u=d?`${o}_hint`:"",m=f?`${o}_error`:"";return t.createElement(oe.FieldWrapper,null,t.createElement(le.Label,{editorId:o,editorValid:l,editorDisabled:s},r),t.createElement("div",{className:"k-form-field-wrap"},t.createElement(Mt.NumericTextBox,{ariaDescribedBy:`${u} ${m}`,valid:l,id:o,disabled:s,...g}),d&&t.createElement(le.Hint,{id:u},c),f&&t.createElement(le.Error,{id:m},a)))},nr=()=>{const e=st(),a=U.useLocalization(),n=C=>a.toLanguageString(C,se[C]),r=n(xn),o=n(yn),l=n(Tn),s=n(Rn),c=n(Nn),g=n(Fn),f=n(Ln),d=t.useCallback(C=>C||C===0?void 0:c,[c]),u=t.useCallback((C,x)=>C&&x(e.end)&&C.getTime()>x(e.end).getTime()?g:void 0,[e,g]),m=t.useCallback((C,x)=>C&&x(e.start)&&C.getTime()<x(e.start).getTime()?f:void 0,[e,f]),E=t.useMemo(()=>[d,u],[d,u]),p=t.useMemo(()=>[d,m],[d,m]);return t.createElement(oe.FormElement,{style:{width:400},horizontal:!0},t.createElement(oe.Field,{id:`${e.title}_gantteditor`,name:e.title,label:r,component:er,validator:d}),t.createElement(oe.Field,{id:`${e.start}_gantteditor`,name:e.start,label:o,component:ta,validator:E}),t.createElement(oe.Field,{id:`${e.end}_gantteditor`,name:e.end,label:l,component:ta,validator:p}),t.createElement(oe.Field,{id:`${e.percentComplete}_gantteditor`,name:e.percentComplete,format:"p",label:s,component:tr,step:.01,validator:d}))},ar=e=>{const{onCancel:a,onClose:n,onSubmit:r,...o}=e,l=U.useLocalization(),s=p=>l.toLanguageString(p,se[p]),c=s(kn),g=s(It),f=s(In),d=t.useCallback(p=>{if(a){const C={syntheticEvent:p,nativeEvent:p.nativeEvent,dataItem:e.dataItem};a.call(void 0,C)}},[a,e.dataItem]),u=t.useCallback(({syntheticEvent:p})=>{if(n){const C={syntheticEvent:p,nativeEvent:p.nativeEvent,dataItem:e.dataItem};n.call(void 0,C)}},[n,e.dataItem]),m=t.useCallback((p,C)=>{if(r){const x={dataItem:p,syntheticEvent:C,nativeEvent:C&&C.nativeEvent};r.call(void 0,x)}},[r]),E=t.createElement(oe.Form,{initialValues:e.dataItem,onSubmit:m,render:p=>t.createElement(Me.Dialog,{title:f,minWidth:600,onClose:u,style:{zIndex:90}},t.createElement(nr,null),t.createElement(Me.DialogActionsBar,null,t.createElement(ae.Button,{disabled:!p.allowSubmit,onClick:p.onSubmit},c),t.createElement(ae.Button,{onClick:d},g))),...o});return h.canUseDOM?Vt.createPortal(E,document&&document.body):null},rr=e=>{const{onClose:a,onCancel:n,onConfirm:r,dataItem:o}=e,l=U.useLocalization(),s=C=>l.toLanguageString(C,se[C]),c=s(Vn),g=s(It),f=s(On),d=s(Gn),u=t.useCallback(({syntheticEvent:C})=>{a&&a.call(void 0,{syntheticEvent:C,nativeEvent:C&&C.nativeEvent,dataItem:null})},[a]),m=t.useCallback(C=>{n&&n.call(void 0,{syntheticEvent:C,nativeEvent:C&&C.nativeEvent,dataItem:null})},[n]),E=t.useCallback(C=>{r&&r.call(void 0,{syntheticEvent:C,nativeEvent:C&&C.nativeEvent,dataItem:o})},[r,o]),p=t.createElement(Me.Dialog,{title:d,onClose:u},f,t.createElement(Me.DialogActionsBar,null,t.createElement("button",{className:"k-button",onClick:m},g),t.createElement("button",{className:"k-button",onClick:E},c)));return h.canUseDOM?Vt.createPortal(p,document&&document.body):null},sr=de.TreeListRow;Object.defineProperty(b,"getSelectedState",{enumerable:!0,get:()=>S.getSelectedState}),Object.defineProperty(b,"getSelectedStateFromKeyDown",{enumerable:!0,get:()=>S.getSelectedStateFromKeyDown}),Object.defineProperty(b,"setSelectedState",{enumerable:!0,get:()=>S.setSelectedState}),b.GANTT_COL_INDEX_ATTRIBUTE=sa,b.GANTT_PREVENT_SELECTION_ELEMENT=oa,b.GANTT_ROW_INDEX_ATTRIBUTE=ra,b.Gantt=Ue,b.GanttBooleanFilter=Xn,b.GanttDateFilter=Jn,b.GanttDayView=qe,b.GanttForm=ar,b.GanttMonthView=$e,b.GanttNumericFilter=jn,b.GanttRemoveDialog=rr,b.GanttRow=sr,b.GanttTextFilter=Zn,b.GanttWeekView=Te,b.GanttYearView=Ye,b.addDependency=ja,b.addTask=Xa,b.createDataTree=Ca,b.extendDataItem=ma,b.filterBy=ha,b.mapTree=Oe,b.orderBy=fa,b.removeTask=Qa,b.updateTask=Ja,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
5
+ (function(b,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-date-math"),require("@progress/kendo-react-data-tools"),require("@progress/kendo-react-treelist"),require("@progress/kendo-react-intl"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-buttons"),require("react-dom"),require("@progress/kendo-react-form"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-layout"),require("@progress/kendo-react-dateinputs"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-react-grid"),require("@progress/kendo-data-query")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-date-math","@progress/kendo-react-data-tools","@progress/kendo-react-treelist","@progress/kendo-react-intl","@progress/kendo-svg-icons","@progress/kendo-react-buttons","react-dom","@progress/kendo-react-form","@progress/kendo-react-dialogs","@progress/kendo-react-labels","@progress/kendo-react-inputs","@progress/kendo-react-layout","@progress/kendo-react-dateinputs","@progress/kendo-react-dropdowns","@progress/kendo-react-grid","@progress/kendo-data-query"],Fe):(b=typeof globalThis!="undefined"?globalThis:b||self,Fe(b.KendoReactGantt={},b.React,b.PropTypes,b.KendoReactCommon,b.KendoDateMath,b.KendoReactDataTools,b.KendoReactTreelist,b.KendoReactIntl,b.KendoSvgIcons,b.KendoReactButtons,b.ReactDOM,b.KendoReactForm,b.KendoReactDialogs,b.KendoReactLabels,b.KendoReactInputs,b.KendoReactLayout,b.KendoReactDateinputs,b.KendoReactDropdowns,b.KendoReactGrid,b.KendoDataQuery))})(this,function(b,Fe,u,f,v,x,he,J,Ce,te,ba,ne,Ke,de,Yt,Be,ya,X,pe,$e){"use strict";"use client";function Zt(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,l.get?l:{enumerable:!0,get:()=>e[n]})}}return a.default=e,Object.freeze(a)}const t=Zt(Fe),Xt=Zt(ba),Ia=x.TABLE_ROW_INDEX_ATTRIBUTE,ka=x.TABLE_COL_INDEX_ATTRIBUTE,xa=x.TABLE_PREVENT_SELECTION_ELEMENT,jt=new Date().getTime(),Jt=7,Ta="hh:mm a",lt={skeleton:"MEd"},Na="MMM",Fa="yyyy",Me=100,Ma=6,qe="data-dependency-drag-handle",La="start",Ra="finish",Qt={[qe]:La},Pt={[qe]:Ra},Ue="data-task-id",en={id:"id",start:"start",end:"end",title:"title",percentComplete:"percentComplete",parentId:"parentId",isRollup:"isRollup",isExpanded:"isExpanded",isInEdit:"isInEdit",children:"children",isSelected:"isSelected"},tn={id:"id",fromId:"fromId",toId:"toId",type:"type"},Va=x.orderBy,Aa=x.filterBy,Le=f.mapTree,za=f.extendDataItem,Ha=he.createDataTree,Ga=e=>({fields:{...en,...e}}),Oa=e=>({fields:{...tn,...e}}),nn=e=>v.getDate(e),st=(e,a)=>v.getDate(v.addDays(e,a||1)),Wa=(e,a,n,l)=>n<a&&e<=l;function Ee(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}const fe=4,ot=10,_a=(e,a,n,l)=>{const s=[];let r=0,o=0;const i=ot,m=Math.floor(n/2),d=e.top<a.top,g=()=>s.push({left:o,top:r});if(l===0||l===3){const c=l===3?"start":"end";r=e.top,o=e[c],g(),o=Math[c==="start"?"min":"max"](e[c],a[c]),o=c==="start"?o-i:o+i,g(),r=a.top,g(),o=c==="start"?a[c]-fe:a[c]+fe,g(),an(r,o,s,c!=="start")}else{const c=l===2?"start":"end",h=l===2?"end":"start",D=l===2?e[c]-ot*2>=a[h]:e[c]+ot*2<=a[h];r=e.top,o=e[c],g(),o=c==="start"?o-i:o+i,g(),D||(r=d?r+m:r-m,g(),o=c==="start"?a[h]+i:a[h]-i,g()),r=a.top,g(),o=h==="start"?a[h]-fe:a[h]+fe,g(),an(r,o,s,h!=="start")}return s},an=(e,a,n,l)=>l?Ka(e,a,n):Ba(e,a,n),Ka=(e,a,n)=>{n.push({top:e-fe/2,left:a}),n.push({top:e,left:a-fe+1}),n.push({top:e+fe/2,left:a}),n.push({top:e,left:a})},Ba=(e,a,n)=>{n.push({top:e+fe/2,left:a}),n.push({top:e,left:a+fe-1}),n.push({top:e-fe/2,left:a}),n.push({top:e,left:a})},rn=e=>{if(e.workWeekStart===void 0||e.workWeekEnd===void 0)return[];const a=[];let n=e.workWeekStart;for(a.push(n);e.workWeekEnd!==n;)n>6?n-=7:n++,a.push(n);return a},$a=(e,a)=>{const n=e.getDay();return a.indexOf(n)>-1},ln=(e,{step:a,timezone:n})=>{const l=[],s=v.ZonedDate.fromLocalDate(e.start,n),r=v.ZonedDate.fromLocalDate(e.end,n);let o=s.clone();for(;o.getTime()<r.getTime();){const i=o.clone(),m=i.clone().addTime(a),d=new Date(i.getTime()),c={end:new Date(m.getTime()),start:d,zonedStart:i,zonedEnd:m};l.push(c),o=o.addTime(a)}return l},qa=(e,{timezone:a},n)=>{const l=[],s=v.ZonedDate.fromLocalDate(e.start,a),r=v.ZonedDate.fromLocalDate(e.end,a);for(let o=s.clone(),i=0;o.getTime()<r.getTime();i++){const m=o.clone(),d=st(v.firstDayInWeek(v.getDate(m),n.firstDay()),Jt),g=v.ZonedDate.fromUTCDate(Ee(d),a),c=g.getTime()>r.getTime()?r.clone():g;o=c.clone();const h=new Date(m.getTime()),C={end:new Date(c.getTime()),start:h,zonedStart:m,zonedEnd:c};l.push(C)}return l},Ua=(e,{timezone:a})=>{const n=[],l=v.ZonedDate.fromLocalDate(e.start,a),s=v.ZonedDate.fromLocalDate(e.end,a);for(let r=l.clone(),o=0;r.getTime()<s.getTime();o++){const i=r.clone(),m=v.ZonedDate.fromLocalDate(v.addMonths(new Date(i.getTime()),1),a);r=m.clone();const d=new Date(i.getTime()),c={end:new Date(m.getTime()),start:d,zonedStart:i,zonedEnd:m};n.push(c)}return n},Ya=(e,{timezone:a})=>{const n=[],l=v.ZonedDate.fromLocalDate(e.start,a),s=v.ZonedDate.fromLocalDate(e.end,a);for(let r=l.clone(),o=0;r.getTime()<s.getTime();o++){const i=r.clone(),m=v.ZonedDate.fromLocalDate(v.addMonths(new Date(i.getTime()),12),a);r=m.clone();const d=new Date(i.getTime()),c={end:new Date(m.getTime()),start:d,zonedStart:i,zonedEnd:m};n.push(c)}return n},Za=(e,a,n)=>{const l=n.parseDate(a.workDayStart).getHours(),s=n.parseDate(a.workDayEnd).getHours();return ln(e,{step:v.MS_PER_MINUTE*a.slotDuration,timezone:a.timezone}).map(o=>{const i=o.zonedStart.getHours();return{range:o,isWork:i>=l&&i<s,span:1,text:n.formatDate(o.zonedStart,Ta),type:"time"}})},sn=(e,a,n)=>ln(e,{step:v.MS_PER_DAY,timezone:a.timezone}).map(s=>({range:s,isWork:$a(s.start,a.workDays),span:1,text:n.formatDate(s.zonedStart,lt),type:"day"})),on=(e,a,n)=>qa(e,{timezone:a.timezone},n).map(s=>{const r=Math.round((s.zonedEnd.getTime()-s.zonedStart.getTime())/v.MS_PER_DAY);return{range:s,isWork:!1,span:r,text:`${n.formatDate(s.zonedStart,lt)} - ${n.formatDate(s.zonedEnd,lt)}`,type:"week"}}),cn=(e,a,n)=>Ua(e,{timezone:a.timezone}).map(s=>{const r=Math.round((s.zonedEnd.getTime()-s.zonedStart.getTime())/v.MS_PER_DAY);return{range:s,isWork:!1,span:r,text:n.formatDate(s.zonedStart,Na),type:"month"}}),Xa=(e,a,n)=>Ya(e,{timezone:a.timezone}).map(s=>{const r=Math.round((s.zonedEnd.getTime()-s.zonedStart.getTime())/v.MS_PER_DAY);return{range:s,isWork:!1,span:r,text:n.formatDate(s.zonedStart,Fa),type:"year"}}),ja=(e,a,n)=>{const l=n;return t.createElement("table",{className:"k-table k-table-md",ref:a,"aria-hidden":!0},t.createElement("tbody",{className:"k-table-tbody"},e.map((s,r)=>t.createElement("tr",{className:"k-table-row",key:r},s.map((o,i)=>t.createElement("td",{key:o.range.start.getTime(),colSpan:o.span,className:f.classNames("k-table-th",{"k-header":!0,"k-nonwork-hour":!o.isWork})},l?t.createElement(l,{rowIndex:r,index:i,range:o.range,text:o.text,isWork:o.isWork,type:o.type}):o.text))))))},Ja=(e,a)=>{const n=e[e.length-1];return t.createElement("table",{className:"k-table k-table-md k-gantt-columns",ref:a,"aria-hidden":!0},t.createElement("tbody",{className:"k-table-tbody"},t.createElement("tr",{className:"k-table-row"},n.map(l=>t.createElement("td",{key:l.range.start.getTime(),colSpan:l.span,className:f.classNames("k-table-td",{"k-nonwork-hour":!l.isWork})})))))},Qa=(e,a)=>{const n=e[e.length-1];let l=0,s=0;return n.forEach(r=>{const o=r.span;s+=o,o>l&&(l=o)}),Math.round(s*a/l)},it=(e,a)=>!!f.getter(a)(e),dn=(e,a)=>!!f.getter(a)(e),Pa=(e,a)=>n=>it(n,e)&&dn(n,a)?[...f.getter(a)(n)]:[],ct=t.createContext([]),er=()=>t.useContext(ct);ct.displayName="KendoReactGanttTaskDataContext";const dt=t.createContext([]),tr=()=>t.useContext(dt);dt.displayName="KendoReactGanttDependencyDataContext";const ut=t.createContext(en),gt=()=>t.useContext(ut);ut.displayName="KendoReactGanttTaskModelFieldsContext";const mt=t.createContext(tn),un=()=>t.useContext(mt);mt.displayName="KendoReactGanttDependencyModelFieldsContext";const ft=t.createContext({}),Re=()=>t.useContext(ft);ft.displayName="KendoReactGanttPropsContext";const ht=t.createContext({start:new Date,end:new Date,zonedStart:v.ZonedDate.fromLocalDate(new Date),zonedEnd:v.ZonedDate.fromLocalDate(new Date)}),Ve=()=>t.useContext(ht);ht.displayName="KendoReactGanttDateRangeContext";const Ct=t.createContext([]),nr=()=>t.useContext(Ct);Ct.displayName="KendoReactGanttViewsContext";const Et=t.createContext(["week",f.noop]),gn=()=>t.useContext(Et);Et.displayName="KendoReactGanttActiveViewContext";const Dt=t.createContext(0),mn=()=>t.useContext(Dt);Dt.displayName="KendoReactGanttRowHeightContext";const pt=t.createContext(0),ar=()=>t.useContext(pt);pt.displayName="KendoReactGanttToolbarHeightContext";const vt=t.createContext({onDataStateChange:f.noop,onSortChange:f.noop,onFilterChange:f.noop,onColumnMenuFilterChange:f.noop,onExpandChange:f.noop,onRowClick:f.noop,onRowDoubleClick:f.noop,onRowContextMenu:f.noop,onColumnResize:f.noop,onColumnReorder:f.noop,onDependencyCreate:f.noop,onKeyDown:f.noop,onSelectionChange:f.noop,onHeaderSelectionChange:f.noop}),rr=()=>t.useContext(vt);vt.displayName="KendoReactGanttEventsContext";const wt=t.createContext({onTaskClick:f.noop,onTaskDoubleClick:f.noop,onTaskContextMenu:f.noop}),lr=()=>t.useContext(wt);wt.displayName="KendoReactGanttTaskEventsContext";const fn=({children:e,taskData:a,dependencyData:n,taskModelFields:l,dependencyModelFields:s,props:r,dateRange:o,views:i,activeView:m,rowHeight:d,toolbarHeight:g,events:c,taskEvents:h})=>t.createElement(ft.Provider,{value:r},t.createElement(ct.Provider,{value:a},t.createElement(dt.Provider,{value:n},t.createElement(ut.Provider,{value:l},t.createElement(mt.Provider,{value:s},t.createElement(ht.Provider,{value:o},t.createElement(Ct.Provider,{value:i},t.createElement(Et.Provider,{value:m},t.createElement(Dt.Provider,{value:d},t.createElement(pt.Provider,{value:g},t.createElement(vt.Provider,{value:c},t.createElement(wt.Provider,{value:h},e))))))))))));fn.displayName="KendoReactGanttContext";const St=t.createContext([{current:{}},f.noop]),hn=()=>t.useContext(St);St.displayName="KendoReactGanttViewContext";const bt=t.createContext(0),sr=()=>t.useContext(bt);bt.displayName="KendoReactGanttViewTimelineWidthContext";const yt=t.createContext({onDependencyHandlePress:f.noop,onDependencyHandleDrag:f.noop,onDependencyHandleRelease:f.noop,isEnabled:!1,draggedId:null}),or=()=>t.useContext(yt);yt.displayName="KendoReactGanttViewDependencyDragContext";const Cn=({children:e,tasksStore:a,timelineWidth:n,dependencyDrag:l})=>t.createElement(St.Provider,{value:a},t.createElement(bt.Provider,{value:n},t.createElement(yt.Provider,{value:l},e)));Cn.displayName="KendoReactGanttViewContext";var It=(e=>(e[e.add=0]="add",e[e.remove=1]="remove",e))(It||{});const ir=()=>{const e=t.useRef({}),a=t.useCallback(n=>{switch(n.type){case 0:e.current[n.id]=n.itemRef;break;case 1:delete e.current[n.id];break}},[]);return[e,a]},cr=(e,a,n,l)=>{const s=t.useRef(null),[,r]=hn();t.useImperativeHandle(s,()=>({element:l.current,dataItem:e})),t.useImperativeHandle(n,()=>s.current),t.useLayoutEffect(()=>{const o=s.current;if(o)return r({type:It.add,itemRef:o,id:a}),()=>{r({type:It.remove,itemRef:o,id:a})}})},En=t.forwardRef((e,a)=>{const n=Ve(),l=gt(),s=sr(),r=or(),o=lr(),i=t.useRef(null),m=t.useRef(null);cr(e.dataItem,f.getter(l.id)(e.dataItem),a,i);const d=t.useRef(null),g=f.getter(l.id)(e.dataItem),c=f.getter(l.start)(e.dataItem),h=f.getter(l.end)(e.dataItem),D=f.getter(l.title)(e.dataItem),C=f.getter(l.percentComplete)(e.dataItem),p=f.getter(l.children)(e.dataItem),y=f.getter(l.isSelected)(e.dataItem),R=c&&c.getTime(),z=h&&h.getTime(),L=p&&p.length,_=!L&&R===z,N=R&&z&&Wa(n.start,n.end,c,h),[A,I]=t.useState(!1),k=t.useRef(null),U=t.useRef(null);f.useDraggable(k,{onPress:r.onDependencyHandlePress,onDrag:r.onDependencyHandleDrag,onRelease:r.onDependencyHandleRelease}),f.useDraggable(U,{onPress:r.onDependencyHandlePress,onDrag:r.onDependencyHandleDrag,onRelease:r.onDependencyHandleRelease});const K=t.useCallback(T=>{o.onTaskClick&&o.onTaskClick({dataItem:e.dataItem,level:e.level,nativeEvent:T&&T.nativeEvent,syntheticEvent:T,target:null})},[e.dataItem,e.level]),B=t.useCallback(T=>{o.onTaskDoubleClick&&o.onTaskDoubleClick({dataItem:e.dataItem,level:e.level,nativeEvent:T&&T.nativeEvent,syntheticEvent:T,target:null})},[e.dataItem,e.level]),Q=t.useCallback(T=>{o.onTaskContextMenu&&o.onTaskContextMenu({dataItem:e.dataItem,level:e.level,nativeEvent:T&&T.nativeEvent,syntheticEvent:T,target:null})},[e.dataItem,e.level]),w=t.useCallback(T=>{o.onTaskRemoveClick&&o.onTaskRemoveClick({dataItem:e.dataItem,level:e.level,nativeEvent:T&&T.nativeEvent,syntheticEvent:T,target:null})},[e.dataItem,e.level]),W=t.useCallback(()=>{const T=n.start,ae=n.end,F=d.current,V=i.current,P=m.current;if(!N||F===null||V===null)return;const re=F.clientWidth/(ae.getTime()-T.getTime()),$=(c.getTime()-T.getTime())*re,Z=(h.getTime()-c.getTime())*re,ve=(F.offsetHeight-V.offsetHeight)/2;V.style.left=`${Math.round(_?$-Ma:$)}px`,V.style.top=`${Math.round(ve)}px`,_||(V.style.width=`${Math.round(Z)}px`,P!==null&&(P.style.width=`${Math.round(Z*(C||0))}px`)),I(!0)},[n.start.getTime(),n.end.getTime(),R,z,N,C,s]);t.useEffect(W,[W]);const j={visibility:A?void 0:"hidden",display:N?void 0:"none"},Y={userSelect:"none",display:r.draggedId===String(g)?"block":void 0};return t.createElement("td",{ref:d,key:g,role:"presentation"},_?t.createElement("div",{"aria-hidden":!0,className:f.classNames({"k-task":!0,"k-task-milestone":!0,"k-selected":y&&!Array.isArray(y)}),style:j,ref:i,[Ue]:g,onClick:K,onDoubleClick:B,onContextMenu:Q},t.createElement("div",{className:"k-task-milestone-content"}),r.isEnabled&&t.createElement("div",{className:"k-task-dot k-task-start",ref:k,style:Y,...Qt}),r.isEnabled&&t.createElement("div",{className:"k-task-dot k-task-end",ref:U,style:Y,...Pt})):t.createElement("div",{"aria-hidden":!0,className:f.classNames({"k-task":!0,"k-task-summary":L,"k-task-single":!L,"k-selected":y&&!Array.isArray(y)}),ref:i,style:j,[Ue]:g,onClick:K,onDoubleClick:B,onContextMenu:Q},L?t.createElement("div",{className:"k-task-summary-progress",ref:m},t.createElement("div",{className:"k-task-summary-complete"})):t.createElement("div",{className:"k-task-complete",ref:m}),!L&&t.createElement(t.Fragment,null,t.createElement("div",{className:"k-task-content"},D),o.onTaskRemoveClick?t.createElement("span",{className:"k-task-actions"},t.createElement("span",{onClick:w,className:"k-link k-task-delete","aria-label":"Delete"},t.createElement(f.IconWrap,{name:"x",icon:Ce.xIcon}))):null),r.isEnabled&&t.createElement("div",{className:"k-task-dot k-task-start",ref:k,style:Y,...Qt}),r.isEnabled&&t.createElement("div",{className:"k-task-dot k-task-end",ref:U,style:Y,...Pt})))});En.displayName="KendoReactGanttTask";const Dn=e=>{const{dependency:a}=e,[n]=hn(),l=t.useRef(null),s=un(),r=mn(),[o,i]=t.useState(!1),m=()=>{if(l.current===null||n.current===null){i(!1);return}const d=n.current[f.getter(s.fromId)(a)],g=n.current[f.getter(s.toId)(a)];if(!d||!g){i(!1);return}const c=d.element,h=g.element;if(!c||!h){i(!1);return}if(o===!1){i(!0);return}const D={top:c.offsetTop+c.offsetHeight/2,start:c.offsetLeft,end:c.offsetLeft+c.offsetWidth},C={top:h.offsetTop+h.offsetHeight/2,start:h.offsetLeft,end:h.offsetLeft+h.offsetWidth},p=f.getter(s.type)(a),y=_a(D,C,r,p);y&&y.length&&l.current.setAttribute("points",y.map(R=>`${R.left},${R.top}`).join(" "))};return t.useEffect(m),t.createElement("polyline",{ref:l,style:{display:o?void 0:"none"}})};Dn.displayName="KendoReactGanttDependency";class kt extends t.Component{constructor(a){super(a),this.state={activeId:void 0,level:0},this.tableElement=null,this.tbodyElement=null,this.wrapperScrollLeft=0,this.wrapperScrollTop=0,this.updateOnScroll=!1,this.tbodyOffsetTop=0,this.prevData=[],this.flattedData=[],this.element=null,this.contextStateRef={current:void 0},this.navigationStateRef={current:void 0},this.scrollIntoView=n=>{if(!this.element)return;const{rowIndex:l=0}=n,{rowHeight:s=0}=this.props;this.element.scroll(0,(l-1)*s)},this.getColumns=n=>{const l=n.filter(r=>r.declarationIndex>=0&&r.parentIndex===-1),s=r=>(r.sort((o,i)=>o.declarationIndex-i.declarationIndex),r.map(o=>{const{declarationIndex:i,parentIndex:m,depth:d,colSpan:g,rowSpan:c,index:h,kFirst:D,groupable:C,children:p,...y}=o;return p.length?{children:s(p),...y}:y}));return s(l)},this.onKeyDown=n=>{if(x.tableKeyboardNavigation.onKeyDown(n,{contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef}),this.props.onKeyDown){const{mode:l,cell:s}=x.getSelectionOptions(this.props.selectable),r={dataItems:this.getLeafDataItems(),mode:l,cell:s,componentId:this.props.treelistId,selectedField:this.props.selectedField,...this.getEventArguments(n)};this.props.onKeyDown.call(void 0,r)}},this.onFocus=n=>{x.tableKeyboardNavigation.onFocus(n,{contextStateRef:this.contextStateRef})},this.onRowDrag=n=>{if(this.props.onRowDrag){const l={...n,target:this};this.props.onRowDrag.call(void 0,l)}},this.onRowDrop=n=>{if(this.props.onRowDrop){const l={...n,target:this};this.props.onRowDrop.call(void 0,l)}},this.onColumnReorder=(n,l,s)=>{const{extendedColumns:r}=this.props,o=r[n].depth,i=g=>{do g++;while(g<r.length&&r[g].depth>o);return g},m=[...r],d=m.splice(n,i(n)-n);if(m.splice(n<l?i(l-d.length):l,0,...d),m.filter(g=>g.declarationIndex>=0).forEach((g,c)=>g.orderIndex=c),this.props.onColumnReorder){const g={target:this,columns:this.getColumns(m),nativeEvent:s};this.props.onColumnReorder.call(void 0,g)}},this.onColumnResize=(n,l,s,r,o)=>{if(this.props.onColumnResize){const i=this.props.extendedColumns.filter(d=>d.children.length===0).reduce((d,g)=>d+=parseFloat(String(g.width)),0);this.tableElement&&(this.tableElement.style.width=i+"px");const m={columns:this.getColumns(this.props.extendedColumns),totalWidth:i,index:n,nativeEvent:r,newWidth:l,oldWidth:s,end:o,target:this};this.props.onColumnResize.call(void 0,m)}},this.onScroll=n=>{const l=n.currentTarget.scrollLeft,s=n.currentTarget.scrollTop,{columnVirtualization:r,scrollable:o,rowHeight:i=0}=this.props,m=i,d=0;let g=!1;r&&Math.abs(this.wrapperScrollLeft-l)>d&&(this.wrapperScrollLeft=l,g=!0),o==="virtual"&&Math.abs(this.wrapperScrollTop-s)>m&&(this.wrapperScrollTop=s,g=!0),g&&(this.updateOnScroll=!0,this.forceUpdate())},this.calculateSizes=n=>{if(!n||this.props.scrollable==="none")return;const l=Array.from(n.childNodes),s=l.find(i=>i.nodeName==="TABLE"),r=this.props.toolbar&&l.find(i=>i.nodeType===1&&i.classList.contains("k-grid-toolbar"));let o=0;if(r){const i=r.style.boxSizing;r.style.boxSizing="border-box",o=parseFloat(String(window.getComputedStyle(r).height))||r.offsetHeight,r.style.boxSizing=i,r.getAttribute("style")||r.removeAttribute("style")}this.tbodyOffsetTop=s.tBodies[0].offsetTop,he.setHeaderRowsTop(s,o)},this.onItemChange=n=>{if(n.field===this.props.expandField){const l=this.props.onExpandChange;if(l){const s={...this.getEventArguments(n.syntheticEvent),dataItem:n.dataItem,level:n.level,value:n.value};l.call(void 0,s)}return}if(this.props.onItemChange){const l={...this.getEventArguments(n.syntheticEvent),dataItem:n.dataItem,level:n.level,field:n.field,value:n.value};this.props.onItemChange.call(void 0,l)}},this.onHeaderSelectionChange=n=>{if(this.props.onHeaderSelectionChange){const l={field:n.field,nativeEvent:n.syntheticEvent&&n.syntheticEvent.nativeEvent,syntheticEvent:n.syntheticEvent,target:this,dataItems:this.getLeafDataItems()};this.props.onHeaderSelectionChange.call(void 0,l)}},this.selectionRelease=n=>{if(this.props.onSelectionChange){const l={syntheticEvent:void 0,target:this,selectedField:this.props.selectedField||"",componentId:this.props.treelistId,dataItems:this.getLeafDataItems(),dataItem:null,level:[],...n};this.props.onSelectionChange.call(void 0,l)}},this.onSortChange=(n,l,s)=>{this.onDataStateChange(this.props.onSortChange,{sort:l,field:s},n)},this.onFilterChange=n=>{const{filter:l,field:s}=n;this.onDataStateChange(this.props.onFilterChange,{filter:l,field:s},n.syntheticEvent)},this.onColumnMenuFilterChange=(n,l,s)=>{if(!s)return;const{onColumnMenuFilterChange:r}=this.props;if(!r)return;const o={syntheticEvent:n,filter:l,field:s,target:this,nativeEvent:n.nativeEvent};r.call(void 0,o)},this.onExpandChange=(n,l,s)=>{const{expandField:r,onExpandChange:o}=this.props;if(r&&o){const i={...this.getEventArguments(n),dataItem:l,level:s,value:it(l,this.props.expandField)};o.call(void 0,i)}},this.onRowClick=(n,l)=>{if(this.props.onRowClick&&n.target.nodeName==="TD"){const s={dataItem:l.dataItem,level:l.level,...this.getEventArguments(n)};this.props.onRowClick.call(void 0,s)}},this.rowDoubleClick=(n,l)=>{if(this.props.onRowDoubleClick&&n.target.nodeName==="TD"){const s={dataItem:l.dataItem,level:l.level,...this.getEventArguments(n)};this.props.onRowDoubleClick.call(void 0,s)}},this.rowContextMenu=(n,l)=>{if(this.props.onRowContextMenu&&n.target.nodeName==="TD"){const s={dataItem:l.dataItem,level:l.level,...this.getEventArguments(n)};this.props.onRowContextMenu.call(void 0,s)}},this.onPageChange=n=>{if(this.props.onPageChange){const l={...this.getEventArguments(n.syntheticEvent),skip:n.skip,take:n.take};this.props.onPageChange.call(void 0,l)}},this.onDataStateChange=(n,l,s)=>{if(n&&n.call(void 0,{...this.getEventArguments(s),...l}),this.props.onDataStateChange){const r={...this.getEventArguments(s),dataState:{...this.getDataState(),...l}};this.props.onDataStateChange.call(void 0,r)}},this.getDataState=()=>({filter:this.props.filter,sort:this.props.sort}),this.getEventArguments=n=>({nativeEvent:n&&n.nativeEvent,syntheticEvent:n,target:this}),this.getLeafDataItems=()=>this.flatData.map(n=>n.dataItem),this.dragLogic=new x.CommonDragLogic(this.onColumnReorder,f.noop,f.noop),this.columnResize=new x.ColumnResize(this.onColumnResize),x.tableKeyboardNavigation.onConstructor({navigatable:!!a.navigatable,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef,idPrefix:a.idPrefix})}get document(){if(f.canUseDOM)return this.element&&this.element.ownerDocument||document}componentDidMount(){this.calculateSizes(this.element),x.tableKeyboardNavigation.onComponentDidMount({scope:this.element||void 0,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef})}getSnapshotBeforeUpdate(){return x.tableKeyboardNavigation.onGetSnapshotBeforeUpdate({document:this.document,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef}),null}componentDidUpdate(a){a.columns!==this.props.columns&&this.calculateSizes(this.element),x.tableKeyboardNavigation.onComponentDidUpdate({scope:this.element||void 0,contextStateRef:this.contextStateRef,navigationStateRef:this.navigationStateRef})}componentWillUnmount(){this.columnResize.columns=[],this.dragLogic.columns=[],this.prevData=[],this.flattedData=[],this.updateOnScroll=!1}render(){const{filterRow:a,scrollable:n="scrollable",resizable:l=!1,reorderable:s=!1,skip:r,take:o,afterContent:i,extendedColumns:m=[],columnsMap:d}=this.props,g=m.some(w=>!!w.filter)||a!==void 0,c=a||x.FilterRow,h=x.tableKeyboardNavigationTools.getIdPrefix(this.navigationStateRef);this.columnResize.columns=m,this.columnResize.resizable=l,this.dragLogic.columns=m,this.dragLogic.reorderable=s,this.dragLogic.groupable=!1;const D=m.filter(w=>w.children.length===0),C=t.createElement(x.Header,{headerRow:t.createElement(x.HeaderRow,{sort:this.props.sort,sortable:this.props.sortable,sortChange:this.onSortChange,selectionChange:this.onHeaderSelectionChange,columns:m,columnsMap:d,cellRender:this.props.headerCellRender,columnResize:this.columnResize,columnMenu:this.props.columnMenu,columnMenuFilter:this.props.columnMenuFilter,columnMenuFilterChange:this.onColumnMenuFilterChange,pressHandler:this.dragLogic.pressHandler,dragHandler:this.dragLogic.dragHandler,releaseHandler:this.dragLogic.releaseHandler}),filterRow:g&&t.createElement(c,{columns:D,filter:this.props.filter,filterChange:this.onFilterChange,sort:this.props.sort,ariaRowIndex:d.length+1})||void 0,columnResize:this.columnResize}),p=this.props.style||{},{colSpans:y,hiddenColumns:R}=x.tableColumnsVirtualization({enabled:this.props.columnVirtualization,columns:D,scrollLeft:this.wrapperScrollLeft,tableViewPortWidth:parseFloat((p.width||"").toString())}),z=(w,W,j,Y,T,ae)=>D.map((F,V)=>{if(R[V])return null;const P=F.id?F.id:V,re=`k-table-td ${F.className?F.className+" ":""}${F.locked?"k-grid-content-sticky":""}`,$={id:x.tableKeyboardNavigationTools.generateNavigatableId(`${j}-${String(V)}`,h),colSpan:y[V],dataItem:w.dataItem,field:F.field,format:F.format,className:re||void 0,render:this.props.cellRender,onChange:this.onItemChange,selectionChange:this.props.onSelectionChange?Z=>{this.onSelectionChange({event:Z,item:w,columnIndex:V,dataIndex:T})}:void 0,level:w.level,expandable:F.expandable,expanded:Y,hasChildren:dn(w.dataItem,this.props.subItemsField),colIndex:V,ariaColumnIndex:F.ariaColumnIndex,onExpandChange:this.onExpandChange,style:F.left!==void 0&&{left:F.left,right:F.right,borderRightWidth:F.rightBorder?"1px":""}||{},isSelected:Array.isArray(ae)&&ae.indexOf(V)>-1};return W&&F.editCell?t.createElement(F.editCell,{...$,onChange:this.onItemChange,key:P}):F.cell?t.createElement(F.cell,{key:P,...$}):t.createElement(he.TreeListCell,{key:P,...$})});let L=this.flatData;const _=L.length;r!==void 0&&o!==void 0&&(L=L.slice(r,r+o)),n==="virtual"&&(L=he.tableRowsVirtualization({rows:L,tableViewPortHeight:parseFloat((p.height||p.maxHeight||"").toString()),scrollTop:this.wrapperScrollTop}),this.updateOnScroll=!1);const N=L.map(w=>w.level),A=d.length+(g?1:0)+1,I=L.length>0&&L.map((w,W)=>{const j=f.getter(this.props.editField||"")(w.dataItem),Y=f.getter(this.props.dataItemKey)(w.dataItem),T=String(Y||w.level.join(".")),ae=it(w.dataItem,this.props.expandField),F=this.props.selectedField?f.getter(this.props.selectedField)(w.dataItem):void 0,V={key:T,level:w.level,levels:N,dataItem:w.dataItem,selectedField:this.props.selectedField,rowHeight:w.height,render:this.props.rowRender,onDrop:this.onRowDrop,onDrag:this.onRowDrag,onClick:Z=>this.onRowClick(Z,w),onDoubleClick:Z=>this.rowDoubleClick(Z,w),onContextMenu:Z=>this.rowContextMenu(Z,w),isAltRow:W%2!==0,expanded:ae,rowIndex:W,ariaRowIndex:A+W,ariaSetSize:w.levelCount,ariaPosInSet:w.level[w.level.length-1]+1,isSelected:typeof F=="boolean"&&F},P=this.props.editRow,re=this.props.row||he.TreeListRow,$=z(w,j,T,ae,W,F);return j&&P?t.createElement(P,{...V,key:V.key},$):t.createElement(re,{...V,key:V.key},$)})||t.createElement("tr",{className:"k-table-row k-grid-norecords"},t.createElement("td",{className:"k-table-td",colSpan:D.length},this.props.noRecords||t.createElement(he.TreeListNoRecords,null))),k=w=>this.props.sort&&this.props.sort.some(W=>W.field===w),U=t.createElement("colgroup",{ref:w=>{this.columnResize.colGroupMain=w}},D.map((w,W)=>t.createElement("col",{key:W.toString(),className:k(w.field)?"k-sorted":void 0,style:w.width!==void 0?{width:w.width}:void 0}))),K=this.props.columnVirtualization||this.props.scrollable==="virtual",B=this.props.selectable&&this.props.selectable.drag?"none":void 0,Q=this.props.tableProps||{};return t.createElement(x.TableKeyboardNavigationContext.Provider,{value:this.contextStateRef.current},t.createElement("div",{id:this.props.treelistId,style:this.props.style,className:f.classNames("k-grid k-grid-md",this.props.className,{"k-treelist-scrollable":n!=="none"}),ref:w=>this.element=w,onScroll:K?this.onScroll:void 0,onKeyDown:this.onKeyDown,onFocus:this.onFocus,"aria-rowcount":_,"aria-colcount":D.length,role:"treegrid",...x.tableKeyboardNavigationScopeAttributes},this.props.toolbar,t.createElement(x.TableSelection,{selectable:this.props.selectable,onRelease:this.selectionRelease,childRef:w=>{this.tableElement=w}},t.createElement("table",{className:"k-table k-table-md",...this.props.tableProps||{},style:{...Q.style||{},userSelect:B},role:"presentation"},U,C,t.createElement("tbody",{className:"k-table-tbody",...x.tableKeyboardNavigationBodyAttributes,ref:w=>this.tbodyElement=w,role:"presentation"},I))),this.props.pager&&t.createElement(this.props.pager,{className:"k-grid-pager",total:_,skip:r,take:o,onPageChange:this.onPageChange}),s&&t.createElement(t.Fragment,null,t.createElement(x.DropClue,{ref:this.dragLogic.refDropElementClue}),t.createElement(x.DragClue,{ref:this.dragLogic.refDragElementClue})),i))}get flatData(){const{data:a=[],rowHeight:n=0}=this.props;let l=0;const s=()=>{const o={height:n,offsetTop:l};return l+=o.height,o},r=this.updateOnScroll&&this.prevData===a&&this.tbodyOffsetTop>0&&this.flattedData.length?this.flattedData:a.map(o=>({...o,...s()}));return this.prevData=a,this.flattedData=r,r}onSelectionChange(a){if(this.props.onSelectionChange){const{event:n,item:l,dataIndex:s,columnIndex:r}=a,{mode:o,cell:i}=x.getSelectionOptions(this.props.selectable),m={...this.getEventArguments(n.syntheticEvent),dataItem:l.dataItem,level:l.level,startColIndex:r,endColIndex:r,startRowIndex:s,endRowIndex:s,dataItems:this.getLeafDataItems(),altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,mode:o,cell:i,isDrag:!1,componentId:this.props.treelistId,selectedField:this.props.selectedField||""};this.props.onSelectionChange.call(void 0,m)}}}kt.propTypes={data:u.array,resizable:u.bool,reorderable:u.bool,sortable:u.oneOfType([u.bool,u.shape({mode:u.oneOf(["single","multiple"]),allowUnsort:u.bool})]),onSortChange:u.func,sort:u.array,columns:u.arrayOf(u.object),columnVirtualization:u.bool,filter:u.array,onFilterChange:u.func,filterRow:u.any,toolbar:u.any,noRecords:u.any,onExpandChange:u.func,expandField:u.string,subItemsField:u.string,selectedField:u.string,onSelectionChange:u.func,onHeaderSelectionChange:u.func,onRowClick:u.func,onItemChange:u.func,editField:u.string,scrollable:u.oneOf(["none","scrollable","virtual"]),rowHeight:u.number,style:u.object,tableProps:u.object,pager:u.any,skip:u.number,take:u.number,onPageChange:u.func,onDataStateChange:u.func,onColumnResize:u.func,onColumnReorder:u.func,extendedColumns:u.arrayOf(u.object),columnsMap:u.arrayOf(u.array),dataItemKey:u.string.isRequired,afterContent:u.any,navigatable:u.bool,idPrefix:u.string,treelistId:u.string},kt.contextType=x.TableKeyboardNavigationContext;const Ae=t.forwardRef((e,a)=>{const{slotLevels:n,slotWidth:l,timelineHeaderCell:s}=e,{columns:r,noRecords:o,resizable:i,reorderable:m,sortable:d,sort:g,filter:c,columnMenuFilter:h,columnMenu:D,navigatable:C,row:p,selectable:y}=Re(),{onDataStateChange:R,onSortChange:z,onFilterChange:L,onColumnMenuFilterChange:_,onExpandChange:N,onRowClick:A,onRowDoubleClick:I,onRowContextMenu:k,onColumnResize:U,onColumnReorder:K,onDependencyCreate:B,onKeyDown:Q,onSelectionChange:w,onHeaderSelectionChange:W}=rr(),j=mn(),Y=ar(),T=gt(),ae=un(),F=er(),V=tr(),P=t.useRef(null),re=t.useRef(null),$=t.useRef(null),Z=t.useRef(null),ve=t.useRef(0),we=t.useRef(f.useId()),O=t.useRef(f.useId()),ie=t.useRef(null),xe=t.useRef(null),Ge=t.useCallback(M=>{$.current&&$.current.scrollIntoView(M)},[]);t.useImperativeHandle(xe,()=>({scrollIntoView:Ge})),t.useImperativeHandle(a,()=>xe.current);const Se=t.useRef(0),E=t.useRef(0),H=t.useRef(0),q=t.useRef(0),me=t.useRef(null),be=t.useRef(null),[ue,Oe]=t.useState(null),Ot=ja(n,P,s),Wt=Ja(n,re),Te=Qa(n,l),{extendedColumns:_t,columnsWidth:Kt,columnsMap:Bt}=t.useMemo(()=>{const M=x.readColumns([...r,{title:"",sortable:!1,resizable:!1,reorderable:!1,width:Te,headerCell:()=>Ot,cell:En,orderIndex:Number.MAX_SAFE_INTEGER,navigatable:!1}],{prevId:0,idPrefix:we.current});let ee=0;return M.forEach((G,le,ce)=>{const se=le+1===ce.length,Ie=G.children.length===0;se?G.isAccessible=!1:(G.locked=!0,Ie&&(G.width=G.width||Me)),Ie&&(ee+=parseFloat(String(G.width)))}),{extendedColumns:M,columnsWidth:ee,columnsMap:x.mapColumns(M)}},[r,Te]),[$t,qt]=ir(),S=t.useCallback(()=>P.current&&P.current.parentElement,[]),De=()=>{const M=S(),ee=re.current,G=$.current&&$.current.tbodyElement;if(!M||!ee||!G)return;const le=G.offsetTop,ce=M.offsetLeft,se=Te;ee.style.top=le+"px",ee.style.left=ce+"px",ee.style.width=se+"px",ee.style.height=G.offsetHeight+"px"},ye=()=>{const M=S();M&&(ve.current=M.offsetLeft)};t.useEffect(De),t.useEffect(ye);const We=t.useCallback(M=>{if(!Z.current)return;const ee=M.columns.slice(0,M.columns.length-1);if(M.end)Z.current.style.left="0px";else{const G=S();if(!G)return;Z.current.style.left=G.offsetLeft-ve.current+"px",De()}U({...M,columns:ee})},[U]),_e=t.useCallback(M=>{const ee=M.columns.slice(0,M.columns.length-1);K({...M,columns:ee})},[U]),Ut=t.useCallback(M=>{const G=(ie.current&&ie.current.ownerDocument?ie.current.ownerDocument:document).elementFromPoint(M.clientX,M.clientY),le=ie.current;if(!G||!G.parentElement||!le)return;const ce=le.parentElement,se=le.firstElementChild;if(!ce||!se)return;const Ie=G.getAttribute(qe);if(Ie){const Wr=le.offsetTop,_r=le.offsetLeft,Kr=ce.offsetTop,Br=ce.offsetLeft,$r=se.scrollTop,qr=se.scrollLeft;H.current=_r+Br,q.current=Wr+Kr,Se.current=M.clientX-H.current+qr,E.current=M.clientY-q.current+$r,me.current=G.parentElement.getAttribute(Ue),be.current=Ie}},[]),Ne=t.useCallback(M=>{const ee=ie.current;if(!ee)return;const G=ee.firstElementChild;if(!G)return;const le=G.scrollTop,ce=G.scrollLeft,se=M.clientX-H.current+ce,Ie=M.clientY-q.current+le;Math.abs(Se.current-se)<10&&Math.abs(E.current-Ie)<10||Oe({startX:Se.current,startY:E.current,endX:se,endY:Ie})},[]),Or=t.useCallback(M=>{const G=(ie.current&&ie.current.ownerDocument?ie.current.ownerDocument:document).elementFromPoint(M.clientX,M.clientY);if(!G||!G.parentElement)return;const le=G.parentElement.getAttribute(Ue),ce=G.getAttribute(qe);if(ce&&le!==me.current&&B){let se;be.current==="start"?se=ce==="start"?3:2:se=ce==="start"?1:0,B({fromId:me.current,toId:le,type:se})}Se.current=0,E.current=0,H.current=0,q.current=0,me.current=null,be.current=null,Oe(null)},[B,Oe]);return t.createElement(Cn,{tasksStore:[$t,qt],timelineWidth:Te,dependencyDrag:{isEnabled:!!B,draggedId:me.current,onDependencyHandlePress:Ut,onDependencyHandleDrag:Ne,onDependencyHandleRelease:Or}},t.createElement("div",{className:"k-gantt-content",ref:ie,style:{height:`calc(100% - ${Y}px)`}},t.createElement(kt,{treelistId:O.current,ref:$,extendedColumns:_t,columnsMap:Bt,dataItemKey:T.id,data:F,idPrefix:we.current,navigatable:C,expandField:T.isExpanded,subItemsField:T.children,editField:T.isInEdit,selectedField:T.isSelected,onDataStateChange:R,onSortChange:z,onFilterChange:L,onExpandChange:N,onRowClick:A,onRowDoubleClick:I,onRowContextMenu:k,onColumnResize:We,onColumnReorder:_e,onColumnMenuFilterChange:_,onKeyDown:Q,onSelectionChange:w,onHeaderSelectionChange:W,tableProps:{style:{width:Kt},className:"k-table k-table-md k-table-layout-fixed"},noRecords:o,rowHeight:j,resizable:i,reorderable:m,sortable:d,sort:g,filter:c,columnMenuFilter:h,columnMenu:D,row:p,selectable:y,afterContent:t.createElement(t.Fragment,null,t.createElement("svg",{className:"k-gantt-dependencies-svg",ref:Z,style:{left:0,top:0}},V.map(M=>t.createElement(Dn,{key:f.getter(ae.id)(M),dependency:M}))),t.createElement("svg",{className:"k-gantt-dependencies-svg",style:{left:0,top:0,zIndex:3}},ue&&t.createElement("polyline",{points:`${ue.startX},${ue.startY} ${ue.endX},${ue.endY}`})),F&&F.length?Wt:null)})))});Ae.displayName="KendoReactGanttBaseView";const xt="gantt.weekViewTitle",Tt="gantt.dayViewTitle",Nt="gantt.monthViewTitle",Ft="gantt.yearViewTitle",Mt="gantt.filterClearButton",Ye="gantt.filterEqOperator",Ze="gantt.filterNotEqOperator",Xe="gantt.filterIsNullOperator",je="gantt.filterIsNotNullOperator",pn="gantt.filterIsEmptyOperator",vn="gantt.filterIsNotEmptyOperator",wn="gantt.filterStartsWithOperator",Sn="gantt.filterContainsOperator",bn="gantt.filterNotContainsOperator",yn="gantt.filterEndsWithOperator",In="gantt.filterGteOperator",kn="gantt.filterGtOperator",xn="gantt.filterLteOperator",Tn="gantt.filterLtOperator",Nn="gantt.filterIsTrue",Fn="gantt.filterIsFalse",Mn="gantt.filterBooleanAll",Ln="gantt.filterAfterOrEqualOperator",Rn="gantt.filterAfterOperator",Vn="gantt.filterBeforeOperator",An="gantt.filterBeforeOrEqualOperator",dr="gantt.noRecords",zn="gantt.editSave",Lt="gantt.editCancel",Rt="gantt.editAdd",Vt="gantt.editRemove",Hn="gantt.editTabGeneral",Gn="gantt.editTabPredecessors",On="gantt.editTabSuccessors",Wn="gantt.editorTitle",_n="gantt.editorTaskTitle",Kn="gantt.editorTaskStart",Bn="gantt.editorTaskEnd",ur="gantt.editorTaskPlannedStart",gr="gantt.editorTaskPlannedEnd",mr="gantt.editorTaskActualStart",fr="gantt.editorTaskActualEnd",$n="gantt.editorTaskComplete",qn="gantt.editorTaskParent",Un="gantt.editorValidationRequired",Yn="gantt.editorValidationStart",Zn="gantt.editorValidationEnd",Xn="gantt.editorValidationPercentCompleteRange",At="gantt.editorDependencyTypesFF",jn="gantt.editorDependencyTypesSF",Jn="gantt.editorDependencyTypesFS",Qn="gantt.editorDependencyTypesSS",Pn="gantt.addTask",ea="gantt.addChild",ta="gantt.addAbove",na="gantt.addBelow",aa="gantt.viewSelector",zt="gantt.editorDelete",ra="gantt.deleteConfirmation",la="gantt.deleteDialogTitle",Ht="gantt.editorDependencyNameLabel",Gt="gantt.editorDependencyTypeLabel",oe={[xt]:"Week",[Tt]:"Day",[Nt]:"Month",[Ft]:"Year",[Mt]:"Clear",[Ye]:"Is equal to",[Ze]:"Is not equal to",[Xe]:"Is null",[je]:"Is not null",[pn]:"Is empty",[vn]:"Is not empty",[wn]:"Starts with",[Sn]:"Contains",[bn]:"Does not contain",[yn]:"Ends with",[In]:"Is greater than or equal to",[kn]:"Is greater than",[xn]:"Is less than or equal to",[Tn]:"Is less than",[Nn]:"Is true",[Fn]:"Is false",[Mn]:"(All)",[Ln]:"Is after or equal to",[Rn]:"Is after",[Vn]:"Is before",[An]:"Is before or equal to",[dr]:"No records available",[zn]:"Save",[Lt]:"Cancel",[Rt]:"Add",[Vt]:"Remove",[Hn]:"General",[Gn]:"Predecessors",[On]:"Successors",[Wn]:"Edit task",[_n]:"Title",[Kn]:"Start",[Bn]:"End",[ur]:"Planned Start Date",[gr]:"Planned End Date",[mr]:"Actual Start Date",[fr]:"Actual End Date",[$n]:"Complete",[qn]:"Parent",[Un]:"Field is required.",[Yn]:"Start time must be be before End time.",[Zn]:"End time must be after Start time.",[Xn]:"Value should be between 0 and 100.",[At]:"Finish-Finish",[Jn]:"Finish-Start",[jn]:"Start-Finish",[Qn]:"Start-Start",[Pn]:"Add Task",[ea]:"Add Child",[ta]:"Add Above",[na]:"Add Below",[aa]:"View Selector",[zt]:"Delete",[ra]:"Are you sure you want to delete this event?",[la]:"Delete Event",[Ht]:"Name",[Gt]:"Type"},ze=t.forwardRef((e,a)=>{const{slotWidth:n=Je.slotWidth,firstSlotRangeRef:l,timelineHeaderCell:s}=e,{timezone:r}=Re(),o=J.useInternationalization(),i=t.useRef(null),m=t.useRef(null),d=t.useCallback(C=>{m.current&&m.current.scrollIntoView(C)},[]);t.useImperativeHandle(i,()=>({scrollIntoView:d})),t.useImperativeHandle(a,()=>i.current);const g=Ve(),c=e.workWeekStart||Je.workWeekStart,h=e.workWeekEnd||Je.workWeekEnd,D=t.useMemo(()=>{const C=rn({workWeekStart:c,workWeekEnd:h}),p=[],y=on(g,{timezone:r},o);return y.forEach(R=>{const z=sn(R.range,{workDays:C,timezone:r},o);p.push.apply(p,z)}),l&&p[0]&&(l.current=p[0].range),[y,p]},[r,g.start.getTime(),g.end.getTime(),o,c,h]);return t.createElement(Ae,{ref:m,slotWidth:n,slotLevels:D,timelineHeaderCell:s})}),Je={name:"week",dateRange:({intl:e,tasksStart:a,tasksEnd:n,timezone:l})=>{const s=v.ZonedDate.fromLocalDate(a,l),r=v.ZonedDate.fromLocalDate(n,l),o=nn(v.firstDayInWeek(v.getDate(s),e.firstDay())),i=st(v.firstDayInWeek(v.getDate(r),e.firstDay()),Jt),m=v.ZonedDate.fromUTCDate(Ee(o),l),d=v.ZonedDate.fromUTCDate(Ee(i),l);return{start:new Date(m.getTime()),end:new Date(d.getTime()),zonedStart:m,zonedEnd:d}},title:e=>e.toLanguageString(xt,oe[xt]),slotWidth:Me,workWeekStart:1,workWeekEnd:5,workDayStart:"08:00",workDayEnd:"17:00"};ze.defaultProps=Je,ze.propTypes={name:u.string,dateRange:u.oneOfType([u.func,u.object]),title:u.oneOfType([u.string,u.func]),slotWidth:u.number,workWeekStart:u.number,workWeekEnd:u.number,workDayStart:u.string,workDayEnd:u.string},ze.displayName="KendoReactGanttWeekView";const hr=(e,a,n)=>{const[l,s]=t.useState(a||e),r=t.useCallback((o,i)=>{s(o),n&&n.call(void 0,{...i,value:o})},[n,s]);return[a!==void 0?a:l,r]},sa=e=>{const[a,n]=gn(),l=J.useLocalization(),s=t.useMemo(()=>typeof e.view.title=="function"?e.view.title.call(void 0,l):e.view.title,[e.view.title,l]),r=t.useCallback(()=>{e.view.name&&n(e.view.name)},[n,e.view.name]);return t.createElement(te.Button,{role:"button",type:"button",tabIndex:-1,togglable:!0,selected:e.view.name===a,onClick:r},s)};sa.displayName="KendoReactGanttViewSelectorItem";const oa=t.forwardRef(()=>{const e=nr(),[a,n]=gn(),l=J.useLocalization(),s=o=>l.toLanguageString(o,oe[o]),r=t.useCallback(o=>{n&&(o.preventDefault(),n(o.target.value))},[n]);return t.createElement("div",{className:"k-gantt-views-wrapper"},t.createElement(te.ButtonGroup,{className:"k-gantt-views"},e.map(o=>t.createElement(sa,{key:o.props.name,view:o.props}))),t.createElement("select",{value:a,onChange:r,"aria-label":s(aa),className:"k-picker k-picker-solid k-dropdown-list k-dropdown k-views-dropdown k-rounded-md"},e.map(o=>t.createElement("option",{key:o.props.name,value:o.props.name},typeof o.props.title=="function"?o.props.title.call(void 0,l):o.props.title))))});oa.displayName="KendoReactGanttViewSelectorList";const ia=t.forwardRef((e,a)=>{const{className:n,...l}=e,s=t.useRef(null);return t.useImperativeHandle(a,()=>({element:s.current,props:e})),t.createElement(te.ToolbarItem,{ref:r=>{r&&(s.current=r.element)},className:f.classNames("k-gantt-views",n),...l},e.children)});ia.displayName="KendoReactGanttViewSelector";const ca=t.forwardRef((e,a)=>{const{className:n,...l}=e,s=t.useRef(null),r=t.useRef(null);t.useImperativeHandle(r,()=>({element:s.current,props:e})),t.useImperativeHandle(a,()=>r.current);const o=t.useMemo(()=>f.classNames("k-gantt-toolbar k-gantt-header",n),[n]);return t.createElement(te.Toolbar,{ref:i=>{i&&(s.current=i.element)},className:o,...l},e.children)});ca.displayName="KendoReactGanttToolbar";const da={name:"@progress/kendo-react-gantt",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},ua=t.forwardRef((e,a)=>{const n=J.useLocalization(),l=c=>n.toLanguageString(c,oe[c]),s=l(Pn),r=l(ea),o=l(ta),i=l(na),m=t.useCallback(c=>{c.syntheticEvent.preventDefault();const h=c.item&&c.item.direction?c.item.direction:"none";e.onClick&&e.onClick({nativeEvent:c.nativeEvent,syntheticEvent:c.syntheticEvent,direction:h})},[e.onClick]),d=t.useCallback(c=>{c.preventDefault(),e.onClick&&e.onClick({nativeEvent:c&&c.nativeEvent,syntheticEvent:c,direction:"none"})},[e.onClick]),g=t.createElement(t.Fragment,null,t.createElement(f.IconWrap,{name:"plus",icon:Ce.plusIcon}),s);return e.selectedTask?t.createElement(te.DropDownButton,{className:"k-views-dropdown",onItemClick:m,popupSettings:{popupClass:"k-gantt-toolbar"},textField:"title",items:[{title:r,direction:"child"},{title:o,direction:"above"},{title:i,direction:"below"}],text:g}):t.createElement(te.Button,{onClick:d},g)});ua.displayName="KendoReactGanttAddButton";const Qe=t.forwardRef((e,a)=>{f.validatePackage(da);const n=f.shouldShowValidationUI(da),{columns:l=He.columns,taskData:s=He.taskData,dependencyData:r=He.dependencyData,style:o,className:i,noRecords:m,timezone:d,rowHeight:g=He.rowHeight,resizable:c,reorderable:h,sortable:D,sort:C,filter:p,columnMenuFilter:y,columnMenu:R,navigatable:z,toolbar:L,row:_,selectable:N}=e,A=J.useInternationalization(),{fields:I}=t.useMemo(()=>Ga(e.taskModelFields),[e.taskModelFields]),{fields:k}=t.useMemo(()=>Oa(e.dependencyModelFields),[e.dependencyModelFields]),U=t.useCallback(Pa(I.isExpanded,I.children),[I.isExpanded,I.children]),K=t.useRef(null),B=t.useRef(null),Q=t.useRef(null),w=t.useRef(null),W=t.useRef(null),j=t.useCallback(S=>{const De=f.getter(I.start)(S),ye=f.getter(I.end)(S),We=f.getter(I.isSelected)(S);(!B.current||De<B.current)&&(B.current=De),(!Q.current||ye>Q.current)&&(Q.current=ye),We&&(w.current=S)},[I.start,I.end]),Y=t.useMemo(()=>(B.current=null,Q.current=null,w.current=null,he.flatData(s,U,j)),[s,U]);(!B.current||!Q.current)&&(B.current=new Date(jt),Q.current=new Date(jt));const T=t.Children.toArray(e.children||[t.createElement(ze,{key:"week",firstSlotRangeRef:W})]),[ae,F]=hr(e.defaultView||T[0].props.name,e.view,e.onViewChange),V=T.find(S=>S.props.name===ae)||T[0],P=typeof V.props.dateRange=="function"?V.props.dateRange.call(void 0,{intl:A,tasksStart:B.current,tasksEnd:Q.current,timezone:d}):V.props.dateRange,re=t.useRef(null),[$,Z]=t.useState(0);t.useLayoutEffect(()=>{re.current&&Z(re.current.element.offsetHeight)},[]);const ve=t.useCallback(S=>{K.current&&K.current.scrollIntoView(S)},[]),we=t.useRef(null),O=t.useRef(null);t.useImperativeHandle(O,()=>({props:e,element:we.current,scrollIntoView:ve})),t.useImperativeHandle(a,()=>O.current);const ie=t.useCallback(S=>{e.onDataStateChange&&e.onDataStateChange.call(void 0,{...S,target:O.current})},[e.onDataStateChange]),xe=t.useCallback(S=>{e.onSortChange&&e.onSortChange.call(void 0,{...S,target:O.current})},[e.onSortChange]),Ge=t.useCallback(S=>{e.onKeyDown&&e.onKeyDown.call(void 0,{...S,target:O.current})},[e.onKeyDown]),Se=t.useCallback(S=>{e.onSelectionChange&&e.onSelectionChange.call(void 0,{...S,target:O.current})},[e.onSelectionChange]),E=t.useCallback(S=>{e.onHeaderSelectionChange&&e.onHeaderSelectionChange.call(void 0,{...S,target:O.current})},[e.onHeaderSelectionChange]),H=t.useCallback(S=>{e.onFilterChange&&e.onFilterChange.call(void 0,{...S,target:O.current})},[e.onFilterChange]),q=t.useCallback(S=>{e.onColumnMenuFilterChange&&e.onColumnMenuFilterChange.call(void 0,{...S,target:O.current})},[e.onColumnMenuFilterChange]),me=t.useCallback(S=>{e.onExpandChange&&e.onExpandChange.call(void 0,{...S,target:O.current})},[e.onExpandChange]),be=t.useCallback(S=>{e.onAddClick&&e.onAddClick.call(void 0,{...S,target:O.current,selectedDataItem:w.current,slotStart:W.current&&new Date(W.current.start.getTime()),slotEnd:W.current&&new Date(W.current.end.getTime())})},[e.onAddClick]),ue=t.useCallback(S=>{e.onColumnResize&&e.onColumnResize.call(void 0,{...S,target:O.current})},[e.onColumnResize]),Oe=t.useCallback(S=>{e.onColumnReorder&&e.onColumnReorder.call(void 0,{...S,target:O.current})},[e.onColumnReorder]),Ot=t.useCallback(S=>{e.onRowClick&&e.onRowClick.call(void 0,{...S,target:O.current})},[e.onRowClick]),Wt=t.useCallback(S=>{e.onRowDoubleClick&&e.onRowDoubleClick.call(void 0,{...S,target:O.current})},[e.onRowClick]),Te=t.useCallback(S=>{e.onRowContextMenu&&e.onRowContextMenu.call(void 0,{...S,target:O.current})},[e.onRowClick]),_t=t.useCallback(S=>{e.onTaskClick&&e.onTaskClick.call(void 0,{...S,target:O.current})},[e.onTaskClick]),Kt=t.useCallback(S=>{e.onTaskDoubleClick&&e.onTaskDoubleClick.call(void 0,{...S,target:O.current})},[e.onTaskDoubleClick]),Bt=t.useCallback(S=>{e.onTaskContextMenu&&e.onTaskContextMenu.call(void 0,{...S,target:O.current})},[e.onTaskContextMenu]),$t=t.useCallback(S=>{e.onTaskRemoveClick&&e.onTaskRemoveClick.call(void 0,{...S,target:O.current})},[e.onTaskRemoveClick]),qt=t.useCallback(S=>{if(e.onDependencyCreate){let De,ye;const We=f.getter(I.id);for(let _e=0;_e<Y.length;_e++){const Ut=Y[_e],Ne=We(Ut.dataItem);if(String(Ne)===S.fromId&&(De=Ne),String(Ne)===S.toId&&(ye=Ne),De&&ye)break}e.onDependencyCreate.call(void 0,{fromId:De,toId:ye,target:O.current,type:S.type})}},[e.onDependencyCreate,I,Y]);return t.createElement(fn,{dateRange:P,taskData:Y,dependencyData:r,taskModelFields:I,dependencyModelFields:k,views:T,activeView:[ae,F],rowHeight:g,toolbarHeight:$,props:{columns:l,noRecords:m,timezone:d,resizable:c,reorderable:h,sortable:D,sort:C,filter:p,columnMenuFilter:y,columnMenu:R,navigatable:z,row:_,selectable:N},events:{onDataStateChange:ie,onSortChange:xe,onFilterChange:H,onColumnMenuFilterChange:q,onExpandChange:me,onRowClick:Ot,onRowDoubleClick:Wt,onRowContextMenu:Te,onColumnResize:ue,onColumnReorder:Oe,onDependencyCreate:e.onDependencyCreate&&qt,onKeyDown:Ge,onSelectionChange:Se,onHeaderSelectionChange:E},taskEvents:{onTaskClick:_t,onTaskDoubleClick:Kt,onTaskContextMenu:Bt,onTaskRemoveClick:e.onTaskRemoveClick&&$t}},t.createElement("div",{ref:we,role:"application",style:o,className:f.classNames("k-gantt",i)},t.createElement(ca,{ref:re},L&&L.addTaskButton?t.createElement(ua,{selectedTask:w.current,onClick:be}):null,t.createElement(te.ToolbarSpacer,null),t.createElement(ia,null,t.createElement(oa,null))),V&&t.createElement(V.type,{key:V.props.name,ref:K,...V.props,firstSlotRangeRef:W}),n&&t.createElement(f.WatermarkOverlay,null)))}),He={taskData:[],dependencyData:[],columns:[],rowHeight:40};Qe.propTypes={taskData:u.array,taskModelFields:u.shape({id:u.string,start:u.string,end:u.string,title:u.string,percentComplete:u.string,parentId:u.string,isRollup:u.string,isExpanded:u.string,children:u.string,isInEdit:u.string}),dependencyData:u.array,dependencyModelFields:u.shape({id:u.string,fromId:u.string,toId:u.string,type:u.string}),columns:u.arrayOf(u.shape({width:u.number,cell:u.any,editCell:u.any,headerCell:u.any,filter:u.any,children:u.any,field:u.string,title:u.string,sortable:u.any,expandable:u.bool,headerSelectionValue:u.bool,format:u.string,headerClassName:u.string,className:u.string,resizable:u.bool,reorderable:u.bool,minResizableWidth:u.number,orderIndex:u.number,columnMenu:u.any})),sort:u.array,filter:u.array,columnMenuFilter:u.array,columnMenu:u.any,style:u.object,className:u.string,children:u.any,timezone:u.string,defaultView:u.string,view:u.string,rowHeight:u.number,navigatable:u.bool,onViewChange:u.func,onDataStateChange:u.func,onSortChange:u.func,onFilterChange:u.func,onExpandChange:u.func,onRowClick:u.func,onColumnResize:u.func,onColumnReorder:u.func},Qe.defaultProps=He,Qe.displayName="KendoReactGantt";const Pe=t.forwardRef((e,a)=>{const{slotWidth:n=ke.slotWidth,slotDuration:l=ke.slotDuration,firstSlotRangeRef:s,timelineHeaderCell:r}=e,{timezone:o}=Re(),i=J.useInternationalization(),m=t.useRef(null),d=t.useRef(null),g=t.useCallback(R=>{d.current&&d.current.scrollIntoView(R)},[]);t.useImperativeHandle(m,()=>({scrollIntoView:g})),t.useImperativeHandle(a,()=>m.current);const c=Ve(),h=e.workWeekStart||ke.workWeekStart,D=e.workWeekEnd||ke.workWeekEnd,C=e.workDayStart||ke.workDayStart,p=e.workDayEnd||ke.workDayEnd,y=t.useMemo(()=>{const R=rn({workWeekStart:h,workWeekEnd:D}),z=[],L=sn(c,{workDays:R,timezone:o},i);return L.forEach(_=>{const N=Za(_.range,{workDayStart:C,workDayEnd:p,timezone:o,slotDuration:l},i);_.span=N.length,z.push.apply(z,N)}),s&&z[0]&&(s.current=z[0].range),[L,z]},[o,c.start.getTime(),c.end.getTime(),i,h,D,C,p]);return t.createElement(Ae,{ref:d,slotWidth:n,slotLevels:y,timelineHeaderCell:r})}),ke={name:"day",dateRange:({tasksStart:e,tasksEnd:a,timezone:n})=>{const l=v.ZonedDate.fromLocalDate(e,n),s=v.ZonedDate.fromLocalDate(a,n),r=nn(l),o=st(s),i=v.ZonedDate.fromUTCDate(Ee(r),n),m=v.ZonedDate.fromUTCDate(Ee(o),n);return{start:new Date(i.getTime()),end:new Date(m.getTime()),zonedStart:i,zonedEnd:m}},title:e=>e.toLanguageString(Tt,oe[Tt]),slotWidth:Me,slotDuration:60,workWeekStart:1,workWeekEnd:5,workDayStart:"08:00",workDayEnd:"17:00"};Pe.defaultProps=ke,Pe.propTypes={name:u.string,dateRange:u.oneOfType([u.func,u.object]),title:u.oneOfType([u.string,u.func]),slotWidth:u.number,slotDuration:u.number,workWeekStart:u.number,workWeekEnd:u.number,workDayStart:u.string,workDayEnd:u.string},Pe.displayName="KendoReactGanttDayView";const et=t.forwardRef((e,a)=>{const{slotWidth:n=ga.slotWidth,firstSlotRangeRef:l,timelineHeaderCell:s}=e,{timezone:r}=Re(),o=J.useInternationalization(),i=t.useRef(null),m=t.useRef(null),d=t.useCallback(h=>{m.current&&m.current.scrollIntoView(h)},[]);t.useImperativeHandle(i,()=>({scrollIntoView:d})),t.useImperativeHandle(a,()=>i.current);const g=Ve(),c=t.useMemo(()=>{const h=[],D=cn(g,{timezone:r},o);return D.forEach(C=>{const p=on(C.range,{timezone:r},o);h.push.apply(h,p)}),l&&h[0]&&(l.current=h[0].range),[D,h]},[r,g.start.getTime(),g.end.getTime(),o]);return t.createElement(Ae,{ref:m,slotWidth:n,slotLevels:c,timelineHeaderCell:s})}),ga={name:"month",dateRange:({tasksStart:e,tasksEnd:a,timezone:n})=>{const l=v.ZonedDate.fromLocalDate(e,n),s=v.ZonedDate.fromLocalDate(a,n),r=v.firstDayOfMonth(v.getDate(l)),o=v.addDays(v.lastDayOfMonth(v.getDate(s)),1),i=v.ZonedDate.fromUTCDate(Ee(r),n),m=v.ZonedDate.fromUTCDate(Ee(o),n);return{start:new Date(i.getTime()),end:new Date(m.getTime()),zonedStart:i,zonedEnd:m}},title:e=>e.toLanguageString(Nt,oe[Nt]),slotWidth:Me,workWeekStart:1,workWeekEnd:5,workDayStart:"08:00",workDayEnd:"17:00"};et.defaultProps=ga,et.propTypes={name:u.string,dateRange:u.oneOfType([u.func,u.object]),title:u.oneOfType([u.string,u.func]),slotWidth:u.number,workWeekStart:u.number,workWeekEnd:u.number,workDayStart:u.string,workDayEnd:u.string},et.displayName="GanttMonthView";const tt=t.forwardRef((e,a)=>{const{slotWidth:n=ma.slotWidth,firstSlotRangeRef:l,timelineHeaderCell:s}=e,{timezone:r}=Re(),o=J.useInternationalization(),i=t.useRef(null),m=t.useRef(null),d=t.useCallback(h=>{m.current&&m.current.scrollIntoView(h)},[]);t.useImperativeHandle(i,()=>({scrollIntoView:d})),t.useImperativeHandle(a,()=>i.current);const g=Ve(),c=t.useMemo(()=>{const h=Xa(g,{timezone:r},o),D=[];return h.forEach(C=>{const p=cn(C.range,{timezone:r},o);D.push.apply(D,p)}),l&&D[0]&&(l.current=D[0].range),[h,D]},[r,g.start.getTime(),g.end.getTime(),o]);return t.createElement(Ae,{slotWidth:n,slotLevels:c,timelineHeaderCell:s})}),ma={name:"year",dateRange:({tasksStart:e,tasksEnd:a,timezone:n})=>{const l=v.ZonedDate.fromLocalDate(e,n),s=v.ZonedDate.fromLocalDate(a,n),r=v.firstDayOfMonth(v.firstMonthOfYear(v.getDate(l))),o=v.addDays(v.lastDayOfMonth(v.lastMonthOfYear(v.getDate(s))),1),i=v.ZonedDate.fromUTCDate(Ee(r),n),m=v.ZonedDate.fromUTCDate(Ee(o),n);return{start:new Date(i.getTime()),end:new Date(m.getTime()),zonedStart:i,zonedEnd:m}},title:e=>e.toLanguageString(Ft,oe[Ft]),slotWidth:Me};tt.defaultProps=ma,tt.propTypes={name:u.string,dateRange:u.oneOfType([u.func,u.object]),title:u.oneOfType([u.string,u.func]),slotWidth:u.number},tt.displayName="GanttYearView";const Cr=[{text:Sn,operator:"contains"},{text:bn,operator:"doesnotcontain"},{text:Ye,operator:"eq"},{text:Ze,operator:"neq"},{text:wn,operator:"startswith"},{text:yn,operator:"endswith"},{text:Xe,operator:"isnull"},{text:je,operator:"isnotnull"},{text:pn,operator:"isempty"},{text:vn,operator:"isnotempty"}],Er=[{text:Ye,operator:"eq"},{text:Ze,operator:"neq"},{text:In,operator:"gte"},{text:kn,operator:"gt"},{text:xn,operator:"lte"},{text:Tn,operator:"lt"},{text:Xe,operator:"isnull"},{text:je,operator:"isnotnull"}],Dr=[{text:Ye,operator:"eq"},{text:Ze,operator:"neq"},{text:Ln,operator:"gte"},{text:Rn,operator:"gt"},{text:Vn,operator:"lt"},{text:An,operator:"lte"},{text:Xe,operator:"isnull"},{text:je,operator:"isnotnull"}],pr=[{text:Mn,operator:""},{text:Nn,operator:!0},{text:Fn,operator:!1}];function nt(e,a){return{clearButtonTitle:e.toLanguageString(Mt,oe[Mt]),operators:a.map(n=>({text:e.toLanguageString(n.text,oe[n.text]),operator:n.operator}))}}const fa=e=>{const{operators:a,...n}=e;return t.createElement(x.TextFilterCell,{ariaLabel:"text filter",...nt(J.useLocalization(),a||Cr),...n})};fa.displayName="KendoReactGanttTextFilter";const ha=e=>{const{operators:a,...n}=e;return t.createElement(x.NumericFilterCell,{ariaLabel:"numeric filter",...nt(J.useLocalization(),a||Er),...n})};ha.displayName="KendoReactGanttNumericFilter";const Ca=e=>{const{operators:a,...n}=e;return t.createElement(x.BooleanFilterCell,{ariaLabel:"boolean filter",...nt(J.useLocalization(),a||pr),...n})};Ca.displayName="KendoReactGanttBooleanFilter";const Ea=e=>{const{operators:a,...n}=e;return t.createElement(x.DateFilterCell,{ariaLabel:"date filter",...nt(J.useLocalization(),a||Dr),...n})};Ea.displayName="KendoReactGanttDateFilter";const vr=e=>{const{dependencyData:a,dependencyModelFields:n,defaultDataItem:l,fromId:s,toId:r,type:o}=e,i=a.map(h=>({...h})),m=f.setter(n.fromId),d=f.setter(n.toId),g=f.setter(n.type),c=l?{...l}:{};return m(c,s),d(c,r),g(c,o),i.push(c),i},wr=e=>{const{defaultDataItem:a,selectedDataItem:n,direction:l,taskModelFields:s,dataTree:r,slotStart:o,slotEnd:i}=e,m=Le(r,s.children,y=>({...y})),d=f.setter(s.start),g=f.setter(s.end),c=f.getter(s.start),h=f.getter(s.end),D=f.setter(s.parentId||""),C=a?{...a}:{},p=c(C)&&h(C);if(!n||l==="none")p||(d(C,o),g(C,i)),s.parentId&&D(C,null),m.unshift(C);else{const y=[{task:{[s.children]:m},childrenIndex:0}],R=f.getter(s.id),z=f.getter(s.children),L=f.setter(s.children),_=R(n);for(;y.length>0;){const N=y[y.length-1],A=N.task,I=R(A),k=z(A);if(I&&I===_)break;k&&k.length&&k.length>N.childrenIndex?(y.push({task:k[N.childrenIndex],childrenIndex:0}),N.childrenIndex++):y.pop()}if(y.length>1){const N=y[y.length-1].task,A=y[y.length-2].childrenIndex,k=y[y.length-2].task,U=z(k);switch(l){case"child":{let K=z(N);K||(K=[],L(N,K)),p||(d(C,new Date(c(N).getTime())),g(C,new Date(h(N).getTime()))),K.push(C),D(C,R(N)),at(y.splice(1,y.length-1).map(B=>B.task),s);break}case"above":{c(k)&&h(k)&&!p?(d(C,new Date(c(N).getTime())),g(C,new Date(h(N).getTime()))):(d(C,o),g(C,i)),U.splice(A-1,0,C),D(C,R(k)),at(y.splice(1,y.length-2).map(K=>K.task),s);break}case"below":{c(k)&&h(k)&&!p?(d(C,new Date(c(N).getTime())),g(C,new Date(h(N).getTime()))):(d(C,o),g(C,i)),U.splice(A,0,C),D(C,R(k)),at(y.splice(1,y.length-2).map(K=>K.task),s);break}}}}return m},Sr=e=>{const{updatedDataItem:a,taskModelFields:n,dataTree:l}=e,s=f.getter(n.id),r=f.getter(n.children),o=s(a);let i;const m=Le(l,n.children,g=>s(g)===o?(i=g,{...a}):{...g});let d=[{task:{[n.children]:m},childrenIndex:0}];for(;d.length>0;){const g=d[d.length-1],c=g.task,h=s(c),D=r(c);if(h&&h===o)break;D&&D.length&&D.length>g.childrenIndex?(d.push({task:D[g.childrenIndex],childrenIndex:0}),g.childrenIndex++):d.pop()}if(d.length>1){d=d.splice(1,d.length-2);const g=f.getter(n.start),c=f.getter(n.end),h=f.getter(n.percentComplete),D=f.getter(n.parentId||"");if(g(i).getTime()!==g(a).getTime()){Da(d.map(p=>p.task),n);const C=g(a).getTime()-g(i).getTime();kr(r(a),n,C)}if(c(i).getTime()!==c(a).getTime()&&pa(d.map(C=>C.task),n),h(i)!==h(a)&&va(d.map(C=>C.task),n),n.parentId&&D(i)!==D(a)){let C;return d.length?yr(d.map(p=>p.task),n,i):C=m.filter(p=>s(p)!==s(a)),Ir(C||m,n,a)}}return m},br=e=>{const{removedDataItem:a,taskModelFields:n,dataTree:l}=e,s=Le(l,n.children,d=>({...d}));let r=[{task:{[n.children]:s},childrenIndex:0}];const o=f.getter(n.id),i=f.getter(n.children),m=o(a);for(;r.length>0;){const d=r[r.length-1],g=d.task,c=o(g),h=i(g);if(c&&c===m)break;h&&h.length&&h.length>d.childrenIndex?(r.push({task:h[d.childrenIndex],childrenIndex:0}),d.childrenIndex++):r.pop()}if(r.length>1){const d=r[r.length-2],g=d.task;i(g).splice(d.childrenIndex-1,1),r=r.splice(1,r.length-2),at(r.map(h=>h.task),n)}return s},at=(e,a)=>{Da(e,a),pa(e,a),va(e,a)},yr=(e,a,n)=>{const l=f.getter(a.children),s=f.setter(a.children);for(let r=e.length-1;r>=0;r--){const o=e[r],i=l(o);if(n.parentId===o.id){const m=i.filter(d=>d.parentId===o.id);s(o,m)}}},Ir=(e,a,n)=>{const l=f.getter(a.children),s=f.setter(a.children);return n.parentId===null?[...e,n]:(e=Le(e,a.children,r=>{if(r.id===n.parentId){const o=l(r)||[];s(r,[...o,n])}return{...r}}),e)},Da=(e,a)=>{if(!e.length)return;const n=f.getter(a.children),l=f.getter(a.start),s=f.setter(a.start);for(let r=e.length-1;r>=0;r--){const o=e[r],i=n(o);if(i&&i.length){const m=i.reduce((d,g)=>Math.min(d,l(g).getTime()),l(i[0]).getTime());s(o,new Date(m))}}},pa=(e,a)=>{if(!e.length)return;const n=f.getter(a.children),l=f.getter(a.end),s=f.setter(a.end);for(let r=e.length-1;r>=0;r--){const o=e[r],i=n(o);if(i&&i.length){const m=i.reduce((d,g)=>Math.max(d,l(g).getTime()),l(i[0]).getTime());s(o,new Date(m))}}},va=(e,a)=>{if(!e.length)return;const n=f.getter(a.children),l=f.getter(a.percentComplete),s=f.setter(a.percentComplete),r=({avg:o,n:i},m)=>({avg:((l(m)||0)+i*o)/(i+1),n:i+1});for(let o=e.length-1;o>=0;o--){const i=e[o],m=n(i);if(m&&m.length){const d=m.reduce(r,{avg:0,n:0}).avg;s(i,d)}}},kr=(e,a,n)=>{if(!e)return;const l=f.getter(a.children),s=f.getter(a.start),r=f.setter(a.start),o=f.getter(a.end),i=f.setter(a.end),m=e.map(d=>({task:d,childrenIndex:0}));for(;m.length>0;){const d=m[m.length-1],g=d.task,c=l(g);c&&c.length&&c.length>d.childrenIndex?(m.push({task:c[d.childrenIndex],childrenIndex:0}),d.childrenIndex++):(m.pop(),r(g,new Date(s(g).getTime()+n)),i(g,new Date(o(g).getTime()+n)))}},wa=e=>{const{validationMessage:a,touched:n,label:l,id:s,valid:r,disabled:o,hint:i,type:m,optional:d,...g}=e,c=n&&a,h=!c&&i,D=h?`${s}_hint`:"",C=c?`${s}_error`:"";return t.createElement(ne.FieldWrapper,{className:"k-col-span-full"},t.createElement(de.Label,{editorId:s,editorValid:r,editorDisabled:o,optional:d},l),t.createElement("div",{className:"k-form-field-wrap"},t.createElement(Yt.Input,{valid:r,type:m,id:s,disabled:o,ariaDescribedBy:`${D} ${C}`,...g}),h&&t.createElement(de.Hint,{id:D},i),c&&t.createElement(de.Error,{id:C},a)))},rt=e=>{const{validationMessage:a,touched:n,label:l,id:s,valid:r,disabled:o,hint:i,wrapperStyle:m,...d}=e,g=n&&a,c=!g&&i,h=c?`${s}_hint`:"",D=g?`${s}_error`:"",C=l?`${s}_label`:"";return t.createElement(ne.FieldWrapper,{style:m,className:"k-col-span-2"},t.createElement(de.Label,{id:C,editorId:s,editorValid:r,editorDisabled:o},l),t.createElement("div",{className:"k-form-field-wrap"},t.createElement(ya.DateTimePicker,{ariaLabelledBy:C,ariaDescribedBy:`${h} ${D}`,valid:r,id:s,disabled:o,...d}),c&&t.createElement(de.Hint,{id:h},i),g&&t.createElement(de.Error,{id:D},a)))},Sa=e=>{const{validationMessage:a,visited:n,label:l,id:s,valid:r,disabled:o,hint:i,...m}=e,d=n&&a,g=!d&&i,c=g?`${s}_hint`:"",h=d?`${s}_error`:"";return t.createElement(ne.FieldWrapper,null,t.createElement(de.Label,{editorId:s,editorValid:r,editorDisabled:o},l),t.createElement("div",{className:"k-form-field-wrap"},t.createElement(Yt.NumericTextBox,{ariaDescribedBy:`${c} ${h}`,valid:r,id:s,disabled:o,format:"p0",step:.01,...m}),g&&t.createElement(de.Hint,{id:c},i),d&&t.createElement(de.Error,{id:h},a)))},xr=e=>{const{validationMessage:a,touched:n,label:l,id:s,valid:r,disabled:o,hint:i,idField:m,dataItem:d,...g}=e,c={id:null,title:"-None-",parentId:null},h=[],D=n&&a,C=!D&&i,p=C?`${s}_hint`:"",y=D?`${s}_error`:"",R=t.useCallback(A=>{if(!A||!A.children)return e.data;for(const k of A.children)h.push(k),k.children&&R(k);const I=h.map(k=>k.id);return e.data.filter(k=>!I.includes(k.id))},[e.data]),z=R(d),L=t.useMemo(()=>z.map(A=>{const I=new Date(A.start).toLocaleDateString(),k=new Date(A.end).toLocaleDateString();return{...A,title:`${A.title} (${I}-${k})`}}),[R]),_=t.useMemo(()=>X.findByFieldValue(L,m,e.value),[L,m,e.value]),N=A=>{A.value.id===null?e.onChange({value:null}):e.onChange({value:A.value[m]})};return t.createElement(ne.FieldWrapper,{className:"k-col-span-full"},t.createElement(de.Label,{editorId:s,editorValid:r,editorDisabled:o},l),t.createElement("div",{className:"k-form-field-wrap"},t.createElement(X.DropDownList,{textField:"title",ariaDescribedBy:`${p} ${y}`,valid:r,id:s,disabled:o,...g,value:_,data:L,onChange:N,defaultItem:c}),C&&t.createElement(de.Hint,{id:p},i),D&&t.createElement(de.Error,{id:y},a)))},Tr=(e,a,n,l)=>{const[s,r]=t.useState(e),o=t.useRef(null),i=c=>{l(a,"fromId",c.target.value.id)},m=()=>{if(n&&!a.uid)return n.id===a.id;if(n&&a.id===null)return n.uid===a.uid},d=t.useMemo(()=>X.findByFieldValue(e,"id",a.fromId),[e,a.fromId]),g=c=>{const h=$e.filterBy(e,c.filter);r(h)};return t.createElement("td",{ref:o,className:f.classNames(m()&&"k-selected")},t.createElement(X.DropDownList,{textField:"title",data:s,value:d,onChange:i,filterable:!0,onFilterChange:g,required:!0}))},Nr=(e,a,n,l)=>{const s=i=>{l(a,"type",i.target.value.type)},r=()=>{if(n&&!a.uid)return n.id===a.id;if(n&&a.id===null)return n.uid===a.uid},o=t.useMemo(()=>X.findByFieldValue(e,"type",a.type),[e,a.type]);return t.createElement("td",{className:f.classNames(r()&&"k-selected")},t.createElement(X.DropDownList,{textField:"name",data:e,value:o,onChange:s}))},Fr=e=>{var g;const[a,n]=t.useState([]),l=J.useLocalization(),s=c=>l.toLanguageString(c,oe[c]),r=s(Rt),o=s(Vt),i=s(Ht),m=s(Gt),d=t.useMemo(()=>{const c=e.predecessors.map(h=>{const D=X.findByFieldValue(e.flatTasks,"id",h.fromId),C=X.findByFieldValue(e.dependencyTypes,"type",h.type);return{...h,taskTitle:D?D.title:"",typeName:C?C.type:""}});return $e.orderBy(c,a)},[e.predecessors,e.dependencyTypes,e.flatTasks,a]);return t.createElement(pe.Grid,{data:d,sort:a,sortable:!0,onRowClick:e.onSelectRow,onSortChange:c=>{n(c.sort)},style:{height:"23em"}},t.createElement(pe.GridToolbar,null,t.createElement(te.Button,{icon:"plus",svgIcon:Ce.plusIcon,onClick:e.addPredecessorsDependency},r),t.createElement(te.Button,{icon:"minus",svgIcon:Ce.minusIcon,onClick:e.deleteDependency,disabled:((g=e.selectedItem)==null?void 0:g.id)===void 0},o)),t.createElement(pe.GridColumn,{field:"taskTitle",title:i,cell:c=>Tr(e.flatTasks,c.dataItem,e.selectedItem,e.updateDependency)}),t.createElement(pe.GridColumn,{field:"typeName",title:m,cell:c=>Nr(e.dependencyTypes,c.dataItem,e.selectedItem,e.updateDependency)}))},Mr=(e,a,n,l)=>{const[s,r]=t.useState(e),o=g=>{l(a,"toId",g.target.value.id)},i=()=>{if(n&&!a.uid)return n.id===a.id;if(n&&a.id===null)return n.uid===a.uid},m=t.useMemo(()=>X.findByFieldValue(e,"id",a.toId),[e,a.toId]),d=g=>{const c=$e.filterBy(e,g.filter);r(c)};return t.createElement("td",{className:f.classNames(i()&&"k-selected")},t.createElement(X.DropDownList,{textField:"title",data:s,value:m,onChange:o,filterable:!0,onFilterChange:d,required:!0}))},Lr=(e,a,n,l)=>{const s=i=>{l(a,"type",i.target.value.type)},r=()=>{if(n&&!a.uid)return n.id===a.id;if(n&&a.id===null)return n.uid===a.uid},o=t.useMemo(()=>X.findByFieldValue(e,"type",a.type),[e,a.type]);return t.createElement("td",{className:f.classNames(r()&&"k-selected")},t.createElement(X.DropDownList,{textField:"name",data:e,value:o,onChange:s}))},Rr=e=>{var g;const[a,n]=t.useState([]),l=J.useLocalization(),s=c=>l.toLanguageString(c,oe[c]),r=s(Rt),o=s(Vt),i=s(Ht),m=s(Gt),d=t.useMemo(()=>{const c=e.successors.map(h=>{const D=X.findByFieldValue(e.flatTasks,"id",h.toId),C=X.findByFieldValue(e.dependencyTypes,"type",h.type);return{...h,taskTitle:D?D.title:"",typeName:C?C.type:""}});return $e.orderBy(c,a)},[e.successors,e.dependencyTypes,e.flatTasks,a]);return t.createElement(pe.Grid,{data:d,sort:a,sortable:!0,onRowClick:e.onSelectRow,onSortChange:c=>{n(c.sort)},style:{height:"23em"}},t.createElement(pe.GridToolbar,null,t.createElement(te.Button,{icon:"plus",svgIcon:Ce.plusIcon,onClick:e.addSuccessorsDependency},r),t.createElement(te.Button,{icon:"minus",svgIcon:Ce.minusIcon,onClick:e.deleteDependency,disabled:((g=e.selectedItem)==null?void 0:g.id)===void 0},o)),t.createElement(pe.GridColumn,{field:"taskTitle",title:i,cell:c=>Mr(e.flatTasks,c.dataItem,e.selectedItem,e.updateDependency)}),t.createElement(pe.GridColumn,{field:"type",title:m,cell:c=>Lr(e.dependencyTypes,c.dataItem,e.selectedItem,e.updateDependency)}))};var ge=(e=>(e[e.FF=0]="FF",e[e.FS=1]="FS",e[e.SF=2]="SF",e[e.SS=3]="SS",e))(ge||{});const Vr=[{type:ge.FF},{type:ge.FS},{type:ge.SF},{type:ge.SS}],Ar=e=>{const[a,n]=t.useState(0),[l,s]=t.useState(),[r,o]=t.useState([...e.dependencyData||[]]),[i,m]=t.useState([]),d=gt(),g=J.useLocalization(),c=E=>g.toLanguageString(E,oe[E]),h=c(_n),D=c(Kn),C=c(Bn),p=c($n),y=c(qn),R=c(Hn),z=c(Gn),L=c(On),_=c(Un),N=c(Yn),A=c(Zn),I=c(Xn),k=t.useMemo(()=>he.flatData(e.taskData||[],E=>E.children||[],E=>{const H={title:E[d.title],id:E[d.id],start:E[d.start],end:E[d.end],parentId:null};return d.parentId&&(H.parentId=E[d.parentId]),H}),[e.taskData,d]),U=t.useMemo(()=>k.filter(E=>E.id!==e.dataItem.id),[k,e.dataItem]),K=t.useMemo(()=>r.filter(E=>E.toId===e.dataItem.id),[r,e.dataItem]),B=t.useMemo(()=>r.filter(E=>E.fromId===e.dataItem.id),[r,e.dataItem]),Q=t.useMemo(()=>r.filter(E=>E.id===null).map(E=>({id:E.id,fromId:E.fromId,toId:E.toId,type:E.type})),[r]),w=t.useMemo(()=>r.filter(E=>E.id!==null&&E.uid).map(E=>({id:E.id,fromId:E.fromId,toId:E.toId,type:E.type})),[r]),W=()=>{if(l){if(l.id){const E=r.filter(q=>q.id!==l.id);o(E);const H=r.filter(q=>q.id===l.id);m(q=>[...q,...H])}else{const E=r.filter(q=>q.uid!==l.uid);o(E);const H=r.filter(q=>q.uid===l.uid);m(q=>[...q,...H])}s(void 0)}},j=t.useCallback(E=>E||E===0?void 0:_,[_]),Y=t.useCallback(E=>E||E===0?E>=0&&E<=1?void 0:I:_,[_,I]),T=t.useCallback((E,H)=>E&&H(d.end)&&E.getTime()>H(d.end).getTime()?N:void 0,[d,N]),ae=t.useCallback((E,H)=>E&&H(d.start)&&E.getTime()<H(d.start).getTime()?A:void 0,[d,A]),F=t.useMemo(()=>[j,T],[j,T]),V=t.useMemo(()=>[j,ae],[j,ae]),P=t.useMemo(()=>X.findByFieldValue(r,"fromId",null)||X.findByFieldValue(r,"toId",null),[r]),re=E=>{P||(n(E.selected),s(void 0))},$=E=>{s(E.dataItem)},Z=()=>{const E={uid:f.guid(),id:null,fromId:null,toId:e.dataItem.id,type:ge.FS};o([...r,E])},ve=()=>{const E={uid:f.guid(),id:null,fromId:e.dataItem.id,toId:null,type:ge.FS};o([...r,E])},we=(E,H,q)=>{const me={...E,uid:E.uid||f.guid(),[H]:q},be=r.findIndex(ue=>ue.id&&ue.id===me.id||ue.uid&&ue.uid===me.uid);be>-1&&(r.splice(be,1,me),o([...r]))},O=t.useMemo(()=>Vr.map(E=>{let H;switch(E.type){case ge.FF:H=c(At);break;case ge.FS:H=c(Jn);break;case ge.SF:H=c(jn);break;case ge.SS:H=c(Qn);break;default:H=c(At);break}return{...E,name:H}}),[c]);t.useEffect(()=>{e.onDependencyCreate&&e.onDependencyCreate.call(void 0,{createdDependencies:Q,updatedDependencies:w,deletedDependencies:i})},[Q,w,i,e.onDependencyCreate]);const ie=e.dependencyData&&e.taskData,xe=t.createElement(ne.FormElement,{style:{width:400},horizontal:!0},t.createElement(ne.Field,{id:`${d.title}_gantteditor`,name:d.title,label:h,component:wa,validator:j}),t.createElement(ne.Field,{id:`${d.start}_gantteditor`,name:d.start,label:D,component:rt,validator:F}),t.createElement(ne.Field,{id:`${d.end}_gantteditor`,name:d.end,label:C,component:rt,validator:V}),t.createElement(ne.Field,{id:`${d.percentComplete}_gantteditor`,name:d.percentComplete,label:p,component:Sa,validator:Y})),Ge=t.createElement(ne.FormElement,{style:{paddingInline:"4px"}},t.createElement("div",{className:"k-form-fieldset"},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-2"},t.createElement(ne.Field,{id:`${d.title}_gantteditor`,name:d.title,label:h,component:wa,validator:j}),t.createElement(ne.Field,{id:`${d.start}_gantteditor`,name:d.start,label:D,component:rt,validator:F}),t.createElement(ne.Field,{id:`${d.end}_gantteditor`,name:d.end,label:C,component:rt,validator:V}),t.createElement(ne.Field,{id:`${d.percentComplete}_gantteditor`,name:d.percentComplete,label:p,component:Sa,validator:Y}),d.parentId&&t.createElement(ne.Field,{id:`${d.parentId}_gantteditor`,name:d.parentId||"",idField:d.id,label:y,component:xr,data:U,dataItem:e.dataItem})))),Se=t.createElement(Be.TabStrip,{selected:a,onSelect:re},t.createElement(Be.TabStripTab,{title:R},Ge),t.createElement(Be.TabStripTab,{title:z},t.createElement(Fr,{flatTasks:k,predecessors:K,dependencyTypes:O,selectedItem:l,onSelectRow:$,addPredecessorsDependency:Z,deleteDependency:W,updateDependency:we})),t.createElement(Be.TabStripTab,{title:L},t.createElement(Rr,{flatTasks:k,successors:B,dependencyTypes:O,selectedItem:l,onSelectRow:$,addSuccessorsDependency:ve,deleteDependency:W,updateDependency:we})));return ie?Se:xe},zr=e=>{const{onCancel:a,onDelete:n,onClose:l,onSubmit:s,...r}=e,o=t.useRef(e.dataItem),[i,m]=t.useState({}),d=J.useLocalization(),g=I=>d.toLanguageString(I,oe[I]),c=g(zn),h=g(Lt),D=g(zt),C=g(Wn),p=t.useCallback(I=>{if(a){const k={syntheticEvent:I,nativeEvent:I.nativeEvent,dataItem:e.dataItem};a.call(void 0,k)}},[a,e.dataItem]),y=t.useCallback(I=>{if(n){const k={syntheticEvent:I,nativeEvent:I.nativeEvent,dataItem:e.dataItem};n.call(void 0,k)}},[n,e.dataItem]),R=t.useCallback(({syntheticEvent:I})=>{if(l){const k={syntheticEvent:I,nativeEvent:I.nativeEvent,dataItem:e.dataItem};l.call(void 0,k)}},[l,e.dataItem]),z=t.useCallback((I,k)=>{if(s){const U={dataItem:I,initialDataItem:o.current,syntheticEvent:k,nativeEvent:k&&k.nativeEvent,dependencies:i};s.call(void 0,U)}},[s,i]),L=t.useMemo(()=>X.findByFieldValue(i.createdDependencies,"fromId",null)||X.findByFieldValue(i.createdDependencies,"toId",null),[i]),_=t.useMemo(()=>i.createdDependencies&&i.createdDependencies.length&&L===void 0||i.updatedDependencies&&i.updatedDependencies.length||i.deletedDependencies&&i.deletedDependencies.length,[i,L]),N=t.useCallback(I=>{m(I)},[]),A=t.createElement(ne.Form,{initialValues:e.dataItem,onSubmit:z,render:I=>t.createElement(Ke.Window,{title:C,minWidth:90,width:554,modal:!0,height:0,onClose:R},t.createElement(Ar,{taskData:e.taskData,dependencyData:e.dependencyData,dataItem:e.dataItem,onDependencyCreate:N}),t.createElement(Ke.WindowActionsBar,{layout:"start"},t.createElement(te.Button,{disabled:!I.allowSubmit&&!_,onClick:I.allowSubmit?I.onSubmit:k=>z(e.dataItem,k),icon:"save",svgIcon:Ce.saveIcon,themeColor:"primary"},c),t.createElement(te.Button,{onClick:p,type:"button",icon:"cancel",svgIcon:Ce.cancelIcon},h),t.createElement("div",{className:"k-spacer"}),n&&t.createElement(te.Button,{onClick:y,icon:"trash",svgIcon:Ce.trashIcon,fillMode:"flat",themeColor:"primary"},D))),...r});return f.canUseDOM?Xt.createPortal(A,document&&document.body):null},Hr=e=>{const{onClose:a,onCancel:n,onConfirm:l,dataItem:s}=e,r=J.useLocalization(),o=p=>r.toLanguageString(p,oe[p]),i=o(zt),m=o(Lt),d=o(ra),g=o(la),c=t.useCallback(({syntheticEvent:p})=>{a&&a.call(void 0,{syntheticEvent:p,nativeEvent:p&&p.nativeEvent,dataItem:null})},[a]),h=t.useCallback(p=>{n&&n.call(void 0,{syntheticEvent:p,nativeEvent:p&&p.nativeEvent,dataItem:null})},[n]),D=t.useCallback(p=>{l&&l.call(void 0,{syntheticEvent:p,nativeEvent:p&&p.nativeEvent,dataItem:s})},[l,s]),C=t.createElement(Ke.Dialog,{title:g,onClose:c},d,t.createElement(Ke.DialogActionsBar,{layout:"end"},t.createElement(te.Button,{themeColor:"primary",onClick:D},i),t.createElement(te.Button,{onClick:h},m)));return f.canUseDOM?Xt.createPortal(C,document&&document.body):null},Gr=he.TreeListRow;Object.defineProperty(b,"getSelectedState",{enumerable:!0,get:()=>x.getSelectedState}),Object.defineProperty(b,"getSelectedStateFromKeyDown",{enumerable:!0,get:()=>x.getSelectedStateFromKeyDown}),Object.defineProperty(b,"setSelectedState",{enumerable:!0,get:()=>x.setSelectedState}),b.GANTT_COL_INDEX_ATTRIBUTE=ka,b.GANTT_PREVENT_SELECTION_ELEMENT=xa,b.GANTT_ROW_INDEX_ATTRIBUTE=Ia,b.Gantt=Qe,b.GanttBooleanFilter=Ca,b.GanttDateFilter=Ea,b.GanttDayView=Pe,b.GanttForm=zr,b.GanttMonthView=et,b.GanttNumericFilter=ha,b.GanttRemoveDialog=Hr,b.GanttRow=Gr,b.GanttTextFilter=fa,b.GanttWeekView=ze,b.GanttYearView=tt,b.addDependency=vr,b.addTask=wr,b.createDataTree=Ha,b.extendDataItem=za,b.filterBy=Aa,b.mapTree=Le,b.orderBy=Va,b.removeTask=br,b.updateTask=Sr,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
@@ -2,7 +2,8 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
+ import { FieldRenderProps } from '@progress/kendo-react-form';
5
6
  /**
6
7
  * @hidden
7
8
  */
8
- export declare const FormDateTimePicker: (fieldRenderProps: any) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const FormDateTimePicker: (fieldRenderProps: FieldRenderProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { FieldRenderProps } from '@progress/kendo-react-form';
6
+ /**
7
+ * @hidden
8
+ */
9
+ export declare const FormDropDownList: (fieldRenderProps: FieldRenderProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,8 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
+ import { FieldRenderProps } from '@progress/kendo-react-form';
5
6
  /**
6
7
  * @hidden
7
8
  */
8
- export declare const FormInput: (fieldRenderProps: any) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const FormInput: (fieldRenderProps: FieldRenderProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,8 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
+ import { FieldRenderProps } from '@progress/kendo-react-form';
5
6
  /**
6
7
  * @hidden
7
8
  */
8
- export declare const FormNumericTextBox: (fieldRenderProps: any) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const FormNumericTextBox: (fieldRenderProps: FieldRenderProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,20 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
+ import { DataItem } from '../interfaces/DataItem';
6
+ import { GanttDependency } from '../interfaces/GanttDependency';
7
+ export interface GanttEditorDependenciesHandler {
8
+ createdDependencies: GanttDependency[];
9
+ updatedDependencies: GanttDependency[];
10
+ deletedDependencies: GanttDependency[];
11
+ }
12
+ export interface GanttEditorProps {
13
+ taskData?: DataItem[];
14
+ dependencyData?: GanttDependency[];
15
+ dataItem: DataItem;
16
+ onDependencyCreate?: (event: GanttEditorDependenciesHandler) => void;
17
+ }
5
18
  /**
6
19
  * @hidden
7
20
  */
8
- export declare const GanttEditor: () => import("react/jsx-runtime").JSX.Element;
21
+ export declare const GanttEditor: (props: GanttEditorProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { GridRowClickEvent } from '@progress/kendo-react-grid';
6
+ import { GanttDependency } from '../interfaces/GanttDependency';
7
+ import { DependencyType } from '../interfaces/DependencyType';
8
+ import { DataItem } from '../interfaces/DataItem';
9
+ export interface GanttEditorPredecessorsProps {
10
+ predecessors: GanttDependency[];
11
+ flatTasks: DataItem[];
12
+ dependencyTypes: {
13
+ type: DependencyType;
14
+ name: string;
15
+ }[];
16
+ selectedItem: GanttDependency | undefined;
17
+ onSelectRow: (event: GridRowClickEvent) => void;
18
+ addPredecessorsDependency: () => void;
19
+ deleteDependency: () => void;
20
+ updateDependency: (dependency: GanttDependency, field: string, newValue: number) => void;
21
+ }
22
+ /**
23
+ * @hidden
24
+ */
25
+ export declare const GanttEditorPredecessors: (props: GanttEditorPredecessorsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { GridRowClickEvent } from '@progress/kendo-react-grid';
6
+ import { GanttDependency } from '../interfaces/GanttDependency';
7
+ import { DependencyType } from '../interfaces/DependencyType';
8
+ import { DataItem } from '../interfaces/DataItem';
9
+ export interface GanttEditorSuccessorsProps {
10
+ successors: GanttDependency[];
11
+ flatTasks: DataItem[];
12
+ dependencyTypes: {
13
+ type: DependencyType;
14
+ name: string;
15
+ }[];
16
+ selectedItem: GanttDependency | undefined;
17
+ onSelectRow: (event: GridRowClickEvent) => void;
18
+ addSuccessorsDependency: () => void;
19
+ deleteDependency: () => void;
20
+ updateDependency: (dependency: GanttDependency, field: string, newValue: number) => void;
21
+ }
22
+ /**
23
+ * @hidden
24
+ */
25
+ export declare const GanttEditorSuccessors: (props: GanttEditorSuccessorsProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,11 +3,17 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as React from 'react';
6
+ import { GanttEditorDependenciesHandler } from './GanttEditor';
6
7
  import { DataItem } from '../interfaces/DataItem';
8
+ import { GanttDependency } from '../interfaces/GanttDependency';
7
9
  /**
8
10
  * Represents the event arguments of Gantt form.
9
11
  */
10
12
  export interface GanttFormStateChangeEvent {
13
+ /**
14
+ * The initial data item.
15
+ */
16
+ initialDataItem?: DataItem;
11
17
  /**
12
18
  * The updated data item.
13
19
  */
@@ -20,6 +26,10 @@ export interface GanttFormStateChangeEvent {
20
26
  * A native DOM event.
21
27
  */
22
28
  nativeEvent: any;
29
+ /**
30
+ * Passes the updated dependencies.
31
+ */
32
+ dependencies?: GanttEditorDependenciesHandler;
23
33
  }
24
34
  /**
25
35
  * Represents the props of the KendoReact [GanttForm]({% slug api_gantt_ganttform %}) component.
@@ -29,10 +39,22 @@ export interface GanttFormProps {
29
39
  * Specifies the `DataItem` to be visualized inside the form.
30
40
  */
31
41
  dataItem: DataItem;
42
+ /**
43
+ * The task data passed to the form.
44
+ */
45
+ taskData?: DataItem[];
46
+ /**
47
+ * The dependancy data passed to the form.
48
+ */
49
+ dependencyData?: GanttDependency[];
32
50
  /**
33
51
  * Called when the `cancel` button is clicked.
34
52
  */
35
53
  onCancel?: (event: GanttFormStateChangeEvent) => void;
54
+ /**
55
+ * Called when the `delete` button is clicked.
56
+ */
57
+ onDelete?: (event: GanttFormStateChangeEvent) => void;
36
58
  /**
37
59
  * Called when the `close` button is clicked.
38
60
  */
package/index.d.ts CHANGED
@@ -25,6 +25,8 @@ import { getSelectedState, getSelectedStateFromKeyDown, setSelectedState } from
25
25
  import { type GanttSelectableMode, type GanttSelectableSettings } from './interfaces/GanttSelectableSettings';
26
26
  import { GANTT_COL_INDEX_ATTRIBUTE, GANTT_PREVENT_SELECTION_ELEMENT, GANTT_ROW_INDEX_ATTRIBUTE } from './constants';
27
27
  import { type GanttTaskModelFields } from './interfaces/GanttTaskModelFields';
28
+ import { type TaskModelFields } from './interfaces/TaskModelFields';
28
29
  import { type GanttDependencyModelFields } from './interfaces/GanttDependencyModelFields';
29
30
  import { type GanttColumnProps } from './interfaces/GanttColumnProps';
30
- export { Gantt, GanttDayView, GanttWeekView, GanttMonthView, GanttYearView, GanttViewChangeEvent, GanttDataStateChangeEvent, GanttSortChangeEvent, GanttFilterChangeEvent, GanttColumnMenuFilterChangeEvent, GanttExpandChangeEvent, GanttColumnResizeEvent, GanttColumnReorderEvent, GanttRowClickEvent, GanttRowContextMenuEvent, GanttRowDoubleClickEvent, GanttTaskClickEvent, GanttTaskContextMenuEvent, GanttTaskDoubleClickEvent, GanttTaskRemoveClickEvent, GanttKeyDownEvent, GanttSelectionChangeEvent, GanttHeaderSelectionChangeEvent, GanttAddClickEvent, GanttDependencyCreateEvent, orderBy, filterBy, mapTree, extendDataItem, createDataTree, removeTask, addTask, updateTask, addDependency, GanttTextFilter, GanttTextFilterProps, GanttNumericFilter, GanttNumericFilterProps, GanttBooleanFilter, GanttBooleanFilterProps, GanttDateFilter, GanttDateFilterProps, GanttViewProps, GanttRow, GanttRowProps, GanttForm, GanttFormStateChangeEvent, GanttRemoveDialog, GanttRemoveDialogStateChangeEvent, GanttViewTimelineHeaderCellProps, GanttSlotType, getSelectedState, getSelectedStateFromKeyDown, setSelectedState, GanttSelectableMode, GanttSelectableSettings, GANTT_COL_INDEX_ATTRIBUTE, GANTT_ROW_INDEX_ATTRIBUTE, GANTT_PREVENT_SELECTION_ELEMENT, GanttTaskModelFields, GanttDependencyModelFields, GanttColumnProps };
31
+ import { type GanttDependency } from './interfaces/GanttDependency';
32
+ export { Gantt, GanttDayView, GanttWeekView, GanttMonthView, GanttYearView, GanttViewChangeEvent, GanttDataStateChangeEvent, GanttSortChangeEvent, GanttFilterChangeEvent, GanttColumnMenuFilterChangeEvent, GanttExpandChangeEvent, GanttColumnResizeEvent, GanttColumnReorderEvent, GanttRowClickEvent, GanttRowContextMenuEvent, GanttRowDoubleClickEvent, GanttTaskClickEvent, GanttTaskContextMenuEvent, GanttTaskDoubleClickEvent, GanttTaskRemoveClickEvent, GanttKeyDownEvent, GanttSelectionChangeEvent, GanttHeaderSelectionChangeEvent, GanttAddClickEvent, GanttDependencyCreateEvent, orderBy, filterBy, mapTree, extendDataItem, createDataTree, removeTask, addTask, updateTask, addDependency, GanttTextFilter, GanttTextFilterProps, GanttNumericFilter, GanttNumericFilterProps, GanttBooleanFilter, GanttBooleanFilterProps, GanttDateFilter, GanttDateFilterProps, GanttViewProps, GanttRow, GanttRowProps, GanttForm, GanttFormStateChangeEvent, GanttRemoveDialog, GanttRemoveDialogStateChangeEvent, GanttViewTimelineHeaderCellProps, GanttSlotType, getSelectedState, getSelectedStateFromKeyDown, setSelectedState, GanttSelectableMode, GanttSelectableSettings, GANTT_COL_INDEX_ATTRIBUTE, GANTT_ROW_INDEX_ATTRIBUTE, GANTT_PREVENT_SELECTION_ELEMENT, GanttTaskModelFields, GanttDependencyModelFields, GanttColumnProps, GanttDependency, TaskModelFields };