@progress/kendo-react-gantt 8.1.0-develop.8 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,66 +8,66 @@
8
8
  "use client";
9
9
  import * as o from "react";
10
10
  import t from "prop-types";
11
- import { ZonedDate as d } from "@progress/kendo-date-math";
11
+ import { ZonedDate as m } from "@progress/kendo-date-math";
12
12
  import { BaseView as I } from "../components/BaseView.mjs";
13
- import { getWorkDays as L, getDaySlots as H, getHourSlots as U, getStartDate as G, getEndDate as P, toUTCDateTime as h } from "../utils/index.mjs";
14
- import { useGanttPropsContext as v, useGanttDateRangeContext as x } from "../context/GanttContext.mjs";
15
- import { dayViewTitle as V, messages as z } from "../messages/index.mjs";
16
- import { useInternationalization as O } from "@progress/kendo-react-intl";
13
+ import { getWorkDays as L, getDaySlots as H, getHourSlots as U, getStartDate as G, getEndDate as v, toUTCDateTime as R } from "../utils/index.mjs";
14
+ import { useGanttPropsContext as x, useGanttDateRangeContext as z } from "../context/GanttContext.mjs";
15
+ import { dayViewTitle as V, messages as O } from "../messages/index.mjs";
16
+ import { useInternationalization as P } from "@progress/kendo-react-intl";
17
17
  import { DEFAULT_COLUMN_WIDTH as M } from "../constants/index.mjs";
