iris-gantt 1.0.3 → 1.0.5
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/iris-gantt.js +1726 -1375
- package/dist/iris-gantt.umd.cjs +18 -10
- package/package.json +10 -8
package/dist/iris-gantt.js
CHANGED
|
@@ -1,348 +1,699 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Typography as
|
|
3
|
-
import { FontAwesomeIcon as
|
|
4
|
-
import { faChevronRight as
|
|
5
|
-
import
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
if (
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
var l = null;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} else h = s;
|
|
19
|
-
return s = h.ref, {
|
|
20
|
-
$$typeof: t,
|
|
21
|
-
type: i,
|
|
22
|
-
key: l,
|
|
23
|
-
ref: s !== void 0 ? s : null,
|
|
24
|
-
props: h
|
|
25
|
-
};
|
|
1
|
+
import Xe, { useState as _, useMemo as pn, forwardRef as kt, useCallback as Te, useEffect as gt, useRef as Ct } from "react";
|
|
2
|
+
import { Typography as Wt, Select as xe, Input as Pe, List as Je, Radio as nt, Space as De, InputNumber as Ge, Button as ie, Popover as gn, Tooltip as Fe, Divider as ht, Form as q, Modal as xt, DatePicker as Ut, ColorPicker as Vt, Card as Nt, Alert as Et, Tag as Ie, Menu as xn } from "antd";
|
|
3
|
+
import { FontAwesomeIcon as I } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { faChevronRight as Jt, faPlus as at, faChevronDown as _t, faGripVertical as Xt, faTimesCircle as mn, faCalendarCheck as yn, faSearchMinus as jn, faSearchPlus as wn, faRotateLeft as Gt, faFileCsv as vn, faFileExcel as bn, faFileCode as Sn, faFilePdf as Dn, faExclamationTriangle as Tn, faArrowDown as Mn, faArrowUp as Cn, faInfoCircle as It, faLink as qt, faTrash as Kt, faEdit as En, faCopy as Fn, faFlag as kn, faTasks as $n, faFolder as Rn } from "@fortawesome/free-solid-svg-icons";
|
|
5
|
+
import Zt from "dayjs";
|
|
6
|
+
var dt = { exports: {} }, rt = {};
|
|
7
|
+
var Ot;
|
|
8
|
+
function Pn() {
|
|
9
|
+
if (Ot) return rt;
|
|
10
|
+
Ot = 1;
|
|
11
|
+
var n = Xe, r = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, s = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
12
|
+
function c(o, p, w) {
|
|
13
|
+
var l, x = {}, S = null, d = null;
|
|
14
|
+
w !== void 0 && (S = "" + w), p.key !== void 0 && (S = "" + p.key), p.ref !== void 0 && (d = p.ref);
|
|
15
|
+
for (l in p) i.call(p, l) && !g.hasOwnProperty(l) && (x[l] = p[l]);
|
|
16
|
+
if (o && o.defaultProps) for (l in p = o.defaultProps, p) x[l] === void 0 && (x[l] = p[l]);
|
|
17
|
+
return { $$typeof: r, type: o, key: S, ref: d, props: x, _owner: s.current };
|
|
26
18
|
}
|
|
27
|
-
return
|
|
19
|
+
return rt.Fragment = a, rt.jsx = c, rt.jsxs = c, rt;
|
|
28
20
|
}
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
function
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (typeof
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
var st = {};
|
|
22
|
+
var Lt;
|
|
23
|
+
function Nn() {
|
|
24
|
+
return Lt || (Lt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
25
|
+
var n = Xe, r = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.portal"), i = /* @__PURE__ */ Symbol.for("react.fragment"), s = /* @__PURE__ */ Symbol.for("react.strict_mode"), g = /* @__PURE__ */ Symbol.for("react.profiler"), c = /* @__PURE__ */ Symbol.for("react.provider"), o = /* @__PURE__ */ Symbol.for("react.context"), p = /* @__PURE__ */ Symbol.for("react.forward_ref"), w = /* @__PURE__ */ Symbol.for("react.suspense"), l = /* @__PURE__ */ Symbol.for("react.suspense_list"), x = /* @__PURE__ */ Symbol.for("react.memo"), S = /* @__PURE__ */ Symbol.for("react.lazy"), d = /* @__PURE__ */ Symbol.for("react.offscreen"), u = Symbol.iterator, v = "@@iterator";
|
|
26
|
+
function E(t) {
|
|
27
|
+
if (t === null || typeof t != "object")
|
|
28
|
+
return null;
|
|
29
|
+
var h = u && t[u] || t[v];
|
|
30
|
+
return typeof h == "function" ? h : null;
|
|
31
|
+
}
|
|
32
|
+
var f = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
33
|
+
function m(t) {
|
|
34
|
+
{
|
|
35
|
+
for (var h = arguments.length, b = new Array(h > 1 ? h - 1 : 0), C = 1; C < h; C++)
|
|
36
|
+
b[C - 1] = arguments[C];
|
|
37
|
+
$("error", t, b);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function $(t, h, b) {
|
|
41
|
+
{
|
|
42
|
+
var C = f.ReactDebugCurrentFrame, A = C.getStackAddendum();
|
|
43
|
+
A !== "" && (h += "%s", b = b.concat([A]));
|
|
44
|
+
var W = b.map(function(N) {
|
|
45
|
+
return String(N);
|
|
46
|
+
});
|
|
47
|
+
W.unshift("Warning: " + h), Function.prototype.apply.call(console[t], console, W);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
var R = !1, Y = !1, B = !1, te = !1, fe = !1, y;
|
|
51
|
+
y = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
52
|
+
function z(t) {
|
|
53
|
+
return !!(typeof t == "string" || typeof t == "function" || t === i || t === g || fe || t === s || t === w || t === l || te || t === d || R || Y || B || typeof t == "object" && t !== null && (t.$$typeof === S || t.$$typeof === x || t.$$typeof === c || t.$$typeof === o || t.$$typeof === p || // This needs to include all possible module reference object
|
|
54
|
+
// types supported by any Flight configuration anywhere since
|
|
55
|
+
// we don't know which Flight build this will end up being used
|
|
56
|
+
// with.
|
|
57
|
+
t.$$typeof === y || t.getModuleId !== void 0));
|
|
58
|
+
}
|
|
59
|
+
function J(t, h, b) {
|
|
60
|
+
var C = t.displayName;
|
|
61
|
+
if (C)
|
|
62
|
+
return C;
|
|
63
|
+
var A = h.displayName || h.name || "";
|
|
64
|
+
return A !== "" ? b + "(" + A + ")" : b;
|
|
65
|
+
}
|
|
66
|
+
function Z(t) {
|
|
67
|
+
return t.displayName || "Context";
|
|
68
|
+
}
|
|
69
|
+
function O(t) {
|
|
70
|
+
if (t == null)
|
|
71
|
+
return null;
|
|
72
|
+
if (typeof t.tag == "number" && m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
|
|
73
|
+
return t.displayName || t.name || null;
|
|
74
|
+
if (typeof t == "string")
|
|
75
|
+
return t;
|
|
76
|
+
switch (t) {
|
|
77
|
+
case i:
|
|
40
78
|
return "Fragment";
|
|
41
|
-
case
|
|
79
|
+
case a:
|
|
80
|
+
return "Portal";
|
|
81
|
+
case g:
|
|
42
82
|
return "Profiler";
|
|
43
|
-
case
|
|
83
|
+
case s:
|
|
44
84
|
return "StrictMode";
|
|
45
|
-
case
|
|
85
|
+
case w:
|
|
46
86
|
return "Suspense";
|
|
47
|
-
case
|
|
87
|
+
case l:
|
|
48
88
|
return "SuspenseList";
|
|
49
|
-
case Y:
|
|
50
|
-
return "Activity";
|
|
51
89
|
}
|
|
52
|
-
if (typeof
|
|
53
|
-
switch (typeof
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return
|
|
60
|
-
case C:
|
|
61
|
-
return (r._context.displayName || "Context") + ".Consumer";
|
|
62
|
-
case P:
|
|
63
|
-
var m = r.render;
|
|
64
|
-
return r = r.displayName, r || (r = m.displayName || m.name || "", r = r !== "" ? "ForwardRef(" + r + ")" : "ForwardRef"), r;
|
|
65
|
-
case Z:
|
|
66
|
-
return m = r.displayName || null, m !== null ? m : t(r.type) || "Memo";
|
|
90
|
+
if (typeof t == "object")
|
|
91
|
+
switch (t.$$typeof) {
|
|
92
|
+
case o:
|
|
93
|
+
var h = t;
|
|
94
|
+
return Z(h) + ".Consumer";
|
|
95
|
+
case c:
|
|
96
|
+
var b = t;
|
|
97
|
+
return Z(b._context) + ".Provider";
|
|
67
98
|
case p:
|
|
68
|
-
|
|
99
|
+
return J(t, t.render, "ForwardRef");
|
|
100
|
+
case x:
|
|
101
|
+
var C = t.displayName || null;
|
|
102
|
+
return C !== null ? C : O(t.type) || "Memo";
|
|
103
|
+
case S: {
|
|
104
|
+
var A = t, W = A._payload, N = A._init;
|
|
69
105
|
try {
|
|
70
|
-
return
|
|
106
|
+
return O(N(W));
|
|
71
107
|
} catch {
|
|
108
|
+
return null;
|
|
72
109
|
}
|
|
110
|
+
}
|
|
73
111
|
}
|
|
74
112
|
return null;
|
|
75
113
|
}
|
|
76
|
-
|
|
77
|
-
|
|
114
|
+
var ne = Object.assign, oe = 0, me, de, V, D, M, F, k;
|
|
115
|
+
function X() {
|
|
78
116
|
}
|
|
79
|
-
|
|
117
|
+
X.__reactDisabledLog = !0;
|
|
118
|
+
function re() {
|
|
119
|
+
{
|
|
120
|
+
if (oe === 0) {
|
|
121
|
+
me = console.log, de = console.info, V = console.warn, D = console.error, M = console.group, F = console.groupCollapsed, k = console.groupEnd;
|
|
122
|
+
var t = {
|
|
123
|
+
configurable: !0,
|
|
124
|
+
enumerable: !0,
|
|
125
|
+
value: X,
|
|
126
|
+
writable: !0
|
|
127
|
+
};
|
|
128
|
+
Object.defineProperties(console, {
|
|
129
|
+
info: t,
|
|
130
|
+
log: t,
|
|
131
|
+
warn: t,
|
|
132
|
+
error: t,
|
|
133
|
+
group: t,
|
|
134
|
+
groupCollapsed: t,
|
|
135
|
+
groupEnd: t
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
oe++;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function le() {
|
|
142
|
+
{
|
|
143
|
+
if (oe--, oe === 0) {
|
|
144
|
+
var t = {
|
|
145
|
+
configurable: !0,
|
|
146
|
+
enumerable: !0,
|
|
147
|
+
writable: !0
|
|
148
|
+
};
|
|
149
|
+
Object.defineProperties(console, {
|
|
150
|
+
log: ne({}, t, {
|
|
151
|
+
value: me
|
|
152
|
+
}),
|
|
153
|
+
info: ne({}, t, {
|
|
154
|
+
value: de
|
|
155
|
+
}),
|
|
156
|
+
warn: ne({}, t, {
|
|
157
|
+
value: V
|
|
158
|
+
}),
|
|
159
|
+
error: ne({}, t, {
|
|
160
|
+
value: D
|
|
161
|
+
}),
|
|
162
|
+
group: ne({}, t, {
|
|
163
|
+
value: M
|
|
164
|
+
}),
|
|
165
|
+
groupCollapsed: ne({}, t, {
|
|
166
|
+
value: F
|
|
167
|
+
}),
|
|
168
|
+
groupEnd: ne({}, t, {
|
|
169
|
+
value: k
|
|
170
|
+
})
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
oe < 0 && m("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
var Me = f.ReactCurrentDispatcher, Se;
|
|
177
|
+
function ye(t, h, b) {
|
|
178
|
+
{
|
|
179
|
+
if (Se === void 0)
|
|
180
|
+
try {
|
|
181
|
+
throw Error();
|
|
182
|
+
} catch (A) {
|
|
183
|
+
var C = A.stack.trim().match(/\n( *(at )?)/);
|
|
184
|
+
Se = C && C[1] || "";
|
|
185
|
+
}
|
|
186
|
+
return `
|
|
187
|
+
` + Se + t;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
var Ce = !1, Ee;
|
|
191
|
+
{
|
|
192
|
+
var Oe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
193
|
+
Ee = new Oe();
|
|
194
|
+
}
|
|
195
|
+
function Le(t, h) {
|
|
196
|
+
if (!t || Ce)
|
|
197
|
+
return "";
|
|
198
|
+
{
|
|
199
|
+
var b = Ee.get(t);
|
|
200
|
+
if (b !== void 0)
|
|
201
|
+
return b;
|
|
202
|
+
}
|
|
203
|
+
var C;
|
|
204
|
+
Ce = !0;
|
|
205
|
+
var A = Error.prepareStackTrace;
|
|
206
|
+
Error.prepareStackTrace = void 0;
|
|
207
|
+
var W;
|
|
208
|
+
W = Me.current, Me.current = null, re();
|
|
80
209
|
try {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
210
|
+
if (h) {
|
|
211
|
+
var N = function() {
|
|
212
|
+
throw Error();
|
|
213
|
+
};
|
|
214
|
+
if (Object.defineProperty(N.prototype, "props", {
|
|
215
|
+
set: function() {
|
|
216
|
+
throw Error();
|
|
217
|
+
}
|
|
218
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
219
|
+
try {
|
|
220
|
+
Reflect.construct(N, []);
|
|
221
|
+
} catch (je) {
|
|
222
|
+
C = je;
|
|
223
|
+
}
|
|
224
|
+
Reflect.construct(t, [], N);
|
|
225
|
+
} else {
|
|
226
|
+
try {
|
|
227
|
+
N.call();
|
|
228
|
+
} catch (je) {
|
|
229
|
+
C = je;
|
|
230
|
+
}
|
|
231
|
+
t.call(N.prototype);
|
|
232
|
+
}
|
|
233
|
+
} else {
|
|
234
|
+
try {
|
|
235
|
+
throw Error();
|
|
236
|
+
} catch (je) {
|
|
237
|
+
C = je;
|
|
238
|
+
}
|
|
239
|
+
t();
|
|
240
|
+
}
|
|
241
|
+
} catch (je) {
|
|
242
|
+
if (je && C && typeof je.stack == "string") {
|
|
243
|
+
for (var P = je.stack.split(`
|
|
244
|
+
`), pe = C.stack.split(`
|
|
245
|
+
`), K = P.length - 1, ee = pe.length - 1; K >= 1 && ee >= 0 && P[K] !== pe[ee]; )
|
|
246
|
+
ee--;
|
|
247
|
+
for (; K >= 1 && ee >= 0; K--, ee--)
|
|
248
|
+
if (P[K] !== pe[ee]) {
|
|
249
|
+
if (K !== 1 || ee !== 1)
|
|
250
|
+
do
|
|
251
|
+
if (K--, ee--, ee < 0 || P[K] !== pe[ee]) {
|
|
252
|
+
var ve = `
|
|
253
|
+
` + P[K].replace(" at new ", " at ");
|
|
254
|
+
return t.displayName && ve.includes("<anonymous>") && (ve = ve.replace("<anonymous>", t.displayName)), typeof t == "function" && Ee.set(t, ve), ve;
|
|
255
|
+
}
|
|
256
|
+
while (K >= 1 && ee >= 0);
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
} finally {
|
|
261
|
+
Ce = !1, Me.current = W, le(), Error.prepareStackTrace = A;
|
|
262
|
+
}
|
|
263
|
+
var We = t ? t.displayName || t.name : "", _e = We ? ye(We) : "";
|
|
264
|
+
return typeof t == "function" && Ee.set(t, _e), _e;
|
|
265
|
+
}
|
|
266
|
+
function yt(t, h, b) {
|
|
267
|
+
return Le(t, !1);
|
|
268
|
+
}
|
|
269
|
+
function Ye(t) {
|
|
270
|
+
var h = t.prototype;
|
|
271
|
+
return !!(h && h.isReactComponent);
|
|
272
|
+
}
|
|
273
|
+
function Ae(t, h, b) {
|
|
274
|
+
if (t == null)
|
|
275
|
+
return "";
|
|
276
|
+
if (typeof t == "function")
|
|
277
|
+
return Le(t, Ye(t));
|
|
278
|
+
if (typeof t == "string")
|
|
279
|
+
return ye(t);
|
|
280
|
+
switch (t) {
|
|
281
|
+
case w:
|
|
282
|
+
return ye("Suspense");
|
|
283
|
+
case l:
|
|
284
|
+
return ye("SuspenseList");
|
|
285
|
+
}
|
|
286
|
+
if (typeof t == "object")
|
|
287
|
+
switch (t.$$typeof) {
|
|
288
|
+
case p:
|
|
289
|
+
return yt(t.render);
|
|
290
|
+
case x:
|
|
291
|
+
return Ae(t.type, h, b);
|
|
292
|
+
case S: {
|
|
293
|
+
var C = t, A = C._payload, W = C._init;
|
|
294
|
+
try {
|
|
295
|
+
return Ae(W(A), h, b);
|
|
296
|
+
} catch {
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
return "";
|
|
301
|
+
}
|
|
302
|
+
var ue = Object.prototype.hasOwnProperty, it = {}, jt = f.ReactDebugCurrentFrame;
|
|
303
|
+
function Be(t) {
|
|
304
|
+
if (t) {
|
|
305
|
+
var h = t._owner, b = Ae(t.type, t._source, h ? h.type : null);
|
|
306
|
+
jt.setExtraStackFrame(b);
|
|
307
|
+
} else
|
|
308
|
+
jt.setExtraStackFrame(null);
|
|
309
|
+
}
|
|
310
|
+
function wt(t, h, b, C, A) {
|
|
311
|
+
{
|
|
312
|
+
var W = Function.call.bind(ue);
|
|
313
|
+
for (var N in t)
|
|
314
|
+
if (W(t, N)) {
|
|
315
|
+
var P = void 0;
|
|
316
|
+
try {
|
|
317
|
+
if (typeof t[N] != "function") {
|
|
318
|
+
var pe = Error((C || "React class") + ": " + b + " type `" + N + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[N] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
319
|
+
throw pe.name = "Invariant Violation", pe;
|
|
320
|
+
}
|
|
321
|
+
P = t[N](h, N, C, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
322
|
+
} catch (K) {
|
|
323
|
+
P = K;
|
|
324
|
+
}
|
|
325
|
+
P && !(P instanceof Error) && (Be(A), m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", b, N, typeof P), Be(null)), P instanceof Error && !(P.message in it) && (it[P.message] = !0, Be(A), m("Failed %s type: %s", b, P.message), Be(null));
|
|
326
|
+
}
|
|
85
327
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
328
|
+
}
|
|
329
|
+
var vt = Array.isArray;
|
|
330
|
+
function qe(t) {
|
|
331
|
+
return vt(t);
|
|
332
|
+
}
|
|
333
|
+
function Ke(t) {
|
|
334
|
+
{
|
|
335
|
+
var h = typeof Symbol == "function" && Symbol.toStringTag, b = h && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
336
|
+
return b;
|
|
94
337
|
}
|
|
95
338
|
}
|
|
96
|
-
function
|
|
97
|
-
if (r === k) return "<>";
|
|
98
|
-
if (typeof r == "object" && r !== null && r.$$typeof === p)
|
|
99
|
-
return "<...>";
|
|
339
|
+
function bt(t) {
|
|
100
340
|
try {
|
|
101
|
-
|
|
102
|
-
return m ? "<" + m + ">" : "<...>";
|
|
341
|
+
return ot(t), !1;
|
|
103
342
|
} catch {
|
|
104
|
-
return
|
|
343
|
+
return !0;
|
|
105
344
|
}
|
|
106
345
|
}
|
|
107
|
-
function
|
|
108
|
-
|
|
109
|
-
return r === null ? null : r.getOwner();
|
|
346
|
+
function ot(t) {
|
|
347
|
+
return "" + t;
|
|
110
348
|
}
|
|
111
|
-
function
|
|
112
|
-
|
|
349
|
+
function lt(t) {
|
|
350
|
+
if (bt(t))
|
|
351
|
+
return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(t)), ot(t);
|
|
113
352
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
353
|
+
var Ze = f.ReactCurrentOwner, St = {
|
|
354
|
+
key: !0,
|
|
355
|
+
ref: !0,
|
|
356
|
+
__self: !0,
|
|
357
|
+
__source: !0
|
|
358
|
+
}, ze, Qe;
|
|
359
|
+
function ct(t) {
|
|
360
|
+
if (ue.call(t, "ref")) {
|
|
361
|
+
var h = Object.getOwnPropertyDescriptor(t, "ref").get;
|
|
362
|
+
if (h && h.isReactWarning)
|
|
363
|
+
return !1;
|
|
118
364
|
}
|
|
119
|
-
return
|
|
120
|
-
}
|
|
121
|
-
function
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
));
|
|
365
|
+
return t.ref !== void 0;
|
|
366
|
+
}
|
|
367
|
+
function Dt(t) {
|
|
368
|
+
if (ue.call(t, "key")) {
|
|
369
|
+
var h = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
370
|
+
if (h && h.isReactWarning)
|
|
371
|
+
return !1;
|
|
127
372
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
function
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
373
|
+
return t.key !== void 0;
|
|
374
|
+
}
|
|
375
|
+
function Tt(t, h) {
|
|
376
|
+
typeof t.ref == "string" && Ze.current;
|
|
377
|
+
}
|
|
378
|
+
function j(t, h) {
|
|
379
|
+
{
|
|
380
|
+
var b = function() {
|
|
381
|
+
ze || (ze = !0, m("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
|
|
382
|
+
};
|
|
383
|
+
b.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
384
|
+
get: b,
|
|
385
|
+
configurable: !0
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
function T(t, h) {
|
|
390
|
+
{
|
|
391
|
+
var b = function() {
|
|
392
|
+
Qe || (Qe = !0, m("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
|
|
393
|
+
};
|
|
394
|
+
b.isReactWarning = !0, Object.defineProperty(t, "ref", {
|
|
395
|
+
get: b,
|
|
396
|
+
configurable: !0
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
var L = function(t, h, b, C, A, W, N) {
|
|
401
|
+
var P = {
|
|
402
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
403
|
+
$$typeof: r,
|
|
404
|
+
// Built-in properties that belong on the element
|
|
405
|
+
type: t,
|
|
406
|
+
key: h,
|
|
407
|
+
ref: b,
|
|
408
|
+
props: N,
|
|
409
|
+
// Record the component responsible for creating this element.
|
|
410
|
+
_owner: W
|
|
411
|
+
};
|
|
412
|
+
return P._store = {}, Object.defineProperty(P._store, "validated", {
|
|
156
413
|
configurable: !1,
|
|
157
414
|
enumerable: !1,
|
|
158
415
|
writable: !0,
|
|
159
|
-
value:
|
|
160
|
-
}), Object.defineProperty(
|
|
416
|
+
value: !1
|
|
417
|
+
}), Object.defineProperty(P, "_self", {
|
|
161
418
|
configurable: !1,
|
|
162
419
|
enumerable: !1,
|
|
163
|
-
writable: !
|
|
164
|
-
value:
|
|
165
|
-
}), Object.defineProperty(
|
|
420
|
+
writable: !1,
|
|
421
|
+
value: C
|
|
422
|
+
}), Object.defineProperty(P, "_source", {
|
|
166
423
|
configurable: !1,
|
|
167
424
|
enumerable: !1,
|
|
168
|
-
writable: !
|
|
169
|
-
value:
|
|
170
|
-
}), Object.freeze && (Object.freeze(
|
|
171
|
-
}
|
|
172
|
-
function
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
425
|
+
writable: !1,
|
|
426
|
+
value: A
|
|
427
|
+
}), Object.freeze && (Object.freeze(P.props), Object.freeze(P)), P;
|
|
428
|
+
};
|
|
429
|
+
function G(t, h, b, C, A) {
|
|
430
|
+
{
|
|
431
|
+
var W, N = {}, P = null, pe = null;
|
|
432
|
+
b !== void 0 && (lt(b), P = "" + b), Dt(h) && (lt(h.key), P = "" + h.key), ct(h) && (pe = h.ref, Tt(h, A));
|
|
433
|
+
for (W in h)
|
|
434
|
+
ue.call(h, W) && !St.hasOwnProperty(W) && (N[W] = h[W]);
|
|
435
|
+
if (t && t.defaultProps) {
|
|
436
|
+
var K = t.defaultProps;
|
|
437
|
+
for (W in K)
|
|
438
|
+
N[W] === void 0 && (N[W] = K[W]);
|
|
439
|
+
}
|
|
440
|
+
if (P || pe) {
|
|
441
|
+
var ee = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
|
|
442
|
+
P && j(N, ee), pe && T(N, ee);
|
|
443
|
+
}
|
|
444
|
+
return L(t, P, pe, A, C, Ze.current, N);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
var se = f.ReactCurrentOwner, H = f.ReactDebugCurrentFrame;
|
|
448
|
+
function Q(t) {
|
|
449
|
+
if (t) {
|
|
450
|
+
var h = t._owner, b = Ae(t.type, t._source, h ? h.type : null);
|
|
451
|
+
H.setExtraStackFrame(b);
|
|
452
|
+
} else
|
|
453
|
+
H.setExtraStackFrame(null);
|
|
454
|
+
}
|
|
455
|
+
var U;
|
|
456
|
+
U = !1;
|
|
457
|
+
function ae(t) {
|
|
458
|
+
return typeof t == "object" && t !== null && t.$$typeof === r;
|
|
459
|
+
}
|
|
460
|
+
function ke() {
|
|
461
|
+
{
|
|
462
|
+
if (se.current) {
|
|
463
|
+
var t = O(se.current.type);
|
|
464
|
+
if (t)
|
|
465
|
+
return `
|
|
466
|
+
|
|
467
|
+
Check the render method of \`` + t + "`.";
|
|
468
|
+
}
|
|
469
|
+
return "";
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
function ce(t) {
|
|
473
|
+
return "";
|
|
474
|
+
}
|
|
475
|
+
var he = {};
|
|
476
|
+
function et(t) {
|
|
477
|
+
{
|
|
478
|
+
var h = ke();
|
|
479
|
+
if (!h) {
|
|
480
|
+
var b = typeof t == "string" ? t : t.displayName || t.name;
|
|
481
|
+
b && (h = `
|
|
482
|
+
|
|
483
|
+
Check the top-level render call using <` + b + ">.");
|
|
484
|
+
}
|
|
485
|
+
return h;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
function tt(t, h) {
|
|
489
|
+
{
|
|
490
|
+
if (!t._store || t._store.validated || t.key != null)
|
|
491
|
+
return;
|
|
492
|
+
t._store.validated = !0;
|
|
493
|
+
var b = et(h);
|
|
494
|
+
if (he[b])
|
|
495
|
+
return;
|
|
496
|
+
he[b] = !0;
|
|
497
|
+
var C = "";
|
|
498
|
+
t && t._owner && t._owner !== se.current && (C = " It was passed a child from " + O(t._owner.type) + "."), Q(t), m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, C), Q(null);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
function Ne(t, h) {
|
|
502
|
+
{
|
|
503
|
+
if (typeof t != "object")
|
|
504
|
+
return;
|
|
505
|
+
if (qe(t))
|
|
506
|
+
for (var b = 0; b < t.length; b++) {
|
|
507
|
+
var C = t[b];
|
|
508
|
+
ae(C) && tt(C, h);
|
|
509
|
+
}
|
|
510
|
+
else if (ae(t))
|
|
511
|
+
t._store && (t._store.validated = !0);
|
|
512
|
+
else if (t) {
|
|
513
|
+
var A = E(t);
|
|
514
|
+
if (typeof A == "function" && A !== t.entries)
|
|
515
|
+
for (var W = A.call(t), N; !(N = W.next()).done; )
|
|
516
|
+
ae(N.value) && tt(N.value, h);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
function $t(t) {
|
|
521
|
+
{
|
|
522
|
+
var h = t.type;
|
|
523
|
+
if (h == null || typeof h == "string")
|
|
524
|
+
return;
|
|
525
|
+
var b;
|
|
526
|
+
if (typeof h == "function")
|
|
527
|
+
b = h.propTypes;
|
|
528
|
+
else if (typeof h == "object" && (h.$$typeof === p || // Note: Memo only checks outer props here.
|
|
529
|
+
// Inner props are checked in the reconciler.
|
|
530
|
+
h.$$typeof === x))
|
|
531
|
+
b = h.propTypes;
|
|
532
|
+
else
|
|
533
|
+
return;
|
|
534
|
+
if (b) {
|
|
535
|
+
var C = O(h);
|
|
536
|
+
wt(b, t.props, "prop", C, t);
|
|
537
|
+
} else if (h.PropTypes !== void 0 && !U) {
|
|
538
|
+
U = !0;
|
|
539
|
+
var A = O(h);
|
|
540
|
+
m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", A || "Unknown");
|
|
541
|
+
}
|
|
542
|
+
typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
function He(t) {
|
|
546
|
+
{
|
|
547
|
+
for (var h = Object.keys(t.props), b = 0; b < h.length; b++) {
|
|
548
|
+
var C = h[b];
|
|
549
|
+
if (C !== "children" && C !== "key") {
|
|
550
|
+
Q(t), m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), Q(null);
|
|
551
|
+
break;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
t.ref !== null && (Q(t), m("Invalid attribute `ref` supplied to `React.Fragment`."), Q(null));
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
var Rt = {};
|
|
558
|
+
function Pt(t, h, b, C, A, W) {
|
|
559
|
+
{
|
|
560
|
+
var N = z(t);
|
|
561
|
+
if (!N) {
|
|
562
|
+
var P = "";
|
|
563
|
+
(t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (P += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
564
|
+
var pe = ce();
|
|
565
|
+
pe ? P += pe : P += ke();
|
|
566
|
+
var K;
|
|
567
|
+
t === null ? K = "null" : qe(t) ? K = "array" : t !== void 0 && t.$$typeof === r ? (K = "<" + (O(t.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : K = typeof t, m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", K, P);
|
|
568
|
+
}
|
|
569
|
+
var ee = G(t, h, b, A, W);
|
|
570
|
+
if (ee == null)
|
|
571
|
+
return ee;
|
|
572
|
+
if (N) {
|
|
573
|
+
var ve = h.children;
|
|
574
|
+
if (ve !== void 0)
|
|
575
|
+
if (C)
|
|
576
|
+
if (qe(ve)) {
|
|
577
|
+
for (var We = 0; We < ve.length; We++)
|
|
578
|
+
Ne(ve[We], t);
|
|
579
|
+
Object.freeze && Object.freeze(ve);
|
|
580
|
+
} else
|
|
581
|
+
m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
582
|
+
else
|
|
583
|
+
Ne(ve, t);
|
|
584
|
+
}
|
|
585
|
+
if (ue.call(h, "key")) {
|
|
586
|
+
var _e = O(t), je = Object.keys(h).filter(function(hn) {
|
|
587
|
+
return hn !== "key";
|
|
588
|
+
}), Mt = je.length > 0 ? "{key: someKey, " + je.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
589
|
+
if (!Rt[_e + Mt]) {
|
|
590
|
+
var fn = je.length > 0 ? "{" + je.join(": ..., ") + ": ...}" : "{}";
|
|
591
|
+
m(`A props object containing a "key" prop is being spread into JSX:
|
|
192
592
|
let props = %s;
|
|
193
593
|
<%s {...props} />
|
|
194
594
|
React keys must be passed directly to JSX without using spread:
|
|
195
595
|
let props = %s;
|
|
196
|
-
<%s key={someKey} {...props} />`,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
A
|
|
201
|
-
), D[A + F] = !0);
|
|
202
|
-
}
|
|
203
|
-
if (A = null, M !== void 0 && (a(M), A = "" + M), l(m) && (a(m.key), A = "" + m.key), "key" in m) {
|
|
204
|
-
M = {};
|
|
205
|
-
for (var fe in m)
|
|
206
|
-
fe !== "key" && (M[fe] = m[fe]);
|
|
207
|
-
} else M = m;
|
|
208
|
-
return A && o(
|
|
209
|
-
M,
|
|
210
|
-
typeof r == "function" ? r.displayName || r.name || "Unknown" : r
|
|
211
|
-
), b(
|
|
212
|
-
r,
|
|
213
|
-
A,
|
|
214
|
-
M,
|
|
215
|
-
s(),
|
|
216
|
-
U,
|
|
217
|
-
he
|
|
218
|
-
);
|
|
219
|
-
}
|
|
220
|
-
function g(r) {
|
|
221
|
-
S(r) ? r._store && (r._store.validated = 1) : typeof r == "object" && r !== null && r.$$typeof === p && (r._payload.status === "fulfilled" ? S(r._payload.value) && r._payload.value._store && (r._payload.value._store.validated = 1) : r._store && (r._store.validated = 1));
|
|
222
|
-
}
|
|
223
|
-
function S(r) {
|
|
224
|
-
return typeof r == "object" && r !== null && r.$$typeof === u;
|
|
225
|
-
}
|
|
226
|
-
var d = Ee, u = /* @__PURE__ */ Symbol.for("react.transitional.element"), j = /* @__PURE__ */ Symbol.for("react.portal"), k = /* @__PURE__ */ Symbol.for("react.fragment"), f = /* @__PURE__ */ Symbol.for("react.strict_mode"), w = /* @__PURE__ */ Symbol.for("react.profiler"), C = /* @__PURE__ */ Symbol.for("react.consumer"), E = /* @__PURE__ */ Symbol.for("react.context"), P = /* @__PURE__ */ Symbol.for("react.forward_ref"), I = /* @__PURE__ */ Symbol.for("react.suspense"), X = /* @__PURE__ */ Symbol.for("react.suspense_list"), Z = /* @__PURE__ */ Symbol.for("react.memo"), p = /* @__PURE__ */ Symbol.for("react.lazy"), Y = /* @__PURE__ */ Symbol.for("react.activity"), B = /* @__PURE__ */ Symbol.for("react.client.reference"), H = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, ie = Array.isArray, K = console.createTask ? console.createTask : function() {
|
|
227
|
-
return null;
|
|
228
|
-
};
|
|
229
|
-
d = {
|
|
230
|
-
react_stack_bottom_frame: function(r) {
|
|
231
|
-
return r();
|
|
596
|
+
<%s key={someKey} {...props} />`, Mt, _e, fn, _e), Rt[_e + Mt] = !0;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
return t === i ? He(ee) : $t(ee), ee;
|
|
232
600
|
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
M,
|
|
244
|
-
!1,
|
|
245
|
-
F ? Error("react-stack-top-frame") : _,
|
|
246
|
-
F ? K(i(r)) : v
|
|
247
|
-
);
|
|
248
|
-
}, Ce.jsxs = function(r, m, M) {
|
|
249
|
-
var F = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
250
|
-
return c(
|
|
251
|
-
r,
|
|
252
|
-
m,
|
|
253
|
-
M,
|
|
254
|
-
!0,
|
|
255
|
-
F ? Error("react-stack-top-frame") : _,
|
|
256
|
-
F ? K(i(r)) : v
|
|
257
|
-
);
|
|
258
|
-
};
|
|
259
|
-
})()), Ce;
|
|
601
|
+
}
|
|
602
|
+
function ln(t, h, b) {
|
|
603
|
+
return Pt(t, h, b, !0);
|
|
604
|
+
}
|
|
605
|
+
function cn(t, h, b) {
|
|
606
|
+
return Pt(t, h, b, !1);
|
|
607
|
+
}
|
|
608
|
+
var dn = cn, un = ln;
|
|
609
|
+
st.Fragment = i, st.jsx = dn, st.jsxs = un;
|
|
610
|
+
})()), st;
|
|
260
611
|
}
|
|
261
|
-
var
|
|
262
|
-
function
|
|
263
|
-
return
|
|
612
|
+
var Yt;
|
|
613
|
+
function _n() {
|
|
614
|
+
return Yt || (Yt = 1, process.env.NODE_ENV === "production" ? dt.exports = Pn() : dt.exports = Nn()), dt.exports;
|
|
264
615
|
}
|
|
265
|
-
var e =
|
|
266
|
-
const
|
|
267
|
-
const i = new Date(
|
|
616
|
+
var e = _n();
|
|
617
|
+
const ge = (n, r, a) => {
|
|
618
|
+
const i = new Date(n);
|
|
268
619
|
switch (a) {
|
|
269
620
|
case "hour":
|
|
270
|
-
i.setHours(i.getHours() +
|
|
621
|
+
i.setHours(i.getHours() + r);
|
|
271
622
|
break;
|
|
272
623
|
case "day":
|
|
273
|
-
i.setDate(i.getDate() +
|
|
624
|
+
i.setDate(i.getDate() + r);
|
|
274
625
|
break;
|
|
275
626
|
case "week":
|
|
276
|
-
i.setDate(i.getDate() +
|
|
627
|
+
i.setDate(i.getDate() + r * 7);
|
|
277
628
|
break;
|
|
278
629
|
case "month":
|
|
279
|
-
i.setMonth(i.getMonth() +
|
|
630
|
+
i.setMonth(i.getMonth() + r);
|
|
280
631
|
break;
|
|
281
632
|
case "quarter":
|
|
282
|
-
i.setMonth(i.getMonth() +
|
|
633
|
+
i.setMonth(i.getMonth() + r * 3);
|
|
283
634
|
break;
|
|
284
635
|
case "year":
|
|
285
|
-
i.setFullYear(i.getFullYear() +
|
|
636
|
+
i.setFullYear(i.getFullYear() + r);
|
|
286
637
|
break;
|
|
287
638
|
}
|
|
288
639
|
return i;
|
|
289
|
-
},
|
|
290
|
-
const a =
|
|
640
|
+
}, pt = (n, r) => {
|
|
641
|
+
const a = r.getTime() - n.getTime();
|
|
291
642
|
return Math.ceil(a / (1e3 * 60 * 60 * 24));
|
|
292
|
-
},
|
|
293
|
-
const a =
|
|
643
|
+
}, In = (n, r) => {
|
|
644
|
+
const a = r.getTime() - n.getTime();
|
|
294
645
|
return Math.ceil(a / (1e3 * 60 * 60));
|
|
295
|
-
},
|
|
296
|
-
const a = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], i = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], s = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
297
|
-
YYYY:
|
|
298
|
-
YY:
|
|
299
|
-
MMMM: i[
|
|
300
|
-
MMM: a[
|
|
301
|
-
MM: String(
|
|
302
|
-
M: String(
|
|
303
|
-
DD: String(
|
|
304
|
-
D: String(
|
|
305
|
-
dddd: s[
|
|
306
|
-
HH: String(
|
|
307
|
-
H: String(
|
|
308
|
-
mm: String(
|
|
309
|
-
m: String(
|
|
646
|
+
}, we = (n, r) => {
|
|
647
|
+
const a = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], i = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], s = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], g = {
|
|
648
|
+
YYYY: n.getFullYear().toString(),
|
|
649
|
+
YY: n.getFullYear().toString().slice(-2),
|
|
650
|
+
MMMM: i[n.getMonth()],
|
|
651
|
+
MMM: a[n.getMonth()],
|
|
652
|
+
MM: String(n.getMonth() + 1).padStart(2, "0"),
|
|
653
|
+
M: String(n.getMonth() + 1),
|
|
654
|
+
DD: String(n.getDate()).padStart(2, "0"),
|
|
655
|
+
D: String(n.getDate()),
|
|
656
|
+
dddd: s[n.getDay()],
|
|
657
|
+
HH: String(n.getHours()).padStart(2, "0"),
|
|
658
|
+
H: String(n.getHours()),
|
|
659
|
+
mm: String(n.getMinutes()).padStart(2, "0"),
|
|
660
|
+
m: String(n.getMinutes())
|
|
310
661
|
};
|
|
311
|
-
return
|
|
312
|
-
},
|
|
313
|
-
const
|
|
314
|
-
return
|
|
315
|
-
},
|
|
316
|
-
(a) => a.getFullYear() ===
|
|
317
|
-
),
|
|
318
|
-
const
|
|
319
|
-
return
|
|
320
|
-
},
|
|
321
|
-
const
|
|
322
|
-
return
|
|
323
|
-
},
|
|
662
|
+
return r.replace(/YYYY|YY|MMMM|MMM|MM|M|DD|D|dddd|HH|H|mm|m/g, (c) => g[c]);
|
|
663
|
+
}, At = (n) => {
|
|
664
|
+
const r = n.getDay();
|
|
665
|
+
return r === 0 || r === 6;
|
|
666
|
+
}, Bt = (n, r) => r.some(
|
|
667
|
+
(a) => a.getFullYear() === n.getFullYear() && a.getMonth() === n.getMonth() && a.getDate() === n.getDate()
|
|
668
|
+
), ut = (n) => {
|
|
669
|
+
const r = new Date(n);
|
|
670
|
+
return r.setHours(0, 0, 0, 0), r;
|
|
671
|
+
}, vr = (n) => {
|
|
672
|
+
const r = new Date(n);
|
|
673
|
+
return r.setHours(23, 59, 59, 999), r;
|
|
674
|
+
}, br = (n, r, a = "day") => {
|
|
324
675
|
switch (a) {
|
|
325
676
|
case "hour":
|
|
326
|
-
return
|
|
677
|
+
return In(n, r);
|
|
327
678
|
case "day":
|
|
328
|
-
return
|
|
679
|
+
return pt(n, r);
|
|
329
680
|
case "week":
|
|
330
|
-
return Math.ceil(
|
|
681
|
+
return Math.ceil(pt(n, r) / 7);
|
|
331
682
|
case "month":
|
|
332
|
-
return (
|
|
683
|
+
return (r.getFullYear() - n.getFullYear()) * 12 + (r.getMonth() - n.getMonth());
|
|
333
684
|
default:
|
|
334
|
-
return
|
|
685
|
+
return pt(n, r);
|
|
335
686
|
}
|
|
336
687
|
};
|
|
337
|
-
function
|
|
338
|
-
if (!
|
|
339
|
-
const
|
|
688
|
+
function On(n) {
|
|
689
|
+
if (!n || typeof n != "string") return null;
|
|
690
|
+
const r = n.trim(), a = /^(\d+)(FS|SS|FF|SF)(([+-])(\d+)([dhwm]))?$/i, i = r.match(a);
|
|
340
691
|
if (!i) return null;
|
|
341
|
-
const s = parseInt(i[1], 10),
|
|
342
|
-
let
|
|
692
|
+
const s = parseInt(i[1], 10), g = i[2].toUpperCase();
|
|
693
|
+
let c = 0, o = "day";
|
|
343
694
|
if (i[3]) {
|
|
344
|
-
const
|
|
345
|
-
switch (
|
|
695
|
+
const p = i[4] === "-" ? -1 : 1;
|
|
696
|
+
switch (c = parseInt(i[5], 10) * p, i[6].toLowerCase()) {
|
|
346
697
|
case "d":
|
|
347
698
|
o = "day";
|
|
348
699
|
break;
|
|
@@ -357,82 +708,82 @@ function un(t) {
|
|
|
357
708
|
break;
|
|
358
709
|
}
|
|
359
710
|
}
|
|
360
|
-
return { taskNumber: s, type:
|
|
711
|
+
return { taskNumber: s, type: g, lag: c, lagUnit: o };
|
|
361
712
|
}
|
|
362
|
-
function
|
|
363
|
-
switch (
|
|
713
|
+
function Ft(n, r) {
|
|
714
|
+
switch (r) {
|
|
364
715
|
case "hour":
|
|
365
|
-
return
|
|
716
|
+
return n / 24;
|
|
366
717
|
case "day":
|
|
367
|
-
return
|
|
718
|
+
return n;
|
|
368
719
|
case "week":
|
|
369
|
-
return
|
|
720
|
+
return n * 7;
|
|
370
721
|
case "month":
|
|
371
|
-
return
|
|
722
|
+
return n * 30;
|
|
372
723
|
// Approximate
|
|
373
724
|
default:
|
|
374
|
-
return
|
|
725
|
+
return n;
|
|
375
726
|
}
|
|
376
727
|
}
|
|
377
|
-
function
|
|
728
|
+
function Ln(n, r) {
|
|
378
729
|
const i = {
|
|
379
730
|
e2s: "FS",
|
|
380
731
|
s2s: "SS",
|
|
381
732
|
e2e: "FF",
|
|
382
733
|
s2e: "SF"
|
|
383
|
-
}[
|
|
384
|
-
let s = `${
|
|
385
|
-
if (
|
|
386
|
-
const
|
|
387
|
-
let
|
|
388
|
-
if (
|
|
389
|
-
switch (
|
|
734
|
+
}[n.type];
|
|
735
|
+
let s = `${r}${i}`;
|
|
736
|
+
if (n.lag && n.lag !== 0) {
|
|
737
|
+
const g = n.lag > 0 ? "+" : "", o = (n.lagUnit || "day").charAt(0);
|
|
738
|
+
let p = n.lag;
|
|
739
|
+
if (n.lagUnit && n.lagUnit !== "day")
|
|
740
|
+
switch (n.lagUnit) {
|
|
390
741
|
case "hour":
|
|
391
|
-
|
|
742
|
+
p = n.lag * 24;
|
|
392
743
|
break;
|
|
393
744
|
case "week":
|
|
394
|
-
|
|
745
|
+
p = n.lag / 7;
|
|
395
746
|
break;
|
|
396
747
|
case "month":
|
|
397
|
-
|
|
748
|
+
p = n.lag / 30;
|
|
398
749
|
break;
|
|
399
750
|
}
|
|
400
|
-
s += `${
|
|
751
|
+
s += `${g}${Math.round(p)}${o}`;
|
|
401
752
|
}
|
|
402
753
|
return s;
|
|
403
754
|
}
|
|
404
|
-
function
|
|
755
|
+
function Yn(n) {
|
|
405
756
|
return {
|
|
406
757
|
FS: "e2s",
|
|
407
758
|
SS: "s2s",
|
|
408
759
|
FF: "e2e",
|
|
409
760
|
SF: "s2e"
|
|
410
|
-
}[
|
|
761
|
+
}[n];
|
|
411
762
|
}
|
|
412
|
-
const { Text:
|
|
413
|
-
task:
|
|
414
|
-
allTasks:
|
|
763
|
+
const { Text: $e, Paragraph: An, Link: Bn } = Wt, { Option: zt } = xe, zn = ({
|
|
764
|
+
task: n,
|
|
765
|
+
allTasks: r,
|
|
415
766
|
onAddDependency: a,
|
|
416
767
|
children: i
|
|
417
768
|
}) => {
|
|
418
|
-
const [s,
|
|
419
|
-
if (!
|
|
420
|
-
const
|
|
421
|
-
return
|
|
422
|
-
(
|
|
769
|
+
const [s, g] = _(!1), [c, o] = _(""), [p, w] = _(null), [l, x] = _("e2s"), [S, d] = _("lag"), [u, v] = _(0), [E, f] = _(!0), m = "day", $ = pn(() => {
|
|
770
|
+
if (!c) return r.filter((z) => z.id !== n.id);
|
|
771
|
+
const y = c.toLowerCase();
|
|
772
|
+
return r.filter(
|
|
773
|
+
(z) => z.id !== n.id && (z.text.toLowerCase().includes(y) || (r.indexOf(z) + 1).toString().includes(y))
|
|
423
774
|
);
|
|
424
|
-
}, [
|
|
425
|
-
if (
|
|
426
|
-
const
|
|
427
|
-
a(
|
|
428
|
-
}
|
|
429
|
-
},
|
|
430
|
-
o(""),
|
|
431
|
-
},
|
|
432
|
-
if (!
|
|
433
|
-
const
|
|
434
|
-
let
|
|
435
|
-
return
|
|
775
|
+
}, [r, c, n.id]), R = () => {
|
|
776
|
+
if (p) {
|
|
777
|
+
const y = S === "lag" ? u : -u, z = Ft(y, m);
|
|
778
|
+
a(p, n.id, l, z), g(!1), Y();
|
|
779
|
+
}
|
|
780
|
+
}, Y = () => {
|
|
781
|
+
o(""), w(null), x("e2s"), d("lag"), v(0);
|
|
782
|
+
}, B = () => {
|
|
783
|
+
if (!E) return null;
|
|
784
|
+
const y = l === "e2s", z = l === "s2s", J = l === "e2e", Z = l === "s2e";
|
|
785
|
+
let O = 0, ne = 0, oe = "", me = 0, de = -1;
|
|
786
|
+
return y ? (O = 20, ne = 160, me = 140, de = 160, oe = "M 140 40 L 150 40 C 160 40, 160 90, 150 90 L 160 90") : J ? (O = 60, ne = 60, me = 180, de = -1, oe = "M 180 40 L 200 40 L 200 90 L 180 90") : z ? (O = 100, ne = 100, me = 100, de = -1, oe = "M 100 40 L 80 40 L 80 90 L 100 90") : Z && (O = 160, ne = 20, me = 160, de = 140, oe = "M 160 40 L 150 40 C 140 40, 140 90, 150 90 L 140 90"), /* @__PURE__ */ e.jsx("div", { style: {
|
|
436
787
|
width: "100%",
|
|
437
788
|
height: 120,
|
|
438
789
|
backgroundColor: "#fff",
|
|
@@ -442,75 +793,75 @@ const { Text: ge, Paragraph: pn, Link: xn } = ut, { Option: ct } = te, gn = ({
|
|
|
442
793
|
position: "relative",
|
|
443
794
|
overflow: "hidden"
|
|
444
795
|
}, children: /* @__PURE__ */ e.jsxs("svg", { viewBox: "0 0 300 120", style: { width: "100%", height: "100%" }, children: [
|
|
445
|
-
/* @__PURE__ */ e.jsx("line", { x1:
|
|
446
|
-
|
|
447
|
-
/* @__PURE__ */ e.jsx("rect", { x:
|
|
448
|
-
/* @__PURE__ */ e.jsx("text", { x:
|
|
449
|
-
/* @__PURE__ */ e.jsx("rect", { x:
|
|
450
|
-
/* @__PURE__ */ e.jsx("text", { x:
|
|
451
|
-
/* @__PURE__ */ e.jsx("path", { d:
|
|
796
|
+
/* @__PURE__ */ e.jsx("line", { x1: me, x2: me, y1: "0", y2: "120", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
|
|
797
|
+
de !== -1 && /* @__PURE__ */ e.jsx("line", { x1: de, x2: de, y1: "0", y2: "120", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
|
|
798
|
+
/* @__PURE__ */ e.jsx("rect", { x: O, y: "28", width: "120", height: "24", rx: "4", fill: "#bae7ff", stroke: "#69c0ff" }),
|
|
799
|
+
/* @__PURE__ */ e.jsx("text", { x: O + 60, y: "44", fontSize: "11", textAnchor: "middle", fill: "#0050b3", children: "Task 2" }),
|
|
800
|
+
/* @__PURE__ */ e.jsx("rect", { x: ne, y: "78", width: "120", height: "24", rx: "4", fill: "#bae7ff", stroke: "#69c0ff" }),
|
|
801
|
+
/* @__PURE__ */ e.jsx("text", { x: ne + 60, y: "94", fontSize: "11", textAnchor: "middle", fill: "#0050b3", children: "Task 3" }),
|
|
802
|
+
/* @__PURE__ */ e.jsx("path", { d: oe, fill: "none", stroke: "#8c8c8c", strokeWidth: "1.5", markerEnd: "url(#arrowhead)" }),
|
|
452
803
|
/* @__PURE__ */ e.jsx("defs", { children: /* @__PURE__ */ e.jsx("marker", { id: "arrowhead", markerWidth: "10", markerHeight: "7", refX: "9", refY: "3.5", orient: "auto", children: /* @__PURE__ */ e.jsx("polygon", { points: "0 0, 10 3.5, 0 7", fill: "#8c8c8c" }) }) })
|
|
453
804
|
] }) });
|
|
454
|
-
},
|
|
455
|
-
const
|
|
456
|
-
if (!
|
|
457
|
-
const
|
|
458
|
-
let
|
|
459
|
-
switch (
|
|
805
|
+
}, te = () => {
|
|
806
|
+
const y = r.find((O) => O.id === p);
|
|
807
|
+
if (!y) return "Select a task from the list to see how it will relate to the current task.";
|
|
808
|
+
const z = r.indexOf(n) + 1, J = r.indexOf(y) + 1;
|
|
809
|
+
let Z = "";
|
|
810
|
+
switch (l) {
|
|
460
811
|
case "e2s":
|
|
461
|
-
|
|
812
|
+
Z = `Task ${z} starts after Task ${J} finishes`;
|
|
462
813
|
break;
|
|
463
814
|
case "s2s":
|
|
464
|
-
|
|
815
|
+
Z = `Task ${z} starts when Task ${J} starts`;
|
|
465
816
|
break;
|
|
466
817
|
case "e2e":
|
|
467
|
-
|
|
818
|
+
Z = `Task ${z} finishes when Task ${J} finishes`;
|
|
468
819
|
break;
|
|
469
820
|
case "s2e":
|
|
470
|
-
|
|
821
|
+
Z = `Task ${z} finishes when Task ${J} starts`;
|
|
471
822
|
break;
|
|
472
823
|
}
|
|
473
824
|
if (u > 0) {
|
|
474
|
-
const
|
|
475
|
-
S === "lag" ?
|
|
825
|
+
const O = `${u} ${m}${u > 1 ? "s" : ""}`;
|
|
826
|
+
S === "lag" ? Z += ` + ${O} delay` : Z += ` - ${O} overlap`;
|
|
476
827
|
}
|
|
477
|
-
return
|
|
478
|
-
},
|
|
828
|
+
return Z + ".";
|
|
829
|
+
}, fe = /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", width: 620, height: 480, backgroundColor: "#fff", borderRadius: "8px", overflow: "hidden" }, children: [
|
|
479
830
|
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1, borderRight: "1px solid #f0f0f0", display: "flex", flexDirection: "column", padding: 0 }, children: [
|
|
480
831
|
/* @__PURE__ */ e.jsx("div", { style: { padding: "12px" }, children: /* @__PURE__ */ e.jsx(
|
|
481
|
-
|
|
832
|
+
Pe,
|
|
482
833
|
{
|
|
483
834
|
placeholder: "Search task...",
|
|
484
|
-
value:
|
|
485
|
-
onChange: (
|
|
835
|
+
value: c,
|
|
836
|
+
onChange: (y) => o(y.target.value),
|
|
486
837
|
style: { marginBottom: 8 },
|
|
487
838
|
autoFocus: !0,
|
|
488
839
|
size: "large"
|
|
489
840
|
}
|
|
490
841
|
) }),
|
|
491
842
|
/* @__PURE__ */ e.jsx("div", { style: { flex: 1, overflowY: "auto" }, children: /* @__PURE__ */ e.jsx(
|
|
492
|
-
|
|
843
|
+
Je,
|
|
493
844
|
{
|
|
494
845
|
size: "small",
|
|
495
|
-
dataSource:
|
|
496
|
-
renderItem: (
|
|
497
|
-
|
|
846
|
+
dataSource: $,
|
|
847
|
+
renderItem: (y) => /* @__PURE__ */ e.jsxs(
|
|
848
|
+
Je.Item,
|
|
498
849
|
{
|
|
499
|
-
className: `task-list-item ${
|
|
500
|
-
onClick: () =>
|
|
850
|
+
className: `task-list-item ${p === y.id ? "selected" : ""}`,
|
|
851
|
+
onClick: () => w(y.id),
|
|
501
852
|
style: {
|
|
502
853
|
cursor: "pointer",
|
|
503
854
|
padding: "8px 16px",
|
|
504
|
-
backgroundColor:
|
|
855
|
+
backgroundColor: p === y.id ? "#f0f7ff" : "transparent",
|
|
505
856
|
display: "flex",
|
|
506
857
|
justifyContent: "space-between"
|
|
507
858
|
},
|
|
508
859
|
children: [
|
|
509
860
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 12 }, children: [
|
|
510
|
-
/* @__PURE__ */ e.jsx(
|
|
511
|
-
/* @__PURE__ */ e.jsx(
|
|
861
|
+
/* @__PURE__ */ e.jsx($e, { type: "secondary", style: { width: 20 }, children: r.indexOf(y) + 1 }),
|
|
862
|
+
/* @__PURE__ */ e.jsx($e, { children: y.text })
|
|
512
863
|
] }),
|
|
513
|
-
/* @__PURE__ */ e.jsx(
|
|
864
|
+
/* @__PURE__ */ e.jsx(I, { icon: Jt, style: { fontSize: 10, color: "#bfbfbf" } })
|
|
514
865
|
]
|
|
515
866
|
}
|
|
516
867
|
)
|
|
@@ -519,60 +870,60 @@ const { Text: ge, Paragraph: pn, Link: xn } = ut, { Option: ct } = te, gn = ({
|
|
|
519
870
|
] }),
|
|
520
871
|
/* @__PURE__ */ e.jsxs("div", { style: { width: 340, padding: "24px", display: "flex", flexDirection: "column", borderLeft: "1px solid #f0f0f0" }, children: [
|
|
521
872
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 15 }, children: [
|
|
522
|
-
/* @__PURE__ */ e.jsx(
|
|
873
|
+
/* @__PURE__ */ e.jsx($e, { strong: !0, children: "Dependency type" }),
|
|
523
874
|
/* @__PURE__ */ e.jsx(
|
|
524
|
-
|
|
875
|
+
Bn,
|
|
525
876
|
{
|
|
526
877
|
style: { fontSize: "12px" },
|
|
527
|
-
onClick: () => f(!
|
|
528
|
-
children:
|
|
878
|
+
onClick: () => f(!E),
|
|
879
|
+
children: E ? "Hide preview" : "Show preview"
|
|
529
880
|
}
|
|
530
881
|
)
|
|
531
882
|
] }),
|
|
532
|
-
|
|
533
|
-
/* @__PURE__ */ e.jsx(
|
|
883
|
+
B(),
|
|
884
|
+
/* @__PURE__ */ e.jsx(An, { style: { fontSize: "13px", color: "#262626", marginBottom: 20, minHeight: 48, lineHeight: "1.6" }, children: te() }),
|
|
534
885
|
/* @__PURE__ */ e.jsx(
|
|
535
|
-
|
|
886
|
+
nt.Group,
|
|
536
887
|
{
|
|
537
|
-
value:
|
|
538
|
-
onChange: (
|
|
888
|
+
value: l,
|
|
889
|
+
onChange: (y) => x(y.target.value),
|
|
539
890
|
style: { width: "100%", marginBottom: 20 },
|
|
540
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
891
|
+
children: /* @__PURE__ */ e.jsxs(De, { direction: "vertical", style: { width: "100%" }, children: [
|
|
541
892
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", justifyContent: "space-between", width: "100%" }, children: [
|
|
542
|
-
/* @__PURE__ */ e.jsx(
|
|
543
|
-
/* @__PURE__ */ e.jsx(
|
|
893
|
+
/* @__PURE__ */ e.jsx(nt, { value: "e2s", children: "Finish to Start" }),
|
|
894
|
+
/* @__PURE__ */ e.jsx($e, { type: "secondary", children: "FS" })
|
|
544
895
|
] }),
|
|
545
896
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", justifyContent: "space-between", width: "100%" }, children: [
|
|
546
|
-
/* @__PURE__ */ e.jsx(
|
|
547
|
-
/* @__PURE__ */ e.jsx(
|
|
897
|
+
/* @__PURE__ */ e.jsx(nt, { value: "e2e", children: "Finish to Finish" }),
|
|
898
|
+
/* @__PURE__ */ e.jsx($e, { type: "secondary", children: "FF" })
|
|
548
899
|
] }),
|
|
549
900
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", justifyContent: "space-between", width: "100%" }, children: [
|
|
550
|
-
/* @__PURE__ */ e.jsx(
|
|
551
|
-
/* @__PURE__ */ e.jsx(
|
|
901
|
+
/* @__PURE__ */ e.jsx(nt, { value: "s2s", children: "Start to Start" }),
|
|
902
|
+
/* @__PURE__ */ e.jsx($e, { type: "secondary", children: "SS" })
|
|
552
903
|
] }),
|
|
553
904
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", justifyContent: "space-between", width: "100%" }, children: [
|
|
554
|
-
/* @__PURE__ */ e.jsx(
|
|
555
|
-
/* @__PURE__ */ e.jsx(
|
|
905
|
+
/* @__PURE__ */ e.jsx(nt, { value: "s2e", children: "Start to Finish" }),
|
|
906
|
+
/* @__PURE__ */ e.jsx($e, { type: "secondary", children: "SF" })
|
|
556
907
|
] })
|
|
557
908
|
] })
|
|
558
909
|
}
|
|
559
910
|
),
|
|
560
911
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: "10px", marginBottom: 20 }, children: [
|
|
561
912
|
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1 }, children: [
|
|
562
|
-
/* @__PURE__ */ e.jsx(
|
|
563
|
-
/* @__PURE__ */ e.jsxs(
|
|
564
|
-
/* @__PURE__ */ e.jsx(
|
|
565
|
-
/* @__PURE__ */ e.jsx(
|
|
913
|
+
/* @__PURE__ */ e.jsx($e, { type: "secondary", style: { fontSize: "11px", display: "block", marginBottom: 4 }, children: "Delay type" }),
|
|
914
|
+
/* @__PURE__ */ e.jsxs(xe, { value: S, onChange: (y) => d(y), style: { width: "100%" }, size: "large", children: [
|
|
915
|
+
/* @__PURE__ */ e.jsx(zt, { value: "lag", children: "Lag by" }),
|
|
916
|
+
/* @__PURE__ */ e.jsx(zt, { value: "lead", children: "Lead by" })
|
|
566
917
|
] })
|
|
567
918
|
] }),
|
|
568
919
|
/* @__PURE__ */ e.jsxs("div", { style: { width: 100 }, children: [
|
|
569
|
-
/* @__PURE__ */ e.jsx(
|
|
570
|
-
/* @__PURE__ */ e.jsx(
|
|
571
|
-
|
|
920
|
+
/* @__PURE__ */ e.jsx($e, { type: "secondary", style: { fontSize: "11px", display: "block", marginBottom: 4 }, children: "Days" }),
|
|
921
|
+
/* @__PURE__ */ e.jsx(De.Compact, { style: { width: "100%" }, children: /* @__PURE__ */ e.jsx(
|
|
922
|
+
Ge,
|
|
572
923
|
{
|
|
573
924
|
min: 0,
|
|
574
925
|
value: u,
|
|
575
|
-
onChange: (
|
|
926
|
+
onChange: (y) => v(y || 0),
|
|
576
927
|
style: { width: "100%" },
|
|
577
928
|
placeholder: "0",
|
|
578
929
|
size: "large"
|
|
@@ -581,12 +932,12 @@ const { Text: ge, Paragraph: pn, Link: xn } = ut, { Option: ct } = te, gn = ({
|
|
|
581
932
|
] })
|
|
582
933
|
] }),
|
|
583
934
|
/* @__PURE__ */ e.jsx(
|
|
584
|
-
|
|
935
|
+
ie,
|
|
585
936
|
{
|
|
586
937
|
type: "primary",
|
|
587
938
|
block: !0,
|
|
588
|
-
onClick:
|
|
589
|
-
disabled: !
|
|
939
|
+
onClick: R,
|
|
940
|
+
disabled: !p,
|
|
590
941
|
style: { marginTop: "auto", backgroundColor: "#5c67f2", height: 44, borderRadius: "6px" },
|
|
591
942
|
children: "Add"
|
|
592
943
|
}
|
|
@@ -594,52 +945,52 @@ const { Text: ge, Paragraph: pn, Link: xn } = ut, { Option: ct } = te, gn = ({
|
|
|
594
945
|
] })
|
|
595
946
|
] });
|
|
596
947
|
return /* @__PURE__ */ e.jsx(
|
|
597
|
-
|
|
948
|
+
gn,
|
|
598
949
|
{
|
|
599
|
-
content:
|
|
950
|
+
content: fe,
|
|
600
951
|
trigger: "click",
|
|
601
952
|
open: s,
|
|
602
|
-
onOpenChange:
|
|
953
|
+
onOpenChange: g,
|
|
603
954
|
placement: "bottomLeft",
|
|
604
955
|
overlayClassName: "dependency-popover",
|
|
605
956
|
overlayInnerStyle: { padding: 0 },
|
|
606
957
|
children: i
|
|
607
958
|
}
|
|
608
959
|
);
|
|
609
|
-
},
|
|
610
|
-
({ tasks:
|
|
611
|
-
const u =
|
|
612
|
-
|
|
613
|
-
const
|
|
614
|
-
if (!f.parent) return
|
|
615
|
-
const
|
|
616
|
-
return
|
|
617
|
-
},
|
|
618
|
-
if (
|
|
619
|
-
return
|
|
620
|
-
switch (
|
|
960
|
+
}, Qt = kt(
|
|
961
|
+
({ tasks: n, allTasks: r = [], columns: a, selectedTask: i, onTaskClick: s, onTaskContextMenu: g, onTaskUpdate: c, onTaskDragStart: o, onAddTask: p, onAddDependency: w, links: l = [], dropIndicator: x, reorderTask: S }, d) => {
|
|
962
|
+
const u = Xe.useRef(null);
|
|
963
|
+
Xe.useImperativeHandle(d, () => u.current);
|
|
964
|
+
const v = (f, m = 0) => {
|
|
965
|
+
if (!f.parent) return m;
|
|
966
|
+
const $ = n.find((R) => R.id === f.parent);
|
|
967
|
+
return $ ? v($, m + 1) : m;
|
|
968
|
+
}, E = (f, m) => {
|
|
969
|
+
if (m.template)
|
|
970
|
+
return m.template(f);
|
|
971
|
+
switch (m.name) {
|
|
621
972
|
case "text":
|
|
622
|
-
const
|
|
623
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "gantt-grid-cell-text", style: { paddingLeft:
|
|
973
|
+
const $ = v(f);
|
|
974
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "gantt-grid-cell-text", style: { paddingLeft: $ * 14 }, children: [
|
|
624
975
|
/* @__PURE__ */ e.jsx(
|
|
625
976
|
"div",
|
|
626
977
|
{
|
|
627
978
|
className: "gantt-row-drag-handle",
|
|
628
|
-
onMouseDown: (
|
|
629
|
-
|
|
979
|
+
onMouseDown: (Y) => {
|
|
980
|
+
Y.preventDefault(), o?.(f.id, Y.clientX, Y.clientY, "reorder");
|
|
630
981
|
},
|
|
631
|
-
children: /* @__PURE__ */ e.jsx(
|
|
982
|
+
children: /* @__PURE__ */ e.jsx(I, { icon: Xt })
|
|
632
983
|
}
|
|
633
984
|
),
|
|
634
|
-
f.type === "project" ? /* @__PURE__ */ e.jsx("span", { className: "gantt-tree-icon", onClick: (
|
|
635
|
-
|
|
636
|
-
}, children: /* @__PURE__ */ e.jsx(
|
|
985
|
+
f.type === "project" ? /* @__PURE__ */ e.jsx("span", { className: "gantt-tree-icon", onClick: (Y) => {
|
|
986
|
+
Y.stopPropagation(), c?.({ ...f, open: !f.open });
|
|
987
|
+
}, children: /* @__PURE__ */ e.jsx(I, { icon: f.open ? _t : Jt }) }) : /* @__PURE__ */ e.jsx("span", { style: { width: 16, display: "inline-block" } }),
|
|
637
988
|
/* @__PURE__ */ e.jsx("span", { className: "gantt-task-name-text", children: f.text })
|
|
638
989
|
] });
|
|
639
990
|
case "start":
|
|
640
|
-
return
|
|
991
|
+
return we(f.start, "DD-MM-YYYY");
|
|
641
992
|
case "end":
|
|
642
|
-
return
|
|
993
|
+
return we(f.end, "DD-MM-YYYY");
|
|
643
994
|
case "duration":
|
|
644
995
|
return /* @__PURE__ */ e.jsxs("div", { style: {
|
|
645
996
|
backgroundColor: "#f6e7db",
|
|
@@ -656,14 +1007,14 @@ const { Text: ge, Paragraph: pn, Link: xn } = ut, { Option: ct } = te, gn = ({
|
|
|
656
1007
|
f.duration !== 1 ? "s" : ""
|
|
657
1008
|
] });
|
|
658
1009
|
case "predecessors":
|
|
659
|
-
const
|
|
1010
|
+
const R = l.filter((Y) => Y.target === f.id);
|
|
660
1011
|
return /* @__PURE__ */ e.jsx(
|
|
661
|
-
|
|
1012
|
+
zn,
|
|
662
1013
|
{
|
|
663
1014
|
task: f,
|
|
664
|
-
allTasks:
|
|
665
|
-
links:
|
|
666
|
-
onAddDependency: (
|
|
1015
|
+
allTasks: r,
|
|
1016
|
+
links: l,
|
|
1017
|
+
onAddDependency: (Y, B, te, fe) => w?.(Y, B, te, fe),
|
|
667
1018
|
children: /* @__PURE__ */ e.jsx("div", { style: {
|
|
668
1019
|
cursor: "pointer",
|
|
669
1020
|
minHeight: "24px",
|
|
@@ -671,8 +1022,8 @@ const { Text: ge, Paragraph: pn, Link: xn } = ut, { Option: ct } = te, gn = ({
|
|
|
671
1022
|
display: "flex",
|
|
672
1023
|
alignItems: "center",
|
|
673
1024
|
gap: "4px"
|
|
674
|
-
}, children:
|
|
675
|
-
const
|
|
1025
|
+
}, children: R.map((Y) => {
|
|
1026
|
+
const B = r.find((fe) => fe.id === Y.source), te = B ? r.indexOf(B) + 1 : 0;
|
|
676
1027
|
return /* @__PURE__ */ e.jsx(
|
|
677
1028
|
"span",
|
|
678
1029
|
{
|
|
@@ -685,22 +1036,22 @@ const { Text: ge, Paragraph: pn, Link: xn } = ut, { Option: ct } = te, gn = ({
|
|
|
685
1036
|
borderRadius: "4px",
|
|
686
1037
|
whiteSpace: "nowrap"
|
|
687
1038
|
},
|
|
688
|
-
children:
|
|
1039
|
+
children: Ln(Y, te)
|
|
689
1040
|
},
|
|
690
|
-
|
|
1041
|
+
Y.id
|
|
691
1042
|
);
|
|
692
1043
|
}) })
|
|
693
1044
|
}
|
|
694
1045
|
);
|
|
695
1046
|
case "add":
|
|
696
1047
|
return /* @__PURE__ */ e.jsx(
|
|
697
|
-
|
|
1048
|
+
ie,
|
|
698
1049
|
{
|
|
699
1050
|
type: "text",
|
|
700
1051
|
size: "small",
|
|
701
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
702
|
-
onClick: (
|
|
703
|
-
|
|
1052
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: at, style: { fontSize: 12, color: "#adb5bd" } }),
|
|
1053
|
+
onClick: (Y) => {
|
|
1054
|
+
Y.stopPropagation(), p?.(f.id);
|
|
704
1055
|
}
|
|
705
1056
|
}
|
|
706
1057
|
);
|
|
@@ -719,9 +1070,9 @@ const { Text: ge, Paragraph: pn, Link: xn } = ut, { Option: ct } = te, gn = ({
|
|
|
719
1070
|
] })
|
|
720
1071
|
] });
|
|
721
1072
|
case "index":
|
|
722
|
-
return /* @__PURE__ */ e.jsx("span", { style: { color: "#8c8c8c" }, children:
|
|
1073
|
+
return /* @__PURE__ */ e.jsx("span", { style: { color: "#8c8c8c" }, children: r.indexOf(f) + 1 });
|
|
723
1074
|
default:
|
|
724
|
-
return f[
|
|
1075
|
+
return f[m.name] || "";
|
|
725
1076
|
}
|
|
726
1077
|
};
|
|
727
1078
|
return /* @__PURE__ */ e.jsxs("div", { className: "gantt-grid", ref: u, children: [
|
|
@@ -734,41 +1085,41 @@ const { Text: ge, Paragraph: pn, Link: xn } = ut, { Option: ct } = te, gn = ({
|
|
|
734
1085
|
justifyContent: f.align === "center" ? "center" : "flex-start"
|
|
735
1086
|
},
|
|
736
1087
|
children: f.name === "add" ? /* @__PURE__ */ e.jsx(
|
|
737
|
-
|
|
1088
|
+
I,
|
|
738
1089
|
{
|
|
739
|
-
icon:
|
|
1090
|
+
icon: at,
|
|
740
1091
|
style: { fontSize: 12, color: "#64748b", cursor: "pointer" },
|
|
741
|
-
onClick: () =>
|
|
1092
|
+
onClick: () => p?.()
|
|
742
1093
|
}
|
|
743
1094
|
) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
744
1095
|
f.label,
|
|
745
|
-
f.name === "start" && /* @__PURE__ */ e.jsx(
|
|
1096
|
+
f.name === "start" && /* @__PURE__ */ e.jsx(I, { icon: _t, style: { marginLeft: 8, fontSize: 10, color: "#64748b" } })
|
|
746
1097
|
] })
|
|
747
1098
|
},
|
|
748
1099
|
f.name
|
|
749
1100
|
)) }),
|
|
750
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-grid-body", children:
|
|
751
|
-
const
|
|
1101
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-grid-body", children: n.map((f) => {
|
|
1102
|
+
const m = S?.id === f.id, $ = S?.descendantIds.includes(f.id);
|
|
752
1103
|
return /* @__PURE__ */ e.jsxs(
|
|
753
1104
|
"div",
|
|
754
1105
|
{
|
|
755
|
-
className: `gantt-grid-row ${i === f.id ? "selected" : ""} ${
|
|
1106
|
+
className: `gantt-grid-row ${i === f.id ? "selected" : ""} ${m ? "dragging-row" : ""} ${$ ? "descendant-dragging-row" : ""} ${x?.taskId === f.id ? `drop-target-${x.position}` : ""}`,
|
|
756
1107
|
onClick: () => s(f.id),
|
|
757
|
-
onContextMenu: (
|
|
1108
|
+
onContextMenu: (R) => g?.(R, f.id),
|
|
758
1109
|
children: [
|
|
759
|
-
a.map((
|
|
1110
|
+
a.map((R) => /* @__PURE__ */ e.jsx(
|
|
760
1111
|
"div",
|
|
761
1112
|
{
|
|
762
1113
|
className: "gantt-grid-cell",
|
|
763
1114
|
style: {
|
|
764
|
-
width:
|
|
765
|
-
textAlign:
|
|
1115
|
+
width: R.width,
|
|
1116
|
+
textAlign: R.align || "left"
|
|
766
1117
|
},
|
|
767
|
-
children:
|
|
1118
|
+
children: E(f, R)
|
|
768
1119
|
},
|
|
769
|
-
`${f.id}-${
|
|
1120
|
+
`${f.id}-${R.name}`
|
|
770
1121
|
)),
|
|
771
|
-
|
|
1122
|
+
x?.taskId === f.id && /* @__PURE__ */ e.jsx("div", { className: `gantt-drop-indicator ${x.position}` })
|
|
772
1123
|
]
|
|
773
1124
|
},
|
|
774
1125
|
f.id
|
|
@@ -777,158 +1128,158 @@ const { Text: ge, Paragraph: pn, Link: xn } = ut, { Option: ct } = te, gn = ({
|
|
|
777
1128
|
] });
|
|
778
1129
|
}
|
|
779
1130
|
);
|
|
780
|
-
|
|
781
|
-
const
|
|
782
|
-
task:
|
|
783
|
-
position:
|
|
1131
|
+
Qt.displayName = "Grid";
|
|
1132
|
+
const Hn = ({
|
|
1133
|
+
task: n,
|
|
1134
|
+
position: r,
|
|
784
1135
|
selected: a,
|
|
785
1136
|
dragging: i,
|
|
786
1137
|
onClick: s,
|
|
787
|
-
onDragStart:
|
|
788
|
-
dragDeltaX:
|
|
1138
|
+
onDragStart: g,
|
|
1139
|
+
dragDeltaX: c = 0,
|
|
789
1140
|
dragType: o = null,
|
|
790
|
-
readonly:
|
|
1141
|
+
readonly: p = !1
|
|
791
1142
|
}) => {
|
|
792
|
-
const
|
|
793
|
-
|
|
794
|
-
},
|
|
1143
|
+
const w = (u, v) => {
|
|
1144
|
+
p || (u.preventDefault(), u.stopPropagation(), g(u.clientX, u.clientY, v));
|
|
1145
|
+
}, l = () => {
|
|
795
1146
|
const u = ["gantt-task-bar"];
|
|
796
|
-
return
|
|
797
|
-
},
|
|
798
|
-
let u =
|
|
799
|
-
return i && o && (o === "move" ? u +=
|
|
1147
|
+
return n.type === "milestone" && u.push("milestone"), n.type === "project" && u.push("project"), a && u.push("selected"), i && u.push("dragging"), u.join(" ");
|
|
1148
|
+
}, x = () => {
|
|
1149
|
+
let u = r.left, v = r.width;
|
|
1150
|
+
return i && o && (o === "move" ? u += c : o === "resize-left" ? (u += c, v -= c) : o === "resize-right" && (v += c)), {
|
|
800
1151
|
left: `${u}px`,
|
|
801
|
-
width: `${Math.max(
|
|
1152
|
+
width: `${Math.max(v, 0)}px`,
|
|
802
1153
|
// Color handled by CSS classes (.project, .milestone) or task.color override
|
|
803
|
-
backgroundColor:
|
|
1154
|
+
backgroundColor: n.color || void 0
|
|
804
1155
|
};
|
|
805
1156
|
}, S = (u = !1) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
806
|
-
!
|
|
1157
|
+
!p && n.type !== "milestone" && !u && /* @__PURE__ */ e.jsx(
|
|
807
1158
|
"div",
|
|
808
1159
|
{
|
|
809
1160
|
className: "gantt-task-resize-handle gantt-task-resize-left",
|
|
810
|
-
onMouseDown: (
|
|
1161
|
+
onMouseDown: (v) => w(v, "resize-left")
|
|
811
1162
|
}
|
|
812
1163
|
),
|
|
813
|
-
!u &&
|
|
1164
|
+
!u && n.type !== "milestone" && /* @__PURE__ */ e.jsx(
|
|
814
1165
|
"div",
|
|
815
1166
|
{
|
|
816
1167
|
className: "gantt-task-progress",
|
|
817
|
-
style: { width: `${
|
|
1168
|
+
style: { width: `${n.progress}%` }
|
|
818
1169
|
}
|
|
819
1170
|
),
|
|
820
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-task-content", children: !u &&
|
|
821
|
-
|
|
1171
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-task-content", children: !u && n.type !== "milestone" && /* @__PURE__ */ e.jsx("span", { className: "gantt-task-text", children: n.text }) }),
|
|
1172
|
+
n.type === "milestone" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
822
1173
|
/* @__PURE__ */ e.jsx("div", { className: "gantt-milestone-diamond" }),
|
|
823
|
-
/* @__PURE__ */ e.jsx("span", { className: "gantt-milestone-text", children:
|
|
1174
|
+
/* @__PURE__ */ e.jsx("span", { className: "gantt-milestone-text", children: n.text })
|
|
824
1175
|
] }),
|
|
825
|
-
!
|
|
1176
|
+
!p && n.type !== "milestone" && !u && /* @__PURE__ */ e.jsx(
|
|
826
1177
|
"div",
|
|
827
1178
|
{
|
|
828
1179
|
className: "gantt-task-resize-handle gantt-task-resize-right",
|
|
829
|
-
onMouseDown: (
|
|
1180
|
+
onMouseDown: (v) => w(v, "resize-right")
|
|
830
1181
|
}
|
|
831
1182
|
)
|
|
832
1183
|
] }), d = /* @__PURE__ */ e.jsxs("div", { className: "gantt-tooltip", children: [
|
|
833
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-tooltip-title", children:
|
|
1184
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-tooltip-title", children: n.text }),
|
|
834
1185
|
/* @__PURE__ */ e.jsxs("div", { className: "gantt-tooltip-dates", children: [
|
|
835
|
-
|
|
1186
|
+
we(n.start, "MMM D"),
|
|
836
1187
|
" - ",
|
|
837
|
-
|
|
1188
|
+
we(n.end, "MMM D")
|
|
838
1189
|
] }),
|
|
839
1190
|
/* @__PURE__ */ e.jsxs("div", { className: "gantt-tooltip-progress", children: [
|
|
840
1191
|
"Progress: ",
|
|
841
|
-
|
|
1192
|
+
n.progress,
|
|
842
1193
|
"%"
|
|
843
1194
|
] }),
|
|
844
|
-
|
|
1195
|
+
n.owner && /* @__PURE__ */ e.jsxs("div", { className: "gantt-tooltip-owner", children: [
|
|
845
1196
|
"Owner: ",
|
|
846
|
-
|
|
1197
|
+
n.owner
|
|
847
1198
|
] })
|
|
848
1199
|
] });
|
|
849
|
-
return
|
|
1200
|
+
return n.segments && n.segments.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "gantt-task-group", children: n.segments.map((u, v) => /* @__PURE__ */ e.jsx(Fe, { title: d, mouseEnterDelay: 0.5, children: /* @__PURE__ */ e.jsx(
|
|
850
1201
|
"div",
|
|
851
1202
|
{
|
|
852
|
-
className:
|
|
1203
|
+
className: l() + " segment",
|
|
853
1204
|
style: {
|
|
854
|
-
left: `${
|
|
855
|
-
width: `${(u.end.getTime() - u.start.getTime()) / (
|
|
856
|
-
backgroundColor:
|
|
1205
|
+
left: `${r.left + (u.start.getTime() - n.start.getTime()) / (n.end.getTime() - n.start.getTime()) * r.width}px`,
|
|
1206
|
+
width: `${(u.end.getTime() - u.start.getTime()) / (n.end.getTime() - n.start.getTime()) * r.width}px`,
|
|
1207
|
+
backgroundColor: n.color || "#ADCFFE"
|
|
857
1208
|
},
|
|
858
1209
|
onClick: s,
|
|
859
|
-
onMouseDown: (
|
|
1210
|
+
onMouseDown: (E) => w(E, "move"),
|
|
860
1211
|
children: S(!0)
|
|
861
1212
|
}
|
|
862
|
-
) },
|
|
1213
|
+
) }, v)) }) : /* @__PURE__ */ e.jsx(Fe, { title: d, mouseEnterDelay: 0.5, children: /* @__PURE__ */ e.jsx(
|
|
863
1214
|
"div",
|
|
864
1215
|
{
|
|
865
|
-
className:
|
|
866
|
-
style:
|
|
1216
|
+
className: l(),
|
|
1217
|
+
style: x(),
|
|
867
1218
|
onClick: s,
|
|
868
|
-
onMouseDown: (u) =>
|
|
1219
|
+
onMouseDown: (u) => w(u, "move"),
|
|
869
1220
|
children: S()
|
|
870
1221
|
}
|
|
871
1222
|
) });
|
|
872
|
-
},
|
|
873
|
-
const i = (
|
|
874
|
-
const o = i(
|
|
875
|
-
if (!o || !
|
|
876
|
-
const
|
|
1223
|
+
}, Wn = ({ links: n, tasks: r, getTaskPosition: a }) => {
|
|
1224
|
+
const i = (c) => r.find((o) => o.id === c), s = (c) => {
|
|
1225
|
+
const o = i(c.source), p = i(c.target);
|
|
1226
|
+
if (!o || !p) return "";
|
|
1227
|
+
const w = a(o), l = a(p), x = w.top + w.height / 2, S = l.top + l.height / 2;
|
|
877
1228
|
let d = 0, u = 0;
|
|
878
|
-
switch (
|
|
1229
|
+
switch (c.type) {
|
|
879
1230
|
case "e2s":
|
|
880
|
-
d =
|
|
1231
|
+
d = w.left + w.width, u = l.left;
|
|
881
1232
|
break;
|
|
882
1233
|
case "s2s":
|
|
883
|
-
d =
|
|
1234
|
+
d = w.left, u = l.left;
|
|
884
1235
|
break;
|
|
885
1236
|
case "e2e":
|
|
886
|
-
d =
|
|
1237
|
+
d = w.left + w.width, u = l.left + l.width;
|
|
887
1238
|
break;
|
|
888
1239
|
case "s2e":
|
|
889
|
-
d =
|
|
1240
|
+
d = w.left, u = l.left + l.width;
|
|
890
1241
|
break;
|
|
891
1242
|
}
|
|
892
|
-
const
|
|
893
|
-
if (
|
|
894
|
-
if (
|
|
895
|
-
const
|
|
896
|
-
return `M ${d},${
|
|
1243
|
+
const v = u - d, E = S - x, f = 20;
|
|
1244
|
+
if (c.type === "e2s")
|
|
1245
|
+
if (v >= f) {
|
|
1246
|
+
const m = d + v / 2;
|
|
1247
|
+
return `M ${d},${x} L ${m},${x} L ${m},${S} L ${u},${S}`;
|
|
897
1248
|
} else {
|
|
898
|
-
const
|
|
899
|
-
return `M ${d},${
|
|
1249
|
+
const m = f / 2, $ = x + E / 2;
|
|
1250
|
+
return `M ${d},${x} L ${d + m},${x} L ${d + m},${$} L ${u - m},${$} L ${u - m},${S} L ${u},${S}`;
|
|
900
1251
|
}
|
|
901
|
-
else if (
|
|
902
|
-
const
|
|
903
|
-
return `M ${d},${
|
|
904
|
-
} else if (
|
|
905
|
-
const
|
|
906
|
-
return `M ${d},${
|
|
907
|
-
} else if (
|
|
908
|
-
if (
|
|
909
|
-
const
|
|
910
|
-
return `M ${d},${
|
|
1252
|
+
else if (c.type === "s2s") {
|
|
1253
|
+
const m = Math.min(d, u) - f / 2;
|
|
1254
|
+
return `M ${d},${x} L ${m},${x} L ${m},${S} L ${u},${S}`;
|
|
1255
|
+
} else if (c.type === "e2e") {
|
|
1256
|
+
const m = Math.max(d, u) + f / 2;
|
|
1257
|
+
return `M ${d},${x} L ${m},${x} L ${m},${S} L ${u},${S}`;
|
|
1258
|
+
} else if (c.type === "s2e")
|
|
1259
|
+
if (v <= -f) {
|
|
1260
|
+
const m = d + v / 2;
|
|
1261
|
+
return `M ${d},${x} L ${m},${x} L ${m},${S} L ${u},${S}`;
|
|
911
1262
|
} else {
|
|
912
|
-
const
|
|
913
|
-
return `M ${d},${
|
|
1263
|
+
const m = f / 2, $ = x + E / 2;
|
|
1264
|
+
return `M ${d},${x} L ${d - m},${x} L ${d - m},${$} L ${u + m},${$} L ${u + m},${S} L ${u},${S}`;
|
|
914
1265
|
}
|
|
915
1266
|
return "";
|
|
916
|
-
},
|
|
917
|
-
const o = i(
|
|
1267
|
+
}, g = (c) => {
|
|
1268
|
+
const o = i(c.target);
|
|
918
1269
|
if (!o) return "";
|
|
919
|
-
const
|
|
1270
|
+
const p = a(o), w = p.top + p.height / 2, l = 8, x = 6;
|
|
920
1271
|
let S = 0, d = !0;
|
|
921
|
-
return
|
|
1272
|
+
return c.type === "e2s" || c.type === "s2s" ? (S = p.left, d = !0) : (S = p.left + p.width, d = !1), d ? `M ${S},${w} L ${S - l},${w - x / 2} L ${S - l},${w + x / 2} Z` : `M ${S},${w} L ${S + l},${w - x / 2} L ${S + l},${w + x / 2} Z`;
|
|
922
1273
|
};
|
|
923
|
-
return /* @__PURE__ */ e.jsx("svg", { className: "gantt-links-layer", style: { overflow: "visible" }, children:
|
|
924
|
-
const o = i(
|
|
925
|
-
if (!o || !
|
|
926
|
-
const
|
|
1274
|
+
return /* @__PURE__ */ e.jsx("svg", { className: "gantt-links-layer", style: { overflow: "visible" }, children: n.map((c) => {
|
|
1275
|
+
const o = i(c.source), p = i(c.target);
|
|
1276
|
+
if (!o || !p) return null;
|
|
1277
|
+
const w = s(c), l = g(c);
|
|
927
1278
|
return /* @__PURE__ */ e.jsxs("g", { className: "gantt-link", children: [
|
|
928
1279
|
/* @__PURE__ */ e.jsx(
|
|
929
1280
|
"path",
|
|
930
1281
|
{
|
|
931
|
-
d:
|
|
1282
|
+
d: w,
|
|
932
1283
|
fill: "none",
|
|
933
1284
|
strokeWidth: "1.5",
|
|
934
1285
|
className: "gantt-link-line"
|
|
@@ -937,14 +1288,14 @@ const mn = ({
|
|
|
937
1288
|
/* @__PURE__ */ e.jsx(
|
|
938
1289
|
"path",
|
|
939
1290
|
{
|
|
940
|
-
d:
|
|
1291
|
+
d: l,
|
|
941
1292
|
className: "gantt-link-arrow"
|
|
942
1293
|
}
|
|
943
1294
|
)
|
|
944
|
-
] },
|
|
1295
|
+
] }, c.id);
|
|
945
1296
|
}) });
|
|
946
|
-
},
|
|
947
|
-
const [
|
|
1297
|
+
}, Un = (n, r, a = 60, i = "day", s = 1) => {
|
|
1298
|
+
const [g, c] = _({
|
|
948
1299
|
taskId: null,
|
|
949
1300
|
initialX: 0,
|
|
950
1301
|
initialY: 0,
|
|
@@ -953,11 +1304,11 @@ const mn = ({
|
|
|
953
1304
|
type: null,
|
|
954
1305
|
dragDeltaX: 0,
|
|
955
1306
|
dragDeltaY: 0
|
|
956
|
-
}), o =
|
|
957
|
-
const u =
|
|
958
|
-
u &&
|
|
959
|
-
taskId:
|
|
960
|
-
initialX:
|
|
1307
|
+
}), o = Te((l, x, S, d) => {
|
|
1308
|
+
const u = n.find((v) => v.id === l);
|
|
1309
|
+
u && c({
|
|
1310
|
+
taskId: l,
|
|
1311
|
+
initialX: x,
|
|
961
1312
|
initialY: S,
|
|
962
1313
|
initialStart: new Date(u.start),
|
|
963
1314
|
initialEnd: new Date(u.end),
|
|
@@ -965,42 +1316,42 @@ const mn = ({
|
|
|
965
1316
|
dragDeltaX: 0,
|
|
966
1317
|
dragDeltaY: 0
|
|
967
1318
|
});
|
|
968
|
-
}, [
|
|
969
|
-
if (!
|
|
970
|
-
const S =
|
|
971
|
-
if (
|
|
972
|
-
|
|
1319
|
+
}, [n]), p = Te((l, x) => {
|
|
1320
|
+
if (!g.taskId || !g.type) return null;
|
|
1321
|
+
const S = l - g.initialX, d = x - g.initialY;
|
|
1322
|
+
if (c(($) => ({
|
|
1323
|
+
...$,
|
|
973
1324
|
dragDeltaX: S,
|
|
974
1325
|
dragDeltaY: d
|
|
975
|
-
})),
|
|
976
|
-
const u =
|
|
1326
|
+
})), g.type === "reorder") return null;
|
|
1327
|
+
const u = n.find(($) => $.id === g.taskId);
|
|
977
1328
|
if (!u) return null;
|
|
978
|
-
const
|
|
979
|
-
let
|
|
980
|
-
switch (
|
|
1329
|
+
const v = Math.round(S / a);
|
|
1330
|
+
let E = new Date(g.initialStart), f = new Date(g.initialEnd);
|
|
1331
|
+
switch (g.type) {
|
|
981
1332
|
case "move":
|
|
982
|
-
|
|
1333
|
+
E = ge(g.initialStart, v * s, i), f = ge(g.initialEnd, v * s, i);
|
|
983
1334
|
break;
|
|
984
1335
|
case "resize-left":
|
|
985
|
-
|
|
1336
|
+
E = ge(g.initialStart, v * s, i), E >= f && (E = ge(f, -s, i));
|
|
986
1337
|
break;
|
|
987
1338
|
case "resize-right":
|
|
988
|
-
f =
|
|
1339
|
+
f = ge(g.initialEnd, v * s, i), f <= E && (f = ge(E, s, i));
|
|
989
1340
|
break;
|
|
990
1341
|
}
|
|
991
|
-
const
|
|
1342
|
+
const m = pt(E, f);
|
|
992
1343
|
return {
|
|
993
1344
|
...u,
|
|
994
|
-
start:
|
|
1345
|
+
start: E,
|
|
995
1346
|
end: f,
|
|
996
|
-
duration:
|
|
1347
|
+
duration: m
|
|
997
1348
|
};
|
|
998
|
-
}, [
|
|
999
|
-
if (
|
|
1000
|
-
const { id:
|
|
1001
|
-
|
|
1349
|
+
}, [g, n, a]), w = Te((l) => {
|
|
1350
|
+
if (l && r) {
|
|
1351
|
+
const { id: x, ...S } = l;
|
|
1352
|
+
r(x, S);
|
|
1002
1353
|
}
|
|
1003
|
-
|
|
1354
|
+
c({
|
|
1004
1355
|
taskId: null,
|
|
1005
1356
|
initialX: 0,
|
|
1006
1357
|
initialY: 0,
|
|
@@ -1010,217 +1361,217 @@ const mn = ({
|
|
|
1010
1361
|
dragDeltaX: 0,
|
|
1011
1362
|
dragDeltaY: 0
|
|
1012
1363
|
});
|
|
1013
|
-
}, [
|
|
1364
|
+
}, [r]);
|
|
1014
1365
|
return {
|
|
1015
|
-
dragState:
|
|
1366
|
+
dragState: g,
|
|
1016
1367
|
handleDragStart: o,
|
|
1017
|
-
handleDrag:
|
|
1018
|
-
handleDragEnd:
|
|
1368
|
+
handleDrag: p,
|
|
1369
|
+
handleDragEnd: w
|
|
1019
1370
|
};
|
|
1020
|
-
},
|
|
1371
|
+
}, en = kt(
|
|
1021
1372
|
({
|
|
1022
|
-
tasks:
|
|
1023
|
-
links:
|
|
1373
|
+
tasks: n,
|
|
1374
|
+
links: r,
|
|
1024
1375
|
range: a,
|
|
1025
1376
|
scales: i,
|
|
1026
1377
|
config: s,
|
|
1027
|
-
selectedTask:
|
|
1028
|
-
onTaskClick:
|
|
1378
|
+
selectedTask: g,
|
|
1379
|
+
onTaskClick: c,
|
|
1029
1380
|
onTaskDragStart: o,
|
|
1030
|
-
onTaskDragEnd:
|
|
1031
|
-
onTaskUpdate:
|
|
1032
|
-
zoomLevel:
|
|
1033
|
-
baselines:
|
|
1381
|
+
onTaskDragEnd: p,
|
|
1382
|
+
onTaskUpdate: w,
|
|
1383
|
+
zoomLevel: l,
|
|
1384
|
+
baselines: x
|
|
1034
1385
|
}, S) => {
|
|
1035
|
-
const [d, u] =
|
|
1386
|
+
const [d, u] = _(n), v = (s.columnWidth || 60) * l, E = s.baselines && x && x.size > 0, { dragState: f, handleDragStart: m, handleDrag: $, handleDragEnd: R } = Un(
|
|
1036
1387
|
d,
|
|
1037
|
-
|
|
1038
|
-
|
|
1388
|
+
w,
|
|
1389
|
+
v,
|
|
1039
1390
|
i[1].unit,
|
|
1040
1391
|
i[1].step
|
|
1041
1392
|
);
|
|
1042
|
-
|
|
1043
|
-
u(
|
|
1044
|
-
}, [
|
|
1045
|
-
const
|
|
1046
|
-
const
|
|
1047
|
-
let
|
|
1048
|
-
for (;
|
|
1049
|
-
|
|
1050
|
-
date: new Date(
|
|
1051
|
-
label:
|
|
1052
|
-
}),
|
|
1053
|
-
return
|
|
1054
|
-
},
|
|
1055
|
-
const
|
|
1393
|
+
Xe.useEffect(() => {
|
|
1394
|
+
u(n);
|
|
1395
|
+
}, [n]);
|
|
1396
|
+
const Y = (D) => {
|
|
1397
|
+
const M = [];
|
|
1398
|
+
let F = new Date(a.start);
|
|
1399
|
+
for (; F <= a.end; )
|
|
1400
|
+
M.push({
|
|
1401
|
+
date: new Date(F),
|
|
1402
|
+
label: we(F, D.format || "D")
|
|
1403
|
+
}), F = ge(F, D.step, D.unit);
|
|
1404
|
+
return M;
|
|
1405
|
+
}, B = (D) => {
|
|
1406
|
+
const M = i[1], F = a.start.getTime(), X = D.getTime() - F, le = {
|
|
1056
1407
|
hour: 36e5,
|
|
1057
1408
|
day: 864e5,
|
|
1058
1409
|
week: 6048e5,
|
|
1059
1410
|
month: 2592e6,
|
|
1060
1411
|
quarter: 7776e6,
|
|
1061
1412
|
year: 31536e6
|
|
1062
|
-
}[
|
|
1063
|
-
return
|
|
1064
|
-
},
|
|
1065
|
-
const
|
|
1413
|
+
}[M.unit] || 864e5;
|
|
1414
|
+
return X / (le * M.step) * v;
|
|
1415
|
+
}, te = (D) => {
|
|
1416
|
+
const M = B(D.start), F = B(D.end);
|
|
1066
1417
|
return {
|
|
1067
|
-
left:
|
|
1068
|
-
width: Math.max(
|
|
1418
|
+
left: M,
|
|
1419
|
+
width: Math.max(F - M, 0)
|
|
1069
1420
|
};
|
|
1070
|
-
},
|
|
1071
|
-
const
|
|
1421
|
+
}, fe = (D) => {
|
|
1422
|
+
const M = B(D.start), F = B(D.end);
|
|
1072
1423
|
return {
|
|
1073
|
-
left:
|
|
1074
|
-
width: Math.max(
|
|
1424
|
+
left: M,
|
|
1425
|
+
width: Math.max(F - M, 0)
|
|
1075
1426
|
};
|
|
1076
|
-
},
|
|
1077
|
-
const
|
|
1427
|
+
}, y = (D) => {
|
|
1428
|
+
const M = te(D), F = d.findIndex((le) => le.id === D.id), k = s.rowHeight || 48, X = 32, re = (k - X) / 2;
|
|
1078
1429
|
return {
|
|
1079
|
-
left:
|
|
1080
|
-
width:
|
|
1081
|
-
top:
|
|
1082
|
-
height:
|
|
1430
|
+
left: M.left,
|
|
1431
|
+
width: M.width,
|
|
1432
|
+
top: F * k + re,
|
|
1433
|
+
height: X
|
|
1083
1434
|
};
|
|
1084
|
-
},
|
|
1435
|
+
}, z = Te((D) => {
|
|
1085
1436
|
if (f.taskId && f.type) {
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1088
|
-
(
|
|
1437
|
+
const M = $(D.clientX, D.clientY);
|
|
1438
|
+
M && u(
|
|
1439
|
+
(F) => F.map((k) => k.id === M.id ? M : k)
|
|
1089
1440
|
);
|
|
1090
1441
|
}
|
|
1091
|
-
}, [f,
|
|
1442
|
+
}, [f, $]), J = Te(() => {
|
|
1092
1443
|
if (f.taskId) {
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1444
|
+
const D = d.find((M) => M.id === f.taskId);
|
|
1445
|
+
R(D || null), p();
|
|
1095
1446
|
}
|
|
1096
|
-
}, [f, d,
|
|
1097
|
-
const
|
|
1098
|
-
let
|
|
1099
|
-
return
|
|
1100
|
-
const
|
|
1101
|
-
|
|
1102
|
-
}),
|
|
1103
|
-
},
|
|
1104
|
-
const
|
|
1105
|
-
let
|
|
1106
|
-
return
|
|
1107
|
-
const
|
|
1108
|
-
|
|
1109
|
-
}),
|
|
1110
|
-
},
|
|
1447
|
+
}, [f, d, R, p]), Z = i[1], O = Y(Z), ne = () => {
|
|
1448
|
+
const D = [];
|
|
1449
|
+
let M = -1, F = -1, k = 0, X = "";
|
|
1450
|
+
return O.forEach((re) => {
|
|
1451
|
+
const le = re.date.getMonth(), Me = re.date.getFullYear(), Se = we(re.date, "MMM YYYY");
|
|
1452
|
+
le !== M || Me !== F ? (M !== -1 && D.push({ label: X, width: k }), M = le, F = Me, k = v, X = Se) : k += v;
|
|
1453
|
+
}), M !== -1 && D.push({ label: X, width: k }), D;
|
|
1454
|
+
}, oe = () => {
|
|
1455
|
+
const D = [];
|
|
1456
|
+
let M = -1, F = 0, k = -1, X = -1, re = "";
|
|
1457
|
+
return O.forEach((le) => {
|
|
1458
|
+
const Se = le.date.getDate() <= 15 ? 0 : 1, ye = le.date.getMonth(), Ce = le.date.getFullYear(), Ee = we(le.date, "MMM"), Oe = new Date(Ce, ye + 1, 0).getDate(), Le = Se === 0 ? `${Ee} 1 - 15` : `${Ee} 16 - ${Oe}`;
|
|
1459
|
+
Se !== M || ye !== k || Ce !== X ? (M !== -1 && D.push({ label: re, width: F }), M = Se, k = ye, X = Ce, F = v, re = Le) : F += v;
|
|
1460
|
+
}), M !== -1 && D.push({ label: re, width: F }), D;
|
|
1461
|
+
}, me = ne(), de = oe(), V = O.length * v;
|
|
1111
1462
|
return /* @__PURE__ */ e.jsxs(
|
|
1112
1463
|
"div",
|
|
1113
1464
|
{
|
|
1114
1465
|
className: "gantt-timeline-container",
|
|
1115
1466
|
ref: S,
|
|
1116
|
-
onMouseMove:
|
|
1117
|
-
onMouseUp:
|
|
1118
|
-
style: { width:
|
|
1467
|
+
onMouseMove: z,
|
|
1468
|
+
onMouseUp: J,
|
|
1469
|
+
style: { width: V },
|
|
1119
1470
|
children: [
|
|
1120
|
-
/* @__PURE__ */ e.jsxs("div", { className: "gantt-timeline-header", style: { width:
|
|
1121
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-month", style: { width:
|
|
1471
|
+
/* @__PURE__ */ e.jsxs("div", { className: "gantt-timeline-header", style: { width: V, minWidth: V }, children: [
|
|
1472
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-month", style: { width: V }, children: me.map((D, M) => /* @__PURE__ */ e.jsx(
|
|
1122
1473
|
"div",
|
|
1123
1474
|
{
|
|
1124
1475
|
className: "gantt-timeline-cell",
|
|
1125
1476
|
style: {
|
|
1126
|
-
width:
|
|
1127
|
-
minWidth:
|
|
1128
|
-
maxWidth:
|
|
1129
|
-
borderRight:
|
|
1477
|
+
width: D.width,
|
|
1478
|
+
minWidth: D.width,
|
|
1479
|
+
maxWidth: D.width,
|
|
1480
|
+
borderRight: M === me.length - 1 ? "none" : "var(--wx-gantt-border)"
|
|
1130
1481
|
},
|
|
1131
|
-
children:
|
|
1482
|
+
children: D.label
|
|
1132
1483
|
},
|
|
1133
|
-
`top-${
|
|
1484
|
+
`top-${M}`
|
|
1134
1485
|
)) }),
|
|
1135
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-range", style: { width:
|
|
1486
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-range", style: { width: V }, children: de.map((D, M) => /* @__PURE__ */ e.jsx(
|
|
1136
1487
|
"div",
|
|
1137
1488
|
{
|
|
1138
1489
|
className: "gantt-timeline-cell",
|
|
1139
1490
|
style: {
|
|
1140
|
-
width:
|
|
1141
|
-
minWidth:
|
|
1142
|
-
maxWidth:
|
|
1143
|
-
borderRight:
|
|
1491
|
+
width: D.width,
|
|
1492
|
+
minWidth: D.width,
|
|
1493
|
+
maxWidth: D.width,
|
|
1494
|
+
borderRight: M === de.length - 1 ? "none" : "var(--wx-gantt-border)"
|
|
1144
1495
|
},
|
|
1145
|
-
children:
|
|
1496
|
+
children: D.label
|
|
1146
1497
|
},
|
|
1147
|
-
`mid-${
|
|
1498
|
+
`mid-${M}`
|
|
1148
1499
|
)) }),
|
|
1149
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-day", style: { width:
|
|
1150
|
-
const
|
|
1500
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-day", style: { width: V }, children: O.map((D, M) => {
|
|
1501
|
+
const F = s.weekends && At(D.date), k = s.holidays && Bt(D.date, s.holidays);
|
|
1151
1502
|
return /* @__PURE__ */ e.jsx(
|
|
1152
1503
|
"div",
|
|
1153
1504
|
{
|
|
1154
|
-
className: `gantt-timeline-cell ${
|
|
1505
|
+
className: `gantt-timeline-cell ${F ? "weekend" : ""} ${k ? "holiday" : ""}`,
|
|
1155
1506
|
style: {
|
|
1156
|
-
width:
|
|
1157
|
-
minWidth:
|
|
1158
|
-
maxWidth:
|
|
1159
|
-
borderRight:
|
|
1507
|
+
width: v,
|
|
1508
|
+
minWidth: v,
|
|
1509
|
+
maxWidth: v,
|
|
1510
|
+
borderRight: M === O.length - 1 ? "none" : "var(--wx-gantt-border)"
|
|
1160
1511
|
},
|
|
1161
|
-
children:
|
|
1512
|
+
children: D.label
|
|
1162
1513
|
},
|
|
1163
|
-
`day-${
|
|
1514
|
+
`day-${M}`
|
|
1164
1515
|
);
|
|
1165
1516
|
}) })
|
|
1166
1517
|
] }),
|
|
1167
|
-
/* @__PURE__ */ e.jsxs("div", { className: "gantt-timeline-body", style: { width:
|
|
1168
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-grid", children:
|
|
1169
|
-
const
|
|
1518
|
+
/* @__PURE__ */ e.jsxs("div", { className: "gantt-timeline-body", style: { width: V }, children: [
|
|
1519
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-grid", children: O.map((D, M) => {
|
|
1520
|
+
const F = s.weekends && At(D.date), k = s.holidays && Bt(D.date, s.holidays);
|
|
1170
1521
|
return /* @__PURE__ */ e.jsx(
|
|
1171
1522
|
"div",
|
|
1172
1523
|
{
|
|
1173
|
-
className: `gantt-timeline-grid-column ${
|
|
1174
|
-
style: { width:
|
|
1524
|
+
className: `gantt-timeline-grid-column ${F ? "weekend" : ""} ${k ? "holiday" : ""}`,
|
|
1525
|
+
style: { width: v, minWidth: v }
|
|
1175
1526
|
},
|
|
1176
|
-
|
|
1527
|
+
M
|
|
1177
1528
|
);
|
|
1178
1529
|
}) }),
|
|
1179
|
-
|
|
1180
|
-
|
|
1530
|
+
r.length > 0 && /* @__PURE__ */ e.jsx(
|
|
1531
|
+
Wn,
|
|
1181
1532
|
{
|
|
1182
|
-
links:
|
|
1533
|
+
links: r,
|
|
1183
1534
|
tasks: d,
|
|
1184
|
-
getTaskPosition:
|
|
1535
|
+
getTaskPosition: y
|
|
1185
1536
|
}
|
|
1186
1537
|
),
|
|
1187
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-tasks", style: { width:
|
|
1188
|
-
const
|
|
1538
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-tasks", style: { width: V }, children: d.map((D) => {
|
|
1539
|
+
const M = te(D), F = E ? x?.get(D.id) : void 0, k = F ? fe(F) : void 0;
|
|
1189
1540
|
return /* @__PURE__ */ e.jsxs(
|
|
1190
1541
|
"div",
|
|
1191
1542
|
{
|
|
1192
1543
|
className: "gantt-timeline-row",
|
|
1193
1544
|
children: [
|
|
1194
|
-
|
|
1545
|
+
F && k && D.type !== "milestone" && /* @__PURE__ */ e.jsx(
|
|
1195
1546
|
"div",
|
|
1196
1547
|
{
|
|
1197
1548
|
className: "gantt-baseline-bar",
|
|
1198
1549
|
style: {
|
|
1199
|
-
left: `${
|
|
1200
|
-
width: `${
|
|
1550
|
+
left: `${k.left}px`,
|
|
1551
|
+
width: `${k.width}px`
|
|
1201
1552
|
},
|
|
1202
|
-
title: `Baseline: ${
|
|
1553
|
+
title: `Baseline: ${F.start.toLocaleDateString()} - ${F.end.toLocaleDateString()}`
|
|
1203
1554
|
}
|
|
1204
1555
|
),
|
|
1205
1556
|
/* @__PURE__ */ e.jsx(
|
|
1206
|
-
|
|
1557
|
+
Hn,
|
|
1207
1558
|
{
|
|
1208
|
-
task:
|
|
1209
|
-
position:
|
|
1210
|
-
selected:
|
|
1211
|
-
dragging: f.taskId ===
|
|
1559
|
+
task: D,
|
|
1560
|
+
position: M,
|
|
1561
|
+
selected: g === D.id,
|
|
1562
|
+
dragging: f.taskId === D.id,
|
|
1212
1563
|
dragDeltaX: f.dragDeltaX,
|
|
1213
1564
|
dragType: f.type,
|
|
1214
|
-
onClick: () =>
|
|
1215
|
-
onDragStart: (
|
|
1216
|
-
|
|
1565
|
+
onClick: () => c(D.id),
|
|
1566
|
+
onDragStart: (X, re, le) => {
|
|
1567
|
+
m(D.id, X, re, le), o(D.id, X, re);
|
|
1217
1568
|
},
|
|
1218
1569
|
readonly: s.readonly
|
|
1219
1570
|
}
|
|
1220
1571
|
)
|
|
1221
1572
|
]
|
|
1222
1573
|
},
|
|
1223
|
-
|
|
1574
|
+
D.id
|
|
1224
1575
|
);
|
|
1225
1576
|
}) })
|
|
1226
1577
|
] })
|
|
@@ -1229,30 +1580,30 @@ const mn = ({
|
|
|
1229
1580
|
);
|
|
1230
1581
|
}
|
|
1231
1582
|
);
|
|
1232
|
-
|
|
1233
|
-
const
|
|
1234
|
-
|
|
1235
|
-
const { Search:
|
|
1236
|
-
const [a, i] =
|
|
1583
|
+
en.displayName = "Timeline";
|
|
1584
|
+
const tn = kt((n, r) => /* @__PURE__ */ e.jsx("div", { className: "gantt-chart-wrapper", style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ e.jsx(en, { ...n, ref: r }) }));
|
|
1585
|
+
tn.displayName = "Chart";
|
|
1586
|
+
const { Search: Vn } = Pe, Jn = ({ onFilterChange: n, owners: r = [] }) => {
|
|
1587
|
+
const [a, i] = _({
|
|
1237
1588
|
searchText: "",
|
|
1238
1589
|
status: "all",
|
|
1239
1590
|
priority: "all",
|
|
1240
1591
|
owner: ""
|
|
1241
1592
|
}), s = (o) => {
|
|
1242
|
-
const
|
|
1243
|
-
i(
|
|
1244
|
-
},
|
|
1593
|
+
const p = { ...a, ...o };
|
|
1594
|
+
i(p), n(p);
|
|
1595
|
+
}, g = () => {
|
|
1245
1596
|
const o = {
|
|
1246
1597
|
searchText: "",
|
|
1247
1598
|
status: "all",
|
|
1248
1599
|
priority: "all",
|
|
1249
1600
|
owner: ""
|
|
1250
1601
|
};
|
|
1251
|
-
i(o),
|
|
1252
|
-
},
|
|
1602
|
+
i(o), n(o);
|
|
1603
|
+
}, c = a.searchText !== "" || a.status !== "all" || a.priority !== "all" || a.owner !== "";
|
|
1253
1604
|
return /* @__PURE__ */ e.jsx("div", { className: "gantt-filter-container", children: /* @__PURE__ */ e.jsxs("div", { className: "gantt-filter-bar", children: [
|
|
1254
1605
|
/* @__PURE__ */ e.jsx("div", { className: "gantt-filter-left", children: /* @__PURE__ */ e.jsx(
|
|
1255
|
-
|
|
1606
|
+
Vn,
|
|
1256
1607
|
{
|
|
1257
1608
|
placeholder: "Search tasks...",
|
|
1258
1609
|
value: a.searchText,
|
|
@@ -1264,7 +1615,7 @@ const { Search: wn } = ye, bn = ({ onFilterChange: t, owners: n = [] }) => {
|
|
|
1264
1615
|
) }),
|
|
1265
1616
|
/* @__PURE__ */ e.jsxs("div", { className: "gantt-filter-right", children: [
|
|
1266
1617
|
/* @__PURE__ */ e.jsx(
|
|
1267
|
-
|
|
1618
|
+
xe,
|
|
1268
1619
|
{
|
|
1269
1620
|
value: a.status,
|
|
1270
1621
|
onChange: (o) => s({ status: o }),
|
|
@@ -1279,7 +1630,7 @@ const { Search: wn } = ye, bn = ({ onFilterChange: t, owners: n = [] }) => {
|
|
|
1279
1630
|
}
|
|
1280
1631
|
),
|
|
1281
1632
|
/* @__PURE__ */ e.jsx(
|
|
1282
|
-
|
|
1633
|
+
xe,
|
|
1283
1634
|
{
|
|
1284
1635
|
value: a.priority,
|
|
1285
1636
|
onChange: (o) => s({ priority: o }),
|
|
@@ -1294,7 +1645,7 @@ const { Search: wn } = ye, bn = ({ onFilterChange: t, owners: n = [] }) => {
|
|
|
1294
1645
|
}
|
|
1295
1646
|
),
|
|
1296
1647
|
/* @__PURE__ */ e.jsx(
|
|
1297
|
-
|
|
1648
|
+
xe,
|
|
1298
1649
|
{
|
|
1299
1650
|
value: a.owner || void 0,
|
|
1300
1651
|
onChange: (o) => s({ owner: o || "" }),
|
|
@@ -1304,135 +1655,135 @@ const { Search: wn } = ye, bn = ({ onFilterChange: t, owners: n = [] }) => {
|
|
|
1304
1655
|
allowClear: !0,
|
|
1305
1656
|
options: [
|
|
1306
1657
|
{ value: "", label: "All Owners" },
|
|
1307
|
-
...(
|
|
1658
|
+
...(r || []).map((o) => ({ value: o, label: o }))
|
|
1308
1659
|
]
|
|
1309
1660
|
}
|
|
1310
1661
|
),
|
|
1311
|
-
|
|
1312
|
-
|
|
1662
|
+
c && /* @__PURE__ */ e.jsx(
|
|
1663
|
+
ie,
|
|
1313
1664
|
{
|
|
1314
1665
|
type: "default",
|
|
1315
1666
|
danger: !0,
|
|
1316
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1317
|
-
onClick:
|
|
1667
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: mn }),
|
|
1668
|
+
onClick: g,
|
|
1318
1669
|
className: "gantt-filter-clear-antd",
|
|
1319
1670
|
children: "Clear"
|
|
1320
1671
|
}
|
|
1321
1672
|
)
|
|
1322
1673
|
] })
|
|
1323
1674
|
] }) });
|
|
1324
|
-
},
|
|
1325
|
-
if (
|
|
1326
|
-
const i =
|
|
1327
|
-
if (!s && !
|
|
1675
|
+
}, Xn = (n, r) => n.filter((a) => {
|
|
1676
|
+
if (r.searchText) {
|
|
1677
|
+
const i = r.searchText.toLowerCase(), s = a.text.toLowerCase().includes(i), g = a.owner?.toLowerCase().includes(i), c = a.details?.toLowerCase().includes(i);
|
|
1678
|
+
if (!s && !g && !c)
|
|
1328
1679
|
return !1;
|
|
1329
1680
|
}
|
|
1330
|
-
if (
|
|
1681
|
+
if (r.status !== "all" && (a.progress === 0 ? "not-started" : a.progress === 100 ? "completed" : "in-progress") !== r.status || r.priority !== "all" && a.priority !== r.priority || r.owner && a.owner !== r.owner)
|
|
1331
1682
|
return !1;
|
|
1332
|
-
if (
|
|
1333
|
-
const i = a.start.getTime(), s =
|
|
1334
|
-
if (i < s || i >
|
|
1683
|
+
if (r.dateRange) {
|
|
1684
|
+
const i = a.start.getTime(), s = r.dateRange.start.getTime(), g = r.dateRange.end.getTime();
|
|
1685
|
+
if (i < s || i > g)
|
|
1335
1686
|
return !1;
|
|
1336
1687
|
}
|
|
1337
1688
|
return !0;
|
|
1338
|
-
}),
|
|
1339
|
-
zoomLevel:
|
|
1340
|
-
setZoomLevel:
|
|
1689
|
+
}), Gn = ({
|
|
1690
|
+
zoomLevel: n,
|
|
1691
|
+
setZoomLevel: r,
|
|
1341
1692
|
onBaselineToggle: a,
|
|
1342
1693
|
showBaselines: i,
|
|
1343
1694
|
onExport: s,
|
|
1344
|
-
onFilterChange:
|
|
1345
|
-
owners:
|
|
1695
|
+
onFilterChange: g,
|
|
1696
|
+
owners: c,
|
|
1346
1697
|
onAddTask: o
|
|
1347
1698
|
}) => /* @__PURE__ */ e.jsxs("div", { className: "gantt-toolbar-wrapper", children: [
|
|
1348
1699
|
/* @__PURE__ */ e.jsxs("div", { className: "gantt-toolbar", children: [
|
|
1349
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-toolbar-left", children: /* @__PURE__ */ e.jsxs(
|
|
1700
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-toolbar-left", children: /* @__PURE__ */ e.jsxs(De, { size: 8, children: [
|
|
1350
1701
|
/* @__PURE__ */ e.jsx(
|
|
1351
|
-
|
|
1702
|
+
ie,
|
|
1352
1703
|
{
|
|
1353
1704
|
type: "primary",
|
|
1354
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1705
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: at }),
|
|
1355
1706
|
onClick: o,
|
|
1356
1707
|
children: "New Task"
|
|
1357
1708
|
}
|
|
1358
1709
|
),
|
|
1359
|
-
/* @__PURE__ */ e.jsx(
|
|
1360
|
-
|
|
1710
|
+
/* @__PURE__ */ e.jsx(Fe, { title: i ? "Hide Baselines" : "Show Baselines", children: /* @__PURE__ */ e.jsx(
|
|
1711
|
+
ie,
|
|
1361
1712
|
{
|
|
1362
1713
|
type: i ? "primary" : "default",
|
|
1363
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1714
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: yn }),
|
|
1364
1715
|
onClick: a,
|
|
1365
1716
|
children: i ? "Baselines" : "Set Baseline"
|
|
1366
1717
|
}
|
|
1367
1718
|
) })
|
|
1368
1719
|
] }) }),
|
|
1369
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-toolbar-right", children: /* @__PURE__ */ e.jsxs(
|
|
1370
|
-
/* @__PURE__ */ e.jsx(
|
|
1371
|
-
|
|
1720
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-toolbar-right", children: /* @__PURE__ */ e.jsxs(De, { size: 4, children: [
|
|
1721
|
+
/* @__PURE__ */ e.jsx(Fe, { title: "Zoom Out", children: /* @__PURE__ */ e.jsx(
|
|
1722
|
+
ie,
|
|
1372
1723
|
{
|
|
1373
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1374
|
-
onClick: () =>
|
|
1724
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: jn }),
|
|
1725
|
+
onClick: () => r(Math.max(0.5, n - 0.25))
|
|
1375
1726
|
}
|
|
1376
1727
|
) }),
|
|
1377
|
-
/* @__PURE__ */ e.jsx(
|
|
1378
|
-
|
|
1728
|
+
/* @__PURE__ */ e.jsx(Fe, { title: "Zoom In", children: /* @__PURE__ */ e.jsx(
|
|
1729
|
+
ie,
|
|
1379
1730
|
{
|
|
1380
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1381
|
-
onClick: () =>
|
|
1731
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: wn }),
|
|
1732
|
+
onClick: () => r(Math.min(2, n + 0.25))
|
|
1382
1733
|
}
|
|
1383
1734
|
) }),
|
|
1384
|
-
/* @__PURE__ */ e.jsx(
|
|
1385
|
-
|
|
1735
|
+
/* @__PURE__ */ e.jsx(Fe, { title: "Reset Zoom", children: /* @__PURE__ */ e.jsx(
|
|
1736
|
+
ie,
|
|
1386
1737
|
{
|
|
1387
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1388
|
-
onClick: () =>
|
|
1738
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: Gt }),
|
|
1739
|
+
onClick: () => r(1)
|
|
1389
1740
|
}
|
|
1390
1741
|
) }),
|
|
1391
|
-
/* @__PURE__ */ e.jsx(
|
|
1392
|
-
/* @__PURE__ */ e.jsx(
|
|
1393
|
-
|
|
1742
|
+
/* @__PURE__ */ e.jsx(ht, { type: "vertical", style: { height: 24, margin: "0 4px" } }),
|
|
1743
|
+
/* @__PURE__ */ e.jsx(Fe, { title: "Export to CSV", children: /* @__PURE__ */ e.jsx(
|
|
1744
|
+
ie,
|
|
1394
1745
|
{
|
|
1395
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1746
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: vn }),
|
|
1396
1747
|
onClick: () => s("csv")
|
|
1397
1748
|
}
|
|
1398
1749
|
) }),
|
|
1399
|
-
/* @__PURE__ */ e.jsx(
|
|
1400
|
-
|
|
1750
|
+
/* @__PURE__ */ e.jsx(Fe, { title: "Export to Excel", children: /* @__PURE__ */ e.jsx(
|
|
1751
|
+
ie,
|
|
1401
1752
|
{
|
|
1402
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1753
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: bn }),
|
|
1403
1754
|
onClick: () => s("excel")
|
|
1404
1755
|
}
|
|
1405
1756
|
) }),
|
|
1406
|
-
/* @__PURE__ */ e.jsx(
|
|
1407
|
-
|
|
1757
|
+
/* @__PURE__ */ e.jsx(Fe, { title: "Export to JSON", children: /* @__PURE__ */ e.jsx(
|
|
1758
|
+
ie,
|
|
1408
1759
|
{
|
|
1409
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1760
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: Sn }),
|
|
1410
1761
|
onClick: () => s("json")
|
|
1411
1762
|
}
|
|
1412
1763
|
) }),
|
|
1413
|
-
/* @__PURE__ */ e.jsx(
|
|
1414
|
-
|
|
1764
|
+
/* @__PURE__ */ e.jsx(Fe, { title: "Export to PDF", children: /* @__PURE__ */ e.jsx(
|
|
1765
|
+
ie,
|
|
1415
1766
|
{
|
|
1416
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1767
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: Dn }),
|
|
1417
1768
|
onClick: () => s("pdf")
|
|
1418
1769
|
}
|
|
1419
1770
|
) })
|
|
1420
1771
|
] }) })
|
|
1421
1772
|
] }),
|
|
1422
1773
|
/* @__PURE__ */ e.jsx(
|
|
1423
|
-
|
|
1774
|
+
Jn,
|
|
1424
1775
|
{
|
|
1425
|
-
onFilterChange:
|
|
1426
|
-
owners:
|
|
1776
|
+
onFilterChange: g,
|
|
1777
|
+
owners: c
|
|
1427
1778
|
}
|
|
1428
1779
|
)
|
|
1429
|
-
] }), { Option:
|
|
1430
|
-
const [a] =
|
|
1431
|
-
const
|
|
1432
|
-
|
|
1780
|
+
] }), { Option: Ue } = xe, { TextArea: qn } = Pe, Kn = ({ onCreateTask: n, onClose: r }) => {
|
|
1781
|
+
const [a] = q.useForm(), i = (s) => {
|
|
1782
|
+
const g = s.start.toDate(), c = new Date(g);
|
|
1783
|
+
c.setDate(c.getDate() + (s.duration || 1)), n({
|
|
1433
1784
|
text: s.text,
|
|
1434
|
-
start:
|
|
1435
|
-
end:
|
|
1785
|
+
start: g,
|
|
1786
|
+
end: c,
|
|
1436
1787
|
duration: s.duration || 1,
|
|
1437
1788
|
progress: s.progress || 0,
|
|
1438
1789
|
type: s.type,
|
|
@@ -1440,21 +1791,21 @@ const { Search: wn } = ye, bn = ({ onFilterChange: t, owners: n = [] }) => {
|
|
|
1440
1791
|
owner: s.owner || "",
|
|
1441
1792
|
priority: s.priority || "medium",
|
|
1442
1793
|
details: s.details || ""
|
|
1443
|
-
}),
|
|
1794
|
+
}), r();
|
|
1444
1795
|
};
|
|
1445
1796
|
return /* @__PURE__ */ e.jsx(
|
|
1446
|
-
|
|
1797
|
+
xt,
|
|
1447
1798
|
{
|
|
1448
1799
|
title: "Create New Task",
|
|
1449
1800
|
open: !0,
|
|
1450
|
-
onCancel:
|
|
1801
|
+
onCancel: r,
|
|
1451
1802
|
onOk: () => a.submit(),
|
|
1452
1803
|
okText: "Create Task",
|
|
1453
1804
|
cancelText: "Cancel",
|
|
1454
1805
|
width: 600,
|
|
1455
1806
|
className: "gantt-modal-antd",
|
|
1456
1807
|
children: /* @__PURE__ */ e.jsxs(
|
|
1457
|
-
|
|
1808
|
+
q,
|
|
1458
1809
|
{
|
|
1459
1810
|
form: a,
|
|
1460
1811
|
layout: "vertical",
|
|
@@ -1462,56 +1813,56 @@ const { Search: wn } = ye, bn = ({ onFilterChange: t, owners: n = [] }) => {
|
|
|
1462
1813
|
initialValues: {
|
|
1463
1814
|
type: "task",
|
|
1464
1815
|
priority: "medium",
|
|
1465
|
-
start:
|
|
1816
|
+
start: Zt(),
|
|
1466
1817
|
duration: 1,
|
|
1467
1818
|
progress: 0,
|
|
1468
1819
|
color: "#4A90E2"
|
|
1469
1820
|
},
|
|
1470
1821
|
children: [
|
|
1471
1822
|
/* @__PURE__ */ e.jsx(
|
|
1472
|
-
|
|
1823
|
+
q.Item,
|
|
1473
1824
|
{
|
|
1474
1825
|
name: "text",
|
|
1475
1826
|
label: "Task Name",
|
|
1476
1827
|
rules: [{ required: !0, message: "Please enter task name" }],
|
|
1477
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1828
|
+
children: /* @__PURE__ */ e.jsx(Pe, { placeholder: "Enter task name", autoFocus: !0 })
|
|
1478
1829
|
}
|
|
1479
1830
|
),
|
|
1480
1831
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
|
|
1481
|
-
/* @__PURE__ */ e.jsx(
|
|
1482
|
-
/* @__PURE__ */ e.jsx(
|
|
1483
|
-
/* @__PURE__ */ e.jsx(
|
|
1484
|
-
/* @__PURE__ */ e.jsx(
|
|
1832
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "type", label: "Type", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(xe, { children: [
|
|
1833
|
+
/* @__PURE__ */ e.jsx(Ue, { value: "task", children: "Task" }),
|
|
1834
|
+
/* @__PURE__ */ e.jsx(Ue, { value: "milestone", children: "Milestone" }),
|
|
1835
|
+
/* @__PURE__ */ e.jsx(Ue, { value: "project", children: "Project" })
|
|
1485
1836
|
] }) }),
|
|
1486
|
-
/* @__PURE__ */ e.jsx(
|
|
1487
|
-
/* @__PURE__ */ e.jsx(
|
|
1488
|
-
/* @__PURE__ */ e.jsx(
|
|
1489
|
-
/* @__PURE__ */ e.jsx(
|
|
1837
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "priority", label: "Priority", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(xe, { children: [
|
|
1838
|
+
/* @__PURE__ */ e.jsx(Ue, { value: "low", children: "Low" }),
|
|
1839
|
+
/* @__PURE__ */ e.jsx(Ue, { value: "medium", children: "Medium" }),
|
|
1840
|
+
/* @__PURE__ */ e.jsx(Ue, { value: "high", children: "High" })
|
|
1490
1841
|
] }) })
|
|
1491
1842
|
] }),
|
|
1492
1843
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
|
|
1493
|
-
/* @__PURE__ */ e.jsx(
|
|
1494
|
-
/* @__PURE__ */ e.jsx(
|
|
1844
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "start", label: "Start Date", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Ut, { style: { width: "100%" } }) }),
|
|
1845
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "duration", label: "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Ge, { min: 0, style: { width: "100%" } }) })
|
|
1495
1846
|
] }),
|
|
1496
1847
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
|
|
1497
|
-
/* @__PURE__ */ e.jsx(
|
|
1498
|
-
/* @__PURE__ */ e.jsx(
|
|
1848
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "color", label: "Color", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Vt, { showText: !0 }) }),
|
|
1849
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "progress", label: "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Ge, { min: 0, max: 100, style: { width: "100%" } }) })
|
|
1499
1850
|
] }),
|
|
1500
|
-
/* @__PURE__ */ e.jsx(
|
|
1501
|
-
/* @__PURE__ */ e.jsx(
|
|
1851
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "owner", label: "Owner", children: /* @__PURE__ */ e.jsx(Pe, { placeholder: "Assign to..." }) }),
|
|
1852
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "details", label: "Details", children: /* @__PURE__ */ e.jsx(qn, { placeholder: "Add task description...", rows: 3 }) })
|
|
1502
1853
|
]
|
|
1503
1854
|
}
|
|
1504
1855
|
)
|
|
1505
1856
|
}
|
|
1506
1857
|
);
|
|
1507
|
-
}, { Option:
|
|
1508
|
-
const [s] =
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1511
|
-
...
|
|
1858
|
+
}, { Option: Ve } = xe, { TextArea: Zn } = Pe, { confirm: Qn } = xt, er = ({ task: n, onUpdate: r, onDelete: a, onClose: i }) => {
|
|
1859
|
+
const [s] = q.useForm(), g = (o) => {
|
|
1860
|
+
const p = o.start.toDate(), w = new Date(p);
|
|
1861
|
+
w.setDate(w.getDate() + (o.duration || 1)), r({
|
|
1862
|
+
...n,
|
|
1512
1863
|
text: o.text,
|
|
1513
|
-
start:
|
|
1514
|
-
end:
|
|
1864
|
+
start: p,
|
|
1865
|
+
end: w,
|
|
1515
1866
|
duration: o.duration || 1,
|
|
1516
1867
|
progress: o.progress || 0,
|
|
1517
1868
|
type: o.type,
|
|
@@ -1520,116 +1871,116 @@ const { Search: wn } = ye, bn = ({ onFilterChange: t, owners: n = [] }) => {
|
|
|
1520
1871
|
priority: o.priority || "medium",
|
|
1521
1872
|
details: o.details || ""
|
|
1522
1873
|
}), i();
|
|
1523
|
-
},
|
|
1524
|
-
|
|
1525
|
-
title: `Are you sure you want to delete "${
|
|
1526
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1874
|
+
}, c = () => {
|
|
1875
|
+
Qn({
|
|
1876
|
+
title: `Are you sure you want to delete "${n.text}"?`,
|
|
1877
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: Tn, style: { color: "#faad14", marginRight: 8 } }),
|
|
1527
1878
|
content: "This action cannot be undone.",
|
|
1528
1879
|
okText: "Yes, Delete",
|
|
1529
1880
|
okType: "danger",
|
|
1530
1881
|
cancelText: "No",
|
|
1531
1882
|
onOk() {
|
|
1532
|
-
a(
|
|
1883
|
+
a(n.id), i();
|
|
1533
1884
|
}
|
|
1534
1885
|
});
|
|
1535
1886
|
};
|
|
1536
1887
|
return /* @__PURE__ */ e.jsx(
|
|
1537
|
-
|
|
1888
|
+
xt,
|
|
1538
1889
|
{
|
|
1539
1890
|
title: "Edit Task",
|
|
1540
1891
|
open: !0,
|
|
1541
1892
|
onCancel: i,
|
|
1542
1893
|
footer: [
|
|
1543
|
-
/* @__PURE__ */ e.jsx(
|
|
1544
|
-
/* @__PURE__ */ e.jsx(
|
|
1545
|
-
/* @__PURE__ */ e.jsx(
|
|
1894
|
+
/* @__PURE__ */ e.jsx(ie, { danger: !0, onClick: c, style: { float: "left" }, children: "Delete" }, "delete"),
|
|
1895
|
+
/* @__PURE__ */ e.jsx(ie, { onClick: i, children: "Cancel" }, "cancel"),
|
|
1896
|
+
/* @__PURE__ */ e.jsx(ie, { type: "primary", onClick: () => s.submit(), children: "Save Changes" }, "submit")
|
|
1546
1897
|
],
|
|
1547
1898
|
width: 600,
|
|
1548
1899
|
className: "gantt-modal-antd",
|
|
1549
1900
|
children: /* @__PURE__ */ e.jsxs(
|
|
1550
|
-
|
|
1901
|
+
q,
|
|
1551
1902
|
{
|
|
1552
1903
|
form: s,
|
|
1553
1904
|
layout: "vertical",
|
|
1554
|
-
onFinish:
|
|
1905
|
+
onFinish: g,
|
|
1555
1906
|
initialValues: {
|
|
1556
|
-
text:
|
|
1557
|
-
type:
|
|
1558
|
-
priority:
|
|
1559
|
-
start:
|
|
1560
|
-
duration:
|
|
1561
|
-
progress:
|
|
1562
|
-
color:
|
|
1563
|
-
owner:
|
|
1564
|
-
details:
|
|
1907
|
+
text: n.text,
|
|
1908
|
+
type: n.type || "task",
|
|
1909
|
+
priority: n.priority || "medium",
|
|
1910
|
+
start: Zt(n.start),
|
|
1911
|
+
duration: n.duration,
|
|
1912
|
+
progress: n.progress,
|
|
1913
|
+
color: n.color || "#4A90E2",
|
|
1914
|
+
owner: n.owner || "",
|
|
1915
|
+
details: n.details || ""
|
|
1565
1916
|
},
|
|
1566
1917
|
children: [
|
|
1567
1918
|
/* @__PURE__ */ e.jsx(
|
|
1568
|
-
|
|
1919
|
+
q.Item,
|
|
1569
1920
|
{
|
|
1570
1921
|
name: "text",
|
|
1571
1922
|
label: "Task Name",
|
|
1572
1923
|
rules: [{ required: !0, message: "Please enter task name" }],
|
|
1573
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1924
|
+
children: /* @__PURE__ */ e.jsx(Pe, { placeholder: "Enter task name" })
|
|
1574
1925
|
}
|
|
1575
1926
|
),
|
|
1576
1927
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
|
|
1577
|
-
/* @__PURE__ */ e.jsx(
|
|
1578
|
-
/* @__PURE__ */ e.jsx(
|
|
1579
|
-
/* @__PURE__ */ e.jsx(
|
|
1580
|
-
/* @__PURE__ */ e.jsx(
|
|
1928
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "type", label: "Type", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(xe, { children: [
|
|
1929
|
+
/* @__PURE__ */ e.jsx(Ve, { value: "task", children: "Task" }),
|
|
1930
|
+
/* @__PURE__ */ e.jsx(Ve, { value: "milestone", children: "Milestone" }),
|
|
1931
|
+
/* @__PURE__ */ e.jsx(Ve, { value: "project", children: "Project" })
|
|
1581
1932
|
] }) }),
|
|
1582
|
-
/* @__PURE__ */ e.jsx(
|
|
1583
|
-
/* @__PURE__ */ e.jsx(
|
|
1584
|
-
/* @__PURE__ */ e.jsx(
|
|
1585
|
-
/* @__PURE__ */ e.jsx(
|
|
1933
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "priority", label: "Priority", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(xe, { children: [
|
|
1934
|
+
/* @__PURE__ */ e.jsx(Ve, { value: "low", children: "Low" }),
|
|
1935
|
+
/* @__PURE__ */ e.jsx(Ve, { value: "medium", children: "Medium" }),
|
|
1936
|
+
/* @__PURE__ */ e.jsx(Ve, { value: "high", children: "High" })
|
|
1586
1937
|
] }) })
|
|
1587
1938
|
] }),
|
|
1588
1939
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
|
|
1589
|
-
/* @__PURE__ */ e.jsx(
|
|
1590
|
-
/* @__PURE__ */ e.jsx(
|
|
1940
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "start", label: "Start Date", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Ut, { style: { width: "100%" } }) }),
|
|
1941
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "duration", label: "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Ge, { min: 0, style: { width: "100%" } }) })
|
|
1591
1942
|
] }),
|
|
1592
1943
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
|
|
1593
|
-
/* @__PURE__ */ e.jsx(
|
|
1594
|
-
/* @__PURE__ */ e.jsx(
|
|
1944
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "color", label: "Color", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Vt, { showText: !0 }) }),
|
|
1945
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "progress", label: "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Ge, { min: 0, max: 100, style: { width: "100%" } }) })
|
|
1595
1946
|
] }),
|
|
1596
|
-
/* @__PURE__ */ e.jsx(
|
|
1597
|
-
/* @__PURE__ */ e.jsx(
|
|
1947
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "owner", label: "Owner", children: /* @__PURE__ */ e.jsx(Pe, { placeholder: "Assign to..." }) }),
|
|
1948
|
+
/* @__PURE__ */ e.jsx(q.Item, { name: "details", label: "Details", children: /* @__PURE__ */ e.jsx(Zn, { placeholder: "Add task description...", rows: 3 }) })
|
|
1598
1949
|
]
|
|
1599
1950
|
}
|
|
1600
1951
|
)
|
|
1601
1952
|
}
|
|
1602
1953
|
);
|
|
1603
|
-
}, { Title:
|
|
1604
|
-
task:
|
|
1605
|
-
allTasks:
|
|
1954
|
+
}, { Title: ft, Text: be, Paragraph: Ht } = Wt, { Option: Re } = xe, tr = ({
|
|
1955
|
+
task: n,
|
|
1956
|
+
allTasks: r,
|
|
1606
1957
|
links: a,
|
|
1607
1958
|
onAddDependency: i,
|
|
1608
1959
|
onRemoveDependency: s,
|
|
1609
|
-
onClose:
|
|
1960
|
+
onClose: g
|
|
1610
1961
|
}) => {
|
|
1611
|
-
const [
|
|
1612
|
-
if (
|
|
1613
|
-
const
|
|
1614
|
-
i(
|
|
1962
|
+
const [c, o] = _(""), [p, w] = _("e2s"), [l, x] = _(0), [S, d] = _("day"), [u, v] = _(""), E = a.filter((y) => y.target === n.id), f = a.filter((y) => y.source === n.id), m = r.filter((y) => y.id !== n.id && y.id !== n.parent), $ = () => {
|
|
1963
|
+
if (c) {
|
|
1964
|
+
const y = Ft(l, S);
|
|
1965
|
+
i(c, n.id, p, y), o(""), x(0), d("day");
|
|
1615
1966
|
}
|
|
1616
|
-
},
|
|
1967
|
+
}, R = () => {
|
|
1617
1968
|
if (!u.trim()) return;
|
|
1618
|
-
const
|
|
1619
|
-
if (!
|
|
1969
|
+
const y = On(u.trim());
|
|
1970
|
+
if (!y) {
|
|
1620
1971
|
alert(`Invalid format. Use: [TaskNumber][Type][+/-][Lag][Unit]
|
|
1621
1972
|
Example: 3FS+10d`);
|
|
1622
1973
|
return;
|
|
1623
1974
|
}
|
|
1624
|
-
const
|
|
1625
|
-
if (!
|
|
1626
|
-
alert(`Task ${
|
|
1975
|
+
const z = y.taskNumber - 1, J = r[z];
|
|
1976
|
+
if (!J) {
|
|
1977
|
+
alert(`Task ${y.taskNumber} not found`);
|
|
1627
1978
|
return;
|
|
1628
1979
|
}
|
|
1629
|
-
const
|
|
1630
|
-
i(
|
|
1631
|
-
},
|
|
1632
|
-
switch (
|
|
1980
|
+
const Z = Yn(y.type), O = Ft(y.lag, y.lagUnit);
|
|
1981
|
+
i(J.id, n.id, Z, O), v("");
|
|
1982
|
+
}, Y = (y) => {
|
|
1983
|
+
switch (y) {
|
|
1633
1984
|
case "e2s":
|
|
1634
1985
|
return "Finish-to-Start (FS)";
|
|
1635
1986
|
case "s2s":
|
|
@@ -1639,8 +1990,8 @@ Example: 3FS+10d`);
|
|
|
1639
1990
|
case "s2e":
|
|
1640
1991
|
return "Start-to-Finish (SF)";
|
|
1641
1992
|
}
|
|
1642
|
-
},
|
|
1643
|
-
switch (
|
|
1993
|
+
}, B = (y) => {
|
|
1994
|
+
switch (y) {
|
|
1644
1995
|
case "e2s":
|
|
1645
1996
|
return "blue";
|
|
1646
1997
|
case "s2s":
|
|
@@ -1650,41 +2001,41 @@ Example: 3FS+10d`);
|
|
|
1650
2001
|
case "s2e":
|
|
1651
2002
|
return "orange";
|
|
1652
2003
|
}
|
|
1653
|
-
},
|
|
2004
|
+
}, te = (y) => !y || y === 0 ? null : y > 0 ? /* @__PURE__ */ e.jsxs(Ie, { color: "warning", children: [
|
|
1654
2005
|
"+",
|
|
1655
|
-
|
|
2006
|
+
y,
|
|
1656
2007
|
"d lag"
|
|
1657
|
-
] }) : /* @__PURE__ */ e.jsxs(
|
|
1658
|
-
|
|
2008
|
+
] }) : /* @__PURE__ */ e.jsxs(Ie, { color: "processing", children: [
|
|
2009
|
+
y,
|
|
1659
2010
|
"d lead"
|
|
1660
|
-
] }),
|
|
1661
|
-
const
|
|
2011
|
+
] }), fe = (y, z) => {
|
|
2012
|
+
const J = r.find((Z) => Z.id === (z === "source" ? y.source : y.target));
|
|
1662
2013
|
return /* @__PURE__ */ e.jsx(
|
|
1663
|
-
|
|
2014
|
+
Je.Item,
|
|
1664
2015
|
{
|
|
1665
2016
|
actions: [
|
|
1666
2017
|
/* @__PURE__ */ e.jsx(
|
|
1667
|
-
|
|
2018
|
+
ie,
|
|
1668
2019
|
{
|
|
1669
2020
|
type: "text",
|
|
1670
2021
|
danger: !0,
|
|
1671
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1672
|
-
onClick: () => s(
|
|
2022
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: Kt }),
|
|
2023
|
+
onClick: () => s(y.id),
|
|
1673
2024
|
children: "Remove"
|
|
1674
2025
|
}
|
|
1675
2026
|
)
|
|
1676
2027
|
],
|
|
1677
2028
|
children: /* @__PURE__ */ e.jsx(
|
|
1678
|
-
|
|
2029
|
+
Je.Item.Meta,
|
|
1679
2030
|
{
|
|
1680
|
-
title: /* @__PURE__ */ e.jsxs(
|
|
1681
|
-
/* @__PURE__ */ e.jsx(
|
|
1682
|
-
/* @__PURE__ */ e.jsx(
|
|
1683
|
-
|
|
2031
|
+
title: /* @__PURE__ */ e.jsxs(De, { children: [
|
|
2032
|
+
/* @__PURE__ */ e.jsx(be, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif" }, children: J?.text || (z === "source" ? y.source : y.target) }),
|
|
2033
|
+
/* @__PURE__ */ e.jsx(Ie, { color: B(y.type), children: Y(y.type) }),
|
|
2034
|
+
te(y.lag)
|
|
1684
2035
|
] }),
|
|
1685
|
-
description: /* @__PURE__ */ e.jsxs(
|
|
1686
|
-
|
|
1687
|
-
|
|
2036
|
+
description: /* @__PURE__ */ e.jsxs(be, { type: "secondary", style: { fontFamily: "IBM Plex Sans, sans-serif", fontSize: "12px" }, children: [
|
|
2037
|
+
J?.owner && `Owner: ${J.owner}`,
|
|
2038
|
+
J?.priority && ` • Priority: ${J.priority}`
|
|
1688
2039
|
] })
|
|
1689
2040
|
}
|
|
1690
2041
|
)
|
|
@@ -1692,14 +2043,14 @@ Example: 3FS+10d`);
|
|
|
1692
2043
|
);
|
|
1693
2044
|
};
|
|
1694
2045
|
return /* @__PURE__ */ e.jsxs(
|
|
1695
|
-
|
|
2046
|
+
xt,
|
|
1696
2047
|
{
|
|
1697
|
-
title: /* @__PURE__ */ e.jsxs(
|
|
1698
|
-
/* @__PURE__ */ e.jsx(
|
|
1699
|
-
/* @__PURE__ */ e.jsx(
|
|
2048
|
+
title: /* @__PURE__ */ e.jsxs(De, { children: [
|
|
2049
|
+
/* @__PURE__ */ e.jsx(I, { icon: qt, style: { fontSize: "20px" } }),
|
|
2050
|
+
/* @__PURE__ */ e.jsx(ft, { level: 4, style: { margin: 0, fontFamily: "IBM Plex Mono, monospace" }, children: "Task Dependencies" })
|
|
1700
2051
|
] }),
|
|
1701
2052
|
open: !0,
|
|
1702
|
-
onCancel:
|
|
2053
|
+
onCancel: g,
|
|
1703
2054
|
width: 900,
|
|
1704
2055
|
footer: null,
|
|
1705
2056
|
className: "gantt-dependency-modal",
|
|
@@ -1708,25 +2059,25 @@ Example: 3FS+10d`);
|
|
|
1708
2059
|
},
|
|
1709
2060
|
children: [
|
|
1710
2061
|
/* @__PURE__ */ e.jsx(
|
|
1711
|
-
|
|
2062
|
+
Nt,
|
|
1712
2063
|
{
|
|
1713
2064
|
size: "small",
|
|
1714
2065
|
style: { marginBottom: 24, backgroundColor: "#f5f5f5", borderColor: "#d9d9d9" },
|
|
1715
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
1716
|
-
/* @__PURE__ */ e.jsx(
|
|
1717
|
-
/* @__PURE__ */ e.jsxs(
|
|
1718
|
-
|
|
2066
|
+
children: /* @__PURE__ */ e.jsxs(De, { direction: "vertical", size: 4, children: [
|
|
2067
|
+
/* @__PURE__ */ e.jsx(be, { strong: !0, style: { fontFamily: "IBM Plex Mono, monospace", fontSize: "16px" }, children: n.text }),
|
|
2068
|
+
/* @__PURE__ */ e.jsxs(be, { type: "secondary", style: { fontFamily: "IBM Plex Sans, sans-serif", fontSize: "13px" }, children: [
|
|
2069
|
+
n.start.toLocaleDateString(),
|
|
1719
2070
|
" → ",
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
2071
|
+
n.end.toLocaleDateString(),
|
|
2072
|
+
n.owner && ` • Owner: ${n.owner}`,
|
|
2073
|
+
n.priority && ` • Priority: ${n.priority}`
|
|
1723
2074
|
] })
|
|
1724
2075
|
] })
|
|
1725
2076
|
}
|
|
1726
2077
|
),
|
|
1727
2078
|
/* @__PURE__ */ e.jsxs("div", { style: { marginBottom: 32 }, children: [
|
|
1728
2079
|
/* @__PURE__ */ e.jsxs(
|
|
1729
|
-
|
|
2080
|
+
ft,
|
|
1730
2081
|
{
|
|
1731
2082
|
level: 5,
|
|
1732
2083
|
style: {
|
|
@@ -1737,13 +2088,13 @@ Example: 3FS+10d`);
|
|
|
1737
2088
|
color: "#595959"
|
|
1738
2089
|
},
|
|
1739
2090
|
children: [
|
|
1740
|
-
/* @__PURE__ */ e.jsx(
|
|
2091
|
+
/* @__PURE__ */ e.jsx(I, { icon: Mn, style: { marginRight: "8px" } }),
|
|
1741
2092
|
"Depends On (Predecessors)"
|
|
1742
2093
|
]
|
|
1743
2094
|
}
|
|
1744
2095
|
),
|
|
1745
|
-
|
|
1746
|
-
|
|
2096
|
+
E.length === 0 ? /* @__PURE__ */ e.jsx(
|
|
2097
|
+
Et,
|
|
1747
2098
|
{
|
|
1748
2099
|
message: "No dependencies",
|
|
1749
2100
|
description: "This task doesn't depend on any other tasks.",
|
|
@@ -1752,10 +2103,10 @@ Example: 3FS+10d`);
|
|
|
1752
2103
|
style: { fontFamily: "IBM Plex Sans, sans-serif" }
|
|
1753
2104
|
}
|
|
1754
2105
|
) : /* @__PURE__ */ e.jsx(
|
|
1755
|
-
|
|
2106
|
+
Je,
|
|
1756
2107
|
{
|
|
1757
|
-
dataSource:
|
|
1758
|
-
renderItem: (
|
|
2108
|
+
dataSource: E,
|
|
2109
|
+
renderItem: (y) => fe(y, "source"),
|
|
1759
2110
|
bordered: !0,
|
|
1760
2111
|
style: { fontFamily: "IBM Plex Sans, sans-serif" }
|
|
1761
2112
|
}
|
|
@@ -1763,7 +2114,7 @@ Example: 3FS+10d`);
|
|
|
1763
2114
|
] }),
|
|
1764
2115
|
/* @__PURE__ */ e.jsxs("div", { style: { marginBottom: 32 }, children: [
|
|
1765
2116
|
/* @__PURE__ */ e.jsxs(
|
|
1766
|
-
|
|
2117
|
+
ft,
|
|
1767
2118
|
{
|
|
1768
2119
|
level: 5,
|
|
1769
2120
|
style: {
|
|
@@ -1774,13 +2125,13 @@ Example: 3FS+10d`);
|
|
|
1774
2125
|
color: "#595959"
|
|
1775
2126
|
},
|
|
1776
2127
|
children: [
|
|
1777
|
-
/* @__PURE__ */ e.jsx(
|
|
2128
|
+
/* @__PURE__ */ e.jsx(I, { icon: Cn, style: { marginRight: "8px" } }),
|
|
1778
2129
|
"Dependents (Successors)"
|
|
1779
2130
|
]
|
|
1780
2131
|
}
|
|
1781
2132
|
),
|
|
1782
2133
|
f.length === 0 ? /* @__PURE__ */ e.jsx(
|
|
1783
|
-
|
|
2134
|
+
Et,
|
|
1784
2135
|
{
|
|
1785
2136
|
message: "No dependent tasks",
|
|
1786
2137
|
description: "No other tasks depend on this task.",
|
|
@@ -1789,21 +2140,21 @@ Example: 3FS+10d`);
|
|
|
1789
2140
|
style: { fontFamily: "IBM Plex Sans, sans-serif" }
|
|
1790
2141
|
}
|
|
1791
2142
|
) : /* @__PURE__ */ e.jsx(
|
|
1792
|
-
|
|
2143
|
+
Je,
|
|
1793
2144
|
{
|
|
1794
2145
|
dataSource: f,
|
|
1795
|
-
renderItem: (
|
|
2146
|
+
renderItem: (y) => fe(y, "target"),
|
|
1796
2147
|
bordered: !0,
|
|
1797
2148
|
style: { fontFamily: "IBM Plex Sans, sans-serif" }
|
|
1798
2149
|
}
|
|
1799
2150
|
)
|
|
1800
2151
|
] }),
|
|
1801
|
-
/* @__PURE__ */ e.jsx(
|
|
2152
|
+
/* @__PURE__ */ e.jsx(ht, {}),
|
|
1802
2153
|
/* @__PURE__ */ e.jsx(
|
|
1803
|
-
|
|
2154
|
+
Nt,
|
|
1804
2155
|
{
|
|
1805
2156
|
title: /* @__PURE__ */ e.jsxs(
|
|
1806
|
-
|
|
2157
|
+
ft,
|
|
1807
2158
|
{
|
|
1808
2159
|
level: 5,
|
|
1809
2160
|
style: {
|
|
@@ -1812,96 +2163,96 @@ Example: 3FS+10d`);
|
|
|
1812
2163
|
fontSize: "14px"
|
|
1813
2164
|
},
|
|
1814
2165
|
children: [
|
|
1815
|
-
/* @__PURE__ */ e.jsx(
|
|
2166
|
+
/* @__PURE__ */ e.jsx(I, { icon: at, style: { marginRight: "8px" } }),
|
|
1816
2167
|
"Add New Dependency"
|
|
1817
2168
|
]
|
|
1818
2169
|
}
|
|
1819
2170
|
),
|
|
1820
2171
|
style: { marginBottom: 24 },
|
|
1821
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
2172
|
+
children: /* @__PURE__ */ e.jsxs(De, { direction: "vertical", size: "large", style: { width: "100%" }, children: [
|
|
1822
2173
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1823
|
-
/* @__PURE__ */ e.jsx(
|
|
1824
|
-
/* @__PURE__ */ e.jsx(
|
|
1825
|
-
/* @__PURE__ */ e.jsxs(
|
|
2174
|
+
/* @__PURE__ */ e.jsx(be, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif", display: "block", marginBottom: 8 }, children: "Quick Add (Keyboard Shortcut):" }),
|
|
2175
|
+
/* @__PURE__ */ e.jsx(be, { type: "secondary", style: { fontFamily: "IBM Plex Sans, sans-serif", fontSize: "12px", display: "block", marginBottom: 8 }, children: "Format: [TaskNumber][Type][+/-][Lag][Unit] • Example: 3FS+10d, 5SS-2w" }),
|
|
2176
|
+
/* @__PURE__ */ e.jsxs(De.Compact, { style: { width: "100%" }, children: [
|
|
1826
2177
|
/* @__PURE__ */ e.jsx(
|
|
1827
|
-
|
|
2178
|
+
Pe,
|
|
1828
2179
|
{
|
|
1829
2180
|
placeholder: "e.g., 3FS+10d",
|
|
1830
2181
|
value: u,
|
|
1831
|
-
onChange: (
|
|
1832
|
-
onPressEnter:
|
|
2182
|
+
onChange: (y) => v(y.target.value),
|
|
2183
|
+
onPressEnter: R,
|
|
1833
2184
|
size: "large",
|
|
1834
2185
|
style: { fontFamily: "IBM Plex Mono, monospace" }
|
|
1835
2186
|
}
|
|
1836
2187
|
),
|
|
1837
2188
|
/* @__PURE__ */ e.jsx(
|
|
1838
|
-
|
|
2189
|
+
ie,
|
|
1839
2190
|
{
|
|
1840
2191
|
type: "primary",
|
|
1841
2192
|
size: "large",
|
|
1842
|
-
onClick:
|
|
2193
|
+
onClick: R,
|
|
1843
2194
|
style: { fontFamily: "IBM Plex Sans, sans-serif" },
|
|
1844
2195
|
children: "Add"
|
|
1845
2196
|
}
|
|
1846
2197
|
)
|
|
1847
2198
|
] })
|
|
1848
2199
|
] }),
|
|
1849
|
-
/* @__PURE__ */ e.jsx(
|
|
2200
|
+
/* @__PURE__ */ e.jsx(ht, { style: { margin: "8px 0" }, children: "OR" }),
|
|
1850
2201
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1851
|
-
/* @__PURE__ */ e.jsx(
|
|
2202
|
+
/* @__PURE__ */ e.jsx(be, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif", display: "block", marginBottom: 8 }, children: "Select Task:" }),
|
|
1852
2203
|
/* @__PURE__ */ e.jsx(
|
|
1853
|
-
|
|
2204
|
+
xe,
|
|
1854
2205
|
{
|
|
1855
2206
|
placeholder: "Choose a task...",
|
|
1856
|
-
value:
|
|
2207
|
+
value: c || void 0,
|
|
1857
2208
|
onChange: o,
|
|
1858
2209
|
style: { width: "100%", fontFamily: "IBM Plex Sans, sans-serif" },
|
|
1859
2210
|
size: "large",
|
|
1860
2211
|
showSearch: !0,
|
|
1861
|
-
filterOption: (
|
|
1862
|
-
children:
|
|
2212
|
+
filterOption: (y, z) => String(z?.children || "").toLowerCase().includes(y.toLowerCase()),
|
|
2213
|
+
children: m.map((y) => /* @__PURE__ */ e.jsx(Re, { value: y.id, children: y.text }, y.id))
|
|
1863
2214
|
}
|
|
1864
2215
|
)
|
|
1865
2216
|
] }),
|
|
1866
2217
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1867
|
-
/* @__PURE__ */ e.jsx(
|
|
2218
|
+
/* @__PURE__ */ e.jsx(be, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif", display: "block", marginBottom: 8 }, children: "Dependency Type:" }),
|
|
1868
2219
|
/* @__PURE__ */ e.jsxs(
|
|
1869
|
-
|
|
2220
|
+
xe,
|
|
1870
2221
|
{
|
|
1871
|
-
value:
|
|
1872
|
-
onChange:
|
|
2222
|
+
value: p,
|
|
2223
|
+
onChange: w,
|
|
1873
2224
|
style: { width: "100%", fontFamily: "IBM Plex Sans, sans-serif" },
|
|
1874
2225
|
size: "large",
|
|
1875
2226
|
children: [
|
|
1876
|
-
/* @__PURE__ */ e.jsxs(
|
|
1877
|
-
/* @__PURE__ */ e.jsx(
|
|
2227
|
+
/* @__PURE__ */ e.jsxs(Re, { value: "e2s", children: [
|
|
2228
|
+
/* @__PURE__ */ e.jsx(Ie, { color: "blue", children: "FS" }),
|
|
1878
2229
|
" Finish-to-Start"
|
|
1879
2230
|
] }),
|
|
1880
|
-
/* @__PURE__ */ e.jsxs(
|
|
1881
|
-
/* @__PURE__ */ e.jsx(
|
|
2231
|
+
/* @__PURE__ */ e.jsxs(Re, { value: "s2s", children: [
|
|
2232
|
+
/* @__PURE__ */ e.jsx(Ie, { color: "green", children: "SS" }),
|
|
1882
2233
|
" Start-to-Start"
|
|
1883
2234
|
] }),
|
|
1884
|
-
/* @__PURE__ */ e.jsxs(
|
|
1885
|
-
/* @__PURE__ */ e.jsx(
|
|
2235
|
+
/* @__PURE__ */ e.jsxs(Re, { value: "e2e", children: [
|
|
2236
|
+
/* @__PURE__ */ e.jsx(Ie, { color: "purple", children: "FF" }),
|
|
1886
2237
|
" Finish-to-Finish"
|
|
1887
2238
|
] }),
|
|
1888
|
-
/* @__PURE__ */ e.jsxs(
|
|
1889
|
-
/* @__PURE__ */ e.jsx(
|
|
2239
|
+
/* @__PURE__ */ e.jsxs(Re, { value: "s2e", children: [
|
|
2240
|
+
/* @__PURE__ */ e.jsx(Ie, { color: "orange", children: "SF" }),
|
|
1890
2241
|
" Start-to-Finish"
|
|
1891
2242
|
] })
|
|
1892
2243
|
]
|
|
1893
2244
|
}
|
|
1894
2245
|
)
|
|
1895
2246
|
] }),
|
|
1896
|
-
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
|
|
1897
|
-
/* @__PURE__ */ e.jsx(
|
|
1898
|
-
/* @__PURE__ */ e.jsx(
|
|
1899
|
-
/* @__PURE__ */ e.jsxs(
|
|
2247
|
+
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(De, { direction: "vertical", size: 4, style: { width: "100%" }, children: [
|
|
2248
|
+
/* @__PURE__ */ e.jsx(be, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif" }, children: "Lead/Lag Time:" }),
|
|
2249
|
+
/* @__PURE__ */ e.jsx(be, { type: "secondary", style: { fontFamily: "IBM Plex Sans, sans-serif", fontSize: "12px" }, children: "Negative = lead time (overlap), Positive = lag time (delay)" }),
|
|
2250
|
+
/* @__PURE__ */ e.jsxs(De.Compact, { style: { width: "100%" }, children: [
|
|
1900
2251
|
/* @__PURE__ */ e.jsx(
|
|
1901
|
-
|
|
2252
|
+
Ge,
|
|
1902
2253
|
{
|
|
1903
|
-
value:
|
|
1904
|
-
onChange: (
|
|
2254
|
+
value: l,
|
|
2255
|
+
onChange: (y) => x(y || 0),
|
|
1905
2256
|
style: { flex: 1, fontFamily: "IBM Plex Sans, sans-serif" },
|
|
1906
2257
|
size: "large",
|
|
1907
2258
|
placeholder: "0",
|
|
@@ -1910,30 +2261,30 @@ Example: 3FS+10d`);
|
|
|
1910
2261
|
}
|
|
1911
2262
|
),
|
|
1912
2263
|
/* @__PURE__ */ e.jsxs(
|
|
1913
|
-
|
|
2264
|
+
xe,
|
|
1914
2265
|
{
|
|
1915
2266
|
value: S,
|
|
1916
2267
|
onChange: d,
|
|
1917
2268
|
style: { width: 120, fontFamily: "IBM Plex Sans, sans-serif" },
|
|
1918
2269
|
size: "large",
|
|
1919
2270
|
children: [
|
|
1920
|
-
/* @__PURE__ */ e.jsx(
|
|
1921
|
-
/* @__PURE__ */ e.jsx(
|
|
1922
|
-
/* @__PURE__ */ e.jsx(
|
|
1923
|
-
/* @__PURE__ */ e.jsx(
|
|
2271
|
+
/* @__PURE__ */ e.jsx(Re, { value: "day", children: "Days" }),
|
|
2272
|
+
/* @__PURE__ */ e.jsx(Re, { value: "hour", children: "Hours" }),
|
|
2273
|
+
/* @__PURE__ */ e.jsx(Re, { value: "week", children: "Weeks" }),
|
|
2274
|
+
/* @__PURE__ */ e.jsx(Re, { value: "month", children: "Months" })
|
|
1924
2275
|
]
|
|
1925
2276
|
}
|
|
1926
2277
|
)
|
|
1927
2278
|
] })
|
|
1928
2279
|
] }) }),
|
|
1929
2280
|
/* @__PURE__ */ e.jsx(
|
|
1930
|
-
|
|
2281
|
+
ie,
|
|
1931
2282
|
{
|
|
1932
2283
|
type: "primary",
|
|
1933
2284
|
size: "large",
|
|
1934
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1935
|
-
onClick:
|
|
1936
|
-
disabled: !
|
|
2285
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: at }),
|
|
2286
|
+
onClick: $,
|
|
2287
|
+
disabled: !c,
|
|
1937
2288
|
block: !0,
|
|
1938
2289
|
style: { fontFamily: "IBM Plex Sans, sans-serif", fontWeight: 600 },
|
|
1939
2290
|
children: "Add Dependency"
|
|
@@ -1943,10 +2294,10 @@ Example: 3FS+10d`);
|
|
|
1943
2294
|
}
|
|
1944
2295
|
),
|
|
1945
2296
|
/* @__PURE__ */ e.jsx(
|
|
1946
|
-
|
|
2297
|
+
Et,
|
|
1947
2298
|
{
|
|
1948
|
-
message: /* @__PURE__ */ e.jsxs(
|
|
1949
|
-
/* @__PURE__ */ e.jsx(
|
|
2299
|
+
message: /* @__PURE__ */ e.jsxs(be, { strong: !0, style: { fontFamily: "IBM Plex Mono, monospace" }, children: [
|
|
2300
|
+
/* @__PURE__ */ e.jsx(I, { icon: It, style: { marginRight: "8px" } }),
|
|
1950
2301
|
"Dependency Types Explained"
|
|
1951
2302
|
] }),
|
|
1952
2303
|
description: /* @__PURE__ */ e.jsxs("div", { style: { fontFamily: "IBM Plex Sans, sans-serif" }, children: [
|
|
@@ -1968,10 +2319,10 @@ Example: 3FS+10d`);
|
|
|
1968
2319
|
" Successor finishes when predecessor starts"
|
|
1969
2320
|
] })
|
|
1970
2321
|
] }),
|
|
1971
|
-
/* @__PURE__ */ e.jsx(
|
|
1972
|
-
/* @__PURE__ */ e.jsx(
|
|
1973
|
-
/* @__PURE__ */ e.jsx(
|
|
1974
|
-
/* @__PURE__ */ e.jsxs(
|
|
2322
|
+
/* @__PURE__ */ e.jsx(ht, { style: { margin: "12px 0" } }),
|
|
2323
|
+
/* @__PURE__ */ e.jsx(be, { strong: !0, style: { display: "block", marginBottom: 4 }, children: "Keyboard Shortcuts:" }),
|
|
2324
|
+
/* @__PURE__ */ e.jsx(Ht, { style: { margin: 0, fontSize: "12px" }, code: !0, children: "[TaskID][Type]+/-[Days]d" }),
|
|
2325
|
+
/* @__PURE__ */ e.jsxs(Ht, { style: { margin: 0, fontSize: "12px" }, children: [
|
|
1975
2326
|
"Example: ",
|
|
1976
2327
|
/* @__PURE__ */ e.jsx("code", { children: "3FS+10d" }),
|
|
1977
2328
|
" = Task 3, Finish-to-Start, 10 days lag"
|
|
@@ -1979,51 +2330,51 @@ Example: 3FS+10d`);
|
|
|
1979
2330
|
] }),
|
|
1980
2331
|
type: "info",
|
|
1981
2332
|
showIcon: !0,
|
|
1982
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2333
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: It }),
|
|
1983
2334
|
style: { marginTop: 16 }
|
|
1984
2335
|
}
|
|
1985
2336
|
)
|
|
1986
2337
|
]
|
|
1987
2338
|
}
|
|
1988
2339
|
);
|
|
1989
|
-
},
|
|
1990
|
-
x:
|
|
1991
|
-
y:
|
|
2340
|
+
}, nr = ({
|
|
2341
|
+
x: n,
|
|
2342
|
+
y: r,
|
|
1992
2343
|
task: a,
|
|
1993
2344
|
onEdit: i,
|
|
1994
2345
|
onDelete: s,
|
|
1995
|
-
onCopy:
|
|
1996
|
-
onDependencies:
|
|
2346
|
+
onCopy: g,
|
|
2347
|
+
onDependencies: c,
|
|
1997
2348
|
onConvertToMilestone: o,
|
|
1998
|
-
onConvertToTask:
|
|
1999
|
-
onConvertToProject:
|
|
2000
|
-
onAutoSchedule:
|
|
2001
|
-
onClose:
|
|
2349
|
+
onConvertToTask: p,
|
|
2350
|
+
onConvertToProject: w,
|
|
2351
|
+
onAutoSchedule: l,
|
|
2352
|
+
onClose: x
|
|
2002
2353
|
}) => {
|
|
2003
2354
|
if (!a) return null;
|
|
2004
2355
|
const S = [
|
|
2005
2356
|
{
|
|
2006
2357
|
key: "edit",
|
|
2007
2358
|
label: "Edit",
|
|
2008
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2359
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: En }),
|
|
2009
2360
|
onClick: () => {
|
|
2010
|
-
i(),
|
|
2361
|
+
i(), x();
|
|
2011
2362
|
}
|
|
2012
2363
|
},
|
|
2013
2364
|
{
|
|
2014
2365
|
key: "copy",
|
|
2015
2366
|
label: "Copy",
|
|
2016
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2367
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: Fn }),
|
|
2017
2368
|
onClick: () => {
|
|
2018
|
-
|
|
2369
|
+
g(), x();
|
|
2019
2370
|
}
|
|
2020
2371
|
},
|
|
2021
2372
|
{
|
|
2022
2373
|
key: "dependencies",
|
|
2023
2374
|
label: "Dependencies",
|
|
2024
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2375
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: qt }),
|
|
2025
2376
|
onClick: () => {
|
|
2026
|
-
|
|
2377
|
+
c(), x();
|
|
2027
2378
|
}
|
|
2028
2379
|
},
|
|
2029
2380
|
{
|
|
@@ -2037,28 +2388,28 @@ Example: 3FS+10d`);
|
|
|
2037
2388
|
{
|
|
2038
2389
|
key: "milestone",
|
|
2039
2390
|
label: "Milestone",
|
|
2040
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2391
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: kn }),
|
|
2041
2392
|
disabled: a.type === "milestone",
|
|
2042
2393
|
onClick: () => {
|
|
2043
|
-
o(),
|
|
2394
|
+
o(), x();
|
|
2044
2395
|
}
|
|
2045
2396
|
},
|
|
2046
2397
|
{
|
|
2047
2398
|
key: "task",
|
|
2048
2399
|
label: "Task",
|
|
2049
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2400
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: $n }),
|
|
2050
2401
|
disabled: a.type === "task",
|
|
2051
2402
|
onClick: () => {
|
|
2052
|
-
|
|
2403
|
+
p(), x();
|
|
2053
2404
|
}
|
|
2054
2405
|
},
|
|
2055
2406
|
{
|
|
2056
2407
|
key: "project",
|
|
2057
2408
|
label: "Project",
|
|
2058
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2409
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: Rn }),
|
|
2059
2410
|
disabled: a.type === "project",
|
|
2060
2411
|
onClick: () => {
|
|
2061
|
-
|
|
2412
|
+
w(), x();
|
|
2062
2413
|
}
|
|
2063
2414
|
}
|
|
2064
2415
|
]
|
|
@@ -2066,9 +2417,9 @@ Example: 3FS+10d`);
|
|
|
2066
2417
|
{
|
|
2067
2418
|
key: "auto-schedule",
|
|
2068
2419
|
label: "Auto Schedule",
|
|
2069
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2420
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: Gt }),
|
|
2070
2421
|
onClick: () => {
|
|
2071
|
-
|
|
2422
|
+
l?.(), x();
|
|
2072
2423
|
}
|
|
2073
2424
|
},
|
|
2074
2425
|
{
|
|
@@ -2077,10 +2428,10 @@ Example: 3FS+10d`);
|
|
|
2077
2428
|
{
|
|
2078
2429
|
key: "delete",
|
|
2079
2430
|
label: "Delete",
|
|
2080
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2431
|
+
icon: /* @__PURE__ */ e.jsx(I, { icon: Kt }),
|
|
2081
2432
|
danger: !0,
|
|
2082
2433
|
onClick: () => {
|
|
2083
|
-
s(),
|
|
2434
|
+
s(), x();
|
|
2084
2435
|
}
|
|
2085
2436
|
}
|
|
2086
2437
|
];
|
|
@@ -2090,13 +2441,13 @@ Example: 3FS+10d`);
|
|
|
2090
2441
|
className: "gantt-context-menu",
|
|
2091
2442
|
style: {
|
|
2092
2443
|
position: "fixed",
|
|
2093
|
-
left: `${
|
|
2094
|
-
top: `${
|
|
2444
|
+
left: `${n}px`,
|
|
2445
|
+
top: `${r}px`,
|
|
2095
2446
|
zIndex: 1e4
|
|
2096
2447
|
},
|
|
2097
2448
|
onClick: (d) => d.stopPropagation(),
|
|
2098
2449
|
children: /* @__PURE__ */ e.jsx(
|
|
2099
|
-
|
|
2450
|
+
xn,
|
|
2100
2451
|
{
|
|
2101
2452
|
items: S,
|
|
2102
2453
|
style: {
|
|
@@ -2108,162 +2459,162 @@ Example: 3FS+10d`);
|
|
|
2108
2459
|
)
|
|
2109
2460
|
}
|
|
2110
2461
|
);
|
|
2111
|
-
},
|
|
2112
|
-
const [a, i] =
|
|
2113
|
-
|
|
2114
|
-
o(
|
|
2115
|
-
}, [
|
|
2116
|
-
|
|
2117
|
-
}, [
|
|
2118
|
-
const
|
|
2119
|
-
const
|
|
2120
|
-
type:
|
|
2121
|
-
before:
|
|
2122
|
-
after:
|
|
2462
|
+
}, rr = (n, r = []) => {
|
|
2463
|
+
const [a, i] = _([]), [s, g] = _(-1), [c, o] = _(n), [p, w] = _(r);
|
|
2464
|
+
gt(() => {
|
|
2465
|
+
o(n);
|
|
2466
|
+
}, [n]), gt(() => {
|
|
2467
|
+
w(r);
|
|
2468
|
+
}, [r]);
|
|
2469
|
+
const l = Te((m, $, R) => {
|
|
2470
|
+
const Y = {
|
|
2471
|
+
type: m,
|
|
2472
|
+
before: $,
|
|
2473
|
+
after: R,
|
|
2123
2474
|
timestamp: Date.now()
|
|
2124
|
-
},
|
|
2125
|
-
|
|
2126
|
-
}, [a, s]),
|
|
2475
|
+
}, B = a.slice(0, s + 1);
|
|
2476
|
+
B.push(Y), B.length > 50 ? B.shift() : g(s + 1), i(B);
|
|
2477
|
+
}, [a, s]), x = Te(() => {
|
|
2127
2478
|
if (s < 0) return;
|
|
2128
|
-
const
|
|
2129
|
-
o(
|
|
2130
|
-
}, [a, s]), S =
|
|
2479
|
+
const m = a[s];
|
|
2480
|
+
o(m.before.tasks), w(m.before.links), g(s - 1);
|
|
2481
|
+
}, [a, s]), S = Te(() => {
|
|
2131
2482
|
if (s >= a.length - 1) return;
|
|
2132
|
-
const
|
|
2133
|
-
o(
|
|
2134
|
-
}, [a, s]), d = s >= 0, u = s < a.length - 1,
|
|
2135
|
-
const
|
|
2136
|
-
|
|
2137
|
-
}, [
|
|
2138
|
-
const
|
|
2139
|
-
|
|
2140
|
-
}, [
|
|
2141
|
-
const
|
|
2142
|
-
|
|
2143
|
-
}, [
|
|
2483
|
+
const m = a[s + 1];
|
|
2484
|
+
o(m.after.tasks), w(m.after.links), g(s + 1);
|
|
2485
|
+
}, [a, s]), d = s >= 0, u = s < a.length - 1, v = Te((m) => {
|
|
2486
|
+
const $ = { tasks: c, links: p }, R = c.map((B) => B.id === m.id ? m : B);
|
|
2487
|
+
l("task_update", $, { tasks: R, links: p }), o(R);
|
|
2488
|
+
}, [c, p, l]), E = Te((m) => {
|
|
2489
|
+
const $ = { tasks: c, links: p }, R = [...c, m];
|
|
2490
|
+
l("task_create", $, { tasks: R, links: p }), o(R);
|
|
2491
|
+
}, [c, p, l]), f = Te((m) => {
|
|
2492
|
+
const $ = { tasks: c, links: p }, R = c.filter((te) => te.id !== m), Y = p.filter((te) => te.source !== m && te.target !== m);
|
|
2493
|
+
l("task_delete", $, { tasks: R, links: Y }), o(R), w(Y);
|
|
2494
|
+
}, [c, p, l]);
|
|
2144
2495
|
return {
|
|
2145
|
-
tasks:
|
|
2146
|
-
links:
|
|
2496
|
+
tasks: c,
|
|
2497
|
+
links: p,
|
|
2147
2498
|
setTasks: o,
|
|
2148
|
-
setLinks:
|
|
2149
|
-
undo:
|
|
2499
|
+
setLinks: w,
|
|
2500
|
+
undo: x,
|
|
2150
2501
|
redo: S,
|
|
2151
2502
|
canUndo: d,
|
|
2152
2503
|
canRedo: u,
|
|
2153
|
-
updateTask:
|
|
2154
|
-
createTask:
|
|
2504
|
+
updateTask: v,
|
|
2505
|
+
createTask: E,
|
|
2155
2506
|
deleteTask: f,
|
|
2156
|
-
saveState:
|
|
2507
|
+
saveState: l,
|
|
2157
2508
|
history: a
|
|
2158
2509
|
};
|
|
2159
|
-
},
|
|
2510
|
+
}, nn = (n, r, a = { mode: "forward" }) => {
|
|
2160
2511
|
const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
2161
|
-
return
|
|
2162
|
-
i.set(
|
|
2163
|
-
}),
|
|
2164
|
-
|
|
2165
|
-
}), a.mode === "forward" ?
|
|
2166
|
-
},
|
|
2167
|
-
const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(),
|
|
2512
|
+
return n.forEach((g) => {
|
|
2513
|
+
i.set(g.id, []), s.set(g.id, []);
|
|
2514
|
+
}), r.forEach((g) => {
|
|
2515
|
+
g.type === "e2s" && (i.get(g.target)?.push(g.source), s.get(g.source)?.push(g.target));
|
|
2516
|
+
}), a.mode === "forward" ? sr(n, i, a) : ar(n, s, a);
|
|
2517
|
+
}, sr = (n, r, a) => {
|
|
2518
|
+
const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), g = a.projectStart || /* @__PURE__ */ new Date(), c = (o) => {
|
|
2168
2519
|
if (s.has(o)) return;
|
|
2169
|
-
const
|
|
2170
|
-
if (!
|
|
2171
|
-
const
|
|
2172
|
-
|
|
2173
|
-
let
|
|
2174
|
-
|
|
2175
|
-
const
|
|
2176
|
-
|
|
2520
|
+
const p = n.find((u) => u.id === o);
|
|
2521
|
+
if (!p) return;
|
|
2522
|
+
const w = r.get(o) || [];
|
|
2523
|
+
w.forEach((u) => c(u));
|
|
2524
|
+
let l = g;
|
|
2525
|
+
w.forEach((u) => {
|
|
2526
|
+
const v = i.get(u);
|
|
2527
|
+
v && v.end > l && (l = new Date(v.end));
|
|
2177
2528
|
});
|
|
2178
|
-
const
|
|
2179
|
-
...
|
|
2180
|
-
start:
|
|
2529
|
+
const x = new Date(l), S = ge(x, p.duration, "day"), d = {
|
|
2530
|
+
...p,
|
|
2531
|
+
start: x,
|
|
2181
2532
|
end: S
|
|
2182
2533
|
};
|
|
2183
2534
|
i.set(o, d), s.add(o);
|
|
2184
2535
|
};
|
|
2185
|
-
return
|
|
2186
|
-
},
|
|
2187
|
-
const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(),
|
|
2188
|
-
Math.max(...
|
|
2189
|
-
),
|
|
2536
|
+
return n.forEach((o) => c(o.id)), n.map((o) => i.get(o.id) || o);
|
|
2537
|
+
}, ar = (n, r, a) => {
|
|
2538
|
+
const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), g = a.projectEnd || new Date(
|
|
2539
|
+
Math.max(...n.map((o) => o.end.getTime()))
|
|
2540
|
+
), c = (o) => {
|
|
2190
2541
|
if (s.has(o)) return;
|
|
2191
|
-
const
|
|
2192
|
-
if (!
|
|
2193
|
-
const
|
|
2194
|
-
|
|
2195
|
-
let
|
|
2196
|
-
|
|
2197
|
-
const
|
|
2198
|
-
|
|
2542
|
+
const p = n.find((u) => u.id === o);
|
|
2543
|
+
if (!p) return;
|
|
2544
|
+
const w = r.get(o) || [];
|
|
2545
|
+
w.forEach((u) => c(u));
|
|
2546
|
+
let l = g;
|
|
2547
|
+
w.forEach((u) => {
|
|
2548
|
+
const v = i.get(u);
|
|
2549
|
+
v && v.start < l && (l = new Date(v.start));
|
|
2199
2550
|
});
|
|
2200
|
-
const
|
|
2201
|
-
...
|
|
2551
|
+
const x = new Date(l), S = ge(x, -p.duration, "day"), d = {
|
|
2552
|
+
...p,
|
|
2202
2553
|
start: S,
|
|
2203
|
-
end:
|
|
2554
|
+
end: x
|
|
2204
2555
|
};
|
|
2205
2556
|
i.set(o, d), s.add(o);
|
|
2206
2557
|
};
|
|
2207
|
-
return
|
|
2208
|
-
},
|
|
2209
|
-
const
|
|
2210
|
-
|
|
2211
|
-
i.owner && (
|
|
2558
|
+
return n.forEach((o) => c(o.id)), n.map((o) => i.get(o.id) || o);
|
|
2559
|
+
}, ir = (n) => {
|
|
2560
|
+
const r = /* @__PURE__ */ new Map();
|
|
2561
|
+
n.forEach((i) => {
|
|
2562
|
+
i.owner && (r.has(i.owner) || r.set(i.owner, []), r.get(i.owner).push(i));
|
|
2212
2563
|
});
|
|
2213
|
-
const a = [...
|
|
2214
|
-
return
|
|
2215
|
-
const
|
|
2216
|
-
for (let
|
|
2217
|
-
const o =
|
|
2218
|
-
if (o.start <
|
|
2219
|
-
const
|
|
2220
|
-
if (
|
|
2221
|
-
const
|
|
2222
|
-
a[
|
|
2564
|
+
const a = [...n];
|
|
2565
|
+
return r.forEach((i, s) => {
|
|
2566
|
+
const g = i.sort((c, o) => c.start.getTime() - o.start.getTime());
|
|
2567
|
+
for (let c = 1; c < g.length; c++) {
|
|
2568
|
+
const o = g[c], p = g[c - 1];
|
|
2569
|
+
if (o.start < p.end) {
|
|
2570
|
+
const w = a.findIndex((l) => l.id === o.id);
|
|
2571
|
+
if (w >= 0) {
|
|
2572
|
+
const l = new Date(p.end), x = ge(l, o.duration, "day");
|
|
2573
|
+
a[w] = {
|
|
2223
2574
|
...o,
|
|
2224
|
-
start:
|
|
2225
|
-
end:
|
|
2575
|
+
start: l,
|
|
2576
|
+
end: x
|
|
2226
2577
|
};
|
|
2227
2578
|
}
|
|
2228
2579
|
}
|
|
2229
2580
|
}
|
|
2230
2581
|
}), a;
|
|
2231
|
-
},
|
|
2582
|
+
}, Sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2232
2583
|
__proto__: null,
|
|
2233
|
-
autoSchedule:
|
|
2234
|
-
levelResources:
|
|
2235
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2236
|
-
const
|
|
2237
|
-
return
|
|
2238
|
-
|
|
2584
|
+
autoSchedule: nn,
|
|
2585
|
+
levelResources: ir
|
|
2586
|
+
}, Symbol.toStringTag, { value: "Module" })), or = (n) => {
|
|
2587
|
+
const r = /* @__PURE__ */ new Map();
|
|
2588
|
+
return n.forEach((a) => {
|
|
2589
|
+
r.set(a.id, {
|
|
2239
2590
|
taskId: a.id,
|
|
2240
2591
|
start: new Date(a.start),
|
|
2241
2592
|
end: new Date(a.end)
|
|
2242
2593
|
});
|
|
2243
|
-
}),
|
|
2244
|
-
},
|
|
2245
|
-
const
|
|
2594
|
+
}), r;
|
|
2595
|
+
}, rn = (n) => {
|
|
2596
|
+
const r = ["ID", "Task Name", "Start Date", "End Date", "Duration", "Progress", "Type", "Owner", "Priority"], a = n.map((s) => [
|
|
2246
2597
|
s.id,
|
|
2247
2598
|
s.text,
|
|
2248
|
-
|
|
2249
|
-
|
|
2599
|
+
we(s.start, "YYYY-MM-DD"),
|
|
2600
|
+
we(s.end, "YYYY-MM-DD"),
|
|
2250
2601
|
s.duration.toString(),
|
|
2251
2602
|
`${s.progress}%`,
|
|
2252
2603
|
s.type || "task",
|
|
2253
2604
|
s.owner || "",
|
|
2254
2605
|
s.priority || "medium"
|
|
2255
2606
|
]), i = [
|
|
2256
|
-
|
|
2257
|
-
...a.map((s) => s.map((
|
|
2607
|
+
r.join(","),
|
|
2608
|
+
...a.map((s) => s.map((g) => `"${g}"`).join(","))
|
|
2258
2609
|
].join(`
|
|
2259
2610
|
`);
|
|
2260
|
-
|
|
2261
|
-
},
|
|
2262
|
-
const
|
|
2611
|
+
mt(i, "gantt-tasks.csv", "text/csv");
|
|
2612
|
+
}, sn = (n) => {
|
|
2613
|
+
const r = ["ID", "Task Name", "Start Date", "End Date", "Duration", "Progress", "Type", "Owner", "Priority", "Details"], a = n.map((s) => [
|
|
2263
2614
|
s.id,
|
|
2264
2615
|
s.text,
|
|
2265
|
-
|
|
2266
|
-
|
|
2616
|
+
we(s.start, "MM/DD/YYYY"),
|
|
2617
|
+
we(s.end, "MM/DD/YYYY"),
|
|
2267
2618
|
s.duration.toString(),
|
|
2268
2619
|
s.progress.toString(),
|
|
2269
2620
|
s.type || "task",
|
|
@@ -2272,38 +2623,38 @@ Example: 3FS+10d`);
|
|
|
2272
2623
|
s.details || ""
|
|
2273
2624
|
]), i = "\uFEFF" + [
|
|
2274
2625
|
// BOM for UTF-8
|
|
2275
|
-
|
|
2276
|
-
...a.map((s) => s.map((
|
|
2626
|
+
r.join(" "),
|
|
2627
|
+
...a.map((s) => s.map((g) => g.replace(/\t/g, " ")).join(" "))
|
|
2277
2628
|
].join(`
|
|
2278
2629
|
`);
|
|
2279
|
-
|
|
2280
|
-
},
|
|
2630
|
+
mt(i, "gantt-tasks.xls", "application/vnd.ms-excel");
|
|
2631
|
+
}, an = (n, r) => {
|
|
2281
2632
|
const a = {
|
|
2282
|
-
tasks:
|
|
2283
|
-
links:
|
|
2633
|
+
tasks: n,
|
|
2634
|
+
links: r,
|
|
2284
2635
|
exported: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2285
2636
|
version: "1.0"
|
|
2286
2637
|
}, i = JSON.stringify(a, null, 2);
|
|
2287
|
-
|
|
2288
|
-
},
|
|
2289
|
-
const
|
|
2638
|
+
mt(i, "gantt-project.json", "application/json");
|
|
2639
|
+
}, on = (n) => {
|
|
2640
|
+
const r = `
|
|
2290
2641
|
GANTT CHART PROJECT
|
|
2291
2642
|
Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
|
|
2292
2643
|
|
|
2293
2644
|
Tasks:
|
|
2294
|
-
${
|
|
2645
|
+
${n.map((a, i) => `
|
|
2295
2646
|
${i + 1}. ${a.text}
|
|
2296
|
-
Start: ${
|
|
2297
|
-
End: ${
|
|
2647
|
+
Start: ${we(a.start, "MM/DD/YYYY")}
|
|
2648
|
+
End: ${we(a.end, "MM/DD/YYYY")}
|
|
2298
2649
|
Duration: ${a.duration} days
|
|
2299
2650
|
Progress: ${a.progress}%
|
|
2300
2651
|
${a.owner ? `Owner: ${a.owner}` : ""}
|
|
2301
2652
|
`).join(`
|
|
2302
2653
|
`)}
|
|
2303
2654
|
`.trim();
|
|
2304
|
-
|
|
2305
|
-
},
|
|
2306
|
-
if (!document.getElementById(
|
|
2655
|
+
mt(r, "gantt-report.txt", "text/plain"), alert("PDF export is a simplified text version. For full PDF with charts, a PDF library would be needed.");
|
|
2656
|
+
}, lr = (n, r, a = "png") => {
|
|
2657
|
+
if (!document.getElementById(n)) {
|
|
2307
2658
|
alert("Could not find Gantt chart element to export");
|
|
2308
2659
|
return;
|
|
2309
2660
|
}
|
|
@@ -2312,73 +2663,73 @@ ${i + 1}. ${a.text}
|
|
|
2312
2663
|
return;
|
|
2313
2664
|
}
|
|
2314
2665
|
alert("Image export requires html2canvas library. Install with: npm install html2canvas");
|
|
2315
|
-
},
|
|
2316
|
-
const i = new Blob([
|
|
2317
|
-
|
|
2318
|
-
},
|
|
2666
|
+
}, mt = (n, r, a) => {
|
|
2667
|
+
const i = new Blob([n], { type: a }), s = URL.createObjectURL(i);
|
|
2668
|
+
cr(s, r), URL.revokeObjectURL(s);
|
|
2669
|
+
}, cr = (n, r) => {
|
|
2319
2670
|
const a = document.createElement("a");
|
|
2320
|
-
a.href =
|
|
2321
|
-
},
|
|
2671
|
+
a.href = n, a.download = r, document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2672
|
+
}, dr = (n) => new Promise((r, a) => {
|
|
2322
2673
|
const i = new FileReader();
|
|
2323
2674
|
i.onload = (s) => {
|
|
2324
2675
|
try {
|
|
2325
|
-
const
|
|
2326
|
-
...
|
|
2327
|
-
start: new Date(
|
|
2328
|
-
end: new Date(
|
|
2676
|
+
const g = s.target?.result, c = JSON.parse(g), o = c.tasks.map((p) => ({
|
|
2677
|
+
...p,
|
|
2678
|
+
start: new Date(p.start),
|
|
2679
|
+
end: new Date(p.end)
|
|
2329
2680
|
}));
|
|
2330
|
-
|
|
2681
|
+
r({ tasks: o, links: c.links || [] });
|
|
2331
2682
|
} catch {
|
|
2332
2683
|
a(new Error("Invalid JSON file"));
|
|
2333
2684
|
}
|
|
2334
|
-
}, i.onerror = () => a(new Error("Failed to read file")), i.readAsText(
|
|
2335
|
-
}),
|
|
2685
|
+
}, i.onerror = () => a(new Error("Failed to read file")), i.readAsText(n);
|
|
2686
|
+
}), Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2336
2687
|
__proto__: null,
|
|
2337
|
-
exportToCSV:
|
|
2338
|
-
exportToExcel:
|
|
2339
|
-
exportToImage:
|
|
2340
|
-
exportToJSON:
|
|
2341
|
-
exportToPDF:
|
|
2342
|
-
importFromJSON:
|
|
2343
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2688
|
+
exportToCSV: rn,
|
|
2689
|
+
exportToExcel: sn,
|
|
2690
|
+
exportToImage: lr,
|
|
2691
|
+
exportToJSON: an,
|
|
2692
|
+
exportToPDF: on,
|
|
2693
|
+
importFromJSON: dr
|
|
2694
|
+
}, Symbol.toStringTag, { value: "Module" })), ur = [
|
|
2344
2695
|
{ name: "index", label: "", width: 40, align: "center" },
|
|
2345
2696
|
{ name: "text", label: "Name", width: 300, align: "left", resize: !0 },
|
|
2346
2697
|
{ name: "predecessors", label: "Depends on", width: 120, align: "left" },
|
|
2347
2698
|
{ name: "duration", label: "Duration", width: 100, align: "left" },
|
|
2348
2699
|
{ name: "start", label: "Start", width: 120, align: "left" },
|
|
2349
2700
|
{ name: "add", label: "", width: 40, align: "center" }
|
|
2350
|
-
],
|
|
2701
|
+
], fr = [
|
|
2351
2702
|
{ unit: "month", step: 1, format: "MMM" },
|
|
2352
2703
|
{ unit: "day", step: 1, format: "D" }
|
|
2353
|
-
],
|
|
2354
|
-
tasks:
|
|
2355
|
-
links:
|
|
2704
|
+
], Tr = ({
|
|
2705
|
+
tasks: n = [],
|
|
2706
|
+
links: r = [],
|
|
2356
2707
|
config: a = {},
|
|
2357
2708
|
onTaskUpdate: i,
|
|
2358
2709
|
onTaskCreate: s,
|
|
2359
|
-
onTaskDelete:
|
|
2360
|
-
onLinkCreate:
|
|
2710
|
+
onTaskDelete: g,
|
|
2711
|
+
onLinkCreate: c,
|
|
2361
2712
|
onLinkDelete: o
|
|
2362
2713
|
}) => {
|
|
2363
|
-
const
|
|
2364
|
-
tasks:
|
|
2365
|
-
links:
|
|
2714
|
+
const p = Array.isArray(n) ? n : [], w = Array.isArray(r) ? r : [], {
|
|
2715
|
+
tasks: l,
|
|
2716
|
+
links: x,
|
|
2366
2717
|
setTasks: S,
|
|
2367
2718
|
setLinks: d,
|
|
2368
2719
|
undo: u,
|
|
2369
|
-
redo:
|
|
2370
|
-
updateTask:
|
|
2720
|
+
redo: v,
|
|
2721
|
+
updateTask: E,
|
|
2371
2722
|
createTask: f,
|
|
2372
|
-
deleteTask:
|
|
2373
|
-
saveState:
|
|
2374
|
-
} =
|
|
2723
|
+
deleteTask: m,
|
|
2724
|
+
saveState: $
|
|
2725
|
+
} = rr(p, w), [R, Y] = _(l), [B, te] = _(null), [fe, y] = _(null), [z, J] = _(!1), [Z, O] = _(!1), [ne, oe] = _(null), [me, de] = _(null), [V, D] = _(null), [M, F] = _(null), [k, X] = _(null), [re, le] = _(1), [Me, Se] = _(/* @__PURE__ */ new Map()), [ye, Ce] = _(!1), [Ee] = _(a.theme || "light"), [Oe, Le] = _({
|
|
2375
2726
|
searchText: "",
|
|
2376
2727
|
status: "all",
|
|
2377
2728
|
priority: "all",
|
|
2378
2729
|
owner: ""
|
|
2379
|
-
}),
|
|
2380
|
-
columns:
|
|
2381
|
-
scales:
|
|
2730
|
+
}), yt = Ct(null), Ye = Ct(null), Ae = Ct(null), ue = {
|
|
2731
|
+
columns: ur,
|
|
2732
|
+
scales: fr,
|
|
2382
2733
|
readonly: !1,
|
|
2383
2734
|
editable: !0,
|
|
2384
2735
|
taskHeight: 28,
|
|
@@ -2388,393 +2739,393 @@ ${i + 1}. ${a.text}
|
|
|
2388
2739
|
minColumnWidth: 60,
|
|
2389
2740
|
autoSchedule: !1,
|
|
2390
2741
|
criticalPath: !1,
|
|
2391
|
-
baselines:
|
|
2742
|
+
baselines: ye,
|
|
2392
2743
|
weekends: !0,
|
|
2393
2744
|
holidays: [],
|
|
2394
|
-
theme:
|
|
2745
|
+
theme: Ee,
|
|
2395
2746
|
locale: "en",
|
|
2396
2747
|
...a
|
|
2397
2748
|
};
|
|
2398
|
-
|
|
2399
|
-
const
|
|
2400
|
-
|
|
2401
|
-
const
|
|
2402
|
-
if (!
|
|
2403
|
-
const
|
|
2404
|
-
return
|
|
2749
|
+
gt(() => {
|
|
2750
|
+
const j = Xn(l, Oe);
|
|
2751
|
+
Y(((L) => {
|
|
2752
|
+
const G = [], se = (H) => {
|
|
2753
|
+
if (!H) return !1;
|
|
2754
|
+
const Q = L.find((U) => U.id === H);
|
|
2755
|
+
return Q && !Q.open && Q.type === "project" ? !0 : se(Q?.parent);
|
|
2405
2756
|
};
|
|
2406
|
-
return
|
|
2407
|
-
se(
|
|
2408
|
-
}),
|
|
2409
|
-
})(
|
|
2410
|
-
}, [
|
|
2411
|
-
const
|
|
2412
|
-
if (!
|
|
2757
|
+
return L.forEach((H) => {
|
|
2758
|
+
se(H.parent) || G.push(H);
|
|
2759
|
+
}), G;
|
|
2760
|
+
})(j));
|
|
2761
|
+
}, [l, Oe]);
|
|
2762
|
+
const it = Xe.useMemo(() => {
|
|
2763
|
+
if (!l || !Array.isArray(l)) return [];
|
|
2413
2764
|
try {
|
|
2414
|
-
return Array.from(new Set(
|
|
2415
|
-
} catch (
|
|
2416
|
-
return console.warn("Error extracting owners:",
|
|
2417
|
-
}
|
|
2418
|
-
}, [
|
|
2419
|
-
const
|
|
2420
|
-
if (
|
|
2421
|
-
const
|
|
2765
|
+
return Array.from(new Set(l.map((j) => j?.owner).filter(Boolean)));
|
|
2766
|
+
} catch (j) {
|
|
2767
|
+
return console.warn("Error extracting owners:", j), [];
|
|
2768
|
+
}
|
|
2769
|
+
}, [l]), Be = (() => {
|
|
2770
|
+
const j = R.length > 0 ? R : l;
|
|
2771
|
+
if (j.length === 0) {
|
|
2772
|
+
const H = /* @__PURE__ */ new Date();
|
|
2422
2773
|
return {
|
|
2423
|
-
start:
|
|
2424
|
-
end:
|
|
2774
|
+
start: ut(ge(H, -30, "day")),
|
|
2775
|
+
end: ut(ge(H, 60, "day"))
|
|
2425
2776
|
};
|
|
2426
2777
|
}
|
|
2427
|
-
const T =
|
|
2778
|
+
const T = j.map((H) => H.start.getTime()), L = j.map((H) => H.end.getTime()), G = new Date(Math.min(...T)), se = new Date(Math.max(...L));
|
|
2428
2779
|
return {
|
|
2429
|
-
start:
|
|
2430
|
-
end:
|
|
2780
|
+
start: ut(ge(G, -7, "day")),
|
|
2781
|
+
end: ut(se)
|
|
2431
2782
|
};
|
|
2432
|
-
})(),
|
|
2433
|
-
|
|
2434
|
-
},
|
|
2435
|
-
if (
|
|
2436
|
-
|
|
2437
|
-
const
|
|
2438
|
-
|
|
2439
|
-
},
|
|
2440
|
-
if (!
|
|
2441
|
-
const
|
|
2442
|
-
...
|
|
2783
|
+
})(), wt = (j) => {
|
|
2784
|
+
te(j);
|
|
2785
|
+
}, vt = (j, T) => {
|
|
2786
|
+
if (ue.readonly) return;
|
|
2787
|
+
j.preventDefault();
|
|
2788
|
+
const L = l.find((G) => G.id === T);
|
|
2789
|
+
L && X({ x: j.clientX, y: j.clientY, task: L });
|
|
2790
|
+
}, qe = () => {
|
|
2791
|
+
if (!k?.task) return;
|
|
2792
|
+
const j = k.task, T = {
|
|
2793
|
+
...j,
|
|
2443
2794
|
id: `task-${Date.now()}`,
|
|
2444
|
-
text: `${
|
|
2445
|
-
start:
|
|
2446
|
-
end:
|
|
2795
|
+
text: `${j.text} (Copy)`,
|
|
2796
|
+
start: ge(j.start, 7, "day"),
|
|
2797
|
+
end: ge(j.end, 7, "day")
|
|
2447
2798
|
};
|
|
2448
2799
|
f(T), s && s(T);
|
|
2449
|
-
},
|
|
2450
|
-
if (!
|
|
2451
|
-
const T = { ...
|
|
2452
|
-
|
|
2453
|
-
},
|
|
2454
|
-
if (!
|
|
2455
|
-
if (
|
|
2456
|
-
const se =
|
|
2457
|
-
let
|
|
2458
|
-
return
|
|
2459
|
-
|
|
2460
|
-
}),
|
|
2461
|
-
},
|
|
2462
|
-
|
|
2800
|
+
}, Ke = (j) => {
|
|
2801
|
+
if (!k?.task) return;
|
|
2802
|
+
const T = { ...k.task, type: j };
|
|
2803
|
+
E(T), i && i(T);
|
|
2804
|
+
}, bt = (j, T, L, G) => {
|
|
2805
|
+
if (!ue.readonly)
|
|
2806
|
+
if (G === "reorder") {
|
|
2807
|
+
const se = R.findIndex((U) => U.id === j), H = (U, ae) => {
|
|
2808
|
+
let ke = [];
|
|
2809
|
+
return ae.filter((he) => he.parent === U).forEach((he) => {
|
|
2810
|
+
ke.push(he.id), ke = [...ke, ...H(he.id, ae)];
|
|
2811
|
+
}), ke;
|
|
2812
|
+
}, Q = H(j, l);
|
|
2813
|
+
D({ id: j, initialIndex: se, currentY: L, descendantIds: Q }), document.body.classList.add("gantt-dragging");
|
|
2463
2814
|
} else
|
|
2464
|
-
|
|
2465
|
-
},
|
|
2466
|
-
if (
|
|
2467
|
-
const
|
|
2468
|
-
if (
|
|
2469
|
-
const
|
|
2470
|
-
if (!
|
|
2471
|
-
const
|
|
2472
|
-
let se =
|
|
2473
|
-
const
|
|
2474
|
-
|
|
2475
|
-
const
|
|
2476
|
-
let
|
|
2477
|
-
if (
|
|
2478
|
-
const
|
|
2479
|
-
|
|
2480
|
-
} else if (
|
|
2481
|
-
const
|
|
2482
|
-
let
|
|
2483
|
-
return
|
|
2484
|
-
|
|
2485
|
-
}),
|
|
2486
|
-
},
|
|
2487
|
-
|
|
2815
|
+
de(j);
|
|
2816
|
+
}, ot = () => {
|
|
2817
|
+
if (V && M) {
|
|
2818
|
+
const j = l.find((L) => L.id === V.id), T = l.find((L) => L.id === M.taskId);
|
|
2819
|
+
if (j && T && j.id !== T.id) {
|
|
2820
|
+
const L = [j.id, ...V.descendantIds];
|
|
2821
|
+
if (!L.includes(T.id)) {
|
|
2822
|
+
const G = [...l];
|
|
2823
|
+
let se = M.position === "inside" ? T.id : T.parent;
|
|
2824
|
+
const H = G.findIndex((ce) => ce.id === j.id);
|
|
2825
|
+
H !== -1 && (G[H] = { ...G[H], parent: se });
|
|
2826
|
+
const Q = G.filter((ce) => L.includes(ce.id)), U = G.filter((ce) => !L.includes(ce.id));
|
|
2827
|
+
let ae = U.findIndex((ce) => ce.id === T.id);
|
|
2828
|
+
if (M.position === "inside") {
|
|
2829
|
+
const ce = U.filter((he) => he.parent === T.id);
|
|
2830
|
+
ce.length > 0 ? ae = U.findIndex((he) => he.id === ce[ce.length - 1].id) + 1 : ae++;
|
|
2831
|
+
} else if (M.position === "below") {
|
|
2832
|
+
const ce = (et, tt) => {
|
|
2833
|
+
let Ne = [];
|
|
2834
|
+
return tt.filter((He) => He.parent === et).forEach((He) => {
|
|
2835
|
+
Ne.push(He.id), Ne = [...Ne, ...ce(He.id, tt)];
|
|
2836
|
+
}), Ne;
|
|
2837
|
+
}, he = ce(T.id, U);
|
|
2838
|
+
he.length > 0 ? ae = U.findIndex((et) => et.id === he[he.length - 1]) + 1 : ae++;
|
|
2488
2839
|
}
|
|
2489
|
-
const
|
|
2490
|
-
|
|
2840
|
+
const ke = { tasks: [...l], links: [...x] };
|
|
2841
|
+
U.splice(ae, 0, ...Q), S(U), $("task_update", ke, { tasks: U, links: x });
|
|
2491
2842
|
}
|
|
2492
2843
|
}
|
|
2493
2844
|
}
|
|
2494
|
-
|
|
2495
|
-
},
|
|
2496
|
-
if (
|
|
2497
|
-
const T =
|
|
2498
|
-
if (!
|
|
2499
|
-
const
|
|
2500
|
-
let
|
|
2501
|
-
|
|
2502
|
-
const
|
|
2503
|
-
if (
|
|
2504
|
-
const
|
|
2505
|
-
let
|
|
2506
|
-
|
|
2845
|
+
de(null), D(null), F(null), document.body.classList.remove("gantt-dragging");
|
|
2846
|
+
}, lt = (j) => {
|
|
2847
|
+
if (V) {
|
|
2848
|
+
const T = ue.rowHeight || 44, L = Ye.current?.querySelector(".gantt-grid-body");
|
|
2849
|
+
if (!L) return;
|
|
2850
|
+
const G = L.getBoundingClientRect(), se = j.clientY - G.top;
|
|
2851
|
+
let H = Math.floor(se / T);
|
|
2852
|
+
H = Math.max(0, Math.min(H, R.length - 1));
|
|
2853
|
+
const Q = R[H];
|
|
2854
|
+
if (Q) {
|
|
2855
|
+
const U = se - H * T;
|
|
2856
|
+
let ae = "above";
|
|
2857
|
+
Q.type === "project" ? U < T * 0.3 ? ae = "above" : U > T * 0.7 ? ae = "below" : ae = "inside" : ae = U < T / 2 ? "above" : "below", Q.id !== V.id ? F({ taskId: Q.id, position: ae }) : F(null);
|
|
2507
2858
|
}
|
|
2508
|
-
|
|
2859
|
+
D((U) => U ? { ...U, currentY: j.clientY } : null);
|
|
2509
2860
|
}
|
|
2510
2861
|
}, Ze = () => {
|
|
2511
|
-
|
|
2512
|
-
},
|
|
2513
|
-
const T = { ...
|
|
2862
|
+
V && ot();
|
|
2863
|
+
}, St = (j) => {
|
|
2864
|
+
const T = { ...j, id: `task-${Date.now()}` };
|
|
2514
2865
|
f(T), s && s(T);
|
|
2515
|
-
},
|
|
2516
|
-
|
|
2517
|
-
},
|
|
2518
|
-
|
|
2519
|
-
},
|
|
2520
|
-
const se = { id: `link-${Date.now()}`, source:
|
|
2521
|
-
d([...
|
|
2522
|
-
},
|
|
2523
|
-
const T =
|
|
2524
|
-
d(T), o && o(
|
|
2525
|
-
},
|
|
2526
|
-
if (!
|
|
2527
|
-
const
|
|
2528
|
-
|
|
2529
|
-
} else
|
|
2866
|
+
}, ze = (j) => {
|
|
2867
|
+
E(j), i && i(j);
|
|
2868
|
+
}, Qe = (j) => {
|
|
2869
|
+
m(j), g && g(j);
|
|
2870
|
+
}, ct = (j, T, L, G) => {
|
|
2871
|
+
const se = { id: `link-${Date.now()}`, source: j, target: T, type: L, lag: G };
|
|
2872
|
+
d([...x, se]), c && c(se);
|
|
2873
|
+
}, Dt = (j) => {
|
|
2874
|
+
const T = x.filter((L) => L.id !== j);
|
|
2875
|
+
d(T), o && o(j);
|
|
2876
|
+
}, Tt = () => {
|
|
2877
|
+
if (!ye && Me.size === 0) {
|
|
2878
|
+
const j = or(l);
|
|
2879
|
+
Se(j), Ce(!0);
|
|
2880
|
+
} else Ce(!ye);
|
|
2530
2881
|
};
|
|
2531
|
-
return
|
|
2532
|
-
const
|
|
2533
|
-
(T.ctrlKey || T.metaKey) && (T.key === "z" && !T.shiftKey ? (T.preventDefault(), u()) : (T.key === "y" || T.key === "z" && T.shiftKey) && (T.preventDefault(),
|
|
2882
|
+
return gt(() => {
|
|
2883
|
+
const j = (T) => {
|
|
2884
|
+
(T.ctrlKey || T.metaKey) && (T.key === "z" && !T.shiftKey ? (T.preventDefault(), u()) : (T.key === "y" || T.key === "z" && T.shiftKey) && (T.preventDefault(), v()));
|
|
2534
2885
|
};
|
|
2535
|
-
return window.addEventListener("keydown",
|
|
2536
|
-
}, [u,
|
|
2886
|
+
return window.addEventListener("keydown", j), () => window.removeEventListener("keydown", j);
|
|
2887
|
+
}, [u, v]), /* @__PURE__ */ e.jsxs("div", { className: `gantt-page-wrapper theme-${Ee}`, children: [
|
|
2537
2888
|
/* @__PURE__ */ e.jsx("div", { className: "gantt-page-header", children: /* @__PURE__ */ e.jsx("div", { className: "gantt-page-header-left", children: /* @__PURE__ */ e.jsx("h1", { className: "gantt-page-title", children: "Iris Gantt" }) }) }),
|
|
2538
|
-
/* @__PURE__ */ e.jsxs("div", { className: `gantt-container theme-${
|
|
2889
|
+
/* @__PURE__ */ e.jsxs("div", { className: `gantt-container theme-${ue.theme}`, children: [
|
|
2539
2890
|
/* @__PURE__ */ e.jsx(
|
|
2540
|
-
|
|
2891
|
+
Gn,
|
|
2541
2892
|
{
|
|
2542
|
-
zoomLevel:
|
|
2543
|
-
setZoomLevel:
|
|
2544
|
-
onBaselineToggle:
|
|
2545
|
-
showBaselines:
|
|
2546
|
-
onExport: (
|
|
2547
|
-
|
|
2893
|
+
zoomLevel: re,
|
|
2894
|
+
setZoomLevel: le,
|
|
2895
|
+
onBaselineToggle: Tt,
|
|
2896
|
+
showBaselines: ye,
|
|
2897
|
+
onExport: (j) => {
|
|
2898
|
+
j === "csv" && rn(l), j === "excel" && sn(l), j === "json" && an(l, x), j === "pdf" && on(l);
|
|
2548
2899
|
},
|
|
2549
|
-
onFilterChange: (
|
|
2550
|
-
owners:
|
|
2551
|
-
onAddTask: () =>
|
|
2900
|
+
onFilterChange: (j) => Le(j),
|
|
2901
|
+
owners: it || [],
|
|
2902
|
+
onAddTask: () => J(!0)
|
|
2552
2903
|
}
|
|
2553
2904
|
),
|
|
2554
|
-
/* @__PURE__ */ e.jsxs("div", { className: "gantt-layout", ref:
|
|
2905
|
+
/* @__PURE__ */ e.jsxs("div", { className: "gantt-layout", ref: Ae, onMouseMove: lt, onMouseUp: Ze, onMouseLeave: Ze, children: [
|
|
2555
2906
|
/* @__PURE__ */ e.jsx(
|
|
2556
|
-
|
|
2907
|
+
Qt,
|
|
2557
2908
|
{
|
|
2558
|
-
ref:
|
|
2559
|
-
tasks:
|
|
2560
|
-
columns:
|
|
2561
|
-
selectedTask:
|
|
2562
|
-
onTaskClick:
|
|
2563
|
-
onTaskContextMenu:
|
|
2564
|
-
onTaskUpdate:
|
|
2565
|
-
onTaskDragStart:
|
|
2566
|
-
onAddTask: () =>
|
|
2567
|
-
onAddDependency:
|
|
2568
|
-
onDependencyClick: (
|
|
2569
|
-
const T =
|
|
2570
|
-
T && (
|
|
2909
|
+
ref: Ye,
|
|
2910
|
+
tasks: R,
|
|
2911
|
+
columns: ue.columns || [],
|
|
2912
|
+
selectedTask: B,
|
|
2913
|
+
onTaskClick: wt,
|
|
2914
|
+
onTaskContextMenu: vt,
|
|
2915
|
+
onTaskUpdate: ze,
|
|
2916
|
+
onTaskDragStart: bt,
|
|
2917
|
+
onAddTask: () => J(!0),
|
|
2918
|
+
onAddDependency: ct,
|
|
2919
|
+
onDependencyClick: (j) => {
|
|
2920
|
+
const T = l.find((L) => L.id === j);
|
|
2921
|
+
T && (oe(T), O(!0));
|
|
2571
2922
|
},
|
|
2572
|
-
links:
|
|
2573
|
-
allTasks:
|
|
2574
|
-
dropIndicator:
|
|
2575
|
-
reorderTask:
|
|
2923
|
+
links: x,
|
|
2924
|
+
allTasks: l,
|
|
2925
|
+
dropIndicator: M,
|
|
2926
|
+
reorderTask: V
|
|
2576
2927
|
}
|
|
2577
2928
|
),
|
|
2578
2929
|
/* @__PURE__ */ e.jsx(
|
|
2579
|
-
|
|
2930
|
+
tn,
|
|
2580
2931
|
{
|
|
2581
|
-
ref:
|
|
2582
|
-
tasks:
|
|
2583
|
-
links:
|
|
2584
|
-
range:
|
|
2585
|
-
scales:
|
|
2586
|
-
config:
|
|
2587
|
-
selectedTask:
|
|
2588
|
-
draggedTask:
|
|
2932
|
+
ref: yt,
|
|
2933
|
+
tasks: R,
|
|
2934
|
+
links: x,
|
|
2935
|
+
range: Be,
|
|
2936
|
+
scales: ue.scales,
|
|
2937
|
+
config: ue,
|
|
2938
|
+
selectedTask: B,
|
|
2939
|
+
draggedTask: me,
|
|
2589
2940
|
onTaskClick: () => {
|
|
2590
2941
|
},
|
|
2591
2942
|
onTaskDragStart: () => {
|
|
2592
2943
|
},
|
|
2593
2944
|
onTaskDragEnd: () => {
|
|
2594
2945
|
},
|
|
2595
|
-
onTaskUpdate: (
|
|
2596
|
-
const
|
|
2597
|
-
|
|
2946
|
+
onTaskUpdate: (j, T) => {
|
|
2947
|
+
const L = l.find((G) => G.id === j);
|
|
2948
|
+
L && ze({ ...L, ...T });
|
|
2598
2949
|
},
|
|
2599
|
-
zoomLevel:
|
|
2600
|
-
baselines:
|
|
2950
|
+
zoomLevel: re,
|
|
2951
|
+
baselines: ye ? Me : /* @__PURE__ */ new Map()
|
|
2601
2952
|
}
|
|
2602
2953
|
)
|
|
2603
2954
|
] }),
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2955
|
+
z && /* @__PURE__ */ e.jsx(Kn, { onCreateTask: St, onClose: () => J(!1) }),
|
|
2956
|
+
fe && /* @__PURE__ */ e.jsx(er, { task: fe, onUpdate: ze, onDelete: Qe, onClose: () => y(null) }),
|
|
2957
|
+
Z && ne && /* @__PURE__ */ e.jsx(
|
|
2958
|
+
tr,
|
|
2608
2959
|
{
|
|
2609
|
-
task:
|
|
2610
|
-
allTasks:
|
|
2611
|
-
links:
|
|
2612
|
-
onAddDependency:
|
|
2613
|
-
onRemoveDependency:
|
|
2960
|
+
task: ne,
|
|
2961
|
+
allTasks: l,
|
|
2962
|
+
links: x,
|
|
2963
|
+
onAddDependency: ct,
|
|
2964
|
+
onRemoveDependency: Dt,
|
|
2614
2965
|
onClose: () => {
|
|
2615
|
-
|
|
2966
|
+
O(!1), oe(null);
|
|
2616
2967
|
}
|
|
2617
2968
|
}
|
|
2618
2969
|
),
|
|
2619
|
-
|
|
2620
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-context-menu-overlay", onClick: () =>
|
|
2621
|
-
|
|
2970
|
+
k && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2971
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-context-menu-overlay", onClick: () => X(null), onContextMenu: (j) => {
|
|
2972
|
+
j.preventDefault(), X(null);
|
|
2622
2973
|
} }),
|
|
2623
2974
|
/* @__PURE__ */ e.jsx(
|
|
2624
|
-
|
|
2975
|
+
nr,
|
|
2625
2976
|
{
|
|
2626
|
-
x:
|
|
2627
|
-
y:
|
|
2628
|
-
task:
|
|
2977
|
+
x: k.x,
|
|
2978
|
+
y: k.y,
|
|
2979
|
+
task: k.task,
|
|
2629
2980
|
onEdit: () => {
|
|
2630
|
-
|
|
2981
|
+
k.task && y(k.task);
|
|
2631
2982
|
},
|
|
2632
2983
|
onDelete: () => {
|
|
2633
|
-
|
|
2984
|
+
k.task && Qe(k.task.id);
|
|
2634
2985
|
},
|
|
2635
|
-
onCopy:
|
|
2986
|
+
onCopy: qe,
|
|
2636
2987
|
onDependencies: () => {
|
|
2637
|
-
|
|
2988
|
+
k.task && (oe(k.task), O(!0));
|
|
2638
2989
|
},
|
|
2639
|
-
onConvertToMilestone: () =>
|
|
2640
|
-
onConvertToTask: () =>
|
|
2641
|
-
onConvertToProject: () =>
|
|
2642
|
-
onClose: () =>
|
|
2990
|
+
onConvertToMilestone: () => Ke("milestone"),
|
|
2991
|
+
onConvertToTask: () => Ke("task"),
|
|
2992
|
+
onConvertToProject: () => Ke("project"),
|
|
2993
|
+
onClose: () => X(null),
|
|
2643
2994
|
onAutoSchedule: () => {
|
|
2644
|
-
const
|
|
2645
|
-
S(
|
|
2995
|
+
const j = nn(l, x, { mode: "forward" });
|
|
2996
|
+
S(j), X(null);
|
|
2646
2997
|
}
|
|
2647
2998
|
}
|
|
2648
2999
|
)
|
|
2649
3000
|
] }),
|
|
2650
|
-
|
|
3001
|
+
V && /* @__PURE__ */ e.jsx(
|
|
2651
3002
|
"div",
|
|
2652
3003
|
{
|
|
2653
3004
|
className: "gantt-grid-row ghost-row",
|
|
2654
3005
|
style: {
|
|
2655
|
-
height:
|
|
2656
|
-
top:
|
|
2657
|
-
left:
|
|
3006
|
+
height: ue.rowHeight,
|
|
3007
|
+
top: V.currentY - (ue.rowHeight || 48) / 2,
|
|
3008
|
+
left: Ye.current?.getBoundingClientRect().left,
|
|
2658
3009
|
position: "fixed",
|
|
2659
3010
|
pointerEvents: "none",
|
|
2660
3011
|
opacity: 0.8,
|
|
2661
3012
|
zIndex: 9999,
|
|
2662
|
-
width:
|
|
3013
|
+
width: Ye.current?.offsetWidth,
|
|
2663
3014
|
backgroundColor: "#ffffff",
|
|
2664
3015
|
boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
|
|
2665
3016
|
border: "1px solid #2196F3",
|
|
2666
3017
|
display: "flex"
|
|
2667
3018
|
},
|
|
2668
|
-
children:
|
|
2669
|
-
const T =
|
|
3019
|
+
children: ue.columns?.map((j) => /* @__PURE__ */ e.jsx("div", { className: "gantt-grid-cell", style: { width: j.width, textAlign: j.align || "left" }, children: (() => {
|
|
3020
|
+
const T = l.find((L) => L.id === V.id);
|
|
2670
3021
|
if (!T) return null;
|
|
2671
|
-
if (
|
|
2672
|
-
switch (
|
|
3022
|
+
if (j.template) return j.template(T);
|
|
3023
|
+
switch (j.name) {
|
|
2673
3024
|
case "text":
|
|
2674
3025
|
return /* @__PURE__ */ e.jsxs("div", { className: "gantt-grid-cell-text", children: [
|
|
2675
|
-
/* @__PURE__ */ e.jsx(
|
|
3026
|
+
/* @__PURE__ */ e.jsx(I, { icon: Xt, style: { marginRight: 8, color: "#adb5bd" } }),
|
|
2676
3027
|
/* @__PURE__ */ e.jsxs("span", { className: "gantt-task-name-text", children: [
|
|
2677
3028
|
T.text,
|
|
2678
|
-
|
|
3029
|
+
V.descendantIds.length > 0 && /* @__PURE__ */ e.jsxs("span", { children: [
|
|
2679
3030
|
" +",
|
|
2680
|
-
|
|
3031
|
+
V.descendantIds.length,
|
|
2681
3032
|
" subtasks"
|
|
2682
3033
|
] })
|
|
2683
3034
|
] })
|
|
2684
3035
|
] });
|
|
2685
3036
|
case "start":
|
|
2686
|
-
return
|
|
3037
|
+
return we(T.start, "DD MMM YYYY");
|
|
2687
3038
|
case "duration":
|
|
2688
3039
|
return `${T.duration}`;
|
|
2689
3040
|
default:
|
|
2690
|
-
return T[
|
|
3041
|
+
return T[j.name] || "";
|
|
2691
3042
|
}
|
|
2692
|
-
})() }, `ghost-${
|
|
3043
|
+
})() }, `ghost-${j.name}`))
|
|
2693
3044
|
}
|
|
2694
3045
|
)
|
|
2695
3046
|
] })
|
|
2696
3047
|
] });
|
|
2697
|
-
},
|
|
2698
|
-
const a = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(),
|
|
2699
|
-
|
|
2700
|
-
s.set(d.id, []),
|
|
2701
|
-
}),
|
|
2702
|
-
d.type === "e2s" && (s.get(d.source)?.push(d.target),
|
|
3048
|
+
}, hr = (n, r) => {
|
|
3049
|
+
const a = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
|
|
3050
|
+
n.forEach((d) => {
|
|
3051
|
+
s.set(d.id, []), g.set(d.id, []);
|
|
3052
|
+
}), r.forEach((d) => {
|
|
3053
|
+
d.type === "e2s" && (s.get(d.source)?.push(d.target), g.get(d.target)?.push(d.source));
|
|
2703
3054
|
});
|
|
2704
|
-
const
|
|
3055
|
+
const c = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), p = (d, u = /* @__PURE__ */ new Set()) => {
|
|
2705
3056
|
if (u.has(d)) return;
|
|
2706
3057
|
u.add(d);
|
|
2707
|
-
const
|
|
2708
|
-
if (!
|
|
2709
|
-
const
|
|
2710
|
-
if (
|
|
2711
|
-
|
|
3058
|
+
const v = n.find((f) => f.id === d);
|
|
3059
|
+
if (!v) return;
|
|
3060
|
+
const E = g.get(d) || [];
|
|
3061
|
+
if (E.length === 0)
|
|
3062
|
+
c.set(d, 0), o.set(d, v.duration);
|
|
2712
3063
|
else {
|
|
2713
3064
|
let f = 0;
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
const
|
|
2717
|
-
f = Math.max(f,
|
|
2718
|
-
}),
|
|
3065
|
+
E.forEach((m) => {
|
|
3066
|
+
p(m, u);
|
|
3067
|
+
const $ = o.get(m) || 0;
|
|
3068
|
+
f = Math.max(f, $);
|
|
3069
|
+
}), c.set(d, f), o.set(d, f + v.duration);
|
|
2719
3070
|
}
|
|
2720
3071
|
};
|
|
2721
|
-
|
|
2722
|
-
const
|
|
3072
|
+
n.forEach((d) => p(d.id));
|
|
3073
|
+
const w = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), x = Math.max(...Array.from(o.values())), S = (d, u = /* @__PURE__ */ new Set()) => {
|
|
2723
3074
|
if (u.has(d)) return;
|
|
2724
3075
|
u.add(d);
|
|
2725
|
-
const
|
|
2726
|
-
if (!
|
|
2727
|
-
const
|
|
2728
|
-
if (
|
|
2729
|
-
|
|
3076
|
+
const v = n.find((f) => f.id === d);
|
|
3077
|
+
if (!v) return;
|
|
3078
|
+
const E = s.get(d) || [];
|
|
3079
|
+
if (E.length === 0)
|
|
3080
|
+
l.set(d, x), w.set(d, x - v.duration);
|
|
2730
3081
|
else {
|
|
2731
3082
|
let f = 1 / 0;
|
|
2732
|
-
|
|
2733
|
-
S(
|
|
2734
|
-
const
|
|
2735
|
-
f = Math.min(f,
|
|
2736
|
-
}),
|
|
3083
|
+
E.forEach((m) => {
|
|
3084
|
+
S(m, u);
|
|
3085
|
+
const $ = w.get(m) || 0;
|
|
3086
|
+
f = Math.min(f, $);
|
|
3087
|
+
}), l.set(d, f), w.set(d, f - v.duration);
|
|
2737
3088
|
}
|
|
2738
3089
|
};
|
|
2739
|
-
return
|
|
2740
|
-
const u =
|
|
2741
|
-
i.set(d.id,
|
|
3090
|
+
return n.forEach((d) => S(d.id)), n.forEach((d) => {
|
|
3091
|
+
const u = c.get(d.id) || 0, E = (w.get(d.id) || 0) - u;
|
|
3092
|
+
i.set(d.id, E), Math.abs(E) < 0.01 && a.add(d.id);
|
|
2742
3093
|
}), {
|
|
2743
3094
|
criticalTasks: a,
|
|
2744
3095
|
taskFloats: i,
|
|
2745
|
-
projectDuration:
|
|
3096
|
+
projectDuration: x
|
|
2746
3097
|
};
|
|
2747
|
-
},
|
|
3098
|
+
}, pr = (n, r) => r.criticalTasks.has(n), gr = (n, r) => r.taskFloats.get(n) || 0, Mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2748
3099
|
__proto__: null,
|
|
2749
|
-
calculateCriticalPath:
|
|
2750
|
-
getTaskFloat:
|
|
2751
|
-
isCriticalTask:
|
|
3100
|
+
calculateCriticalPath: hr,
|
|
3101
|
+
getTaskFloat: gr,
|
|
3102
|
+
isCriticalTask: pr
|
|
2752
3103
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2753
3104
|
export {
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
3105
|
+
Sr as AutoScheduler,
|
|
3106
|
+
tn as Chart,
|
|
3107
|
+
Mr as CriticalPath,
|
|
3108
|
+
tr as DependencyEditor,
|
|
3109
|
+
Dr as ExportUtils,
|
|
3110
|
+
Jn as FilterSearch,
|
|
3111
|
+
Tr as Gantt,
|
|
3112
|
+
Qt as Grid,
|
|
3113
|
+
Hn as TaskBar,
|
|
3114
|
+
Kn as TaskCreator,
|
|
3115
|
+
er as TaskEditor,
|
|
3116
|
+
en as Timeline,
|
|
3117
|
+
Gn as Toolbar,
|
|
3118
|
+
ge as addToDate,
|
|
3119
|
+
Xn as applyFilters,
|
|
3120
|
+
br as calculateDuration,
|
|
3121
|
+
or as createBaseline,
|
|
3122
|
+
Tr as default,
|
|
3123
|
+
we as formatDate,
|
|
3124
|
+
pt as getDaysBetween,
|
|
3125
|
+
vr as getEndOfDay,
|
|
3126
|
+
In as getHoursBetween,
|
|
3127
|
+
ut as getStartOfDay,
|
|
3128
|
+
Bt as isHoliday,
|
|
3129
|
+
At as isWeekend,
|
|
3130
|
+
rr as useUndoRedo
|
|
2780
3131
|
};
|