@progress/kendo-react-gantt 9.4.0-develop.1 → 9.4.0-develop.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Gantt.js +1 -1
- package/Gantt.mjs +0 -1
- package/cells/FilterCells/GanttBooleanFilter.js +1 -1
- package/cells/FilterCells/GanttBooleanFilter.mjs +0 -1
- package/cells/FilterCells/GanttDateFilter.js +1 -1
- package/cells/FilterCells/GanttDateFilter.mjs +3 -4
- package/cells/FilterCells/GanttNumericFilter.js +1 -1
- package/cells/FilterCells/GanttNumericFilter.mjs +5 -6
- package/cells/FilterCells/GanttTextFilter.js +1 -1
- package/cells/FilterCells/GanttTextFilter.mjs +3 -4
- package/cells/FilterCells/utils.js +1 -1
- package/cells/FilterCells/utils.mjs +3 -4
- package/components/BaseView.js +1 -1
- package/components/BaseView.mjs +0 -1
- package/components/GanttDependency.js +1 -1
- package/components/GanttDependency.mjs +9 -10
- package/components/GanttTask.js +1 -1
- package/components/GanttTask.mjs +0 -1
- package/components/GanttTreelist.js +1 -1
- package/components/GanttTreelist.mjs +0 -1
- package/components/toolbar/AddButton.js +1 -1
- package/components/toolbar/AddButton.mjs +7 -8
- package/components/toolbar/Toolbar.js +1 -1
- package/components/toolbar/Toolbar.mjs +0 -1
- package/components/toolbar/view-selector/ViewSelector.js +1 -1
- package/components/toolbar/view-selector/ViewSelector.mjs +6 -7
- package/components/toolbar/view-selector/ViewSelectorItem.js +1 -1
- package/components/toolbar/view-selector/ViewSelectorItem.mjs +4 -5
- package/components/toolbar/view-selector/ViewSelectorList.js +1 -1
- package/components/toolbar/view-selector/ViewSelectorList.mjs +3 -4
- package/constants/index.js +1 -1
- package/constants/index.mjs +4 -5
- package/context/GanttContext.js +1 -1
- package/context/GanttContext.mjs +0 -1
- package/context/GanttViewContext.js +1 -1
- package/context/GanttViewContext.mjs +0 -1
- package/dist/cdn/js/kendo-react-gantt.js +8 -1
- package/editors/FormDateTimePicker.js +1 -1
- package/editors/FormDateTimePicker.mjs +6 -7
- package/editors/FormDropDownList.js +1 -1
- package/editors/FormDropDownList.mjs +4 -5
- package/editors/FormInput.js +1 -1
- package/editors/FormInput.mjs +3 -4
- package/editors/FormNumericTextBox.js +1 -1
- package/editors/FormNumericTextBox.mjs +6 -7
- package/editors/GanttEditor.js +1 -1
- package/editors/GanttEditor.mjs +0 -1
- package/editors/GanttEditorPredecessors.js +1 -1
- package/editors/GanttEditorPredecessors.mjs +0 -1
- package/editors/GanttEditorSuccessors.js +1 -1
- package/editors/GanttEditorSuccessors.mjs +10 -11
- package/editors/GanttForm.js +1 -1
- package/editors/GanttForm.mjs +7 -8
- package/editors/GanttRemoveDialog.js +1 -1
- package/editors/GanttRemoveDialog.mjs +5 -6
- package/hooks/useControlledState.js +1 -1
- package/hooks/useControlledState.mjs +4 -5
- package/hooks/useDictionaryStore.js +1 -1
- package/hooks/useDictionaryStore.mjs +2 -3
- package/hooks/useGanttTask.js +1 -1
- package/hooks/useGanttTask.mjs +9 -10
- package/index.js +2 -1
- package/index.mjs +15 -15
- package/interfaces/DependencyType.js +1 -1
- package/interfaces/DependencyType.mjs +0 -1
- package/messages/index.js +1 -1
- package/messages/index.mjs +0 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +13 -13
- package/rows/GanttRow.js +1 -1
- package/rows/GanttRow.mjs +3 -4
- package/utils/data-operations.js +1 -1
- package/utils/data-operations.mjs +36 -37
- package/utils/index.js +1 -1
- package/utils/index.mjs +30 -31
- package/views/GanttDayView.js +1 -1
- package/views/GanttDayView.mjs +0 -1
- package/views/GanttMonthView.js +1 -1
- package/views/GanttMonthView.mjs +6 -7
- package/views/GanttWeekView.js +1 -1
- package/views/GanttWeekView.mjs +0 -1
- package/views/GanttYearView.js +1 -1
- package/views/GanttYearView.mjs +7 -8
package/views/GanttDayView.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
|
|
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;
|
package/views/GanttDayView.mjs
CHANGED
|
@@ -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";
|
package/views/GanttMonthView.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
|
|
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;
|
package/views/GanttMonthView.mjs
CHANGED
|
@@ -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:
|
|
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
|
|
24
|
-
const o = [], p = C(
|
|
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,
|
|
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:
|
|
35
|
+
timelineHeaderCell: d
|
|
37
36
|
}
|
|
38
37
|
);
|
|
39
38
|
}), G = ({ tasksStart: a, tasksEnd: f, timezone: n }) => {
|
|
40
|
-
const l = c.fromLocalDate(a, 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()),
|
package/views/GanttWeekView.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
|
|
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;
|
package/views/GanttWeekView.mjs
CHANGED
|
@@ -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";
|
package/views/GanttYearView.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
|
|
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;
|
package/views/GanttYearView.mjs
CHANGED
|
@@ -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
|
|
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((
|
|
20
|
-
i.current && i.current.scrollIntoView(
|
|
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
|
|
25
|
-
return
|
|
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), [
|
|
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 =
|
|
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()),
|