18
- const g = o.forwardRef((e, m) => {
19
- const { slotWidth: n = r.slotWidth, slotDuration: u = r.slotDuration, firstSlotRangeRef: c, timelineHeaderCell: k } = e, { timezone: s } = v(), a = O(), i = o.useRef(null), D = o.useRef(null), C = o.useCallback(
18
+ const h = o.forwardRef((e, D) => {
19
+ const { slotWidth: r = a.slotWidth, slotDuration: d = a.slotDuration, firstSlotRangeRef: c, timelineHeaderCell: k } = e, { timezone: s } = x(), n = P(), i = o.useRef(null), u = o.useRef(null), C = o.useCallback(
20
20
  (f) => {
21
- D.current && D.current.scrollIntoView(f);
21
+ u.current && u.current.scrollIntoView(f);
22
22
  },
23
23
  []
24
24
  );
25
- o.useImperativeHandle(i, () => ({ scrollIntoView: C })), o.useImperativeHandle(m, () => i.current);
26
- const w = x(), y = e.workWeekStart || r.workWeekStart, p = e.workWeekEnd || r.workWeekEnd, S = e.workDayStart || r.workDayStart, T = e.workDayEnd || r.workDayEnd, b = o.useMemo(
25
+ o.useImperativeHandle(i, () => ({ scrollIntoView: C })), o.useImperativeHandle(D, () => i.current);
26
+ const w = z(), g = e.workWeekStart || a.workWeekStart, y = e.workWeekEnd || a.workWeekEnd, p = e.workDayStart || a.workDayStart, S = e.workDayEnd || a.workDayEnd, b = o.useMemo(
27
27
  () => {
28
28
  const f = L({
29
- workWeekStart: y,
30
- workWeekEnd: p
31
- }), l = [], E = H(w, { workDays: f, timezone: s }, a);
32
- return E.forEach((W) => {
33
- const R = U(
34
- W.range,
29
+ workWeekStart: g,
30
+ workWeekEnd: y
31
+ }), l = [], T = H(w, { workDays: f, timezone: s }, n);
32
+ return T.forEach((E) => {
33
+ const W = U(
34
+ E.range,
35
35
  {
36
- workDayStart: S,
37
- workDayEnd: T,
36
+ workDayStart: p,
37
+ workDayEnd: S,
38
38
  timezone: s,
39
- slotDuration: u
39
+ slotDuration: d
40
40
  },
41
- a
41
+ n
42
42
  );
43
- W.span = R.length, l.push.apply(l, R);
44
- }), c && l[0] && (c.current = l[0].range), [E, l];
43
+ E.span = W.length, l.push.apply(l, W);
44
+ }), c && l[0] && (c.current = l[0].range), [T, l];
45
45
  },
46
- [s, w.start.getTime(), w.end.getTime(), a, y, p, S, T]
46
+ [s, w.start.getTime(), w.end.getTime(), n, g, y, p, S]
47
47
  );
48
48
  return /* @__PURE__ */ o.createElement(
49
49
  I,
50
50
  {
51
- ref: D,
52
- slotWidth: n,
51
+ ref: u,
52
+ slotWidth: r,
53
53
  slotLevels: b,
54
54
  timelineHeaderCell: k
55
55
  }
56
56
  );
57
- }), N = ({ tasksStart: e, tasksEnd: m, timezone: n }) => {
58
- const u = d.fromLocalDate(e, n), c = d.fromLocalDate(m, n), k = G(u), s = P(c), a = d.fromUTCDate(h(k), n), i = d.fromUTCDate(h(s), n);
57
+ }), N = ({ tasksStart: e, tasksEnd: D, timezone: r }) => {
58
+ const d = m.fromLocalDate(e, r), c = m.fromLocalDate(D, r), k = G(d), s = v(c), n = m.fromUTCDate(R(k), r), i = m.fromUTCDate(R(s), r);
59
59
  return {
60
60
  // Sat May 31 2014 07:00:00 GMT+0300 (Eastern European Summer Time)
61
- start: new Date(a.getTime()),
61
+ start: new Date(n.getTime()),
62
62
  end: new Date(i.getTime()),
63
63
  // Sat May 31 2014 00:00:00 GMT-0400 (EDT)
64
- zonedStart: a,
64
+ zonedStart: n,
65
65
  zonedEnd: i
66
66
  };
67
- }, r = {
67
+ }, a = {
68
68
  name: "day",
69
69
  dateRange: N,
70
- title: (e) => e.toLanguageString(V, z[V]),
70
+ title: (e) => e.toLanguageString(V, O[V]),
71
71
  slotWidth: M,
72
72
  slotDuration: 60,
73
73
  workWeekStart: 1,
@@ -75,8 +75,7 @@ const g = o.forwardRef((e, m) => {
75
75
  workDayStart: "08:00",
76
76
  workDayEnd: "17:00"
77
77
  };
78
- g.defaultProps = r;
79
- g.propTypes = {
78
+ h.propTypes = {
80
79
  name: t.string,
81
80
  dateRange: t.oneOfType([t.func, t.object]),
82
81
  title: t.oneOfType([t.string, t.func]),
@@ -87,8 +86,8 @@ g.propTypes = {
87
86
  workDayStart: t.string,
88
87
  workDayEnd: t.string
89
88
  };
90
- g.displayName = "KendoReactGanttDayView";
89
+ h.displayName = "KendoReactGanttDayView";
91
90
  export {
92
- g as GanttDayView,
93
- r as defaultProps
91
+ h as GanttDayView,
92
+ a as ganttDayViewDefaultProps
94
93
  };
@@ -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"),k=require("../context/GanttContext.js"),M=require("../constants/index.js"),w=require("../messages/index.js"),O=require("@progress/kendo-react-intl");function C(t){const a=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(a,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const r=C(R),g=r.forwardRef((t,a)=>{const{slotWidth:n=p.slotWidth,firstSlotRangeRef:s,timelineHeaderCell:m}=t,{timezone:l}=k.useGanttPropsContext(),u=O.useInternationalization(),d=r.useRef(null),c=r.useRef(null),y=r.useCallback(i=>{c.current&&c.current.scrollIntoView(i)},[]);r.useImperativeHandle(d,()=>({scrollIntoView:y})),r.useImperativeHandle(a,()=>d.current);const D=k.useGanttDateRangeContext(),h=r.useMemo(()=>{const i=[],T=f.getMonthSlots(D,{timezone:l},u);return T.forEach(S=>{const b=f.getWeekSlots(S.range,{timezone:l},u);i.push.apply(i,b)}),s&&i[0]&&(s.current=i[0].range),[T,i]},[l,D.start.getTime(),D.end.getTime(),u]);return r.createElement(V.BaseView,{ref:c,slotWidth:n,slotLevels:h,timelineHeaderCell:m})}),W=({tasksStart:t,tasksEnd:a,timezone:n})=>{const s=o.ZonedDate.fromLocalDate(t,n),m=o.ZonedDate.fromLocalDate(a,n),l=o.firstDayOfMonth(o.getDate(s)),u=o.addDays(o.lastDayOfMonth(o.getDate(m)),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}},p={name:"month",dateRange:W,title:t=>t.toLanguageString(w.monthViewTitle,w.messages[w.monthViewTitle]),slotWidth:M.DEFAULT_COLUMN_WIDTH,workWeekStart:1,workWeekEnd:5,workDayStart:"08:00",workDayEnd:"17:00"};g.defaultProps=p;g.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};g.displayName="GanttMonthView";exports.GanttMonthView=g;exports.defaultProps=p;
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,64 +8,63 @@
8
8
  "use client";
9
9
  import * as e from "react";
10
10
  import t from "prop-types";
11
- import { ZonedDate as c, firstDayOfMonth as W, getDate as w, addDays as E, lastDayOfMonth as V } from "@progress/kendo-date-math";
12
- import { BaseView as C } from "../components/BaseView.mjs";
13
- import { getMonthSlots as M, getWeekSlots as b, toUTCDateTime as D } from "../utils/index.mjs";
14
- import { useGanttPropsContext as I, useGanttDateRangeContext as L } from "../context/GanttContext.mjs";
15
- import { DEFAULT_COLUMN_WIDTH as O } from "../constants/index.mjs";
16
- import { monthViewTitle as k, messages as U } from "../messages/index.mjs";
17
- import { useInternationalization as G } from "@progress/kendo-react-intl";
18
- const p = e.forwardRef((a, f) => {
19
- const { slotWidth: n = T.slotWidth, firstSlotRangeRef: l, timelineHeaderCell: d } = a, { timezone: s } = I(), i = G(), m = e.useRef(null), r = e.useRef(null), h = e.useCallback(
11
+ import { ZonedDate as c, firstDayOfMonth as S, getDate as g, addDays as V, lastDayOfMonth as W } from "@progress/kendo-date-math";
12
+ import { BaseView as E } from "../components/BaseView.mjs";
13
+ import { getMonthSlots as C, getWeekSlots as M, toUTCDateTime as w } from "../utils/index.mjs";
14
+ import { useGanttPropsContext as b, useGanttDateRangeContext as I } from "../context/GanttContext.mjs";
15
+ import { DEFAULT_COLUMN_WIDTH as L } from "../constants/index.mjs";
16
+ import { monthViewTitle as D, messages as O } from "../messages/index.mjs";
17
+ import { useInternationalization as U } from "@progress/kendo-react-intl";
18
+ 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(
20
20
  (o) => {
21
21
  r.current && r.current.scrollIntoView(o);
22
22
  },
23
23
  []
24
24
  );
25
25
  e.useImperativeHandle(m, () => ({ scrollIntoView: h })), e.useImperativeHandle(f, () => m.current);
26
- const u = L(), y = e.useMemo(
26
+ const d = I(), T = e.useMemo(
27
27
  () => {
28
- const o = [], g = M(u, { timezone: s }, i);
29
- return g.forEach((R) => {
30
- const S = b(
31
- R.range,
28
+ const o = [], p = C(d, { timezone: s }, i);
29
+ return p.forEach((y) => {
30
+ const R = M(
31
+ y.range,
32
32
  { timezone: s },
33
33
  i
34
34
  );
35
- o.push.apply(o, S);
36
- }), l && o[0] && (l.current = o[0].range), [g, o];
35
+ o.push.apply(o, R);
36
+ }), l && o[0] && (l.current = o[0].range), [p, o];
37
37
  },
38
- [s, u.start.getTime(), u.end.getTime(), i]
38
+ [s, d.start.getTime(), d.end.getTime(), i]
39
39
  );
40
40
  return /* @__PURE__ */ e.createElement(
41
- C,
41
+ E,
42
42
  {
43
43
  ref: r,
44
44
  slotWidth: n,
45
- slotLevels: y,
46
- timelineHeaderCell: d
45
+ slotLevels: T,
46
+ timelineHeaderCell: u
47
47
  }
48
48
  );
49
- }), H = ({ tasksStart: a, tasksEnd: f, timezone: n }) => {
50
- const l = c.fromLocalDate(a, n), d = c.fromLocalDate(f, n), s = W(w(l)), i = E(V(w(d)), 1), m = c.fromUTCDate(D(s), n), r = c.fromUTCDate(D(i), n);
49
+ }), G = ({ tasksStart: a, tasksEnd: f, timezone: n }) => {
50
+ 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);
51
51
  return {
52
52
  start: new Date(m.getTime()),
53
53
  end: new Date(r.getTime()),
54
54
  zonedStart: m,
55
55
  zonedEnd: r
56
56
  };
57
- }, T = {
57
+ }, H = {
58
58
  name: "month",
59
- dateRange: H,
60
- title: (a) => a.toLanguageString(k, U[k]),
61
- slotWidth: O,
59
+ dateRange: G,
60
+ title: (a) => a.toLanguageString(D, O[D]),
61
+ slotWidth: L,
62
62
  workWeekStart: 1,
63
63
  workWeekEnd: 5,
64
64
  workDayStart: "08:00",
65
65
  workDayEnd: "17:00"
66
66
  };
67
- p.defaultProps = T;
68
- p.propTypes = {
67
+ k.propTypes = {
69
68
  name: t.string,
70
69
  dateRange: t.oneOfType([t.func, t.object]),
71
70
  title: t.oneOfType([t.string, t.func]),
@@ -75,8 +74,8 @@ p.propTypes = {
75
74
  workDayStart: t.string,
76
75
  workDayEnd: t.string
77
76
  };
78
- p.displayName = "GanttMonthView";
77
+ k.displayName = "GanttMonthView";
79
78
  export {
80
- p as GanttMonthView,
81
- T as defaultProps
79
+ k as GanttMonthView,
80
+ H as ganttMonthViewDefaultProps
82
81
  };
@@ -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"),T=require("../messages/index.js"),q=require("@progress/kendo-react-intl");function P(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=P(I),D=o.forwardRef((e,s)=>{const{slotWidth:r=k.slotWidth,firstSlotRangeRef:n,timelineHeaderCell:g}=e,{timezone:l}=E.useGanttPropsContext(),u=q.useInternationalization(),f=o.useRef(null),c=o.useRef(null),w=o.useCallback(y=>{c.current&&c.current.scrollIntoView(y)},[]);o.useImperativeHandle(f,()=>({scrollIntoView:w})),o.useImperativeHandle(s,()=>f.current);const m=E.useGanttDateRangeContext(),W=e.workWeekStart||k.workWeekStart,S=e.workWeekEnd||k.workWeekEnd,b=o.useMemo(()=>{const y=i.getWorkDays({workWeekStart:W,workWeekEnd:S}),d=[],p=i.getWeekSlots(m,{timezone:l},u);return p.forEach(V=>{const C=i.getDaySlots(V.range,{workDays:y,timezone:l},u);d.push.apply(d,C)}),n&&d[0]&&(n.current=d[0].range),[p,d]},[l,m.start.getTime(),m.end.getTime(),u,W,S]);return o.createElement(O.BaseView,{ref:c,slotWidth:r,slotLevels:b,timelineHeaderCell:g})}),_=({intl:e,tasksStart:s,tasksEnd:r,timezone:n})=>{const g=a.ZonedDate.fromLocalDate(s,n),l=a.ZonedDate.fromLocalDate(r,n),u=i.getStartDate(a.firstDayInWeek(a.getDate(g),e.firstDay())),f=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(f),n);return{start:new Date(c.getTime()),end:new Date(w.getTime()),zonedStart:c,zonedEnd:w}},k={name:"week",dateRange:_,title:e=>e.toLanguageString(T.weekViewTitle,T.messages[T.weekViewTitle]),slotWidth:R.DEFAULT_COLUMN_WIDTH,workWeekStart:1,workWeekEnd:5,workDayStart:"08:00",workDayEnd:"17:00"};D.defaultProps=k;D.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};D.displayName="KendoReactGanttWeekView";exports.GanttWeekView=D;exports.defaultProps=k;
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,63 +8,62 @@
8
8
  "use client";
9
9
  import * as o from "react";
10
10
  import e from "prop-types";
11
- import { ZonedDate as k, firstDayInWeek as T, getDate as S } from "@progress/kendo-date-math";
11
+ import { ZonedDate as l, firstDayInWeek as y, getDate as T } from "@progress/kendo-date-math";
12
12
  import { BaseView as b } from "../components/BaseView.mjs";
13
- import { getWorkDays as h, getWeekSlots as L, getDaySlots as U, getStartDate as _, getEndDate as G, toUTCDateTime as E } from "../utils/index.mjs";
13
+ import { getWeekSlots as h, getDaySlots as L, getWorkDays as U, getStartDate as _, getEndDate as G, toUTCDateTime as S } from "../utils/index.mjs";
14
14
  import { useGanttPropsContext as H, useGanttDateRangeContext as N } from "../context/GanttContext.mjs";
15
- import { DEFAULT_COLUMN_WIDTH as O, DAYS_IN_WEEK_COUNT as P } from "../constants/index.mjs";
16
- import { weekViewTitle as R, messages as v } from "../messages/index.mjs";
17
- import { useInternationalization as x } from "@progress/kendo-react-intl";
18
- const g = o.forwardRef((t, f) => {
19
- const { slotWidth: d = m.slotWidth, firstSlotRangeRef: r, timelineHeaderCell: w } = t, { timezone: a } = H(), s = x(), c = o.useRef(null), n = o.useRef(null), l = o.useCallback(
15
+ import { DEFAULT_COLUMN_WIDTH as O, DAYS_IN_WEEK_COUNT as v } from "../constants/index.mjs";
16
+ import { weekViewTitle as E, messages as x } from "../messages/index.mjs";
17
+ import { useInternationalization as z } from "@progress/kendo-react-intl";
18
+ const R = o.forwardRef((t, m) => {
19
+ const { slotWidth: f = g.slotWidth, firstSlotRangeRef: r, timelineHeaderCell: w } = t, { timezone: a } = H(), s = z(), c = o.useRef(null), n = o.useRef(null), k = o.useCallback(
20
20
  (D) => {
21
21
  n.current && n.current.scrollIntoView(D);
22
22
  },
23
23
  []
24
24
  );
25
- o.useImperativeHandle(c, () => ({ scrollIntoView: l })), o.useImperativeHandle(f, () => c.current);
26
- const u = N(), p = t.workWeekStart || m.workWeekStart, W = t.workWeekEnd || m.workWeekEnd, C = o.useMemo(
25
+ o.useImperativeHandle(c, () => ({ scrollIntoView: k })), o.useImperativeHandle(m, () => c.current);
26
+ const d = N(), u = t.workWeekStart || g.workWeekStart, W = t.workWeekEnd || g.workWeekEnd, V = o.useMemo(
27
27
  () => {
28
- const D = h({
29
- workWeekStart: p,
28
+ const D = U({
29
+ workWeekStart: u,
30
30
  workWeekEnd: W
31
- }), i = [], y = L(u, { timezone: a }, s);
32
- return y.forEach((V) => {
33
- const I = U(V.range, { workDays: D, timezone: a }, s);
31
+ }), i = [], p = h(d, { timezone: a }, s);
32
+ return p.forEach((C) => {
33
+ const I = L(C.range, { workDays: D, timezone: a }, s);
34
34
  i.push.apply(i, I);
35
- }), r && i[0] && (r.current = i[0].range), [y, i];
35
+ }), r && i[0] && (r.current = i[0].range), [p, i];
36
36
  },
37
- [a, u.start.getTime(), u.end.getTime(), s, p, W]
37
+ [a, d.start.getTime(), d.end.getTime(), s, u, W]
38
38
  );
39
39
  return /* @__PURE__ */ o.createElement(
40
40
  b,
41
41
  {
42
42
  ref: n,
43
- slotWidth: d,
44
- slotLevels: C,
43
+ slotWidth: f,
44
+ slotLevels: V,
45
45
  timelineHeaderCell: w
46
46
  }
47
47
  );
48
- }), z = ({ intl: t, tasksStart: f, tasksEnd: d, timezone: r }) => {
49
- const w = k.fromLocalDate(f, r), a = k.fromLocalDate(d, r), s = _(T(S(w), t.firstDay())), c = G(T(S(a), t.firstDay()), P), n = k.fromUTCDate(E(s), r), l = k.fromUTCDate(E(c), r);
48
+ }), P = ({ intl: t, tasksStart: m, tasksEnd: f, timezone: r }) => {
49
+ const w = l.fromLocalDate(m, r), a = l.fromLocalDate(f, r), s = _(y(T(w), t.firstDay())), c = G(y(T(a), t.firstDay()), v), n = l.fromUTCDate(S(s), r), k = l.fromUTCDate(S(c), r);
50
50
  return {
51
51
  start: new Date(n.getTime()),
52
- end: new Date(l.getTime()),
52
+ end: new Date(k.getTime()),
53
53
  zonedStart: n,
54
- zonedEnd: l
54
+ zonedEnd: k
55
55
  };
56
- }, m = {
56
+ }, g = {
57
57
  name: "week",
58
- dateRange: z,
59
- title: (t) => t.toLanguageString(R, v[R]),
58
+ dateRange: P,
59
+ title: (t) => t.toLanguageString(E, x[E]),
60
60
  slotWidth: O,
61
61
  workWeekStart: 1,
62
62
  workWeekEnd: 5,
63
63
  workDayStart: "08:00",
64
64
  workDayEnd: "17:00"
65
65
  };
66
- g.defaultProps = m;
67
- g.propTypes = {
66
+ R.propTypes = {
68
67
  name: e.string,
69
68
  dateRange: e.oneOfType([e.func, e.object]),
70
69
  title: e.oneOfType([e.string, e.func]),
@@ -74,8 +73,8 @@ g.propTypes = {
74
73
  workDayStart: e.string,
75
74
  workDayEnd: e.string
76
75
  };
77
- g.displayName = "KendoReactGanttWeekView";
76
+ R.displayName = "KendoReactGanttWeekView";
78
77
  export {
79
- g as GanttWeekView,
80
- m as defaultProps
78
+ R as GanttWeekView,
79
+ g as ganttWeekViewDefaultProps
81
80
  };
@@ -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 M=require("react"),a=require("prop-types"),n=require("@progress/kendo-date-math"),S=require("../components/BaseView.js"),g=require("../utils/index.js"),h=require("../context/GanttContext.js"),V=require("../constants/index.js"),T=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(M),m=o.forwardRef((e,r)=>{const{slotWidth:t=y.slotWidth,firstSlotRangeRef:s,timelineHeaderCell:p}=e,{timezone:i}=h.useGanttPropsContext(),c=C.useInternationalization(),l=o.useRef(null),u=o.useRef(null),w=o.useCallback(f=>{u.current&&u.current.scrollIntoView(f)},[]);o.useImperativeHandle(l,()=>({scrollIntoView:w})),o.useImperativeHandle(r,()=>l.current);const D=h.useGanttDateRangeContext(),R=o.useMemo(()=>{const f=g.getYearSlots(D,{timezone:i},c),d=[];return f.forEach(O=>{const b=g.getMonthSlots(O.range,{timezone:i},c);d.push.apply(d,b)}),s&&d[0]&&(s.current=d[0].range),[f,d]},[i,D.start.getTime(),D.end.getTime(),c]);return o.createElement(S.BaseView,{slotWidth:t,slotLevels:R,timelineHeaderCell:p})}),P=({tasksStart:e,tasksEnd:r,timezone:t})=>{const s=n.ZonedDate.fromLocalDate(e,t),p=n.ZonedDate.fromLocalDate(r,t),i=n.firstDayOfMonth(n.firstMonthOfYear(n.getDate(s))),c=n.addDays(n.lastDayOfMonth(n.lastMonthOfYear(n.getDate(p))),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}},y={name:"year",dateRange:P,title:e=>e.toLanguageString(T.yearViewTitle,T.messages[T.yearViewTitle]),slotWidth:V.DEFAULT_COLUMN_WIDTH};m.defaultProps=y;m.propTypes={name:a.string,dateRange:a.oneOfType([a.func,a.object]),title:a.oneOfType([a.string,a.func]),slotWidth:a.number};m.displayName="GanttYearView";exports.GanttYearView=m;exports.defaultProps=y;
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,66 +8,65 @@
8
8
  "use client";
9
9
  import * as t from "react";
10
10
  import e from "prop-types";
11
- import { ZonedDate as c, firstDayOfMonth as C, firstMonthOfYear as S, getDate as T, addDays as O, lastDayOfMonth as I, lastMonthOfYear as L } from "@progress/kendo-date-math";
12
- import { BaseView as E } from "../components/BaseView.mjs";
13
- import { getYearSlots as U, getMonthSlots as W, toUTCDateTime as D } from "../utils/index.mjs";
14
- import { useGanttPropsContext as Y, useGanttDateRangeContext as b } from "../context/GanttContext.mjs";
15
- import { DEFAULT_COLUMN_WIDTH as G } from "../constants/index.mjs";
16
- import { yearViewTitle as h, messages as H } from "../messages/index.mjs";
17
- import { useInternationalization as P } from "@progress/kendo-react-intl";
18
- const g = t.forwardRef((n, p) => {
19
- const { slotWidth: o = y.slotWidth, firstSlotRangeRef: f, timelineHeaderCell: u } = n, { timezone: a } = Y(), r = P(), s = t.useRef(null), i = t.useRef(null), w = t.useCallback(
20
- (m) => {
21
- i.current && i.current.scrollIntoView(m);
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";
12
+ import { BaseView as L } from "../components/BaseView.mjs";
13
+ import { getYearSlots as Y, getMonthSlots as E, toUTCDateTime as D } from "../utils/index.mjs";
14
+ import { useGanttPropsContext as U, useGanttDateRangeContext as W } from "../context/GanttContext.mjs";
15
+ import { DEFAULT_COLUMN_WIDTH as b } from "../constants/index.mjs";
16
+ import { yearViewTitle as T, messages as G } from "../messages/index.mjs";
17
+ import { useInternationalization as H } from "@progress/kendo-react-intl";
18
+ 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
+ (c) => {
21
+ i.current && i.current.scrollIntoView(c);
22
22
  },
23
23
  []
24
24
  );
25
- t.useImperativeHandle(s, () => ({ scrollIntoView: w })), t.useImperativeHandle(p, () => s.current);
26
- const d = b(), R = t.useMemo(
25
+ t.useImperativeHandle(s, () => ({ scrollIntoView: y })), t.useImperativeHandle(p, () => s.current);
26
+ const d = W(), w = t.useMemo(
27
27
  () => {
28
- const m = U(d, { timezone: a }, r), l = [];
29
- return m.forEach((M) => {
30
- const V = W(
31
- M.range,
28
+ const c = Y(d, { timezone: a }, r), l = [];
29
+ return c.forEach((R) => {
30
+ const V = E(
31
+ R.range,
32
32
  { timezone: a },
33
33
  r
34
34
  );
35
35
  l.push.apply(l, V);
36
- }), f && l[0] && (f.current = l[0].range), [m, l];
36
+ }), m && l[0] && (m.current = l[0].range), [c, l];
37
37
  },
38
38
  [a, d.start.getTime(), d.end.getTime(), r]
39
39
  );
40
40
  return /* @__PURE__ */ t.createElement(
41
- E,
41
+ L,
42
42
  {
43
43
  slotWidth: o,
44
- slotLevels: R,
44
+ slotLevels: w,
45
45
  timelineHeaderCell: u
46
46
  }
47
47
  );
48
48
  }), k = ({ tasksStart: n, tasksEnd: p, timezone: o }) => {
49
- const f = c.fromLocalDate(n, o), u = c.fromLocalDate(p, o), a = C(S(T(f))), r = O(I(L(T(u))), 1), s = c.fromUTCDate(D(a), o), i = c.fromUTCDate(D(r), o);
49
+ 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);
50
50
  return {
51
51
  start: new Date(s.getTime()),
52
52
  end: new Date(i.getTime()),
53
53
  zonedStart: s,
54
54
  zonedEnd: i
55
55
  };
56
- }, y = {
56
+ }, v = {
57
57
  name: "year",
58
58
  dateRange: k,
59
- title: (n) => n.toLanguageString(h, H[h]),
60
- slotWidth: G
59
+ title: (n) => n.toLanguageString(T, G[T]),
60
+ slotWidth: b
61
61
  };
62
- g.defaultProps = y;
63
- g.propTypes = {
62
+ h.propTypes = {
64
63
  name: e.string,
65
64
  dateRange: e.oneOfType([e.func, e.object]),
66
65
  title: e.oneOfType([e.string, e.func]),
67
66
  slotWidth: e.number
68
67
  };
69
- g.displayName = "GanttYearView";
68
+ h.displayName = "GanttYearView";
70
69
  export {
71
- g as GanttYearView,
72
- y as defaultProps
70
+ h as GanttYearView,
71
+ v as ganttYearViewDefaultProps
73
72
  };