@progress/kendo-react-gantt 9.4.0-develop.6 → 9.4.0-develop.7

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.
Files changed (83) hide show
  1. package/Gantt.js +1 -1
  2. package/Gantt.mjs +0 -1
  3. package/cells/FilterCells/GanttBooleanFilter.js +1 -1
  4. package/cells/FilterCells/GanttBooleanFilter.mjs +0 -1
  5. package/cells/FilterCells/GanttDateFilter.js +1 -1
  6. package/cells/FilterCells/GanttDateFilter.mjs +3 -4
  7. package/cells/FilterCells/GanttNumericFilter.js +1 -1
  8. package/cells/FilterCells/GanttNumericFilter.mjs +5 -6
  9. package/cells/FilterCells/GanttTextFilter.js +1 -1
  10. package/cells/FilterCells/GanttTextFilter.mjs +3 -4
  11. package/cells/FilterCells/utils.js +1 -1
  12. package/cells/FilterCells/utils.mjs +3 -4
  13. package/components/BaseView.js +1 -1
  14. package/components/BaseView.mjs +0 -1
  15. package/components/GanttDependency.js +1 -1
  16. package/components/GanttDependency.mjs +9 -10
  17. package/components/GanttTask.js +1 -1
  18. package/components/GanttTask.mjs +0 -1
  19. package/components/GanttTreelist.js +1 -1
  20. package/components/GanttTreelist.mjs +0 -1
  21. package/components/toolbar/AddButton.js +1 -1
  22. package/components/toolbar/AddButton.mjs +7 -8
  23. package/components/toolbar/Toolbar.js +1 -1
  24. package/components/toolbar/Toolbar.mjs +0 -1
  25. package/components/toolbar/view-selector/ViewSelector.js +1 -1
  26. package/components/toolbar/view-selector/ViewSelector.mjs +6 -7
  27. package/components/toolbar/view-selector/ViewSelectorItem.js +1 -1
  28. package/components/toolbar/view-selector/ViewSelectorItem.mjs +4 -5
  29. package/components/toolbar/view-selector/ViewSelectorList.js +1 -1
  30. package/components/toolbar/view-selector/ViewSelectorList.mjs +3 -4
  31. package/constants/index.js +1 -1
  32. package/constants/index.mjs +4 -5
  33. package/context/GanttContext.js +1 -1
  34. package/context/GanttContext.mjs +0 -1
  35. package/context/GanttViewContext.js +1 -1
  36. package/context/GanttViewContext.mjs +0 -1
  37. package/editors/FormDateTimePicker.js +1 -1
  38. package/editors/FormDateTimePicker.mjs +6 -7
  39. package/editors/FormDropDownList.js +1 -1
  40. package/editors/FormDropDownList.mjs +4 -5
  41. package/editors/FormInput.js +1 -1
  42. package/editors/FormInput.mjs +3 -4
  43. package/editors/FormNumericTextBox.js +1 -1
  44. package/editors/FormNumericTextBox.mjs +6 -7
  45. package/editors/GanttEditor.js +1 -1
  46. package/editors/GanttEditor.mjs +0 -1
  47. package/editors/GanttEditorPredecessors.js +1 -1
  48. package/editors/GanttEditorPredecessors.mjs +0 -1
  49. package/editors/GanttEditorSuccessors.js +1 -1
  50. package/editors/GanttEditorSuccessors.mjs +10 -11
  51. package/editors/GanttForm.js +1 -1
  52. package/editors/GanttForm.mjs +7 -8
  53. package/editors/GanttRemoveDialog.js +1 -1
  54. package/editors/GanttRemoveDialog.mjs +5 -6
  55. package/hooks/useControlledState.js +1 -1
  56. package/hooks/useControlledState.mjs +4 -5
  57. package/hooks/useDictionaryStore.js +1 -1
  58. package/hooks/useDictionaryStore.mjs +2 -3
  59. package/hooks/useGanttTask.js +1 -1
  60. package/hooks/useGanttTask.mjs +9 -10
  61. package/index.js +2 -1
  62. package/index.mjs +15 -15
  63. package/interfaces/DependencyType.js +1 -1
  64. package/interfaces/DependencyType.mjs +0 -1
  65. package/messages/index.js +1 -1
  66. package/messages/index.mjs +0 -1
  67. package/package-metadata.js +1 -1
  68. package/package-metadata.mjs +2 -3
  69. package/package.json +13 -13
  70. package/rows/GanttRow.js +1 -1
  71. package/rows/GanttRow.mjs +3 -4
  72. package/utils/data-operations.js +1 -1
  73. package/utils/data-operations.mjs +36 -37
  74. package/utils/index.js +1 -1
  75. package/utils/index.mjs +30 -31
  76. package/views/GanttDayView.js +1 -1
  77. package/views/GanttDayView.mjs +0 -1
  78. package/views/GanttMonthView.js +1 -1
  79. package/views/GanttMonthView.mjs +6 -7
  80. package/views/GanttWeekView.js +1 -1
  81. package/views/GanttWeekView.mjs +0 -1
  82. package/views/GanttYearView.js +1 -1
  83. package/views/GanttYearView.mjs +7 -8
