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