@progress/kendo-react-gantt 7.0.0-develop.9 → 7.0.1-develop.1
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/components/GanttTreelist.d.ts +2 -1
- package/dist/cdn/js/kendo-react-gantt.js +1 -1
- package/index.js +1 -1
- package/index.mjs +407 -403
- package/package.json +13 -12
package/index.mjs
CHANGED
|
@@ -2,23 +2,24 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use client";
|
|
5
6
|
import * as t from "react";
|
|
6
7
|
import * as i from "prop-types";
|
|
7
|
-
import { mapTree as
|
|
8
|
-
import { MS_PER_MINUTE as
|
|
9
|
-
import { TABLE_ROW_INDEX_ATTRIBUTE as
|
|
10
|
-
import { getSelectedState as
|
|
11
|
-
import { createDataTree as
|
|
12
|
-
import { useInternationalization as xe, useLocalization as
|
|
13
|
-
import { xIcon as
|
|
14
|
-
import { Button as ze, ButtonGroup as
|
|
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 _s, getSelectedStateFromKeyDown as Ks, setSelectedState as Bs } 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";
|
|
15
16
|
import * as sn from "react-dom";
|
|
16
|
-
import { FieldWrapper as ft, FormElement as
|
|
17
|
+
import { FieldWrapper as ft, FormElement as go, Field as He, Form as ho } from "@progress/kendo-react-form";
|
|
17
18
|
import { Dialog as rn, DialogActionsBar as ln } from "@progress/kendo-react-dialogs";
|
|
18
19
|
import { Label as pt, Hint as Ct, Error as kt } from "@progress/kendo-react-labels";
|
|
19
|
-
import { Input as
|
|
20
|
-
import { DateTimePicker as
|
|
21
|
-
const
|
|
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 Rs = Ma, Ss = Fa, xs = 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 = {
|
|
22
23
|
id: "id",
|
|
23
24
|
start: "start",
|
|
24
25
|
end: "end",
|
|
@@ -34,8 +35,8 @@ const bs = Na, Rs = Ma, Ss = Fa, Ut = (/* @__PURE__ */ new Date()).getTime(), cn
|
|
|
34
35
|
fromId: "fromId",
|
|
35
36
|
toId: "toId",
|
|
36
37
|
type: "type"
|
|
37
|
-
},
|
|
38
|
-
function
|
|
38
|
+
}, Is = Ha, Ns = Aa, Et = va, Ms = Ta, Fs = 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) {
|
|
39
40
|
return new Date(Date.UTC(
|
|
40
41
|
e.getFullYear(),
|
|
41
42
|
e.getMonth(),
|
|
@@ -46,41 +47,41 @@ function se(e) {
|
|
|
46
47
|
e.getMilliseconds()
|
|
47
48
|
));
|
|
48
49
|
}
|
|
49
|
-
const
|
|
50
|
+
const ne = 4, nt = 10, So = (e, a, n, o) => {
|
|
50
51
|
const r = [];
|
|
51
52
|
let l = 0, s = 0;
|
|
52
53
|
const c = nt, m = Math.floor(n / 2), g = e.top < a.top, d = () => r.push({ left: s, top: l });
|
|
53
54
|
if (o === 0 || o === 3) {
|
|
54
55
|
const u = o === 3 ? "start" : "end";
|
|
55
|
-
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] -
|
|
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");
|
|
56
57
|
} else {
|
|
57
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];
|
|
58
|
-
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] -
|
|
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");
|
|
59
60
|
}
|
|
60
61
|
return r;
|
|
61
|
-
},
|
|
62
|
+
}, jt = (e, a, n, o) => o ? xo(e, a, n) : Io(e, a, n), xo = (e, a, n) => {
|
|
62
63
|
n.push({
|
|
63
|
-
top: e -
|
|
64
|
+
top: e - ne / 2,
|
|
64
65
|
left: a
|
|
65
66
|
}), n.push({
|
|
66
67
|
top: e,
|
|
67
|
-
left: a -
|
|
68
|
+
left: a - ne + 1
|
|
68
69
|
}), n.push({
|
|
69
|
-
top: e +
|
|
70
|
+
top: e + ne / 2,
|
|
70
71
|
left: a
|
|
71
72
|
}), n.push({
|
|
72
73
|
top: e,
|
|
73
74
|
left: a
|
|
74
75
|
});
|
|
75
|
-
},
|
|
76
|
+
}, Io = (e, a, n) => {
|
|
76
77
|
n.push({
|
|
77
|
-
top: e +
|
|
78
|
+
top: e + ne / 2,
|
|
78
79
|
left: a
|
|
79
80
|
}), n.push({
|
|
80
81
|
top: e,
|
|
81
|
-
left: a +
|
|
82
|
+
left: a + ne - 1
|
|
82
83
|
}), n.push({
|
|
83
|
-
top: e -
|
|
84
|
+
top: e - ne / 2,
|
|
84
85
|
left: a
|
|
85
86
|
}), n.push({
|
|
86
87
|
top: e,
|
|
@@ -94,11 +95,11 @@ const te = 4, nt = 10, Ro = (e, a, n, o) => {
|
|
|
94
95
|
for (a.push(n); e.workWeekEnd !== n; )
|
|
95
96
|
n > 6 ? n -= 7 : n++, a.push(n);
|
|
96
97
|
return a;
|
|
97
|
-
},
|
|
98
|
+
}, No = (e, a) => {
|
|
98
99
|
const n = e.getDay();
|
|
99
100
|
return a.indexOf(n) > -1;
|
|
100
101
|
}, hn = (e, { step: a, timezone: n }) => {
|
|
101
|
-
const o = [], r =
|
|
102
|
+
const o = [], r = R.fromLocalDate(e.start, n), l = R.fromLocalDate(e.end, n);
|
|
102
103
|
let s = r.clone();
|
|
103
104
|
for (; s.getTime() < l.getTime(); ) {
|
|
104
105
|
const c = s.clone(), m = c.clone().addTime(a), g = new Date(c.getTime()), u = {
|
|
@@ -110,10 +111,10 @@ const te = 4, nt = 10, Ro = (e, a, n, o) => {
|
|
|
110
111
|
o.push(u), s = s.addTime(a);
|
|
111
112
|
}
|
|
112
113
|
return o;
|
|
113
|
-
},
|
|
114
|
-
const o = [], r =
|
|
114
|
+
}, Mo = (e, { timezone: a }, n) => {
|
|
115
|
+
const o = [], r = R.fromLocalDate(e.start, a), l = R.fromLocalDate(e.end, a);
|
|
115
116
|
for (let s = r.clone(), c = 0; s.getTime() < l.getTime(); c++) {
|
|
116
|
-
const m = s.clone(), g = Dt(at(
|
|
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;
|
|
117
118
|
s = u.clone();
|
|
118
119
|
const h = new Date(m.getTime()), C = {
|
|
119
120
|
end: new Date(u.getTime()),
|
|
@@ -124,10 +125,10 @@ const te = 4, nt = 10, Ro = (e, a, n, o) => {
|
|
|
124
125
|
o.push(C);
|
|
125
126
|
}
|
|
126
127
|
return o;
|
|
127
|
-
},
|
|
128
|
-
const n = [], o =
|
|
128
|
+
}, Fo = (e, { timezone: a }) => {
|
|
129
|
+
const n = [], o = R.fromLocalDate(e.start, a), r = R.fromLocalDate(e.end, a);
|
|
129
130
|
for (let l = o.clone(), s = 0; l.getTime() < r.getTime(); s++) {
|
|
130
|
-
const c = l.clone(), m =
|
|
131
|
+
const c = l.clone(), m = R.fromLocalDate(Qt(new Date(c.getTime()), 1), a);
|
|
131
132
|
l = m.clone();
|
|
132
133
|
const g = new Date(c.getTime()), u = {
|
|
133
134
|
end: new Date(m.getTime()),
|
|
@@ -138,10 +139,10 @@ const te = 4, nt = 10, Ro = (e, a, n, o) => {
|
|
|
138
139
|
n.push(u);
|
|
139
140
|
}
|
|
140
141
|
return n;
|
|
141
|
-
},
|
|
142
|
-
const n = [], o =
|
|
142
|
+
}, Lo = (e, { timezone: a }) => {
|
|
143
|
+
const n = [], o = R.fromLocalDate(e.start, a), r = R.fromLocalDate(e.end, a);
|
|
143
144
|
for (let l = o.clone(), s = 0; l.getTime() < r.getTime(); s++) {
|
|
144
|
-
const c = l.clone(), m =
|
|
145
|
+
const c = l.clone(), m = R.fromLocalDate(Qt(new Date(c.getTime()), 12), a);
|
|
145
146
|
l = m.clone();
|
|
146
147
|
const g = new Date(c.getTime()), u = {
|
|
147
148
|
end: new Date(m.getTime()),
|
|
@@ -152,25 +153,25 @@ const te = 4, nt = 10, Ro = (e, a, n, o) => {
|
|
|
152
153
|
n.push(u);
|
|
153
154
|
}
|
|
154
155
|
return n;
|
|
155
|
-
},
|
|
156
|
+
}, Ho = (e, a, n) => {
|
|
156
157
|
const o = n.parseDate(a.workDayStart).getHours(), r = n.parseDate(a.workDayEnd).getHours();
|
|
157
|
-
return hn(e, { step:
|
|
158
|
+
return hn(e, { step: xa * a.slotDuration, timezone: a.timezone }).map((s) => {
|
|
158
159
|
const c = s.zonedStart.getHours();
|
|
159
160
|
return {
|
|
160
161
|
range: s,
|
|
161
162
|
isWork: c >= o && c < r,
|
|
162
163
|
span: 1,
|
|
163
|
-
text: n.formatDate(s.zonedStart,
|
|
164
|
+
text: n.formatDate(s.zonedStart, ko),
|
|
164
165
|
type: "time"
|
|
165
166
|
};
|
|
166
167
|
});
|
|
167
168
|
}, fn = (e, a, n) => hn(e, { step: Oe, timezone: a.timezone }).map((r) => ({
|
|
168
169
|
range: r,
|
|
169
|
-
isWork:
|
|
170
|
+
isWork: No(r.start, a.workDays),
|
|
170
171
|
span: 1,
|
|
171
172
|
text: n.formatDate(r.zonedStart, ot),
|
|
172
173
|
type: "day"
|
|
173
|
-
})), pn = (e, a, n) =>
|
|
174
|
+
})), pn = (e, a, n) => Mo(e, { timezone: a.timezone }, n).map((r) => {
|
|
174
175
|
const l = Math.round((r.zonedEnd.getTime() - r.zonedStart.getTime()) / Oe);
|
|
175
176
|
return {
|
|
176
177
|
range: r,
|
|
@@ -179,32 +180,32 @@ const te = 4, nt = 10, Ro = (e, a, n, o) => {
|
|
|
179
180
|
text: `${n.formatDate(r.zonedStart, ot)} - ${n.formatDate(r.zonedEnd, ot)}`,
|
|
180
181
|
type: "week"
|
|
181
182
|
};
|
|
182
|
-
}), Cn = (e, a, n) =>
|
|
183
|
+
}), Cn = (e, a, n) => Fo(e, { timezone: a.timezone }).map((r) => {
|
|
183
184
|
const l = Math.round((r.zonedEnd.getTime() - r.zonedStart.getTime()) / Oe);
|
|
184
185
|
return {
|
|
185
186
|
range: r,
|
|
186
187
|
isWork: !1,
|
|
187
188
|
span: l,
|
|
188
|
-
text: n.formatDate(r.zonedStart,
|
|
189
|
+
text: n.formatDate(r.zonedStart, Eo),
|
|
189
190
|
type: "month"
|
|
190
191
|
};
|
|
191
|
-
}),
|
|
192
|
+
}), Ao = (e, a, n) => Lo(e, { timezone: a.timezone }).map((r) => {
|
|
192
193
|
const l = Math.round((r.zonedEnd.getTime() - r.zonedStart.getTime()) / Oe);
|
|
193
194
|
return {
|
|
194
195
|
range: r,
|
|
195
196
|
isWork: !1,
|
|
196
197
|
span: l,
|
|
197
|
-
text: n.formatDate(r.zonedStart,
|
|
198
|
+
text: n.formatDate(r.zonedStart, Do),
|
|
198
199
|
type: "year"
|
|
199
200
|
};
|
|
200
|
-
}),
|
|
201
|
+
}), Vo = (e, a, n) => {
|
|
201
202
|
const o = n;
|
|
202
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(
|
|
203
204
|
"td",
|
|
204
205
|
{
|
|
205
206
|
key: s.range.start.getTime(),
|
|
206
207
|
colSpan: s.span,
|
|
207
|
-
className:
|
|
208
|
+
className: de(
|
|
208
209
|
"k-table-th",
|
|
209
210
|
{
|
|
210
211
|
"k-header": !0,
|
|
@@ -224,14 +225,14 @@ const te = 4, nt = 10, Ro = (e, a, n, o) => {
|
|
|
224
225
|
}
|
|
225
226
|
) : s.text
|
|
226
227
|
))))));
|
|
227
|
-
},
|
|
228
|
+
}, zo = (e, a) => {
|
|
228
229
|
const n = e[e.length - 1];
|
|
229
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(
|
|
230
231
|
"td",
|
|
231
232
|
{
|
|
232
233
|
key: o.range.start.getTime(),
|
|
233
234
|
colSpan: o.span,
|
|
234
|
-
className:
|
|
235
|
+
className: de(
|
|
235
236
|
"k-table-td",
|
|
236
237
|
{
|
|
237
238
|
"k-nonwork-hour": !o.isWork
|
|
@@ -239,16 +240,16 @@ const te = 4, nt = 10, Ro = (e, a, n, o) => {
|
|
|
239
240
|
)
|
|
240
241
|
}
|
|
241
242
|
)))));
|
|
242
|
-
},
|
|
243
|
+
}, Go = (e, a) => {
|
|
243
244
|
const n = e[e.length - 1];
|
|
244
245
|
let o = 0, r = 0;
|
|
245
246
|
return n.forEach((l) => {
|
|
246
247
|
const s = l.span;
|
|
247
248
|
r += s, s > o && (o = s);
|
|
248
249
|
}), Math.round(r * a / o);
|
|
249
|
-
}, st = (e, a) => !!D(a)(e), kn = (e, a) => !!D(a)(e),
|
|
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);
|
|
250
251
|
wt.displayName = "KendoReactGanttTaskDataContext";
|
|
251
|
-
const yt = t.createContext([]),
|
|
252
|
+
const yt = t.createContext([]), Po = () => t.useContext(yt);
|
|
252
253
|
yt.displayName = "KendoReactGanttDependencyDataContext";
|
|
253
254
|
const vt = t.createContext(dn), Tt = () => t.useContext(vt);
|
|
254
255
|
vt.displayName = "KendoReactGanttTaskModelFieldsContext";
|
|
@@ -259,40 +260,40 @@ Rt.displayName = "KendoReactGanttPropsContext";
|
|
|
259
260
|
const St = t.createContext({
|
|
260
261
|
start: /* @__PURE__ */ new Date(),
|
|
261
262
|
end: /* @__PURE__ */ new Date(),
|
|
262
|
-
zonedStart:
|
|
263
|
-
zonedEnd:
|
|
263
|
+
zonedStart: R.fromLocalDate(/* @__PURE__ */ new Date()),
|
|
264
|
+
zonedEnd: R.fromLocalDate(/* @__PURE__ */ new Date())
|
|
264
265
|
}), Me = () => t.useContext(St);
|
|
265
266
|
St.displayName = "KendoReactGanttDateRangeContext";
|
|
266
|
-
const xt = t.createContext([]),
|
|
267
|
+
const xt = t.createContext([]), _o = () => t.useContext(xt);
|
|
267
268
|
xt.displayName = "KendoReactGanttViewsContext";
|
|
268
|
-
const It = t.createContext(["week",
|
|
269
|
+
const It = t.createContext(["week", M]), Dn = () => t.useContext(It);
|
|
269
270
|
It.displayName = "KendoReactGanttActiveViewContext";
|
|
270
271
|
const Nt = t.createContext(0), wn = () => t.useContext(Nt);
|
|
271
272
|
Nt.displayName = "KendoReactGanttRowHeightContext";
|
|
272
|
-
const Mt = t.createContext(0),
|
|
273
|
+
const Mt = t.createContext(0), Ko = () => t.useContext(Mt);
|
|
273
274
|
Mt.displayName = "KendoReactGanttToolbarHeightContext";
|
|
274
275
|
const Ft = t.createContext({
|
|
275
|
-
onDataStateChange:
|
|
276
|
-
onSortChange:
|
|
277
|
-
onFilterChange:
|
|
278
|
-
onColumnMenuFilterChange:
|
|
279
|
-
onExpandChange:
|
|
280
|
-
onRowClick:
|
|
281
|
-
onRowDoubleClick:
|
|
282
|
-
onRowContextMenu:
|
|
283
|
-
onColumnResize:
|
|
284
|
-
onColumnReorder:
|
|
285
|
-
onDependencyCreate:
|
|
286
|
-
onKeyDown:
|
|
287
|
-
onSelectionChange:
|
|
288
|
-
onHeaderSelectionChange:
|
|
289
|
-
}),
|
|
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);
|
|
290
291
|
Ft.displayName = "KendoReactGanttEventsContext";
|
|
291
292
|
const Lt = t.createContext({
|
|
292
|
-
onTaskClick:
|
|
293
|
-
onTaskDoubleClick:
|
|
294
|
-
onTaskContextMenu:
|
|
295
|
-
}),
|
|
293
|
+
onTaskClick: M,
|
|
294
|
+
onTaskDoubleClick: M,
|
|
295
|
+
onTaskContextMenu: M
|
|
296
|
+
}), $o = () => t.useContext(Lt);
|
|
296
297
|
Lt.displayName = "KendoReactGanttTaskEventsContext";
|
|
297
298
|
const yn = ({
|
|
298
299
|
children: e,
|
|
@@ -310,17 +311,17 @@ const yn = ({
|
|
|
310
311
|
taskEvents: h
|
|
311
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))))))))))));
|
|
312
313
|
yn.displayName = "KendoReactGanttContext";
|
|
313
|
-
const Ht = t.createContext([{ current: {} },
|
|
314
|
+
const Ht = t.createContext([{ current: {} }, M]), vn = () => t.useContext(Ht);
|
|
314
315
|
Ht.displayName = "KendoReactGanttViewContext";
|
|
315
|
-
const At = t.createContext(0),
|
|
316
|
+
const At = t.createContext(0), Uo = () => t.useContext(At);
|
|
316
317
|
At.displayName = "KendoReactGanttViewTimelineWidthContext";
|
|
317
318
|
const Vt = t.createContext({
|
|
318
|
-
onDependencyHandlePress:
|
|
319
|
-
onDependencyHandleDrag:
|
|
320
|
-
onDependencyHandleRelease:
|
|
319
|
+
onDependencyHandlePress: M,
|
|
320
|
+
onDependencyHandleDrag: M,
|
|
321
|
+
onDependencyHandleRelease: M,
|
|
321
322
|
isEnabled: !1,
|
|
322
323
|
draggedId: null
|
|
323
|
-
}),
|
|
324
|
+
}), Yo = () => t.useContext(Vt);
|
|
324
325
|
Vt.displayName = "KendoReactGanttViewDependencyDragContext";
|
|
325
326
|
const Tn = ({
|
|
326
327
|
children: e,
|
|
@@ -330,7 +331,7 @@ const Tn = ({
|
|
|
330
331
|
}) => /* @__PURE__ */ t.createElement(Ht.Provider, { value: a }, /* @__PURE__ */ t.createElement(At.Provider, { value: n }, /* @__PURE__ */ t.createElement(Vt.Provider, { value: o }, e)));
|
|
331
332
|
Tn.displayName = "KendoReactGanttViewContext";
|
|
332
333
|
var rt = /* @__PURE__ */ ((e) => (e[e.add = 0] = "add", e[e.remove = 1] = "remove", e))(rt || {});
|
|
333
|
-
const
|
|
334
|
+
const qo = () => {
|
|
334
335
|
const e = t.useRef({}), a = t.useCallback(
|
|
335
336
|
(n) => {
|
|
336
337
|
switch (n.type) {
|
|
@@ -345,7 +346,7 @@ const Yo = () => {
|
|
|
345
346
|
[]
|
|
346
347
|
);
|
|
347
348
|
return [e, a];
|
|
348
|
-
},
|
|
349
|
+
}, Xo = (e, a, n, o) => {
|
|
349
350
|
const r = t.useRef(null), [, l] = vn();
|
|
350
351
|
t.useImperativeHandle(r, () => ({ element: o.current, dataItem: e })), t.useImperativeHandle(n, () => r.current), t.useLayoutEffect(
|
|
351
352
|
() => {
|
|
@@ -365,9 +366,9 @@ const Yo = () => {
|
|
|
365
366
|
}
|
|
366
367
|
);
|
|
367
368
|
}, bn = t.forwardRef((e, a) => {
|
|
368
|
-
const n = Me(), o = Tt(), r =
|
|
369
|
-
|
|
370
|
-
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(),
|
|
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);
|
|
371
372
|
Kt(X, {
|
|
372
373
|
onPress: l.onDependencyHandlePress,
|
|
373
374
|
onDrag: l.onDependencyHandleDrag,
|
|
@@ -423,11 +424,11 @@ const Yo = () => {
|
|
|
423
424
|
[e.dataItem, e.level]
|
|
424
425
|
), H = t.useCallback(
|
|
425
426
|
() => {
|
|
426
|
-
const w = n.start, Z = n.end, T = g.current,
|
|
427
|
-
if (!z || T === null ||
|
|
427
|
+
const w = n.start, Z = n.end, T = g.current, S = c.current, K = m.current;
|
|
428
|
+
if (!z || T === null || S === null)
|
|
428
429
|
return;
|
|
429
|
-
const Y = T.clientWidth / (Z.getTime() - w.getTime()), W = (u.getTime() - w.getTime()) * Y, O = (h.getTime() - u.getTime()) * Y,
|
|
430
|
-
|
|
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);
|
|
431
432
|
},
|
|
432
433
|
[n.start.getTime(), n.end.getTime(), L, V, z, C, r]
|
|
433
434
|
);
|
|
@@ -443,7 +444,7 @@ const Yo = () => {
|
|
|
443
444
|
"div",
|
|
444
445
|
{
|
|
445
446
|
"aria-hidden": !0,
|
|
446
|
-
className:
|
|
447
|
+
className: de({
|
|
447
448
|
"k-task": !0,
|
|
448
449
|
"k-task-milestone": !0,
|
|
449
450
|
"k-selected": v && !Array.isArray(v)
|
|
@@ -462,7 +463,7 @@ const Yo = () => {
|
|
|
462
463
|
className: "k-task-dot k-task-start",
|
|
463
464
|
ref: X,
|
|
464
465
|
style: _,
|
|
465
|
-
...
|
|
466
|
+
...qt
|
|
466
467
|
}
|
|
467
468
|
),
|
|
468
469
|
l.isEnabled && /* @__PURE__ */ t.createElement(
|
|
@@ -471,17 +472,17 @@ const Yo = () => {
|
|
|
471
472
|
className: "k-task-dot k-task-end",
|
|
472
473
|
ref: A,
|
|
473
474
|
style: _,
|
|
474
|
-
...
|
|
475
|
+
...Xt
|
|
475
476
|
}
|
|
476
477
|
)
|
|
477
478
|
) : /* @__PURE__ */ t.createElement(
|
|
478
479
|
"div",
|
|
479
480
|
{
|
|
480
481
|
"aria-hidden": !0,
|
|
481
|
-
className:
|
|
482
|
+
className: de({
|
|
482
483
|
"k-task": !0,
|
|
483
|
-
"k-task-summary":
|
|
484
|
-
"k-task-single": !
|
|
484
|
+
"k-task-summary": N,
|
|
485
|
+
"k-task-single": !N,
|
|
485
486
|
"k-selected": v && !Array.isArray(v)
|
|
486
487
|
}),
|
|
487
488
|
ref: c,
|
|
@@ -491,15 +492,15 @@ const Yo = () => {
|
|
|
491
492
|
onDoubleClick: G,
|
|
492
493
|
onContextMenu: B
|
|
493
494
|
},
|
|
494
|
-
|
|
495
|
-
!
|
|
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),
|
|
496
497
|
l.isEnabled && /* @__PURE__ */ t.createElement(
|
|
497
498
|
"div",
|
|
498
499
|
{
|
|
499
500
|
className: "k-task-dot k-task-start",
|
|
500
501
|
ref: X,
|
|
501
502
|
style: _,
|
|
502
|
-
...
|
|
503
|
+
...qt
|
|
503
504
|
}
|
|
504
505
|
),
|
|
505
506
|
l.isEnabled && /* @__PURE__ */ t.createElement(
|
|
@@ -508,7 +509,7 @@ const Yo = () => {
|
|
|
508
509
|
className: "k-task-dot k-task-end",
|
|
509
510
|
ref: A,
|
|
510
511
|
style: _,
|
|
511
|
-
...
|
|
512
|
+
...Xt
|
|
512
513
|
}
|
|
513
514
|
)
|
|
514
515
|
));
|
|
@@ -542,7 +543,7 @@ const Rn = (e) => {
|
|
|
542
543
|
top: h.offsetTop + h.offsetHeight / 2,
|
|
543
544
|
start: h.offsetLeft,
|
|
544
545
|
end: h.offsetLeft + h.offsetWidth
|
|
545
|
-
}, f = D(r.type)(a), v =
|
|
546
|
+
}, f = D(r.type)(a), v = So(p, C, l, f);
|
|
546
547
|
v && v.length && o.current.setAttribute("points", v.map((L) => `${L.left},${L.top}`).join(" "));
|
|
547
548
|
};
|
|
548
549
|
return t.useEffect(m), /* @__PURE__ */ t.createElement(
|
|
@@ -561,7 +562,7 @@ class zt extends t.Component {
|
|
|
561
562
|
super(a), this.state = {
|
|
562
563
|
activeId: void 0,
|
|
563
564
|
level: 0
|
|
564
|
-
}, 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.
|
|
565
|
+
}, 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) => {
|
|
565
566
|
if (!this.element)
|
|
566
567
|
return;
|
|
567
568
|
const { rowIndex: o = 0 } = n, { rowHeight: r = 0 } = this.props;
|
|
@@ -587,22 +588,22 @@ class zt extends t.Component {
|
|
|
587
588
|
}));
|
|
588
589
|
return r(o);
|
|
589
590
|
}, this.onKeyDown = (n) => {
|
|
590
|
-
if (
|
|
591
|
+
if (we.onKeyDown(n, {
|
|
591
592
|
contextStateRef: this.contextStateRef,
|
|
592
593
|
navigationStateRef: this.navigationStateRef
|
|
593
594
|
}), this.props.onKeyDown) {
|
|
594
|
-
const { mode: o, cell: r } =
|
|
595
|
+
const { mode: o, cell: r } = $t(this.props.selectable), l = {
|
|
595
596
|
dataItems: this.getLeafDataItems(),
|
|
596
597
|
mode: o,
|
|
597
598
|
cell: r,
|
|
598
|
-
componentId: this.
|
|
599
|
+
componentId: this.props.treelistId,
|
|
599
600
|
selectedField: this.props.selectedField,
|
|
600
601
|
...this.getEventArguments(n)
|
|
601
602
|
};
|
|
602
603
|
this.props.onKeyDown.call(void 0, l);
|
|
603
604
|
}
|
|
604
605
|
}, this.onFocus = (n) => {
|
|
605
|
-
|
|
606
|
+
we.onFocus(n, {
|
|
606
607
|
contextStateRef: this.contextStateRef
|
|
607
608
|
});
|
|
608
609
|
}, this.onRowDrag = (n) => {
|
|
@@ -665,7 +666,7 @@ class zt extends t.Component {
|
|
|
665
666
|
const c = l.style.boxSizing;
|
|
666
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");
|
|
667
668
|
}
|
|
668
|
-
this.tbodyOffsetTop = r.tBodies[0].offsetTop,
|
|
669
|
+
this.tbodyOffsetTop = r.tBodies[0].offsetTop, eo(r, s);
|
|
669
670
|
}, this.onItemChange = (n) => {
|
|
670
671
|
if (n.field === this.props.expandField) {
|
|
671
672
|
const o = this.props.onExpandChange;
|
|
@@ -707,7 +708,7 @@ class zt extends t.Component {
|
|
|
707
708
|
syntheticEvent: void 0,
|
|
708
709
|
target: this,
|
|
709
710
|
selectedField: this.props.selectedField || "",
|
|
710
|
-
componentId: this.
|
|
711
|
+
componentId: this.props.treelistId,
|
|
711
712
|
dataItems: this.getLeafDataItems(),
|
|
712
713
|
dataItem: null,
|
|
713
714
|
level: [],
|
|
@@ -796,7 +797,7 @@ class zt extends t.Component {
|
|
|
796
797
|
nativeEvent: n && n.nativeEvent,
|
|
797
798
|
syntheticEvent: n,
|
|
798
799
|
target: this
|
|
799
|
-
}), this.getLeafDataItems = () => this.flatData.map((n) => n.dataItem), this.dragLogic = new
|
|
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({
|
|
800
801
|
navigatable: !!a.navigatable,
|
|
801
802
|
contextStateRef: this.contextStateRef,
|
|
802
803
|
navigationStateRef: this.navigationStateRef,
|
|
@@ -811,7 +812,7 @@ class zt extends t.Component {
|
|
|
811
812
|
* @hidden
|
|
812
813
|
*/
|
|
813
814
|
componentDidMount() {
|
|
814
|
-
this.calculateSizes(this.element),
|
|
815
|
+
this.calculateSizes(this.element), we.onComponentDidMount({
|
|
815
816
|
scope: this.element || void 0,
|
|
816
817
|
contextStateRef: this.contextStateRef,
|
|
817
818
|
navigationStateRef: this.navigationStateRef
|
|
@@ -821,7 +822,7 @@ class zt extends t.Component {
|
|
|
821
822
|
* @hidden
|
|
822
823
|
*/
|
|
823
824
|
getSnapshotBeforeUpdate() {
|
|
824
|
-
return
|
|
825
|
+
return we.onGetSnapshotBeforeUpdate({
|
|
825
826
|
document: this.document,
|
|
826
827
|
contextStateRef: this.contextStateRef,
|
|
827
828
|
navigationStateRef: this.navigationStateRef
|
|
@@ -831,7 +832,7 @@ class zt extends t.Component {
|
|
|
831
832
|
* @hidden
|
|
832
833
|
*/
|
|
833
834
|
componentDidUpdate(a) {
|
|
834
|
-
a.columns !== this.props.columns && this.calculateSizes(this.element),
|
|
835
|
+
a.columns !== this.props.columns && this.calculateSizes(this.element), we.onComponentDidUpdate({
|
|
835
836
|
scope: this.element || void 0,
|
|
836
837
|
contextStateRef: this.contextStateRef,
|
|
837
838
|
navigationStateRef: this.navigationStateRef
|
|
@@ -857,13 +858,13 @@ class zt extends t.Component {
|
|
|
857
858
|
afterContent: c,
|
|
858
859
|
extendedColumns: m = [],
|
|
859
860
|
columnsMap: g
|
|
860
|
-
} = this.props, d = m.some((E) => !!E.filter) || a !== void 0, u = a ||
|
|
861
|
+
} = this.props, d = m.some((E) => !!E.filter) || a !== void 0, u = a || Ua, h = Ut.getIdPrefix(this.navigationStateRef);
|
|
861
862
|
this.columnResize.columns = m, this.columnResize.resizable = o, this.dragLogic.columns = m, this.dragLogic.reorderable = r, this.dragLogic.groupable = !1;
|
|
862
863
|
const p = m.filter((E) => E.children.length === 0), C = /* @__PURE__ */ t.createElement(
|
|
863
|
-
|
|
864
|
+
Ga,
|
|
864
865
|
{
|
|
865
866
|
headerRow: /* @__PURE__ */ t.createElement(
|
|
866
|
-
|
|
867
|
+
Wa,
|
|
867
868
|
{
|
|
868
869
|
sort: this.props.sort,
|
|
869
870
|
sortable: this.props.sortable,
|
|
@@ -893,17 +894,17 @@ class zt extends t.Component {
|
|
|
893
894
|
) || void 0,
|
|
894
895
|
columnResize: this.columnResize
|
|
895
896
|
}
|
|
896
|
-
), f = this.props.style || {}, { colSpans: v, hiddenColumns: L } =
|
|
897
|
+
), f = this.props.style || {}, { colSpans: v, hiddenColumns: L } = Oa({
|
|
897
898
|
enabled: this.props.columnVirtualization,
|
|
898
899
|
columns: p,
|
|
899
900
|
scrollLeft: this.wrapperScrollLeft,
|
|
900
901
|
tableViewPortWidth: parseFloat((f.width || "").toString())
|
|
901
|
-
}), V = (E, H, Q, _, w, Z) => p.map((T,
|
|
902
|
-
if (L[
|
|
902
|
+
}), V = (E, H, Q, _, w, Z) => p.map((T, S) => {
|
|
903
|
+
if (L[S])
|
|
903
904
|
return null;
|
|
904
|
-
const K = T.id ? T.id :
|
|
905
|
-
id:
|
|
906
|
-
colSpan: v[
|
|
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],
|
|
907
908
|
dataItem: E.dataItem,
|
|
908
909
|
field: T.field,
|
|
909
910
|
format: T.format,
|
|
@@ -911,13 +912,13 @@ class zt extends t.Component {
|
|
|
911
912
|
render: this.props.cellRender,
|
|
912
913
|
onChange: this.onItemChange,
|
|
913
914
|
selectionChange: this.props.onSelectionChange ? (O) => {
|
|
914
|
-
this.onSelectionChange({ event: O, item: E, columnIndex:
|
|
915
|
+
this.onSelectionChange({ event: O, item: E, columnIndex: S, dataIndex: w });
|
|
915
916
|
} : void 0,
|
|
916
917
|
level: E.level,
|
|
917
918
|
expandable: T.expandable,
|
|
918
919
|
expanded: _,
|
|
919
920
|
hasChildren: kn(E.dataItem, this.props.subItemsField),
|
|
920
|
-
colIndex:
|
|
921
|
+
colIndex: S,
|
|
921
922
|
ariaColumnIndex: T.ariaColumnIndex,
|
|
922
923
|
onExpandChange: this.onExpandChange,
|
|
923
924
|
style: T.left !== void 0 && {
|
|
@@ -925,19 +926,19 @@ class zt extends t.Component {
|
|
|
925
926
|
right: T.right,
|
|
926
927
|
borderRightWidth: T.rightBorder ? "1px" : ""
|
|
927
928
|
} || {},
|
|
928
|
-
isSelected: Array.isArray(Z) && Z.indexOf(
|
|
929
|
+
isSelected: Array.isArray(Z) && Z.indexOf(S) > -1
|
|
929
930
|
};
|
|
930
|
-
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(
|
|
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 });
|
|
931
932
|
});
|
|
932
|
-
let
|
|
933
|
-
const x =
|
|
934
|
-
l !== void 0 && s !== void 0 && (
|
|
935
|
-
rows:
|
|
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,
|
|
936
937
|
tableViewPortHeight: parseFloat((f.height || f.maxHeight || "").toString()),
|
|
937
938
|
scrollTop: this.wrapperScrollTop
|
|
938
939
|
}), this.updateOnScroll = !1);
|
|
939
|
-
const z =
|
|
940
|
-
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,
|
|
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 = {
|
|
941
942
|
key: w,
|
|
942
943
|
level: E.level,
|
|
943
944
|
levels: z,
|
|
@@ -958,8 +959,8 @@ class zt extends t.Component {
|
|
|
958
959
|
ariaPosInSet: E.level[E.level.length - 1] + 1,
|
|
959
960
|
isSelected: typeof T == "boolean" && T
|
|
960
961
|
}, K = this.props.editRow, Y = this.props.row || an, W = V(E, Q, w, Z, H, T);
|
|
961
|
-
return Q && K ? /* @__PURE__ */ t.createElement(K, { ...
|
|
962
|
-
}) || /* @__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(
|
|
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) => {
|
|
963
964
|
this.columnResize.colGroupMain = E;
|
|
964
965
|
} }, p.map(
|
|
965
966
|
(E, H) => /* @__PURE__ */ t.createElement(
|
|
@@ -974,8 +975,9 @@ class zt extends t.Component {
|
|
|
974
975
|
return /* @__PURE__ */ t.createElement(nn.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ t.createElement(
|
|
975
976
|
"div",
|
|
976
977
|
{
|
|
978
|
+
id: this.props.treelistId,
|
|
977
979
|
style: this.props.style,
|
|
978
|
-
className:
|
|
980
|
+
className: de(
|
|
979
981
|
"k-grid k-grid-md",
|
|
980
982
|
this.props.className,
|
|
981
983
|
{ "k-treelist-scrollable": n !== "none" }
|
|
@@ -987,11 +989,11 @@ class zt extends t.Component {
|
|
|
987
989
|
"aria-rowcount": x,
|
|
988
990
|
"aria-colcount": p.length,
|
|
989
991
|
role: "treegrid",
|
|
990
|
-
...
|
|
992
|
+
...Pa
|
|
991
993
|
},
|
|
992
994
|
this.props.toolbar,
|
|
993
995
|
/* @__PURE__ */ t.createElement(
|
|
994
|
-
|
|
996
|
+
_a,
|
|
995
997
|
{
|
|
996
998
|
selectable: this.props.selectable,
|
|
997
999
|
onRelease: this.selectionRelease,
|
|
@@ -1009,7 +1011,7 @@ class zt extends t.Component {
|
|
|
1009
1011
|
},
|
|
1010
1012
|
A,
|
|
1011
1013
|
C,
|
|
1012
|
-
/* @__PURE__ */ t.createElement("tbody", { className: "k-table-tbody", ...
|
|
1014
|
+
/* @__PURE__ */ t.createElement("tbody", { className: "k-table-tbody", ...Ka, ref: (E) => this.tbodyElement = E, role: "presentation" }, b)
|
|
1013
1015
|
)
|
|
1014
1016
|
),
|
|
1015
1017
|
this.props.pager && /* @__PURE__ */ t.createElement(
|
|
@@ -1022,7 +1024,7 @@ class zt extends t.Component {
|
|
|
1022
1024
|
onPageChange: this.onPageChange
|
|
1023
1025
|
}
|
|
1024
1026
|
),
|
|
1025
|
-
r && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
1027
|
+
r && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(Ba, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ t.createElement($a, { ref: this.dragLogic.refDragElementClue })),
|
|
1026
1028
|
c
|
|
1027
1029
|
));
|
|
1028
1030
|
}
|
|
@@ -1037,7 +1039,7 @@ class zt extends t.Component {
|
|
|
1037
1039
|
}
|
|
1038
1040
|
onSelectionChange(a) {
|
|
1039
1041
|
if (this.props.onSelectionChange) {
|
|
1040
|
-
const { event: n, item: o, dataIndex: r, columnIndex: l } = a, { mode: s, cell: c } =
|
|
1042
|
+
const { event: n, item: o, dataIndex: r, columnIndex: l } = a, { mode: s, cell: c } = $t(this.props.selectable), m = {
|
|
1041
1043
|
...this.getEventArguments(n.syntheticEvent),
|
|
1042
1044
|
dataItem: o.dataItem,
|
|
1043
1045
|
level: o.level,
|
|
@@ -1053,7 +1055,7 @@ class zt extends t.Component {
|
|
|
1053
1055
|
mode: s,
|
|
1054
1056
|
cell: c,
|
|
1055
1057
|
isDrag: !1,
|
|
1056
|
-
componentId: this.
|
|
1058
|
+
componentId: this.props.treelistId,
|
|
1057
1059
|
selectedField: this.props.selectedField || ""
|
|
1058
1060
|
};
|
|
1059
1061
|
this.props.onSelectionChange.call(void 0, m);
|
|
@@ -1105,7 +1107,8 @@ zt.propTypes = {
|
|
|
1105
1107
|
dataItemKey: i.string.isRequired,
|
|
1106
1108
|
afterContent: i.any,
|
|
1107
1109
|
navigatable: i.bool,
|
|
1108
|
-
idPrefix: i.string
|
|
1110
|
+
idPrefix: i.string,
|
|
1111
|
+
treelistId: i.string
|
|
1109
1112
|
};
|
|
1110
1113
|
zt.contextType = nn;
|
|
1111
1114
|
const Fe = t.forwardRef((e, a) => {
|
|
@@ -1125,11 +1128,11 @@ const Fe = t.forwardRef((e, a) => {
|
|
|
1125
1128
|
} = Ne(), {
|
|
1126
1129
|
onDataStateChange: L,
|
|
1127
1130
|
onSortChange: V,
|
|
1128
|
-
onFilterChange:
|
|
1131
|
+
onFilterChange: N,
|
|
1129
1132
|
onColumnMenuFilterChange: x,
|
|
1130
1133
|
onExpandChange: z,
|
|
1131
1134
|
onRowClick: J,
|
|
1132
|
-
onRowDoubleClick:
|
|
1135
|
+
onRowDoubleClick: b,
|
|
1133
1136
|
onRowContextMenu: X,
|
|
1134
1137
|
onColumnResize: A,
|
|
1135
1138
|
onColumnReorder: j,
|
|
@@ -1137,16 +1140,16 @@ const Fe = t.forwardRef((e, a) => {
|
|
|
1137
1140
|
onKeyDown: B,
|
|
1138
1141
|
onSelectionChange: E,
|
|
1139
1142
|
onHeaderSelectionChange: H
|
|
1140
|
-
} =
|
|
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(
|
|
1141
1144
|
(y) => {
|
|
1142
1145
|
W.current && W.current.scrollIntoView(y);
|
|
1143
1146
|
},
|
|
1144
1147
|
[]
|
|
1145
1148
|
);
|
|
1146
1149
|
t.useImperativeHandle(Le, () => ({ scrollIntoView: Ye })), t.useImperativeHandle(a, () => Le.current);
|
|
1147
|
-
const
|
|
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(
|
|
1148
1151
|
() => {
|
|
1149
|
-
const y =
|
|
1152
|
+
const y = Ya(
|
|
1150
1153
|
[
|
|
1151
1154
|
...l,
|
|
1152
1155
|
{
|
|
@@ -1154,41 +1157,41 @@ const Fe = t.forwardRef((e, a) => {
|
|
|
1154
1157
|
sortable: !1,
|
|
1155
1158
|
resizable: !1,
|
|
1156
1159
|
reorderable: !1,
|
|
1157
|
-
width:
|
|
1160
|
+
width: Ee,
|
|
1158
1161
|
headerCell: () => qe,
|
|
1159
1162
|
cell: bn,
|
|
1160
1163
|
orderIndex: Number.MAX_SAFE_INTEGER,
|
|
1161
1164
|
navigatable: !1
|
|
1162
1165
|
}
|
|
1163
1166
|
],
|
|
1164
|
-
{ prevId: 0, idPrefix:
|
|
1167
|
+
{ prevId: 0, idPrefix: ye.current }
|
|
1165
1168
|
);
|
|
1166
1169
|
let P = 0;
|
|
1167
1170
|
return y.forEach((I, $, q) => {
|
|
1168
|
-
const U = $ + 1 === q.length,
|
|
1169
|
-
U ? I.isAccessible = !1 : (I.locked = !0,
|
|
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)));
|
|
1170
1173
|
}), {
|
|
1171
1174
|
extendedColumns: y,
|
|
1172
1175
|
columnsWidth: P,
|
|
1173
|
-
columnsMap:
|
|
1176
|
+
columnsMap: qa(y)
|
|
1174
1177
|
};
|
|
1175
1178
|
},
|
|
1176
|
-
[l,
|
|
1177
|
-
), [Qe, et] =
|
|
1179
|
+
[l, Ee]
|
|
1180
|
+
), [Qe, et] = qo(), k = t.useCallback(
|
|
1178
1181
|
() => K.current && K.current.parentElement,
|
|
1179
1182
|
[]
|
|
1180
|
-
),
|
|
1181
|
-
const y =
|
|
1183
|
+
), se = () => {
|
|
1184
|
+
const y = k(), P = Y.current, I = W.current && W.current.tbodyElement;
|
|
1182
1185
|
if (!y || !P || !I)
|
|
1183
1186
|
return;
|
|
1184
|
-
const $ = I.offsetTop, q = y.offsetLeft, U =
|
|
1187
|
+
const $ = I.offsetTop, q = y.offsetLeft, U = Ee;
|
|
1185
1188
|
P.style.top = $ + "px", P.style.left = q + "px", P.style.width = U + "px", P.style.height = I.offsetHeight + "px";
|
|
1186
|
-
},
|
|
1187
|
-
const y =
|
|
1188
|
-
y && (
|
|
1189
|
+
}, ie = () => {
|
|
1190
|
+
const y = k();
|
|
1191
|
+
y && (he.current = y.offsetLeft);
|
|
1189
1192
|
};
|
|
1190
|
-
t.useEffect(
|
|
1191
|
-
const
|
|
1193
|
+
t.useEffect(se), t.useEffect(ie);
|
|
1194
|
+
const be = t.useCallback(
|
|
1192
1195
|
(y) => {
|
|
1193
1196
|
if (!O.current)
|
|
1194
1197
|
return;
|
|
@@ -1196,10 +1199,10 @@ const Fe = t.forwardRef((e, a) => {
|
|
|
1196
1199
|
if (y.end)
|
|
1197
1200
|
O.current.style.left = "0px";
|
|
1198
1201
|
else {
|
|
1199
|
-
const I =
|
|
1202
|
+
const I = k();
|
|
1200
1203
|
if (!I)
|
|
1201
1204
|
return;
|
|
1202
|
-
O.current.style.left = I.offsetLeft -
|
|
1205
|
+
O.current.style.left = I.offsetLeft - he.current + "px", se();
|
|
1203
1206
|
}
|
|
1204
1207
|
A({
|
|
1205
1208
|
...y,
|
|
@@ -1207,7 +1210,7 @@ const Fe = t.forwardRef((e, a) => {
|
|
|
1207
1210
|
});
|
|
1208
1211
|
},
|
|
1209
1212
|
[A]
|
|
1210
|
-
),
|
|
1213
|
+
), Re = t.useCallback(
|
|
1211
1214
|
(y) => {
|
|
1212
1215
|
const P = y.columns.slice(0, y.columns.length - 1);
|
|
1213
1216
|
j({
|
|
@@ -1216,78 +1219,79 @@ const Fe = t.forwardRef((e, a) => {
|
|
|
1216
1219
|
});
|
|
1217
1220
|
},
|
|
1218
1221
|
[A]
|
|
1219
|
-
),
|
|
1222
|
+
), tt = t.useCallback(
|
|
1220
1223
|
(y) => {
|
|
1221
|
-
const I = (
|
|
1224
|
+
const I = (ee.current && ee.current.ownerDocument ? ee.current.ownerDocument : document).elementFromPoint(y.clientX, y.clientY), $ = ee.current;
|
|
1222
1225
|
if (!I || !I.parentElement || !$)
|
|
1223
1226
|
return;
|
|
1224
1227
|
const q = $.parentElement, U = $.firstElementChild;
|
|
1225
1228
|
if (!q || !U)
|
|
1226
1229
|
return;
|
|
1227
|
-
const
|
|
1228
|
-
if (
|
|
1229
|
-
const
|
|
1230
|
-
|
|
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;
|
|
1231
1234
|
}
|
|
1232
1235
|
},
|
|
1233
1236
|
[]
|
|
1234
|
-
),
|
|
1237
|
+
), De = t.useCallback(
|
|
1235
1238
|
(y) => {
|
|
1236
|
-
const P =
|
|
1239
|
+
const P = ee.current;
|
|
1237
1240
|
if (!P)
|
|
1238
1241
|
return;
|
|
1239
1242
|
const I = P.firstElementChild;
|
|
1240
1243
|
if (!I)
|
|
1241
1244
|
return;
|
|
1242
|
-
const $ = I.scrollTop, q = I.scrollLeft, U = y.clientX -
|
|
1243
|
-
Math.abs(
|
|
1244
|
-
startX:
|
|
1245
|
-
startY:
|
|
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,
|
|
1246
1249
|
endX: U,
|
|
1247
|
-
endY:
|
|
1250
|
+
endY: ce
|
|
1248
1251
|
});
|
|
1249
1252
|
},
|
|
1250
1253
|
[]
|
|
1251
|
-
),
|
|
1254
|
+
), pa = t.useCallback(
|
|
1252
1255
|
(y) => {
|
|
1253
|
-
const I = (
|
|
1256
|
+
const I = (ee.current && ee.current.ownerDocument ? ee.current.ownerDocument : document).elementFromPoint(y.clientX, y.clientY);
|
|
1254
1257
|
if (!I || !I.parentElement)
|
|
1255
1258
|
return;
|
|
1256
1259
|
const $ = I.parentElement.getAttribute(We), q = I.getAttribute(Ge);
|
|
1257
|
-
if (q && $ !==
|
|
1260
|
+
if (q && $ !== ue.current && G) {
|
|
1258
1261
|
let U;
|
|
1259
|
-
|
|
1260
|
-
fromId:
|
|
1262
|
+
ve.current === "start" ? U = q === "start" ? 3 : 2 : U = q === "start" ? 1 : 0, G({
|
|
1263
|
+
fromId: ue.current,
|
|
1261
1264
|
toId: $,
|
|
1262
1265
|
type: U
|
|
1263
1266
|
});
|
|
1264
1267
|
}
|
|
1265
|
-
|
|
1268
|
+
fe.current = 0, pe.current = 0, Ce.current = 0, ke.current = 0, ue.current = null, ve.current = null, Te(null);
|
|
1266
1269
|
},
|
|
1267
|
-
[G,
|
|
1270
|
+
[G, Te]
|
|
1268
1271
|
);
|
|
1269
1272
|
return /* @__PURE__ */ t.createElement(
|
|
1270
1273
|
Tn,
|
|
1271
1274
|
{
|
|
1272
1275
|
tasksStore: [Qe, et],
|
|
1273
|
-
timelineWidth:
|
|
1276
|
+
timelineWidth: Ee,
|
|
1274
1277
|
dependencyDrag: {
|
|
1275
1278
|
isEnabled: !!G,
|
|
1276
|
-
draggedId:
|
|
1277
|
-
onDependencyHandlePress:
|
|
1278
|
-
onDependencyHandleDrag:
|
|
1279
|
-
onDependencyHandleRelease:
|
|
1279
|
+
draggedId: ue.current,
|
|
1280
|
+
onDependencyHandlePress: tt,
|
|
1281
|
+
onDependencyHandleDrag: De,
|
|
1282
|
+
onDependencyHandleRelease: pa
|
|
1280
1283
|
}
|
|
1281
1284
|
},
|
|
1282
|
-
/* @__PURE__ */ t.createElement("div", { className: "k-gantt-content", ref:
|
|
1285
|
+
/* @__PURE__ */ t.createElement("div", { className: "k-gantt-content", ref: ee, style: { height: `calc(100% - ${_}px)` } }, /* @__PURE__ */ t.createElement(
|
|
1283
1286
|
zt,
|
|
1284
1287
|
{
|
|
1288
|
+
treelistId: F.current,
|
|
1285
1289
|
ref: W,
|
|
1286
1290
|
extendedColumns: je,
|
|
1287
1291
|
columnsMap: Je,
|
|
1288
1292
|
dataItemKey: w.id,
|
|
1289
1293
|
data: T,
|
|
1290
|
-
idPrefix:
|
|
1294
|
+
idPrefix: ye.current,
|
|
1291
1295
|
navigatable: C,
|
|
1292
1296
|
expandField: w.isExpanded,
|
|
1293
1297
|
subItemsField: w.children,
|
|
@@ -1295,13 +1299,13 @@ const Fe = t.forwardRef((e, a) => {
|
|
|
1295
1299
|
selectedField: w.isSelected,
|
|
1296
1300
|
onDataStateChange: L,
|
|
1297
1301
|
onSortChange: V,
|
|
1298
|
-
onFilterChange:
|
|
1302
|
+
onFilterChange: N,
|
|
1299
1303
|
onExpandChange: z,
|
|
1300
1304
|
onRowClick: J,
|
|
1301
|
-
onRowDoubleClick:
|
|
1305
|
+
onRowDoubleClick: b,
|
|
1302
1306
|
onRowContextMenu: X,
|
|
1303
|
-
onColumnResize:
|
|
1304
|
-
onColumnReorder:
|
|
1307
|
+
onColumnResize: be,
|
|
1308
|
+
onColumnReorder: Re,
|
|
1305
1309
|
onColumnMenuFilterChange: x,
|
|
1306
1310
|
onKeyDown: B,
|
|
1307
1311
|
onSelectionChange: E,
|
|
@@ -1318,13 +1322,13 @@ const Fe = t.forwardRef((e, a) => {
|
|
|
1318
1322
|
columnMenu: p,
|
|
1319
1323
|
row: f,
|
|
1320
1324
|
selectable: v,
|
|
1321
|
-
afterContent: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("svg", { className: "k-gantt-dependencies-svg", ref: O, style: { left: 0, top: 0 } },
|
|
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)
|
|
1322
1326
|
}
|
|
1323
1327
|
))
|
|
1324
1328
|
);
|
|
1325
1329
|
});
|
|
1326
1330
|
Fe.displayName = "KendoReactGanttBaseView";
|
|
1327
|
-
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",
|
|
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 = {
|
|
1328
1332
|
[lt]: "Week",
|
|
1329
1333
|
[it]: "Day",
|
|
1330
1334
|
[ct]: "Month",
|
|
@@ -1351,7 +1355,7 @@ const lt = "gantt.weekViewTitle", it = "gantt.dayViewTitle", ct = "gantt.monthVi
|
|
|
1351
1355
|
[Pn]: "Is after",
|
|
1352
1356
|
[_n]: "Is before",
|
|
1353
1357
|
[Kn]: "Is before or equal to",
|
|
1354
|
-
[
|
|
1358
|
+
[jo]: "No records available",
|
|
1355
1359
|
[Bn]: "Save",
|
|
1356
1360
|
[Gt]: "Cancel",
|
|
1357
1361
|
[$n]: "Task",
|
|
@@ -1399,8 +1403,8 @@ const lt = "gantt.weekViewTitle", it = "gantt.dayViewTitle", ct = "gantt.monthVi
|
|
|
1399
1403
|
timelineHeaderCell: r
|
|
1400
1404
|
}
|
|
1401
1405
|
);
|
|
1402
|
-
}),
|
|
1403
|
-
const r =
|
|
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);
|
|
1404
1408
|
return {
|
|
1405
1409
|
start: new Date(m.getTime()),
|
|
1406
1410
|
end: new Date(g.getTime()),
|
|
@@ -1409,8 +1413,8 @@ const lt = "gantt.weekViewTitle", it = "gantt.dayViewTitle", ct = "gantt.monthVi
|
|
|
1409
1413
|
};
|
|
1410
1414
|
}, Ae = {
|
|
1411
1415
|
name: "week",
|
|
1412
|
-
dateRange:
|
|
1413
|
-
title: (e) => e.toLanguageString(lt,
|
|
1416
|
+
dateRange: Zo,
|
|
1417
|
+
title: (e) => e.toLanguageString(lt, ae[lt]),
|
|
1414
1418
|
slotWidth: Ie,
|
|
1415
1419
|
workWeekStart: 1,
|
|
1416
1420
|
workWeekEnd: 5,
|
|
@@ -1429,7 +1433,7 @@ $e.propTypes = {
|
|
|
1429
1433
|
workDayEnd: i.string
|
|
1430
1434
|
};
|
|
1431
1435
|
$e.displayName = "KendoReactGanttWeekView";
|
|
1432
|
-
const
|
|
1436
|
+
const Jo = (e, a, n) => {
|
|
1433
1437
|
const [o, r] = t.useState(a || e), l = t.useCallback(
|
|
1434
1438
|
(s, c) => {
|
|
1435
1439
|
r(s), n && n.call(void 0, { ...c, value: s });
|
|
@@ -1438,7 +1442,7 @@ const Zo = (e, a, n) => {
|
|
|
1438
1442
|
);
|
|
1439
1443
|
return [a !== void 0 ? a : o, l];
|
|
1440
1444
|
}, ra = (e) => {
|
|
1441
|
-
const [a, n] = Dn(), o =
|
|
1445
|
+
const [a, n] = Dn(), o = oe(), r = t.useMemo(
|
|
1442
1446
|
() => typeof e.view.title == "function" ? e.view.title.call(void 0, o) : e.view.title,
|
|
1443
1447
|
[e.view.title, o]
|
|
1444
1448
|
), l = t.useCallback(
|
|
@@ -1462,13 +1466,13 @@ const Zo = (e, a, n) => {
|
|
|
1462
1466
|
};
|
|
1463
1467
|
ra.displayName = "KendoReactGanttViewSelectorItem";
|
|
1464
1468
|
const la = t.forwardRef(() => {
|
|
1465
|
-
const e =
|
|
1469
|
+
const e = _o(), [a, n] = Dn(), o = e.find((s) => s.props.name === a), r = oe(), l = t.useCallback(
|
|
1466
1470
|
(s) => {
|
|
1467
1471
|
n && (s.syntheticEvent.preventDefault(), n(s.item.name));
|
|
1468
1472
|
},
|
|
1469
1473
|
[n]
|
|
1470
1474
|
);
|
|
1471
|
-
return /* @__PURE__ */ t.createElement("div", { className: "k-gantt-views-wrapper" }, /* @__PURE__ */ t.createElement(
|
|
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(
|
|
1472
1476
|
on,
|
|
1473
1477
|
{
|
|
1474
1478
|
className: "k-views-dropdown",
|
|
@@ -1480,7 +1484,7 @@ const la = t.forwardRef(() => {
|
|
|
1480
1484
|
selected: s.props.name === a,
|
|
1481
1485
|
title: typeof s.props.title == "function" ? s.props.title.call(void 0, r) : s.props.title
|
|
1482
1486
|
})),
|
|
1483
|
-
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:
|
|
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 }))
|
|
1484
1488
|
}
|
|
1485
1489
|
));
|
|
1486
1490
|
});
|
|
@@ -1491,12 +1495,12 @@ const ia = t.forwardRef((e, a) => {
|
|
|
1491
1495
|
...o
|
|
1492
1496
|
} = e, r = t.useRef(null);
|
|
1493
1497
|
return t.useImperativeHandle(a, () => ({ element: r.current, props: e })), /* @__PURE__ */ t.createElement(
|
|
1494
|
-
|
|
1498
|
+
co,
|
|
1495
1499
|
{
|
|
1496
1500
|
ref: (l) => {
|
|
1497
1501
|
l && (r.current = l.element);
|
|
1498
1502
|
},
|
|
1499
|
-
className:
|
|
1503
|
+
className: de("k-gantt-views", n),
|
|
1500
1504
|
...o
|
|
1501
1505
|
},
|
|
1502
1506
|
e.children
|
|
@@ -1509,9 +1513,9 @@ const ca = t.forwardRef((e, a) => {
|
|
|
1509
1513
|
...o
|
|
1510
1514
|
} = e, r = t.useRef(null), l = t.useRef(null);
|
|
1511
1515
|
t.useImperativeHandle(l, () => ({ element: r.current, props: e })), t.useImperativeHandle(a, () => l.current);
|
|
1512
|
-
const s = t.useMemo(() =>
|
|
1516
|
+
const s = t.useMemo(() => de("k-gantt-toolbar k-gantt-header", n), [n]);
|
|
1513
1517
|
return /* @__PURE__ */ t.createElement(
|
|
1514
|
-
|
|
1518
|
+
uo,
|
|
1515
1519
|
{
|
|
1516
1520
|
ref: (c) => {
|
|
1517
1521
|
c && (r.current = c.element);
|
|
@@ -1523,15 +1527,15 @@ const ca = t.forwardRef((e, a) => {
|
|
|
1523
1527
|
);
|
|
1524
1528
|
});
|
|
1525
1529
|
ca.displayName = "KendoReactGanttToolbar";
|
|
1526
|
-
const
|
|
1530
|
+
const Zt = {
|
|
1527
1531
|
name: "@progress/kendo-react-gantt",
|
|
1528
1532
|
productName: "KendoReact",
|
|
1529
1533
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
1530
|
-
publishDate:
|
|
1534
|
+
publishDate: 1702314381,
|
|
1531
1535
|
version: "",
|
|
1532
1536
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
1533
1537
|
}, da = t.forwardRef((e, a) => {
|
|
1534
|
-
const n =
|
|
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(
|
|
1535
1539
|
(u) => {
|
|
1536
1540
|
u.syntheticEvent.preventDefault();
|
|
1537
1541
|
const h = u.item && u.item.direction ? u.item.direction : "none";
|
|
@@ -1551,7 +1555,7 @@ const jt = {
|
|
|
1551
1555
|
});
|
|
1552
1556
|
},
|
|
1553
1557
|
[e.onClick]
|
|
1554
|
-
), d = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(mt, { name: "plus", icon:
|
|
1558
|
+
), d = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(mt, { name: "plus", icon: lo }), r);
|
|
1555
1559
|
return e.selectedTask ? /* @__PURE__ */ t.createElement(
|
|
1556
1560
|
on,
|
|
1557
1561
|
{
|
|
@@ -1570,8 +1574,8 @@ const jt = {
|
|
|
1570
1574
|
});
|
|
1571
1575
|
da.displayName = "KendoReactGanttAddButton";
|
|
1572
1576
|
const Wt = t.forwardRef((e, a) => {
|
|
1573
|
-
|
|
1574
|
-
const n =
|
|
1577
|
+
ba(Zt);
|
|
1578
|
+
const n = Ra(Zt), {
|
|
1575
1579
|
columns: o = Se.columns,
|
|
1576
1580
|
taskData: r = Se.taskData,
|
|
1577
1581
|
dependencyData: l = Se.dependencyData,
|
|
@@ -1588,72 +1592,72 @@ const Wt = t.forwardRef((e, a) => {
|
|
|
1588
1592
|
columnMenuFilter: v,
|
|
1589
1593
|
columnMenu: L,
|
|
1590
1594
|
navigatable: V,
|
|
1591
|
-
toolbar:
|
|
1595
|
+
toolbar: N,
|
|
1592
1596
|
row: x,
|
|
1593
1597
|
selectable: z
|
|
1594
|
-
} = e, J = xe(), { fields:
|
|
1595
|
-
|
|
1596
|
-
[
|
|
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]
|
|
1597
1601
|
), j = t.useRef(null), G = t.useRef(null), B = t.useRef(null), E = t.useRef(null), H = t.useRef(null), Q = t.useCallback(
|
|
1598
1602
|
(k) => {
|
|
1599
|
-
const
|
|
1600
|
-
(!G.current ||
|
|
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);
|
|
1601
1605
|
},
|
|
1602
|
-
[
|
|
1606
|
+
[b.start, b.end]
|
|
1603
1607
|
), _ = t.useMemo(
|
|
1604
|
-
() => (G.current = null, B.current = null, E.current = null,
|
|
1608
|
+
() => (G.current = null, B.current = null, E.current = null, oo(r, A, Q)),
|
|
1605
1609
|
[r, A]
|
|
1606
1610
|
);
|
|
1607
|
-
(!G.current || !B.current) && (G.current = new Date(
|
|
1611
|
+
(!G.current || !B.current) && (G.current = new Date(Yt), B.current = new Date(Yt));
|
|
1608
1612
|
const w = t.Children.toArray(
|
|
1609
1613
|
e.children || [/* @__PURE__ */ t.createElement($e, { key: "week", firstSlotRangeRef: H })]
|
|
1610
1614
|
), [
|
|
1611
1615
|
Z,
|
|
1612
1616
|
T
|
|
1613
|
-
] =
|
|
1617
|
+
] = Jo(
|
|
1614
1618
|
e.defaultView || w[0].props.name,
|
|
1615
1619
|
e.view,
|
|
1616
1620
|
e.onViewChange
|
|
1617
|
-
),
|
|
1621
|
+
), S = w.find((k) => k.props.name === Z) || w[0], K = typeof S.props.dateRange == "function" ? S.props.dateRange.call(void 0, {
|
|
1618
1622
|
intl: J,
|
|
1619
1623
|
tasksStart: G.current,
|
|
1620
1624
|
tasksEnd: B.current,
|
|
1621
1625
|
timezone: g
|
|
1622
|
-
}) :
|
|
1626
|
+
}) : S.props.dateRange, Y = t.useRef(null), [W, O] = t.useState(0);
|
|
1623
1627
|
t.useLayoutEffect(
|
|
1624
1628
|
() => {
|
|
1625
1629
|
Y.current && O(Y.current.element.offsetHeight);
|
|
1626
1630
|
},
|
|
1627
1631
|
[]
|
|
1628
1632
|
);
|
|
1629
|
-
const
|
|
1633
|
+
const he = t.useCallback(
|
|
1630
1634
|
(k) => {
|
|
1631
1635
|
j.current && j.current.scrollIntoView(k);
|
|
1632
1636
|
},
|
|
1633
1637
|
[]
|
|
1634
|
-
),
|
|
1635
|
-
t.useImperativeHandle(
|
|
1636
|
-
const
|
|
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(
|
|
1637
1641
|
(k) => {
|
|
1638
1642
|
e.onDataStateChange && e.onDataStateChange.call(
|
|
1639
1643
|
void 0,
|
|
1640
|
-
{ ...k, target:
|
|
1644
|
+
{ ...k, target: F.current }
|
|
1641
1645
|
);
|
|
1642
1646
|
},
|
|
1643
1647
|
[e.onDataStateChange]
|
|
1644
|
-
),
|
|
1648
|
+
), Le = t.useCallback(
|
|
1645
1649
|
(k) => {
|
|
1646
1650
|
e.onSortChange && e.onSortChange.call(
|
|
1647
1651
|
void 0,
|
|
1648
|
-
{ ...k, target:
|
|
1652
|
+
{ ...k, target: F.current }
|
|
1649
1653
|
);
|
|
1650
1654
|
},
|
|
1651
1655
|
[e.onSortChange]
|
|
1652
|
-
),
|
|
1656
|
+
), Ye = t.useCallback(
|
|
1653
1657
|
(k) => {
|
|
1654
1658
|
e.onKeyDown && e.onKeyDown.call(
|
|
1655
1659
|
void 0,
|
|
1656
|
-
{ ...k, target:
|
|
1660
|
+
{ ...k, target: F.current }
|
|
1657
1661
|
);
|
|
1658
1662
|
},
|
|
1659
1663
|
[e.onKeyDown]
|
|
@@ -1661,7 +1665,7 @@ const Wt = t.forwardRef((e, a) => {
|
|
|
1661
1665
|
(k) => {
|
|
1662
1666
|
e.onSelectionChange && e.onSelectionChange.call(
|
|
1663
1667
|
void 0,
|
|
1664
|
-
{ ...k, target:
|
|
1668
|
+
{ ...k, target: F.current }
|
|
1665
1669
|
);
|
|
1666
1670
|
},
|
|
1667
1671
|
[e.onSelectionChange]
|
|
@@ -1669,7 +1673,7 @@ const Wt = t.forwardRef((e, a) => {
|
|
|
1669
1673
|
(k) => {
|
|
1670
1674
|
e.onHeaderSelectionChange && e.onHeaderSelectionChange.call(
|
|
1671
1675
|
void 0,
|
|
1672
|
-
{ ...k, target:
|
|
1676
|
+
{ ...k, target: F.current }
|
|
1673
1677
|
);
|
|
1674
1678
|
},
|
|
1675
1679
|
[e.onHeaderSelectionChange]
|
|
@@ -1677,33 +1681,33 @@ const Wt = t.forwardRef((e, a) => {
|
|
|
1677
1681
|
(k) => {
|
|
1678
1682
|
e.onFilterChange && e.onFilterChange.call(
|
|
1679
1683
|
void 0,
|
|
1680
|
-
{ ...k, target:
|
|
1684
|
+
{ ...k, target: F.current }
|
|
1681
1685
|
);
|
|
1682
1686
|
},
|
|
1683
1687
|
[e.onFilterChange]
|
|
1684
|
-
),
|
|
1688
|
+
), ke = t.useCallback(
|
|
1685
1689
|
(k) => {
|
|
1686
1690
|
e.onColumnMenuFilterChange && e.onColumnMenuFilterChange.call(
|
|
1687
1691
|
void 0,
|
|
1688
|
-
{ ...k, target:
|
|
1692
|
+
{ ...k, target: F.current }
|
|
1689
1693
|
);
|
|
1690
1694
|
},
|
|
1691
1695
|
[e.onColumnMenuFilterChange]
|
|
1692
|
-
),
|
|
1696
|
+
), ue = t.useCallback(
|
|
1693
1697
|
(k) => {
|
|
1694
1698
|
e.onExpandChange && e.onExpandChange.call(
|
|
1695
1699
|
void 0,
|
|
1696
|
-
{ ...k, target:
|
|
1700
|
+
{ ...k, target: F.current }
|
|
1697
1701
|
);
|
|
1698
1702
|
},
|
|
1699
1703
|
[e.onExpandChange]
|
|
1700
|
-
),
|
|
1704
|
+
), ve = t.useCallback(
|
|
1701
1705
|
(k) => {
|
|
1702
1706
|
e.onAddClick && e.onAddClick.call(
|
|
1703
1707
|
void 0,
|
|
1704
1708
|
{
|
|
1705
1709
|
...k,
|
|
1706
|
-
target:
|
|
1710
|
+
target: F.current,
|
|
1707
1711
|
selectedDataItem: E.current,
|
|
1708
1712
|
slotStart: H.current && new Date(H.current.start.getTime()),
|
|
1709
1713
|
slotEnd: H.current && new Date(H.current.end.getTime())
|
|
@@ -1711,103 +1715,103 @@ const Wt = t.forwardRef((e, a) => {
|
|
|
1711
1715
|
);
|
|
1712
1716
|
},
|
|
1713
1717
|
[e.onAddClick]
|
|
1714
|
-
),
|
|
1718
|
+
), me = t.useCallback(
|
|
1715
1719
|
(k) => {
|
|
1716
1720
|
e.onColumnResize && e.onColumnResize.call(
|
|
1717
1721
|
void 0,
|
|
1718
1722
|
{
|
|
1719
1723
|
...k,
|
|
1720
|
-
target:
|
|
1724
|
+
target: F.current
|
|
1721
1725
|
}
|
|
1722
1726
|
);
|
|
1723
1727
|
},
|
|
1724
1728
|
[e.onColumnResize]
|
|
1725
|
-
),
|
|
1729
|
+
), Te = t.useCallback(
|
|
1726
1730
|
(k) => {
|
|
1727
1731
|
e.onColumnReorder && e.onColumnReorder.call(
|
|
1728
1732
|
void 0,
|
|
1729
|
-
{ ...k, target:
|
|
1733
|
+
{ ...k, target: F.current }
|
|
1730
1734
|
);
|
|
1731
1735
|
},
|
|
1732
1736
|
[e.onColumnReorder]
|
|
1733
|
-
),
|
|
1737
|
+
), qe = t.useCallback(
|
|
1734
1738
|
(k) => {
|
|
1735
1739
|
e.onRowClick && e.onRowClick.call(
|
|
1736
1740
|
void 0,
|
|
1737
|
-
{ ...k, target:
|
|
1741
|
+
{ ...k, target: F.current }
|
|
1738
1742
|
);
|
|
1739
1743
|
},
|
|
1740
1744
|
[e.onRowClick]
|
|
1741
|
-
),
|
|
1745
|
+
), Xe = t.useCallback(
|
|
1742
1746
|
(k) => {
|
|
1743
1747
|
e.onRowDoubleClick && e.onRowDoubleClick.call(
|
|
1744
1748
|
void 0,
|
|
1745
|
-
{ ...k, target:
|
|
1749
|
+
{ ...k, target: F.current }
|
|
1746
1750
|
);
|
|
1747
1751
|
},
|
|
1748
1752
|
[e.onRowClick]
|
|
1749
|
-
),
|
|
1753
|
+
), Ee = t.useCallback(
|
|
1750
1754
|
(k) => {
|
|
1751
1755
|
e.onRowContextMenu && e.onRowContextMenu.call(
|
|
1752
1756
|
void 0,
|
|
1753
|
-
{ ...k, target:
|
|
1757
|
+
{ ...k, target: F.current }
|
|
1754
1758
|
);
|
|
1755
1759
|
},
|
|
1756
1760
|
[e.onRowClick]
|
|
1757
|
-
),
|
|
1761
|
+
), je = t.useCallback(
|
|
1758
1762
|
(k) => {
|
|
1759
1763
|
e.onTaskClick && e.onTaskClick.call(
|
|
1760
1764
|
void 0,
|
|
1761
|
-
{ ...k, target:
|
|
1765
|
+
{ ...k, target: F.current }
|
|
1762
1766
|
);
|
|
1763
1767
|
},
|
|
1764
1768
|
[e.onTaskClick]
|
|
1765
|
-
),
|
|
1769
|
+
), Ze = t.useCallback(
|
|
1766
1770
|
(k) => {
|
|
1767
1771
|
e.onTaskDoubleClick && e.onTaskDoubleClick.call(
|
|
1768
1772
|
void 0,
|
|
1769
|
-
{ ...k, target:
|
|
1773
|
+
{ ...k, target: F.current }
|
|
1770
1774
|
);
|
|
1771
1775
|
},
|
|
1772
1776
|
[e.onTaskDoubleClick]
|
|
1773
|
-
),
|
|
1777
|
+
), Je = t.useCallback(
|
|
1774
1778
|
(k) => {
|
|
1775
1779
|
e.onTaskContextMenu && e.onTaskContextMenu.call(
|
|
1776
1780
|
void 0,
|
|
1777
|
-
{ ...k, target:
|
|
1781
|
+
{ ...k, target: F.current }
|
|
1778
1782
|
);
|
|
1779
1783
|
},
|
|
1780
1784
|
[e.onTaskContextMenu]
|
|
1781
|
-
),
|
|
1785
|
+
), Qe = t.useCallback(
|
|
1782
1786
|
(k) => {
|
|
1783
1787
|
e.onTaskRemoveClick && e.onTaskRemoveClick.call(
|
|
1784
1788
|
void 0,
|
|
1785
|
-
{ ...k, target:
|
|
1789
|
+
{ ...k, target: F.current }
|
|
1786
1790
|
);
|
|
1787
1791
|
},
|
|
1788
1792
|
[e.onTaskRemoveClick]
|
|
1789
|
-
),
|
|
1793
|
+
), et = t.useCallback(
|
|
1790
1794
|
(k) => {
|
|
1791
1795
|
if (e.onDependencyCreate) {
|
|
1792
|
-
let
|
|
1793
|
-
const be = D(
|
|
1796
|
+
let se, ie;
|
|
1797
|
+
const be = D(b.id);
|
|
1794
1798
|
for (let Re = 0; Re < _.length; Re++) {
|
|
1795
|
-
const tt = _[Re],
|
|
1796
|
-
if (String(
|
|
1799
|
+
const tt = _[Re], De = be(tt.dataItem);
|
|
1800
|
+
if (String(De) === k.fromId && (se = De), String(De) === k.toId && (ie = De), se && ie)
|
|
1797
1801
|
break;
|
|
1798
1802
|
}
|
|
1799
1803
|
e.onDependencyCreate.call(
|
|
1800
1804
|
void 0,
|
|
1801
1805
|
{
|
|
1802
|
-
fromId:
|
|
1803
|
-
toId:
|
|
1804
|
-
target:
|
|
1806
|
+
fromId: se,
|
|
1807
|
+
toId: ie,
|
|
1808
|
+
target: F.current,
|
|
1805
1809
|
type: k.type
|
|
1806
1810
|
}
|
|
1807
1811
|
);
|
|
1808
1812
|
}
|
|
1809
1813
|
},
|
|
1810
|
-
[e.onDependencyCreate,
|
|
1814
|
+
[e.onDependencyCreate, b, _]
|
|
1811
1815
|
);
|
|
1812
1816
|
return /* @__PURE__ */ t.createElement(
|
|
1813
1817
|
yn,
|
|
@@ -1815,7 +1819,7 @@ const Wt = t.forwardRef((e, a) => {
|
|
|
1815
1819
|
dateRange: K,
|
|
1816
1820
|
taskData: _,
|
|
1817
1821
|
dependencyData: l,
|
|
1818
|
-
taskModelFields:
|
|
1822
|
+
taskModelFields: b,
|
|
1819
1823
|
dependencyModelFields: X,
|
|
1820
1824
|
views: w,
|
|
1821
1825
|
activeView: [Z, T],
|
|
@@ -1837,47 +1841,47 @@ const Wt = t.forwardRef((e, a) => {
|
|
|
1837
1841
|
selectable: z
|
|
1838
1842
|
},
|
|
1839
1843
|
events: {
|
|
1840
|
-
onDataStateChange:
|
|
1841
|
-
onSortChange:
|
|
1844
|
+
onDataStateChange: ee,
|
|
1845
|
+
onSortChange: Le,
|
|
1842
1846
|
onFilterChange: Ce,
|
|
1843
|
-
onColumnMenuFilterChange:
|
|
1844
|
-
onExpandChange:
|
|
1845
|
-
onRowClick:
|
|
1846
|
-
onRowDoubleClick:
|
|
1847
|
-
onRowContextMenu:
|
|
1848
|
-
onColumnResize:
|
|
1849
|
-
onColumnReorder:
|
|
1850
|
-
onDependencyCreate: e.onDependencyCreate &&
|
|
1851
|
-
onKeyDown:
|
|
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,
|
|
1852
1856
|
onSelectionChange: fe,
|
|
1853
1857
|
onHeaderSelectionChange: pe
|
|
1854
1858
|
},
|
|
1855
1859
|
taskEvents: {
|
|
1856
|
-
onTaskClick:
|
|
1857
|
-
onTaskDoubleClick:
|
|
1858
|
-
onTaskContextMenu:
|
|
1859
|
-
onTaskRemoveClick: e.onTaskRemoveClick &&
|
|
1860
|
+
onTaskClick: je,
|
|
1861
|
+
onTaskDoubleClick: Ze,
|
|
1862
|
+
onTaskContextMenu: Je,
|
|
1863
|
+
onTaskRemoveClick: e.onTaskRemoveClick && Qe
|
|
1860
1864
|
}
|
|
1861
1865
|
},
|
|
1862
1866
|
/* @__PURE__ */ t.createElement(
|
|
1863
1867
|
"div",
|
|
1864
1868
|
{
|
|
1865
|
-
ref:
|
|
1869
|
+
ref: ye,
|
|
1866
1870
|
role: "application",
|
|
1867
1871
|
style: s,
|
|
1868
|
-
className:
|
|
1872
|
+
className: de("k-gantt", c)
|
|
1869
1873
|
},
|
|
1870
|
-
/* @__PURE__ */ t.createElement(ca, { ref: Y },
|
|
1871
|
-
|
|
1872
|
-
|
|
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,
|
|
1873
1877
|
{
|
|
1874
|
-
key:
|
|
1878
|
+
key: S.props.name,
|
|
1875
1879
|
ref: j,
|
|
1876
|
-
...
|
|
1880
|
+
...S.props,
|
|
1877
1881
|
firstSlotRangeRef: H
|
|
1878
1882
|
}
|
|
1879
1883
|
),
|
|
1880
|
-
n && /* @__PURE__ */ t.createElement(
|
|
1884
|
+
n && /* @__PURE__ */ t.createElement(Sa, null)
|
|
1881
1885
|
)
|
|
1882
1886
|
);
|
|
1883
1887
|
}), Se = {
|
|
@@ -1953,21 +1957,21 @@ Wt.propTypes = {
|
|
|
1953
1957
|
Wt.defaultProps = Se;
|
|
1954
1958
|
Wt.displayName = "KendoReactGantt";
|
|
1955
1959
|
const Ot = t.forwardRef((e, a) => {
|
|
1956
|
-
const { slotWidth: n =
|
|
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(
|
|
1957
1961
|
(L) => {
|
|
1958
1962
|
g.current && g.current.scrollIntoView(L);
|
|
1959
1963
|
},
|
|
1960
1964
|
[]
|
|
1961
1965
|
);
|
|
1962
1966
|
t.useImperativeHandle(m, () => ({ scrollIntoView: d })), t.useImperativeHandle(a, () => m.current);
|
|
1963
|
-
const u = Me(), h = e.workWeekStart ||
|
|
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(
|
|
1964
1968
|
() => {
|
|
1965
1969
|
const L = gn({
|
|
1966
1970
|
workWeekStart: h,
|
|
1967
1971
|
workWeekEnd: p
|
|
1968
|
-
}), V = [],
|
|
1969
|
-
return
|
|
1970
|
-
const z =
|
|
1972
|
+
}), V = [], N = fn(u, { workDays: L, timezone: s }, c);
|
|
1973
|
+
return N.forEach((x) => {
|
|
1974
|
+
const z = Ho(
|
|
1971
1975
|
x.range,
|
|
1972
1976
|
{
|
|
1973
1977
|
workDayStart: C,
|
|
@@ -1978,7 +1982,7 @@ const Ot = t.forwardRef((e, a) => {
|
|
|
1978
1982
|
c
|
|
1979
1983
|
);
|
|
1980
1984
|
x.span = z.length, V.push.apply(V, z);
|
|
1981
|
-
}), r && V[0] && (r.current = V[0].range), [
|
|
1985
|
+
}), r && V[0] && (r.current = V[0].range), [N, V];
|
|
1982
1986
|
},
|
|
1983
1987
|
[s, u.start.getTime(), u.end.getTime(), c, h, p, C, f]
|
|
1984
1988
|
);
|
|
@@ -1991,8 +1995,8 @@ const Ot = t.forwardRef((e, a) => {
|
|
|
1991
1995
|
timelineHeaderCell: l
|
|
1992
1996
|
}
|
|
1993
1997
|
);
|
|
1994
|
-
}),
|
|
1995
|
-
const o =
|
|
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);
|
|
1996
2000
|
return {
|
|
1997
2001
|
// Sat May 31 2014 07:00:00 GMT+0300 (Eastern European Summer Time)
|
|
1998
2002
|
start: new Date(c.getTime()),
|
|
@@ -2001,10 +2005,10 @@ const Ot = t.forwardRef((e, a) => {
|
|
|
2001
2005
|
zonedStart: c,
|
|
2002
2006
|
zonedEnd: m
|
|
2003
2007
|
};
|
|
2004
|
-
},
|
|
2008
|
+
}, ge = {
|
|
2005
2009
|
name: "day",
|
|
2006
|
-
dateRange:
|
|
2007
|
-
title: (e) => e.toLanguageString(it,
|
|
2010
|
+
dateRange: Qo,
|
|
2011
|
+
title: (e) => e.toLanguageString(it, ae[it]),
|
|
2008
2012
|
slotWidth: Ie,
|
|
2009
2013
|
slotDuration: 60,
|
|
2010
2014
|
workWeekStart: 1,
|
|
@@ -2012,7 +2016,7 @@ const Ot = t.forwardRef((e, a) => {
|
|
|
2012
2016
|
workDayStart: "08:00",
|
|
2013
2017
|
workDayEnd: "17:00"
|
|
2014
2018
|
};
|
|
2015
|
-
Ot.defaultProps =
|
|
2019
|
+
Ot.defaultProps = ge;
|
|
2016
2020
|
Ot.propTypes = {
|
|
2017
2021
|
name: i.string,
|
|
2018
2022
|
dateRange: i.oneOfType([i.func, i.object]),
|
|
@@ -2056,8 +2060,8 @@ const Pt = t.forwardRef((e, a) => {
|
|
|
2056
2060
|
timelineHeaderCell: r
|
|
2057
2061
|
}
|
|
2058
2062
|
);
|
|
2059
|
-
}),
|
|
2060
|
-
const o =
|
|
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);
|
|
2061
2065
|
return {
|
|
2062
2066
|
start: new Date(c.getTime()),
|
|
2063
2067
|
end: new Date(m.getTime()),
|
|
@@ -2066,8 +2070,8 @@ const Pt = t.forwardRef((e, a) => {
|
|
|
2066
2070
|
};
|
|
2067
2071
|
}, ua = {
|
|
2068
2072
|
name: "month",
|
|
2069
|
-
dateRange:
|
|
2070
|
-
title: (e) => e.toLanguageString(ct,
|
|
2073
|
+
dateRange: es,
|
|
2074
|
+
title: (e) => e.toLanguageString(ct, ae[ct]),
|
|
2071
2075
|
slotWidth: Ie,
|
|
2072
2076
|
workWeekStart: 1,
|
|
2073
2077
|
workWeekEnd: 5,
|
|
@@ -2096,7 +2100,7 @@ const _t = t.forwardRef((e, a) => {
|
|
|
2096
2100
|
t.useImperativeHandle(c, () => ({ scrollIntoView: g })), t.useImperativeHandle(a, () => c.current);
|
|
2097
2101
|
const d = Me(), u = t.useMemo(
|
|
2098
2102
|
() => {
|
|
2099
|
-
const h =
|
|
2103
|
+
const h = Ao(d, { timezone: l }, s), p = [];
|
|
2100
2104
|
return h.forEach((C) => {
|
|
2101
2105
|
const f = Cn(
|
|
2102
2106
|
C.range,
|
|
@@ -2116,8 +2120,8 @@ const _t = t.forwardRef((e, a) => {
|
|
|
2116
2120
|
timelineHeaderCell: r
|
|
2117
2121
|
}
|
|
2118
2122
|
);
|
|
2119
|
-
}),
|
|
2120
|
-
const o =
|
|
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);
|
|
2121
2125
|
return {
|
|
2122
2126
|
start: new Date(c.getTime()),
|
|
2123
2127
|
end: new Date(m.getTime()),
|
|
@@ -2126,8 +2130,8 @@ const _t = t.forwardRef((e, a) => {
|
|
|
2126
2130
|
};
|
|
2127
2131
|
}, ma = {
|
|
2128
2132
|
name: "year",
|
|
2129
|
-
dateRange:
|
|
2130
|
-
title: (e) => e.toLanguageString(dt,
|
|
2133
|
+
dateRange: ts,
|
|
2134
|
+
title: (e) => e.toLanguageString(dt, ae[dt]),
|
|
2131
2135
|
slotWidth: Ie
|
|
2132
2136
|
};
|
|
2133
2137
|
_t.defaultProps = ma;
|
|
@@ -2138,7 +2142,7 @@ _t.propTypes = {
|
|
|
2138
2142
|
slotWidth: i.number
|
|
2139
2143
|
};
|
|
2140
2144
|
_t.displayName = "GanttYearView";
|
|
2141
|
-
const
|
|
2145
|
+
const ns = [
|
|
2142
2146
|
{ text: Nn, operator: "contains" },
|
|
2143
2147
|
{ text: Mn, operator: "doesnotcontain" },
|
|
2144
2148
|
{ text: Pe, operator: "eq" },
|
|
@@ -2149,7 +2153,7 @@ const ts = [
|
|
|
2149
2153
|
{ text: Be, operator: "isnotnull" },
|
|
2150
2154
|
{ text: Sn, operator: "isempty" },
|
|
2151
2155
|
{ text: xn, operator: "isnotempty" }
|
|
2152
|
-
],
|
|
2156
|
+
], as = [
|
|
2153
2157
|
{ text: Pe, operator: "eq" },
|
|
2154
2158
|
{ text: _e, operator: "neq" },
|
|
2155
2159
|
{ text: Ln, operator: "gte" },
|
|
@@ -2158,7 +2162,7 @@ const ts = [
|
|
|
2158
2162
|
{ text: Vn, operator: "lt" },
|
|
2159
2163
|
{ text: Ke, operator: "isnull" },
|
|
2160
2164
|
{ text: Be, operator: "isnotnull" }
|
|
2161
|
-
],
|
|
2165
|
+
], os = [
|
|
2162
2166
|
{ text: Pe, operator: "eq" },
|
|
2163
2167
|
{ text: _e, operator: "neq" },
|
|
2164
2168
|
{ text: On, operator: "gte" },
|
|
@@ -2167,91 +2171,91 @@ const ts = [
|
|
|
2167
2171
|
{ text: Kn, operator: "lte" },
|
|
2168
2172
|
{ text: Ke, operator: "isnull" },
|
|
2169
2173
|
{ text: Be, operator: "isnotnull" }
|
|
2170
|
-
],
|
|
2174
|
+
], ss = [
|
|
2171
2175
|
{ text: Wn, operator: "" },
|
|
2172
2176
|
{ text: zn, operator: !0 },
|
|
2173
2177
|
{ text: Gn, operator: !1 }
|
|
2174
2178
|
];
|
|
2175
2179
|
function Ue(e, a) {
|
|
2176
2180
|
return {
|
|
2177
|
-
clearButtonTitle: e.toLanguageString(ut,
|
|
2181
|
+
clearButtonTitle: e.toLanguageString(ut, ae[ut]),
|
|
2178
2182
|
operators: a.map((n) => ({
|
|
2179
|
-
text: e.toLanguageString(n.text,
|
|
2183
|
+
text: e.toLanguageString(n.text, ae[n.text]),
|
|
2180
2184
|
operator: n.operator
|
|
2181
2185
|
}))
|
|
2182
2186
|
};
|
|
2183
2187
|
}
|
|
2184
|
-
const
|
|
2188
|
+
const rs = (e) => {
|
|
2185
2189
|
const { operators: a, ...n } = e;
|
|
2186
2190
|
return /* @__PURE__ */ t.createElement(
|
|
2187
|
-
|
|
2191
|
+
Xa,
|
|
2188
2192
|
{
|
|
2189
2193
|
ariaLabel: "text filter",
|
|
2190
|
-
...Ue(
|
|
2194
|
+
...Ue(oe(), a || ns),
|
|
2191
2195
|
...n
|
|
2192
2196
|
}
|
|
2193
2197
|
);
|
|
2194
2198
|
};
|
|
2195
|
-
|
|
2196
|
-
const
|
|
2199
|
+
rs.displayName = "KendoReactGanttTextFilter";
|
|
2200
|
+
const ls = (e) => {
|
|
2197
2201
|
const { operators: a, ...n } = e;
|
|
2198
2202
|
return /* @__PURE__ */ t.createElement(
|
|
2199
|
-
|
|
2203
|
+
ja,
|
|
2200
2204
|
{
|
|
2201
2205
|
ariaLabel: "numeric filter",
|
|
2202
|
-
...Ue(
|
|
2206
|
+
...Ue(oe(), a || as),
|
|
2203
2207
|
...n
|
|
2204
2208
|
}
|
|
2205
2209
|
);
|
|
2206
2210
|
};
|
|
2207
|
-
|
|
2208
|
-
const
|
|
2211
|
+
ls.displayName = "KendoReactGanttNumericFilter";
|
|
2212
|
+
const is = (e) => {
|
|
2209
2213
|
const { operators: a, ...n } = e;
|
|
2210
2214
|
return /* @__PURE__ */ t.createElement(
|
|
2211
|
-
|
|
2215
|
+
Za,
|
|
2212
2216
|
{
|
|
2213
2217
|
ariaLabel: "boolean filter",
|
|
2214
|
-
...Ue(
|
|
2218
|
+
...Ue(oe(), a || ss),
|
|
2215
2219
|
...n
|
|
2216
2220
|
}
|
|
2217
2221
|
);
|
|
2218
2222
|
};
|
|
2219
|
-
|
|
2220
|
-
const
|
|
2223
|
+
is.displayName = "KendoReactGanttBooleanFilter";
|
|
2224
|
+
const cs = (e) => {
|
|
2221
2225
|
const { operators: a, ...n } = e;
|
|
2222
2226
|
return /* @__PURE__ */ t.createElement(
|
|
2223
|
-
|
|
2227
|
+
Ja,
|
|
2224
2228
|
{
|
|
2225
2229
|
ariaLabel: "date filter",
|
|
2226
|
-
...Ue(
|
|
2230
|
+
...Ue(oe(), a || os),
|
|
2227
2231
|
...n
|
|
2228
2232
|
}
|
|
2229
2233
|
);
|
|
2230
2234
|
};
|
|
2231
|
-
|
|
2232
|
-
const
|
|
2233
|
-
const { dependencyData: a, dependencyModelFields: n, defaultDataItem: o, fromId: r, toId: l, type: s } = e, c = a.map((h) => ({ ...h })), m =
|
|
2235
|
+
cs.displayName = "KendoReactGanttDateFilter";
|
|
2236
|
+
const Ls = (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 } : {};
|
|
2234
2238
|
return m(u, r), g(u, l), d(u, s), c.push(u), c;
|
|
2235
|
-
},
|
|
2236
|
-
const { defaultDataItem: a, selectedDataItem: n, direction: o, taskModelFields: r, dataTree: l, slotStart: s, slotEnd: c } = e, m = Et(l, r.children, (f) => ({ ...f })), g =
|
|
2239
|
+
}, Hs = (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);
|
|
2237
2241
|
if (!n || o === "none")
|
|
2238
2242
|
C || (g(p, s), d(p, c)), m.unshift(p);
|
|
2239
2243
|
else {
|
|
2240
2244
|
const f = [{
|
|
2241
2245
|
task: { [r.children]: m },
|
|
2242
2246
|
childrenIndex: 0
|
|
2243
|
-
}], v = D(r.id), L = D(r.children), V =
|
|
2247
|
+
}], v = D(r.id), L = D(r.children), V = te(r.children), N = v(n);
|
|
2244
2248
|
for (; f.length > 0; ) {
|
|
2245
|
-
const x = f[f.length - 1], z = x.task, J = v(z),
|
|
2246
|
-
if (J && J ===
|
|
2249
|
+
const x = f[f.length - 1], z = x.task, J = v(z), b = L(z);
|
|
2250
|
+
if (J && J === N)
|
|
2247
2251
|
break;
|
|
2248
|
-
|
|
2249
|
-
task:
|
|
2252
|
+
b && b.length && b.length > x.childrenIndex ? (f.push({
|
|
2253
|
+
task: b[x.childrenIndex],
|
|
2250
2254
|
childrenIndex: 0
|
|
2251
2255
|
}), x.childrenIndex++) : f.pop();
|
|
2252
2256
|
}
|
|
2253
2257
|
if (f.length > 1) {
|
|
2254
|
-
const x = f[f.length - 1].task, z = f[f.length - 2].childrenIndex,
|
|
2258
|
+
const x = f[f.length - 1].task, z = f[f.length - 2].childrenIndex, b = f[f.length - 2].task, X = L(b);
|
|
2255
2259
|
switch (o) {
|
|
2256
2260
|
case "child": {
|
|
2257
2261
|
let A = L(x);
|
|
@@ -2259,18 +2263,18 @@ const Fs = (e) => {
|
|
|
2259
2263
|
break;
|
|
2260
2264
|
}
|
|
2261
2265
|
case "above": {
|
|
2262
|
-
u(
|
|
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);
|
|
2263
2267
|
break;
|
|
2264
2268
|
}
|
|
2265
2269
|
case "below": {
|
|
2266
|
-
u(
|
|
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);
|
|
2267
2271
|
break;
|
|
2268
2272
|
}
|
|
2269
2273
|
}
|
|
2270
2274
|
}
|
|
2271
2275
|
}
|
|
2272
2276
|
return m;
|
|
2273
|
-
},
|
|
2277
|
+
}, As = (e) => {
|
|
2274
2278
|
const { updatedDataItem: a, taskModelFields: n, dataTree: o } = e, r = D(n.id), l = D(n.children), s = r(a);
|
|
2275
2279
|
let c;
|
|
2276
2280
|
const m = Et(o, n.children, (d) => r(d) === s ? (c = d, { ...a }) : { ...d });
|
|
@@ -2293,12 +2297,12 @@ const Fs = (e) => {
|
|
|
2293
2297
|
if (d(c).getTime() !== d(a).getTime()) {
|
|
2294
2298
|
ga(g.map((C) => C.task), n);
|
|
2295
2299
|
const p = d(a).getTime() - d(c).getTime();
|
|
2296
|
-
|
|
2300
|
+
ds(l(a), n, p);
|
|
2297
2301
|
}
|
|
2298
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);
|
|
2299
2303
|
}
|
|
2300
2304
|
return m;
|
|
2301
|
-
},
|
|
2305
|
+
}, Vs = (e) => {
|
|
2302
2306
|
const { removedDataItem: a, taskModelFields: n, dataTree: o } = e, r = Et(o, n.children, (g) => ({ ...g }));
|
|
2303
2307
|
let l = [{
|
|
2304
2308
|
task: { [n.children]: r },
|
|
@@ -2324,7 +2328,7 @@ const Fs = (e) => {
|
|
|
2324
2328
|
}, ga = (e, a) => {
|
|
2325
2329
|
if (!e.length)
|
|
2326
2330
|
return;
|
|
2327
|
-
const n = D(a.children), o = D(a.start), r =
|
|
2331
|
+
const n = D(a.children), o = D(a.start), r = te(a.start);
|
|
2328
2332
|
for (let l = e.length - 1; l >= 0; l--) {
|
|
2329
2333
|
const s = e[l], c = n(s);
|
|
2330
2334
|
if (c && c.length) {
|
|
@@ -2338,7 +2342,7 @@ const Fs = (e) => {
|
|
|
2338
2342
|
}, ha = (e, a) => {
|
|
2339
2343
|
if (!e.length)
|
|
2340
2344
|
return;
|
|
2341
|
-
const n = D(a.children), o = D(a.end), r =
|
|
2345
|
+
const n = D(a.children), o = D(a.end), r = te(a.end);
|
|
2342
2346
|
for (let l = e.length - 1; l >= 0; l--) {
|
|
2343
2347
|
const s = e[l], c = n(s);
|
|
2344
2348
|
if (c && c.length) {
|
|
@@ -2352,7 +2356,7 @@ const Fs = (e) => {
|
|
|
2352
2356
|
}, fa = (e, a) => {
|
|
2353
2357
|
if (!e.length)
|
|
2354
2358
|
return;
|
|
2355
|
-
const n = D(a.children), o = D(a.percentComplete), r =
|
|
2359
|
+
const n = D(a.children), o = D(a.percentComplete), r = te(a.percentComplete), l = ({ avg: s, n: c }, m) => ({
|
|
2356
2360
|
avg: ((o(m) || 0) + c * s) / (c + 1),
|
|
2357
2361
|
n: c + 1
|
|
2358
2362
|
});
|
|
@@ -2363,10 +2367,10 @@ const Fs = (e) => {
|
|
|
2363
2367
|
r(c, g);
|
|
2364
2368
|
}
|
|
2365
2369
|
}
|
|
2366
|
-
},
|
|
2370
|
+
}, ds = (e, a, n) => {
|
|
2367
2371
|
if (!e)
|
|
2368
2372
|
return;
|
|
2369
|
-
const o = D(a.children), r = D(a.start), l =
|
|
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 }));
|
|
2370
2374
|
for (; m.length > 0; ) {
|
|
2371
2375
|
const g = m[m.length - 1], d = g.task, u = o(d);
|
|
2372
2376
|
u && u.length && u.length > g.childrenIndex ? (m.push({
|
|
@@ -2374,10 +2378,10 @@ const Fs = (e) => {
|
|
|
2374
2378
|
childrenIndex: 0
|
|
2375
2379
|
}), g.childrenIndex++) : (m.pop(), l(d, new Date(r(d).getTime() + n)), c(d, new Date(s(d).getTime() + n)));
|
|
2376
2380
|
}
|
|
2377
|
-
},
|
|
2381
|
+
}, us = (e) => {
|
|
2378
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` : "";
|
|
2379
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(
|
|
2380
|
-
|
|
2384
|
+
fo,
|
|
2381
2385
|
{
|
|
2382
2386
|
valid: l,
|
|
2383
2387
|
type: m,
|
|
@@ -2387,10 +2391,10 @@ const Fs = (e) => {
|
|
|
2387
2391
|
...d
|
|
2388
2392
|
}
|
|
2389
2393
|
), h && /* @__PURE__ */ t.createElement(Ct, { id: p }, c), u && /* @__PURE__ */ t.createElement(kt, { id: C }, a)));
|
|
2390
|
-
},
|
|
2394
|
+
}, Jt = (e) => {
|
|
2391
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` : "";
|
|
2392
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(
|
|
2393
|
-
|
|
2397
|
+
Co,
|
|
2394
2398
|
{
|
|
2395
2399
|
ariaLabelledBy: C,
|
|
2396
2400
|
ariaDescribedBy: `${h} ${p}`,
|
|
@@ -2400,10 +2404,10 @@ const Fs = (e) => {
|
|
|
2400
2404
|
...g
|
|
2401
2405
|
}
|
|
2402
2406
|
), u && /* @__PURE__ */ t.createElement(Ct, { id: h }, c), d && /* @__PURE__ */ t.createElement(kt, { id: p }, a)));
|
|
2403
|
-
},
|
|
2407
|
+
}, ms = (e) => {
|
|
2404
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` : "";
|
|
2405
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(
|
|
2406
|
-
|
|
2410
|
+
po,
|
|
2407
2411
|
{
|
|
2408
2412
|
ariaDescribedBy: `${u} ${h}`,
|
|
2409
2413
|
valid: l,
|
|
@@ -2412,8 +2416,8 @@ const Fs = (e) => {
|
|
|
2412
2416
|
...m
|
|
2413
2417
|
}
|
|
2414
2418
|
), d && /* @__PURE__ */ t.createElement(Ct, { id: u }, c), g && /* @__PURE__ */ t.createElement(kt, { id: h }, a)));
|
|
2415
|
-
},
|
|
2416
|
-
const e = Tt(), 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(
|
|
2417
2421
|
(f) => f || f === 0 ? void 0 : c,
|
|
2418
2422
|
[c]
|
|
2419
2423
|
), u = t.useCallback(
|
|
@@ -2429,13 +2433,13 @@ const Fs = (e) => {
|
|
|
2429
2433
|
() => [d, h],
|
|
2430
2434
|
[d, h]
|
|
2431
2435
|
);
|
|
2432
|
-
return /* @__PURE__ */ t.createElement(
|
|
2436
|
+
return /* @__PURE__ */ t.createElement(go, { style: { width: 400 }, horizontal: !0 }, /* @__PURE__ */ t.createElement(
|
|
2433
2437
|
He,
|
|
2434
2438
|
{
|
|
2435
2439
|
id: `${e.title}_gantteditor`,
|
|
2436
2440
|
name: e.title,
|
|
2437
2441
|
label: o,
|
|
2438
|
-
component:
|
|
2442
|
+
component: us,
|
|
2439
2443
|
validator: d
|
|
2440
2444
|
}
|
|
2441
2445
|
), /* @__PURE__ */ t.createElement(
|
|
@@ -2444,7 +2448,7 @@ const Fs = (e) => {
|
|
|
2444
2448
|
id: `${e.start}_gantteditor`,
|
|
2445
2449
|
name: e.start,
|
|
2446
2450
|
label: r,
|
|
2447
|
-
component:
|
|
2451
|
+
component: Jt,
|
|
2448
2452
|
validator: p
|
|
2449
2453
|
}
|
|
2450
2454
|
), /* @__PURE__ */ t.createElement(
|
|
@@ -2453,7 +2457,7 @@ const Fs = (e) => {
|
|
|
2453
2457
|
id: `${e.end}_gantteditor`,
|
|
2454
2458
|
name: e.end,
|
|
2455
2459
|
label: l,
|
|
2456
|
-
component:
|
|
2460
|
+
component: Jt,
|
|
2457
2461
|
validator: C
|
|
2458
2462
|
}
|
|
2459
2463
|
), /* @__PURE__ */ t.createElement(
|
|
@@ -2463,13 +2467,13 @@ const Fs = (e) => {
|
|
|
2463
2467
|
name: e.percentComplete,
|
|
2464
2468
|
format: "p",
|
|
2465
2469
|
label: s,
|
|
2466
|
-
component:
|
|
2470
|
+
component: ms,
|
|
2467
2471
|
step: 0.01,
|
|
2468
2472
|
validator: d
|
|
2469
2473
|
}
|
|
2470
2474
|
));
|
|
2471
|
-
},
|
|
2472
|
-
const { onCancel: a, onClose: n, onSubmit: o, ...r } = e, l =
|
|
2475
|
+
}, zs = (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(
|
|
2473
2477
|
(C) => {
|
|
2474
2478
|
if (a) {
|
|
2475
2479
|
const f = { syntheticEvent: C, nativeEvent: C.nativeEvent, dataItem: e.dataItem };
|
|
@@ -2494,7 +2498,7 @@ const Fs = (e) => {
|
|
|
2494
2498
|
},
|
|
2495
2499
|
[o]
|
|
2496
2500
|
), p = /* @__PURE__ */ t.createElement(
|
|
2497
|
-
|
|
2501
|
+
ho,
|
|
2498
2502
|
{
|
|
2499
2503
|
initialValues: e.dataItem,
|
|
2500
2504
|
onSubmit: h,
|
|
@@ -2506,7 +2510,7 @@ const Fs = (e) => {
|
|
|
2506
2510
|
onClose: u,
|
|
2507
2511
|
style: { zIndex: 90 }
|
|
2508
2512
|
},
|
|
2509
|
-
/* @__PURE__ */ t.createElement(
|
|
2513
|
+
/* @__PURE__ */ t.createElement(gs, null),
|
|
2510
2514
|
/* @__PURE__ */ t.createElement(ln, null, /* @__PURE__ */ t.createElement(
|
|
2511
2515
|
ze,
|
|
2512
2516
|
{
|
|
@@ -2520,8 +2524,8 @@ const Fs = (e) => {
|
|
|
2520
2524
|
}
|
|
2521
2525
|
);
|
|
2522
2526
|
return gt ? sn.createPortal(p, document && document.body) : null;
|
|
2523
|
-
},
|
|
2524
|
-
const { onClose: a, onCancel: n, onConfirm: o, dataItem: r } = e, l =
|
|
2527
|
+
}, Gs = (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(
|
|
2525
2529
|
({ syntheticEvent: f }) => {
|
|
2526
2530
|
a && a.call(void 0, {
|
|
2527
2531
|
syntheticEvent: f,
|
|
@@ -2550,33 +2554,33 @@ const Fs = (e) => {
|
|
|
2550
2554
|
[o, r]
|
|
2551
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)));
|
|
2552
2556
|
return gt ? sn.createPortal(C, document && document.body) : null;
|
|
2553
|
-
},
|
|
2557
|
+
}, Ws = an;
|
|
2554
2558
|
export {
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2559
|
+
Ss as GANTT_COL_INDEX_ATTRIBUTE,
|
|
2560
|
+
xs as GANTT_PREVENT_SELECTION_ELEMENT,
|
|
2561
|
+
Rs as GANTT_ROW_INDEX_ATTRIBUTE,
|
|
2558
2562
|
Wt as Gantt,
|
|
2559
|
-
|
|
2560
|
-
|
|
2563
|
+
is as GanttBooleanFilter,
|
|
2564
|
+
cs as GanttDateFilter,
|
|
2561
2565
|
Ot as GanttDayView,
|
|
2562
|
-
|
|
2566
|
+
zs as GanttForm,
|
|
2563
2567
|
Pt as GanttMonthView,
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
+
ls as GanttNumericFilter,
|
|
2569
|
+
Gs as GanttRemoveDialog,
|
|
2570
|
+
Ws as GanttRow,
|
|
2571
|
+
rs as GanttTextFilter,
|
|
2568
2572
|
$e as GanttWeekView,
|
|
2569
2573
|
_t as GanttYearView,
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2574
|
+
Ls as addDependency,
|
|
2575
|
+
Hs as addTask,
|
|
2576
|
+
Fs as createDataTree,
|
|
2577
|
+
Ms as extendDataItem,
|
|
2578
|
+
Ns as filterBy,
|
|
2579
|
+
_s as getSelectedState,
|
|
2580
|
+
Ks as getSelectedStateFromKeyDown,
|
|
2577
2581
|
Et as mapTree,
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
+
Is as orderBy,
|
|
2583
|
+
Vs as removeTask,
|
|
2584
|
+
Bs as setSelectedState,
|
|
2585
|
+
As as updateTask
|
|
2582
2586
|
};
|