package/utils/index.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),c=require("@progress/kendo-date-math"),k=require("@progress/kendo-react-common"),f=require("@progress/kendo-react-data-tools"),L=require("@progress/kendo-react-treelist"),T=require("../constants/index.js");function C(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=C(O),I=f.orderBy,Y=f.filterBy,F=k.mapTree,H=k.extendDataItem,Z=L.createDataTree,P=e=>({fields:{...T.DEFAULT_TASK_MODEL_FIELDS,...e}}),U=e=>({fields:{...T.DEFAULT_DEPENDENCY_MODEL_FIELDS,...e}}),B=e=>c.getDate(e),_=(e,t)=>c.getDate(c.addDays(e,t||1)),q=(e,t,n,o)=>n<t&&e<=o;function M(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}const D=4,S=10,j=(e,t,n,o)=>{const r=[];let s=0,a=0;const d=S,l=Math.floor(n/2),E=e.top<t.top,i=()=>r.push({left:a,top:s});if(o===0||o===3){const g=o===3?"start":"end";s=e.top,a=e[g],i(),a=Math[g==="start"?"min":"max"](e[g],t[g]),a=g==="start"?a-d:a+d,i(),s=t.top,i(),a=g==="start"?t[g]-D:t[g]+D,i(),h(s,a,r,g!=="start")}else{const g=o===2?"start":"end",m=o===2?"end":"start",p=o===2?e[g]-S*2>=t[m]:e[g]+S*2<=t[m];s=e.top,a=e[g],i(),a=g==="start"?a-d:a+d,i(),p||(s=E?s+l:s-l,i(),a=g==="start"?t[m]+d:t[m]-d,i()),s=t.top,i(),a=m==="start"?t[m]-D:t[m]+D,i(),h(s,a,r,m!=="start")}return r},h=(e,t,n,o)=>o?w(e,t,n):z(e,t,n),w=(e,t,n)=>{n.push({top:e-D/2,left:t}),n.push({top:e,left:t-D+1}),n.push({top:e+D/2,left:t}),n.push({top:e,left:t})},z=(e,t,n)=>{n.push({top:e+D/2,left:t}),n.push({top:e,left:t+D-1}),n.push({top:e-D/2,left:t}),n.push({top:e,left:t})},v=e=>{if(e.workWeekStart===void 0||e.workWeekEnd===void 0)return[];const t=[];let n=e.workWeekStart;for(t.push(n);e.workWeekEnd!==n;)n>6?n-=7:n++,t.push(n);return t},A=(e,t)=>{const n=e.getDay();return t.indexOf(n)>-1},y=(e,{step:t,timezone:n})=>{const o=[],r=c.ZonedDate.fromLocalDate(e.start,n),s=c.ZonedDate.fromLocalDate(e.end,n);let a=r.clone();for(;a.getTime()<s.getTime();){const d=a.clone(),l=d.clone().addTime(t),E=new Date(d.getTime()),g={end:new Date(l.getTime()),start:E,zonedStart:d,zonedEnd:l};o.push(g),a=a.addTime(t)}return o},W=(e,{timezone:t},n)=>{const o=[],r=c.ZonedDate.fromLocalDate(e.start,t),s=c.ZonedDate.fromLocalDate(e.end,t);for(let a=r.clone();a.getTime()<s.getTime();){const d=a.clone(),l=_(c.firstDayInWeek(c.getDate(d),n.firstDay()),T.DAYS_IN_WEEK_COUNT),E=c.ZonedDate.fromUTCDate(M(l),t),i=E.getTime()>s.getTime()?s.clone():E;a=i.clone();const g=new Date(d.getTime()),p={end:new Date(i.getTime()),start:g,zonedStart:d,zonedEnd:i};o.push(p)}return o},b=(e,{timezone:t})=>{const n=[],o=c.ZonedDate.fromLocalDate(e.start,t),r=c.ZonedDate.fromLocalDate(e.end,t);for(let s=o.clone();s.getTime()<r.getTime();){const a=s.clone(),d=c.ZonedDate.fromLocalDate(c.addMonths(new Date(a.getTime()),1),t);s=d.clone();const l=new Date(a.getTime()),i={end:new Date(d.getTime()),start:l,zonedStart:a,zonedEnd:d};n.push(i)}return n},R=(e,{timezone:t})=>{const n=[],o=c.ZonedDate.fromLocalDate(e.start,t),r=c.ZonedDate.fromLocalDate(e.end,t);for(let s=o.clone();s.getTime()<r.getTime();){const a=s.clone(),d=c.ZonedDate.fromLocalDate(c.addMonths(new Date(a.getTime()),12),t);s=d.clone();const l=new Date(a.getTime()),i={end:new Date(d.getTime()),start:l,zonedStart:a,zonedEnd:d};n.push(i)}return n},K=(e,t,n)=>{const o=n.parseDate(t.workDayStart).getHours(),r=n.parseDate(t.workDayEnd).getHours();return y(e,{step:c.MS_PER_MINUTE*t.slotDuration,timezone:t.timezone}).map(a=>{const d=a.zonedStart.getHours();return{range:a,isWork:d>=o&&d<r,span:1,text:n.formatDate(a.zonedStart,T.HOUR_DATE_FORMAT),type:"time"}})},$=(e,t,n)=>y(e,{step:c.MS_PER_DAY,timezone:t.timezone}).map(r=>({range:r,isWork:A(r.start,t.workDays),span:1,text:n.formatDate(r.zonedStart,T.DAY_DATE_FORMAT),type:"day"})),G=(e,t,n)=>W(e,{timezone:t.timezone},n).map(r=>{const s=Math.round((r.zonedEnd.getTime()-r.zonedStart.getTime())/c.MS_PER_DAY);return{range:r,isWork:!1,span:s,text:`${n.formatDate(r.zonedStart,T.DAY_DATE_FORMAT)} - ${n.formatDate(r.zonedEnd,T.DAY_DATE_FORMAT)}`,type:"week"}}),J=(e,t,n)=>b(e,{timezone:t.timezone}).map(r=>{const s=Math.round((r.zonedEnd.getTime()-r.zonedStart.getTime())/c.MS_PER_DAY);return{range:r,isWork:!1,span:s,text:n.formatDate(r.zonedStart,T.MONTH_DATE_FORMAT),type:"month"}}),Q=(e,t,n)=>R(e,{timezone:t.timezone}).map(r=>{const s=Math.round((r.zonedEnd.getTime()-r.zonedStart.getTime())/c.MS_PER_DAY);return{range:r,isWork:!1,span:s,text:n.formatDate(r.zonedStart,T.YEAR_DATE_FORMAT),type:"year"}}),V=(e,t,n)=>{const o=n;return u.createElement("table",{className:"k-table k-table-md",ref:t,"aria-hidden":!0},u.createElement("tbody",{className:"k-table-tbody"},e.map((r,s)=>u.createElement("tr",{className:"k-table-row",key:s},r.map((a,d)=>u.createElement("td",{key:a.range.start.getTime(),colSpan:a.span,className:k.classNames("k-table-th",{"k-header":!0,"k-nonwork-hour":!a.isWork})},o?u.createElement(o,{rowIndex:s,index:d,range:a.range,text:a.text,isWork:a.isWork,type:a.type}):a.text))))))},X=(e,t)=>{const n=e[e.length-1];return u.createElement("table",{className:"k-table k-table-md k-gantt-columns",ref:t,"aria-hidden":!0},u.createElement("tbody",{className:"k-table-tbody"},u.createElement("tr",{className:"k-table-row"},n.map(o=>u.createElement("td",{key:o.range.start.getTime(),colSpan:o.span,className:k.classNames("k-table-td",{"k-nonwork-hour":!o.isWork})})))))},ee=(e,t)=>{const n=e[e.length-1];let o=0,r=0;return n.forEach(s=>{const a=s.span;r+=a,a>o&&(o=a)}),Math.round(r*t/o)},x=(e,t)=>!!k.getter(t)(e),N=(e,t)=>!!k.getter(t)(e),te=(e,t)=>n=>x(n,e)&&N(n,t)?[...k.getter(t)(n)]:[];exports.ARROW_SIZE=D;exports.MIN_LINE_WIDTH=S;exports.addArrow=h;exports.addArrowEast=z;exports.addArrowWest=w;exports.createDataTree=Z;exports.dependencyCoordinates=j;exports.expandedChildren=te;exports.extendDataItem=H;exports.filterBy=Y;exports.getDaySlots=$;exports.getDependencyModelFields=U;exports.getEndDate=_;exports.getHourSlots=K;exports.getMonthSlots=J;exports.getStartDate=B;exports.getTaskModelFields=P;exports.getTimelineContent=X;exports.getTimelineHeader=V;exports.getTimelineWidth=ee;exports.getWeekSlots=G;exports.getWorkDays=v;exports.getYearSlots=Q;exports.hasChildren=N;exports.isExpanded=x;exports.isInRange=q;exports.isWorkDay=A;exports.mapTree=F;exports.orderBy=I;exports.toMonthRanges=b;exports.toRanges=y;exports.toUTCDateTime=M;exports.toWeekRanges=W;exports.toYearRanges=R;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),c=require("@progress/kendo-date-math"),k=require("@progress/kendo-react-common"),f=require("@progress/kendo-react-data-tools"),L=require("@progress/kendo-react-treelist"),u=require("../constants/index.js");function C(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const T=C(O),I=f.orderBy,Y=f.filterBy,F=k.mapTree,H=k.extendDataItem,Z=L.createDataTree,P=e=>({fields:{...u.DEFAULT_TASK_MODEL_FIELDS,...e}}),U=e=>({fields:{...u.DEFAULT_DEPENDENCY_MODEL_FIELDS,...e}}),B=e=>c.getDate(e),_=(e,t)=>c.getDate(c.addDays(e,t||1)),q=(e,t,n,o)=>n<t&&e<=o;function M(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}const D=4,S=10,j=(e,t,n,o)=>{const r=[];let s=0,a=0;const d=S,l=Math.floor(n/2),E=e.top<t.top,i=()=>r.push({left:a,top:s});if(o===0||o===3){const g=o===3?"start":"end";s=e.top,a=e[g],i(),a=Math[g==="start"?"min":"max"](e[g],t[g]),a=g==="start"?a-d:a+d,i(),s=t.top,i(),a=g==="start"?t[g]-D:t[g]+D,i(),h(s,a,r,g!=="start")}else{const g=o===2?"start":"end",m=o===2?"end":"start",p=o===2?e[g]-S*2>=t[m]:e[g]+S*2<=t[m];s=e.top,a=e[g],i(),a=g==="start"?a-d:a+d,i(),p||(s=E?s+l:s-l,i(),a=g==="start"?t[m]+d:t[m]-d,i()),s=t.top,i(),a=m==="start"?t[m]-D:t[m]+D,i(),h(s,a,r,m!=="start")}return r},h=(e,t,n,o)=>o?w(e,t,n):z(e,t,n),w=(e,t,n)=>{n.push({top:e-D/2,left:t}),n.push({top:e,left:t-D+1}),n.push({top:e+D/2,left:t}),n.push({top:e,left:t})},z=(e,t,n)=>{n.push({top:e+D/2,left:t}),n.push({top:e,left:t+D-1}),n.push({top:e-D/2,left:t}),n.push({top:e,left:t})},v=e=>{if(e.workWeekStart===void 0||e.workWeekEnd===void 0)return[];const t=[];let n=e.workWeekStart;for(t.push(n);e.workWeekEnd!==n;)n>6?n-=7:n++,t.push(n);return t},A=(e,t)=>{const n=e.getDay();return t.indexOf(n)>-1},y=(e,{step:t,timezone:n})=>{const o=[],r=c.ZonedDate.fromLocalDate(e.start,n),s=c.ZonedDate.fromLocalDate(e.end,n);let a=r.clone();for(;a.getTime()<s.getTime();){const d=a.clone(),l=d.clone().addTime(t),E=new Date(d.getTime()),g={end:new Date(l.getTime()),start:E,zonedStart:d,zonedEnd:l};o.push(g),a=a.addTime(t)}return o},W=(e,{timezone:t},n)=>{const o=[],r=c.ZonedDate.fromLocalDate(e.start,t),s=c.ZonedDate.fromLocalDate(e.end,t);for(let a=r.clone();a.getTime()<s.getTime();){const d=a.clone(),l=_(c.firstDayInWeek(c.getDate(d),n.firstDay()),u.DAYS_IN_WEEK_COUNT),E=c.ZonedDate.fromUTCDate(M(l),t),i=E.getTime()>s.getTime()?s.clone():E;a=i.clone();const g=new Date(d.getTime()),p={end:new Date(i.getTime()),start:g,zonedStart:d,zonedEnd:i};o.push(p)}return o},b=(e,{timezone:t})=>{const n=[],o=c.ZonedDate.fromLocalDate(e.start,t),r=c.ZonedDate.fromLocalDate(e.end,t);for(let s=o.clone();s.getTime()<r.getTime();){const a=s.clone(),d=c.ZonedDate.fromLocalDate(c.addMonths(new Date(a.getTime()),1),t);s=d.clone();const l=new Date(a.getTime()),i={end:new Date(d.getTime()),start:l,zonedStart:a,zonedEnd:d};n.push(i)}return n},R=(e,{timezone:t})=>{const n=[],o=c.ZonedDate.fromLocalDate(e.start,t),r=c.ZonedDate.fromLocalDate(e.end,t);for(let s=o.clone();s.getTime()<r.getTime();){const a=s.clone(),d=c.ZonedDate.fromLocalDate(c.addMonths(new Date(a.getTime()),12),t);s=d.clone();const l=new Date(a.getTime()),i={end:new Date(d.getTime()),start:l,zonedStart:a,zonedEnd:d};n.push(i)}return n},K=(e,t,n)=>{const o=n.parseDate(t.workDayStart).getHours(),r=n.parseDate(t.workDayEnd).getHours();return y(e,{step:c.MS_PER_MINUTE*t.slotDuration,timezone:t.timezone}).map(a=>{const d=a.zonedStart.getHours();return{range:a,isWork:d>=o&&d<r,span:1,text:n.formatDate(a.zonedStart,u.HOUR_DATE_FORMAT),type:"time"}})},$=(e,t,n)=>y(e,{step:c.MS_PER_DAY,timezone:t.timezone}).map(r=>({range:r,isWork:A(r.start,t.workDays),span:1,text:n.formatDate(r.zonedStart,u.DAY_DATE_FORMAT),type:"day"})),G=(e,t,n)=>W(e,{timezone:t.timezone},n).map(r=>{const s=Math.round((r.zonedEnd.getTime()-r.zonedStart.getTime())/c.MS_PER_DAY);return{range:r,isWork:!1,span:s,text:`${n.formatDate(r.zonedStart,u.DAY_DATE_FORMAT)} - ${n.formatDate(r.zonedEnd,u.DAY_DATE_FORMAT)}`,type:"week"}}),J=(e,t,n)=>b(e,{timezone:t.timezone}).map(r=>{const s=Math.round((r.zonedEnd.getTime()-r.zonedStart.getTime())/c.MS_PER_DAY);return{range:r,isWork:!1,span:s,text:n.formatDate(r.zonedStart,u.MONTH_DATE_FORMAT),type:"month"}}),Q=(e,t,n)=>R(e,{timezone:t.timezone}).map(r=>{const s=Math.round((r.zonedEnd.getTime()-r.zonedStart.getTime())/c.MS_PER_DAY);return{range:r,isWork:!1,span:s,text:n.formatDate(r.zonedStart,u.YEAR_DATE_FORMAT),type:"year"}}),V=(e,t,n)=>{const o=n;return T.createElement("table",{className:"k-table k-table-md",ref:t,"aria-hidden":!0},T.createElement("tbody",{className:"k-table-tbody"},e.map((r,s)=>T.createElement("tr",{className:"k-table-row",key:s},r.map((a,d)=>T.createElement("td",{key:a.range.start.getTime(),colSpan:a.span,className:k.classNames("k-table-th",{"k-header":!0,"k-nonwork-hour":!a.isWork})},o?T.createElement(o,{rowIndex:s,index:d,range:a.range,text:a.text,isWork:a.isWork,type:a.type}):a.text))))))},X=(e,t)=>{const n=e[e.length-1];return T.createElement("table",{className:"k-table k-table-md k-gantt-columns",ref:t,"aria-hidden":!0},T.createElement("tbody",{className:"k-table-tbody"},T.createElement("tr",{className:"k-table-row"},n.map(o=>T.createElement("td",{key:o.range.start.getTime(),colSpan:o.span,className:k.classNames("k-table-td",{"k-nonwork-hour":!o.isWork})})))))},ee=(e,t)=>{const n=e[e.length-1];let o=0,r=0;return n.forEach(s=>{const a=s.span;r+=a,a>o&&(o=a)}),Math.round(r*t/o)},x=(e,t)=>!!k.getter(t)(e),N=(e,t)=>!!k.getter(t)(e),te=(e,t)=>n=>x(n,e)&&N(n,t)?[...k.getter(t)(n)]:[];exports.ARROW_SIZE=D;exports.MIN_LINE_WIDTH=S;exports.addArrow=h;exports.addArrowEast=z;exports.addArrowWest=w;exports.createDataTree=Z;exports.dependencyCoordinates=j;exports.expandedChildren=te;exports.extendDataItem=H;exports.filterBy=Y;exports.getDaySlots=$;exports.getDependencyModelFields=U;exports.getEndDate=_;exports.getHourSlots=K;exports.getMonthSlots=J;exports.getStartDate=B;exports.getTaskModelFields=P;exports.getTimelineContent=X;exports.getTimelineHeader=V;exports.getTimelineWidth=ee;exports.getWeekSlots=G;exports.getWorkDays=v;exports.getYearSlots=Q;exports.hasChildren=N;exports.isExpanded=x;exports.isInRange=q;exports.isWorkDay=A;exports.mapTree=F;exports.orderBy=I;exports.toMonthRanges=b;exports.toRanges=y;exports.toUTCDateTime=M;exports.toWeekRanges=W;exports.toYearRanges=R;
package/utils/index.mjs CHANGED
@@ -5,14 +5,13 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as T from "react";
10
9
  import { MS_PER_DAY as E, getDate as S, addDays as W, ZonedDate as g, firstDayInWeek as _, addMonths as y, MS_PER_MINUTE as x } from "@progress/kendo-date-math";
11
10
  import { mapTree as A, extendDataItem as L, getter as f, classNames as z } from "@progress/kendo-react-common";
12
11
  import { orderBy as N, filterBy as b } from "@progress/kendo-react-data-tools";
13
12
  import { createDataTree as C } from "@progress/kendo-react-treelist";
14
13
  import { DEFAULT_TASK_MODEL_FIELDS as I, DEFAULT_DEPENDENCY_MODEL_FIELDS as H, HOUR_DATE_FORMAT as O, DAY_DATE_FORMAT as h, MONTH_DATE_FORMAT as F, YEAR_DATE_FORMAT as B, DAYS_IN_WEEK_COUNT as U } from "../constants/index.mjs";
15
- const te = N, ne = b, ae = A, re = L, oe = C, se = (e) => ({ fields: { ...I, ...e } }), ce = (e) => ({ fields: { ...H, ...e } }), de = (e) => S(e), Y = (e, t) => S(W(e, t || 1)), me = (e, t, n, o) => n < t && e <= o;
14
+ const te = N, ne = b, ae = A, re = L, oe = C, se = (e) => ({ fields: { ...I, ...e } }), de = (e) => ({ fields: { ...H, ...e } }), ce = (e) => S(e), Y = (e, t) => S(W(e, t || 1)), me = (e, t, n, o) => n < t && e <= o;
16
15
  function $(e) {
17
16
  return new Date(
18
17
  Date.UTC(
@@ -29,13 +28,13 @@ function $(e) {
29
28
  const l = 4, p = 10, ie = (e, t, n, o) => {
30
29
  const r = [];
31
30
  let s = 0, a = 0;
32
- const c = p, i = Math.floor(n / 2), u = e.top < t.top, d = () => r.push({ left: a, top: s });
31
+ const d = p, i = Math.floor(n / 2), u = e.top < t.top, c = () => r.push({ left: a, top: s });
33
32
  if (o === 0 || o === 3) {
34
33
  const m = o === 3 ? "start" : "end";
35
- s = e.top, a = e[m], d(), a = Math[m === "start" ? "min" : "max"](e[m], t[m]), a = m === "start" ? a - c : a + c, d(), s = t.top, d(), a = m === "start" ? t[m] - l : t[m] + l, d(), w(s, a, r, m !== "start");
34
+ s = e.top, a = e[m], c(), a = Math[m === "start" ? "min" : "max"](e[m], t[m]), a = m === "start" ? a - d : a + d, c(), s = t.top, c(), a = m === "start" ? t[m] - l : t[m] + l, c(), w(s, a, r, m !== "start");
36
35
  } else {
37
36
  const m = o === 2 ? "start" : "end", D = o === 2 ? "end" : "start", k = o === 2 ? e[m] - p * 2 >= t[D] : e[m] + p * 2 <= t[D];
38
- s = e.top, a = e[m], d(), a = m === "start" ? a - c : a + c, d(), k || (s = u ? s + i : s - i, d(), a = m === "start" ? t[D] + c : t[D] - c, d()), s = t.top, d(), a = D === "start" ? t[D] - l : t[D] + l, d(), w(s, a, r, D !== "start");
37
+ s = e.top, a = e[m], c(), a = m === "start" ? a - d : a + d, c(), k || (s = u ? s + i : s - i, c(), a = m === "start" ? t[D] + d : t[D] - d, c()), s = t.top, c(), a = D === "start" ? t[D] - l : t[D] + l, c(), w(s, a, r, D !== "start");
39
38
  }
40
39
  return r;
41
40
  }, w = (e, t, n, o) => o ? R(e, t, n) : P(e, t, n), R = (e, t, n) => {
@@ -81,10 +80,10 @@ const l = 4, p = 10, ie = (e, t, n, o) => {
81
80
  const o = [], r = g.fromLocalDate(e.start, n), s = g.fromLocalDate(e.end, n);
82
81
  let a = r.clone();
83
82
  for (; a.getTime() < s.getTime(); ) {
84
- const c = a.clone(), i = c.clone().addTime(t), u = new Date(c.getTime()), m = {
83
+ const d = a.clone(), i = d.clone().addTime(t), u = new Date(d.getTime()), m = {
85
84
  end: new Date(i.getTime()),
86
85
  start: u,
87
- zonedStart: c,
86
+ zonedStart: d,
88
87
  zonedEnd: i
89
88
  };
90
89
  o.push(m), a = a.addTime(t);
@@ -93,13 +92,13 @@ const l = 4, p = 10, ie = (e, t, n, o) => {
93
92
  }, Z = (e, { timezone: t }, n) => {
94
93
  const o = [], r = g.fromLocalDate(e.start, t), s = g.fromLocalDate(e.end, t);
95
94
  for (let a = r.clone(); a.getTime() < s.getTime(); ) {
96
- const c = a.clone(), i = Y(_(S(c), n.firstDay()), U), u = g.fromUTCDate($(i), t), d = u.getTime() > s.getTime() ? s.clone() : u;
97
- a = d.clone();
98
- const m = new Date(c.getTime()), k = {
99
- end: new Date(d.getTime()),
95
+ const d = a.clone(), i = Y(_(S(d), n.firstDay()), U), u = g.fromUTCDate($(i), t), c = u.getTime() > s.getTime() ? s.clone() : u;
96
+ a = c.clone();
97
+ const m = new Date(d.getTime()), k = {
98
+ end: new Date(c.getTime()),
100
99
  start: m,
101
- zonedStart: c,
102
- zonedEnd: d
100
+ zonedStart: d,
101
+ zonedEnd: c
103
102
  };
104
103
  o.push(k);
105
104
  }
@@ -107,38 +106,38 @@ const l = 4, p = 10, ie = (e, t, n, o) => {
107
106
  }, v = (e, { timezone: t }) => {
108
107
  const n = [], o = g.fromLocalDate(e.start, t), r = g.fromLocalDate(e.end, t);
109
108
  for (let s = o.clone(); s.getTime() < r.getTime(); ) {
110
- const a = s.clone(), c = g.fromLocalDate(y(new Date(a.getTime()), 1), t);
111
- s = c.clone();
112
- const i = new Date(a.getTime()), d = {
113
- end: new Date(c.getTime()),
109
+ const a = s.clone(), d = g.fromLocalDate(y(new Date(a.getTime()), 1), t);
110
+ s = d.clone();
111
+ const i = new Date(a.getTime()), c = {
112
+ end: new Date(d.getTime()),
114
113
  start: i,
115
114
  zonedStart: a,
116
- zonedEnd: c
115
+ zonedEnd: d
117
116
  };
118
- n.push(d);
117
+ n.push(c);
119
118
  }
120
119
  return n;
121
120
  }, j = (e, { timezone: t }) => {
122
121
  const n = [], o = g.fromLocalDate(e.start, t), r = g.fromLocalDate(e.end, t);
123
122
  for (let s = o.clone(); s.getTime() < r.getTime(); ) {
124
- const a = s.clone(), c = g.fromLocalDate(y(new Date(a.getTime()), 12), t);
125
- s = c.clone();
126
- const i = new Date(a.getTime()), d = {
127
- end: new Date(c.getTime()),
123
+ const a = s.clone(), d = g.fromLocalDate(y(new Date(a.getTime()), 12), t);
124
+ s = d.clone();
125
+ const i = new Date(a.getTime()), c = {
126
+ end: new Date(d.getTime()),
128
127
  start: i,
129
128
  zonedStart: a,
130
- zonedEnd: c
129
+ zonedEnd: d
131
130
  };
132
- n.push(d);
131
+ n.push(c);
133
132
  }
134
133
  return n;
135
134
  }, le = (e, t, n) => {
136
135
  const o = n.parseDate(t.workDayStart).getHours(), r = n.parseDate(t.workDayEnd).getHours();
137
136
  return M(e, { step: x * t.slotDuration, timezone: t.timezone }).map((a) => {
138
- const c = a.zonedStart.getHours();
137
+ const d = a.zonedStart.getHours();
139
138
  return {
140
139
  range: a,
141
- isWork: c >= o && c < r,
140
+ isWork: d >= o && d < r,
142
141
  span: 1,
143
142
  text: n.formatDate(a.zonedStart, O),
144
143
  type: "time"
@@ -182,7 +181,7 @@ const l = 4, p = 10, ie = (e, t, n, o) => {
182
181
  };
183
182
  }), ke = (e, t, n) => {
184
183
  const o = n;
185
- return /* @__PURE__ */ T.createElement("table", { className: "k-table k-table-md", ref: t, "aria-hidden": !0 }, /* @__PURE__ */ T.createElement("tbody", { className: "k-table-tbody" }, e.map((r, s) => /* @__PURE__ */ T.createElement("tr", { className: "k-table-row", key: s }, r.map((a, c) => /* @__PURE__ */ T.createElement(
184
+ return /* @__PURE__ */ T.createElement("table", { className: "k-table k-table-md", ref: t, "aria-hidden": !0 }, /* @__PURE__ */ T.createElement("tbody", { className: "k-table-tbody" }, e.map((r, s) => /* @__PURE__ */ T.createElement("tr", { className: "k-table-row", key: s }, r.map((a, d) => /* @__PURE__ */ T.createElement(
186
185
  "td",
187
186
  {
188
187
  key: a.range.start.getTime(),
@@ -196,7 +195,7 @@ const l = 4, p = 10, ie = (e, t, n, o) => {
196
195
  o,
197
196
  {
198
197
  rowIndex: s,
199
- index: c,
198
+ index: d,
200
199
  range: a.range,
201
200
  text: a.text,
202
201
  isWork: a.isWork,
@@ -236,11 +235,11 @@ export {
236
235
  re as extendDataItem,
237
236
  ne as filterBy,
238
237
  De as getDaySlots,
239
- ce as getDependencyModelFields,
238
+ de as getDependencyModelFields,
240
239
  Y as getEndDate,
241
240
  le as getHourSlots,
242
241
  ue as getMonthSlots,
243
- de as getStartDate,
242
+ ce as getStartDate,
244
243
  se as getTaskModelFields,
245
244
  pe as getTimelineContent,
246
245
  ke as getTimelineHeader,
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),t=require("prop-types"),w=require("@progress/kendo-date-math"),I=require("../components/BaseView.js"),s=require("../utils/index.js"),h=require("../context/GanttContext.js"),m=require("../messages/index.js"),P=require("@progress/kendo-react-intl"),j=require("../constants/index.js");function x(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const a=x(O),S=a.forwardRef((e,o)=>{const{slotWidth:n=r.slotWidth,slotDuration:i=r.slotDuration,firstSlotRangeRef:D,timelineHeaderCell:k}=e,{timezone:l}=h.useGanttPropsContext(),c=P.useInternationalization(),u=a.useRef(null),g=a.useRef(null),C=a.useCallback(f=>{g.current&&g.current.scrollIntoView(f)},[]);a.useImperativeHandle(u,()=>({scrollIntoView:C})),a.useImperativeHandle(o,()=>u.current);const y=h.useGanttDateRangeContext(),T=e.workWeekStart||r.workWeekStart,p=e.workWeekEnd||r.workWeekEnd,E=e.workDayStart||r.workDayStart,W=e.workDayEnd||r.workDayEnd,q=a.useMemo(()=>{const f=s.getWorkDays({workWeekStart:T,workWeekEnd:p}),d=[],b=s.getDaySlots(y,{workDays:f,timezone:l},c);return b.forEach(R=>{const V=s.getHourSlots(R.range,{workDayStart:E,workDayEnd:W,timezone:l,slotDuration:i},c);R.span=V.length,d.push.apply(d,V)}),D&&d[0]&&(D.current=d[0].range),[b,d]},[l,y.start.getTime(),y.end.getTime(),c,T,p,E,W]);return a.createElement(I.BaseView,{ref:g,slotWidth:n,slotLevels:q,timelineHeaderCell:k})}),G=({tasksStart:e,tasksEnd:o,timezone:n})=>{const i=w.ZonedDate.fromLocalDate(e,n),D=w.ZonedDate.fromLocalDate(o,n),k=s.getStartDate(i),l=s.getEndDate(D),c=w.ZonedDate.fromUTCDate(s.toUTCDateTime(k),n),u=w.ZonedDate.fromUTCDate(s.toUTCDateTime(l),n);return{start:new Date(c.getTime()),end:new Date(u.getTime()),zonedStart:c,zonedEnd:u}},r={name:"day",dateRange:G,title:e=>e.toLanguageString(m.dayViewTitle,m.messages[m.dayViewTitle]),slotWidth:j.DEFAULT_COLUMN_WIDTH,slotDuration:60,workWeekStart:1,workWeekEnd:5,workDayStart:"08:00",workDayEnd:"17:00"};S.propTypes={name:t.string,dateRange:t.oneOfType([t.func,t.object]),title:t.oneOfType([t.string,t.func]),slotWidth:t.number,slotDuration:t.number,workWeekStart:t.number,workWeekEnd:t.number,workDayStart:t.string,workDayEnd:t.string};S.displayName="KendoReactGanttDayView";exports.GanttDayView=S;exports.ganttDayViewDefaultProps=r;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),t=require("prop-types"),w=require("@progress/kendo-date-math"),I=require("../components/BaseView.js"),s=require("../utils/index.js"),h=require("../context/GanttContext.js"),m=require("../messages/index.js"),P=require("@progress/kendo-react-intl"),j=require("../constants/index.js");function x(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const a=x(O),S=a.forwardRef((e,o)=>{const{slotWidth:n=r.slotWidth,slotDuration:i=r.slotDuration,firstSlotRangeRef:D,timelineHeaderCell:k}=e,{timezone:l}=h.useGanttPropsContext(),c=P.useInternationalization(),u=a.useRef(null),g=a.useRef(null),C=a.useCallback(f=>{g.current&&g.current.scrollIntoView(f)},[]);a.useImperativeHandle(u,()=>({scrollIntoView:C})),a.useImperativeHandle(o,()=>u.current);const y=h.useGanttDateRangeContext(),T=e.workWeekStart||r.workWeekStart,p=e.workWeekEnd||r.workWeekEnd,E=e.workDayStart||r.workDayStart,W=e.workDayEnd||r.workDayEnd,q=a.useMemo(()=>{const f=s.getWorkDays({workWeekStart:T,workWeekEnd:p}),d=[],b=s.getDaySlots(y,{workDays:f,timezone:l},c);return b.forEach(R=>{const V=s.getHourSlots(R.range,{workDayStart:E,workDayEnd:W,timezone:l,slotDuration:i},c);R.span=V.length,d.push.apply(d,V)}),D&&d[0]&&(D.current=d[0].range),[b,d]},[l,y.start.getTime(),y.end.getTime(),c,T,p,E,W]);return a.createElement(I.BaseView,{ref:g,slotWidth:n,slotLevels:q,timelineHeaderCell:k})}),G=({tasksStart:e,tasksEnd:o,timezone:n})=>{const i=w.ZonedDate.fromLocalDate(e,n),D=w.ZonedDate.fromLocalDate(o,n),k=s.getStartDate(i),l=s.getEndDate(D),c=w.ZonedDate.fromUTCDate(s.toUTCDateTime(k),n),u=w.ZonedDate.fromUTCDate(s.toUTCDateTime(l),n);return{start:new Date(c.getTime()),end:new Date(u.getTime()),zonedStart:c,zonedEnd:u}},r={name:"day",dateRange:G,title:e=>e.toLanguageString(m.dayViewTitle,m.messages[m.dayViewTitle]),slotWidth:j.DEFAULT_COLUMN_WIDTH,slotDuration:60,workWeekStart:1,workWeekEnd:5,workDayStart:"08:00",workDayEnd:"17:00"};S.propTypes={name:t.string,dateRange:t.oneOfType([t.func,t.object]),title:t.oneOfType([t.string,t.func]),slotWidth:t.number,slotDuration:t.number,workWeekStart:t.number,workWeekEnd:t.number,workDayStart:t.string,workDayEnd:t.string};S.displayName="KendoReactGanttDayView";exports.GanttDayView=S;exports.ganttDayViewDefaultProps=r;
@@ -5,7 +5,6 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as o from "react";
10
9
  import t from "prop-types";
11
10
  import { ZonedDate as m } from "@progress/kendo-date-math";
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react"),e=require("prop-types"),o=require("@progress/kendo-date-math"),V=require("../components/BaseView.js"),f=require("../utils/index.js"),T=require("../context/GanttContext.js"),M=require("../constants/index.js"),m=require("../messages/index.js"),O=require("@progress/kendo-react-intl");function C(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return r.default=t,Object.freeze(r)}const a=C(R),w=a.forwardRef((t,r)=>{const{slotWidth:n=h.slotWidth,firstSlotRangeRef:s,timelineHeaderCell:g}=t,{timezone:l}=T.useGanttPropsContext(),u=O.useInternationalization(),d=a.useRef(null),c=a.useRef(null),k=a.useCallback(i=>{c.current&&c.current.scrollIntoView(i)},[]);a.useImperativeHandle(d,()=>({scrollIntoView:k})),a.useImperativeHandle(r,()=>d.current);const D=T.useGanttDateRangeContext(),y=a.useMemo(()=>{const i=[],p=f.getMonthSlots(D,{timezone:l},u);return p.forEach(S=>{const b=f.getWeekSlots(S.range,{timezone:l},u);i.push.apply(i,b)}),s&&i[0]&&(s.current=i[0].range),[p,i]},[l,D.start.getTime(),D.end.getTime(),u]);return a.createElement(V.BaseView,{ref:c,slotWidth:n,slotLevels:y,timelineHeaderCell:g})}),W=({tasksStart:t,tasksEnd:r,timezone:n})=>{const s=o.ZonedDate.fromLocalDate(t,n),g=o.ZonedDate.fromLocalDate(r,n),l=o.firstDayOfMonth(o.getDate(s)),u=o.addDays(o.lastDayOfMonth(o.getDate(g)),1),d=o.ZonedDate.fromUTCDate(f.toUTCDateTime(l),n),c=o.ZonedDate.fromUTCDate(f.toUTCDateTime(u),n);return{start:new Date(d.getTime()),end:new Date(c.getTime()),zonedStart:d,zonedEnd:c}},h={name:"month",dateRange:W,title:t=>t.toLanguageString(m.monthViewTitle,m.messages[m.monthViewTitle]),slotWidth:M.DEFAULT_COLUMN_WIDTH,workWeekStart:1,workWeekEnd:5,workDayStart:"08:00",workDayEnd:"17:00"};w.propTypes={name:e.string,dateRange:e.oneOfType([e.func,e.object]),title:e.oneOfType([e.string,e.func]),slotWidth:e.number,workWeekStart:e.number,workWeekEnd:e.number,workDayStart:e.string,workDayEnd:e.string};w.displayName="GanttMonthView";exports.GanttMonthView=w;exports.ganttMonthViewDefaultProps=h;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react"),e=require("prop-types"),o=require("@progress/kendo-date-math"),V=require("../components/BaseView.js"),f=require("../utils/index.js"),T=require("../context/GanttContext.js"),M=require("../constants/index.js"),m=require("../messages/index.js"),O=require("@progress/kendo-react-intl");function C(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return r.default=t,Object.freeze(r)}const a=C(R),w=a.forwardRef((t,r)=>{const{slotWidth:n=h.slotWidth,firstSlotRangeRef:s,timelineHeaderCell:g}=t,{timezone:l}=T.useGanttPropsContext(),u=O.useInternationalization(),d=a.useRef(null),c=a.useRef(null),k=a.useCallback(i=>{c.current&&c.current.scrollIntoView(i)},[]);a.useImperativeHandle(d,()=>({scrollIntoView:k})),a.useImperativeHandle(r,()=>d.current);const D=T.useGanttDateRangeContext(),y=a.useMemo(()=>{const i=[],p=f.getMonthSlots(D,{timezone:l},u);return p.forEach(S=>{const b=f.getWeekSlots(S.range,{timezone:l},u);i.push.apply(i,b)}),s&&i[0]&&(s.current=i[0].range),[p,i]},[l,D.start.getTime(),D.end.getTime(),u]);return a.createElement(V.BaseView,{ref:c,slotWidth:n,slotLevels:y,timelineHeaderCell:g})}),W=({tasksStart:t,tasksEnd:r,timezone:n})=>{const s=o.ZonedDate.fromLocalDate(t,n),g=o.ZonedDate.fromLocalDate(r,n),l=o.firstDayOfMonth(o.getDate(s)),u=o.addDays(o.lastDayOfMonth(o.getDate(g)),1),d=o.ZonedDate.fromUTCDate(f.toUTCDateTime(l),n),c=o.ZonedDate.fromUTCDate(f.toUTCDateTime(u),n);return{start:new Date(d.getTime()),end:new Date(c.getTime()),zonedStart:d,zonedEnd:c}},h={name:"month",dateRange:W,title:t=>t.toLanguageString(m.monthViewTitle,m.messages[m.monthViewTitle]),slotWidth:M.DEFAULT_COLUMN_WIDTH,workWeekStart:1,workWeekEnd:5,workDayStart:"08:00",workDayEnd:"17:00"};w.propTypes={name:e.string,dateRange:e.oneOfType([e.func,e.object]),title:e.oneOfType([e.string,e.func]),slotWidth:e.number,workWeekStart:e.number,workWeekEnd:e.number,workDayStart:e.string,workDayEnd:e.string};w.displayName="GanttMonthView";exports.GanttMonthView=w;exports.ganttMonthViewDefaultProps=h;
@@ -5,7 +5,6 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as e from "react";
10
9
  import t from "prop-types";
11
10
  import { ZonedDate as c, firstDayOfMonth as S, getDate as g, addDays as V, lastDayOfMonth as W } from "@progress/kendo-date-math";
@@ -16,28 +15,28 @@ import { DEFAULT_COLUMN_WIDTH as L } from "../constants/index.mjs";
16
15
  import { monthViewTitle as D, messages as O } from "../messages/index.mjs";
17
16
  import { useInternationalization as U } from "@progress/kendo-react-intl";
18
17
  const k = e.forwardRef((a, f) => {
19
- const { slotWidth: n = H.slotWidth, firstSlotRangeRef: l, timelineHeaderCell: u } = a, { timezone: s } = b(), i = U(), m = e.useRef(null), r = e.useRef(null), h = e.useCallback((o) => {
18
+ const { slotWidth: n = H.slotWidth, firstSlotRangeRef: l, timelineHeaderCell: d } = a, { timezone: s } = b(), i = U(), m = e.useRef(null), r = e.useRef(null), h = e.useCallback((o) => {
20
19
  r.current && r.current.scrollIntoView(o);
21
20
  }, []);
22
21
  e.useImperativeHandle(m, () => ({ scrollIntoView: h })), e.useImperativeHandle(f, () => m.current);
23
- const d = I(), T = e.useMemo(() => {
24
- const o = [], p = C(d, { timezone: s }, i);
22
+ const u = I(), T = e.useMemo(() => {
23
+ const o = [], p = C(u, { timezone: s }, i);
25
24
  return p.forEach((y) => {
26
25
  const R = M(y.range, { timezone: s }, i);
27
26
  o.push.apply(o, R);
28
27
  }), l && o[0] && (l.current = o[0].range), [p, o];
29
- }, [s, d.start.getTime(), d.end.getTime(), i]);
28
+ }, [s, u.start.getTime(), u.end.getTime(), i]);
30
29
  return /* @__PURE__ */ e.createElement(
31
30
  E,
32
31
  {
33
32
  ref: r,
34
33
  slotWidth: n,
35
34
  slotLevels: T,
36
- timelineHeaderCell: u
35
+ timelineHeaderCell: d
37
36
  }
38
37
  );
39
38
  }), G = ({ tasksStart: a, tasksEnd: f, timezone: n }) => {
40
- const l = c.fromLocalDate(a, n), u = c.fromLocalDate(f, n), s = S(g(l)), i = V(W(g(u)), 1), m = c.fromUTCDate(w(s), n), r = c.fromUTCDate(w(i), n);
39
+ const l = c.fromLocalDate(a, n), d = c.fromLocalDate(f, n), s = S(g(l)), i = V(W(g(d)), 1), m = c.fromUTCDate(w(s), n), r = c.fromUTCDate(w(i), n);
41
40
  return {
42
41
  start: new Date(m.getTime()),
43
42
  end: new Date(r.getTime()),
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("react"),t=require("prop-types"),a=require("@progress/kendo-date-math"),O=require("../components/BaseView.js"),i=require("../utils/index.js"),E=require("../context/GanttContext.js"),R=require("../constants/index.js"),W=require("../messages/index.js"),q=require("@progress/kendo-react-intl");function _(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(s,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return s.default=e,Object.freeze(s)}const o=_(I),y=o.forwardRef((e,s)=>{const{slotWidth:r=D.slotWidth,firstSlotRangeRef:n,timelineHeaderCell:f}=e,{timezone:l}=E.useGanttPropsContext(),u=q.useInternationalization(),k=o.useRef(null),c=o.useRef(null),w=o.useCallback(m=>{c.current&&c.current.scrollIntoView(m)},[]);o.useImperativeHandle(k,()=>({scrollIntoView:w})),o.useImperativeHandle(s,()=>k.current);const g=E.useGanttDateRangeContext(),T=e.workWeekStart||D.workWeekStart,S=e.workWeekEnd||D.workWeekEnd,b=o.useMemo(()=>{const m=i.getWorkDays({workWeekStart:T,workWeekEnd:S}),d=[],p=i.getWeekSlots(g,{timezone:l},u);return p.forEach(V=>{const C=i.getDaySlots(V.range,{workDays:m,timezone:l},u);d.push.apply(d,C)}),n&&d[0]&&(n.current=d[0].range),[p,d]},[l,g.start.getTime(),g.end.getTime(),u,T,S]);return o.createElement(O.BaseView,{ref:c,slotWidth:r,slotLevels:b,timelineHeaderCell:f})}),h=({intl:e,tasksStart:s,tasksEnd:r,timezone:n})=>{const f=a.ZonedDate.fromLocalDate(s,n),l=a.ZonedDate.fromLocalDate(r,n),u=i.getStartDate(a.firstDayInWeek(a.getDate(f),e.firstDay())),k=i.getEndDate(a.firstDayInWeek(a.getDate(l),e.firstDay()),R.DAYS_IN_WEEK_COUNT),c=a.ZonedDate.fromUTCDate(i.toUTCDateTime(u),n),w=a.ZonedDate.fromUTCDate(i.toUTCDateTime(k),n);return{start:new Date(c.getTime()),end:new Date(w.getTime()),zonedStart:c,zonedEnd:w}},D={name:"week",dateRange:h,title:e=>e.toLanguageString(W.weekViewTitle,W.messages[W.weekViewTitle]),slotWidth:R.DEFAULT_COLUMN_WIDTH,workWeekStart:1,workWeekEnd:5,workDayStart:"08:00",workDayEnd:"17:00"};y.propTypes={name:t.string,dateRange:t.oneOfType([t.func,t.object]),title:t.oneOfType([t.string,t.func]),slotWidth:t.number,workWeekStart:t.number,workWeekEnd:t.number,workDayStart:t.string,workDayEnd:t.string};y.displayName="KendoReactGanttWeekView";exports.GanttWeekView=y;exports.ganttWeekViewDefaultProps=D;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("react"),t=require("prop-types"),a=require("@progress/kendo-date-math"),O=require("../components/BaseView.js"),i=require("../utils/index.js"),E=require("../context/GanttContext.js"),R=require("../constants/index.js"),W=require("../messages/index.js"),q=require("@progress/kendo-react-intl");function _(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(s,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return s.default=e,Object.freeze(s)}const o=_(I),y=o.forwardRef((e,s)=>{const{slotWidth:r=D.slotWidth,firstSlotRangeRef:n,timelineHeaderCell:f}=e,{timezone:l}=E.useGanttPropsContext(),u=q.useInternationalization(),k=o.useRef(null),c=o.useRef(null),w=o.useCallback(m=>{c.current&&c.current.scrollIntoView(m)},[]);o.useImperativeHandle(k,()=>({scrollIntoView:w})),o.useImperativeHandle(s,()=>k.current);const g=E.useGanttDateRangeContext(),T=e.workWeekStart||D.workWeekStart,S=e.workWeekEnd||D.workWeekEnd,b=o.useMemo(()=>{const m=i.getWorkDays({workWeekStart:T,workWeekEnd:S}),d=[],p=i.getWeekSlots(g,{timezone:l},u);return p.forEach(V=>{const C=i.getDaySlots(V.range,{workDays:m,timezone:l},u);d.push.apply(d,C)}),n&&d[0]&&(n.current=d[0].range),[p,d]},[l,g.start.getTime(),g.end.getTime(),u,T,S]);return o.createElement(O.BaseView,{ref:c,slotWidth:r,slotLevels:b,timelineHeaderCell:f})}),h=({intl:e,tasksStart:s,tasksEnd:r,timezone:n})=>{const f=a.ZonedDate.fromLocalDate(s,n),l=a.ZonedDate.fromLocalDate(r,n),u=i.getStartDate(a.firstDayInWeek(a.getDate(f),e.firstDay())),k=i.getEndDate(a.firstDayInWeek(a.getDate(l),e.firstDay()),R.DAYS_IN_WEEK_COUNT),c=a.ZonedDate.fromUTCDate(i.toUTCDateTime(u),n),w=a.ZonedDate.fromUTCDate(i.toUTCDateTime(k),n);return{start:new Date(c.getTime()),end:new Date(w.getTime()),zonedStart:c,zonedEnd:w}},D={name:"week",dateRange:h,title:e=>e.toLanguageString(W.weekViewTitle,W.messages[W.weekViewTitle]),slotWidth:R.DEFAULT_COLUMN_WIDTH,workWeekStart:1,workWeekEnd:5,workDayStart:"08:00",workDayEnd:"17:00"};y.propTypes={name:t.string,dateRange:t.oneOfType([t.func,t.object]),title:t.oneOfType([t.string,t.func]),slotWidth:t.number,workWeekStart:t.number,workWeekEnd:t.number,workDayStart:t.string,workDayEnd:t.string};y.displayName="KendoReactGanttWeekView";exports.GanttWeekView=y;exports.ganttWeekViewDefaultProps=D;
@@ -5,7 +5,6 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as o from "react";
10
9
  import e from "prop-types";
11
10
  import { ZonedDate as l, firstDayInWeek as y, getDate as T } from "@progress/kendo-date-math";
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),a=require("prop-types"),n=require("@progress/kendo-date-math"),M=require("../components/BaseView.js"),g=require("../utils/index.js"),y=require("../context/GanttContext.js"),S=require("../constants/index.js"),p=require("../messages/index.js"),C=require("@progress/kendo-react-intl");function q(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const o=q(b),T=o.forwardRef((e,r)=>{const{slotWidth:t=w.slotWidth,firstSlotRangeRef:s,timelineHeaderCell:D}=e,{timezone:i}=y.useGanttPropsContext(),c=C.useInternationalization(),l=o.useRef(null),u=o.useRef(null),h=o.useCallback(d=>{u.current&&u.current.scrollIntoView(d)},[]);o.useImperativeHandle(l,()=>({scrollIntoView:h})),o.useImperativeHandle(r,()=>l.current);const m=y.useGanttDateRangeContext(),R=o.useMemo(()=>{const d=g.getYearSlots(m,{timezone:i},c),f=[];return d.forEach(V=>{const O=g.getMonthSlots(V.range,{timezone:i},c);f.push.apply(f,O)}),s&&f[0]&&(s.current=f[0].range),[d,f]},[i,m.start.getTime(),m.end.getTime(),c]);return o.createElement(M.BaseView,{slotWidth:t,slotLevels:R,timelineHeaderCell:D})}),Y=({tasksStart:e,tasksEnd:r,timezone:t})=>{const s=n.ZonedDate.fromLocalDate(e,t),D=n.ZonedDate.fromLocalDate(r,t),i=n.firstDayOfMonth(n.firstMonthOfYear(n.getDate(s))),c=n.addDays(n.lastDayOfMonth(n.lastMonthOfYear(n.getDate(D))),1),l=n.ZonedDate.fromUTCDate(g.toUTCDateTime(i),t),u=n.ZonedDate.fromUTCDate(g.toUTCDateTime(c),t);return{start:new Date(l.getTime()),end:new Date(u.getTime()),zonedStart:l,zonedEnd:u}},w={name:"year",dateRange:Y,title:e=>e.toLanguageString(p.yearViewTitle,p.messages[p.yearViewTitle]),slotWidth:S.DEFAULT_COLUMN_WIDTH};T.propTypes={name:a.string,dateRange:a.oneOfType([a.func,a.object]),title:a.oneOfType([a.string,a.func]),slotWidth:a.number};T.displayName="GanttYearView";exports.GanttYearView=T;exports.ganttYearViewDefaultProps=w;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),a=require("prop-types"),n=require("@progress/kendo-date-math"),M=require("../components/BaseView.js"),g=require("../utils/index.js"),y=require("../context/GanttContext.js"),S=require("../constants/index.js"),p=require("../messages/index.js"),C=require("@progress/kendo-react-intl");function q(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const o=q(b),T=o.forwardRef((e,r)=>{const{slotWidth:t=w.slotWidth,firstSlotRangeRef:s,timelineHeaderCell:D}=e,{timezone:i}=y.useGanttPropsContext(),c=C.useInternationalization(),l=o.useRef(null),u=o.useRef(null),h=o.useCallback(d=>{u.current&&u.current.scrollIntoView(d)},[]);o.useImperativeHandle(l,()=>({scrollIntoView:h})),o.useImperativeHandle(r,()=>l.current);const m=y.useGanttDateRangeContext(),R=o.useMemo(()=>{const d=g.getYearSlots(m,{timezone:i},c),f=[];return d.forEach(V=>{const O=g.getMonthSlots(V.range,{timezone:i},c);f.push.apply(f,O)}),s&&f[0]&&(s.current=f[0].range),[d,f]},[i,m.start.getTime(),m.end.getTime(),c]);return o.createElement(M.BaseView,{slotWidth:t,slotLevels:R,timelineHeaderCell:D})}),Y=({tasksStart:e,tasksEnd:r,timezone:t})=>{const s=n.ZonedDate.fromLocalDate(e,t),D=n.ZonedDate.fromLocalDate(r,t),i=n.firstDayOfMonth(n.firstMonthOfYear(n.getDate(s))),c=n.addDays(n.lastDayOfMonth(n.lastMonthOfYear(n.getDate(D))),1),l=n.ZonedDate.fromUTCDate(g.toUTCDateTime(i),t),u=n.ZonedDate.fromUTCDate(g.toUTCDateTime(c),t);return{start:new Date(l.getTime()),end:new Date(u.getTime()),zonedStart:l,zonedEnd:u}},w={name:"year",dateRange:Y,title:e=>e.toLanguageString(p.yearViewTitle,p.messages[p.yearViewTitle]),slotWidth:S.DEFAULT_COLUMN_WIDTH};T.propTypes={name:a.string,dateRange:a.oneOfType([a.func,a.object]),title:a.oneOfType([a.string,a.func]),slotWidth:a.number};T.displayName="GanttYearView";exports.GanttYearView=T;exports.ganttYearViewDefaultProps=w;
@@ -5,10 +5,9 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as t from "react";
10
9
  import e from "prop-types";
11
- import { ZonedDate as f, firstDayOfMonth as M, firstMonthOfYear as C, getDate as g, addDays as S, lastDayOfMonth as O, lastMonthOfYear as I } from "@progress/kendo-date-math";
10
+ import { ZonedDate as c, firstDayOfMonth as M, firstMonthOfYear as C, getDate as g, addDays as S, lastDayOfMonth as O, lastMonthOfYear as I } from "@progress/kendo-date-math";
12
11
  import { BaseView as L } from "../components/BaseView.mjs";
13
12
  import { getYearSlots as Y, getMonthSlots as E, toUTCDateTime as D } from "../utils/index.mjs";
14
13
  import { useGanttPropsContext as U, useGanttDateRangeContext as W } from "../context/GanttContext.mjs";
@@ -16,20 +15,20 @@ import { DEFAULT_COLUMN_WIDTH as b } from "../constants/index.mjs";
16
15
  import { yearViewTitle as T, messages as G } from "../messages/index.mjs";
17
16
  import { useInternationalization as H } from "@progress/kendo-react-intl";
18
17
  const h = t.forwardRef((n, p) => {
19
- const { slotWidth: o = v.slotWidth, firstSlotRangeRef: m, timelineHeaderCell: u } = n, { timezone: a } = U(), r = H(), s = t.useRef(null), i = t.useRef(null), y = t.useCallback((c) => {
20
- i.current && i.current.scrollIntoView(c);
18
+ const { slotWidth: o = v.slotWidth, firstSlotRangeRef: m, timelineHeaderCell: u } = n, { timezone: a } = U(), r = H(), s = t.useRef(null), i = t.useRef(null), y = t.useCallback((f) => {
19
+ i.current && i.current.scrollIntoView(f);
21
20
  }, []);
22
21
  t.useImperativeHandle(s, () => ({ scrollIntoView: y })), t.useImperativeHandle(p, () => s.current);
23
22
  const d = W(), w = t.useMemo(() => {
24
- const c = Y(d, { timezone: a }, r), l = [];
25
- return c.forEach((R) => {
23
+ const f = Y(d, { timezone: a }, r), l = [];
24
+ return f.forEach((R) => {
26
25
  const V = E(R.range, { timezone: a }, r);
27
26
  l.push.apply(l, V);
28
- }), m && l[0] && (m.current = l[0].range), [c, l];
27
+ }), m && l[0] && (m.current = l[0].range), [f, l];
29
28
  }, [a, d.start.getTime(), d.end.getTime(), r]);
30
29
  return /* @__PURE__ */ t.createElement(L, { slotWidth: o, slotLevels: w, timelineHeaderCell: u });
31
30
  }), k = ({ tasksStart: n, tasksEnd: p, timezone: o }) => {
32
- const m = f.fromLocalDate(n, o), u = f.fromLocalDate(p, o), a = M(C(g(m))), r = S(O(I(g(u))), 1), s = f.fromUTCDate(D(a), o), i = f.fromUTCDate(D(r), o);
31
+ const m = c.fromLocalDate(n, o), u = c.fromLocalDate(p, o), a = M(C(g(m))), r = S(O(I(g(u))), 1), s = c.fromUTCDate(D(a), o), i = c.fromUTCDate(D(r), o);
33
32
  return {
34
33
  start: new Date(s.getTime()),
35
34
  end: new Date(i.getTime()),