@progress/kendo-react-gantt 7.1.0-develop.6 → 7.1.0-develop.8

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/index.mjs CHANGED
@@ -4,39 +4,44 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use client";
6
6
  import * as t from "react";
7
- import i from "prop-types";
8
- import { mapTree as va, extendDataItem as Ta, getter as D, classNames as de, noop as M, useDraggable as Kt, IconWrap as mt, canUseDOM as gt, useId as Bt, validatePackage as ba, shouldShowValidationUI as Ra, WatermarkOverlay as Sa, setter as te } from "@progress/kendo-react-common";
9
- import { MS_PER_MINUTE as xa, MS_PER_DAY as Oe, getDate as re, addDays as ht, ZonedDate as R, firstDayInWeek as at, addMonths as Qt, firstDayOfMonth as en, lastDayOfMonth as tn, firstMonthOfYear as Ia, lastMonthOfYear as Na } from "@progress/kendo-date-math";
10
- import { TABLE_ROW_INDEX_ATTRIBUTE as Ma, TABLE_COL_INDEX_ATTRIBUTE as Fa, TABLE_PREVENT_SELECTION_ELEMENT as La, orderBy as Ha, filterBy as Aa, tableKeyboardNavigation as we, getSelectionOptions as $t, CommonDragLogic as Va, ColumnResize as za, tableKeyboardNavigationTools as Ut, Header as Ga, HeaderRow as Wa, tableColumnsVirtualization as Oa, TableKeyboardNavigationContext as nn, tableKeyboardNavigationScopeAttributes as Pa, TableSelection as _a, tableKeyboardNavigationBodyAttributes as Ka, DropClue as Ba, DragClue as $a, FilterRow as Ua, readColumns as Ya, mapColumns as qa, TextFilterCell as Xa, NumericFilterCell as ja, BooleanFilterCell as Za, DateFilterCell as Ja } from "@progress/kendo-react-data-tools";
11
- import { getSelectedState as Ks, getSelectedStateFromKeyDown as Bs, setSelectedState as $s } from "@progress/kendo-react-data-tools";
12
- import { createDataTree as Qa, setHeaderRowsTop as eo, tableRowsVirtualization as to, TreeListRow as an, TreeListNoRecords as no, TreeListCell as ao, flatData as oo } from "@progress/kendo-react-treelist";
13
- import { useInternationalization as xe, useLocalization as oe } from "@progress/kendo-react-intl";
14
- import { xIcon as so, caretAltDownIcon as ro, plusIcon as lo } from "@progress/kendo-svg-icons";
15
- import { Button as ze, ButtonGroup as io, DropDownButton as on, ToolbarItem as co, Toolbar as uo, ToolbarSpacer as mo } from "@progress/kendo-react-buttons";
16
- import * as sn from "react-dom";
17
- import { FieldWrapper as ft, FormElement as go, Field as He, Form as ho } from "@progress/kendo-react-form";
18
- import { Dialog as rn, DialogActionsBar as ln } from "@progress/kendo-react-dialogs";
19
- import { Label as pt, Hint as Ct, Error as kt } from "@progress/kendo-react-labels";
20
- import { Input as fo, NumericTextBox as po } from "@progress/kendo-react-inputs";
21
- import { DateTimePicker as Co } from "@progress/kendo-react-dateinputs";
22
- const Ss = Ma, xs = Fa, Is = La, Yt = (/* @__PURE__ */ new Date()).getTime(), cn = 7, ko = "hh:mm a", ot = { skeleton: "MEd" }, Eo = "MMM", Do = "yyyy", Ie = 100, wo = 6, Ge = "data-dependency-drag-handle", yo = "start", vo = "finish", qt = { [Ge]: yo }, Xt = { [Ge]: vo }, We = "data-task-id", dn = {
7
+ import u from "prop-types";
8
+ import { mapTree as ja, extendDataItem as Za, getter as T, classNames as ie, noop as W, useDraggable as nn, IconWrap as fn, canUseDOM as St, useId as an, validatePackage as Ja, shouldShowValidationUI as Qa, WatermarkOverlay as eo, setter as ne, guid as mt } from "@progress/kendo-react-common";
9
+ import { MS_PER_MINUTE as to, MS_PER_DAY as Ue, getDate as pe, addDays as bt, ZonedDate as L, firstDayInWeek as ft, addMonths as pn, firstDayOfMonth as Cn, lastDayOfMonth as kn, firstMonthOfYear as no, lastMonthOfYear as ao } from "@progress/kendo-date-math";
10
+ import { TABLE_ROW_INDEX_ATTRIBUTE as oo, TABLE_COL_INDEX_ATTRIBUTE as ro, TABLE_PREVENT_SELECTION_ELEMENT as so, orderBy as lo, filterBy as io, tableKeyboardNavigation as Re, getSelectionOptions as on, CommonDragLogic as co, ColumnResize as uo, tableKeyboardNavigationTools as rn, Header as mo, HeaderRow as go, tableColumnsVirtualization as ho, TableKeyboardNavigationContext as Dn, tableKeyboardNavigationScopeAttributes as fo, TableSelection as po, tableKeyboardNavigationBodyAttributes as Co, DropClue as ko, DragClue as Do, FilterRow as Eo, readColumns as yo, mapColumns as vo, TextFilterCell as wo, NumericFilterCell as To, BooleanFilterCell as So, DateFilterCell as bo } from "@progress/kendo-react-data-tools";
11
+ import { getSelectedState as zs, getSelectedStateFromKeyDown as Ps, setSelectedState as Gs } from "@progress/kendo-react-data-tools";
12
+ import { createDataTree as Io, setHeaderRowsTop as Ro, tableRowsVirtualization as xo, TreeListRow as En, TreeListNoRecords as Mo, TreeListCell as No, flatData as yn } from "@progress/kendo-react-treelist";
13
+ import { useInternationalization as Ae, useLocalization as ce } from "@progress/kendo-react-intl";
14
+ import { xIcon as Fo, plusIcon as It, minusIcon as vn, saveIcon as Lo, cancelIcon as Ao, trashIcon as Ho } from "@progress/kendo-svg-icons";
15
+ import { Button as me, ButtonGroup as Vo, ToolbarItem as zo, Toolbar as Po, DropDownButton as Go, ToolbarSpacer as Wo } from "@progress/kendo-react-buttons";
16
+ import * as wn from "react-dom";
17
+ import { FieldWrapper as qe, FormElement as sn, Field as fe, Form as Oo } from "@progress/kendo-react-form";
18
+ import { Window as _o, WindowActionsBar as Bo, Dialog as Ko, DialogActionsBar as $o } from "@progress/kendo-react-dialogs";
19
+ import { Label as Ye, Hint as Xe, Error as je } from "@progress/kendo-react-labels";
20
+ import { Input as Uo, NumericTextBox as qo } from "@progress/kendo-react-inputs";
21
+ import { TabStrip as Yo, TabStripTab as gt } from "@progress/kendo-react-layout";
22
+ import { DateTimePicker as Xo } from "@progress/kendo-react-dateinputs";
23
+ import { findByFieldValue as re, DropDownList as He } from "@progress/kendo-react-dropdowns";
24
+ import { Grid as Tn, GridToolbar as Sn, GridColumn as Be } from "@progress/kendo-react-grid";
25
+ import { orderBy as bn, filterBy as In } from "@progress/kendo-data-query";
26
+ const ys = oo, vs = ro, ws = so, ln = (/* @__PURE__ */ new Date()).getTime(), Rn = 7, jo = "hh:mm a", pt = { skeleton: "MEd" }, Zo = "MMM", Jo = "yyyy", Ve = 100, Qo = 6, Ke = "data-dependency-drag-handle", er = "start", tr = "finish", cn = { [Ke]: er }, dn = { [Ke]: tr }, $e = "data-task-id", xn = {
23
27
  id: "id",
24
28
  start: "start",
25
29
  end: "end",
26
30
  title: "title",
27
31
  percentComplete: "percentComplete",
32
+ parentId: "parentId",
28
33
  isRollup: "isRollup",
29
34
  isExpanded: "isExpanded",
30
35
  isInEdit: "isInEdit",
31
36
  children: "children",
32
37
  isSelected: "isSelected"
33
- }, un = {
38
+ }, Mn = {
34
39
  id: "id",
35
40
  fromId: "fromId",
36
41
  toId: "toId",
37
42
  type: "type"
38
- }, Ns = Ha, Ms = Aa, Et = va, Fs = Ta, Ls = Qa, To = (e) => ({ fields: { ...dn, ...e } }), bo = (e) => ({ fields: { ...un, ...e } }), mn = (e) => re(e), Dt = (e, a) => re(ht(e, a || 1)), Ro = (e, a, n, o) => n < a && e <= o;
39
- function le(e) {
43
+ }, Ts = lo, Ss = io, Ze = ja, bs = Za, Is = Io, nr = (e) => ({ fields: { ...xn, ...e } }), ar = (e) => ({ fields: { ...Mn, ...e } }), Nn = (e) => pe(e), Rt = (e, a) => pe(bt(e, a || 1)), or = (e, a, n, r) => n < a && e <= r;
44
+ function Ce(e) {
40
45
  return new Date(Date.UTC(
41
46
  e.getFullYear(),
42
47
  e.getMonth(),
@@ -47,47 +52,47 @@ function le(e) {
47
52
  e.getMilliseconds()
48
53
  ));
49
54
  }
50
- const ne = 4, nt = 10, So = (e, a, n, o) => {
51
- const r = [];
52
- let l = 0, s = 0;
53
- const c = nt, m = Math.floor(n / 2), g = e.top < a.top, d = () => r.push({ left: s, top: l });
54
- if (o === 0 || o === 3) {
55
- const u = o === 3 ? "start" : "end";
56
- l = e.top, s = e[u], d(), s = Math[u === "start" ? "min" : "max"](e[u], a[u]), s = u === "start" ? s - c : s + c, d(), l = a.top, d(), s = u === "start" ? a[u] - ne : a[u] + ne, d(), jt(l, s, r, u !== "start");
55
+ const ge = 4, ht = 10, rr = (e, a, n, r) => {
56
+ const s = [];
57
+ let o = 0, l = 0;
58
+ const i = ht, g = Math.floor(n / 2), d = e.top < a.top, m = () => s.push({ left: l, top: o });
59
+ if (r === 0 || r === 3) {
60
+ const c = r === 3 ? "start" : "end";
61
+ o = e.top, l = e[c], m(), l = Math[c === "start" ? "min" : "max"](e[c], a[c]), l = c === "start" ? l - i : l + i, m(), o = a.top, m(), l = c === "start" ? a[c] - ge : a[c] + ge, m(), un(o, l, s, c !== "start");
57
62
  } else {
58
- const u = o === 2 ? "start" : "end", h = o === 2 ? "end" : "start", p = o === 2 ? e[u] - nt * 2 >= a[h] : e[u] + nt * 2 <= a[h];
59
- l = e.top, s = e[u], d(), s = u === "start" ? s - c : s + c, d(), p || (l = g ? l + m : l - m, d(), s = u === "start" ? a[h] + c : a[h] - c, d()), l = a.top, d(), s = h === "start" ? a[h] - ne : a[h] + ne, d(), jt(l, s, r, h !== "start");
63
+ const c = r === 2 ? "start" : "end", h = r === 2 ? "end" : "start", C = r === 2 ? e[c] - ht * 2 >= a[h] : e[c] + ht * 2 <= a[h];
64
+ o = e.top, l = e[c], m(), l = c === "start" ? l - i : l + i, m(), C || (o = d ? o + g : o - g, m(), l = c === "start" ? a[h] + i : a[h] - i, m()), o = a.top, m(), l = h === "start" ? a[h] - ge : a[h] + ge, m(), un(o, l, s, h !== "start");
60
65
  }
61
- return r;
62
- }, jt = (e, a, n, o) => o ? xo(e, a, n) : Io(e, a, n), xo = (e, a, n) => {
66
+ return s;
67
+ }, un = (e, a, n, r) => r ? sr(e, a, n) : lr(e, a, n), sr = (e, a, n) => {
63
68
  n.push({
64
- top: e - ne / 2,
69
+ top: e - ge / 2,
65
70
  left: a
66
71
  }), n.push({
67
72
  top: e,
68
- left: a - ne + 1
73
+ left: a - ge + 1
69
74
  }), n.push({
70
- top: e + ne / 2,
75
+ top: e + ge / 2,
71
76
  left: a
72
77
  }), n.push({
73
78
  top: e,
74
79
  left: a
75
80
  });
76
- }, Io = (e, a, n) => {
81
+ }, lr = (e, a, n) => {
77
82
  n.push({
78
- top: e + ne / 2,
83
+ top: e + ge / 2,
79
84
  left: a
80
85
  }), n.push({
81
86
  top: e,
82
- left: a + ne - 1
87
+ left: a + ge - 1
83
88
  }), n.push({
84
- top: e - ne / 2,
89
+ top: e - ge / 2,
85
90
  left: a
86
91
  }), n.push({
87
92
  top: e,
88
93
  left: a
89
94
  });
90
- }, gn = (e) => {
95
+ }, Fn = (e) => {
91
96
  if (e.workWeekStart === void 0 || e.workWeekEnd === void 0)
92
97
  return [];
93
98
  const a = [];
@@ -95,243 +100,243 @@ const ne = 4, nt = 10, So = (e, a, n, o) => {
95
100
  for (a.push(n); e.workWeekEnd !== n; )
96
101
  n > 6 ? n -= 7 : n++, a.push(n);
97
102
  return a;
98
- }, No = (e, a) => {
103
+ }, ir = (e, a) => {
99
104
  const n = e.getDay();
100
105
  return a.indexOf(n) > -1;
101
- }, hn = (e, { step: a, timezone: n }) => {
102
- const o = [], r = R.fromLocalDate(e.start, n), l = R.fromLocalDate(e.end, n);
103
- let s = r.clone();
104
- for (; s.getTime() < l.getTime(); ) {
105
- const c = s.clone(), m = c.clone().addTime(a), g = new Date(c.getTime()), u = {
106
- end: new Date(m.getTime()),
107
- start: g,
108
- zonedStart: c,
109
- zonedEnd: m
106
+ }, Ln = (e, { step: a, timezone: n }) => {
107
+ const r = [], s = L.fromLocalDate(e.start, n), o = L.fromLocalDate(e.end, n);
108
+ let l = s.clone();
109
+ for (; l.getTime() < o.getTime(); ) {
110
+ const i = l.clone(), g = i.clone().addTime(a), d = new Date(i.getTime()), c = {
111
+ end: new Date(g.getTime()),
112
+ start: d,
113
+ zonedStart: i,
114
+ zonedEnd: g
110
115
  };
111
- o.push(u), s = s.addTime(a);
116
+ r.push(c), l = l.addTime(a);
112
117
  }
113
- return o;
114
- }, Mo = (e, { timezone: a }, n) => {
115
- const o = [], r = R.fromLocalDate(e.start, a), l = R.fromLocalDate(e.end, a);
116
- for (let s = r.clone(), c = 0; s.getTime() < l.getTime(); c++) {
117
- const m = s.clone(), g = Dt(at(re(m), n.firstDay()), cn), d = R.fromUTCDate(le(g), a), u = d.getTime() > l.getTime() ? l.clone() : d;
118
- s = u.clone();
119
- const h = new Date(m.getTime()), C = {
120
- end: new Date(u.getTime()),
118
+ return r;
119
+ }, cr = (e, { timezone: a }, n) => {
120
+ const r = [], s = L.fromLocalDate(e.start, a), o = L.fromLocalDate(e.end, a);
121
+ for (let l = s.clone(), i = 0; l.getTime() < o.getTime(); i++) {
122
+ const g = l.clone(), d = Rt(ft(pe(g), n.firstDay()), Rn), m = L.fromUTCDate(Ce(d), a), c = m.getTime() > o.getTime() ? o.clone() : m;
123
+ l = c.clone();
124
+ const h = new Date(g.getTime()), f = {
125
+ end: new Date(c.getTime()),
121
126
  start: h,
122
- zonedStart: m,
123
- zonedEnd: u
127
+ zonedStart: g,
128
+ zonedEnd: c
124
129
  };
125
- o.push(C);
130
+ r.push(f);
126
131
  }
127
- return o;
128
- }, Fo = (e, { timezone: a }) => {
129
- const n = [], o = R.fromLocalDate(e.start, a), r = R.fromLocalDate(e.end, a);
130
- for (let l = o.clone(), s = 0; l.getTime() < r.getTime(); s++) {
131
- const c = l.clone(), m = R.fromLocalDate(Qt(new Date(c.getTime()), 1), a);
132
- l = m.clone();
133
- const g = new Date(c.getTime()), u = {
134
- end: new Date(m.getTime()),
135
- start: g,
136
- zonedStart: c,
137
- zonedEnd: m
132
+ return r;
133
+ }, dr = (e, { timezone: a }) => {
134
+ const n = [], r = L.fromLocalDate(e.start, a), s = L.fromLocalDate(e.end, a);
135
+ for (let o = r.clone(), l = 0; o.getTime() < s.getTime(); l++) {
136
+ const i = o.clone(), g = L.fromLocalDate(pn(new Date(i.getTime()), 1), a);
137
+ o = g.clone();
138
+ const d = new Date(i.getTime()), c = {
139
+ end: new Date(g.getTime()),
140
+ start: d,
141
+ zonedStart: i,
142
+ zonedEnd: g
138
143
  };
139
- n.push(u);
144
+ n.push(c);
140
145
  }
141
146
  return n;
142
- }, Lo = (e, { timezone: a }) => {
143
- const n = [], o = R.fromLocalDate(e.start, a), r = R.fromLocalDate(e.end, a);
144
- for (let l = o.clone(), s = 0; l.getTime() < r.getTime(); s++) {
145
- const c = l.clone(), m = R.fromLocalDate(Qt(new Date(c.getTime()), 12), a);
146
- l = m.clone();
147
- const g = new Date(c.getTime()), u = {
148
- end: new Date(m.getTime()),
149
- start: g,
150
- zonedStart: c,
151
- zonedEnd: m
147
+ }, ur = (e, { timezone: a }) => {
148
+ const n = [], r = L.fromLocalDate(e.start, a), s = L.fromLocalDate(e.end, a);
149
+ for (let o = r.clone(), l = 0; o.getTime() < s.getTime(); l++) {
150
+ const i = o.clone(), g = L.fromLocalDate(pn(new Date(i.getTime()), 12), a);
151
+ o = g.clone();
152
+ const d = new Date(i.getTime()), c = {
153
+ end: new Date(g.getTime()),
154
+ start: d,
155
+ zonedStart: i,
156
+ zonedEnd: g
152
157
  };
153
- n.push(u);
158
+ n.push(c);
154
159
  }
155
160
  return n;
156
- }, Ho = (e, a, n) => {
157
- const o = n.parseDate(a.workDayStart).getHours(), r = n.parseDate(a.workDayEnd).getHours();
158
- return hn(e, { step: xa * a.slotDuration, timezone: a.timezone }).map((s) => {
159
- const c = s.zonedStart.getHours();
161
+ }, mr = (e, a, n) => {
162
+ const r = n.parseDate(a.workDayStart).getHours(), s = n.parseDate(a.workDayEnd).getHours();
163
+ return Ln(e, { step: to * a.slotDuration, timezone: a.timezone }).map((l) => {
164
+ const i = l.zonedStart.getHours();
160
165
  return {
161
- range: s,
162
- isWork: c >= o && c < r,
166
+ range: l,
167
+ isWork: i >= r && i < s,
163
168
  span: 1,
164
- text: n.formatDate(s.zonedStart, ko),
169
+ text: n.formatDate(l.zonedStart, jo),
165
170
  type: "time"
166
171
  };
167
172
  });
168
- }, fn = (e, a, n) => hn(e, { step: Oe, timezone: a.timezone }).map((r) => ({
169
- range: r,
170
- isWork: No(r.start, a.workDays),
173
+ }, An = (e, a, n) => Ln(e, { step: Ue, timezone: a.timezone }).map((s) => ({
174
+ range: s,
175
+ isWork: ir(s.start, a.workDays),
171
176
  span: 1,
172
- text: n.formatDate(r.zonedStart, ot),
177
+ text: n.formatDate(s.zonedStart, pt),
173
178
  type: "day"
174
- })), pn = (e, a, n) => Mo(e, { timezone: a.timezone }, n).map((r) => {
175
- const l = Math.round((r.zonedEnd.getTime() - r.zonedStart.getTime()) / Oe);
179
+ })), Hn = (e, a, n) => cr(e, { timezone: a.timezone }, n).map((s) => {
180
+ const o = Math.round((s.zonedEnd.getTime() - s.zonedStart.getTime()) / Ue);
176
181
  return {
177
- range: r,
182
+ range: s,
178
183
  isWork: !1,
179
- span: l,
180
- text: `${n.formatDate(r.zonedStart, ot)} - ${n.formatDate(r.zonedEnd, ot)}`,
184
+ span: o,
185
+ text: `${n.formatDate(s.zonedStart, pt)} - ${n.formatDate(s.zonedEnd, pt)}`,
181
186
  type: "week"
182
187
  };
183
- }), Cn = (e, a, n) => Fo(e, { timezone: a.timezone }).map((r) => {
184
- const l = Math.round((r.zonedEnd.getTime() - r.zonedStart.getTime()) / Oe);
188
+ }), Vn = (e, a, n) => dr(e, { timezone: a.timezone }).map((s) => {
189
+ const o = Math.round((s.zonedEnd.getTime() - s.zonedStart.getTime()) / Ue);
185
190
  return {
186
- range: r,
191
+ range: s,
187
192
  isWork: !1,
188
- span: l,
189
- text: n.formatDate(r.zonedStart, Eo),
193
+ span: o,
194
+ text: n.formatDate(s.zonedStart, Zo),
190
195
  type: "month"
191
196
  };
192
- }), Ao = (e, a, n) => Lo(e, { timezone: a.timezone }).map((r) => {
193
- const l = Math.round((r.zonedEnd.getTime() - r.zonedStart.getTime()) / Oe);
197
+ }), gr = (e, a, n) => ur(e, { timezone: a.timezone }).map((s) => {
198
+ const o = Math.round((s.zonedEnd.getTime() - s.zonedStart.getTime()) / Ue);
194
199
  return {
195
- range: r,
200
+ range: s,
196
201
  isWork: !1,
197
- span: l,
198
- text: n.formatDate(r.zonedStart, Do),
202
+ span: o,
203
+ text: n.formatDate(s.zonedStart, Jo),
199
204
  type: "year"
200
205
  };
201
- }), Vo = (e, a, n) => {
202
- const o = n;
203
- return /* @__PURE__ */ t.createElement("table", { className: "k-table k-table-md", ref: a, "aria-hidden": !0 }, /* @__PURE__ */ t.createElement("tbody", { className: "k-table-tbody" }, e.map((r, l) => /* @__PURE__ */ t.createElement("tr", { className: "k-table-row", key: l }, r.map((s, c) => /* @__PURE__ */ t.createElement(
206
+ }), hr = (e, a, n) => {
207
+ const r = n;
208
+ return /* @__PURE__ */ t.createElement("table", { className: "k-table k-table-md", ref: a, "aria-hidden": !0 }, /* @__PURE__ */ t.createElement("tbody", { className: "k-table-tbody" }, e.map((s, o) => /* @__PURE__ */ t.createElement("tr", { className: "k-table-row", key: o }, s.map((l, i) => /* @__PURE__ */ t.createElement(
204
209
  "td",
205
210
  {
206
- key: s.range.start.getTime(),
207
- colSpan: s.span,
208
- className: de(
211
+ key: l.range.start.getTime(),
212
+ colSpan: l.span,
213
+ className: ie(
209
214
  "k-table-th",
210
215
  {
211
216
  "k-header": !0,
212
- "k-nonwork-hour": !s.isWork
217
+ "k-nonwork-hour": !l.isWork
213
218
  }
214
219
  )
215
220
  },
216
- o ? /* @__PURE__ */ t.createElement(
217
- o,
221
+ r ? /* @__PURE__ */ t.createElement(
222
+ r,
218
223
  {
219
- rowIndex: l,
220
- index: c,
221
- range: s.range,
222
- text: s.text,
223
- isWork: s.isWork,
224
- type: s.type
224
+ rowIndex: o,
225
+ index: i,
226
+ range: l.range,
227
+ text: l.text,
228
+ isWork: l.isWork,
229
+ type: l.type
225
230
  }
226
- ) : s.text
231
+ ) : l.text
227
232
  ))))));
228
- }, zo = (e, a) => {
233
+ }, fr = (e, a) => {
229
234
  const n = e[e.length - 1];
230
- return /* @__PURE__ */ t.createElement("table", { className: "k-table k-table-md k-gantt-columns", ref: a, "aria-hidden": !0 }, /* @__PURE__ */ t.createElement("tbody", { className: "k-table-tbody" }, /* @__PURE__ */ t.createElement("tr", { className: "k-table-row" }, n.map((o) => /* @__PURE__ */ t.createElement(
235
+ return /* @__PURE__ */ t.createElement("table", { className: "k-table k-table-md k-gantt-columns", ref: a, "aria-hidden": !0 }, /* @__PURE__ */ t.createElement("tbody", { className: "k-table-tbody" }, /* @__PURE__ */ t.createElement("tr", { className: "k-table-row" }, n.map((r) => /* @__PURE__ */ t.createElement(
231
236
  "td",
232
237
  {
233
- key: o.range.start.getTime(),
234
- colSpan: o.span,
235
- className: de(
238
+ key: r.range.start.getTime(),
239
+ colSpan: r.span,
240
+ className: ie(
236
241
  "k-table-td",
237
242
  {
238
- "k-nonwork-hour": !o.isWork
243
+ "k-nonwork-hour": !r.isWork
239
244
  }
240
245
  )
241
246
  }
242
247
  )))));
243
- }, Go = (e, a) => {
248
+ }, pr = (e, a) => {
244
249
  const n = e[e.length - 1];
245
- let o = 0, r = 0;
246
- return n.forEach((l) => {
247
- const s = l.span;
248
- r += s, s > o && (o = s);
249
- }), Math.round(r * a / o);
250
- }, st = (e, a) => !!D(a)(e), kn = (e, a) => !!D(a)(e), Wo = (e, a) => (n) => st(n, e) && kn(n, a) ? [...D(a)(n)] : [], wt = t.createContext([]), Oo = () => t.useContext(wt);
251
- wt.displayName = "KendoReactGanttTaskDataContext";
252
- const yt = t.createContext([]), Po = () => t.useContext(yt);
253
- yt.displayName = "KendoReactGanttDependencyDataContext";
254
- const vt = t.createContext(dn), Tt = () => t.useContext(vt);
255
- vt.displayName = "KendoReactGanttTaskModelFieldsContext";
256
- const bt = t.createContext(un), En = () => t.useContext(bt);
257
- bt.displayName = "KendoReactGanttDependencyModelFieldsContext";
258
- const Rt = t.createContext({}), Ne = () => t.useContext(Rt);
259
- Rt.displayName = "KendoReactGanttPropsContext";
260
- const St = t.createContext({
250
+ let r = 0, s = 0;
251
+ return n.forEach((o) => {
252
+ const l = o.span;
253
+ s += l, l > r && (r = l);
254
+ }), Math.round(s * a / r);
255
+ }, Ct = (e, a) => !!T(a)(e), zn = (e, a) => !!T(a)(e), Cr = (e, a) => (n) => Ct(n, e) && zn(n, a) ? [...T(a)(n)] : [], xt = t.createContext([]), kr = () => t.useContext(xt);
256
+ xt.displayName = "KendoReactGanttTaskDataContext";
257
+ const Mt = t.createContext([]), Dr = () => t.useContext(Mt);
258
+ Mt.displayName = "KendoReactGanttDependencyDataContext";
259
+ const Nt = t.createContext(xn), Ft = () => t.useContext(Nt);
260
+ Nt.displayName = "KendoReactGanttTaskModelFieldsContext";
261
+ const Lt = t.createContext(Mn), Pn = () => t.useContext(Lt);
262
+ Lt.displayName = "KendoReactGanttDependencyModelFieldsContext";
263
+ const At = t.createContext({}), ze = () => t.useContext(At);
264
+ At.displayName = "KendoReactGanttPropsContext";
265
+ const Ht = t.createContext({
261
266
  start: /* @__PURE__ */ new Date(),
262
267
  end: /* @__PURE__ */ new Date(),
263
- zonedStart: R.fromLocalDate(/* @__PURE__ */ new Date()),
264
- zonedEnd: R.fromLocalDate(/* @__PURE__ */ new Date())
265
- }), Me = () => t.useContext(St);
266
- St.displayName = "KendoReactGanttDateRangeContext";
267
- const xt = t.createContext([]), _o = () => t.useContext(xt);
268
- xt.displayName = "KendoReactGanttViewsContext";
269
- const It = t.createContext(["week", M]), Dn = () => t.useContext(It);
270
- It.displayName = "KendoReactGanttActiveViewContext";
271
- const Nt = t.createContext(0), wn = () => t.useContext(Nt);
272
- Nt.displayName = "KendoReactGanttRowHeightContext";
273
- const Mt = t.createContext(0), Ko = () => t.useContext(Mt);
274
- Mt.displayName = "KendoReactGanttToolbarHeightContext";
275
- const Ft = t.createContext({
276
- onDataStateChange: M,
277
- onSortChange: M,
278
- onFilterChange: M,
279
- onColumnMenuFilterChange: M,
280
- onExpandChange: M,
281
- onRowClick: M,
282
- onRowDoubleClick: M,
283
- onRowContextMenu: M,
284
- onColumnResize: M,
285
- onColumnReorder: M,
286
- onDependencyCreate: M,
287
- onKeyDown: M,
288
- onSelectionChange: M,
289
- onHeaderSelectionChange: M
290
- }), Bo = () => t.useContext(Ft);
291
- Ft.displayName = "KendoReactGanttEventsContext";
292
- const Lt = t.createContext({
293
- onTaskClick: M,
294
- onTaskDoubleClick: M,
295
- onTaskContextMenu: M
296
- }), $o = () => t.useContext(Lt);
297
- Lt.displayName = "KendoReactGanttTaskEventsContext";
298
- const yn = ({
268
+ zonedStart: L.fromLocalDate(/* @__PURE__ */ new Date()),
269
+ zonedEnd: L.fromLocalDate(/* @__PURE__ */ new Date())
270
+ }), Pe = () => t.useContext(Ht);
271
+ Ht.displayName = "KendoReactGanttDateRangeContext";
272
+ const Vt = t.createContext([]), Er = () => t.useContext(Vt);
273
+ Vt.displayName = "KendoReactGanttViewsContext";
274
+ const zt = t.createContext(["week", W]), Gn = () => t.useContext(zt);
275
+ zt.displayName = "KendoReactGanttActiveViewContext";
276
+ const Pt = t.createContext(0), Wn = () => t.useContext(Pt);
277
+ Pt.displayName = "KendoReactGanttRowHeightContext";
278
+ const Gt = t.createContext(0), yr = () => t.useContext(Gt);
279
+ Gt.displayName = "KendoReactGanttToolbarHeightContext";
280
+ const Wt = t.createContext({
281
+ onDataStateChange: W,
282
+ onSortChange: W,
283
+ onFilterChange: W,
284
+ onColumnMenuFilterChange: W,
285
+ onExpandChange: W,
286
+ onRowClick: W,
287
+ onRowDoubleClick: W,
288
+ onRowContextMenu: W,
289
+ onColumnResize: W,
290
+ onColumnReorder: W,
291
+ onDependencyCreate: W,
292
+ onKeyDown: W,
293
+ onSelectionChange: W,
294
+ onHeaderSelectionChange: W
295
+ }), vr = () => t.useContext(Wt);
296
+ Wt.displayName = "KendoReactGanttEventsContext";
297
+ const Ot = t.createContext({
298
+ onTaskClick: W,
299
+ onTaskDoubleClick: W,
300
+ onTaskContextMenu: W
301
+ }), wr = () => t.useContext(Ot);
302
+ Ot.displayName = "KendoReactGanttTaskEventsContext";
303
+ const On = ({
299
304
  children: e,
300
305
  taskData: a,
301
306
  dependencyData: n,
302
- taskModelFields: o,
303
- dependencyModelFields: r,
304
- props: l,
305
- dateRange: s,
306
- views: c,
307
- activeView: m,
308
- rowHeight: g,
309
- toolbarHeight: d,
310
- events: u,
307
+ taskModelFields: r,
308
+ dependencyModelFields: s,
309
+ props: o,
310
+ dateRange: l,
311
+ views: i,
312
+ activeView: g,
313
+ rowHeight: d,
314
+ toolbarHeight: m,
315
+ events: c,
311
316
  taskEvents: h
312
- }) => /* @__PURE__ */ t.createElement(Rt.Provider, { value: l }, /* @__PURE__ */ t.createElement(wt.Provider, { value: a }, /* @__PURE__ */ t.createElement(yt.Provider, { value: n }, /* @__PURE__ */ t.createElement(vt.Provider, { value: o }, /* @__PURE__ */ t.createElement(bt.Provider, { value: r }, /* @__PURE__ */ t.createElement(St.Provider, { value: s }, /* @__PURE__ */ t.createElement(xt.Provider, { value: c }, /* @__PURE__ */ t.createElement(It.Provider, { value: m }, /* @__PURE__ */ t.createElement(Nt.Provider, { value: g }, /* @__PURE__ */ t.createElement(Mt.Provider, { value: d }, /* @__PURE__ */ t.createElement(Ft.Provider, { value: u }, /* @__PURE__ */ t.createElement(Lt.Provider, { value: h }, e))))))))))));
313
- yn.displayName = "KendoReactGanttContext";
314
- const Ht = t.createContext([{ current: {} }, M]), vn = () => t.useContext(Ht);
315
- Ht.displayName = "KendoReactGanttViewContext";
316
- const At = t.createContext(0), Uo = () => t.useContext(At);
317
- At.displayName = "KendoReactGanttViewTimelineWidthContext";
318
- const Vt = t.createContext({
319
- onDependencyHandlePress: M,
320
- onDependencyHandleDrag: M,
321
- onDependencyHandleRelease: M,
317
+ }) => /* @__PURE__ */ t.createElement(At.Provider, { value: o }, /* @__PURE__ */ t.createElement(xt.Provider, { value: a }, /* @__PURE__ */ t.createElement(Mt.Provider, { value: n }, /* @__PURE__ */ t.createElement(Nt.Provider, { value: r }, /* @__PURE__ */ t.createElement(Lt.Provider, { value: s }, /* @__PURE__ */ t.createElement(Ht.Provider, { value: l }, /* @__PURE__ */ t.createElement(Vt.Provider, { value: i }, /* @__PURE__ */ t.createElement(zt.Provider, { value: g }, /* @__PURE__ */ t.createElement(Pt.Provider, { value: d }, /* @__PURE__ */ t.createElement(Gt.Provider, { value: m }, /* @__PURE__ */ t.createElement(Wt.Provider, { value: c }, /* @__PURE__ */ t.createElement(Ot.Provider, { value: h }, e))))))))))));
318
+ On.displayName = "KendoReactGanttContext";
319
+ const _t = t.createContext([{ current: {} }, W]), _n = () => t.useContext(_t);
320
+ _t.displayName = "KendoReactGanttViewContext";
321
+ const Bt = t.createContext(0), Tr = () => t.useContext(Bt);
322
+ Bt.displayName = "KendoReactGanttViewTimelineWidthContext";
323
+ const Kt = t.createContext({
324
+ onDependencyHandlePress: W,
325
+ onDependencyHandleDrag: W,
326
+ onDependencyHandleRelease: W,
322
327
  isEnabled: !1,
323
328
  draggedId: null
324
- }), Yo = () => t.useContext(Vt);
325
- Vt.displayName = "KendoReactGanttViewDependencyDragContext";
326
- const Tn = ({
329
+ }), Sr = () => t.useContext(Kt);
330
+ Kt.displayName = "KendoReactGanttViewDependencyDragContext";
331
+ const Bn = ({
327
332
  children: e,
328
333
  tasksStore: a,
329
334
  timelineWidth: n,
330
- dependencyDrag: o
331
- }) => /* @__PURE__ */ t.createElement(Ht.Provider, { value: a }, /* @__PURE__ */ t.createElement(At.Provider, { value: n }, /* @__PURE__ */ t.createElement(Vt.Provider, { value: o }, e)));
332
- Tn.displayName = "KendoReactGanttViewContext";
333
- var rt = /* @__PURE__ */ ((e) => (e[e.add = 0] = "add", e[e.remove = 1] = "remove", e))(rt || {});
334
- const qo = () => {
335
+ dependencyDrag: r
336
+ }) => /* @__PURE__ */ t.createElement(_t.Provider, { value: a }, /* @__PURE__ */ t.createElement(Bt.Provider, { value: n }, /* @__PURE__ */ t.createElement(Kt.Provider, { value: r }, e)));
337
+ Bn.displayName = "KendoReactGanttViewContext";
338
+ var kt = /* @__PURE__ */ ((e) => (e[e.add = 0] = "add", e[e.remove = 1] = "remove", e))(kt || {});
339
+ const br = () => {
335
340
  const e = t.useRef({}), a = t.useCallback(
336
341
  (n) => {
337
342
  switch (n.type) {
@@ -346,218 +351,218 @@ const qo = () => {
346
351
  []
347
352
  );
348
353
  return [e, a];
349
- }, Xo = (e, a, n, o) => {
350
- const r = t.useRef(null), [, l] = vn();
351
- t.useImperativeHandle(r, () => ({ element: o.current, dataItem: e })), t.useImperativeHandle(n, () => r.current), t.useLayoutEffect(
354
+ }, Ir = (e, a, n, r) => {
355
+ const s = t.useRef(null), [, o] = _n();
356
+ t.useImperativeHandle(s, () => ({ element: r.current, dataItem: e })), t.useImperativeHandle(n, () => s.current), t.useLayoutEffect(
352
357
  () => {
353
- const s = r.current;
354
- if (s)
355
- return l({
356
- type: rt.add,
357
- itemRef: s,
358
+ const l = s.current;
359
+ if (l)
360
+ return o({
361
+ type: kt.add,
362
+ itemRef: l,
358
363
  id: a
359
364
  }), () => {
360
- l({
361
- type: rt.remove,
362
- itemRef: s,
365
+ o({
366
+ type: kt.remove,
367
+ itemRef: l,
363
368
  id: a
364
369
  });
365
370
  };
366
371
  }
367
372
  );
368
- }, bn = t.forwardRef((e, a) => {
369
- const n = Me(), o = Tt(), r = Uo(), l = Yo(), s = $o(), c = t.useRef(null), m = t.useRef(null);
370
- Xo(e.dataItem, D(o.id)(e.dataItem), a, c);
371
- const g = t.useRef(null), d = D(o.id)(e.dataItem), u = D(o.start)(e.dataItem), h = D(o.end)(e.dataItem), p = D(o.title)(e.dataItem), C = D(o.percentComplete)(e.dataItem), f = D(o.children)(e.dataItem), v = D(o.isSelected)(e.dataItem), L = u && u.getTime(), V = h && h.getTime(), N = f && f.length, x = !N && L === V, z = L && V && Ro(n.start, n.end, u, h), [J, b] = t.useState(!1), X = t.useRef(null), A = t.useRef(null);
372
- Kt(X, {
373
- onPress: l.onDependencyHandlePress,
374
- onDrag: l.onDependencyHandleDrag,
375
- onRelease: l.onDependencyHandleRelease
376
- }), Kt(A, {
377
- onPress: l.onDependencyHandlePress,
378
- onDrag: l.onDependencyHandleDrag,
379
- onRelease: l.onDependencyHandleRelease
373
+ }, Kn = t.forwardRef((e, a) => {
374
+ const n = Pe(), r = Ft(), s = Tr(), o = Sr(), l = wr(), i = t.useRef(null), g = t.useRef(null);
375
+ Ir(e.dataItem, T(r.id)(e.dataItem), a, i);
376
+ const d = t.useRef(null), m = T(r.id)(e.dataItem), c = T(r.start)(e.dataItem), h = T(r.end)(e.dataItem), C = T(r.title)(e.dataItem), f = T(r.percentComplete)(e.dataItem), k = T(r.children)(e.dataItem), y = T(r.isSelected)(e.dataItem), M = c && c.getTime(), A = h && h.getTime(), x = k && k.length, G = !x && M === A, b = M && A && or(n.start, n.end, c, h), [F, v] = t.useState(!1), w = t.useRef(null), $ = t.useRef(null);
377
+ nn(w, {
378
+ onPress: o.onDependencyHandlePress,
379
+ onDrag: o.onDependencyHandleDrag,
380
+ onRelease: o.onDependencyHandleRelease
381
+ }), nn($, {
382
+ onPress: o.onDependencyHandlePress,
383
+ onDrag: o.onDependencyHandleDrag,
384
+ onRelease: o.onDependencyHandleRelease
380
385
  });
381
- const j = t.useCallback(
382
- (w) => {
383
- s.onTaskClick && s.onTaskClick({
386
+ const O = t.useCallback(
387
+ (S) => {
388
+ l.onTaskClick && l.onTaskClick({
384
389
  dataItem: e.dataItem,
385
390
  level: e.level,
386
- nativeEvent: w && w.nativeEvent,
387
- syntheticEvent: w,
391
+ nativeEvent: S && S.nativeEvent,
392
+ syntheticEvent: S,
388
393
  target: null
389
394
  });
390
395
  },
391
396
  [e.dataItem, e.level]
392
- ), G = t.useCallback(
393
- (w) => {
394
- s.onTaskDoubleClick && s.onTaskDoubleClick({
397
+ ), _ = t.useCallback(
398
+ (S) => {
399
+ l.onTaskDoubleClick && l.onTaskDoubleClick({
395
400
  dataItem: e.dataItem,
396
401
  level: e.level,
397
- nativeEvent: w && w.nativeEvent,
398
- syntheticEvent: w,
402
+ nativeEvent: S && S.nativeEvent,
403
+ syntheticEvent: S,
399
404
  target: null
400
405
  });
401
406
  },
402
407
  [e.dataItem, e.level]
403
- ), B = t.useCallback(
404
- (w) => {
405
- s.onTaskContextMenu && s.onTaskContextMenu({
408
+ ), X = t.useCallback(
409
+ (S) => {
410
+ l.onTaskContextMenu && l.onTaskContextMenu({
406
411
  dataItem: e.dataItem,
407
412
  level: e.level,
408
- nativeEvent: w && w.nativeEvent,
409
- syntheticEvent: w,
413
+ nativeEvent: S && S.nativeEvent,
414
+ syntheticEvent: S,
410
415
  target: null
411
416
  });
412
417
  },
413
418
  [e.dataItem, e.level]
414
- ), E = t.useCallback(
415
- (w) => {
416
- s.onTaskRemoveClick && s.onTaskRemoveClick({
419
+ ), D = t.useCallback(
420
+ (S) => {
421
+ l.onTaskRemoveClick && l.onTaskRemoveClick({
417
422
  dataItem: e.dataItem,
418
423
  level: e.level,
419
- nativeEvent: w && w.nativeEvent,
420
- syntheticEvent: w,
424
+ nativeEvent: S && S.nativeEvent,
425
+ syntheticEvent: S,
421
426
  target: null
422
427
  });
423
428
  },
424
429
  [e.dataItem, e.level]
425
- ), H = t.useCallback(
430
+ ), P = t.useCallback(
426
431
  () => {
427
- const w = n.start, Z = n.end, T = g.current, S = c.current, K = m.current;
428
- if (!z || T === null || S === null)
432
+ const S = n.start, J = n.end, I = d.current, N = i.current, j = g.current;
433
+ if (!b || I === null || N === null)
429
434
  return;
430
- const Y = T.clientWidth / (Z.getTime() - w.getTime()), W = (u.getTime() - w.getTime()) * Y, O = (h.getTime() - u.getTime()) * Y, he = (T.offsetHeight - S.offsetHeight) / 2;
431
- S.style.left = `${Math.round(x ? W - wo : W)}px`, S.style.top = `${Math.round(he)}px`, x || (S.style.width = `${Math.round(O)}px`, K !== null && (K.style.width = `${Math.round(O * (C || 0))}px`)), b(!0);
435
+ const Q = I.clientWidth / (J.getTime() - S.getTime()), B = (c.getTime() - S.getTime()) * Q, q = (h.getTime() - c.getTime()) * Q, ke = (I.offsetHeight - N.offsetHeight) / 2;
436
+ N.style.left = `${Math.round(G ? B - Qo : B)}px`, N.style.top = `${Math.round(ke)}px`, G || (N.style.width = `${Math.round(q)}px`, j !== null && (j.style.width = `${Math.round(q * (f || 0))}px`)), v(!0);
432
437
  },
433
- [n.start.getTime(), n.end.getTime(), L, V, z, C, r]
438
+ [n.start.getTime(), n.end.getTime(), M, A, b, f, s]
434
439
  );
435
- t.useEffect(H, [H]);
436
- const Q = {
437
- visibility: J ? void 0 : "hidden",
438
- display: z ? void 0 : "none"
439
- }, _ = {
440
+ t.useEffect(P, [P]);
441
+ const Y = {
442
+ visibility: F ? void 0 : "hidden",
443
+ display: b ? void 0 : "none"
444
+ }, U = {
440
445
  userSelect: "none",
441
- display: l.draggedId === String(d) ? "block" : void 0
446
+ display: o.draggedId === String(m) ? "block" : void 0
442
447
  };
443
- return /* @__PURE__ */ t.createElement("td", { ref: g, key: d, role: "presentation" }, x ? /* @__PURE__ */ t.createElement(
448
+ return /* @__PURE__ */ t.createElement("td", { ref: d, key: m, role: "presentation" }, G ? /* @__PURE__ */ t.createElement(
444
449
  "div",
445
450
  {
446
451
  "aria-hidden": !0,
447
- className: de({
452
+ className: ie({
448
453
  "k-task": !0,
449
454
  "k-task-milestone": !0,
450
- "k-selected": v && !Array.isArray(v)
455
+ "k-selected": y && !Array.isArray(y)
451
456
  }),
452
- style: Q,
453
- ref: c,
454
- [We]: d,
455
- onClick: j,
456
- onDoubleClick: G,
457
- onContextMenu: B
457
+ style: Y,
458
+ ref: i,
459
+ [$e]: m,
460
+ onClick: O,
461
+ onDoubleClick: _,
462
+ onContextMenu: X
458
463
  },
459
464
  /* @__PURE__ */ t.createElement("div", { className: "k-task-milestone-content" }),
460
- l.isEnabled && /* @__PURE__ */ t.createElement(
465
+ o.isEnabled && /* @__PURE__ */ t.createElement(
461
466
  "div",
462
467
  {
463
468
  className: "k-task-dot k-task-start",
464
- ref: X,
465
- style: _,
466
- ...qt
469
+ ref: w,
470
+ style: U,
471
+ ...cn
467
472
  }
468
473
  ),
469
- l.isEnabled && /* @__PURE__ */ t.createElement(
474
+ o.isEnabled && /* @__PURE__ */ t.createElement(
470
475
  "div",
471
476
  {
472
477
  className: "k-task-dot k-task-end",
473
- ref: A,
474
- style: _,
475
- ...Xt
478
+ ref: $,
479
+ style: U,
480
+ ...dn
476
481
  }
477
482
  )
478
483
  ) : /* @__PURE__ */ t.createElement(
479
484
  "div",
480
485
  {
481
486
  "aria-hidden": !0,
482
- className: de({
487
+ className: ie({
483
488
  "k-task": !0,
484
- "k-task-summary": N,
485
- "k-task-single": !N,
486
- "k-selected": v && !Array.isArray(v)
489
+ "k-task-summary": x,
490
+ "k-task-single": !x,
491
+ "k-selected": y && !Array.isArray(y)
487
492
  }),
488
- ref: c,
489
- style: Q,
490
- [We]: d,
491
- onClick: j,
492
- onDoubleClick: G,
493
- onContextMenu: B
494
- },
495
- N ? /* @__PURE__ */ t.createElement("div", { className: "k-task-summary-progress", ref: m }, /* @__PURE__ */ t.createElement("div", { className: "k-task-summary-complete" })) : /* @__PURE__ */ t.createElement("div", { className: "k-task-complete", ref: m }),
496
- !N && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", { className: "k-task-content" }, p), s.onTaskRemoveClick ? /* @__PURE__ */ t.createElement("span", { className: "k-task-actions" }, /* @__PURE__ */ t.createElement("span", { onClick: E, className: "k-link k-task-delete", "aria-label": "Delete" }, /* @__PURE__ */ t.createElement(mt, { name: "x", icon: so }))) : null),
497
- l.isEnabled && /* @__PURE__ */ t.createElement(
493
+ ref: i,
494
+ style: Y,
495
+ [$e]: m,
496
+ onClick: O,
497
+ onDoubleClick: _,
498
+ onContextMenu: X
499
+ },
500
+ x ? /* @__PURE__ */ t.createElement("div", { className: "k-task-summary-progress", ref: g }, /* @__PURE__ */ t.createElement("div", { className: "k-task-summary-complete" })) : /* @__PURE__ */ t.createElement("div", { className: "k-task-complete", ref: g }),
501
+ !x && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", { className: "k-task-content" }, C), l.onTaskRemoveClick ? /* @__PURE__ */ t.createElement("span", { className: "k-task-actions" }, /* @__PURE__ */ t.createElement("span", { onClick: D, className: "k-link k-task-delete", "aria-label": "Delete" }, /* @__PURE__ */ t.createElement(fn, { name: "x", icon: Fo }))) : null),
502
+ o.isEnabled && /* @__PURE__ */ t.createElement(
498
503
  "div",
499
504
  {
500
505
  className: "k-task-dot k-task-start",
501
- ref: X,
502
- style: _,
503
- ...qt
506
+ ref: w,
507
+ style: U,
508
+ ...cn
504
509
  }
505
510
  ),
506
- l.isEnabled && /* @__PURE__ */ t.createElement(
511
+ o.isEnabled && /* @__PURE__ */ t.createElement(
507
512
  "div",
508
513
  {
509
514
  className: "k-task-dot k-task-end",
510
- ref: A,
511
- style: _,
512
- ...Xt
515
+ ref: $,
516
+ style: U,
517
+ ...dn
513
518
  }
514
519
  )
515
520
  ));
516
521
  });
517
- bn.displayName = "KendoReactGanttTask";
518
- const Rn = (e) => {
519
- const { dependency: a } = e, [n] = vn(), o = t.useRef(null), r = En(), l = wn(), [s, c] = t.useState(!1), m = () => {
520
- if (o.current === null || n.current === null) {
521
- c(!1);
522
+ Kn.displayName = "KendoReactGanttTask";
523
+ const $n = (e) => {
524
+ const { dependency: a } = e, [n] = _n(), r = t.useRef(null), s = Pn(), o = Wn(), [l, i] = t.useState(!1), g = () => {
525
+ if (r.current === null || n.current === null) {
526
+ i(!1);
522
527
  return;
523
528
  }
524
- const g = n.current[D(r.fromId)(a)], d = n.current[D(r.toId)(a)];
525
- if (!g || !d) {
526
- c(!1);
529
+ const d = n.current[T(s.fromId)(a)], m = n.current[T(s.toId)(a)];
530
+ if (!d || !m) {
531
+ i(!1);
527
532
  return;
528
533
  }
529
- const u = g.element, h = d.element;
530
- if (!u || !h) {
531
- c(!1);
534
+ const c = d.element, h = m.element;
535
+ if (!c || !h) {
536
+ i(!1);
532
537
  return;
533
538
  }
534
- if (s === !1) {
535
- c(!0);
539
+ if (l === !1) {
540
+ i(!0);
536
541
  return;
537
542
  }
538
- const p = {
539
- top: u.offsetTop + u.offsetHeight / 2,
540
- start: u.offsetLeft,
541
- end: u.offsetLeft + u.offsetWidth
542
- }, C = {
543
+ const C = {
544
+ top: c.offsetTop + c.offsetHeight / 2,
545
+ start: c.offsetLeft,
546
+ end: c.offsetLeft + c.offsetWidth
547
+ }, f = {
543
548
  top: h.offsetTop + h.offsetHeight / 2,
544
549
  start: h.offsetLeft,
545
550
  end: h.offsetLeft + h.offsetWidth
546
- }, f = D(r.type)(a), v = So(p, C, l, f);
547
- v && v.length && o.current.setAttribute("points", v.map((L) => `${L.left},${L.top}`).join(" "));
551
+ }, k = T(s.type)(a), y = rr(C, f, o, k);
552
+ y && y.length && r.current.setAttribute("points", y.map((M) => `${M.left},${M.top}`).join(" "));
548
553
  };
549
- return t.useEffect(m), /* @__PURE__ */ t.createElement(
554
+ return t.useEffect(g), /* @__PURE__ */ t.createElement(
550
555
  "polyline",
551
556
  {
552
- ref: o,
557
+ ref: r,
553
558
  style: {
554
- display: s ? void 0 : "none"
559
+ display: l ? void 0 : "none"
555
560
  }
556
561
  }
557
562
  );
558
563
  };
559
- Rn.displayName = "KendoReactGanttDependency";
560
- class zt extends t.Component {
564
+ $n.displayName = "KendoReactGanttDependency";
565
+ class $t extends t.Component {
561
566
  constructor(a) {
562
567
  super(a), this.state = {
563
568
  activeId: void 0,
@@ -565,146 +570,146 @@ class zt extends t.Component {
565
570
  }, this.tableElement = null, this.tbodyElement = null, this.wrapperScrollLeft = 0, this.wrapperScrollTop = 0, this.updateOnScroll = !1, this.tbodyOffsetTop = 0, this.prevData = [], this.flattedData = [], this.element = null, this.contextStateRef = { current: void 0 }, this.navigationStateRef = { current: void 0 }, this.scrollIntoView = (n) => {
566
571
  if (!this.element)
567
572
  return;
568
- const { rowIndex: o = 0 } = n, { rowHeight: r = 0 } = this.props;
569
- this.element.scroll(0, (o - 1) * r);
573
+ const { rowIndex: r = 0 } = n, { rowHeight: s = 0 } = this.props;
574
+ this.element.scroll(0, (r - 1) * s);
570
575
  }, this.getColumns = (n) => {
571
- const o = n.filter((l) => l.declarationIndex >= 0 && l.parentIndex === -1), r = (l) => (l.sort((s, c) => s.declarationIndex - c.declarationIndex), l.map((s) => {
576
+ const r = n.filter((o) => o.declarationIndex >= 0 && o.parentIndex === -1), s = (o) => (o.sort((l, i) => l.declarationIndex - i.declarationIndex), o.map((l) => {
572
577
  const {
573
- declarationIndex: c,
574
- parentIndex: m,
575
- depth: g,
576
- colSpan: d,
577
- rowSpan: u,
578
+ declarationIndex: i,
579
+ parentIndex: g,
580
+ depth: d,
581
+ colSpan: m,
582
+ rowSpan: c,
578
583
  index: h,
579
- kFirst: p,
580
- groupable: C,
581
- children: f,
582
- ...v
583
- } = s;
584
- return f.length ? {
585
- children: r(f),
586
- ...v
587
- } : v;
584
+ kFirst: C,
585
+ groupable: f,
586
+ children: k,
587
+ ...y
588
+ } = l;
589
+ return k.length ? {
590
+ children: s(k),
591
+ ...y
592
+ } : y;
588
593
  }));
589
- return r(o);
594
+ return s(r);
590
595
  }, this.onKeyDown = (n) => {
591
- if (we.onKeyDown(n, {
596
+ if (Re.onKeyDown(n, {
592
597
  contextStateRef: this.contextStateRef,
593
598
  navigationStateRef: this.navigationStateRef
594
599
  }), this.props.onKeyDown) {
595
- const { mode: o, cell: r } = $t(this.props.selectable), l = {
600
+ const { mode: r, cell: s } = on(this.props.selectable), o = {
596
601
  dataItems: this.getLeafDataItems(),
597
- mode: o,
598
- cell: r,
602
+ mode: r,
603
+ cell: s,
599
604
  componentId: this.props.treelistId,
600
605
  selectedField: this.props.selectedField,
601
606
  ...this.getEventArguments(n)
602
607
  };
603
- this.props.onKeyDown.call(void 0, l);
608
+ this.props.onKeyDown.call(void 0, o);
604
609
  }
605
610
  }, this.onFocus = (n) => {
606
- we.onFocus(n, {
611
+ Re.onFocus(n, {
607
612
  contextStateRef: this.contextStateRef
608
613
  });
609
614
  }, this.onRowDrag = (n) => {
610
615
  if (this.props.onRowDrag) {
611
- const o = {
616
+ const r = {
612
617
  ...n,
613
618
  target: this
614
619
  };
615
- this.props.onRowDrag.call(void 0, o);
620
+ this.props.onRowDrag.call(void 0, r);
616
621
  }
617
622
  }, this.onRowDrop = (n) => {
618
623
  if (this.props.onRowDrop) {
619
- const o = {
624
+ const r = {
620
625
  ...n,
621
626
  target: this
622
627
  };
623
- this.props.onRowDrop.call(void 0, o);
628
+ this.props.onRowDrop.call(void 0, r);
624
629
  }
625
- }, this.onColumnReorder = (n, o, r) => {
626
- const { extendedColumns: l } = this.props, s = l[n].depth, c = (d) => {
630
+ }, this.onColumnReorder = (n, r, s) => {
631
+ const { extendedColumns: o } = this.props, l = o[n].depth, i = (m) => {
627
632
  do
628
- d++;
629
- while (d < l.length && l[d].depth > s);
630
- return d;
631
- }, m = [...l], g = m.splice(n, c(n) - n);
632
- if (m.splice(n < o ? c(o - g.length) : o, 0, ...g), m.filter((d) => d.declarationIndex >= 0).forEach((d, u) => d.orderIndex = u), this.props.onColumnReorder) {
633
- const d = {
633
+ m++;
634
+ while (m < o.length && o[m].depth > l);
635
+ return m;
636
+ }, g = [...o], d = g.splice(n, i(n) - n);
637
+ if (g.splice(n < r ? i(r - d.length) : r, 0, ...d), g.filter((m) => m.declarationIndex >= 0).forEach((m, c) => m.orderIndex = c), this.props.onColumnReorder) {
638
+ const m = {
634
639
  target: this,
635
- columns: this.getColumns(m),
636
- nativeEvent: r
640
+ columns: this.getColumns(g),
641
+ nativeEvent: s
637
642
  };
638
- this.props.onColumnReorder.call(void 0, d);
643
+ this.props.onColumnReorder.call(void 0, m);
639
644
  }
640
- }, this.onColumnResize = (n, o, r, l, s) => {
645
+ }, this.onColumnResize = (n, r, s, o, l) => {
641
646
  if (this.props.onColumnResize) {
642
- const c = this.props.extendedColumns.filter((g) => g.children.length === 0).reduce((g, d) => g += parseFloat(String(d.width)), 0);
643
- this.tableElement && (this.tableElement.style.width = c + "px");
644
- const m = {
647
+ const i = this.props.extendedColumns.filter((d) => d.children.length === 0).reduce((d, m) => d += parseFloat(String(m.width)), 0);
648
+ this.tableElement && (this.tableElement.style.width = i + "px");
649
+ const g = {
645
650
  columns: this.getColumns(this.props.extendedColumns),
646
- totalWidth: c,
651
+ totalWidth: i,
647
652
  index: n,
648
- nativeEvent: l,
649
- newWidth: o,
650
- oldWidth: r,
651
- end: s,
653
+ nativeEvent: o,
654
+ newWidth: r,
655
+ oldWidth: s,
656
+ end: l,
652
657
  target: this
653
658
  };
654
- this.props.onColumnResize.call(void 0, m);
659
+ this.props.onColumnResize.call(void 0, g);
655
660
  }
656
661
  }, this.onScroll = (n) => {
657
- const o = n.currentTarget.scrollLeft, r = n.currentTarget.scrollTop, { columnVirtualization: l, scrollable: s, rowHeight: c = 0 } = this.props, m = c, g = 0;
658
- let d = !1;
659
- l && Math.abs(this.wrapperScrollLeft - o) > g && (this.wrapperScrollLeft = o, d = !0), s === "virtual" && Math.abs(this.wrapperScrollTop - r) > m && (this.wrapperScrollTop = r, d = !0), d && (this.updateOnScroll = !0, this.forceUpdate());
662
+ const r = n.currentTarget.scrollLeft, s = n.currentTarget.scrollTop, { columnVirtualization: o, scrollable: l, rowHeight: i = 0 } = this.props, g = i, d = 0;
663
+ let m = !1;
664
+ o && Math.abs(this.wrapperScrollLeft - r) > d && (this.wrapperScrollLeft = r, m = !0), l === "virtual" && Math.abs(this.wrapperScrollTop - s) > g && (this.wrapperScrollTop = s, m = !0), m && (this.updateOnScroll = !0, this.forceUpdate());
660
665
  }, this.calculateSizes = (n) => {
661
666
  if (!n || this.props.scrollable === "none")
662
667
  return;
663
- const o = Array.from(n.childNodes), r = o.find((c) => c.nodeName === "TABLE"), l = this.props.toolbar && o.find((c) => c.nodeType === 1 && c.classList.contains("k-grid-toolbar"));
664
- let s = 0;
665
- if (l) {
666
- const c = l.style.boxSizing;
667
- l.style.boxSizing = "border-box", s = parseFloat(String(window.getComputedStyle(l).height)) || l.offsetHeight, l.style.boxSizing = c, l.getAttribute("style") || l.removeAttribute("style");
668
+ const r = Array.from(n.childNodes), s = r.find((i) => i.nodeName === "TABLE"), o = this.props.toolbar && r.find((i) => i.nodeType === 1 && i.classList.contains("k-grid-toolbar"));
669
+ let l = 0;
670
+ if (o) {
671
+ const i = o.style.boxSizing;
672
+ o.style.boxSizing = "border-box", l = parseFloat(String(window.getComputedStyle(o).height)) || o.offsetHeight, o.style.boxSizing = i, o.getAttribute("style") || o.removeAttribute("style");
668
673
  }
669
- this.tbodyOffsetTop = r.tBodies[0].offsetTop, eo(r, s);
674
+ this.tbodyOffsetTop = s.tBodies[0].offsetTop, Ro(s, l);
670
675
  }, this.onItemChange = (n) => {
671
676
  if (n.field === this.props.expandField) {
672
- const o = this.props.onExpandChange;
673
- if (o) {
674
- const r = {
677
+ const r = this.props.onExpandChange;
678
+ if (r) {
679
+ const s = {
675
680
  ...this.getEventArguments(n.syntheticEvent),
676
681
  dataItem: n.dataItem,
677
682
  level: n.level,
678
683
  value: n.value
679
684
  };
680
- o.call(void 0, r);
685
+ r.call(void 0, s);
681
686
  }
682
687
  return;
683
688
  }
684
689
  if (this.props.onItemChange) {
685
- const o = {
690
+ const r = {
686
691
  ...this.getEventArguments(n.syntheticEvent),
687
692
  dataItem: n.dataItem,
688
693
  level: n.level,
689
694
  field: n.field,
690
695
  value: n.value
691
696
  };
692
- this.props.onItemChange.call(void 0, o);
697
+ this.props.onItemChange.call(void 0, r);
693
698
  }
694
699
  }, this.onHeaderSelectionChange = (n) => {
695
700
  if (this.props.onHeaderSelectionChange) {
696
- const o = {
701
+ const r = {
697
702
  field: n.field,
698
703
  nativeEvent: n.syntheticEvent && n.syntheticEvent.nativeEvent,
699
704
  syntheticEvent: n.syntheticEvent,
700
705
  target: this,
701
706
  dataItems: this.getLeafDataItems()
702
707
  };
703
- this.props.onHeaderSelectionChange.call(void 0, o);
708
+ this.props.onHeaderSelectionChange.call(void 0, r);
704
709
  }
705
710
  }, this.selectionRelease = (n) => {
706
711
  if (this.props.onSelectionChange) {
707
- const o = {
712
+ const r = {
708
713
  syntheticEvent: void 0,
709
714
  target: this,
710
715
  selectedField: this.props.selectedField || "",
@@ -714,81 +719,81 @@ class zt extends t.Component {
714
719
  level: [],
715
720
  ...n
716
721
  };
717
- this.props.onSelectionChange.call(void 0, o);
722
+ this.props.onSelectionChange.call(void 0, r);
718
723
  }
719
- }, this.onSortChange = (n, o, r) => {
720
- this.onDataStateChange(this.props.onSortChange, { sort: o, field: r }, n);
724
+ }, this.onSortChange = (n, r, s) => {
725
+ this.onDataStateChange(this.props.onSortChange, { sort: r, field: s }, n);
721
726
  }, this.onFilterChange = (n) => {
722
- const { filter: o, field: r } = n;
723
- this.onDataStateChange(this.props.onFilterChange, { filter: o, field: r }, n.syntheticEvent);
724
- }, this.onColumnMenuFilterChange = (n, o, r) => {
725
- if (!r)
727
+ const { filter: r, field: s } = n;
728
+ this.onDataStateChange(this.props.onFilterChange, { filter: r, field: s }, n.syntheticEvent);
729
+ }, this.onColumnMenuFilterChange = (n, r, s) => {
730
+ if (!s)
726
731
  return;
727
- const { onColumnMenuFilterChange: l } = this.props;
728
- if (!l)
732
+ const { onColumnMenuFilterChange: o } = this.props;
733
+ if (!o)
729
734
  return;
730
- const s = {
735
+ const l = {
731
736
  syntheticEvent: n,
732
- filter: o,
733
- field: r,
737
+ filter: r,
738
+ field: s,
734
739
  target: this,
735
740
  nativeEvent: n.nativeEvent
736
741
  };
737
- l.call(void 0, s);
738
- }, this.onExpandChange = (n, o, r) => {
739
- const { expandField: l, onExpandChange: s } = this.props;
740
- if (l && s) {
741
- const c = {
742
+ o.call(void 0, l);
743
+ }, this.onExpandChange = (n, r, s) => {
744
+ const { expandField: o, onExpandChange: l } = this.props;
745
+ if (o && l) {
746
+ const i = {
742
747
  ...this.getEventArguments(n),
743
- dataItem: o,
744
- level: r,
745
- value: st(o, this.props.expandField)
748
+ dataItem: r,
749
+ level: s,
750
+ value: Ct(r, this.props.expandField)
746
751
  };
747
- s.call(void 0, c);
752
+ l.call(void 0, i);
748
753
  }
749
- }, this.onRowClick = (n, o) => {
754
+ }, this.onRowClick = (n, r) => {
750
755
  if (this.props.onRowClick && n.target.nodeName === "TD") {
751
- const r = {
752
- dataItem: o.dataItem,
753
- level: o.level,
756
+ const s = {
757
+ dataItem: r.dataItem,
758
+ level: r.level,
754
759
  ...this.getEventArguments(n)
755
760
  };
756
- this.props.onRowClick.call(void 0, r);
761
+ this.props.onRowClick.call(void 0, s);
757
762
  }
758
- }, this.rowDoubleClick = (n, o) => {
763
+ }, this.rowDoubleClick = (n, r) => {
759
764
  if (this.props.onRowDoubleClick && n.target.nodeName === "TD") {
760
- const r = {
761
- dataItem: o.dataItem,
762
- level: o.level,
765
+ const s = {
766
+ dataItem: r.dataItem,
767
+ level: r.level,
763
768
  ...this.getEventArguments(n)
764
769
  };
765
- this.props.onRowDoubleClick.call(void 0, r);
770
+ this.props.onRowDoubleClick.call(void 0, s);
766
771
  }
767
- }, this.rowContextMenu = (n, o) => {
772
+ }, this.rowContextMenu = (n, r) => {
768
773
  if (this.props.onRowContextMenu && n.target.nodeName === "TD") {
769
- const r = {
770
- dataItem: o.dataItem,
771
- level: o.level,
774
+ const s = {
775
+ dataItem: r.dataItem,
776
+ level: r.level,
772
777
  ...this.getEventArguments(n)
773
778
  };
774
- this.props.onRowContextMenu.call(void 0, r);
779
+ this.props.onRowContextMenu.call(void 0, s);
775
780
  }
776
781
  }, this.onPageChange = (n) => {
777
782
  if (this.props.onPageChange) {
778
- const o = {
783
+ const r = {
779
784
  ...this.getEventArguments(n.syntheticEvent),
780
785
  skip: n.skip,
781
786
  take: n.take
782
787
  };
783
- this.props.onPageChange.call(void 0, o);
788
+ this.props.onPageChange.call(void 0, r);
784
789
  }
785
- }, this.onDataStateChange = (n, o, r) => {
786
- if (n && n.call(void 0, { ...this.getEventArguments(r), ...o }), this.props.onDataStateChange) {
787
- const l = {
788
- ...this.getEventArguments(r),
789
- dataState: { ...this.getDataState(), ...o }
790
+ }, this.onDataStateChange = (n, r, s) => {
791
+ if (n && n.call(void 0, { ...this.getEventArguments(s), ...r }), this.props.onDataStateChange) {
792
+ const o = {
793
+ ...this.getEventArguments(s),
794
+ dataState: { ...this.getDataState(), ...r }
790
795
  };
791
- this.props.onDataStateChange.call(void 0, l);
796
+ this.props.onDataStateChange.call(void 0, o);
792
797
  }
793
798
  }, this.getDataState = () => ({
794
799
  filter: this.props.filter,
@@ -797,7 +802,7 @@ class zt extends t.Component {
797
802
  nativeEvent: n && n.nativeEvent,
798
803
  syntheticEvent: n,
799
804
  target: this
800
- }), this.getLeafDataItems = () => this.flatData.map((n) => n.dataItem), this.dragLogic = new Va(this.onColumnReorder, M, M), this.columnResize = new za(this.onColumnResize), we.onConstructor({
805
+ }), this.getLeafDataItems = () => this.flatData.map((n) => n.dataItem), this.dragLogic = new co(this.onColumnReorder, W, W), this.columnResize = new uo(this.onColumnResize), Re.onConstructor({
801
806
  navigatable: !!a.navigatable,
802
807
  contextStateRef: this.contextStateRef,
803
808
  navigationStateRef: this.navigationStateRef,
@@ -805,14 +810,14 @@ class zt extends t.Component {
805
810
  });
806
811
  }
807
812
  get document() {
808
- if (gt)
813
+ if (St)
809
814
  return this.element && this.element.ownerDocument || document;
810
815
  }
811
816
  /**
812
817
  * @hidden
813
818
  */
814
819
  componentDidMount() {
815
- this.calculateSizes(this.element), we.onComponentDidMount({
820
+ this.calculateSizes(this.element), Re.onComponentDidMount({
816
821
  scope: this.element || void 0,
817
822
  contextStateRef: this.contextStateRef,
818
823
  navigationStateRef: this.navigationStateRef
@@ -822,7 +827,7 @@ class zt extends t.Component {
822
827
  * @hidden
823
828
  */
824
829
  getSnapshotBeforeUpdate() {
825
- return we.onGetSnapshotBeforeUpdate({
830
+ return Re.onGetSnapshotBeforeUpdate({
826
831
  document: this.document,
827
832
  contextStateRef: this.contextStateRef,
828
833
  navigationStateRef: this.navigationStateRef
@@ -832,7 +837,7 @@ class zt extends t.Component {
832
837
  * @hidden
833
838
  */
834
839
  componentDidUpdate(a) {
835
- a.columns !== this.props.columns && this.calculateSizes(this.element), we.onComponentDidUpdate({
840
+ a.columns !== this.props.columns && this.calculateSizes(this.element), Re.onComponentDidUpdate({
836
841
  scope: this.element || void 0,
837
842
  contextStateRef: this.contextStateRef,
838
843
  navigationStateRef: this.navigationStateRef
@@ -851,27 +856,27 @@ class zt extends t.Component {
851
856
  const {
852
857
  filterRow: a,
853
858
  scrollable: n = "scrollable",
854
- resizable: o = !1,
855
- reorderable: r = !1,
856
- skip: l,
857
- take: s,
858
- afterContent: c,
859
- extendedColumns: m = [],
860
- columnsMap: g
861
- } = this.props, d = m.some((E) => !!E.filter) || a !== void 0, u = a || Ua, h = Ut.getIdPrefix(this.navigationStateRef);
862
- this.columnResize.columns = m, this.columnResize.resizable = o, this.dragLogic.columns = m, this.dragLogic.reorderable = r, this.dragLogic.groupable = !1;
863
- const p = m.filter((E) => E.children.length === 0), C = /* @__PURE__ */ t.createElement(
864
- Ga,
859
+ resizable: r = !1,
860
+ reorderable: s = !1,
861
+ skip: o,
862
+ take: l,
863
+ afterContent: i,
864
+ extendedColumns: g = [],
865
+ columnsMap: d
866
+ } = this.props, m = g.some((D) => !!D.filter) || a !== void 0, c = a || Eo, h = rn.getIdPrefix(this.navigationStateRef);
867
+ this.columnResize.columns = g, this.columnResize.resizable = r, this.dragLogic.columns = g, this.dragLogic.reorderable = s, this.dragLogic.groupable = !1;
868
+ const C = g.filter((D) => D.children.length === 0), f = /* @__PURE__ */ t.createElement(
869
+ mo,
865
870
  {
866
871
  headerRow: /* @__PURE__ */ t.createElement(
867
- Wa,
872
+ go,
868
873
  {
869
874
  sort: this.props.sort,
870
875
  sortable: this.props.sortable,
871
876
  sortChange: this.onSortChange,
872
877
  selectionChange: this.onHeaderSelectionChange,
873
- columns: m,
874
- columnsMap: g,
878
+ columns: g,
879
+ columnsMap: d,
875
880
  cellRender: this.props.headerCellRender,
876
881
  columnResize: this.columnResize,
877
882
  columnMenu: this.props.columnMenu,
@@ -882,123 +887,123 @@ class zt extends t.Component {
882
887
  releaseHandler: this.dragLogic.releaseHandler
883
888
  }
884
889
  ),
885
- filterRow: d && /* @__PURE__ */ t.createElement(
886
- u,
890
+ filterRow: m && /* @__PURE__ */ t.createElement(
891
+ c,
887
892
  {
888
- columns: p,
893
+ columns: C,
889
894
  filter: this.props.filter,
890
895
  filterChange: this.onFilterChange,
891
896
  sort: this.props.sort,
892
- ariaRowIndex: g.length + 1
897
+ ariaRowIndex: d.length + 1
893
898
  }
894
899
  ) || void 0,
895
900
  columnResize: this.columnResize
896
901
  }
897
- ), f = this.props.style || {}, { colSpans: v, hiddenColumns: L } = Oa({
902
+ ), k = this.props.style || {}, { colSpans: y, hiddenColumns: M } = ho({
898
903
  enabled: this.props.columnVirtualization,
899
- columns: p,
904
+ columns: C,
900
905
  scrollLeft: this.wrapperScrollLeft,
901
- tableViewPortWidth: parseFloat((f.width || "").toString())
902
- }), V = (E, H, Q, _, w, Z) => p.map((T, S) => {
903
- if (L[S])
906
+ tableViewPortWidth: parseFloat((k.width || "").toString())
907
+ }), A = (D, P, Y, U, S, J) => C.map((I, N) => {
908
+ if (M[N])
904
909
  return null;
905
- const K = T.id ? T.id : S, Y = `k-table-td ${T.className ? T.className + " " : ""}${T.locked ? "k-grid-content-sticky" : ""}`, W = {
906
- id: Ut.generateNavigatableId(`${Q}-${String(S)}`, h),
907
- colSpan: v[S],
908
- dataItem: E.dataItem,
909
- field: T.field,
910
- format: T.format,
911
- className: Y || void 0,
910
+ const j = I.id ? I.id : N, Q = `k-table-td ${I.className ? I.className + " " : ""}${I.locked ? "k-grid-content-sticky" : ""}`, B = {
911
+ id: rn.generateNavigatableId(`${Y}-${String(N)}`, h),
912
+ colSpan: y[N],
913
+ dataItem: D.dataItem,
914
+ field: I.field,
915
+ format: I.format,
916
+ className: Q || void 0,
912
917
  render: this.props.cellRender,
913
918
  onChange: this.onItemChange,
914
- selectionChange: this.props.onSelectionChange ? (O) => {
915
- this.onSelectionChange({ event: O, item: E, columnIndex: S, dataIndex: w });
919
+ selectionChange: this.props.onSelectionChange ? (q) => {
920
+ this.onSelectionChange({ event: q, item: D, columnIndex: N, dataIndex: S });
916
921
  } : void 0,
917
- level: E.level,
918
- expandable: T.expandable,
919
- expanded: _,
920
- hasChildren: kn(E.dataItem, this.props.subItemsField),
921
- colIndex: S,
922
- ariaColumnIndex: T.ariaColumnIndex,
922
+ level: D.level,
923
+ expandable: I.expandable,
924
+ expanded: U,
925
+ hasChildren: zn(D.dataItem, this.props.subItemsField),
926
+ colIndex: N,
927
+ ariaColumnIndex: I.ariaColumnIndex,
923
928
  onExpandChange: this.onExpandChange,
924
- style: T.left !== void 0 && {
925
- left: T.left,
926
- right: T.right,
927
- borderRightWidth: T.rightBorder ? "1px" : ""
929
+ style: I.left !== void 0 && {
930
+ left: I.left,
931
+ right: I.right,
932
+ borderRightWidth: I.rightBorder ? "1px" : ""
928
933
  } || {},
929
- isSelected: Array.isArray(Z) && Z.indexOf(S) > -1
934
+ isSelected: Array.isArray(J) && J.indexOf(N) > -1
930
935
  };
931
- return H && T.editCell ? /* @__PURE__ */ t.createElement(T.editCell, { ...W, onChange: this.onItemChange, key: K }) : T.cell ? /* @__PURE__ */ t.createElement(T.cell, { key: K, ...W }) : /* @__PURE__ */ t.createElement(ao, { key: K, ...W });
936
+ return P && I.editCell ? /* @__PURE__ */ t.createElement(I.editCell, { ...B, onChange: this.onItemChange, key: j }) : I.cell ? /* @__PURE__ */ t.createElement(I.cell, { key: j, ...B }) : /* @__PURE__ */ t.createElement(No, { key: j, ...B });
932
937
  });
933
- let N = this.flatData;
934
- const x = N.length;
935
- l !== void 0 && s !== void 0 && (N = N.slice(l, l + s)), n === "virtual" && (N = to({
936
- rows: N,
937
- tableViewPortHeight: parseFloat((f.height || f.maxHeight || "").toString()),
938
+ let x = this.flatData;
939
+ const G = x.length;
940
+ o !== void 0 && l !== void 0 && (x = x.slice(o, o + l)), n === "virtual" && (x = xo({
941
+ rows: x,
942
+ tableViewPortHeight: parseFloat((k.height || k.maxHeight || "").toString()),
938
943
  scrollTop: this.wrapperScrollTop
939
944
  }), this.updateOnScroll = !1);
940
- const z = N.map((E) => E.level), J = g.length + (d ? 1 : 0) + 1, b = N.length > 0 && N.map((E, H) => {
941
- const Q = D(this.props.editField || "")(E.dataItem), _ = D(this.props.dataItemKey)(E.dataItem), w = String(_ || E.level.join(".")), Z = st(E.dataItem, this.props.expandField), T = this.props.selectedField ? D(this.props.selectedField)(E.dataItem) : void 0, S = {
942
- key: w,
943
- level: E.level,
944
- levels: z,
945
- dataItem: E.dataItem,
945
+ const b = x.map((D) => D.level), F = d.length + (m ? 1 : 0) + 1, v = x.length > 0 && x.map((D, P) => {
946
+ const Y = T(this.props.editField || "")(D.dataItem), U = T(this.props.dataItemKey)(D.dataItem), S = String(U || D.level.join(".")), J = Ct(D.dataItem, this.props.expandField), I = this.props.selectedField ? T(this.props.selectedField)(D.dataItem) : void 0, N = {
947
+ key: S,
948
+ level: D.level,
949
+ levels: b,
950
+ dataItem: D.dataItem,
946
951
  selectedField: this.props.selectedField,
947
- rowHeight: E.height,
952
+ rowHeight: D.height,
948
953
  render: this.props.rowRender,
949
954
  onDrop: this.onRowDrop,
950
955
  onDrag: this.onRowDrag,
951
- onClick: (O) => this.onRowClick(O, E),
952
- onDoubleClick: (O) => this.rowDoubleClick(O, E),
953
- onContextMenu: (O) => this.rowContextMenu(O, E),
954
- isAltRow: H % 2 !== 0,
955
- expanded: Z,
956
- rowIndex: H,
957
- ariaRowIndex: J + H,
958
- ariaSetSize: E.levelCount,
959
- ariaPosInSet: E.level[E.level.length - 1] + 1,
960
- isSelected: typeof T == "boolean" && T
961
- }, K = this.props.editRow, Y = this.props.row || an, W = V(E, Q, w, Z, H, T);
962
- return Q && K ? /* @__PURE__ */ t.createElement(K, { ...S, key: S.key }, W) : /* @__PURE__ */ t.createElement(Y, { ...S, key: S.key }, W);
963
- }) || /* @__PURE__ */ t.createElement("tr", { className: "k-table-row k-grid-norecords" }, /* @__PURE__ */ t.createElement("td", { className: "k-table-td", colSpan: p.length }, this.props.noRecords || /* @__PURE__ */ t.createElement(no, null))), X = (E) => this.props.sort && this.props.sort.some((H) => H.field === E), A = /* @__PURE__ */ t.createElement("colgroup", { ref: (E) => {
964
- this.columnResize.colGroupMain = E;
965
- } }, p.map(
966
- (E, H) => /* @__PURE__ */ t.createElement(
956
+ onClick: (q) => this.onRowClick(q, D),
957
+ onDoubleClick: (q) => this.rowDoubleClick(q, D),
958
+ onContextMenu: (q) => this.rowContextMenu(q, D),
959
+ isAltRow: P % 2 !== 0,
960
+ expanded: J,
961
+ rowIndex: P,
962
+ ariaRowIndex: F + P,
963
+ ariaSetSize: D.levelCount,
964
+ ariaPosInSet: D.level[D.level.length - 1] + 1,
965
+ isSelected: typeof I == "boolean" && I
966
+ }, j = this.props.editRow, Q = this.props.row || En, B = A(D, Y, S, J, P, I);
967
+ return Y && j ? /* @__PURE__ */ t.createElement(j, { ...N, key: N.key }, B) : /* @__PURE__ */ t.createElement(Q, { ...N, key: N.key }, B);
968
+ }) || /* @__PURE__ */ t.createElement("tr", { className: "k-table-row k-grid-norecords" }, /* @__PURE__ */ t.createElement("td", { className: "k-table-td", colSpan: C.length }, this.props.noRecords || /* @__PURE__ */ t.createElement(Mo, null))), w = (D) => this.props.sort && this.props.sort.some((P) => P.field === D), $ = /* @__PURE__ */ t.createElement("colgroup", { ref: (D) => {
969
+ this.columnResize.colGroupMain = D;
970
+ } }, C.map(
971
+ (D, P) => /* @__PURE__ */ t.createElement(
967
972
  "col",
968
973
  {
969
- key: H.toString(),
970
- className: X(E.field) ? "k-sorted" : void 0,
971
- style: E.width !== void 0 ? { width: E.width } : void 0
974
+ key: P.toString(),
975
+ className: w(D.field) ? "k-sorted" : void 0,
976
+ style: D.width !== void 0 ? { width: D.width } : void 0
972
977
  }
973
978
  )
974
- )), j = this.props.columnVirtualization || this.props.scrollable === "virtual", G = this.props.selectable && this.props.selectable.drag ? "none" : void 0, B = this.props.tableProps || {};
975
- return /* @__PURE__ */ t.createElement(nn.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ t.createElement(
979
+ )), O = this.props.columnVirtualization || this.props.scrollable === "virtual", _ = this.props.selectable && this.props.selectable.drag ? "none" : void 0, X = this.props.tableProps || {};
980
+ return /* @__PURE__ */ t.createElement(Dn.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ t.createElement(
976
981
  "div",
977
982
  {
978
983
  id: this.props.treelistId,
979
984
  style: this.props.style,
980
- className: de(
985
+ className: ie(
981
986
  "k-grid k-grid-md",
982
987
  this.props.className,
983
988
  { "k-treelist-scrollable": n !== "none" }
984
989
  ),
985
- ref: (E) => this.element = E,
986
- onScroll: j ? this.onScroll : void 0,
990
+ ref: (D) => this.element = D,
991
+ onScroll: O ? this.onScroll : void 0,
987
992
  onKeyDown: this.onKeyDown,
988
993
  onFocus: this.onFocus,
989
- "aria-rowcount": x,
990
- "aria-colcount": p.length,
994
+ "aria-rowcount": G,
995
+ "aria-colcount": C.length,
991
996
  role: "treegrid",
992
- ...Pa
997
+ ...fo
993
998
  },
994
999
  this.props.toolbar,
995
1000
  /* @__PURE__ */ t.createElement(
996
- _a,
1001
+ po,
997
1002
  {
998
1003
  selectable: this.props.selectable,
999
1004
  onRelease: this.selectionRelease,
1000
- childRef: (E) => {
1001
- this.tableElement = E;
1005
+ childRef: (D) => {
1006
+ this.tableElement = D;
1002
1007
  }
1003
1008
  },
1004
1009
  /* @__PURE__ */ t.createElement(
@@ -1006,1581 +1011,2080 @@ class zt extends t.Component {
1006
1011
  {
1007
1012
  className: "k-table k-table-md",
1008
1013
  ...this.props.tableProps || {},
1009
- style: { ...B.style || {}, userSelect: G },
1014
+ style: { ...X.style || {}, userSelect: _ },
1010
1015
  role: "presentation"
1011
1016
  },
1012
- A,
1013
- C,
1014
- /* @__PURE__ */ t.createElement("tbody", { className: "k-table-tbody", ...Ka, ref: (E) => this.tbodyElement = E, role: "presentation" }, b)
1017
+ $,
1018
+ f,
1019
+ /* @__PURE__ */ t.createElement("tbody", { className: "k-table-tbody", ...Co, ref: (D) => this.tbodyElement = D, role: "presentation" }, v)
1015
1020
  )
1016
1021
  ),
1017
1022
  this.props.pager && /* @__PURE__ */ t.createElement(
1018
1023
  this.props.pager,
1019
1024
  {
1020
1025
  className: "k-grid-pager",
1021
- total: x,
1022
- skip: l,
1023
- take: s,
1026
+ total: G,
1027
+ skip: o,
1028
+ take: l,
1024
1029
  onPageChange: this.onPageChange
1025
1030
  }
1026
1031
  ),
1027
- r && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(Ba, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ t.createElement($a, { ref: this.dragLogic.refDragElementClue })),
1028
- c
1032
+ s && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(ko, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ t.createElement(Do, { ref: this.dragLogic.refDragElementClue })),
1033
+ i
1029
1034
  ));
1030
1035
  }
1031
1036
  get flatData() {
1032
1037
  const { data: a = [], rowHeight: n = 0 } = this.props;
1033
- let o = 0;
1034
- const r = () => {
1035
- const s = { height: n, offsetTop: o };
1036
- return o += s.height, s;
1037
- }, l = this.updateOnScroll && this.prevData === a && this.tbodyOffsetTop > 0 && this.flattedData.length ? this.flattedData : a.map((s) => ({ ...s, ...r() }));
1038
- return this.prevData = a, this.flattedData = l, l;
1038
+ let r = 0;
1039
+ const s = () => {
1040
+ const l = { height: n, offsetTop: r };
1041
+ return r += l.height, l;
1042
+ }, o = this.updateOnScroll && this.prevData === a && this.tbodyOffsetTop > 0 && this.flattedData.length ? this.flattedData : a.map((l) => ({ ...l, ...s() }));
1043
+ return this.prevData = a, this.flattedData = o, o;
1039
1044
  }
1040
1045
  onSelectionChange(a) {
1041
1046
  if (this.props.onSelectionChange) {
1042
- const { event: n, item: o, dataIndex: r, columnIndex: l } = a, { mode: s, cell: c } = $t(this.props.selectable), m = {
1047
+ const { event: n, item: r, dataIndex: s, columnIndex: o } = a, { mode: l, cell: i } = on(this.props.selectable), g = {
1043
1048
  ...this.getEventArguments(n.syntheticEvent),
1044
- dataItem: o.dataItem,
1045
- level: o.level,
1046
- startColIndex: l,
1047
- endColIndex: l,
1048
- startRowIndex: r,
1049
- endRowIndex: r,
1049
+ dataItem: r.dataItem,
1050
+ level: r.level,
1051
+ startColIndex: o,
1052
+ endColIndex: o,
1053
+ startRowIndex: s,
1054
+ endRowIndex: s,
1050
1055
  dataItems: this.getLeafDataItems(),
1051
1056
  altKey: !1,
1052
1057
  ctrlKey: !1,
1053
1058
  shiftKey: !1,
1054
1059
  metaKey: !1,
1055
- mode: s,
1056
- cell: c,
1060
+ mode: l,
1061
+ cell: i,
1057
1062
  isDrag: !1,
1058
1063
  componentId: this.props.treelistId,
1059
1064
  selectedField: this.props.selectedField || ""
1060
1065
  };
1061
- this.props.onSelectionChange.call(void 0, m);
1066
+ this.props.onSelectionChange.call(void 0, g);
1062
1067
  }
1063
1068
  }
1064
1069
  }
1065
- zt.propTypes = {
1066
- data: i.array,
1067
- resizable: i.bool,
1068
- reorderable: i.bool,
1069
- sortable: i.oneOfType([
1070
- i.bool,
1071
- i.shape({
1072
- mode: i.oneOf(["single", "multiple"]),
1073
- allowUnsort: i.bool
1070
+ $t.propTypes = {
1071
+ data: u.array,
1072
+ resizable: u.bool,
1073
+ reorderable: u.bool,
1074
+ sortable: u.oneOfType([
1075
+ u.bool,
1076
+ u.shape({
1077
+ mode: u.oneOf(["single", "multiple"]),
1078
+ allowUnsort: u.bool
1074
1079
  })
1075
1080
  ]),
1076
- onSortChange: i.func,
1077
- sort: i.array,
1078
- columns: i.arrayOf(i.object),
1079
- columnVirtualization: i.bool,
1080
- filter: i.array,
1081
- onFilterChange: i.func,
1082
- filterRow: i.any,
1083
- toolbar: i.any,
1084
- noRecords: i.any,
1085
- onExpandChange: i.func,
1086
- expandField: i.string,
1087
- subItemsField: i.string,
1088
- selectedField: i.string,
1089
- onSelectionChange: i.func,
1090
- onHeaderSelectionChange: i.func,
1091
- onRowClick: i.func,
1092
- onItemChange: i.func,
1093
- editField: i.string,
1094
- scrollable: i.oneOf(["none", "scrollable", "virtual"]),
1095
- rowHeight: i.number,
1096
- style: i.object,
1097
- tableProps: i.object,
1098
- pager: i.any,
1099
- skip: i.number,
1100
- take: i.number,
1101
- onPageChange: i.func,
1102
- onDataStateChange: i.func,
1103
- onColumnResize: i.func,
1104
- onColumnReorder: i.func,
1105
- extendedColumns: i.arrayOf(i.object),
1106
- columnsMap: i.arrayOf(i.array),
1107
- dataItemKey: i.string.isRequired,
1108
- afterContent: i.any,
1109
- navigatable: i.bool,
1110
- idPrefix: i.string,
1111
- treelistId: i.string
1081
+ onSortChange: u.func,
1082
+ sort: u.array,
1083
+ columns: u.arrayOf(u.object),
1084
+ columnVirtualization: u.bool,
1085
+ filter: u.array,
1086
+ onFilterChange: u.func,
1087
+ filterRow: u.any,
1088
+ toolbar: u.any,
1089
+ noRecords: u.any,
1090
+ onExpandChange: u.func,
1091
+ expandField: u.string,
1092
+ subItemsField: u.string,
1093
+ selectedField: u.string,
1094
+ onSelectionChange: u.func,
1095
+ onHeaderSelectionChange: u.func,
1096
+ onRowClick: u.func,
1097
+ onItemChange: u.func,
1098
+ editField: u.string,
1099
+ scrollable: u.oneOf(["none", "scrollable", "virtual"]),
1100
+ rowHeight: u.number,
1101
+ style: u.object,
1102
+ tableProps: u.object,
1103
+ pager: u.any,
1104
+ skip: u.number,
1105
+ take: u.number,
1106
+ onPageChange: u.func,
1107
+ onDataStateChange: u.func,
1108
+ onColumnResize: u.func,
1109
+ onColumnReorder: u.func,
1110
+ extendedColumns: u.arrayOf(u.object),
1111
+ columnsMap: u.arrayOf(u.array),
1112
+ dataItemKey: u.string.isRequired,
1113
+ afterContent: u.any,
1114
+ navigatable: u.bool,
1115
+ idPrefix: u.string,
1116
+ treelistId: u.string
1112
1117
  };
1113
- zt.contextType = nn;
1114
- const Fe = t.forwardRef((e, a) => {
1115
- const { slotLevels: n, slotWidth: o, timelineHeaderCell: r } = e, {
1116
- columns: l,
1117
- noRecords: s,
1118
- resizable: c,
1119
- reorderable: m,
1120
- sortable: g,
1121
- sort: d,
1122
- filter: u,
1118
+ $t.contextType = Dn;
1119
+ const Ge = t.forwardRef((e, a) => {
1120
+ const { slotLevels: n, slotWidth: r, timelineHeaderCell: s } = e, {
1121
+ columns: o,
1122
+ noRecords: l,
1123
+ resizable: i,
1124
+ reorderable: g,
1125
+ sortable: d,
1126
+ sort: m,
1127
+ filter: c,
1123
1128
  columnMenuFilter: h,
1124
- columnMenu: p,
1125
- navigatable: C,
1126
- row: f,
1127
- selectable: v
1128
- } = Ne(), {
1129
- onDataStateChange: L,
1130
- onSortChange: V,
1131
- onFilterChange: N,
1132
- onColumnMenuFilterChange: x,
1133
- onExpandChange: z,
1134
- onRowClick: J,
1135
- onRowDoubleClick: b,
1136
- onRowContextMenu: X,
1137
- onColumnResize: A,
1138
- onColumnReorder: j,
1139
- onDependencyCreate: G,
1140
- onKeyDown: B,
1141
- onSelectionChange: E,
1142
- onHeaderSelectionChange: H
1143
- } = Bo(), Q = wn(), _ = Ko(), w = Tt(), Z = En(), T = Oo(), S = Po(), K = t.useRef(null), Y = t.useRef(null), W = t.useRef(null), O = t.useRef(null), he = t.useRef(0), ye = t.useRef(Bt()), F = t.useRef(Bt()), ee = t.useRef(null), Le = t.useRef(null), Ye = t.useCallback(
1144
- (y) => {
1145
- W.current && W.current.scrollIntoView(y);
1129
+ columnMenu: C,
1130
+ navigatable: f,
1131
+ row: k,
1132
+ selectable: y
1133
+ } = ze(), {
1134
+ onDataStateChange: M,
1135
+ onSortChange: A,
1136
+ onFilterChange: x,
1137
+ onColumnMenuFilterChange: G,
1138
+ onExpandChange: b,
1139
+ onRowClick: F,
1140
+ onRowDoubleClick: v,
1141
+ onRowContextMenu: w,
1142
+ onColumnResize: $,
1143
+ onColumnReorder: O,
1144
+ onDependencyCreate: _,
1145
+ onKeyDown: X,
1146
+ onSelectionChange: D,
1147
+ onHeaderSelectionChange: P
1148
+ } = vr(), Y = Wn(), U = yr(), S = Ft(), J = Pn(), I = kr(), N = Dr(), j = t.useRef(null), Q = t.useRef(null), B = t.useRef(null), q = t.useRef(null), ke = t.useRef(0), De = t.useRef(an()), z = t.useRef(an()), ae = t.useRef(null), Se = t.useRef(null), xe = t.useCallback(
1149
+ (R) => {
1150
+ B.current && B.current.scrollIntoView(R);
1146
1151
  },
1147
1152
  []
1148
1153
  );
1149
- t.useImperativeHandle(Le, () => ({ scrollIntoView: Ye })), t.useImperativeHandle(a, () => Le.current);
1150
- const fe = t.useRef(0), pe = t.useRef(0), Ce = t.useRef(0), ke = t.useRef(0), ue = t.useRef(null), ve = t.useRef(null), [me, Te] = t.useState(null), qe = Vo(n, K, r), Xe = zo(n, Y), Ee = Go(n, o), { extendedColumns: je, columnsWidth: Ze, columnsMap: Je } = t.useMemo(
1154
+ t.useImperativeHandle(Se, () => ({ scrollIntoView: xe })), t.useImperativeHandle(a, () => Se.current);
1155
+ const we = t.useRef(0), p = t.useRef(0), H = t.useRef(0), K = t.useRef(0), de = t.useRef(null), Ee = t.useRef(null), [le, Me] = t.useState(null), ot = hr(n, j, s), rt = fr(n, Q), be = pr(n, r), { extendedColumns: st, columnsWidth: lt, columnsMap: it } = t.useMemo(
1151
1156
  () => {
1152
- const y = Ya(
1157
+ const R = yo(
1153
1158
  [
1154
- ...l,
1159
+ ...o,
1155
1160
  {
1156
1161
  title: "",
1157
1162
  sortable: !1,
1158
1163
  resizable: !1,
1159
1164
  reorderable: !1,
1160
- width: Ee,
1161
- headerCell: () => qe,
1162
- cell: bn,
1165
+ width: be,
1166
+ headerCell: () => ot,
1167
+ cell: Kn,
1163
1168
  orderIndex: Number.MAX_SAFE_INTEGER,
1164
1169
  navigatable: !1
1165
1170
  }
1166
1171
  ],
1167
- { prevId: 0, idPrefix: ye.current }
1172
+ { prevId: 0, idPrefix: De.current }
1168
1173
  );
1169
- let P = 0;
1170
- return y.forEach((I, $, q) => {
1171
- const U = $ + 1 === q.length, ce = I.children.length === 0;
1172
- U ? I.isAccessible = !1 : (I.locked = !0, ce && (I.width = I.width || Ie)), ce && (P += parseFloat(String(I.width)));
1174
+ let Z = 0;
1175
+ return R.forEach((V, ee, oe) => {
1176
+ const te = ee + 1 === oe.length, ve = V.children.length === 0;
1177
+ te ? V.isAccessible = !1 : (V.locked = !0, ve && (V.width = V.width || Ve)), ve && (Z += parseFloat(String(V.width)));
1173
1178
  }), {
1174
- extendedColumns: y,
1175
- columnsWidth: P,
1176
- columnsMap: qa(y)
1179
+ extendedColumns: R,
1180
+ columnsWidth: Z,
1181
+ columnsMap: vo(R)
1177
1182
  };
1178
1183
  },
1179
- [l, Ee]
1180
- ), [Qe, et] = qo(), k = t.useCallback(
1181
- () => K.current && K.current.parentElement,
1184
+ [o, be]
1185
+ ), [ct, dt] = br(), E = t.useCallback(
1186
+ () => j.current && j.current.parentElement,
1182
1187
  []
1183
- ), se = () => {
1184
- const y = k(), P = Y.current, I = W.current && W.current.tbodyElement;
1185
- if (!y || !P || !I)
1188
+ ), he = () => {
1189
+ const R = E(), Z = Q.current, V = B.current && B.current.tbodyElement;
1190
+ if (!R || !Z || !V)
1186
1191
  return;
1187
- const $ = I.offsetTop, q = y.offsetLeft, U = Ee;
1188
- P.style.top = $ + "px", P.style.left = q + "px", P.style.width = U + "px", P.style.height = I.offsetHeight + "px";
1189
- }, ie = () => {
1190
- const y = k();
1191
- y && (he.current = y.offsetLeft);
1192
+ const ee = V.offsetTop, oe = R.offsetLeft, te = be;
1193
+ Z.style.top = ee + "px", Z.style.left = oe + "px", Z.style.width = te + "px", Z.style.height = V.offsetHeight + "px";
1194
+ }, ye = () => {
1195
+ const R = E();
1196
+ R && (ke.current = R.offsetLeft);
1192
1197
  };
1193
- t.useEffect(se), t.useEffect(ie);
1194
- const be = t.useCallback(
1195
- (y) => {
1196
- if (!O.current)
1198
+ t.useEffect(he), t.useEffect(ye);
1199
+ const Ne = t.useCallback(
1200
+ (R) => {
1201
+ if (!q.current)
1197
1202
  return;
1198
- const P = y.columns.slice(0, y.columns.length - 1);
1199
- if (y.end)
1200
- O.current.style.left = "0px";
1203
+ const Z = R.columns.slice(0, R.columns.length - 1);
1204
+ if (R.end)
1205
+ q.current.style.left = "0px";
1201
1206
  else {
1202
- const I = k();
1203
- if (!I)
1207
+ const V = E();
1208
+ if (!V)
1204
1209
  return;
1205
- O.current.style.left = I.offsetLeft - he.current + "px", se();
1210
+ q.current.style.left = V.offsetLeft - ke.current + "px", he();
1206
1211
  }
1207
- A({
1208
- ...y,
1209
- columns: P
1212
+ $({
1213
+ ...R,
1214
+ columns: Z
1210
1215
  });
1211
1216
  },
1212
- [A]
1213
- ), Re = t.useCallback(
1214
- (y) => {
1215
- const P = y.columns.slice(0, y.columns.length - 1);
1216
- j({
1217
- ...y,
1218
- columns: P
1217
+ [$]
1218
+ ), Fe = t.useCallback(
1219
+ (R) => {
1220
+ const Z = R.columns.slice(0, R.columns.length - 1);
1221
+ O({
1222
+ ...R,
1223
+ columns: Z
1219
1224
  });
1220
1225
  },
1221
- [A]
1222
- ), tt = t.useCallback(
1223
- (y) => {
1224
- const I = (ee.current && ee.current.ownerDocument ? ee.current.ownerDocument : document).elementFromPoint(y.clientX, y.clientY), $ = ee.current;
1225
- if (!I || !I.parentElement || !$)
1226
+ [$]
1227
+ ), ut = t.useCallback(
1228
+ (R) => {
1229
+ const V = (ae.current && ae.current.ownerDocument ? ae.current.ownerDocument : document).elementFromPoint(R.clientX, R.clientY), ee = ae.current;
1230
+ if (!V || !V.parentElement || !ee)
1226
1231
  return;
1227
- const q = $.parentElement, U = $.firstElementChild;
1228
- if (!q || !U)
1232
+ const oe = ee.parentElement, te = ee.firstElementChild;
1233
+ if (!oe || !te)
1229
1234
  return;
1230
- const ce = I.getAttribute(Ge);
1231
- if (ce) {
1232
- const Ca = $.offsetTop, ka = $.offsetLeft, Ea = q.offsetTop, Da = q.offsetLeft, wa = U.scrollTop, ya = U.scrollLeft;
1233
- Ce.current = ka + Da, ke.current = Ca + Ea, fe.current = y.clientX - Ce.current + ya, pe.current = y.clientY - ke.current + wa, ue.current = I.parentElement.getAttribute(We), ve.current = ce;
1235
+ const ve = V.getAttribute(Ke);
1236
+ if (ve) {
1237
+ const Ka = ee.offsetTop, $a = ee.offsetLeft, Ua = oe.offsetTop, qa = oe.offsetLeft, Ya = te.scrollTop, Xa = te.scrollLeft;
1238
+ H.current = $a + qa, K.current = Ka + Ua, we.current = R.clientX - H.current + Xa, p.current = R.clientY - K.current + Ya, de.current = V.parentElement.getAttribute($e), Ee.current = ve;
1234
1239
  }
1235
1240
  },
1236
1241
  []
1237
- ), De = t.useCallback(
1238
- (y) => {
1239
- const P = ee.current;
1240
- if (!P)
1242
+ ), Ie = t.useCallback(
1243
+ (R) => {
1244
+ const Z = ae.current;
1245
+ if (!Z)
1241
1246
  return;
1242
- const I = P.firstElementChild;
1243
- if (!I)
1247
+ const V = Z.firstElementChild;
1248
+ if (!V)
1244
1249
  return;
1245
- const $ = I.scrollTop, q = I.scrollLeft, U = y.clientX - Ce.current + q, ce = y.clientY - ke.current + $;
1246
- Math.abs(fe.current - U) < 10 && Math.abs(pe.current - ce) < 10 || Te({
1247
- startX: fe.current,
1248
- startY: pe.current,
1249
- endX: U,
1250
- endY: ce
1250
+ const ee = V.scrollTop, oe = V.scrollLeft, te = R.clientX - H.current + oe, ve = R.clientY - K.current + ee;
1251
+ Math.abs(we.current - te) < 10 && Math.abs(p.current - ve) < 10 || Me({
1252
+ startX: we.current,
1253
+ startY: p.current,
1254
+ endX: te,
1255
+ endY: ve
1251
1256
  });
1252
1257
  },
1253
1258
  []
1254
- ), pa = t.useCallback(
1255
- (y) => {
1256
- const I = (ee.current && ee.current.ownerDocument ? ee.current.ownerDocument : document).elementFromPoint(y.clientX, y.clientY);
1257
- if (!I || !I.parentElement)
1259
+ ), Ba = t.useCallback(
1260
+ (R) => {
1261
+ const V = (ae.current && ae.current.ownerDocument ? ae.current.ownerDocument : document).elementFromPoint(R.clientX, R.clientY);
1262
+ if (!V || !V.parentElement)
1258
1263
  return;
1259
- const $ = I.parentElement.getAttribute(We), q = I.getAttribute(Ge);
1260
- if (q && $ !== ue.current && G) {
1261
- let U;
1262
- ve.current === "start" ? U = q === "start" ? 3 : 2 : U = q === "start" ? 1 : 0, G({
1263
- fromId: ue.current,
1264
- toId: $,
1265
- type: U
1264
+ const ee = V.parentElement.getAttribute($e), oe = V.getAttribute(Ke);
1265
+ if (oe && ee !== de.current && _) {
1266
+ let te;
1267
+ Ee.current === "start" ? te = oe === "start" ? 3 : 2 : te = oe === "start" ? 1 : 0, _({
1268
+ fromId: de.current,
1269
+ toId: ee,
1270
+ type: te
1266
1271
  });
1267
1272
  }
1268
- fe.current = 0, pe.current = 0, Ce.current = 0, ke.current = 0, ue.current = null, ve.current = null, Te(null);
1273
+ we.current = 0, p.current = 0, H.current = 0, K.current = 0, de.current = null, Ee.current = null, Me(null);
1269
1274
  },
1270
- [G, Te]
1275
+ [_, Me]
1271
1276
  );
1272
1277
  return /* @__PURE__ */ t.createElement(
1273
- Tn,
1278
+ Bn,
1274
1279
  {
1275
- tasksStore: [Qe, et],
1276
- timelineWidth: Ee,
1280
+ tasksStore: [ct, dt],
1281
+ timelineWidth: be,
1277
1282
  dependencyDrag: {
1278
- isEnabled: !!G,
1279
- draggedId: ue.current,
1280
- onDependencyHandlePress: tt,
1281
- onDependencyHandleDrag: De,
1282
- onDependencyHandleRelease: pa
1283
+ isEnabled: !!_,
1284
+ draggedId: de.current,
1285
+ onDependencyHandlePress: ut,
1286
+ onDependencyHandleDrag: Ie,
1287
+ onDependencyHandleRelease: Ba
1283
1288
  }
1284
1289
  },
1285
- /* @__PURE__ */ t.createElement("div", { className: "k-gantt-content", ref: ee, style: { height: `calc(100% - ${_}px)` } }, /* @__PURE__ */ t.createElement(
1286
- zt,
1290
+ /* @__PURE__ */ t.createElement("div", { className: "k-gantt-content", ref: ae, style: { height: `calc(100% - ${U}px)` } }, /* @__PURE__ */ t.createElement(
1291
+ $t,
1287
1292
  {
1288
- treelistId: F.current,
1289
- ref: W,
1290
- extendedColumns: je,
1291
- columnsMap: Je,
1292
- dataItemKey: w.id,
1293
- data: T,
1294
- idPrefix: ye.current,
1295
- navigatable: C,
1296
- expandField: w.isExpanded,
1297
- subItemsField: w.children,
1298
- editField: w.isInEdit,
1299
- selectedField: w.isSelected,
1300
- onDataStateChange: L,
1301
- onSortChange: V,
1302
- onFilterChange: N,
1303
- onExpandChange: z,
1304
- onRowClick: J,
1305
- onRowDoubleClick: b,
1306
- onRowContextMenu: X,
1307
- onColumnResize: be,
1308
- onColumnReorder: Re,
1309
- onColumnMenuFilterChange: x,
1310
- onKeyDown: B,
1311
- onSelectionChange: E,
1312
- onHeaderSelectionChange: H,
1313
- tableProps: { style: { width: Ze }, className: "k-table k-table-md k-table-layout-fixed" },
1314
- noRecords: s,
1315
- rowHeight: Q,
1316
- resizable: c,
1317
- reorderable: m,
1318
- sortable: g,
1319
- sort: d,
1320
- filter: u,
1293
+ treelistId: z.current,
1294
+ ref: B,
1295
+ extendedColumns: st,
1296
+ columnsMap: it,
1297
+ dataItemKey: S.id,
1298
+ data: I,
1299
+ idPrefix: De.current,
1300
+ navigatable: f,
1301
+ expandField: S.isExpanded,
1302
+ subItemsField: S.children,
1303
+ editField: S.isInEdit,
1304
+ selectedField: S.isSelected,
1305
+ onDataStateChange: M,
1306
+ onSortChange: A,
1307
+ onFilterChange: x,
1308
+ onExpandChange: b,
1309
+ onRowClick: F,
1310
+ onRowDoubleClick: v,
1311
+ onRowContextMenu: w,
1312
+ onColumnResize: Ne,
1313
+ onColumnReorder: Fe,
1314
+ onColumnMenuFilterChange: G,
1315
+ onKeyDown: X,
1316
+ onSelectionChange: D,
1317
+ onHeaderSelectionChange: P,
1318
+ tableProps: { style: { width: lt }, className: "k-table k-table-md k-table-layout-fixed" },
1319
+ noRecords: l,
1320
+ rowHeight: Y,
1321
+ resizable: i,
1322
+ reorderable: g,
1323
+ sortable: d,
1324
+ sort: m,
1325
+ filter: c,
1321
1326
  columnMenuFilter: h,
1322
- columnMenu: p,
1323
- row: f,
1324
- selectable: v,
1325
- afterContent: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("svg", { className: "k-gantt-dependencies-svg", ref: O, style: { left: 0, top: 0 } }, S.map((y) => /* @__PURE__ */ t.createElement(Rn, { key: D(Z.id)(y), dependency: y }))), /* @__PURE__ */ t.createElement("svg", { className: "k-gantt-dependencies-svg", style: { left: 0, top: 0, zIndex: 3 } }, me && /* @__PURE__ */ t.createElement("polyline", { points: `${me.startX},${me.startY} ${me.endX},${me.endY}` })), T && T.length ? Xe : null)
1327
+ columnMenu: C,
1328
+ row: k,
1329
+ selectable: y,
1330
+ afterContent: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("svg", { className: "k-gantt-dependencies-svg", ref: q, style: { left: 0, top: 0 } }, N.map((R) => /* @__PURE__ */ t.createElement($n, { key: T(J.id)(R), dependency: R }))), /* @__PURE__ */ t.createElement("svg", { className: "k-gantt-dependencies-svg", style: { left: 0, top: 0, zIndex: 3 } }, le && /* @__PURE__ */ t.createElement("polyline", { points: `${le.startX},${le.startY} ${le.endX},${le.endY}` })), I && I.length ? rt : null)
1326
1331
  }
1327
1332
  ))
1328
1333
  );
1329
1334
  });
1330
- Fe.displayName = "KendoReactGanttBaseView";
1331
- const lt = "gantt.weekViewTitle", it = "gantt.dayViewTitle", ct = "gantt.monthViewTitle", dt = "gantt.yearViewTitle", ut = "gantt.filterClearButton", Pe = "gantt.filterEqOperator", _e = "gantt.filterNotEqOperator", Ke = "gantt.filterIsNullOperator", Be = "gantt.filterIsNotNullOperator", Sn = "gantt.filterIsEmptyOperator", xn = "gantt.filterIsNotEmptyOperator", In = "gantt.filterStartsWithOperator", Nn = "gantt.filterContainsOperator", Mn = "gantt.filterNotContainsOperator", Fn = "gantt.filterEndsWithOperator", Ln = "gantt.filterGteOperator", Hn = "gantt.filterGtOperator", An = "gantt.filterLteOperator", Vn = "gantt.filterLtOperator", zn = "gantt.filterIsTrue", Gn = "gantt.filterIsFalse", Wn = "gantt.filterBooleanAll", On = "gantt.filterAfterOrEqualOperator", Pn = "gantt.filterAfterOperator", _n = "gantt.filterBeforeOperator", Kn = "gantt.filterBeforeOrEqualOperator", jo = "gantt.noRecords", Bn = "gantt.editSave", Gt = "gantt.editCancel", $n = "gantt.editorTitle", Un = "gantt.editorTaskTitle", Yn = "gantt.editorTaskStart", qn = "gantt.editorTaskEnd", Xn = "gantt.editorTaskComplete", jn = "gantt.editorValidationRequired", Zn = "gantt.editorValidationStart", Jn = "gantt.editorValidationEnd", Qn = "gantt.addTask", ea = "gantt.addChild", ta = "gantt.addAbove", na = "gantt.addBelow", aa = "gantt.editorDelete", oa = "gantt.deleteConfirmation", sa = "gantt.deleteDialogTitle", ae = {
1332
- [lt]: "Week",
1333
- [it]: "Day",
1334
- [ct]: "Month",
1335
- [dt]: "Year",
1336
- [ut]: "Clear",
1337
- [Pe]: "Is equal to",
1338
- [_e]: "Is not equal to",
1339
- [Ke]: "Is null",
1340
- [Be]: "Is not null",
1341
- [Sn]: "Is empty",
1342
- [xn]: "Is not empty",
1343
- [In]: "Starts with",
1344
- [Nn]: "Contains",
1345
- [Mn]: "Does not contain",
1346
- [Fn]: "Ends with",
1347
- [Ln]: "Is greater than or equal to",
1348
- [Hn]: "Is greater than",
1349
- [An]: "Is less than or equal to",
1350
- [Vn]: "Is less than",
1351
- [zn]: "Is true",
1352
- [Gn]: "Is false",
1353
- [Wn]: "(All)",
1354
- [On]: "Is after or equal to",
1355
- [Pn]: "Is after",
1356
- [_n]: "Is before",
1357
- [Kn]: "Is before or equal to",
1358
- [jo]: "No records available",
1359
- [Bn]: "Save",
1360
- [Gt]: "Cancel",
1361
- [$n]: "Task",
1362
- [Un]: "Title",
1363
- [Yn]: "Start",
1364
- [qn]: "End",
1365
- [Xn]: "Complete",
1366
- [jn]: "Field is required.",
1367
- [Zn]: "Start time must be be before End time.",
1368
- [Jn]: "End time must be after Start time.",
1369
- [Qn]: "Add Task",
1370
- [ea]: "Add Child",
1371
- [ta]: "Add Above",
1372
- [na]: "Add Below",
1373
- [aa]: "Delete",
1374
- [oa]: "Are you sure you want to delete this event?",
1375
- [sa]: "Delete Event"
1376
- }, $e = t.forwardRef((e, a) => {
1377
- const { slotWidth: n = Ae.slotWidth, firstSlotRangeRef: o, timelineHeaderCell: r } = e, { timezone: l } = Ne(), s = xe(), c = t.useRef(null), m = t.useRef(null), g = t.useCallback(
1378
- (C) => {
1379
- m.current && m.current.scrollIntoView(C);
1335
+ Ge.displayName = "KendoReactGanttBaseView";
1336
+ const Dt = "gantt.weekViewTitle", Et = "gantt.dayViewTitle", yt = "gantt.monthViewTitle", vt = "gantt.yearViewTitle", wt = "gantt.filterClearButton", Je = "gantt.filterEqOperator", Qe = "gantt.filterNotEqOperator", et = "gantt.filterIsNullOperator", tt = "gantt.filterIsNotNullOperator", Un = "gantt.filterIsEmptyOperator", qn = "gantt.filterIsNotEmptyOperator", Yn = "gantt.filterStartsWithOperator", Xn = "gantt.filterContainsOperator", jn = "gantt.filterNotContainsOperator", Zn = "gantt.filterEndsWithOperator", Jn = "gantt.filterGteOperator", Qn = "gantt.filterGtOperator", ea = "gantt.filterLteOperator", ta = "gantt.filterLtOperator", na = "gantt.filterIsTrue", aa = "gantt.filterIsFalse", oa = "gantt.filterBooleanAll", ra = "gantt.filterAfterOrEqualOperator", sa = "gantt.filterAfterOperator", la = "gantt.filterBeforeOperator", ia = "gantt.filterBeforeOrEqualOperator", Rr = "gantt.noRecords", ca = "gantt.editSave", Ut = "gantt.editCancel", qt = "gantt.editAdd", Yt = "gantt.editRemove", da = "gantt.editTabGeneral", ua = "gantt.editTabPredecessors", ma = "gantt.editTabSuccessors", ga = "gantt.editorTitle", ha = "gantt.editorTaskTitle", fa = "gantt.editorTaskStart", pa = "gantt.editorTaskEnd", xr = "gantt.editorTaskPlannedStart", Mr = "gantt.editorTaskPlannedEnd", Nr = "gantt.editorTaskActualStart", Fr = "gantt.editorTaskActualEnd", Ca = "gantt.editorTaskComplete", ka = "gantt.editorTaskParent", Da = "gantt.editorValidationRequired", Ea = "gantt.editorValidationStart", ya = "gantt.editorValidationEnd", va = "gantt.editorValidationPercentCompleteRange", Tt = "gantt.editorDependencyTypesFF", wa = "gantt.editorDependencyTypesSF", Ta = "gantt.editorDependencyTypesFS", Sa = "gantt.editorDependencyTypesSS", ba = "gantt.addTask", Ia = "gantt.addChild", Ra = "gantt.addAbove", xa = "gantt.addBelow", Ma = "gantt.viewSelector", Xt = "gantt.editorDelete", Na = "gantt.deleteConfirmation", Fa = "gantt.deleteDialogTitle", jt = "gantt.editorDependencyNameLabel", Zt = "gantt.editorDependencyTypeLabel", se = {
1337
+ [Dt]: "Week",
1338
+ [Et]: "Day",
1339
+ [yt]: "Month",
1340
+ [vt]: "Year",
1341
+ [wt]: "Clear",
1342
+ [Je]: "Is equal to",
1343
+ [Qe]: "Is not equal to",
1344
+ [et]: "Is null",
1345
+ [tt]: "Is not null",
1346
+ [Un]: "Is empty",
1347
+ [qn]: "Is not empty",
1348
+ [Yn]: "Starts with",
1349
+ [Xn]: "Contains",
1350
+ [jn]: "Does not contain",
1351
+ [Zn]: "Ends with",
1352
+ [Jn]: "Is greater than or equal to",
1353
+ [Qn]: "Is greater than",
1354
+ [ea]: "Is less than or equal to",
1355
+ [ta]: "Is less than",
1356
+ [na]: "Is true",
1357
+ [aa]: "Is false",
1358
+ [oa]: "(All)",
1359
+ [ra]: "Is after or equal to",
1360
+ [sa]: "Is after",
1361
+ [la]: "Is before",
1362
+ [ia]: "Is before or equal to",
1363
+ [Rr]: "No records available",
1364
+ [ca]: "Save",
1365
+ [Ut]: "Cancel",
1366
+ [qt]: "Add",
1367
+ [Yt]: "Remove",
1368
+ [da]: "General",
1369
+ [ua]: "Predecessors",
1370
+ [ma]: "Successors",
1371
+ [ga]: "Edit task",
1372
+ [ha]: "Title",
1373
+ [fa]: "Start",
1374
+ [pa]: "End",
1375
+ [xr]: "Planned Start Date",
1376
+ [Mr]: "Planned End Date",
1377
+ [Nr]: "Actual Start Date",
1378
+ [Fr]: "Actual End Date",
1379
+ [Ca]: "Complete",
1380
+ [ka]: "Parent",
1381
+ [Da]: "Field is required.",
1382
+ [Ea]: "Start time must be be before End time.",
1383
+ [ya]: "End time must be after Start time.",
1384
+ [va]: "Value should be between 0 and 100.",
1385
+ [Tt]: "Finish-Finish",
1386
+ [Ta]: "Finish-Start",
1387
+ [wa]: "Start-Finish",
1388
+ [Sa]: "Start-Start",
1389
+ [ba]: "Add Task",
1390
+ [Ia]: "Add Child",
1391
+ [Ra]: "Add Above",
1392
+ [xa]: "Add Below",
1393
+ [Ma]: "View Selector",
1394
+ [Xt]: "Delete",
1395
+ [Na]: "Are you sure you want to delete this event?",
1396
+ [Fa]: "Delete Event",
1397
+ [jt]: "Name",
1398
+ [Zt]: "Type"
1399
+ }, nt = t.forwardRef((e, a) => {
1400
+ const { slotWidth: n = Oe.slotWidth, firstSlotRangeRef: r, timelineHeaderCell: s } = e, { timezone: o } = ze(), l = Ae(), i = t.useRef(null), g = t.useRef(null), d = t.useCallback(
1401
+ (f) => {
1402
+ g.current && g.current.scrollIntoView(f);
1380
1403
  },
1381
1404
  []
1382
1405
  );
1383
- t.useImperativeHandle(c, () => ({ scrollIntoView: g })), t.useImperativeHandle(a, () => c.current);
1384
- const d = Me(), u = e.workWeekStart || Ae.workWeekStart, h = e.workWeekEnd || Ae.workWeekEnd, p = t.useMemo(
1406
+ t.useImperativeHandle(i, () => ({ scrollIntoView: d })), t.useImperativeHandle(a, () => i.current);
1407
+ const m = Pe(), c = e.workWeekStart || Oe.workWeekStart, h = e.workWeekEnd || Oe.workWeekEnd, C = t.useMemo(
1385
1408
  () => {
1386
- const C = gn({
1387
- workWeekStart: u,
1409
+ const f = Fn({
1410
+ workWeekStart: c,
1388
1411
  workWeekEnd: h
1389
- }), f = [], v = pn(d, { timezone: l }, s);
1390
- return v.forEach((L) => {
1391
- const V = fn(L.range, { workDays: C, timezone: l }, s);
1392
- f.push.apply(f, V);
1393
- }), o && f[0] && (o.current = f[0].range), [v, f];
1412
+ }), k = [], y = Hn(m, { timezone: o }, l);
1413
+ return y.forEach((M) => {
1414
+ const A = An(M.range, { workDays: f, timezone: o }, l);
1415
+ k.push.apply(k, A);
1416
+ }), r && k[0] && (r.current = k[0].range), [y, k];
1394
1417
  },
1395
- [l, d.start.getTime(), d.end.getTime(), s, u, h]
1418
+ [o, m.start.getTime(), m.end.getTime(), l, c, h]
1396
1419
  );
1397
1420
  return /* @__PURE__ */ t.createElement(
1398
- Fe,
1421
+ Ge,
1399
1422
  {
1400
- ref: m,
1423
+ ref: g,
1401
1424
  slotWidth: n,
1402
- slotLevels: p,
1403
- timelineHeaderCell: r
1425
+ slotLevels: C,
1426
+ timelineHeaderCell: s
1404
1427
  }
1405
1428
  );
1406
- }), Zo = ({ intl: e, tasksStart: a, tasksEnd: n, timezone: o }) => {
1407
- const r = R.fromLocalDate(a, o), l = R.fromLocalDate(n, o), s = mn(at(re(r), e.firstDay())), c = Dt(at(re(l), e.firstDay()), cn), m = R.fromUTCDate(le(s), o), g = R.fromUTCDate(le(c), o);
1429
+ }), Lr = ({ intl: e, tasksStart: a, tasksEnd: n, timezone: r }) => {
1430
+ const s = L.fromLocalDate(a, r), o = L.fromLocalDate(n, r), l = Nn(ft(pe(s), e.firstDay())), i = Rt(ft(pe(o), e.firstDay()), Rn), g = L.fromUTCDate(Ce(l), r), d = L.fromUTCDate(Ce(i), r);
1408
1431
  return {
1409
- start: new Date(m.getTime()),
1410
- end: new Date(g.getTime()),
1411
- zonedStart: m,
1412
- zonedEnd: g
1432
+ start: new Date(g.getTime()),
1433
+ end: new Date(d.getTime()),
1434
+ zonedStart: g,
1435
+ zonedEnd: d
1413
1436
  };
1414
- }, Ae = {
1437
+ }, Oe = {
1415
1438
  name: "week",
1416
- dateRange: Zo,
1417
- title: (e) => e.toLanguageString(lt, ae[lt]),
1418
- slotWidth: Ie,
1439
+ dateRange: Lr,
1440
+ title: (e) => e.toLanguageString(Dt, se[Dt]),
1441
+ slotWidth: Ve,
1419
1442
  workWeekStart: 1,
1420
1443
  workWeekEnd: 5,
1421
1444
  workDayStart: "08:00",
1422
1445
  workDayEnd: "17:00"
1423
1446
  };
1424
- $e.defaultProps = Ae;
1425
- $e.propTypes = {
1426
- name: i.string,
1427
- dateRange: i.oneOfType([i.func, i.object]),
1428
- title: i.oneOfType([i.string, i.func]),
1429
- slotWidth: i.number,
1430
- workWeekStart: i.number,
1431
- workWeekEnd: i.number,
1432
- workDayStart: i.string,
1433
- workDayEnd: i.string
1447
+ nt.defaultProps = Oe;
1448
+ nt.propTypes = {
1449
+ name: u.string,
1450
+ dateRange: u.oneOfType([u.func, u.object]),
1451
+ title: u.oneOfType([u.string, u.func]),
1452
+ slotWidth: u.number,
1453
+ workWeekStart: u.number,
1454
+ workWeekEnd: u.number,
1455
+ workDayStart: u.string,
1456
+ workDayEnd: u.string
1434
1457
  };
1435
- $e.displayName = "KendoReactGanttWeekView";
1436
- const Jo = (e, a, n) => {
1437
- const [o, r] = t.useState(a || e), l = t.useCallback(
1438
- (s, c) => {
1439
- r(s), n && n.call(void 0, { ...c, value: s });
1458
+ nt.displayName = "KendoReactGanttWeekView";
1459
+ const Ar = (e, a, n) => {
1460
+ const [r, s] = t.useState(a || e), o = t.useCallback(
1461
+ (l, i) => {
1462
+ s(l), n && n.call(void 0, { ...i, value: l });
1440
1463
  },
1441
- [n, r]
1464
+ [n, s]
1442
1465
  );
1443
- return [a !== void 0 ? a : o, l];
1444
- }, ra = (e) => {
1445
- const [a, n] = Dn(), o = oe(), r = t.useMemo(
1446
- () => typeof e.view.title == "function" ? e.view.title.call(void 0, o) : e.view.title,
1447
- [e.view.title, o]
1448
- ), l = t.useCallback(
1466
+ return [a !== void 0 ? a : r, o];
1467
+ }, La = (e) => {
1468
+ const [a, n] = Gn(), r = ce(), s = t.useMemo(
1469
+ () => typeof e.view.title == "function" ? e.view.title.call(void 0, r) : e.view.title,
1470
+ [e.view.title, r]
1471
+ ), o = t.useCallback(
1449
1472
  () => {
1450
1473
  e.view.name && n(e.view.name);
1451
1474
  },
1452
1475
  [n, e.view.name]
1453
1476
  );
1454
1477
  return /* @__PURE__ */ t.createElement(
1455
- ze,
1478
+ me,
1456
1479
  {
1457
1480
  role: "button",
1458
1481
  type: "button",
1459
1482
  tabIndex: -1,
1460
1483
  togglable: !0,
1461
1484
  selected: e.view.name === a,
1462
- onClick: l
1485
+ onClick: o
1463
1486
  },
1464
- r
1487
+ s
1465
1488
  );
1466
1489
  };
1467
- ra.displayName = "KendoReactGanttViewSelectorItem";
1468
- const la = t.forwardRef(() => {
1469
- const e = _o(), [a, n] = Dn(), o = e.find((s) => s.props.name === a), r = oe(), l = t.useCallback(
1470
- (s) => {
1471
- n && (s.syntheticEvent.preventDefault(), n(s.item.name));
1490
+ La.displayName = "KendoReactGanttViewSelectorItem";
1491
+ const Aa = t.forwardRef(() => {
1492
+ const e = Er(), [a, n] = Gn(), r = ce(), s = (l) => r.toLanguageString(l, se[l]), o = t.useCallback(
1493
+ (l) => {
1494
+ n && (l.preventDefault(), n(l.target.value));
1472
1495
  },
1473
1496
  [n]
1474
1497
  );
1475
- return /* @__PURE__ */ t.createElement("div", { className: "k-gantt-views-wrapper" }, /* @__PURE__ */ t.createElement(io, { className: "k-gantt-views" }, e.map((s) => /* @__PURE__ */ t.createElement(ra, { key: s.props.name, view: s.props }))), o && /* @__PURE__ */ t.createElement(
1476
- on,
1498
+ return /* @__PURE__ */ t.createElement("div", { className: "k-gantt-views-wrapper" }, /* @__PURE__ */ t.createElement(Vo, { className: "k-gantt-views" }, e.map((l) => /* @__PURE__ */ t.createElement(La, { key: l.props.name, view: l.props }))), /* @__PURE__ */ t.createElement(
1499
+ "select",
1477
1500
  {
1478
- className: "k-views-dropdown",
1479
- onItemClick: l,
1480
- popupSettings: { popupClass: "k-gantt-toolbar" },
1481
- textField: "title",
1482
- items: e.map((s) => ({
1483
- ...s.props,
1484
- selected: s.props.name === a,
1485
- title: typeof s.props.title == "function" ? s.props.title.call(void 0, r) : s.props.title
1486
- })),
1487
- text: /* @__PURE__ */ t.createElement(t.Fragment, null, typeof o.props.title == "function" ? o.props.title.call(void 0, r) : o.props.title, /* @__PURE__ */ t.createElement(mt, { name: "caret-alt-down", icon: ro }))
1488
- }
1501
+ value: a,
1502
+ onChange: o,
1503
+ "aria-label": s(Ma),
1504
+ className: "k-picker k-picker-solid k-dropdown-list k-dropdown k-views-dropdown k-rounded-md"
1505
+ },
1506
+ e.map((l) => /* @__PURE__ */ t.createElement("option", { key: l.props.name, value: l.props.name }, typeof l.props.title == "function" ? l.props.title.call(void 0, r) : l.props.title))
1489
1507
  ));
1490
1508
  });
1491
- la.displayName = "KendoReactGanttViewSelectorList";
1492
- const ia = t.forwardRef((e, a) => {
1509
+ Aa.displayName = "KendoReactGanttViewSelectorList";
1510
+ const Ha = t.forwardRef((e, a) => {
1493
1511
  const {
1494
1512
  className: n,
1495
- ...o
1496
- } = e, r = t.useRef(null);
1497
- return t.useImperativeHandle(a, () => ({ element: r.current, props: e })), /* @__PURE__ */ t.createElement(
1498
- co,
1513
+ ...r
1514
+ } = e, s = t.useRef(null);
1515
+ return t.useImperativeHandle(a, () => ({ element: s.current, props: e })), /* @__PURE__ */ t.createElement(
1516
+ zo,
1499
1517
  {
1500
- ref: (l) => {
1501
- l && (r.current = l.element);
1518
+ ref: (o) => {
1519
+ o && (s.current = o.element);
1502
1520
  },
1503
- className: de("k-gantt-views", n),
1504
- ...o
1521
+ className: ie("k-gantt-views", n),
1522
+ ...r
1505
1523
  },
1506
1524
  e.children
1507
1525
  );
1508
1526
  });
1509
- ia.displayName = "KendoReactGanttViewSelector";
1510
- const ca = t.forwardRef((e, a) => {
1527
+ Ha.displayName = "KendoReactGanttViewSelector";
1528
+ const Va = t.forwardRef((e, a) => {
1511
1529
  const {
1512
1530
  className: n,
1513
- ...o
1514
- } = e, r = t.useRef(null), l = t.useRef(null);
1515
- t.useImperativeHandle(l, () => ({ element: r.current, props: e })), t.useImperativeHandle(a, () => l.current);
1516
- const s = t.useMemo(() => de("k-gantt-toolbar k-gantt-header", n), [n]);
1531
+ ...r
1532
+ } = e, s = t.useRef(null), o = t.useRef(null);
1533
+ t.useImperativeHandle(o, () => ({ element: s.current, props: e })), t.useImperativeHandle(a, () => o.current);
1534
+ const l = t.useMemo(() => ie("k-gantt-toolbar k-gantt-header", n), [n]);
1517
1535
  return /* @__PURE__ */ t.createElement(
1518
- uo,
1536
+ Po,
1519
1537
  {
1520
- ref: (c) => {
1521
- c && (r.current = c.element);
1538
+ ref: (i) => {
1539
+ i && (s.current = i.element);
1522
1540
  },
1523
- className: s,
1524
- ...o
1541
+ className: l,
1542
+ ...r
1525
1543
  },
1526
1544
  e.children
1527
1545
  );
1528
1546
  });
1529
- ca.displayName = "KendoReactGanttToolbar";
1530
- const Zt = {
1547
+ Va.displayName = "KendoReactGanttToolbar";
1548
+ const mn = {
1531
1549
  name: "@progress/kendo-react-gantt",
1532
1550
  productName: "KendoReact",
1533
1551
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
1534
- publishDate: 1705647254,
1552
+ publishDate: 1705940567,
1535
1553
  version: "",
1536
1554
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
1537
- }, da = t.forwardRef((e, a) => {
1538
- const n = oe(), o = (u) => n.toLanguageString(u, ae[u]), r = o(Qn), l = o(ea), s = o(ta), c = o(na), m = t.useCallback(
1539
- (u) => {
1540
- u.syntheticEvent.preventDefault();
1541
- const h = u.item && u.item.direction ? u.item.direction : "none";
1555
+ }, za = t.forwardRef((e, a) => {
1556
+ const n = ce(), r = (c) => n.toLanguageString(c, se[c]), s = r(ba), o = r(Ia), l = r(Ra), i = r(xa), g = t.useCallback(
1557
+ (c) => {
1558
+ c.syntheticEvent.preventDefault();
1559
+ const h = c.item && c.item.direction ? c.item.direction : "none";
1542
1560
  e.onClick && e.onClick({
1543
- nativeEvent: u.nativeEvent,
1544
- syntheticEvent: u.syntheticEvent,
1561
+ nativeEvent: c.nativeEvent,
1562
+ syntheticEvent: c.syntheticEvent,
1545
1563
  direction: h
1546
1564
  });
1547
1565
  },
1548
1566
  [e.onClick]
1549
- ), g = t.useCallback(
1550
- (u) => {
1551
- u.preventDefault(), e.onClick && e.onClick({
1552
- nativeEvent: u && u.nativeEvent,
1553
- syntheticEvent: u,
1567
+ ), d = t.useCallback(
1568
+ (c) => {
1569
+ c.preventDefault(), e.onClick && e.onClick({
1570
+ nativeEvent: c && c.nativeEvent,
1571
+ syntheticEvent: c,
1554
1572
  direction: "none"
1555
1573
  });
1556
1574
  },
1557
1575
  [e.onClick]
1558
- ), d = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(mt, { name: "plus", icon: lo }), r);
1576
+ ), m = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(fn, { name: "plus", icon: It }), s);
1559
1577
  return e.selectedTask ? /* @__PURE__ */ t.createElement(
1560
- on,
1578
+ Go,
1561
1579
  {
1562
1580
  className: "k-views-dropdown",
1563
- onItemClick: m,
1581
+ onItemClick: g,
1564
1582
  popupSettings: { popupClass: "k-gantt-toolbar" },
1565
1583
  textField: "title",
1566
1584
  items: [
1567
- { title: l, direction: "child" },
1568
- { title: s, direction: "above" },
1569
- { title: c, direction: "below" }
1585
+ { title: o, direction: "child" },
1586
+ { title: l, direction: "above" },
1587
+ { title: i, direction: "below" }
1570
1588
  ],
1571
- text: d
1589
+ text: m
1572
1590
  }
1573
- ) : /* @__PURE__ */ t.createElement(ze, { onClick: g }, d);
1591
+ ) : /* @__PURE__ */ t.createElement(me, { onClick: d }, m);
1574
1592
  });
1575
- da.displayName = "KendoReactGanttAddButton";
1576
- const Wt = t.forwardRef((e, a) => {
1577
- ba(Zt);
1578
- const n = Ra(Zt), {
1579
- columns: o = Se.columns,
1580
- taskData: r = Se.taskData,
1581
- dependencyData: l = Se.dependencyData,
1582
- style: s,
1583
- className: c,
1584
- noRecords: m,
1585
- timezone: g,
1586
- rowHeight: d = Se.rowHeight,
1587
- resizable: u,
1593
+ za.displayName = "KendoReactGanttAddButton";
1594
+ const Jt = t.forwardRef((e, a) => {
1595
+ Ja(mn);
1596
+ const n = Qa(mn), {
1597
+ columns: r = Le.columns,
1598
+ taskData: s = Le.taskData,
1599
+ dependencyData: o = Le.dependencyData,
1600
+ style: l,
1601
+ className: i,
1602
+ noRecords: g,
1603
+ timezone: d,
1604
+ rowHeight: m = Le.rowHeight,
1605
+ resizable: c,
1588
1606
  reorderable: h,
1589
- sortable: p,
1590
- sort: C,
1591
- filter: f,
1592
- columnMenuFilter: v,
1593
- columnMenu: L,
1594
- navigatable: V,
1595
- toolbar: N,
1596
- row: x,
1597
- selectable: z
1598
- } = e, J = xe(), { fields: b } = t.useMemo(() => To(e.taskModelFields), [e.taskModelFields]), { fields: X } = t.useMemo(() => bo(e.dependencyModelFields), [e.dependencyModelFields]), A = t.useCallback(
1599
- Wo(b.isExpanded, b.children),
1600
- [b.isExpanded, b.children]
1601
- ), j = t.useRef(null), G = t.useRef(null), B = t.useRef(null), E = t.useRef(null), H = t.useRef(null), Q = t.useCallback(
1602
- (k) => {
1603
- const se = D(b.start)(k), ie = D(b.end)(k), be = D(b.isSelected)(k);
1604
- (!G.current || se < G.current) && (G.current = se), (!B.current || ie > B.current) && (B.current = ie), be && (E.current = k);
1607
+ sortable: C,
1608
+ sort: f,
1609
+ filter: k,
1610
+ columnMenuFilter: y,
1611
+ columnMenu: M,
1612
+ navigatable: A,
1613
+ toolbar: x,
1614
+ row: G,
1615
+ selectable: b
1616
+ } = e, F = Ae(), { fields: v } = t.useMemo(() => nr(e.taskModelFields), [e.taskModelFields]), { fields: w } = t.useMemo(() => ar(e.dependencyModelFields), [e.dependencyModelFields]), $ = t.useCallback(
1617
+ Cr(v.isExpanded, v.children),
1618
+ [v.isExpanded, v.children]
1619
+ ), O = t.useRef(null), _ = t.useRef(null), X = t.useRef(null), D = t.useRef(null), P = t.useRef(null), Y = t.useCallback(
1620
+ (E) => {
1621
+ const he = T(v.start)(E), ye = T(v.end)(E), Ne = T(v.isSelected)(E);
1622
+ (!_.current || he < _.current) && (_.current = he), (!X.current || ye > X.current) && (X.current = ye), Ne && (D.current = E);
1605
1623
  },
1606
- [b.start, b.end]
1607
- ), _ = t.useMemo(
1608
- () => (G.current = null, B.current = null, E.current = null, oo(r, A, Q)),
1609
- [r, A]
1624
+ [v.start, v.end]
1625
+ ), U = t.useMemo(
1626
+ () => (_.current = null, X.current = null, D.current = null, yn(s, $, Y)),
1627
+ [s, $]
1610
1628
  );
1611
- (!G.current || !B.current) && (G.current = new Date(Yt), B.current = new Date(Yt));
1612
- const w = t.Children.toArray(
1613
- e.children || [/* @__PURE__ */ t.createElement($e, { key: "week", firstSlotRangeRef: H })]
1629
+ (!_.current || !X.current) && (_.current = new Date(ln), X.current = new Date(ln));
1630
+ const S = t.Children.toArray(
1631
+ e.children || [/* @__PURE__ */ t.createElement(nt, { key: "week", firstSlotRangeRef: P })]
1614
1632
  ), [
1615
- Z,
1616
- T
1617
- ] = Jo(
1618
- e.defaultView || w[0].props.name,
1633
+ J,
1634
+ I
1635
+ ] = Ar(
1636
+ e.defaultView || S[0].props.name,
1619
1637
  e.view,
1620
1638
  e.onViewChange
1621
- ), S = w.find((k) => k.props.name === Z) || w[0], K = typeof S.props.dateRange == "function" ? S.props.dateRange.call(void 0, {
1622
- intl: J,
1623
- tasksStart: G.current,
1624
- tasksEnd: B.current,
1625
- timezone: g
1626
- }) : S.props.dateRange, Y = t.useRef(null), [W, O] = t.useState(0);
1639
+ ), N = S.find((E) => E.props.name === J) || S[0], j = typeof N.props.dateRange == "function" ? N.props.dateRange.call(void 0, {
1640
+ intl: F,
1641
+ tasksStart: _.current,
1642
+ tasksEnd: X.current,
1643
+ timezone: d
1644
+ }) : N.props.dateRange, Q = t.useRef(null), [B, q] = t.useState(0);
1627
1645
  t.useLayoutEffect(
1628
1646
  () => {
1629
- Y.current && O(Y.current.element.offsetHeight);
1647
+ Q.current && q(Q.current.element.offsetHeight);
1630
1648
  },
1631
1649
  []
1632
1650
  );
1633
- const he = t.useCallback(
1634
- (k) => {
1635
- j.current && j.current.scrollIntoView(k);
1651
+ const ke = t.useCallback(
1652
+ (E) => {
1653
+ O.current && O.current.scrollIntoView(E);
1636
1654
  },
1637
1655
  []
1638
- ), ye = t.useRef(null), F = t.useRef(null);
1639
- t.useImperativeHandle(F, () => ({ props: e, element: ye.current, scrollIntoView: he })), t.useImperativeHandle(a, () => F.current);
1640
- const ee = t.useCallback(
1641
- (k) => {
1656
+ ), De = t.useRef(null), z = t.useRef(null);
1657
+ t.useImperativeHandle(z, () => ({ props: e, element: De.current, scrollIntoView: ke })), t.useImperativeHandle(a, () => z.current);
1658
+ const ae = t.useCallback(
1659
+ (E) => {
1642
1660
  e.onDataStateChange && e.onDataStateChange.call(
1643
1661
  void 0,
1644
- { ...k, target: F.current }
1662
+ { ...E, target: z.current }
1645
1663
  );
1646
1664
  },
1647
1665
  [e.onDataStateChange]
1648
- ), Le = t.useCallback(
1649
- (k) => {
1666
+ ), Se = t.useCallback(
1667
+ (E) => {
1650
1668
  e.onSortChange && e.onSortChange.call(
1651
1669
  void 0,
1652
- { ...k, target: F.current }
1670
+ { ...E, target: z.current }
1653
1671
  );
1654
1672
  },
1655
1673
  [e.onSortChange]
1656
- ), Ye = t.useCallback(
1657
- (k) => {
1674
+ ), xe = t.useCallback(
1675
+ (E) => {
1658
1676
  e.onKeyDown && e.onKeyDown.call(
1659
1677
  void 0,
1660
- { ...k, target: F.current }
1678
+ { ...E, target: z.current }
1661
1679
  );
1662
1680
  },
1663
1681
  [e.onKeyDown]
1664
- ), fe = t.useCallback(
1665
- (k) => {
1682
+ ), we = t.useCallback(
1683
+ (E) => {
1666
1684
  e.onSelectionChange && e.onSelectionChange.call(
1667
1685
  void 0,
1668
- { ...k, target: F.current }
1686
+ { ...E, target: z.current }
1669
1687
  );
1670
1688
  },
1671
1689
  [e.onSelectionChange]
1672
- ), pe = t.useCallback(
1673
- (k) => {
1690
+ ), p = t.useCallback(
1691
+ (E) => {
1674
1692
  e.onHeaderSelectionChange && e.onHeaderSelectionChange.call(
1675
1693
  void 0,
1676
- { ...k, target: F.current }
1694
+ { ...E, target: z.current }
1677
1695
  );
1678
1696
  },
1679
1697
  [e.onHeaderSelectionChange]
1680
- ), Ce = t.useCallback(
1681
- (k) => {
1698
+ ), H = t.useCallback(
1699
+ (E) => {
1682
1700
  e.onFilterChange && e.onFilterChange.call(
1683
1701
  void 0,
1684
- { ...k, target: F.current }
1702
+ { ...E, target: z.current }
1685
1703
  );
1686
1704
  },
1687
1705
  [e.onFilterChange]
1688
- ), ke = t.useCallback(
1689
- (k) => {
1706
+ ), K = t.useCallback(
1707
+ (E) => {
1690
1708
  e.onColumnMenuFilterChange && e.onColumnMenuFilterChange.call(
1691
1709
  void 0,
1692
- { ...k, target: F.current }
1710
+ { ...E, target: z.current }
1693
1711
  );
1694
1712
  },
1695
1713
  [e.onColumnMenuFilterChange]
1696
- ), ue = t.useCallback(
1697
- (k) => {
1714
+ ), de = t.useCallback(
1715
+ (E) => {
1698
1716
  e.onExpandChange && e.onExpandChange.call(
1699
1717
  void 0,
1700
- { ...k, target: F.current }
1718
+ { ...E, target: z.current }
1701
1719
  );
1702
1720
  },
1703
1721
  [e.onExpandChange]
1704
- ), ve = t.useCallback(
1705
- (k) => {
1722
+ ), Ee = t.useCallback(
1723
+ (E) => {
1706
1724
  e.onAddClick && e.onAddClick.call(
1707
1725
  void 0,
1708
1726
  {
1709
- ...k,
1710
- target: F.current,
1711
- selectedDataItem: E.current,
1712
- slotStart: H.current && new Date(H.current.start.getTime()),
1713
- slotEnd: H.current && new Date(H.current.end.getTime())
1727
+ ...E,
1728
+ target: z.current,
1729
+ selectedDataItem: D.current,
1730
+ slotStart: P.current && new Date(P.current.start.getTime()),
1731
+ slotEnd: P.current && new Date(P.current.end.getTime())
1714
1732
  }
1715
1733
  );
1716
1734
  },
1717
1735
  [e.onAddClick]
1718
- ), me = t.useCallback(
1719
- (k) => {
1736
+ ), le = t.useCallback(
1737
+ (E) => {
1720
1738
  e.onColumnResize && e.onColumnResize.call(
1721
1739
  void 0,
1722
1740
  {
1723
- ...k,
1724
- target: F.current
1741
+ ...E,
1742
+ target: z.current
1725
1743
  }
1726
1744
  );
1727
1745
  },
1728
1746
  [e.onColumnResize]
1729
- ), Te = t.useCallback(
1730
- (k) => {
1747
+ ), Me = t.useCallback(
1748
+ (E) => {
1731
1749
  e.onColumnReorder && e.onColumnReorder.call(
1732
1750
  void 0,
1733
- { ...k, target: F.current }
1751
+ { ...E, target: z.current }
1734
1752
  );
1735
1753
  },
1736
1754
  [e.onColumnReorder]
1737
- ), qe = t.useCallback(
1738
- (k) => {
1755
+ ), ot = t.useCallback(
1756
+ (E) => {
1739
1757
  e.onRowClick && e.onRowClick.call(
1740
1758
  void 0,
1741
- { ...k, target: F.current }
1759
+ { ...E, target: z.current }
1742
1760
  );
1743
1761
  },
1744
1762
  [e.onRowClick]
1745
- ), Xe = t.useCallback(
1746
- (k) => {
1763
+ ), rt = t.useCallback(
1764
+ (E) => {
1747
1765
  e.onRowDoubleClick && e.onRowDoubleClick.call(
1748
1766
  void 0,
1749
- { ...k, target: F.current }
1767
+ { ...E, target: z.current }
1750
1768
  );
1751
1769
  },
1752
1770
  [e.onRowClick]
1753
- ), Ee = t.useCallback(
1754
- (k) => {
1771
+ ), be = t.useCallback(
1772
+ (E) => {
1755
1773
  e.onRowContextMenu && e.onRowContextMenu.call(
1756
1774
  void 0,
1757
- { ...k, target: F.current }
1775
+ { ...E, target: z.current }
1758
1776
  );
1759
1777
  },
1760
1778
  [e.onRowClick]
1761
- ), je = t.useCallback(
1762
- (k) => {
1779
+ ), st = t.useCallback(
1780
+ (E) => {
1763
1781
  e.onTaskClick && e.onTaskClick.call(
1764
1782
  void 0,
1765
- { ...k, target: F.current }
1783
+ { ...E, target: z.current }
1766
1784
  );
1767
1785
  },
1768
1786
  [e.onTaskClick]
1769
- ), Ze = t.useCallback(
1770
- (k) => {
1787
+ ), lt = t.useCallback(
1788
+ (E) => {
1771
1789
  e.onTaskDoubleClick && e.onTaskDoubleClick.call(
1772
1790
  void 0,
1773
- { ...k, target: F.current }
1791
+ { ...E, target: z.current }
1774
1792
  );
1775
1793
  },
1776
1794
  [e.onTaskDoubleClick]
1777
- ), Je = t.useCallback(
1778
- (k) => {
1795
+ ), it = t.useCallback(
1796
+ (E) => {
1779
1797
  e.onTaskContextMenu && e.onTaskContextMenu.call(
1780
1798
  void 0,
1781
- { ...k, target: F.current }
1799
+ { ...E, target: z.current }
1782
1800
  );
1783
1801
  },
1784
1802
  [e.onTaskContextMenu]
1785
- ), Qe = t.useCallback(
1786
- (k) => {
1803
+ ), ct = t.useCallback(
1804
+ (E) => {
1787
1805
  e.onTaskRemoveClick && e.onTaskRemoveClick.call(
1788
1806
  void 0,
1789
- { ...k, target: F.current }
1807
+ { ...E, target: z.current }
1790
1808
  );
1791
1809
  },
1792
1810
  [e.onTaskRemoveClick]
1793
- ), et = t.useCallback(
1794
- (k) => {
1811
+ ), dt = t.useCallback(
1812
+ (E) => {
1795
1813
  if (e.onDependencyCreate) {
1796
- let se, ie;
1797
- const be = D(b.id);
1798
- for (let Re = 0; Re < _.length; Re++) {
1799
- const tt = _[Re], De = be(tt.dataItem);
1800
- if (String(De) === k.fromId && (se = De), String(De) === k.toId && (ie = De), se && ie)
1814
+ let he, ye;
1815
+ const Ne = T(v.id);
1816
+ for (let Fe = 0; Fe < U.length; Fe++) {
1817
+ const ut = U[Fe], Ie = Ne(ut.dataItem);
1818
+ if (String(Ie) === E.fromId && (he = Ie), String(Ie) === E.toId && (ye = Ie), he && ye)
1801
1819
  break;
1802
1820
  }
1803
1821
  e.onDependencyCreate.call(
1804
1822
  void 0,
1805
1823
  {
1806
- fromId: se,
1807
- toId: ie,
1808
- target: F.current,
1809
- type: k.type
1824
+ fromId: he,
1825
+ toId: ye,
1826
+ target: z.current,
1827
+ type: E.type
1810
1828
  }
1811
1829
  );
1812
1830
  }
1813
1831
  },
1814
- [e.onDependencyCreate, b, _]
1832
+ [e.onDependencyCreate, v, U]
1815
1833
  );
1816
1834
  return /* @__PURE__ */ t.createElement(
1817
- yn,
1835
+ On,
1818
1836
  {
1819
- dateRange: K,
1820
- taskData: _,
1821
- dependencyData: l,
1822
- taskModelFields: b,
1823
- dependencyModelFields: X,
1824
- views: w,
1825
- activeView: [Z, T],
1826
- rowHeight: d,
1827
- toolbarHeight: W,
1837
+ dateRange: j,
1838
+ taskData: U,
1839
+ dependencyData: o,
1840
+ taskModelFields: v,
1841
+ dependencyModelFields: w,
1842
+ views: S,
1843
+ activeView: [J, I],
1844
+ rowHeight: m,
1845
+ toolbarHeight: B,
1828
1846
  props: {
1829
- columns: o,
1830
- noRecords: m,
1831
- timezone: g,
1832
- resizable: u,
1847
+ columns: r,
1848
+ noRecords: g,
1849
+ timezone: d,
1850
+ resizable: c,
1833
1851
  reorderable: h,
1834
- sortable: p,
1835
- sort: C,
1836
- filter: f,
1837
- columnMenuFilter: v,
1838
- columnMenu: L,
1839
- navigatable: V,
1840
- row: x,
1841
- selectable: z
1852
+ sortable: C,
1853
+ sort: f,
1854
+ filter: k,
1855
+ columnMenuFilter: y,
1856
+ columnMenu: M,
1857
+ navigatable: A,
1858
+ row: G,
1859
+ selectable: b
1842
1860
  },
1843
1861
  events: {
1844
- onDataStateChange: ee,
1845
- onSortChange: Le,
1846
- onFilterChange: Ce,
1847
- onColumnMenuFilterChange: ke,
1848
- onExpandChange: ue,
1849
- onRowClick: qe,
1850
- onRowDoubleClick: Xe,
1851
- onRowContextMenu: Ee,
1852
- onColumnResize: me,
1853
- onColumnReorder: Te,
1854
- onDependencyCreate: e.onDependencyCreate && et,
1855
- onKeyDown: Ye,
1856
- onSelectionChange: fe,
1857
- onHeaderSelectionChange: pe
1862
+ onDataStateChange: ae,
1863
+ onSortChange: Se,
1864
+ onFilterChange: H,
1865
+ onColumnMenuFilterChange: K,
1866
+ onExpandChange: de,
1867
+ onRowClick: ot,
1868
+ onRowDoubleClick: rt,
1869
+ onRowContextMenu: be,
1870
+ onColumnResize: le,
1871
+ onColumnReorder: Me,
1872
+ onDependencyCreate: e.onDependencyCreate && dt,
1873
+ onKeyDown: xe,
1874
+ onSelectionChange: we,
1875
+ onHeaderSelectionChange: p
1858
1876
  },
1859
1877
  taskEvents: {
1860
- onTaskClick: je,
1861
- onTaskDoubleClick: Ze,
1862
- onTaskContextMenu: Je,
1863
- onTaskRemoveClick: e.onTaskRemoveClick && Qe
1878
+ onTaskClick: st,
1879
+ onTaskDoubleClick: lt,
1880
+ onTaskContextMenu: it,
1881
+ onTaskRemoveClick: e.onTaskRemoveClick && ct
1864
1882
  }
1865
1883
  },
1866
1884
  /* @__PURE__ */ t.createElement(
1867
1885
  "div",
1868
1886
  {
1869
- ref: ye,
1887
+ ref: De,
1870
1888
  role: "application",
1871
- style: s,
1872
- className: de("k-gantt", c)
1889
+ style: l,
1890
+ className: ie("k-gantt", i)
1873
1891
  },
1874
- /* @__PURE__ */ t.createElement(ca, { ref: Y }, N && N.addTaskButton ? /* @__PURE__ */ t.createElement(da, { selectedTask: E.current, onClick: ve }) : null, /* @__PURE__ */ t.createElement(mo, null), /* @__PURE__ */ t.createElement(ia, null, /* @__PURE__ */ t.createElement(la, null))),
1875
- S && /* @__PURE__ */ t.createElement(
1876
- S.type,
1892
+ /* @__PURE__ */ t.createElement(Va, { ref: Q }, x && x.addTaskButton ? /* @__PURE__ */ t.createElement(za, { selectedTask: D.current, onClick: Ee }) : null, /* @__PURE__ */ t.createElement(Wo, null), /* @__PURE__ */ t.createElement(Ha, null, /* @__PURE__ */ t.createElement(Aa, null))),
1893
+ N && /* @__PURE__ */ t.createElement(
1894
+ N.type,
1877
1895
  {
1878
- key: S.props.name,
1879
- ref: j,
1880
- ...S.props,
1881
- firstSlotRangeRef: H
1896
+ key: N.props.name,
1897
+ ref: O,
1898
+ ...N.props,
1899
+ firstSlotRangeRef: P
1882
1900
  }
1883
1901
  ),
1884
- n && /* @__PURE__ */ t.createElement(Sa, null)
1902
+ n && /* @__PURE__ */ t.createElement(eo, null)
1885
1903
  )
1886
1904
  );
1887
- }), Se = {
1905
+ }), Le = {
1888
1906
  taskData: [],
1889
1907
  dependencyData: [],
1890
1908
  columns: [],
1891
1909
  rowHeight: 40
1892
1910
  };
1893
- Wt.propTypes = {
1894
- taskData: i.array,
1895
- taskModelFields: i.shape({
1896
- id: i.string,
1897
- start: i.string,
1898
- end: i.string,
1899
- title: i.string,
1900
- percentComplete: i.string,
1901
- isRollup: i.string,
1902
- isExpanded: i.string,
1903
- children: i.string,
1904
- isInEdit: i.string
1911
+ Jt.propTypes = {
1912
+ taskData: u.array,
1913
+ taskModelFields: u.shape({
1914
+ id: u.string,
1915
+ start: u.string,
1916
+ end: u.string,
1917
+ title: u.string,
1918
+ percentComplete: u.string,
1919
+ parentId: u.string,
1920
+ isRollup: u.string,
1921
+ isExpanded: u.string,
1922
+ children: u.string,
1923
+ isInEdit: u.string
1905
1924
  }),
1906
- dependencyData: i.array,
1907
- dependencyModelFields: i.shape({
1908
- id: i.string,
1909
- fromId: i.string,
1910
- toId: i.string,
1911
- type: i.string
1925
+ dependencyData: u.array,
1926
+ dependencyModelFields: u.shape({
1927
+ id: u.string,
1928
+ fromId: u.string,
1929
+ toId: u.string,
1930
+ type: u.string
1912
1931
  }),
1913
- columns: i.arrayOf(
1914
- i.shape({
1915
- width: i.number,
1916
- cell: i.any,
1917
- editCell: i.any,
1918
- headerCell: i.any,
1919
- filter: i.any,
1920
- children: i.any,
1921
- field: i.string,
1922
- title: i.string,
1923
- sortable: i.any,
1924
- expandable: i.bool,
1925
- headerSelectionValue: i.bool,
1926
- format: i.string,
1927
- headerClassName: i.string,
1928
- className: i.string,
1929
- resizable: i.bool,
1930
- reorderable: i.bool,
1931
- minResizableWidth: i.number,
1932
- orderIndex: i.number,
1933
- columnMenu: i.any
1932
+ columns: u.arrayOf(
1933
+ u.shape({
1934
+ width: u.number,
1935
+ cell: u.any,
1936
+ editCell: u.any,
1937
+ headerCell: u.any,
1938
+ filter: u.any,
1939
+ children: u.any,
1940
+ field: u.string,
1941
+ title: u.string,
1942
+ sortable: u.any,
1943
+ expandable: u.bool,
1944
+ headerSelectionValue: u.bool,
1945
+ format: u.string,
1946
+ headerClassName: u.string,
1947
+ className: u.string,
1948
+ resizable: u.bool,
1949
+ reorderable: u.bool,
1950
+ minResizableWidth: u.number,
1951
+ orderIndex: u.number,
1952
+ columnMenu: u.any
1934
1953
  })
1935
1954
  ),
1936
- sort: i.array,
1937
- filter: i.array,
1938
- columnMenuFilter: i.array,
1939
- columnMenu: i.any,
1940
- style: i.object,
1941
- className: i.string,
1942
- children: i.any,
1943
- timezone: i.string,
1944
- defaultView: i.string,
1945
- view: i.string,
1946
- rowHeight: i.number,
1947
- navigatable: i.bool,
1948
- onViewChange: i.func,
1949
- onDataStateChange: i.func,
1950
- onSortChange: i.func,
1951
- onFilterChange: i.func,
1952
- onExpandChange: i.func,
1953
- onRowClick: i.func,
1954
- onColumnResize: i.func,
1955
- onColumnReorder: i.func
1955
+ sort: u.array,
1956
+ filter: u.array,
1957
+ columnMenuFilter: u.array,
1958
+ columnMenu: u.any,
1959
+ style: u.object,
1960
+ className: u.string,
1961
+ children: u.any,
1962
+ timezone: u.string,
1963
+ defaultView: u.string,
1964
+ view: u.string,
1965
+ rowHeight: u.number,
1966
+ navigatable: u.bool,
1967
+ onViewChange: u.func,
1968
+ onDataStateChange: u.func,
1969
+ onSortChange: u.func,
1970
+ onFilterChange: u.func,
1971
+ onExpandChange: u.func,
1972
+ onRowClick: u.func,
1973
+ onColumnResize: u.func,
1974
+ onColumnReorder: u.func
1956
1975
  };
1957
- Wt.defaultProps = Se;
1958
- Wt.displayName = "KendoReactGantt";
1959
- const Ot = t.forwardRef((e, a) => {
1960
- const { slotWidth: n = ge.slotWidth, slotDuration: o = ge.slotDuration, firstSlotRangeRef: r, timelineHeaderCell: l } = e, { timezone: s } = Ne(), c = xe(), m = t.useRef(null), g = t.useRef(null), d = t.useCallback(
1961
- (L) => {
1962
- g.current && g.current.scrollIntoView(L);
1976
+ Jt.defaultProps = Le;
1977
+ Jt.displayName = "KendoReactGantt";
1978
+ const Qt = t.forwardRef((e, a) => {
1979
+ const { slotWidth: n = Te.slotWidth, slotDuration: r = Te.slotDuration, firstSlotRangeRef: s, timelineHeaderCell: o } = e, { timezone: l } = ze(), i = Ae(), g = t.useRef(null), d = t.useRef(null), m = t.useCallback(
1980
+ (M) => {
1981
+ d.current && d.current.scrollIntoView(M);
1963
1982
  },
1964
1983
  []
1965
1984
  );
1966
- t.useImperativeHandle(m, () => ({ scrollIntoView: d })), t.useImperativeHandle(a, () => m.current);
1967
- const u = Me(), h = e.workWeekStart || ge.workWeekStart, p = e.workWeekEnd || ge.workWeekEnd, C = e.workDayStart || ge.workDayStart, f = e.workDayEnd || ge.workDayEnd, v = t.useMemo(
1985
+ t.useImperativeHandle(g, () => ({ scrollIntoView: m })), t.useImperativeHandle(a, () => g.current);
1986
+ const c = Pe(), h = e.workWeekStart || Te.workWeekStart, C = e.workWeekEnd || Te.workWeekEnd, f = e.workDayStart || Te.workDayStart, k = e.workDayEnd || Te.workDayEnd, y = t.useMemo(
1968
1987
  () => {
1969
- const L = gn({
1988
+ const M = Fn({
1970
1989
  workWeekStart: h,
1971
- workWeekEnd: p
1972
- }), V = [], N = fn(u, { workDays: L, timezone: s }, c);
1973
- return N.forEach((x) => {
1974
- const z = Ho(
1975
- x.range,
1990
+ workWeekEnd: C
1991
+ }), A = [], x = An(c, { workDays: M, timezone: l }, i);
1992
+ return x.forEach((G) => {
1993
+ const b = mr(
1994
+ G.range,
1976
1995
  {
1977
- workDayStart: C,
1978
- workDayEnd: f,
1979
- timezone: s,
1980
- slotDuration: o
1996
+ workDayStart: f,
1997
+ workDayEnd: k,
1998
+ timezone: l,
1999
+ slotDuration: r
1981
2000
  },
1982
- c
2001
+ i
1983
2002
  );
1984
- x.span = z.length, V.push.apply(V, z);
1985
- }), r && V[0] && (r.current = V[0].range), [N, V];
2003
+ G.span = b.length, A.push.apply(A, b);
2004
+ }), s && A[0] && (s.current = A[0].range), [x, A];
1986
2005
  },
1987
- [s, u.start.getTime(), u.end.getTime(), c, h, p, C, f]
2006
+ [l, c.start.getTime(), c.end.getTime(), i, h, C, f, k]
1988
2007
  );
1989
2008
  return /* @__PURE__ */ t.createElement(
1990
- Fe,
2009
+ Ge,
1991
2010
  {
1992
- ref: g,
2011
+ ref: d,
1993
2012
  slotWidth: n,
1994
- slotLevels: v,
1995
- timelineHeaderCell: l
2013
+ slotLevels: y,
2014
+ timelineHeaderCell: o
1996
2015
  }
1997
2016
  );
1998
- }), Qo = ({ tasksStart: e, tasksEnd: a, timezone: n }) => {
1999
- const o = R.fromLocalDate(e, n), r = R.fromLocalDate(a, n), l = mn(o), s = Dt(r), c = R.fromUTCDate(le(l), n), m = R.fromUTCDate(le(s), n);
2017
+ }), Hr = ({ tasksStart: e, tasksEnd: a, timezone: n }) => {
2018
+ const r = L.fromLocalDate(e, n), s = L.fromLocalDate(a, n), o = Nn(r), l = Rt(s), i = L.fromUTCDate(Ce(o), n), g = L.fromUTCDate(Ce(l), n);
2000
2019
  return {
2001
2020
  // Sat May 31 2014 07:00:00 GMT+0300 (Eastern European Summer Time)
2002
- start: new Date(c.getTime()),
2003
- end: new Date(m.getTime()),
2021
+ start: new Date(i.getTime()),
2022
+ end: new Date(g.getTime()),
2004
2023
  // Sat May 31 2014 00:00:00 GMT-0400 (EDT)
2005
- zonedStart: c,
2006
- zonedEnd: m
2024
+ zonedStart: i,
2025
+ zonedEnd: g
2007
2026
  };
2008
- }, ge = {
2027
+ }, Te = {
2009
2028
  name: "day",
2010
- dateRange: Qo,
2011
- title: (e) => e.toLanguageString(it, ae[it]),
2012
- slotWidth: Ie,
2029
+ dateRange: Hr,
2030
+ title: (e) => e.toLanguageString(Et, se[Et]),
2031
+ slotWidth: Ve,
2013
2032
  slotDuration: 60,
2014
2033
  workWeekStart: 1,
2015
2034
  workWeekEnd: 5,
2016
2035
  workDayStart: "08:00",
2017
2036
  workDayEnd: "17:00"
2018
2037
  };
2019
- Ot.defaultProps = ge;
2020
- Ot.propTypes = {
2021
- name: i.string,
2022
- dateRange: i.oneOfType([i.func, i.object]),
2023
- title: i.oneOfType([i.string, i.func]),
2024
- slotWidth: i.number,
2025
- slotDuration: i.number,
2026
- workWeekStart: i.number,
2027
- workWeekEnd: i.number,
2028
- workDayStart: i.string,
2029
- workDayEnd: i.string
2038
+ Qt.defaultProps = Te;
2039
+ Qt.propTypes = {
2040
+ name: u.string,
2041
+ dateRange: u.oneOfType([u.func, u.object]),
2042
+ title: u.oneOfType([u.string, u.func]),
2043
+ slotWidth: u.number,
2044
+ slotDuration: u.number,
2045
+ workWeekStart: u.number,
2046
+ workWeekEnd: u.number,
2047
+ workDayStart: u.string,
2048
+ workDayEnd: u.string
2030
2049
  };
2031
- Ot.displayName = "KendoReactGanttDayView";
2032
- const Pt = t.forwardRef((e, a) => {
2033
- const { slotWidth: n = ua.slotWidth, firstSlotRangeRef: o, timelineHeaderCell: r } = e, { timezone: l } = Ne(), s = xe(), c = t.useRef(null), m = t.useRef(null), g = t.useCallback(
2050
+ Qt.displayName = "KendoReactGanttDayView";
2051
+ const en = t.forwardRef((e, a) => {
2052
+ const { slotWidth: n = Pa.slotWidth, firstSlotRangeRef: r, timelineHeaderCell: s } = e, { timezone: o } = ze(), l = Ae(), i = t.useRef(null), g = t.useRef(null), d = t.useCallback(
2034
2053
  (h) => {
2035
- m.current && m.current.scrollIntoView(h);
2054
+ g.current && g.current.scrollIntoView(h);
2036
2055
  },
2037
2056
  []
2038
2057
  );
2039
- t.useImperativeHandle(c, () => ({ scrollIntoView: g })), t.useImperativeHandle(a, () => c.current);
2040
- const d = Me(), u = t.useMemo(
2058
+ t.useImperativeHandle(i, () => ({ scrollIntoView: d })), t.useImperativeHandle(a, () => i.current);
2059
+ const m = Pe(), c = t.useMemo(
2041
2060
  () => {
2042
- const h = [], p = Cn(d, { timezone: l }, s);
2043
- return p.forEach((C) => {
2044
- const f = pn(
2045
- C.range,
2046
- { timezone: l },
2047
- s
2061
+ const h = [], C = Vn(m, { timezone: o }, l);
2062
+ return C.forEach((f) => {
2063
+ const k = Hn(
2064
+ f.range,
2065
+ { timezone: o },
2066
+ l
2048
2067
  );
2049
- h.push.apply(h, f);
2050
- }), o && h[0] && (o.current = h[0].range), [p, h];
2068
+ h.push.apply(h, k);
2069
+ }), r && h[0] && (r.current = h[0].range), [C, h];
2051
2070
  },
2052
- [l, d.start.getTime(), d.end.getTime(), s]
2071
+ [o, m.start.getTime(), m.end.getTime(), l]
2053
2072
  );
2054
2073
  return /* @__PURE__ */ t.createElement(
2055
- Fe,
2074
+ Ge,
2056
2075
  {
2057
- ref: m,
2076
+ ref: g,
2058
2077
  slotWidth: n,
2059
- slotLevels: u,
2060
- timelineHeaderCell: r
2078
+ slotLevels: c,
2079
+ timelineHeaderCell: s
2061
2080
  }
2062
2081
  );
2063
- }), es = ({ tasksStart: e, tasksEnd: a, timezone: n }) => {
2064
- const o = R.fromLocalDate(e, n), r = R.fromLocalDate(a, n), l = en(re(o)), s = ht(tn(re(r)), 1), c = R.fromUTCDate(le(l), n), m = R.fromUTCDate(le(s), n);
2082
+ }), Vr = ({ tasksStart: e, tasksEnd: a, timezone: n }) => {
2083
+ const r = L.fromLocalDate(e, n), s = L.fromLocalDate(a, n), o = Cn(pe(r)), l = bt(kn(pe(s)), 1), i = L.fromUTCDate(Ce(o), n), g = L.fromUTCDate(Ce(l), n);
2065
2084
  return {
2066
- start: new Date(c.getTime()),
2067
- end: new Date(m.getTime()),
2068
- zonedStart: c,
2069
- zonedEnd: m
2085
+ start: new Date(i.getTime()),
2086
+ end: new Date(g.getTime()),
2087
+ zonedStart: i,
2088
+ zonedEnd: g
2070
2089
  };
2071
- }, ua = {
2090
+ }, Pa = {
2072
2091
  name: "month",
2073
- dateRange: es,
2074
- title: (e) => e.toLanguageString(ct, ae[ct]),
2075
- slotWidth: Ie,
2092
+ dateRange: Vr,
2093
+ title: (e) => e.toLanguageString(yt, se[yt]),
2094
+ slotWidth: Ve,
2076
2095
  workWeekStart: 1,
2077
2096
  workWeekEnd: 5,
2078
2097
  workDayStart: "08:00",
2079
2098
  workDayEnd: "17:00"
2080
2099
  };
2081
- Pt.defaultProps = ua;
2082
- Pt.propTypes = {
2083
- name: i.string,
2084
- dateRange: i.oneOfType([i.func, i.object]),
2085
- title: i.oneOfType([i.string, i.func]),
2086
- slotWidth: i.number,
2087
- workWeekStart: i.number,
2088
- workWeekEnd: i.number,
2089
- workDayStart: i.string,
2090
- workDayEnd: i.string
2100
+ en.defaultProps = Pa;
2101
+ en.propTypes = {
2102
+ name: u.string,
2103
+ dateRange: u.oneOfType([u.func, u.object]),
2104
+ title: u.oneOfType([u.string, u.func]),
2105
+ slotWidth: u.number,
2106
+ workWeekStart: u.number,
2107
+ workWeekEnd: u.number,
2108
+ workDayStart: u.string,
2109
+ workDayEnd: u.string
2091
2110
  };
2092
- Pt.displayName = "GanttMonthView";
2093
- const _t = t.forwardRef((e, a) => {
2094
- const { slotWidth: n = ma.slotWidth, firstSlotRangeRef: o, timelineHeaderCell: r } = e, { timezone: l } = Ne(), s = xe(), c = t.useRef(null), m = t.useRef(null), g = t.useCallback(
2111
+ en.displayName = "GanttMonthView";
2112
+ const tn = t.forwardRef((e, a) => {
2113
+ const { slotWidth: n = Ga.slotWidth, firstSlotRangeRef: r, timelineHeaderCell: s } = e, { timezone: o } = ze(), l = Ae(), i = t.useRef(null), g = t.useRef(null), d = t.useCallback(
2095
2114
  (h) => {
2096
- m.current && m.current.scrollIntoView(h);
2115
+ g.current && g.current.scrollIntoView(h);
2097
2116
  },
2098
2117
  []
2099
2118
  );
2100
- t.useImperativeHandle(c, () => ({ scrollIntoView: g })), t.useImperativeHandle(a, () => c.current);
2101
- const d = Me(), u = t.useMemo(
2119
+ t.useImperativeHandle(i, () => ({ scrollIntoView: d })), t.useImperativeHandle(a, () => i.current);
2120
+ const m = Pe(), c = t.useMemo(
2102
2121
  () => {
2103
- const h = Ao(d, { timezone: l }, s), p = [];
2104
- return h.forEach((C) => {
2105
- const f = Cn(
2106
- C.range,
2107
- { timezone: l },
2108
- s
2122
+ const h = gr(m, { timezone: o }, l), C = [];
2123
+ return h.forEach((f) => {
2124
+ const k = Vn(
2125
+ f.range,
2126
+ { timezone: o },
2127
+ l
2109
2128
  );
2110
- p.push.apply(p, f);
2111
- }), o && p[0] && (o.current = p[0].range), [h, p];
2129
+ C.push.apply(C, k);
2130
+ }), r && C[0] && (r.current = C[0].range), [h, C];
2112
2131
  },
2113
- [l, d.start.getTime(), d.end.getTime(), s]
2132
+ [o, m.start.getTime(), m.end.getTime(), l]
2114
2133
  );
2115
2134
  return /* @__PURE__ */ t.createElement(
2116
- Fe,
2135
+ Ge,
2117
2136
  {
2118
2137
  slotWidth: n,
2119
- slotLevels: u,
2120
- timelineHeaderCell: r
2138
+ slotLevels: c,
2139
+ timelineHeaderCell: s
2121
2140
  }
2122
2141
  );
2123
- }), ts = ({ tasksStart: e, tasksEnd: a, timezone: n }) => {
2124
- const o = R.fromLocalDate(e, n), r = R.fromLocalDate(a, n), l = en(Ia(re(o))), s = ht(tn(Na(re(r))), 1), c = R.fromUTCDate(le(l), n), m = R.fromUTCDate(le(s), n);
2142
+ }), zr = ({ tasksStart: e, tasksEnd: a, timezone: n }) => {
2143
+ const r = L.fromLocalDate(e, n), s = L.fromLocalDate(a, n), o = Cn(no(pe(r))), l = bt(kn(ao(pe(s))), 1), i = L.fromUTCDate(Ce(o), n), g = L.fromUTCDate(Ce(l), n);
2125
2144
  return {
2126
- start: new Date(c.getTime()),
2127
- end: new Date(m.getTime()),
2128
- zonedStart: c,
2129
- zonedEnd: m
2145
+ start: new Date(i.getTime()),
2146
+ end: new Date(g.getTime()),
2147
+ zonedStart: i,
2148
+ zonedEnd: g
2130
2149
  };
2131
- }, ma = {
2150
+ }, Ga = {
2132
2151
  name: "year",
2133
- dateRange: ts,
2134
- title: (e) => e.toLanguageString(dt, ae[dt]),
2135
- slotWidth: Ie
2152
+ dateRange: zr,
2153
+ title: (e) => e.toLanguageString(vt, se[vt]),
2154
+ slotWidth: Ve
2136
2155
  };
2137
- _t.defaultProps = ma;
2138
- _t.propTypes = {
2139
- name: i.string,
2140
- dateRange: i.oneOfType([i.func, i.object]),
2141
- title: i.oneOfType([i.string, i.func]),
2142
- slotWidth: i.number
2156
+ tn.defaultProps = Ga;
2157
+ tn.propTypes = {
2158
+ name: u.string,
2159
+ dateRange: u.oneOfType([u.func, u.object]),
2160
+ title: u.oneOfType([u.string, u.func]),
2161
+ slotWidth: u.number
2143
2162
  };
2144
- _t.displayName = "GanttYearView";
2145
- const ns = [
2146
- { text: Nn, operator: "contains" },
2147
- { text: Mn, operator: "doesnotcontain" },
2148
- { text: Pe, operator: "eq" },
2149
- { text: _e, operator: "neq" },
2150
- { text: In, operator: "startswith" },
2151
- { text: Fn, operator: "endswith" },
2152
- { text: Ke, operator: "isnull" },
2153
- { text: Be, operator: "isnotnull" },
2154
- { text: Sn, operator: "isempty" },
2155
- { text: xn, operator: "isnotempty" }
2156
- ], as = [
2157
- { text: Pe, operator: "eq" },
2158
- { text: _e, operator: "neq" },
2159
- { text: Ln, operator: "gte" },
2160
- { text: Hn, operator: "gt" },
2161
- { text: An, operator: "lte" },
2162
- { text: Vn, operator: "lt" },
2163
- { text: Ke, operator: "isnull" },
2164
- { text: Be, operator: "isnotnull" }
2165
- ], os = [
2166
- { text: Pe, operator: "eq" },
2167
- { text: _e, operator: "neq" },
2168
- { text: On, operator: "gte" },
2169
- { text: Pn, operator: "gt" },
2170
- { text: _n, operator: "lt" },
2171
- { text: Kn, operator: "lte" },
2172
- { text: Ke, operator: "isnull" },
2173
- { text: Be, operator: "isnotnull" }
2174
- ], ss = [
2175
- { text: Wn, operator: "" },
2176
- { text: zn, operator: !0 },
2177
- { text: Gn, operator: !1 }
2163
+ tn.displayName = "GanttYearView";
2164
+ const Pr = [
2165
+ { text: Xn, operator: "contains" },
2166
+ { text: jn, operator: "doesnotcontain" },
2167
+ { text: Je, operator: "eq" },
2168
+ { text: Qe, operator: "neq" },
2169
+ { text: Yn, operator: "startswith" },
2170
+ { text: Zn, operator: "endswith" },
2171
+ { text: et, operator: "isnull" },
2172
+ { text: tt, operator: "isnotnull" },
2173
+ { text: Un, operator: "isempty" },
2174
+ { text: qn, operator: "isnotempty" }
2175
+ ], Gr = [
2176
+ { text: Je, operator: "eq" },
2177
+ { text: Qe, operator: "neq" },
2178
+ { text: Jn, operator: "gte" },
2179
+ { text: Qn, operator: "gt" },
2180
+ { text: ea, operator: "lte" },
2181
+ { text: ta, operator: "lt" },
2182
+ { text: et, operator: "isnull" },
2183
+ { text: tt, operator: "isnotnull" }
2184
+ ], Wr = [
2185
+ { text: Je, operator: "eq" },
2186
+ { text: Qe, operator: "neq" },
2187
+ { text: ra, operator: "gte" },
2188
+ { text: sa, operator: "gt" },
2189
+ { text: la, operator: "lt" },
2190
+ { text: ia, operator: "lte" },
2191
+ { text: et, operator: "isnull" },
2192
+ { text: tt, operator: "isnotnull" }
2193
+ ], Or = [
2194
+ { text: oa, operator: "" },
2195
+ { text: na, operator: !0 },
2196
+ { text: aa, operator: !1 }
2178
2197
  ];
2179
- function Ue(e, a) {
2198
+ function at(e, a) {
2180
2199
  return {
2181
- clearButtonTitle: e.toLanguageString(ut, ae[ut]),
2200
+ clearButtonTitle: e.toLanguageString(wt, se[wt]),
2182
2201
  operators: a.map((n) => ({
2183
- text: e.toLanguageString(n.text, ae[n.text]),
2202
+ text: e.toLanguageString(n.text, se[n.text]),
2184
2203
  operator: n.operator
2185
2204
  }))
2186
2205
  };
2187
2206
  }
2188
- const rs = (e) => {
2207
+ const _r = (e) => {
2189
2208
  const { operators: a, ...n } = e;
2190
2209
  return /* @__PURE__ */ t.createElement(
2191
- Xa,
2210
+ wo,
2192
2211
  {
2193
2212
  ariaLabel: "text filter",
2194
- ...Ue(oe(), a || ns),
2213
+ ...at(ce(), a || Pr),
2195
2214
  ...n
2196
2215
  }
2197
2216
  );
2198
2217
  };
2199
- rs.displayName = "KendoReactGanttTextFilter";
2200
- const ls = (e) => {
2218
+ _r.displayName = "KendoReactGanttTextFilter";
2219
+ const Br = (e) => {
2201
2220
  const { operators: a, ...n } = e;
2202
2221
  return /* @__PURE__ */ t.createElement(
2203
- ja,
2222
+ To,
2204
2223
  {
2205
2224
  ariaLabel: "numeric filter",
2206
- ...Ue(oe(), a || as),
2225
+ ...at(ce(), a || Gr),
2207
2226
  ...n
2208
2227
  }
2209
2228
  );
2210
2229
  };
2211
- ls.displayName = "KendoReactGanttNumericFilter";
2212
- const is = (e) => {
2230
+ Br.displayName = "KendoReactGanttNumericFilter";
2231
+ const Kr = (e) => {
2213
2232
  const { operators: a, ...n } = e;
2214
2233
  return /* @__PURE__ */ t.createElement(
2215
- Za,
2234
+ So,
2216
2235
  {
2217
2236
  ariaLabel: "boolean filter",
2218
- ...Ue(oe(), a || ss),
2237
+ ...at(ce(), a || Or),
2219
2238
  ...n
2220
2239
  }
2221
2240
  );
2222
2241
  };
2223
- is.displayName = "KendoReactGanttBooleanFilter";
2224
- const cs = (e) => {
2242
+ Kr.displayName = "KendoReactGanttBooleanFilter";
2243
+ const $r = (e) => {
2225
2244
  const { operators: a, ...n } = e;
2226
2245
  return /* @__PURE__ */ t.createElement(
2227
- Ja,
2246
+ bo,
2228
2247
  {
2229
2248
  ariaLabel: "date filter",
2230
- ...Ue(oe(), a || os),
2249
+ ...at(ce(), a || Wr),
2231
2250
  ...n
2232
2251
  }
2233
2252
  );
2234
2253
  };
2235
- cs.displayName = "KendoReactGanttDateFilter";
2236
- const Hs = (e) => {
2237
- const { dependencyData: a, dependencyModelFields: n, defaultDataItem: o, fromId: r, toId: l, type: s } = e, c = a.map((h) => ({ ...h })), m = te(n.fromId), g = te(n.toId), d = te(n.type), u = o ? { ...o } : {};
2238
- return m(u, r), g(u, l), d(u, s), c.push(u), c;
2239
- }, As = (e) => {
2240
- const { defaultDataItem: a, selectedDataItem: n, direction: o, taskModelFields: r, dataTree: l, slotStart: s, slotEnd: c } = e, m = Et(l, r.children, (f) => ({ ...f })), g = te(r.start), d = te(r.end), u = D(r.start), h = D(r.end), p = a ? { ...a } : {}, C = u(p) && h(p);
2241
- if (!n || o === "none")
2242
- C || (g(p, s), d(p, c)), m.unshift(p);
2254
+ $r.displayName = "KendoReactGanttDateFilter";
2255
+ const Rs = (e) => {
2256
+ const { dependencyData: a, dependencyModelFields: n, defaultDataItem: r, fromId: s, toId: o, type: l } = e, i = a.map((h) => ({ ...h })), g = ne(n.fromId), d = ne(n.toId), m = ne(n.type), c = r ? { ...r } : {};
2257
+ return g(c, s), d(c, o), m(c, l), i.push(c), i;
2258
+ }, xs = (e) => {
2259
+ const { defaultDataItem: a, selectedDataItem: n, direction: r, taskModelFields: s, dataTree: o, slotStart: l, slotEnd: i } = e, g = Ze(o, s.children, (y) => ({ ...y })), d = ne(s.start), m = ne(s.end), c = T(s.start), h = T(s.end), C = ne(s.parentId || ""), f = a ? { ...a } : {}, k = c(f) && h(f);
2260
+ if (!n || r === "none")
2261
+ k || (d(f, l), m(f, i)), s.parentId && C(f, null), g.unshift(f);
2243
2262
  else {
2244
- const f = [{
2245
- task: { [r.children]: m },
2263
+ const y = [{
2264
+ task: { [s.children]: g },
2246
2265
  childrenIndex: 0
2247
- }], v = D(r.id), L = D(r.children), V = te(r.children), N = v(n);
2248
- for (; f.length > 0; ) {
2249
- const x = f[f.length - 1], z = x.task, J = v(z), b = L(z);
2250
- if (J && J === N)
2266
+ }], M = T(s.id), A = T(s.children), x = ne(s.children), G = M(n);
2267
+ for (; y.length > 0; ) {
2268
+ const b = y[y.length - 1], F = b.task, v = M(F), w = A(F);
2269
+ if (v && v === G)
2251
2270
  break;
2252
- b && b.length && b.length > x.childrenIndex ? (f.push({
2253
- task: b[x.childrenIndex],
2271
+ w && w.length && w.length > b.childrenIndex ? (y.push({
2272
+ task: w[b.childrenIndex],
2254
2273
  childrenIndex: 0
2255
- }), x.childrenIndex++) : f.pop();
2274
+ }), b.childrenIndex++) : y.pop();
2256
2275
  }
2257
- if (f.length > 1) {
2258
- const x = f[f.length - 1].task, z = f[f.length - 2].childrenIndex, b = f[f.length - 2].task, X = L(b);
2259
- switch (o) {
2276
+ if (y.length > 1) {
2277
+ const b = y[y.length - 1].task, F = y[y.length - 2].childrenIndex, w = y[y.length - 2].task, $ = A(w);
2278
+ switch (r) {
2260
2279
  case "child": {
2261
- let A = L(x);
2262
- A || (A = [], V(x, A)), C || (g(p, new Date(u(x).getTime())), d(p, new Date(h(x).getTime()))), A.push(p), Ve(f.splice(1, f.length - 1).map((j) => j.task), r);
2280
+ let O = A(b);
2281
+ O || (O = [], x(b, O)), k || (d(f, new Date(c(b).getTime())), m(f, new Date(h(b).getTime()))), O.push(f), C(f, M(b)), _e(y.splice(1, y.length - 1).map((_) => _.task), s);
2263
2282
  break;
2264
2283
  }
2265
2284
  case "above": {
2266
- u(b) && h(b) && !C ? (g(p, new Date(u(x).getTime())), d(p, new Date(h(x).getTime()))) : (g(p, s), d(p, c)), X.splice(z - 1, 0, p), Ve(f.splice(1, f.length - 2).map((A) => A.task), r);
2285
+ c(w) && h(w) && !k ? (d(f, new Date(c(b).getTime())), m(f, new Date(h(b).getTime()))) : (d(f, l), m(f, i)), $.splice(F - 1, 0, f), C(f, M(w)), _e(y.splice(1, y.length - 2).map((O) => O.task), s);
2267
2286
  break;
2268
2287
  }
2269
2288
  case "below": {
2270
- u(b) && h(b) && !C ? (g(p, new Date(u(x).getTime())), d(p, new Date(h(x).getTime()))) : (g(p, s), d(p, c)), X.splice(z, 0, p), Ve(f.splice(1, f.length - 2).map((A) => A.task), r);
2289
+ c(w) && h(w) && !k ? (d(f, new Date(c(b).getTime())), m(f, new Date(h(b).getTime()))) : (d(f, l), m(f, i)), $.splice(F, 0, f), C(f, M(w)), _e(y.splice(1, y.length - 2).map((O) => O.task), s);
2271
2290
  break;
2272
2291
  }
2273
2292
  }
2274
2293
  }
2275
2294
  }
2276
- return m;
2277
- }, Vs = (e) => {
2278
- const { updatedDataItem: a, taskModelFields: n, dataTree: o } = e, r = D(n.id), l = D(n.children), s = r(a);
2279
- let c;
2280
- const m = Et(o, n.children, (d) => r(d) === s ? (c = d, { ...a }) : { ...d });
2281
- let g = [{
2282
- task: { [n.children]: m },
2295
+ return g;
2296
+ }, Ms = (e) => {
2297
+ const { updatedDataItem: a, taskModelFields: n, dataTree: r } = e, s = T(n.id), o = T(n.children), l = s(a);
2298
+ let i;
2299
+ const g = Ze(r, n.children, (m) => s(m) === l ? (i = m, { ...a }) : { ...m });
2300
+ let d = [{
2301
+ task: { [n.children]: g },
2283
2302
  childrenIndex: 0
2284
2303
  }];
2285
- for (; g.length > 0; ) {
2286
- const d = g[g.length - 1], u = d.task, h = r(u), p = l(u);
2287
- if (h && h === s)
2304
+ for (; d.length > 0; ) {
2305
+ const m = d[d.length - 1], c = m.task, h = s(c), C = o(c);
2306
+ if (h && h === l)
2288
2307
  break;
2289
- p && p.length && p.length > d.childrenIndex ? (g.push({
2290
- task: p[d.childrenIndex],
2308
+ C && C.length && C.length > m.childrenIndex ? (d.push({
2309
+ task: C[m.childrenIndex],
2291
2310
  childrenIndex: 0
2292
- }), d.childrenIndex++) : g.pop();
2311
+ }), m.childrenIndex++) : d.pop();
2293
2312
  }
2294
- if (g.length > 1) {
2295
- g = g.splice(1, g.length - 2);
2296
- const d = D(n.start), u = D(n.end), h = D(n.percentComplete);
2297
- if (d(c).getTime() !== d(a).getTime()) {
2298
- ga(g.map((C) => C.task), n);
2299
- const p = d(a).getTime() - d(c).getTime();
2300
- ds(l(a), n, p);
2313
+ if (d.length > 1) {
2314
+ d = d.splice(1, d.length - 2);
2315
+ const m = T(n.start), c = T(n.end), h = T(n.percentComplete), C = T(n.parentId || "");
2316
+ if (m(i).getTime() !== m(a).getTime()) {
2317
+ Wa(d.map((k) => k.task), n);
2318
+ const f = m(a).getTime() - m(i).getTime();
2319
+ Yr(o(a), n, f);
2320
+ }
2321
+ if (c(i).getTime() !== c(a).getTime() && Oa(d.map((f) => f.task), n), h(i) !== h(a) && _a(d.map((f) => f.task), n), n.parentId && C(i) !== C(a)) {
2322
+ let f;
2323
+ return d.length ? Ur(d.map((k) => k.task), n, i) : f = g.filter((k) => s(k) !== s(a)), qr(f || g, n, a);
2301
2324
  }
2302
- u(c).getTime() !== u(a).getTime() && ha(g.map((p) => p.task), n), h(c) !== h(a) && fa(g.map((p) => p.task), n);
2303
2325
  }
2304
- return m;
2305
- }, zs = (e) => {
2306
- const { removedDataItem: a, taskModelFields: n, dataTree: o } = e, r = Et(o, n.children, (g) => ({ ...g }));
2307
- let l = [{
2308
- task: { [n.children]: r },
2326
+ return g;
2327
+ }, Ns = (e) => {
2328
+ const { removedDataItem: a, taskModelFields: n, dataTree: r } = e, s = Ze(r, n.children, (d) => ({ ...d }));
2329
+ let o = [{
2330
+ task: { [n.children]: s },
2309
2331
  childrenIndex: 0
2310
2332
  }];
2311
- const s = D(n.id), c = D(n.children), m = s(a);
2312
- for (; l.length > 0; ) {
2313
- const g = l[l.length - 1], d = g.task, u = s(d), h = c(d);
2314
- if (u && u === m)
2333
+ const l = T(n.id), i = T(n.children), g = l(a);
2334
+ for (; o.length > 0; ) {
2335
+ const d = o[o.length - 1], m = d.task, c = l(m), h = i(m);
2336
+ if (c && c === g)
2315
2337
  break;
2316
- h && h.length && h.length > g.childrenIndex ? (l.push({
2317
- task: h[g.childrenIndex],
2338
+ h && h.length && h.length > d.childrenIndex ? (o.push({
2339
+ task: h[d.childrenIndex],
2318
2340
  childrenIndex: 0
2319
- }), g.childrenIndex++) : l.pop();
2341
+ }), d.childrenIndex++) : o.pop();
2320
2342
  }
2321
- if (l.length > 1) {
2322
- const g = l[l.length - 2], d = g.task;
2323
- c(d).splice(g.childrenIndex - 1, 1), l = l.splice(1, l.length - 2), Ve(l.map((h) => h.task), n);
2343
+ if (o.length > 1) {
2344
+ const d = o[o.length - 2], m = d.task;
2345
+ i(m).splice(d.childrenIndex - 1, 1), o = o.splice(1, o.length - 2), _e(o.map((h) => h.task), n);
2324
2346
  }
2325
- return r;
2326
- }, Ve = (e, a) => {
2327
- ga(e, a), ha(e, a), fa(e, a);
2328
- }, ga = (e, a) => {
2347
+ return s;
2348
+ }, _e = (e, a) => {
2349
+ Wa(e, a), Oa(e, a), _a(e, a);
2350
+ }, Ur = (e, a, n) => {
2351
+ const r = T(a.children), s = ne(a.children);
2352
+ for (let o = e.length - 1; o >= 0; o--) {
2353
+ const l = e[o], i = r(l);
2354
+ if (n.parentId === l.id) {
2355
+ const g = i.filter((d) => d.parentId === l.id);
2356
+ s(l, g);
2357
+ }
2358
+ }
2359
+ }, qr = (e, a, n) => {
2360
+ const r = T(a.children), s = ne(a.children);
2361
+ return n.parentId === null ? [...e, n] : (e = Ze(e, a.children, (o) => {
2362
+ if (o.id === n.parentId) {
2363
+ const l = r(o) || [];
2364
+ s(o, [...l, n]);
2365
+ }
2366
+ return { ...o };
2367
+ }), e);
2368
+ }, Wa = (e, a) => {
2329
2369
  if (!e.length)
2330
2370
  return;
2331
- const n = D(a.children), o = D(a.start), r = te(a.start);
2332
- for (let l = e.length - 1; l >= 0; l--) {
2333
- const s = e[l], c = n(s);
2334
- if (c && c.length) {
2335
- const m = c.reduce(
2336
- (g, d) => Math.min(g, o(d).getTime()),
2337
- o(c[0]).getTime()
2371
+ const n = T(a.children), r = T(a.start), s = ne(a.start);
2372
+ for (let o = e.length - 1; o >= 0; o--) {
2373
+ const l = e[o], i = n(l);
2374
+ if (i && i.length) {
2375
+ const g = i.reduce(
2376
+ (d, m) => Math.min(d, r(m).getTime()),
2377
+ r(i[0]).getTime()
2338
2378
  );
2339
- r(s, new Date(m));
2379
+ s(l, new Date(g));
2340
2380
  }
2341
2381
  }
2342
- }, ha = (e, a) => {
2382
+ }, Oa = (e, a) => {
2343
2383
  if (!e.length)
2344
2384
  return;
2345
- const n = D(a.children), o = D(a.end), r = te(a.end);
2346
- for (let l = e.length - 1; l >= 0; l--) {
2347
- const s = e[l], c = n(s);
2348
- if (c && c.length) {
2349
- const m = c.reduce(
2350
- (g, d) => Math.max(g, o(d).getTime()),
2351
- o(c[0]).getTime()
2385
+ const n = T(a.children), r = T(a.end), s = ne(a.end);
2386
+ for (let o = e.length - 1; o >= 0; o--) {
2387
+ const l = e[o], i = n(l);
2388
+ if (i && i.length) {
2389
+ const g = i.reduce(
2390
+ (d, m) => Math.max(d, r(m).getTime()),
2391
+ r(i[0]).getTime()
2352
2392
  );
2353
- r(s, new Date(m));
2393
+ s(l, new Date(g));
2354
2394
  }
2355
2395
  }
2356
- }, fa = (e, a) => {
2396
+ }, _a = (e, a) => {
2357
2397
  if (!e.length)
2358
2398
  return;
2359
- const n = D(a.children), o = D(a.percentComplete), r = te(a.percentComplete), l = ({ avg: s, n: c }, m) => ({
2360
- avg: ((o(m) || 0) + c * s) / (c + 1),
2361
- n: c + 1
2399
+ const n = T(a.children), r = T(a.percentComplete), s = ne(a.percentComplete), o = ({ avg: l, n: i }, g) => ({
2400
+ avg: ((r(g) || 0) + i * l) / (i + 1),
2401
+ n: i + 1
2362
2402
  });
2363
- for (let s = e.length - 1; s >= 0; s--) {
2364
- const c = e[s], m = n(c);
2365
- if (m && m.length) {
2366
- const g = m.reduce(l, { avg: 0, n: 0 }).avg;
2367
- r(c, g);
2403
+ for (let l = e.length - 1; l >= 0; l--) {
2404
+ const i = e[l], g = n(i);
2405
+ if (g && g.length) {
2406
+ const d = g.reduce(o, { avg: 0, n: 0 }).avg;
2407
+ s(i, d);
2368
2408
  }
2369
2409
  }
2370
- }, ds = (e, a, n) => {
2410
+ }, Yr = (e, a, n) => {
2371
2411
  if (!e)
2372
2412
  return;
2373
- const o = D(a.children), r = D(a.start), l = te(a.start), s = D(a.end), c = te(a.end), m = e.map((g) => ({ task: g, childrenIndex: 0 }));
2374
- for (; m.length > 0; ) {
2375
- const g = m[m.length - 1], d = g.task, u = o(d);
2376
- u && u.length && u.length > g.childrenIndex ? (m.push({
2377
- task: u[g.childrenIndex],
2413
+ const r = T(a.children), s = T(a.start), o = ne(a.start), l = T(a.end), i = ne(a.end), g = e.map((d) => ({ task: d, childrenIndex: 0 }));
2414
+ for (; g.length > 0; ) {
2415
+ const d = g[g.length - 1], m = d.task, c = r(m);
2416
+ c && c.length && c.length > d.childrenIndex ? (g.push({
2417
+ task: c[d.childrenIndex],
2378
2418
  childrenIndex: 0
2379
- }), g.childrenIndex++) : (m.pop(), l(d, new Date(r(d).getTime() + n)), c(d, new Date(s(d).getTime() + n)));
2419
+ }), d.childrenIndex++) : (g.pop(), o(m, new Date(s(m).getTime() + n)), i(m, new Date(l(m).getTime() + n)));
2380
2420
  }
2381
- }, us = (e) => {
2382
- const { validationMessage: a, touched: n, label: o, id: r, valid: l, disabled: s, hint: c, type: m, optional: g, ...d } = e, u = n && a, h = !u && c, p = h ? `${r}_hint` : "", C = u ? `${r}_error` : "";
2383
- return /* @__PURE__ */ t.createElement(ft, null, /* @__PURE__ */ t.createElement(pt, { editorId: r, editorValid: l, editorDisabled: s, optional: g }, o), /* @__PURE__ */ t.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ t.createElement(
2384
- fo,
2421
+ }, gn = (e) => {
2422
+ const { validationMessage: a, touched: n, label: r, id: s, valid: o, disabled: l, hint: i, type: g, optional: d, ...m } = e, c = n && a, h = !c && i, C = h ? `${s}_hint` : "", f = c ? `${s}_error` : "";
2423
+ return /* @__PURE__ */ t.createElement(qe, { className: "k-col-span-full" }, /* @__PURE__ */ t.createElement(Ye, { editorId: s, editorValid: o, editorDisabled: l, optional: d }, r), /* @__PURE__ */ t.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ t.createElement(
2424
+ Uo,
2425
+ {
2426
+ valid: o,
2427
+ type: g,
2428
+ id: s,
2429
+ disabled: l,
2430
+ ariaDescribedBy: `${C} ${f}`,
2431
+ ...m
2432
+ }
2433
+ ), h && /* @__PURE__ */ t.createElement(Xe, { id: C }, i), c && /* @__PURE__ */ t.createElement(je, { id: f }, a)));
2434
+ }, We = (e) => {
2435
+ const { validationMessage: a, touched: n, label: r, id: s, valid: o, disabled: l, hint: i, wrapperStyle: g, ...d } = e, m = n && a, c = !m && i, h = c ? `${s}_hint` : "", C = m ? `${s}_error` : "", f = r ? `${s}_label` : "";
2436
+ return /* @__PURE__ */ t.createElement(qe, { style: g, className: "k-col-span-2" }, /* @__PURE__ */ t.createElement(Ye, { id: f, editorId: s, editorValid: o, editorDisabled: l }, r), /* @__PURE__ */ t.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ t.createElement(
2437
+ Xo,
2385
2438
  {
2386
- valid: l,
2387
- type: m,
2388
- id: r,
2389
- disabled: s,
2390
- ariaDescribedBy: `${p} ${C}`,
2439
+ ariaLabelledBy: f,
2440
+ ariaDescribedBy: `${h} ${C}`,
2441
+ valid: o,
2442
+ id: s,
2443
+ disabled: l,
2391
2444
  ...d
2392
2445
  }
2393
- ), h && /* @__PURE__ */ t.createElement(Ct, { id: p }, c), u && /* @__PURE__ */ t.createElement(kt, { id: C }, a)));
2394
- }, Jt = (e) => {
2395
- const { validationMessage: a, touched: n, label: o, id: r, valid: l, disabled: s, hint: c, wrapperStyle: m, ...g } = e, d = n && a, u = !d && c, h = u ? `${r}_hint` : "", p = d ? `${r}_error` : "", C = o ? `${r}_label` : "";
2396
- return /* @__PURE__ */ t.createElement(ft, { style: m }, /* @__PURE__ */ t.createElement(pt, { id: C, editorId: r, editorValid: l, editorDisabled: s }, o), /* @__PURE__ */ t.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ t.createElement(
2397
- Co,
2446
+ ), c && /* @__PURE__ */ t.createElement(Xe, { id: h }, i), m && /* @__PURE__ */ t.createElement(je, { id: C }, a)));
2447
+ }, hn = (e) => {
2448
+ const { validationMessage: a, visited: n, label: r, id: s, valid: o, disabled: l, hint: i, ...g } = e, d = n && a, m = !d && i, c = m ? `${s}_hint` : "", h = d ? `${s}_error` : "";
2449
+ return /* @__PURE__ */ t.createElement(qe, null, /* @__PURE__ */ t.createElement(Ye, { editorId: s, editorValid: o, editorDisabled: l }, r), /* @__PURE__ */ t.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ t.createElement(
2450
+ qo,
2398
2451
  {
2399
- ariaLabelledBy: C,
2400
- ariaDescribedBy: `${h} ${p}`,
2401
- valid: l,
2402
- id: r,
2403
- disabled: s,
2452
+ ariaDescribedBy: `${c} ${h}`,
2453
+ valid: o,
2454
+ id: s,
2455
+ disabled: l,
2456
+ format: "p0",
2457
+ step: 0.01,
2404
2458
  ...g
2405
2459
  }
2406
- ), u && /* @__PURE__ */ t.createElement(Ct, { id: h }, c), d && /* @__PURE__ */ t.createElement(kt, { id: p }, a)));
2407
- }, ms = (e) => {
2408
- const { validationMessage: a, touched: n, label: o, id: r, valid: l, disabled: s, hint: c, ...m } = e, g = n && a, d = !g && c, u = d ? `${r}_hint` : "", h = g ? `${r}_error` : "";
2409
- return /* @__PURE__ */ t.createElement(ft, null, /* @__PURE__ */ t.createElement(pt, { editorId: r, editorValid: l, editorDisabled: s }, o), /* @__PURE__ */ t.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ t.createElement(
2410
- po,
2460
+ ), m && /* @__PURE__ */ t.createElement(Xe, { id: c }, i), d && /* @__PURE__ */ t.createElement(je, { id: h }, a)));
2461
+ }, Xr = (e) => {
2462
+ const {
2463
+ validationMessage: a,
2464
+ touched: n,
2465
+ label: r,
2466
+ id: s,
2467
+ valid: o,
2468
+ disabled: l,
2469
+ hint: i,
2470
+ idField: g,
2471
+ dataItem: d,
2472
+ ...m
2473
+ } = e, c = { id: null, title: "-None-", parentId: null }, h = [], C = n && a, f = !C && i, k = f ? `${s}_hint` : "", y = C ? `${s}_error` : "", M = t.useCallback((F) => {
2474
+ if (!F || !F.children)
2475
+ return e.data;
2476
+ for (const w of F.children)
2477
+ h.push(w), w.children && M(w);
2478
+ const v = h.map((w) => w.id);
2479
+ return e.data.filter((w) => !v.includes(w.id));
2480
+ }, [e.data]), A = M(d), x = t.useMemo(
2481
+ () => A.map((F) => {
2482
+ const v = new Date(F.start).toLocaleDateString(), w = new Date(F.end).toLocaleDateString();
2483
+ return { ...F, title: `${F.title} (${v}-${w})` };
2484
+ }),
2485
+ [M]
2486
+ ), G = t.useMemo(
2487
+ () => re(x, g, e.value),
2488
+ [x, g, e.value]
2489
+ ), b = (F) => {
2490
+ F.value.id === null ? e.onChange({ value: null }) : e.onChange({ value: F.value[g] });
2491
+ };
2492
+ return /* @__PURE__ */ t.createElement(qe, { className: "k-col-span-full" }, /* @__PURE__ */ t.createElement(Ye, { editorId: s, editorValid: o, editorDisabled: l }, r), /* @__PURE__ */ t.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ t.createElement(
2493
+ He,
2411
2494
  {
2412
- ariaDescribedBy: `${u} ${h}`,
2413
- valid: l,
2414
- id: r,
2415
- disabled: s,
2416
- ...m
2495
+ textField: "title",
2496
+ ariaDescribedBy: `${k} ${y}`,
2497
+ valid: o,
2498
+ id: s,
2499
+ disabled: l,
2500
+ ...m,
2501
+ value: G,
2502
+ data: x,
2503
+ onChange: b,
2504
+ defaultItem: c
2417
2505
  }
2418
- ), d && /* @__PURE__ */ t.createElement(Ct, { id: u }, c), g && /* @__PURE__ */ t.createElement(kt, { id: h }, a)));
2419
- }, gs = () => {
2420
- const e = Tt(), a = oe(), n = (f) => a.toLanguageString(f, ae[f]), o = n(Un), r = n(Yn), l = n(qn), s = n(Xn), c = n(jn), m = n(Zn), g = n(Jn), d = t.useCallback(
2421
- (f) => f || f === 0 ? void 0 : c,
2422
- [c]
2423
- ), u = t.useCallback(
2424
- (f, v) => f && v(e.end) && f.getTime() > v(e.end).getTime() ? m : void 0,
2425
- [e, m]
2426
- ), h = t.useCallback(
2427
- (f, v) => f && v(e.start) && f.getTime() < v(e.start).getTime() ? g : void 0,
2428
- [e, g]
2429
- ), p = t.useMemo(
2430
- () => [d, u],
2431
- [d, u]
2432
- ), C = t.useMemo(
2433
- () => [d, h],
2434
- [d, h]
2435
- );
2436
- return /* @__PURE__ */ t.createElement(go, { style: { width: 400 }, horizontal: !0 }, /* @__PURE__ */ t.createElement(
2506
+ ), f && /* @__PURE__ */ t.createElement(Xe, { id: k }, i), C && /* @__PURE__ */ t.createElement(je, { id: y }, a)));
2507
+ }, jr = (e, a, n, r) => {
2508
+ const [s, o] = t.useState(e), l = t.useRef(null), i = (c) => {
2509
+ r(a, "fromId", c.target.value.id);
2510
+ }, g = () => {
2511
+ if (n && !a.uid)
2512
+ return n.id === a.id;
2513
+ if (n && a.id === null)
2514
+ return n.uid === a.uid;
2515
+ }, d = t.useMemo(
2516
+ () => re(e, "id", a.fromId),
2517
+ [e, a.fromId]
2518
+ ), m = (c) => {
2519
+ const h = In(e, c.filter);
2520
+ o(h);
2521
+ };
2522
+ return /* @__PURE__ */ t.createElement("td", { ref: l, className: ie(g() && "k-selected") }, /* @__PURE__ */ t.createElement(
2437
2523
  He,
2438
2524
  {
2439
- id: `${e.title}_gantteditor`,
2440
- name: e.title,
2441
- label: o,
2442
- component: us,
2443
- validator: d
2525
+ textField: "title",
2526
+ data: s,
2527
+ value: d,
2528
+ onChange: i,
2529
+ filterable: !0,
2530
+ onFilterChange: m,
2531
+ required: !0
2444
2532
  }
2445
- ), /* @__PURE__ */ t.createElement(
2533
+ ));
2534
+ }, Zr = (e, a, n, r) => {
2535
+ const s = (i) => {
2536
+ r(a, "type", i.target.value.type);
2537
+ }, o = () => {
2538
+ if (n && !a.uid)
2539
+ return n.id === a.id;
2540
+ if (n && a.id === null)
2541
+ return n.uid === a.uid;
2542
+ }, l = t.useMemo(
2543
+ () => re(e, "type", a.type),
2544
+ [e, a.type]
2545
+ );
2546
+ return /* @__PURE__ */ t.createElement("td", { className: ie(o() && "k-selected") }, /* @__PURE__ */ t.createElement(
2446
2547
  He,
2447
2548
  {
2448
- id: `${e.start}_gantteditor`,
2449
- name: e.start,
2450
- label: r,
2451
- component: Jt,
2452
- validator: p
2549
+ textField: "name",
2550
+ data: e,
2551
+ value: l,
2552
+ onChange: s
2453
2553
  }
2454
- ), /* @__PURE__ */ t.createElement(
2554
+ ));
2555
+ }, Jr = (e) => {
2556
+ var m;
2557
+ const [a, n] = t.useState([]), r = ce(), s = (c) => r.toLanguageString(c, se[c]), o = s(qt), l = s(Yt), i = s(jt), g = s(Zt), d = t.useMemo(() => {
2558
+ const c = e.predecessors.map((h) => {
2559
+ const C = re(e.flatTasks, "id", h.fromId), f = re(e.dependencyTypes, "type", h.type);
2560
+ return {
2561
+ ...h,
2562
+ taskTitle: C ? C.title : "",
2563
+ typeName: f ? f.type : ""
2564
+ };
2565
+ });
2566
+ return bn(c, a);
2567
+ }, [e.predecessors, e.dependencyTypes, e.flatTasks, a]);
2568
+ return /* @__PURE__ */ t.createElement(
2569
+ Tn,
2570
+ {
2571
+ data: d,
2572
+ sort: a,
2573
+ sortable: !0,
2574
+ onRowClick: e.onSelectRow,
2575
+ onSortChange: (c) => {
2576
+ n(c.sort);
2577
+ },
2578
+ style: { height: "23em" }
2579
+ },
2580
+ /* @__PURE__ */ t.createElement(Sn, null, /* @__PURE__ */ t.createElement(me, { icon: "plus", svgIcon: It, onClick: e.addPredecessorsDependency }, o), /* @__PURE__ */ t.createElement(
2581
+ me,
2582
+ {
2583
+ icon: "minus",
2584
+ svgIcon: vn,
2585
+ onClick: e.deleteDependency,
2586
+ disabled: ((m = e.selectedItem) == null ? void 0 : m.id) === void 0
2587
+ },
2588
+ l
2589
+ )),
2590
+ /* @__PURE__ */ t.createElement(
2591
+ Be,
2592
+ {
2593
+ field: "taskTitle",
2594
+ title: i,
2595
+ cell: (c) => jr(e.flatTasks, c.dataItem, e.selectedItem, e.updateDependency)
2596
+ }
2597
+ ),
2598
+ /* @__PURE__ */ t.createElement(
2599
+ Be,
2600
+ {
2601
+ field: "typeName",
2602
+ title: g,
2603
+ cell: (c) => Zr(e.dependencyTypes, c.dataItem, e.selectedItem, e.updateDependency)
2604
+ }
2605
+ )
2606
+ );
2607
+ }, Qr = (e, a, n, r) => {
2608
+ const [s, o] = t.useState(e), l = (m) => {
2609
+ r(a, "toId", m.target.value.id);
2610
+ }, i = () => {
2611
+ if (n && !a.uid)
2612
+ return n.id === a.id;
2613
+ if (n && a.id === null)
2614
+ return n.uid === a.uid;
2615
+ }, g = t.useMemo(
2616
+ () => re(e, "id", a.toId),
2617
+ [e, a.toId]
2618
+ ), d = (m) => {
2619
+ const c = In(e, m.filter);
2620
+ o(c);
2621
+ };
2622
+ return /* @__PURE__ */ t.createElement("td", { className: ie(i() && "k-selected") }, /* @__PURE__ */ t.createElement(
2455
2623
  He,
2456
2624
  {
2457
- id: `${e.end}_gantteditor`,
2458
- name: e.end,
2459
- label: l,
2460
- component: Jt,
2461
- validator: C
2625
+ textField: "title",
2626
+ data: s,
2627
+ value: g,
2628
+ onChange: l,
2629
+ filterable: !0,
2630
+ onFilterChange: d,
2631
+ required: !0
2462
2632
  }
2463
- ), /* @__PURE__ */ t.createElement(
2633
+ ));
2634
+ }, es = (e, a, n, r) => {
2635
+ const s = (i) => {
2636
+ r(a, "type", i.target.value.type);
2637
+ }, o = () => {
2638
+ if (n && !a.uid)
2639
+ return n.id === a.id;
2640
+ if (n && a.id === null)
2641
+ return n.uid === a.uid;
2642
+ }, l = t.useMemo(
2643
+ () => re(e, "type", a.type),
2644
+ [e, a.type]
2645
+ );
2646
+ return /* @__PURE__ */ t.createElement("td", { className: ie(o() && "k-selected") }, /* @__PURE__ */ t.createElement(
2464
2647
  He,
2465
2648
  {
2466
- id: `${e.percentComplete}_gantteditor`,
2467
- name: e.percentComplete,
2468
- format: "p",
2469
- label: s,
2470
- component: ms,
2471
- step: 0.01,
2472
- validator: d
2649
+ textField: "name",
2650
+ data: e,
2651
+ value: l,
2652
+ onChange: s
2473
2653
  }
2474
2654
  ));
2475
- }, Gs = (e) => {
2476
- const { onCancel: a, onClose: n, onSubmit: o, ...r } = e, l = oe(), s = (C) => l.toLanguageString(C, ae[C]), c = s(Bn), m = s(Gt), g = s($n), d = t.useCallback(
2477
- (C) => {
2655
+ }, ts = (e) => {
2656
+ var m;
2657
+ const [a, n] = t.useState([]), r = ce(), s = (c) => r.toLanguageString(c, se[c]), o = s(qt), l = s(Yt), i = s(jt), g = s(Zt), d = t.useMemo(() => {
2658
+ const c = e.successors.map((h) => {
2659
+ const C = re(e.flatTasks, "id", h.toId), f = re(e.dependencyTypes, "type", h.type);
2660
+ return {
2661
+ ...h,
2662
+ taskTitle: C ? C.title : "",
2663
+ typeName: f ? f.type : ""
2664
+ };
2665
+ });
2666
+ return bn(c, a);
2667
+ }, [e.successors, e.dependencyTypes, e.flatTasks, a]);
2668
+ return /* @__PURE__ */ t.createElement(
2669
+ Tn,
2670
+ {
2671
+ data: d,
2672
+ sort: a,
2673
+ sortable: !0,
2674
+ onRowClick: e.onSelectRow,
2675
+ onSortChange: (c) => {
2676
+ n(c.sort);
2677
+ },
2678
+ style: { height: "23em" }
2679
+ },
2680
+ /* @__PURE__ */ t.createElement(Sn, null, /* @__PURE__ */ t.createElement(me, { icon: "plus", svgIcon: It, onClick: e.addSuccessorsDependency }, o), /* @__PURE__ */ t.createElement(
2681
+ me,
2682
+ {
2683
+ icon: "minus",
2684
+ svgIcon: vn,
2685
+ onClick: e.deleteDependency,
2686
+ disabled: ((m = e.selectedItem) == null ? void 0 : m.id) === void 0
2687
+ },
2688
+ l
2689
+ )),
2690
+ /* @__PURE__ */ t.createElement(
2691
+ Be,
2692
+ {
2693
+ field: "taskTitle",
2694
+ title: i,
2695
+ cell: (c) => Qr(e.flatTasks, c.dataItem, e.selectedItem, e.updateDependency)
2696
+ }
2697
+ ),
2698
+ /* @__PURE__ */ t.createElement(
2699
+ Be,
2700
+ {
2701
+ field: "type",
2702
+ title: g,
2703
+ cell: (c) => es(e.dependencyTypes, c.dataItem, e.selectedItem, e.updateDependency)
2704
+ }
2705
+ )
2706
+ );
2707
+ };
2708
+ var ue = /* @__PURE__ */ ((e) => (e[e.FF = 0] = "FF", e[e.FS = 1] = "FS", e[e.SF = 2] = "SF", e[e.SS = 3] = "SS", e))(ue || {});
2709
+ const ns = [
2710
+ { type: ue.FF },
2711
+ { type: ue.FS },
2712
+ { type: ue.SF },
2713
+ { type: ue.SS }
2714
+ ], as = (e) => {
2715
+ const [a, n] = t.useState(0), [r, s] = t.useState(), [o, l] = t.useState([...e.dependencyData || []]), [i, g] = t.useState([]), d = Ft(), m = ce(), c = (p) => m.toLanguageString(p, se[p]), h = c(ha), C = c(fa), f = c(pa), k = c(Ca), y = c(ka), M = c(da), A = c(ua), x = c(ma), G = c(Da), b = c(Ea), F = c(ya), v = c(va), w = t.useMemo(
2716
+ () => yn(
2717
+ e.taskData || [],
2718
+ (p) => p.children || [],
2719
+ (p) => {
2720
+ const H = {
2721
+ title: p[d.title],
2722
+ id: p[d.id],
2723
+ start: p[d.start],
2724
+ end: p[d.end],
2725
+ parentId: null
2726
+ };
2727
+ return d.parentId && (H.parentId = p[d.parentId]), H;
2728
+ }
2729
+ ),
2730
+ [e.taskData, d]
2731
+ ), $ = t.useMemo(
2732
+ () => w.filter((p) => p.id !== e.dataItem.id),
2733
+ [w, e.dataItem]
2734
+ ), O = t.useMemo(
2735
+ () => o.filter((p) => p.toId === e.dataItem.id),
2736
+ [o, e.dataItem]
2737
+ ), _ = t.useMemo(
2738
+ () => o.filter((p) => p.fromId === e.dataItem.id),
2739
+ [o, e.dataItem]
2740
+ ), X = t.useMemo(
2741
+ () => o.filter((p) => p.id === null).map((p) => ({ id: p.id, fromId: p.fromId, toId: p.toId, type: p.type })),
2742
+ [o]
2743
+ ), D = t.useMemo(
2744
+ () => o.filter((p) => p.id !== null && p.uid).map((p) => ({ id: p.id, fromId: p.fromId, toId: p.toId, type: p.type })),
2745
+ [o]
2746
+ ), P = () => {
2747
+ if (r) {
2748
+ if (r.id) {
2749
+ const p = o.filter((K) => K.id !== r.id);
2750
+ l(p);
2751
+ const H = o.filter((K) => K.id === r.id);
2752
+ g((K) => [...K, ...H]);
2753
+ } else {
2754
+ const p = o.filter((K) => K.uid !== r.uid);
2755
+ l(p);
2756
+ const H = o.filter((K) => K.uid === r.uid);
2757
+ g((K) => [...K, ...H]);
2758
+ }
2759
+ s(void 0);
2760
+ }
2761
+ }, Y = t.useCallback(
2762
+ (p) => p || p === 0 ? void 0 : G,
2763
+ [G]
2764
+ ), U = t.useCallback(
2765
+ (p) => p || p === 0 ? p >= 0 && p <= 1 ? void 0 : v : G,
2766
+ [G, v]
2767
+ ), S = t.useCallback(
2768
+ (p, H) => p && H(d.end) && p.getTime() > H(d.end).getTime() ? b : void 0,
2769
+ [d, b]
2770
+ ), J = t.useCallback(
2771
+ (p, H) => p && H(d.start) && p.getTime() < H(d.start).getTime() ? F : void 0,
2772
+ [d, F]
2773
+ ), I = t.useMemo(
2774
+ () => [Y, S],
2775
+ [Y, S]
2776
+ ), N = t.useMemo(
2777
+ () => [Y, J],
2778
+ [Y, J]
2779
+ ), j = t.useMemo(
2780
+ () => re(o, "fromId", null) || re(o, "toId", null),
2781
+ [o]
2782
+ ), Q = (p) => {
2783
+ j || (n(p.selected), s(void 0));
2784
+ }, B = (p) => {
2785
+ s(p.dataItem);
2786
+ }, q = () => {
2787
+ const p = { uid: mt(), id: null, fromId: null, toId: e.dataItem.id, type: ue.FS };
2788
+ l([...o, p]);
2789
+ }, ke = () => {
2790
+ const p = { uid: mt(), id: null, fromId: e.dataItem.id, toId: null, type: ue.FS };
2791
+ l([...o, p]);
2792
+ }, De = (p, H, K) => {
2793
+ const de = {
2794
+ ...p,
2795
+ uid: p.uid || mt(),
2796
+ [H]: K
2797
+ }, Ee = o.findIndex(
2798
+ (le) => le.id && le.id === de.id || le.uid && le.uid === de.uid
2799
+ );
2800
+ Ee > -1 && (o.splice(Ee, 1, de), l([...o]));
2801
+ }, z = t.useMemo(() => ns.map((p) => {
2802
+ let H;
2803
+ switch (p.type) {
2804
+ case ue.FF:
2805
+ H = c(Tt);
2806
+ break;
2807
+ case ue.FS:
2808
+ H = c(Ta);
2809
+ break;
2810
+ case ue.SF:
2811
+ H = c(wa);
2812
+ break;
2813
+ case ue.SS:
2814
+ H = c(Sa);
2815
+ break;
2816
+ default:
2817
+ H = c(Tt);
2818
+ break;
2819
+ }
2820
+ return {
2821
+ ...p,
2822
+ name: H
2823
+ };
2824
+ }), [c]);
2825
+ t.useEffect(() => {
2826
+ e.onDependencyCreate && e.onDependencyCreate.call(void 0, {
2827
+ createdDependencies: X,
2828
+ updatedDependencies: D,
2829
+ deletedDependencies: i
2830
+ });
2831
+ }, [X, D, i, e.onDependencyCreate]);
2832
+ const ae = e.dependencyData && e.taskData, Se = /* @__PURE__ */ t.createElement(sn, { style: { width: 400 }, horizontal: !0 }, /* @__PURE__ */ t.createElement(
2833
+ fe,
2834
+ {
2835
+ id: `${d.title}_gantteditor`,
2836
+ name: d.title,
2837
+ label: h,
2838
+ component: gn,
2839
+ validator: Y
2840
+ }
2841
+ ), /* @__PURE__ */ t.createElement(
2842
+ fe,
2843
+ {
2844
+ id: `${d.start}_gantteditor`,
2845
+ name: d.start,
2846
+ label: C,
2847
+ component: We,
2848
+ validator: I
2849
+ }
2850
+ ), /* @__PURE__ */ t.createElement(
2851
+ fe,
2852
+ {
2853
+ id: `${d.end}_gantteditor`,
2854
+ name: d.end,
2855
+ label: f,
2856
+ component: We,
2857
+ validator: N
2858
+ }
2859
+ ), /* @__PURE__ */ t.createElement(
2860
+ fe,
2861
+ {
2862
+ id: `${d.percentComplete}_gantteditor`,
2863
+ name: d.percentComplete,
2864
+ label: k,
2865
+ component: hn,
2866
+ validator: U
2867
+ }
2868
+ )), xe = /* @__PURE__ */ t.createElement(sn, { style: { paddingInline: "4px" } }, /* @__PURE__ */ t.createElement("div", { className: "k-form-fieldset" }, /* @__PURE__ */ t.createElement("div", { className: "k-form-layout k-d-grid k-grid-cols-4 k-gap-x-2" }, /* @__PURE__ */ t.createElement(
2869
+ fe,
2870
+ {
2871
+ id: `${d.title}_gantteditor`,
2872
+ name: d.title,
2873
+ label: h,
2874
+ component: gn,
2875
+ validator: Y
2876
+ }
2877
+ ), /* @__PURE__ */ t.createElement(
2878
+ fe,
2879
+ {
2880
+ id: `${d.start}_gantteditor`,
2881
+ name: d.start,
2882
+ label: C,
2883
+ component: We,
2884
+ validator: I
2885
+ }
2886
+ ), /* @__PURE__ */ t.createElement(
2887
+ fe,
2888
+ {
2889
+ id: `${d.end}_gantteditor`,
2890
+ name: d.end,
2891
+ label: f,
2892
+ component: We,
2893
+ validator: N
2894
+ }
2895
+ ), /* @__PURE__ */ t.createElement(
2896
+ fe,
2897
+ {
2898
+ id: `${d.percentComplete}_gantteditor`,
2899
+ name: d.percentComplete,
2900
+ label: k,
2901
+ component: hn,
2902
+ validator: U
2903
+ }
2904
+ ), d.parentId && /* @__PURE__ */ t.createElement(
2905
+ fe,
2906
+ {
2907
+ id: `${d.parentId}_gantteditor`,
2908
+ name: d.parentId || "",
2909
+ idField: d.id,
2910
+ label: y,
2911
+ component: Xr,
2912
+ data: $,
2913
+ dataItem: e.dataItem
2914
+ }
2915
+ ))));
2916
+ return ae ? /* @__PURE__ */ t.createElement(Yo, { selected: a, onSelect: Q }, /* @__PURE__ */ t.createElement(gt, { title: M }, xe), /* @__PURE__ */ t.createElement(gt, { title: A }, /* @__PURE__ */ t.createElement(
2917
+ Jr,
2918
+ {
2919
+ flatTasks: w,
2920
+ predecessors: O,
2921
+ dependencyTypes: z,
2922
+ selectedItem: r,
2923
+ onSelectRow: B,
2924
+ addPredecessorsDependency: q,
2925
+ deleteDependency: P,
2926
+ updateDependency: De
2927
+ }
2928
+ )), /* @__PURE__ */ t.createElement(gt, { title: x }, /* @__PURE__ */ t.createElement(
2929
+ ts,
2930
+ {
2931
+ flatTasks: w,
2932
+ successors: _,
2933
+ dependencyTypes: z,
2934
+ selectedItem: r,
2935
+ onSelectRow: B,
2936
+ addSuccessorsDependency: ke,
2937
+ deleteDependency: P,
2938
+ updateDependency: De
2939
+ }
2940
+ ))) : Se;
2941
+ }, Fs = (e) => {
2942
+ const { onCancel: a, onDelete: n, onClose: r, onSubmit: s, ...o } = e, l = t.useRef(e.dataItem), [i, g] = t.useState({}), d = ce(), m = (v) => d.toLanguageString(v, se[v]), c = m(ca), h = m(Ut), C = m(Xt), f = m(ga), k = t.useCallback(
2943
+ (v) => {
2478
2944
  if (a) {
2479
- const f = { syntheticEvent: C, nativeEvent: C.nativeEvent, dataItem: e.dataItem };
2480
- a.call(void 0, f);
2945
+ const w = { syntheticEvent: v, nativeEvent: v.nativeEvent, dataItem: e.dataItem };
2946
+ a.call(void 0, w);
2481
2947
  }
2482
2948
  },
2483
2949
  [a, e.dataItem]
2484
- ), u = t.useCallback(
2485
- ({ syntheticEvent: C }) => {
2950
+ ), y = t.useCallback(
2951
+ (v) => {
2486
2952
  if (n) {
2487
- const f = { syntheticEvent: C, nativeEvent: C.nativeEvent, dataItem: e.dataItem };
2488
- n.call(void 0, f);
2953
+ const w = { syntheticEvent: v, nativeEvent: v.nativeEvent, dataItem: e.dataItem };
2954
+ n.call(void 0, w);
2489
2955
  }
2490
2956
  },
2491
2957
  [n, e.dataItem]
2492
- ), h = t.useCallback(
2493
- (C, f) => {
2494
- if (o) {
2495
- const v = { dataItem: C, syntheticEvent: f, nativeEvent: f && f.nativeEvent };
2496
- o.call(void 0, v);
2958
+ ), M = t.useCallback(
2959
+ ({ syntheticEvent: v }) => {
2960
+ if (r) {
2961
+ const w = { syntheticEvent: v, nativeEvent: v.nativeEvent, dataItem: e.dataItem };
2962
+ r.call(void 0, w);
2497
2963
  }
2498
2964
  },
2499
- [o]
2500
- ), p = /* @__PURE__ */ t.createElement(
2501
- ho,
2965
+ [r, e.dataItem]
2966
+ ), A = t.useCallback(
2967
+ (v, w) => {
2968
+ if (s) {
2969
+ const $ = {
2970
+ dataItem: v,
2971
+ initialDataItem: l.current,
2972
+ syntheticEvent: w,
2973
+ nativeEvent: w && w.nativeEvent,
2974
+ dependencies: i
2975
+ };
2976
+ s.call(void 0, $);
2977
+ }
2978
+ },
2979
+ [s, i]
2980
+ ), x = t.useMemo(
2981
+ () => re(i.createdDependencies, "fromId", null) || re(i.createdDependencies, "toId", null),
2982
+ [i]
2983
+ ), G = t.useMemo(
2984
+ () => i.createdDependencies && i.createdDependencies.length && x === void 0 || i.updatedDependencies && i.updatedDependencies.length || i.deletedDependencies && i.deletedDependencies.length,
2985
+ [i, x]
2986
+ ), b = t.useCallback(
2987
+ (v) => {
2988
+ g(v);
2989
+ },
2990
+ []
2991
+ ), F = /* @__PURE__ */ t.createElement(
2992
+ Oo,
2502
2993
  {
2503
2994
  initialValues: e.dataItem,
2504
- onSubmit: h,
2505
- render: (C) => /* @__PURE__ */ t.createElement(
2506
- rn,
2995
+ onSubmit: A,
2996
+ render: (v) => /* @__PURE__ */ t.createElement(
2997
+ _o,
2507
2998
  {
2508
- title: g,
2509
- minWidth: 600,
2510
- onClose: u,
2511
- style: { zIndex: 90 }
2999
+ title: f,
3000
+ minWidth: 90,
3001
+ width: 554,
3002
+ modal: !0,
3003
+ height: 0,
3004
+ onClose: M
2512
3005
  },
2513
- /* @__PURE__ */ t.createElement(gs, null),
2514
- /* @__PURE__ */ t.createElement(ln, null, /* @__PURE__ */ t.createElement(
2515
- ze,
3006
+ /* @__PURE__ */ t.createElement(
3007
+ as,
2516
3008
  {
2517
- disabled: !C.allowSubmit,
2518
- onClick: C.onSubmit
3009
+ taskData: e.taskData,
3010
+ dependencyData: e.dependencyData,
3011
+ dataItem: e.dataItem,
3012
+ onDependencyCreate: b
3013
+ }
3014
+ ),
3015
+ /* @__PURE__ */ t.createElement(Bo, { layout: "start" }, /* @__PURE__ */ t.createElement(
3016
+ me,
3017
+ {
3018
+ disabled: !v.allowSubmit && !G,
3019
+ onClick: v.allowSubmit ? v.onSubmit : (w) => A(e.dataItem, w),
3020
+ icon: "save",
3021
+ svgIcon: Lo,
3022
+ themeColor: "primary"
2519
3023
  },
2520
3024
  c
2521
- ), /* @__PURE__ */ t.createElement(ze, { onClick: d }, m))
3025
+ ), /* @__PURE__ */ t.createElement(me, { onClick: k, type: "button", icon: "cancel", svgIcon: Ao }, h), /* @__PURE__ */ t.createElement("div", { className: "k-spacer" }), n && /* @__PURE__ */ t.createElement(me, { onClick: y, icon: "trash", svgIcon: Ho, fillMode: "flat", themeColor: "primary" }, C))
2522
3026
  ),
2523
- ...r
3027
+ ...o
2524
3028
  }
2525
3029
  );
2526
- return gt ? sn.createPortal(p, document && document.body) : null;
2527
- }, Ws = (e) => {
2528
- const { onClose: a, onCancel: n, onConfirm: o, dataItem: r } = e, l = oe(), s = (f) => l.toLanguageString(f, ae[f]), c = s(aa), m = s(Gt), g = s(oa), d = s(sa), u = t.useCallback(
2529
- ({ syntheticEvent: f }) => {
3030
+ return St ? wn.createPortal(F, document && document.body) : null;
3031
+ }, Ls = (e) => {
3032
+ const { onClose: a, onCancel: n, onConfirm: r, dataItem: s } = e, o = ce(), l = (k) => o.toLanguageString(k, se[k]), i = l(Xt), g = l(Ut), d = l(Na), m = l(Fa), c = t.useCallback(
3033
+ ({ syntheticEvent: k }) => {
2530
3034
  a && a.call(void 0, {
2531
- syntheticEvent: f,
2532
- nativeEvent: f && f.nativeEvent,
3035
+ syntheticEvent: k,
3036
+ nativeEvent: k && k.nativeEvent,
2533
3037
  dataItem: null
2534
3038
  });
2535
3039
  },
2536
3040
  [a]
2537
3041
  ), h = t.useCallback(
2538
- (f) => {
3042
+ (k) => {
2539
3043
  n && n.call(void 0, {
2540
- syntheticEvent: f,
2541
- nativeEvent: f && f.nativeEvent,
3044
+ syntheticEvent: k,
3045
+ nativeEvent: k && k.nativeEvent,
2542
3046
  dataItem: null
2543
3047
  });
2544
3048
  },
2545
3049
  [n]
2546
- ), p = t.useCallback(
2547
- (f) => {
2548
- o && o.call(void 0, {
2549
- syntheticEvent: f,
2550
- nativeEvent: f && f.nativeEvent,
2551
- dataItem: r
3050
+ ), C = t.useCallback(
3051
+ (k) => {
3052
+ r && r.call(void 0, {
3053
+ syntheticEvent: k,
3054
+ nativeEvent: k && k.nativeEvent,
3055
+ dataItem: s
2552
3056
  });
2553
3057
  },
2554
- [o, r]
2555
- ), C = /* @__PURE__ */ t.createElement(rn, { title: d, onClose: u }, g, /* @__PURE__ */ t.createElement(ln, null, /* @__PURE__ */ t.createElement("button", { className: "k-button", onClick: h }, m), /* @__PURE__ */ t.createElement("button", { className: "k-button", onClick: p }, c)));
2556
- return gt ? sn.createPortal(C, document && document.body) : null;
2557
- }, Os = an;
3058
+ [r, s]
3059
+ ), f = /* @__PURE__ */ t.createElement(Ko, { title: m, onClose: c }, d, /* @__PURE__ */ t.createElement($o, { layout: "end" }, /* @__PURE__ */ t.createElement(me, { themeColor: "primary", onClick: C }, i), /* @__PURE__ */ t.createElement(me, { onClick: h }, g)));
3060
+ return St ? wn.createPortal(f, document && document.body) : null;
3061
+ }, As = En;
2558
3062
  export {
2559
- xs as GANTT_COL_INDEX_ATTRIBUTE,
2560
- Is as GANTT_PREVENT_SELECTION_ELEMENT,
2561
- Ss as GANTT_ROW_INDEX_ATTRIBUTE,
2562
- Wt as Gantt,
2563
- is as GanttBooleanFilter,
2564
- cs as GanttDateFilter,
2565
- Ot as GanttDayView,
2566
- Gs as GanttForm,
2567
- Pt as GanttMonthView,
2568
- ls as GanttNumericFilter,
2569
- Ws as GanttRemoveDialog,
2570
- Os as GanttRow,
2571
- rs as GanttTextFilter,
2572
- $e as GanttWeekView,
2573
- _t as GanttYearView,
2574
- Hs as addDependency,
2575
- As as addTask,
2576
- Ls as createDataTree,
2577
- Fs as extendDataItem,
2578
- Ms as filterBy,
2579
- Ks as getSelectedState,
2580
- Bs as getSelectedStateFromKeyDown,
2581
- Et as mapTree,
2582
- Ns as orderBy,
2583
- zs as removeTask,
2584
- $s as setSelectedState,
2585
- Vs as updateTask
3063
+ vs as GANTT_COL_INDEX_ATTRIBUTE,
3064
+ ws as GANTT_PREVENT_SELECTION_ELEMENT,
3065
+ ys as GANTT_ROW_INDEX_ATTRIBUTE,
3066
+ Jt as Gantt,
3067
+ Kr as GanttBooleanFilter,
3068
+ $r as GanttDateFilter,
3069
+ Qt as GanttDayView,
3070
+ Fs as GanttForm,
3071
+ en as GanttMonthView,
3072
+ Br as GanttNumericFilter,
3073
+ Ls as GanttRemoveDialog,
3074
+ As as GanttRow,
3075
+ _r as GanttTextFilter,
3076
+ nt as GanttWeekView,
3077
+ tn as GanttYearView,
3078
+ Rs as addDependency,
3079
+ xs as addTask,
3080
+ Is as createDataTree,
3081
+ bs as extendDataItem,
3082
+ Ss as filterBy,
3083
+ zs as getSelectedState,
3084
+ Ps as getSelectedStateFromKeyDown,
3085
+ Ze as mapTree,
3086
+ Ts as orderBy,
3087
+ Ns as removeTask,
3088
+ Gs as setSelectedState,
3089
+ Ms as updateTask
2586
3090
  };