iris-gantt 1.3.1 → 1.3.3
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/Gantt/Gantt.d.ts.map +1 -1
- package/dist/Gantt/Grid.d.ts +1 -0
- package/dist/Gantt/Grid.d.ts.map +1 -1
- package/dist/Gantt/types.d.ts +2 -0
- package/dist/Gantt/types.d.ts.map +1 -1
- package/dist/gantt.css +1 -1
- package/dist/iris-gantt.js +1205 -1209
- package/dist/iris-gantt.umd.cjs +14 -14
- package/package.json +1 -1
package/dist/iris-gantt.js
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Typography as Ht, Select as
|
|
3
|
-
import { FontAwesomeIcon as
|
|
4
|
-
import { faChevronDown as
|
|
5
|
-
import
|
|
6
|
-
var
|
|
7
|
-
var
|
|
1
|
+
import Q, { useState as z, memo as lr, forwardRef as Ct, useCallback as Me, useEffect as Je, useRef as Ve } from "react";
|
|
2
|
+
import { Typography as Ht, Select as ge, InputNumber as Ne, Button as fe, Popover as dr, Tooltip as Ce, Input as ze, Space as Pt, Divider as Ut, Form as ce, Modal as vt, DatePicker as Vt, ColorPicker as Xt, Alert as cr, Card as _t, List as Rt, Tag as ur, Menu as pr } from "antd";
|
|
3
|
+
import { FontAwesomeIcon as pe } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { faChevronDown as It, faPlus as Nt, faGripVertical as hr, faChevronRight as fr, faTimesCircle as mr, faSearchMinus as xr, faSearchPlus as gr, faRotateLeft as Jt, faFileCsv as yr, faFileExcel as br, faFileCode as wr, faFilePdf as vr, faExclamationTriangle as Sr, faLink as qt, faTrash as Gt, faInfoCircle as jr, faEdit as Tr, faCopy as Dr, faFlag as kr, faTasks as Lr, faFolder as Mr } from "@fortawesome/free-solid-svg-icons";
|
|
5
|
+
import Zt from "dayjs";
|
|
6
|
+
var bt = { exports: {} }, lt = {};
|
|
7
|
+
var Yt;
|
|
8
8
|
function Er() {
|
|
9
|
-
if (
|
|
10
|
-
|
|
11
|
-
var t =
|
|
12
|
-
function m(i, s,
|
|
13
|
-
var c,
|
|
14
|
-
|
|
15
|
-
for (c in s) l.call(s, c) && !x.hasOwnProperty(c) && (
|
|
16
|
-
if (i && i.defaultProps) for (c in s = i.defaultProps, s)
|
|
17
|
-
return { $$typeof: o, type: i, key:
|
|
9
|
+
if (Yt) return lt;
|
|
10
|
+
Yt = 1;
|
|
11
|
+
var t = Q, o = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, r = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, x = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
12
|
+
function m(i, s, g) {
|
|
13
|
+
var c, y = {}, S = null, u = null;
|
|
14
|
+
g !== void 0 && (S = "" + g), s.key !== void 0 && (S = "" + s.key), s.ref !== void 0 && (u = s.ref);
|
|
15
|
+
for (c in s) l.call(s, c) && !x.hasOwnProperty(c) && (y[c] = s[c]);
|
|
16
|
+
if (i && i.defaultProps) for (c in s = i.defaultProps, s) y[c] === void 0 && (y[c] = s[c]);
|
|
17
|
+
return { $$typeof: o, type: i, key: S, ref: u, props: y, _owner: r.current };
|
|
18
18
|
}
|
|
19
19
|
return lt.Fragment = a, lt.jsx = m, lt.jsxs = m, lt;
|
|
20
20
|
}
|
|
21
21
|
var dt = {};
|
|
22
|
-
var
|
|
22
|
+
var At;
|
|
23
23
|
function $r() {
|
|
24
|
-
return
|
|
25
|
-
var t =
|
|
24
|
+
return At || (At = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
25
|
+
var t = Q, o = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.portal"), l = /* @__PURE__ */ Symbol.for("react.fragment"), r = /* @__PURE__ */ Symbol.for("react.strict_mode"), x = /* @__PURE__ */ Symbol.for("react.profiler"), m = /* @__PURE__ */ Symbol.for("react.provider"), i = /* @__PURE__ */ Symbol.for("react.context"), s = /* @__PURE__ */ Symbol.for("react.forward_ref"), g = /* @__PURE__ */ Symbol.for("react.suspense"), c = /* @__PURE__ */ Symbol.for("react.suspense_list"), y = /* @__PURE__ */ Symbol.for("react.memo"), S = /* @__PURE__ */ Symbol.for("react.lazy"), u = /* @__PURE__ */ Symbol.for("react.offscreen"), p = Symbol.iterator, b = "@@iterator";
|
|
26
26
|
function w(n) {
|
|
27
27
|
if (n === null || typeof n != "object")
|
|
28
28
|
return null;
|
|
29
|
-
var
|
|
30
|
-
return typeof
|
|
29
|
+
var h = p && n[p] || n[b];
|
|
30
|
+
return typeof h == "function" ? h : null;
|
|
31
31
|
}
|
|
32
|
-
var
|
|
33
|
-
function
|
|
32
|
+
var j = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
33
|
+
function M(n) {
|
|
34
34
|
{
|
|
35
|
-
for (var
|
|
36
|
-
T[
|
|
35
|
+
for (var h = arguments.length, T = new Array(h > 1 ? h - 1 : 0), R = 1; R < h; R++)
|
|
36
|
+
T[R - 1] = arguments[R];
|
|
37
37
|
$("error", n, T);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
function $(n,
|
|
40
|
+
function $(n, h, T) {
|
|
41
41
|
{
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
var
|
|
45
|
-
return String(
|
|
42
|
+
var R = j.ReactDebugCurrentFrame, H = R.getStackAddendum();
|
|
43
|
+
H !== "" && (h += "%s", T = T.concat([H]));
|
|
44
|
+
var q = T.map(function(A) {
|
|
45
|
+
return String(A);
|
|
46
46
|
});
|
|
47
|
-
|
|
47
|
+
q.unshift("Warning: " + h), Function.prototype.apply.call(console[n], console, q);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
var B = !1,
|
|
51
|
-
|
|
52
|
-
function
|
|
53
|
-
return !!(typeof n == "string" || typeof n == "function" || n === l || n === x ||
|
|
50
|
+
var B = !1, ae = !1, X = !1, he = !1, L = !1, Z;
|
|
51
|
+
Z = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
52
|
+
function U(n) {
|
|
53
|
+
return !!(typeof n == "string" || typeof n == "function" || n === l || n === x || L || n === r || n === g || n === c || he || n === u || B || ae || X || typeof n == "object" && n !== null && (n.$$typeof === S || n.$$typeof === y || n.$$typeof === m || n.$$typeof === i || n.$$typeof === s || // This needs to include all possible module reference object
|
|
54
54
|
// types supported by any Flight configuration anywhere since
|
|
55
55
|
// we don't know which Flight build this will end up being used
|
|
56
56
|
// with.
|
|
57
|
-
n.$$typeof ===
|
|
57
|
+
n.$$typeof === Z || n.getModuleId !== void 0));
|
|
58
58
|
}
|
|
59
|
-
function D(n,
|
|
60
|
-
var
|
|
61
|
-
if (
|
|
62
|
-
return
|
|
63
|
-
var
|
|
64
|
-
return
|
|
59
|
+
function D(n, h, T) {
|
|
60
|
+
var R = n.displayName;
|
|
61
|
+
if (R)
|
|
62
|
+
return R;
|
|
63
|
+
var H = h.displayName || h.name || "";
|
|
64
|
+
return H !== "" ? T + "(" + H + ")" : T;
|
|
65
65
|
}
|
|
66
66
|
function W(n) {
|
|
67
67
|
return n.displayName || "Context";
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function oe(n) {
|
|
70
70
|
if (n == null)
|
|
71
71
|
return null;
|
|
72
|
-
if (typeof n.tag == "number" &&
|
|
72
|
+
if (typeof n.tag == "number" && M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
|
|
73
73
|
return n.displayName || n.name || null;
|
|
74
74
|
if (typeof n == "string")
|
|
75
75
|
return n;
|
|
@@ -82,7 +82,7 @@ function $r() {
|
|
|
82
82
|
return "Profiler";
|
|
83
83
|
case r:
|
|
84
84
|
return "StrictMode";
|
|
85
|
-
case
|
|
85
|
+
case g:
|
|
86
86
|
return "Suspense";
|
|
87
87
|
case c:
|
|
88
88
|
return "SuspenseList";
|
|
@@ -90,20 +90,20 @@ function $r() {
|
|
|
90
90
|
if (typeof n == "object")
|
|
91
91
|
switch (n.$$typeof) {
|
|
92
92
|
case i:
|
|
93
|
-
var
|
|
94
|
-
return W(
|
|
93
|
+
var h = n;
|
|
94
|
+
return W(h) + ".Consumer";
|
|
95
95
|
case m:
|
|
96
96
|
var T = n;
|
|
97
97
|
return W(T._context) + ".Provider";
|
|
98
98
|
case s:
|
|
99
99
|
return D(n, n.render, "ForwardRef");
|
|
100
|
-
case
|
|
101
|
-
var
|
|
102
|
-
return
|
|
103
|
-
case
|
|
104
|
-
var
|
|
100
|
+
case y:
|
|
101
|
+
var R = n.displayName || null;
|
|
102
|
+
return R !== null ? R : oe(n.type) || "Memo";
|
|
103
|
+
case S: {
|
|
104
|
+
var H = n, q = H._payload, A = H._init;
|
|
105
105
|
try {
|
|
106
|
-
return
|
|
106
|
+
return oe(A(q));
|
|
107
107
|
} catch {
|
|
108
108
|
return null;
|
|
109
109
|
}
|
|
@@ -111,18 +111,18 @@ function $r() {
|
|
|
111
111
|
}
|
|
112
112
|
return null;
|
|
113
113
|
}
|
|
114
|
-
var
|
|
115
|
-
function
|
|
114
|
+
var G = Object.assign, xe = 0, $e, De, I, Y, ue, ee, te;
|
|
115
|
+
function K() {
|
|
116
116
|
}
|
|
117
|
-
|
|
118
|
-
function
|
|
117
|
+
K.__reactDisabledLog = !0;
|
|
118
|
+
function f() {
|
|
119
119
|
{
|
|
120
|
-
if (
|
|
121
|
-
|
|
120
|
+
if (xe === 0) {
|
|
121
|
+
$e = console.log, De = console.info, I = console.warn, Y = console.error, ue = console.group, ee = console.groupCollapsed, te = console.groupEnd;
|
|
122
122
|
var n = {
|
|
123
123
|
configurable: !0,
|
|
124
124
|
enumerable: !0,
|
|
125
|
-
value:
|
|
125
|
+
value: K,
|
|
126
126
|
writable: !0
|
|
127
127
|
};
|
|
128
128
|
Object.defineProperties(console, {
|
|
@@ -135,250 +135,250 @@ function $r() {
|
|
|
135
135
|
groupEnd: n
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
|
-
|
|
138
|
+
xe++;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
function k() {
|
|
142
142
|
{
|
|
143
|
-
if (
|
|
143
|
+
if (xe--, xe === 0) {
|
|
144
144
|
var n = {
|
|
145
145
|
configurable: !0,
|
|
146
146
|
enumerable: !0,
|
|
147
147
|
writable: !0
|
|
148
148
|
};
|
|
149
149
|
Object.defineProperties(console, {
|
|
150
|
-
log:
|
|
151
|
-
value:
|
|
150
|
+
log: G({}, n, {
|
|
151
|
+
value: $e
|
|
152
152
|
}),
|
|
153
|
-
info:
|
|
154
|
-
value:
|
|
153
|
+
info: G({}, n, {
|
|
154
|
+
value: De
|
|
155
155
|
}),
|
|
156
|
-
warn:
|
|
157
|
-
value:
|
|
156
|
+
warn: G({}, n, {
|
|
157
|
+
value: I
|
|
158
158
|
}),
|
|
159
|
-
error:
|
|
159
|
+
error: G({}, n, {
|
|
160
160
|
value: Y
|
|
161
161
|
}),
|
|
162
|
-
group:
|
|
163
|
-
value:
|
|
162
|
+
group: G({}, n, {
|
|
163
|
+
value: ue
|
|
164
164
|
}),
|
|
165
|
-
groupCollapsed:
|
|
166
|
-
value:
|
|
165
|
+
groupCollapsed: G({}, n, {
|
|
166
|
+
value: ee
|
|
167
167
|
}),
|
|
168
|
-
groupEnd:
|
|
169
|
-
value:
|
|
168
|
+
groupEnd: G({}, n, {
|
|
169
|
+
value: te
|
|
170
170
|
})
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
-
|
|
173
|
+
xe < 0 && M("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
var F =
|
|
177
|
-
function
|
|
176
|
+
var F = j.ReactCurrentDispatcher, P;
|
|
177
|
+
function N(n, h, T) {
|
|
178
178
|
{
|
|
179
179
|
if (P === void 0)
|
|
180
180
|
try {
|
|
181
181
|
throw Error();
|
|
182
|
-
} catch (
|
|
183
|
-
var
|
|
184
|
-
P =
|
|
182
|
+
} catch (H) {
|
|
183
|
+
var R = H.stack.trim().match(/\n( *(at )?)/);
|
|
184
|
+
P = R && R[1] || "";
|
|
185
185
|
}
|
|
186
186
|
return `
|
|
187
187
|
` + P + n;
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
var
|
|
190
|
+
var se = !1, re;
|
|
191
191
|
{
|
|
192
|
-
var
|
|
193
|
-
|
|
192
|
+
var Ee = typeof WeakMap == "function" ? WeakMap : Map;
|
|
193
|
+
re = new Ee();
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
if (!n ||
|
|
195
|
+
function ie(n, h) {
|
|
196
|
+
if (!n || se)
|
|
197
197
|
return "";
|
|
198
198
|
{
|
|
199
|
-
var T =
|
|
199
|
+
var T = re.get(n);
|
|
200
200
|
if (T !== void 0)
|
|
201
201
|
return T;
|
|
202
202
|
}
|
|
203
|
-
var
|
|
204
|
-
|
|
205
|
-
var
|
|
203
|
+
var R;
|
|
204
|
+
se = !0;
|
|
205
|
+
var H = Error.prepareStackTrace;
|
|
206
206
|
Error.prepareStackTrace = void 0;
|
|
207
|
-
var
|
|
208
|
-
|
|
207
|
+
var q;
|
|
208
|
+
q = F.current, F.current = null, f();
|
|
209
209
|
try {
|
|
210
|
-
if (
|
|
211
|
-
var
|
|
210
|
+
if (h) {
|
|
211
|
+
var A = function() {
|
|
212
212
|
throw Error();
|
|
213
213
|
};
|
|
214
|
-
if (Object.defineProperty(
|
|
214
|
+
if (Object.defineProperty(A.prototype, "props", {
|
|
215
215
|
set: function() {
|
|
216
216
|
throw Error();
|
|
217
217
|
}
|
|
218
218
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
219
219
|
try {
|
|
220
|
-
Reflect.construct(
|
|
221
|
-
} catch (
|
|
222
|
-
|
|
220
|
+
Reflect.construct(A, []);
|
|
221
|
+
} catch (we) {
|
|
222
|
+
R = we;
|
|
223
223
|
}
|
|
224
|
-
Reflect.construct(n, [],
|
|
224
|
+
Reflect.construct(n, [], A);
|
|
225
225
|
} else {
|
|
226
226
|
try {
|
|
227
|
-
|
|
228
|
-
} catch (
|
|
229
|
-
|
|
227
|
+
A.call();
|
|
228
|
+
} catch (we) {
|
|
229
|
+
R = we;
|
|
230
230
|
}
|
|
231
|
-
n.call(
|
|
231
|
+
n.call(A.prototype);
|
|
232
232
|
}
|
|
233
233
|
} else {
|
|
234
234
|
try {
|
|
235
235
|
throw Error();
|
|
236
|
-
} catch (
|
|
237
|
-
|
|
236
|
+
} catch (we) {
|
|
237
|
+
R = we;
|
|
238
238
|
}
|
|
239
239
|
n();
|
|
240
240
|
}
|
|
241
|
-
} catch (
|
|
242
|
-
if (
|
|
243
|
-
for (var
|
|
244
|
-
`),
|
|
245
|
-
`),
|
|
246
|
-
|
|
247
|
-
for (;
|
|
248
|
-
if (
|
|
249
|
-
if (
|
|
241
|
+
} catch (we) {
|
|
242
|
+
if (we && R && typeof we.stack == "string") {
|
|
243
|
+
for (var _ = we.stack.split(`
|
|
244
|
+
`), C = R.stack.split(`
|
|
245
|
+
`), ne = _.length - 1, de = C.length - 1; ne >= 1 && de >= 0 && _[ne] !== C[de]; )
|
|
246
|
+
de--;
|
|
247
|
+
for (; ne >= 1 && de >= 0; ne--, de--)
|
|
248
|
+
if (_[ne] !== C[de]) {
|
|
249
|
+
if (ne !== 1 || de !== 1)
|
|
250
250
|
do
|
|
251
|
-
if (
|
|
252
|
-
var
|
|
253
|
-
` +
|
|
254
|
-
return n.displayName &&
|
|
251
|
+
if (ne--, de--, de < 0 || _[ne] !== C[de]) {
|
|
252
|
+
var Te = `
|
|
253
|
+
` + _[ne].replace(" at new ", " at ");
|
|
254
|
+
return n.displayName && Te.includes("<anonymous>") && (Te = Te.replace("<anonymous>", n.displayName)), typeof n == "function" && re.set(n, Te), Te;
|
|
255
255
|
}
|
|
256
|
-
while (
|
|
256
|
+
while (ne >= 1 && de >= 0);
|
|
257
257
|
break;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
} finally {
|
|
261
|
-
|
|
261
|
+
se = !1, F.current = q, k(), Error.prepareStackTrace = H;
|
|
262
262
|
}
|
|
263
|
-
var Ke = n ? n.displayName || n.name : "",
|
|
264
|
-
return typeof n == "function" &&
|
|
263
|
+
var Ke = n ? n.displayName || n.name : "", Ue = Ke ? N(Ke) : "";
|
|
264
|
+
return typeof n == "function" && re.set(n, Ue), Ue;
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
return
|
|
266
|
+
function ke(n, h, T) {
|
|
267
|
+
return ie(n, !1);
|
|
268
268
|
}
|
|
269
|
-
function
|
|
270
|
-
var
|
|
271
|
-
return !!(
|
|
269
|
+
function _e(n) {
|
|
270
|
+
var h = n.prototype;
|
|
271
|
+
return !!(h && h.isReactComponent);
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function Fe(n, h, T) {
|
|
274
274
|
if (n == null)
|
|
275
275
|
return "";
|
|
276
276
|
if (typeof n == "function")
|
|
277
|
-
return
|
|
277
|
+
return ie(n, _e(n));
|
|
278
278
|
if (typeof n == "string")
|
|
279
|
-
return
|
|
279
|
+
return N(n);
|
|
280
280
|
switch (n) {
|
|
281
|
-
case
|
|
282
|
-
return
|
|
281
|
+
case g:
|
|
282
|
+
return N("Suspense");
|
|
283
283
|
case c:
|
|
284
|
-
return
|
|
284
|
+
return N("SuspenseList");
|
|
285
285
|
}
|
|
286
286
|
if (typeof n == "object")
|
|
287
287
|
switch (n.$$typeof) {
|
|
288
288
|
case s:
|
|
289
|
-
return
|
|
290
|
-
case
|
|
291
|
-
return
|
|
292
|
-
case
|
|
293
|
-
var
|
|
289
|
+
return ke(n.render);
|
|
290
|
+
case y:
|
|
291
|
+
return Fe(n.type, h, T);
|
|
292
|
+
case S: {
|
|
293
|
+
var R = n, H = R._payload, q = R._init;
|
|
294
294
|
try {
|
|
295
|
-
return
|
|
295
|
+
return Fe(q(H), h, T);
|
|
296
296
|
} catch {
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
return "";
|
|
301
301
|
}
|
|
302
|
-
var
|
|
303
|
-
function
|
|
302
|
+
var Se = Object.prototype.hasOwnProperty, Re = {}, nt = j.ReactDebugCurrentFrame;
|
|
303
|
+
function Be(n) {
|
|
304
304
|
if (n) {
|
|
305
|
-
var
|
|
306
|
-
|
|
305
|
+
var h = n._owner, T = Fe(n.type, n._source, h ? h.type : null);
|
|
306
|
+
nt.setExtraStackFrame(T);
|
|
307
307
|
} else
|
|
308
|
-
|
|
308
|
+
nt.setExtraStackFrame(null);
|
|
309
309
|
}
|
|
310
|
-
function jt(n,
|
|
310
|
+
function jt(n, h, T, R, H) {
|
|
311
311
|
{
|
|
312
|
-
var
|
|
313
|
-
for (var
|
|
314
|
-
if (
|
|
315
|
-
var
|
|
312
|
+
var q = Function.call.bind(Se);
|
|
313
|
+
for (var A in n)
|
|
314
|
+
if (q(n, A)) {
|
|
315
|
+
var _ = void 0;
|
|
316
316
|
try {
|
|
317
|
-
if (typeof n[
|
|
318
|
-
var
|
|
319
|
-
throw
|
|
317
|
+
if (typeof n[A] != "function") {
|
|
318
|
+
var C = Error((R || "React class") + ": " + T + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
319
|
+
throw C.name = "Invariant Violation", C;
|
|
320
320
|
}
|
|
321
|
-
|
|
322
|
-
} catch (
|
|
323
|
-
|
|
321
|
+
_ = n[A](h, A, R, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
322
|
+
} catch (ne) {
|
|
323
|
+
_ = ne;
|
|
324
324
|
}
|
|
325
|
-
|
|
325
|
+
_ && !(_ instanceof Error) && (Be(H), 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).", R || "React class", T, A, typeof _), Be(null)), _ instanceof Error && !(_.message in Re) && (Re[_.message] = !0, Be(H), M("Failed %s type: %s", T, _.message), Be(null));
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
var ut = Array.isArray;
|
|
330
|
-
function
|
|
330
|
+
function We(n) {
|
|
331
331
|
return ut(n);
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function Tt(n) {
|
|
334
334
|
{
|
|
335
|
-
var
|
|
335
|
+
var h = typeof Symbol == "function" && Symbol.toStringTag, T = h && n[Symbol.toStringTag] || n.constructor.name || "Object";
|
|
336
336
|
return T;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function pt(n) {
|
|
340
340
|
try {
|
|
341
|
-
return
|
|
341
|
+
return Pe(n), !1;
|
|
342
342
|
} catch {
|
|
343
343
|
return !0;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function Pe(n) {
|
|
347
347
|
return "" + n;
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
if (
|
|
351
|
-
return
|
|
349
|
+
function Le(n) {
|
|
350
|
+
if (pt(n))
|
|
351
|
+
return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Tt(n)), Pe(n);
|
|
352
352
|
}
|
|
353
|
-
var
|
|
353
|
+
var je = j.ReactCurrentOwner, Dt = {
|
|
354
354
|
key: !0,
|
|
355
355
|
ref: !0,
|
|
356
356
|
__self: !0,
|
|
357
357
|
__source: !0
|
|
358
|
-
},
|
|
359
|
-
function
|
|
360
|
-
if (
|
|
361
|
-
var
|
|
362
|
-
if (
|
|
358
|
+
}, kt, ht;
|
|
359
|
+
function Lt(n) {
|
|
360
|
+
if (Se.call(n, "ref")) {
|
|
361
|
+
var h = Object.getOwnPropertyDescriptor(n, "ref").get;
|
|
362
|
+
if (h && h.isReactWarning)
|
|
363
363
|
return !1;
|
|
364
364
|
}
|
|
365
365
|
return n.ref !== void 0;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
if (
|
|
369
|
-
var
|
|
370
|
-
if (
|
|
367
|
+
function Mt(n) {
|
|
368
|
+
if (Se.call(n, "key")) {
|
|
369
|
+
var h = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
370
|
+
if (h && h.isReactWarning)
|
|
371
371
|
return !1;
|
|
372
372
|
}
|
|
373
373
|
return n.key !== void 0;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
typeof n.ref == "string" &&
|
|
375
|
+
function Et(n, h) {
|
|
376
|
+
typeof n.ref == "string" && je.current;
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function at(n, h) {
|
|
379
379
|
{
|
|
380
380
|
var T = function() {
|
|
381
|
-
|
|
381
|
+
kt || (kt = !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
382
|
};
|
|
383
383
|
T.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
384
384
|
get: T,
|
|
@@ -386,10 +386,10 @@ function $r() {
|
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function qe(n, h) {
|
|
390
390
|
{
|
|
391
391
|
var T = function() {
|
|
392
|
-
|
|
392
|
+
ht || (ht = !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
393
|
};
|
|
394
394
|
T.isReactWarning = !0, Object.defineProperty(n, "ref", {
|
|
395
395
|
get: T,
|
|
@@ -397,70 +397,70 @@ function $r() {
|
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
var
|
|
401
|
-
var
|
|
400
|
+
var ft = function(n, h, T, R, H, q, A) {
|
|
401
|
+
var _ = {
|
|
402
402
|
// This tag allows us to uniquely identify this as a React Element
|
|
403
403
|
$$typeof: o,
|
|
404
404
|
// Built-in properties that belong on the element
|
|
405
405
|
type: n,
|
|
406
|
-
key:
|
|
406
|
+
key: h,
|
|
407
407
|
ref: T,
|
|
408
|
-
props:
|
|
408
|
+
props: A,
|
|
409
409
|
// Record the component responsible for creating this element.
|
|
410
|
-
_owner:
|
|
410
|
+
_owner: q
|
|
411
411
|
};
|
|
412
|
-
return
|
|
412
|
+
return _._store = {}, Object.defineProperty(_._store, "validated", {
|
|
413
413
|
configurable: !1,
|
|
414
414
|
enumerable: !1,
|
|
415
415
|
writable: !0,
|
|
416
416
|
value: !1
|
|
417
|
-
}), Object.defineProperty(
|
|
417
|
+
}), Object.defineProperty(_, "_self", {
|
|
418
418
|
configurable: !1,
|
|
419
419
|
enumerable: !1,
|
|
420
420
|
writable: !1,
|
|
421
|
-
value:
|
|
422
|
-
}), Object.defineProperty(
|
|
421
|
+
value: R
|
|
422
|
+
}), Object.defineProperty(_, "_source", {
|
|
423
423
|
configurable: !1,
|
|
424
424
|
enumerable: !1,
|
|
425
425
|
writable: !1,
|
|
426
|
-
value:
|
|
427
|
-
}), Object.freeze && (Object.freeze(
|
|
426
|
+
value: H
|
|
427
|
+
}), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
|
|
428
428
|
};
|
|
429
|
-
function
|
|
429
|
+
function $t(n, h, T, R, H) {
|
|
430
430
|
{
|
|
431
|
-
var
|
|
432
|
-
T !== void 0 && (
|
|
433
|
-
for (
|
|
434
|
-
|
|
431
|
+
var q, A = {}, _ = null, C = null;
|
|
432
|
+
T !== void 0 && (Le(T), _ = "" + T), Mt(h) && (Le(h.key), _ = "" + h.key), Lt(h) && (C = h.ref, Et(h, H));
|
|
433
|
+
for (q in h)
|
|
434
|
+
Se.call(h, q) && !Dt.hasOwnProperty(q) && (A[q] = h[q]);
|
|
435
435
|
if (n && n.defaultProps) {
|
|
436
|
-
var
|
|
437
|
-
for (
|
|
438
|
-
|
|
436
|
+
var ne = n.defaultProps;
|
|
437
|
+
for (q in ne)
|
|
438
|
+
A[q] === void 0 && (A[q] = ne[q]);
|
|
439
439
|
}
|
|
440
|
-
if (
|
|
441
|
-
var
|
|
442
|
-
|
|
440
|
+
if (_ || C) {
|
|
441
|
+
var de = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
442
|
+
_ && at(A, de), C && qe(A, de);
|
|
443
443
|
}
|
|
444
|
-
return
|
|
444
|
+
return ft(n, _, C, H, R, je.current, A);
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
var
|
|
448
|
-
function
|
|
447
|
+
var ot = j.ReactCurrentOwner, Ge = j.ReactDebugCurrentFrame;
|
|
448
|
+
function Ie(n) {
|
|
449
449
|
if (n) {
|
|
450
|
-
var
|
|
451
|
-
|
|
450
|
+
var h = n._owner, T = Fe(n.type, n._source, h ? h.type : null);
|
|
451
|
+
Ge.setExtraStackFrame(T);
|
|
452
452
|
} else
|
|
453
|
-
|
|
453
|
+
Ge.setExtraStackFrame(null);
|
|
454
454
|
}
|
|
455
|
-
var
|
|
456
|
-
|
|
457
|
-
function
|
|
455
|
+
var Ze;
|
|
456
|
+
Ze = !1;
|
|
457
|
+
function st(n) {
|
|
458
458
|
return typeof n == "object" && n !== null && n.$$typeof === o;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function He() {
|
|
461
461
|
{
|
|
462
|
-
if (
|
|
463
|
-
var n =
|
|
462
|
+
if (ot.current) {
|
|
463
|
+
var n = oe(ot.current.type);
|
|
464
464
|
if (n)
|
|
465
465
|
return `
|
|
466
466
|
|
|
@@ -469,152 +469,152 @@ Check the render method of \`` + n + "`.";
|
|
|
469
469
|
return "";
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function mt(n) {
|
|
473
473
|
return "";
|
|
474
474
|
}
|
|
475
|
-
var
|
|
476
|
-
function
|
|
475
|
+
var it = {};
|
|
476
|
+
function xt(n) {
|
|
477
477
|
{
|
|
478
|
-
var
|
|
479
|
-
if (!
|
|
478
|
+
var h = He();
|
|
479
|
+
if (!h) {
|
|
480
480
|
var T = typeof n == "string" ? n : n.displayName || n.name;
|
|
481
|
-
T && (
|
|
481
|
+
T && (h = `
|
|
482
482
|
|
|
483
483
|
Check the top-level render call using <` + T + ">.");
|
|
484
484
|
}
|
|
485
|
-
return
|
|
485
|
+
return h;
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function gt(n, h) {
|
|
489
489
|
{
|
|
490
490
|
if (!n._store || n._store.validated || n.key != null)
|
|
491
491
|
return;
|
|
492
492
|
n._store.validated = !0;
|
|
493
|
-
var T =
|
|
494
|
-
if (
|
|
493
|
+
var T = xt(h);
|
|
494
|
+
if (it[T])
|
|
495
495
|
return;
|
|
496
|
-
|
|
497
|
-
var
|
|
498
|
-
n && n._owner && n._owner !==
|
|
496
|
+
it[T] = !0;
|
|
497
|
+
var R = "";
|
|
498
|
+
n && n._owner && n._owner !== ot.current && (R = " It was passed a child from " + oe(n._owner.type) + "."), Ie(n), M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, R), Ie(null);
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function yt(n, h) {
|
|
502
502
|
{
|
|
503
503
|
if (typeof n != "object")
|
|
504
504
|
return;
|
|
505
|
-
if (
|
|
505
|
+
if (We(n))
|
|
506
506
|
for (var T = 0; T < n.length; T++) {
|
|
507
|
-
var
|
|
508
|
-
|
|
507
|
+
var R = n[T];
|
|
508
|
+
st(R) && gt(R, h);
|
|
509
509
|
}
|
|
510
|
-
else if (
|
|
510
|
+
else if (st(n))
|
|
511
511
|
n._store && (n._store.validated = !0);
|
|
512
512
|
else if (n) {
|
|
513
|
-
var
|
|
514
|
-
if (typeof
|
|
515
|
-
for (var
|
|
516
|
-
|
|
513
|
+
var H = w(n);
|
|
514
|
+
if (typeof H == "function" && H !== n.entries)
|
|
515
|
+
for (var q = H.call(n), A; !(A = q.next()).done; )
|
|
516
|
+
st(A.value) && gt(A.value, h);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function d(n) {
|
|
521
521
|
{
|
|
522
|
-
var
|
|
523
|
-
if (
|
|
522
|
+
var h = n.type;
|
|
523
|
+
if (h == null || typeof h == "string")
|
|
524
524
|
return;
|
|
525
525
|
var T;
|
|
526
|
-
if (typeof
|
|
527
|
-
T =
|
|
528
|
-
else if (typeof
|
|
526
|
+
if (typeof h == "function")
|
|
527
|
+
T = h.propTypes;
|
|
528
|
+
else if (typeof h == "object" && (h.$$typeof === s || // Note: Memo only checks outer props here.
|
|
529
529
|
// Inner props are checked in the reconciler.
|
|
530
|
-
|
|
531
|
-
T =
|
|
530
|
+
h.$$typeof === y))
|
|
531
|
+
T = h.propTypes;
|
|
532
532
|
else
|
|
533
533
|
return;
|
|
534
534
|
if (T) {
|
|
535
|
-
var
|
|
536
|
-
jt(T, n.props, "prop",
|
|
537
|
-
} else if (
|
|
538
|
-
|
|
539
|
-
var
|
|
540
|
-
|
|
535
|
+
var R = oe(h);
|
|
536
|
+
jt(T, n.props, "prop", R, n);
|
|
537
|
+
} else if (h.PropTypes !== void 0 && !Ze) {
|
|
538
|
+
Ze = !0;
|
|
539
|
+
var H = oe(h);
|
|
540
|
+
M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", H || "Unknown");
|
|
541
541
|
}
|
|
542
|
-
typeof
|
|
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
543
|
}
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function v(n) {
|
|
546
546
|
{
|
|
547
|
-
for (var
|
|
548
|
-
var
|
|
549
|
-
if (
|
|
550
|
-
|
|
547
|
+
for (var h = Object.keys(n.props), T = 0; T < h.length; T++) {
|
|
548
|
+
var R = h[T];
|
|
549
|
+
if (R !== "children" && R !== "key") {
|
|
550
|
+
Ie(n), M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", R), Ie(null);
|
|
551
551
|
break;
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
n.ref !== null && (
|
|
554
|
+
n.ref !== null && (Ie(n), M("Invalid attribute `ref` supplied to `React.Fragment`."), Ie(null));
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
var
|
|
558
|
-
function
|
|
557
|
+
var E = {};
|
|
558
|
+
function O(n, h, T, R, H, q) {
|
|
559
559
|
{
|
|
560
|
-
var
|
|
561
|
-
if (!
|
|
562
|
-
var
|
|
563
|
-
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (
|
|
564
|
-
var
|
|
565
|
-
|
|
566
|
-
var
|
|
567
|
-
n === null ?
|
|
560
|
+
var A = U(n);
|
|
561
|
+
if (!A) {
|
|
562
|
+
var _ = "";
|
|
563
|
+
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (_ += " 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 C = mt();
|
|
565
|
+
C ? _ += C : _ += He();
|
|
566
|
+
var ne;
|
|
567
|
+
n === null ? ne = "null" : We(n) ? ne = "array" : n !== void 0 && n.$$typeof === o ? (ne = "<" + (oe(n.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : ne = typeof n, M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ne, _);
|
|
568
568
|
}
|
|
569
|
-
var
|
|
570
|
-
if (
|
|
571
|
-
return
|
|
572
|
-
if (
|
|
573
|
-
var
|
|
574
|
-
if (
|
|
575
|
-
if (
|
|
576
|
-
if (
|
|
577
|
-
for (var Ke = 0; Ke <
|
|
578
|
-
|
|
579
|
-
Object.freeze && Object.freeze(
|
|
569
|
+
var de = $t(n, h, T, H, q);
|
|
570
|
+
if (de == null)
|
|
571
|
+
return de;
|
|
572
|
+
if (A) {
|
|
573
|
+
var Te = h.children;
|
|
574
|
+
if (Te !== void 0)
|
|
575
|
+
if (R)
|
|
576
|
+
if (We(Te)) {
|
|
577
|
+
for (var Ke = 0; Ke < Te.length; Ke++)
|
|
578
|
+
yt(Te[Ke], n);
|
|
579
|
+
Object.freeze && Object.freeze(Te);
|
|
580
580
|
} else
|
|
581
|
-
|
|
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
582
|
else
|
|
583
|
-
|
|
583
|
+
yt(Te, n);
|
|
584
584
|
}
|
|
585
|
-
if (
|
|
586
|
-
var
|
|
587
|
-
return
|
|
588
|
-
}),
|
|
589
|
-
if (!
|
|
590
|
-
var
|
|
591
|
-
|
|
585
|
+
if (Se.call(h, "key")) {
|
|
586
|
+
var Ue = oe(n), we = Object.keys(h).filter(function(ir) {
|
|
587
|
+
return ir !== "key";
|
|
588
|
+
}), Ft = we.length > 0 ? "{key: someKey, " + we.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
589
|
+
if (!E[Ue + Ft]) {
|
|
590
|
+
var sr = we.length > 0 ? "{" + we.join(": ..., ") + ": ...}" : "{}";
|
|
591
|
+
M(`A props object containing a "key" prop is being spread into JSX:
|
|
592
592
|
let props = %s;
|
|
593
593
|
<%s {...props} />
|
|
594
594
|
React keys must be passed directly to JSX without using spread:
|
|
595
595
|
let props = %s;
|
|
596
|
-
<%s key={someKey} {...props} />`,
|
|
596
|
+
<%s key={someKey} {...props} />`, Ft, Ue, sr, Ue), E[Ue + Ft] = !0;
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
return n === l ?
|
|
599
|
+
return n === l ? v(de) : d(de), de;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
function
|
|
603
|
-
return
|
|
602
|
+
function V(n, h, T) {
|
|
603
|
+
return O(n, h, T, !0);
|
|
604
604
|
}
|
|
605
|
-
function
|
|
606
|
-
return
|
|
605
|
+
function J(n, h, T) {
|
|
606
|
+
return O(n, h, T, !1);
|
|
607
607
|
}
|
|
608
|
-
var
|
|
609
|
-
dt.Fragment = l, dt.jsx =
|
|
608
|
+
var ye = J, le = V;
|
|
609
|
+
dt.Fragment = l, dt.jsx = ye, dt.jsxs = le;
|
|
610
610
|
})()), dt;
|
|
611
611
|
}
|
|
612
612
|
var zt;
|
|
613
613
|
function Fr() {
|
|
614
|
-
return zt || (zt = 1, process.env.NODE_ENV === "production" ?
|
|
614
|
+
return zt || (zt = 1, process.env.NODE_ENV === "production" ? bt.exports = Er() : bt.exports = $r()), bt.exports;
|
|
615
615
|
}
|
|
616
616
|
var e = Fr();
|
|
617
|
-
const
|
|
617
|
+
const me = (t, o, a) => {
|
|
618
618
|
const l = new Date(t);
|
|
619
619
|
switch (a) {
|
|
620
620
|
case "hour":
|
|
@@ -637,13 +637,13 @@ const fe = (t, o, a) => {
|
|
|
637
637
|
break;
|
|
638
638
|
}
|
|
639
639
|
return l;
|
|
640
|
-
},
|
|
640
|
+
}, wt = (t, o) => {
|
|
641
641
|
const a = o.getTime() - t.getTime();
|
|
642
642
|
return Math.ceil(a / (1e3 * 60 * 60 * 24));
|
|
643
643
|
}, Rr = (t, o) => {
|
|
644
644
|
const a = o.getTime() - t.getTime();
|
|
645
645
|
return Math.ceil(a / (1e3 * 60 * 60));
|
|
646
|
-
},
|
|
646
|
+
}, be = (t, o) => {
|
|
647
647
|
const a = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], l = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], r = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], x = {
|
|
648
648
|
YYYY: t.getFullYear().toString(),
|
|
649
649
|
YY: t.getFullYear().toString().slice(-2),
|
|
@@ -665,7 +665,7 @@ const fe = (t, o, a) => {
|
|
|
665
665
|
return o === 0 || o === 6;
|
|
666
666
|
}, Wt = (t, o) => o.some(
|
|
667
667
|
(a) => a.getFullYear() === t.getFullYear() && a.getMonth() === t.getMonth() && a.getDate() === t.getDate()
|
|
668
|
-
),
|
|
668
|
+
), tt = (t) => {
|
|
669
669
|
const o = new Date(t);
|
|
670
670
|
return o.setHours(0, 0, 0, 0), o;
|
|
671
671
|
}, bn = (t) => {
|
|
@@ -676,13 +676,13 @@ const fe = (t, o, a) => {
|
|
|
676
676
|
case "hour":
|
|
677
677
|
return Rr(t, o);
|
|
678
678
|
case "day":
|
|
679
|
-
return
|
|
679
|
+
return wt(t, o);
|
|
680
680
|
case "week":
|
|
681
|
-
return Math.ceil(
|
|
681
|
+
return Math.ceil(wt(t, o) / 7);
|
|
682
682
|
case "month":
|
|
683
683
|
return (o.getFullYear() - t.getFullYear()) * 12 + (o.getMonth() - t.getMonth());
|
|
684
684
|
default:
|
|
685
|
-
return
|
|
685
|
+
return wt(t, o);
|
|
686
686
|
}
|
|
687
687
|
};
|
|
688
688
|
function Pr(t) {
|
|
@@ -710,7 +710,7 @@ function Pr(t) {
|
|
|
710
710
|
}
|
|
711
711
|
return { taskNumber: r, type: x, lag: m, lagUnit: i };
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function Ot(t, o) {
|
|
714
714
|
switch (o) {
|
|
715
715
|
case "hour":
|
|
716
716
|
return t / 24;
|
|
@@ -760,7 +760,7 @@ function Cr(t) {
|
|
|
760
760
|
SF: "s2e"
|
|
761
761
|
}[t];
|
|
762
762
|
}
|
|
763
|
-
const
|
|
763
|
+
const rt = (t) => t ? {
|
|
764
764
|
// Popover styles
|
|
765
765
|
popover: {
|
|
766
766
|
backgroundColor: t.popoverBackground || "#fff",
|
|
@@ -837,7 +837,7 @@ const nt = (t) => t ? {
|
|
|
837
837
|
lineHeight: t.lineHeight || 1.5714285714285714,
|
|
838
838
|
color: t.fontColor || "rgba(0, 0, 0, 0.88)"
|
|
839
839
|
}
|
|
840
|
-
} : {}, { Text:
|
|
840
|
+
} : {}, { Text: ve, Paragraph: Nr } = Ht, { Option: Ye } = ge, _r = ({
|
|
841
841
|
task: t,
|
|
842
842
|
allTasks: o,
|
|
843
843
|
links: a,
|
|
@@ -847,39 +847,39 @@ const nt = (t) => t ? {
|
|
|
847
847
|
children: m,
|
|
848
848
|
styleConfig: i
|
|
849
849
|
}) => {
|
|
850
|
-
const s =
|
|
851
|
-
if (
|
|
852
|
-
const
|
|
850
|
+
const s = rt(i), [g, c] = z(!1), [y, S] = z(null), [u, p] = z("e2s"), [b, w] = z("lag"), [j, M] = z(0), [$, B] = z(t.duration), [ae, X] = z(!0), he = "day", L = a.find((I) => I.target === t.id), Z = !!L, U = Q.useMemo(() => o.length === 0 ? /* @__PURE__ */ new Date() : new Date(Math.min(...o.map((I) => I.start.getTime()))), [o]), D = () => {
|
|
851
|
+
if (y) {
|
|
852
|
+
const I = b === "lag" ? j : -j, Y = Ot(I, he);
|
|
853
853
|
if ($ !== t.duration && x) {
|
|
854
|
-
const
|
|
854
|
+
const ue = me(new Date(t.start), $, "day");
|
|
855
855
|
x({
|
|
856
856
|
...t,
|
|
857
857
|
duration: $,
|
|
858
|
-
end:
|
|
858
|
+
end: ue
|
|
859
859
|
});
|
|
860
860
|
}
|
|
861
|
-
l(
|
|
861
|
+
l(y, t.id, u, Y), c(!1), W();
|
|
862
862
|
}
|
|
863
863
|
}, W = () => {
|
|
864
|
-
|
|
865
|
-
},
|
|
866
|
-
|
|
867
|
-
},
|
|
868
|
-
if (c(
|
|
869
|
-
if (X(!0),
|
|
870
|
-
|
|
871
|
-
const Y =
|
|
872
|
-
Y >= 0 ? (w("lag"),
|
|
864
|
+
S(null), p("e2s"), w("lag"), M(0), B(t.duration);
|
|
865
|
+
}, oe = () => {
|
|
866
|
+
L && r && (r(L.id), c(!1), W());
|
|
867
|
+
}, G = (I) => {
|
|
868
|
+
if (c(I), I) {
|
|
869
|
+
if (X(!0), L) {
|
|
870
|
+
S(L.source), p(L.type);
|
|
871
|
+
const Y = L.lag || 0;
|
|
872
|
+
Y >= 0 ? (w("lag"), M(Y)) : (w("lead"), M(Math.abs(Y)));
|
|
873
873
|
} else
|
|
874
874
|
W();
|
|
875
875
|
B(t.duration);
|
|
876
876
|
}
|
|
877
|
-
},
|
|
878
|
-
if (!
|
|
879
|
-
const
|
|
880
|
-
let
|
|
881
|
-
|
|
882
|
-
const P =
|
|
877
|
+
}, xe = () => {
|
|
878
|
+
if (!ae) return null;
|
|
879
|
+
const I = u === "e2s", Y = u === "s2s", ue = u === "e2e", ee = u === "s2e";
|
|
880
|
+
let te = 0, K = 0, f = "", k = 0, F = -1;
|
|
881
|
+
I ? (te = 50, K = 350, k = 250, F = 350, f = "M 250 60 L 300 60 L 300 140 L 348 140") : ue ? (te = 100, K = 100, k = 300, F = -1, f = "M 300 60 L 350 60 L 350 140 L 302 140") : Y ? (te = 250, K = 250, k = 250, F = -1, f = "M 250 60 L 200 60 L 200 140 L 248 140") : ee && (te = 350, K = 50, k = 350, F = 250, f = "M 350 60 L 300 60 L 300 140 L 252 140");
|
|
882
|
+
const P = y === "gantt-start-date", N = o.find((se) => se.id === y);
|
|
883
883
|
return /* @__PURE__ */ e.jsx("div", { style: {
|
|
884
884
|
width: "100%",
|
|
885
885
|
height: 90,
|
|
@@ -894,40 +894,40 @@ const nt = (t) => t ? {
|
|
|
894
894
|
/* @__PURE__ */ e.jsx("defs", { children: /* @__PURE__ */ e.jsx("marker", { id: "arrowhead", markerWidth: "12", markerHeight: "9", refX: "12", refY: "4.5", orient: "auto", children: /* @__PURE__ */ e.jsx("polygon", { points: "0 0, 12 4.5, 0 9", fill: "#8c8c8c" }) }) }),
|
|
895
895
|
/* @__PURE__ */ e.jsx("line", { x1: k, x2: k, y1: "0", y2: "200", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
|
|
896
896
|
F !== -1 && /* @__PURE__ */ e.jsx("line", { x1: F, x2: F, y1: "0", y2: "200", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
|
|
897
|
-
/* @__PURE__ */ e.jsx("rect", { x:
|
|
898
|
-
/* @__PURE__ */ e.jsx("text", { x:
|
|
899
|
-
/* @__PURE__ */ e.jsx("rect", { x:
|
|
900
|
-
/* @__PURE__ */ e.jsxs("text", { x:
|
|
897
|
+
/* @__PURE__ */ e.jsx("rect", { x: te, y: "35", width: "200", height: "50", rx: "4", fill: "#e6f4ff", stroke: "#91caff", strokeWidth: "2" }),
|
|
898
|
+
/* @__PURE__ */ e.jsx("text", { x: te + 100, y: "66", fontSize: "15", textAnchor: "middle", fill: "#003a8c", fontWeight: "600", children: P ? "Start Date" : N ? `Stage ${o.indexOf(N) + 1}` : "Predecessor" }),
|
|
899
|
+
/* @__PURE__ */ e.jsx("rect", { x: K, y: "115", width: "200", height: "50", rx: "4", fill: "#e6f4ff", stroke: "#91caff", strokeWidth: "2" }),
|
|
900
|
+
/* @__PURE__ */ e.jsxs("text", { x: K + 100, y: "146", fontSize: "15", textAnchor: "middle", fill: "#003a8c", fontWeight: "600", children: [
|
|
901
901
|
"Stage ",
|
|
902
902
|
o.indexOf(t) + 1
|
|
903
903
|
] }),
|
|
904
|
-
/* @__PURE__ */ e.jsx("path", { d:
|
|
904
|
+
/* @__PURE__ */ e.jsx("path", { d: f, fill: "none", stroke: "#8c8c8c", strokeWidth: "2.5", markerEnd: "url(#arrowhead)" })
|
|
905
905
|
] }) });
|
|
906
|
-
},
|
|
907
|
-
const
|
|
908
|
-
if (!
|
|
909
|
-
const
|
|
910
|
-
let
|
|
906
|
+
}, $e = () => {
|
|
907
|
+
const I = y === "gantt-start-date", Y = o.find((K) => K.id === y);
|
|
908
|
+
if (!y) return "Select a checklist from the list to see how it will relate to the current stage.";
|
|
909
|
+
const ue = o.indexOf(t) + 1, ee = I ? "Start Date" : `Stage ${o.indexOf(Y) + 1}`;
|
|
910
|
+
let te = "";
|
|
911
911
|
switch (u) {
|
|
912
912
|
case "e2s":
|
|
913
|
-
|
|
913
|
+
te = `Stage ${ue} starts after ${ee} finishes`;
|
|
914
914
|
break;
|
|
915
915
|
case "s2s":
|
|
916
|
-
|
|
916
|
+
te = `Stage ${ue} starts when ${ee} starts`;
|
|
917
917
|
break;
|
|
918
918
|
case "e2e":
|
|
919
|
-
|
|
919
|
+
te = `Stage ${ue} finishes when ${ee} finishes`;
|
|
920
920
|
break;
|
|
921
921
|
case "s2e":
|
|
922
|
-
|
|
922
|
+
te = `Stage ${ue} finishes when ${ee} starts`;
|
|
923
923
|
break;
|
|
924
924
|
}
|
|
925
|
-
if (
|
|
926
|
-
const
|
|
927
|
-
b === "lag" ?
|
|
925
|
+
if (j > 0) {
|
|
926
|
+
const K = `${j} ${he}${j > 1 ? "s" : ""}`;
|
|
927
|
+
b === "lag" ? te += ` + ${K} delay` : te += ` - ${K} overlap`;
|
|
928
928
|
}
|
|
929
|
-
return
|
|
930
|
-
},
|
|
929
|
+
return te + ".";
|
|
930
|
+
}, De = /* @__PURE__ */ e.jsxs("div", { style: {
|
|
931
931
|
width: 550,
|
|
932
932
|
backgroundColor: s.popover?.backgroundColor || "#fff",
|
|
933
933
|
borderRadius: s.popover?.borderRadius || "8px",
|
|
@@ -935,83 +935,83 @@ const nt = (t) => t ? {
|
|
|
935
935
|
boxShadow: s.popover?.boxShadow,
|
|
936
936
|
fontFamily: s.popover?.fontFamily
|
|
937
937
|
}, children: [
|
|
938
|
-
/* @__PURE__ */ e.jsx(
|
|
938
|
+
/* @__PURE__ */ e.jsx(ve, { strong: !0, style: { fontSize: "16px", display: "block", marginBottom: 16, color: s.font?.color }, children: "Add Dependency" }),
|
|
939
939
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 12, marginBottom: 14 }, children: [
|
|
940
940
|
/* @__PURE__ */ e.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(
|
|
941
|
-
|
|
941
|
+
ge,
|
|
942
942
|
{
|
|
943
943
|
showSearch: !0,
|
|
944
944
|
placeholder: "Select checklist",
|
|
945
|
-
value:
|
|
946
|
-
onChange:
|
|
945
|
+
value: y,
|
|
946
|
+
onChange: S,
|
|
947
947
|
style: { width: "100%" },
|
|
948
|
-
filterOption: (
|
|
948
|
+
filterOption: (I, Y) => {
|
|
949
949
|
if (Y?.value === "gantt-start-date")
|
|
950
|
-
return "start date".includes(
|
|
951
|
-
const
|
|
952
|
-
if (!
|
|
953
|
-
const
|
|
954
|
-
return
|
|
950
|
+
return "start date".includes(I.toLowerCase());
|
|
951
|
+
const ue = o.find((te) => te.id === Y?.value);
|
|
952
|
+
if (!ue) return !1;
|
|
953
|
+
const ee = o.indexOf(ue) + 1;
|
|
954
|
+
return ue.text.toLowerCase().includes(I.toLowerCase()) || ee.toString().includes(I);
|
|
955
955
|
},
|
|
956
956
|
optionLabelProp: "label",
|
|
957
957
|
children: [
|
|
958
|
-
o.filter((
|
|
959
|
-
/* @__PURE__ */ e.jsxs(
|
|
960
|
-
o.indexOf(
|
|
958
|
+
o.filter((I) => I.id !== t.id).map((I) => /* @__PURE__ */ e.jsx(Ye, { value: I.id, label: I.text, children: /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", flexDirection: "column", padding: "4px 0" }, children: [
|
|
959
|
+
/* @__PURE__ */ e.jsxs(ve, { style: { fontSize: "13px" }, children: [
|
|
960
|
+
o.indexOf(I) + 1,
|
|
961
961
|
". ",
|
|
962
|
-
|
|
962
|
+
I.text
|
|
963
963
|
] }),
|
|
964
|
-
/* @__PURE__ */ e.jsxs(
|
|
964
|
+
/* @__PURE__ */ e.jsxs(ve, { type: "secondary", style: { fontSize: "11px" }, children: [
|
|
965
965
|
"Start: ",
|
|
966
|
-
|
|
966
|
+
be(I.start, "MMM D, YYYY")
|
|
967
967
|
] })
|
|
968
|
-
] }) },
|
|
969
|
-
/* @__PURE__ */ e.jsx(
|
|
970
|
-
/* @__PURE__ */ e.jsx(
|
|
971
|
-
/* @__PURE__ */ e.jsx(
|
|
968
|
+
] }) }, I.id)),
|
|
969
|
+
/* @__PURE__ */ e.jsx(Ye, { value: "gantt-start-date", label: "Start Date", children: /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", flexDirection: "column", padding: "4px 0", borderTop: "1px solid #f0f0f0", marginTop: "4px", paddingTop: "8px" }, children: [
|
|
970
|
+
/* @__PURE__ */ e.jsx(ve, { style: { fontSize: "13px", fontWeight: 600 }, children: "Start Date" }),
|
|
971
|
+
/* @__PURE__ */ e.jsx(ve, { type: "secondary", style: { fontSize: "11px" }, children: be(U, "MMM D, YYYY") })
|
|
972
972
|
] }) }, "gantt-start-date")
|
|
973
973
|
]
|
|
974
974
|
}
|
|
975
975
|
) }),
|
|
976
976
|
/* @__PURE__ */ e.jsx("div", { style: { width: 100 }, children: /* @__PURE__ */ e.jsxs(
|
|
977
|
-
|
|
977
|
+
ge,
|
|
978
978
|
{
|
|
979
979
|
value: u,
|
|
980
980
|
onChange: p,
|
|
981
981
|
style: { width: "100%" },
|
|
982
982
|
children: [
|
|
983
|
-
/* @__PURE__ */ e.jsx(
|
|
984
|
-
/* @__PURE__ */ e.jsx(
|
|
985
|
-
/* @__PURE__ */ e.jsx(
|
|
986
|
-
/* @__PURE__ */ e.jsx(
|
|
983
|
+
/* @__PURE__ */ e.jsx(Ye, { value: "e2s", children: "FS" }),
|
|
984
|
+
/* @__PURE__ */ e.jsx(Ye, { value: "e2e", children: "FF" }),
|
|
985
|
+
/* @__PURE__ */ e.jsx(Ye, { value: "s2s", children: "SS" }),
|
|
986
|
+
/* @__PURE__ */ e.jsx(Ye, { value: "s2e", children: "SF" })
|
|
987
987
|
]
|
|
988
988
|
}
|
|
989
989
|
) })
|
|
990
990
|
] }),
|
|
991
991
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 12, marginBottom: 14 }, children: [
|
|
992
992
|
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1 }, children: [
|
|
993
|
-
/* @__PURE__ */ e.jsx(
|
|
993
|
+
/* @__PURE__ */ e.jsx(ve, { style: { fontSize: "12px", display: "block", marginBottom: 6, color: s.font?.color }, children: "Delay type" }),
|
|
994
994
|
/* @__PURE__ */ e.jsxs(
|
|
995
|
-
|
|
995
|
+
ge,
|
|
996
996
|
{
|
|
997
997
|
value: b,
|
|
998
998
|
onChange: w,
|
|
999
999
|
style: { width: "100%" },
|
|
1000
1000
|
children: [
|
|
1001
|
-
/* @__PURE__ */ e.jsx(
|
|
1002
|
-
/* @__PURE__ */ e.jsx(
|
|
1001
|
+
/* @__PURE__ */ e.jsx(Ye, { value: "lag", children: "Lag by" }),
|
|
1002
|
+
/* @__PURE__ */ e.jsx(Ye, { value: "lead", children: "Lead by" })
|
|
1003
1003
|
]
|
|
1004
1004
|
}
|
|
1005
1005
|
)
|
|
1006
1006
|
] }),
|
|
1007
1007
|
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1 }, children: [
|
|
1008
|
-
/* @__PURE__ */ e.jsx(
|
|
1008
|
+
/* @__PURE__ */ e.jsx(ve, { style: { fontSize: "12px", display: "block", marginBottom: 6, color: s.font?.color }, children: "Days" }),
|
|
1009
1009
|
/* @__PURE__ */ e.jsx(
|
|
1010
|
-
|
|
1010
|
+
Ne,
|
|
1011
1011
|
{
|
|
1012
1012
|
min: 0,
|
|
1013
|
-
value:
|
|
1014
|
-
onChange: (
|
|
1013
|
+
value: j,
|
|
1014
|
+
onChange: (I) => M(I || 0),
|
|
1015
1015
|
style: { width: "100%" },
|
|
1016
1016
|
placeholder: "0"
|
|
1017
1017
|
}
|
|
@@ -1019,13 +1019,13 @@ const nt = (t) => t ? {
|
|
|
1019
1019
|
] })
|
|
1020
1020
|
] }),
|
|
1021
1021
|
/* @__PURE__ */ e.jsxs("div", { style: { marginBottom: 14 }, children: [
|
|
1022
|
-
/* @__PURE__ */ e.jsx(
|
|
1022
|
+
/* @__PURE__ */ e.jsx(ve, { style: { fontSize: "12px", display: "block", marginBottom: 6, color: s.font?.color }, children: "Duration (days)" }),
|
|
1023
1023
|
/* @__PURE__ */ e.jsx(
|
|
1024
|
-
|
|
1024
|
+
Ne,
|
|
1025
1025
|
{
|
|
1026
1026
|
min: 1,
|
|
1027
1027
|
value: $,
|
|
1028
|
-
onChange: (
|
|
1028
|
+
onChange: (I) => B(I || 1),
|
|
1029
1029
|
style: { width: "100%" },
|
|
1030
1030
|
placeholder: "Duration"
|
|
1031
1031
|
}
|
|
@@ -1037,42 +1037,42 @@ const nt = (t) => t ? {
|
|
|
1037
1037
|
borderRadius: "4px",
|
|
1038
1038
|
marginBottom: 14
|
|
1039
1039
|
}, children: /* @__PURE__ */ e.jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "8px" }, children: [
|
|
1040
|
-
/* @__PURE__ */ e.jsx(
|
|
1041
|
-
/* @__PURE__ */ e.jsx(
|
|
1042
|
-
/* @__PURE__ */ e.jsx(
|
|
1043
|
-
/* @__PURE__ */ e.jsx(
|
|
1040
|
+
/* @__PURE__ */ e.jsx(ve, { style: { fontSize: "11px", color: s.font?.color }, children: "FS: Finish to Start" }),
|
|
1041
|
+
/* @__PURE__ */ e.jsx(ve, { style: { fontSize: "11px", color: s.font?.color }, children: "SS: Start to Start" }),
|
|
1042
|
+
/* @__PURE__ */ e.jsx(ve, { style: { fontSize: "11px", color: s.font?.color }, children: "FF: Finish to Finish" }),
|
|
1043
|
+
/* @__PURE__ */ e.jsx(ve, { style: { fontSize: "11px", color: s.font?.color }, children: "SF: Start to Finish" })
|
|
1044
1044
|
] }) }),
|
|
1045
1045
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 8 }, children: [
|
|
1046
|
-
/* @__PURE__ */ e.jsx(
|
|
1046
|
+
/* @__PURE__ */ e.jsx(ve, { strong: !0, style: { fontSize: "13px", color: s.font?.color }, children: "Dependency preview" }),
|
|
1047
1047
|
/* @__PURE__ */ e.jsx(
|
|
1048
1048
|
"a",
|
|
1049
1049
|
{
|
|
1050
|
-
onClick: () => X(!
|
|
1050
|
+
onClick: () => X(!ae),
|
|
1051
1051
|
style: {
|
|
1052
1052
|
fontSize: "12px",
|
|
1053
1053
|
color: "#1890ff",
|
|
1054
1054
|
cursor: "pointer",
|
|
1055
1055
|
textDecoration: "none"
|
|
1056
1056
|
},
|
|
1057
|
-
children:
|
|
1057
|
+
children: ae ? "Hide preview" : "Show preview"
|
|
1058
1058
|
}
|
|
1059
1059
|
)
|
|
1060
1060
|
] }),
|
|
1061
|
-
|
|
1062
|
-
|
|
1061
|
+
ae && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1062
|
+
xe(),
|
|
1063
1063
|
/* @__PURE__ */ e.jsx(Nr, { style: {
|
|
1064
1064
|
fontSize: "12px",
|
|
1065
1065
|
color: s.font?.color || "#262626",
|
|
1066
1066
|
marginBottom: 14,
|
|
1067
1067
|
lineHeight: "1.5"
|
|
1068
|
-
}, children:
|
|
1068
|
+
}, children: $e() })
|
|
1069
1069
|
] }),
|
|
1070
1070
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", justifyContent: "flex-end", gap: 10 }, children: [
|
|
1071
|
-
|
|
1072
|
-
|
|
1071
|
+
Z && /* @__PURE__ */ e.jsx(
|
|
1072
|
+
fe,
|
|
1073
1073
|
{
|
|
1074
1074
|
danger: !0,
|
|
1075
|
-
onClick:
|
|
1075
|
+
onClick: oe,
|
|
1076
1076
|
style: {
|
|
1077
1077
|
...s.buttonDanger
|
|
1078
1078
|
},
|
|
@@ -1080,89 +1080,89 @@ const nt = (t) => t ? {
|
|
|
1080
1080
|
}
|
|
1081
1081
|
),
|
|
1082
1082
|
/* @__PURE__ */ e.jsx(
|
|
1083
|
-
|
|
1083
|
+
fe,
|
|
1084
1084
|
{
|
|
1085
1085
|
type: "primary",
|
|
1086
1086
|
onClick: D,
|
|
1087
|
-
disabled: !
|
|
1087
|
+
disabled: !y,
|
|
1088
1088
|
style: {
|
|
1089
1089
|
...s.buttonPrimary,
|
|
1090
1090
|
minWidth: 100
|
|
1091
1091
|
},
|
|
1092
|
-
children:
|
|
1092
|
+
children: Z ? "Update" : "Add"
|
|
1093
1093
|
}
|
|
1094
1094
|
)
|
|
1095
1095
|
] })
|
|
1096
1096
|
] });
|
|
1097
1097
|
return /* @__PURE__ */ e.jsx(
|
|
1098
|
-
|
|
1098
|
+
dr,
|
|
1099
1099
|
{
|
|
1100
|
-
content:
|
|
1100
|
+
content: De,
|
|
1101
1101
|
trigger: "click",
|
|
1102
|
-
open:
|
|
1103
|
-
onOpenChange:
|
|
1102
|
+
open: g,
|
|
1103
|
+
onOpenChange: G,
|
|
1104
1104
|
placement: "bottomLeft",
|
|
1105
1105
|
overlayClassName: "dependency-popover",
|
|
1106
1106
|
overlayInnerStyle: { padding: 0 },
|
|
1107
1107
|
children: m
|
|
1108
1108
|
}
|
|
1109
1109
|
);
|
|
1110
|
-
},
|
|
1111
|
-
({ tasks: t, allTasks: o = [], columns: a, selectedTask: l, onTaskClick: r, onTaskContextMenu: x, onTaskUpdate: m, onTaskDragStart: i, onAddTask: s, onAddDependency:
|
|
1112
|
-
const w =
|
|
1113
|
-
|
|
1114
|
-
const [
|
|
1115
|
-
if (!
|
|
1116
|
-
const
|
|
1117
|
-
return
|
|
1118
|
-
}, X = (
|
|
1119
|
-
if (
|
|
1120
|
-
const
|
|
1110
|
+
}, Kt = lr(Ct(
|
|
1111
|
+
({ tasks: t, allTasks: o = [], columns: a, selectedTask: l, onTaskClick: r, onTaskContextMenu: x, onTaskUpdate: m, onTaskDragStart: i, onAddTask: s, onAddDependency: g, onRemoveDependency: c, links: y = [], dropIndicator: S, reorderTask: u, styleConfig: p }, b) => {
|
|
1112
|
+
const w = Q.useRef(null);
|
|
1113
|
+
Q.useImperativeHandle(b, () => w.current);
|
|
1114
|
+
const [j, M] = Q.useState(null), [$, B] = Q.useState(0), ae = (L, Z = 0) => {
|
|
1115
|
+
if (!L.parent) return Z;
|
|
1116
|
+
const U = t.find((D) => D.id === L.parent);
|
|
1117
|
+
return U ? ae(U, Z + 1) : Z;
|
|
1118
|
+
}, X = (L, Z) => {
|
|
1119
|
+
if (Z === L.duration) return;
|
|
1120
|
+
const U = me(new Date(L.start), Z, "day");
|
|
1121
1121
|
m?.({
|
|
1122
|
-
...
|
|
1123
|
-
duration:
|
|
1124
|
-
end:
|
|
1122
|
+
...L,
|
|
1123
|
+
duration: Z,
|
|
1124
|
+
end: U
|
|
1125
1125
|
});
|
|
1126
|
-
},
|
|
1127
|
-
if (
|
|
1128
|
-
return
|
|
1129
|
-
switch (
|
|
1126
|
+
}, he = (L, Z) => {
|
|
1127
|
+
if (Z.template)
|
|
1128
|
+
return Z.template(L);
|
|
1129
|
+
switch (Z.name) {
|
|
1130
1130
|
case "text": {
|
|
1131
|
-
const
|
|
1132
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "gantt-grid-cell-text", style: { paddingLeft:
|
|
1131
|
+
const U = ae(L);
|
|
1132
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "gantt-grid-cell-text", style: { paddingLeft: U * 14 }, children: [
|
|
1133
1133
|
/* @__PURE__ */ e.jsx(
|
|
1134
1134
|
"div",
|
|
1135
1135
|
{
|
|
1136
1136
|
className: "gantt-row-drag-handle",
|
|
1137
1137
|
onMouseDown: (D) => {
|
|
1138
|
-
D.preventDefault(), i?.(
|
|
1138
|
+
D.preventDefault(), i?.(L.id, D.clientX, D.clientY, "reorder");
|
|
1139
1139
|
},
|
|
1140
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1140
|
+
children: /* @__PURE__ */ e.jsx(pe, { icon: hr })
|
|
1141
1141
|
}
|
|
1142
1142
|
),
|
|
1143
|
-
|
|
1144
|
-
D.stopPropagation(), m?.({ ...
|
|
1145
|
-
}, children: /* @__PURE__ */ e.jsx(
|
|
1146
|
-
/* @__PURE__ */ e.jsx("span", { className: "gantt-task-name-text", children:
|
|
1143
|
+
L.type === "project" ? /* @__PURE__ */ e.jsx("span", { className: "gantt-tree-icon", onClick: (D) => {
|
|
1144
|
+
D.stopPropagation(), m?.({ ...L, open: !L.open });
|
|
1145
|
+
}, children: /* @__PURE__ */ e.jsx(pe, { icon: L.open ? It : fr }) }) : /* @__PURE__ */ e.jsx("span", { style: { width: 16, display: "inline-block" } }),
|
|
1146
|
+
/* @__PURE__ */ e.jsx("span", { className: "gantt-task-name-text", children: L.text })
|
|
1147
1147
|
] });
|
|
1148
1148
|
}
|
|
1149
1149
|
case "start":
|
|
1150
|
-
return
|
|
1150
|
+
return be(L.start, "DD-MM-YYYY");
|
|
1151
1151
|
case "end":
|
|
1152
|
-
return
|
|
1152
|
+
return be(L.end, "DD-MM-YYYY");
|
|
1153
1153
|
case "duration":
|
|
1154
|
-
return
|
|
1155
|
-
|
|
1154
|
+
return j === L.id ? /* @__PURE__ */ e.jsx(
|
|
1155
|
+
Ne,
|
|
1156
1156
|
{
|
|
1157
1157
|
size: "small",
|
|
1158
1158
|
min: 1,
|
|
1159
1159
|
value: $,
|
|
1160
1160
|
onChange: (D) => B(D || 1),
|
|
1161
1161
|
onBlur: () => {
|
|
1162
|
-
X(
|
|
1162
|
+
X(L, $), M(null);
|
|
1163
1163
|
},
|
|
1164
1164
|
onPressEnter: () => {
|
|
1165
|
-
X(
|
|
1165
|
+
X(L, $), M(null);
|
|
1166
1166
|
},
|
|
1167
1167
|
autoFocus: !0,
|
|
1168
1168
|
style: { width: "100%", fontSize: "12px" }
|
|
@@ -1171,7 +1171,7 @@ const nt = (t) => t ? {
|
|
|
1171
1171
|
"div",
|
|
1172
1172
|
{
|
|
1173
1173
|
onClick: (D) => {
|
|
1174
|
-
D.stopPropagation(), L
|
|
1174
|
+
D.stopPropagation(), M(L.id), B(L.duration);
|
|
1175
1175
|
},
|
|
1176
1176
|
style: {
|
|
1177
1177
|
backgroundColor: "#fff7e6",
|
|
@@ -1185,21 +1185,21 @@ const nt = (t) => t ? {
|
|
|
1185
1185
|
cursor: "text"
|
|
1186
1186
|
},
|
|
1187
1187
|
children: [
|
|
1188
|
-
|
|
1188
|
+
L.duration,
|
|
1189
1189
|
" day",
|
|
1190
|
-
|
|
1190
|
+
L.duration !== 1 ? "s" : ""
|
|
1191
1191
|
]
|
|
1192
1192
|
}
|
|
1193
1193
|
);
|
|
1194
1194
|
case "predecessors": {
|
|
1195
|
-
const D =
|
|
1195
|
+
const D = y.filter((W) => W.target === L.id)[0];
|
|
1196
1196
|
return /* @__PURE__ */ e.jsx(
|
|
1197
1197
|
_r,
|
|
1198
1198
|
{
|
|
1199
|
-
task:
|
|
1199
|
+
task: L,
|
|
1200
1200
|
allTasks: o,
|
|
1201
|
-
links:
|
|
1202
|
-
onAddDependency: (W,
|
|
1201
|
+
links: y,
|
|
1202
|
+
onAddDependency: (W, oe, G, xe) => g?.(W, oe, G, xe),
|
|
1203
1203
|
onRemoveDependency: (W) => c?.(W),
|
|
1204
1204
|
onTaskUpdate: m,
|
|
1205
1205
|
styleConfig: p,
|
|
@@ -1215,7 +1215,7 @@ const nt = (t) => t ? {
|
|
|
1215
1215
|
gap: "4px"
|
|
1216
1216
|
},
|
|
1217
1217
|
children: D ? (() => {
|
|
1218
|
-
const W = o.find((
|
|
1218
|
+
const W = o.find((G) => G.id === D.source), oe = W ? o.indexOf(W) + 1 : 0;
|
|
1219
1219
|
return /* @__PURE__ */ e.jsx(
|
|
1220
1220
|
"span",
|
|
1221
1221
|
{
|
|
@@ -1228,7 +1228,7 @@ const nt = (t) => t ? {
|
|
|
1228
1228
|
borderRadius: "4px",
|
|
1229
1229
|
whiteSpace: "nowrap"
|
|
1230
1230
|
},
|
|
1231
|
-
children: Or(D,
|
|
1231
|
+
children: Or(D, oe)
|
|
1232
1232
|
}
|
|
1233
1233
|
);
|
|
1234
1234
|
})() : /* @__PURE__ */ e.jsx(
|
|
@@ -1252,13 +1252,13 @@ const nt = (t) => t ? {
|
|
|
1252
1252
|
}
|
|
1253
1253
|
case "add":
|
|
1254
1254
|
return /* @__PURE__ */ e.jsx(
|
|
1255
|
-
|
|
1255
|
+
fe,
|
|
1256
1256
|
{
|
|
1257
1257
|
type: "primary",
|
|
1258
1258
|
size: "small",
|
|
1259
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1260
|
-
onClick: (
|
|
1261
|
-
|
|
1259
|
+
icon: /* @__PURE__ */ e.jsx(pe, { icon: Nt, style: { fontSize: 12 } }),
|
|
1260
|
+
onClick: (U) => {
|
|
1261
|
+
U.stopPropagation(), s?.(L.id);
|
|
1262
1262
|
},
|
|
1263
1263
|
title: "Add Subtask",
|
|
1264
1264
|
style: {
|
|
@@ -1279,46 +1279,46 @@ const nt = (t) => t ? {
|
|
|
1279
1279
|
"div",
|
|
1280
1280
|
{
|
|
1281
1281
|
className: "gantt-progress-bar-fill",
|
|
1282
|
-
style: { width: `${
|
|
1282
|
+
style: { width: `${L.progress}%` }
|
|
1283
1283
|
}
|
|
1284
1284
|
) }),
|
|
1285
1285
|
/* @__PURE__ */ e.jsxs("span", { className: "gantt-progress-text", children: [
|
|
1286
|
-
|
|
1286
|
+
L.progress,
|
|
1287
1287
|
"%"
|
|
1288
1288
|
] })
|
|
1289
1289
|
] });
|
|
1290
1290
|
case "index":
|
|
1291
|
-
return /* @__PURE__ */ e.jsx("span", { style: { color: "#8c8c8c" }, children: o.indexOf(
|
|
1291
|
+
return /* @__PURE__ */ e.jsx("span", { style: { color: "#8c8c8c" }, children: o.indexOf(L) + 1 });
|
|
1292
1292
|
default:
|
|
1293
|
-
return
|
|
1293
|
+
return L[Z.name] || "";
|
|
1294
1294
|
}
|
|
1295
1295
|
};
|
|
1296
1296
|
return /* @__PURE__ */ e.jsxs("div", { className: "gantt-grid", ref: w, children: [
|
|
1297
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-grid-header", style: { display: "flex", minWidth: "100%" }, children: a.map((
|
|
1297
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-grid-header", style: { display: "flex", minWidth: "100%" }, children: a.map((L) => /* @__PURE__ */ e.jsx(
|
|
1298
1298
|
"div",
|
|
1299
1299
|
{
|
|
1300
1300
|
className: "gantt-grid-header-cell",
|
|
1301
1301
|
style: {
|
|
1302
|
-
width:
|
|
1303
|
-
minWidth:
|
|
1302
|
+
width: L.width,
|
|
1303
|
+
minWidth: L.width,
|
|
1304
1304
|
/* Ensure column maintains width */
|
|
1305
|
-
justifyContent:
|
|
1305
|
+
justifyContent: L.align === "center" ? "center" : "flex-start"
|
|
1306
1306
|
},
|
|
1307
|
-
children:
|
|
1308
|
-
|
|
1309
|
-
|
|
1307
|
+
children: L.name === "add" ? /* @__PURE__ */ e.jsx("span", { style: { fontSize: 11, color: "#64748b", fontWeight: 600, whiteSpace: "nowrap" }, children: "Add" }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1308
|
+
L.label,
|
|
1309
|
+
L.name === "start" && /* @__PURE__ */ e.jsx(pe, { icon: It, style: { marginLeft: 8, fontSize: 10, color: "#64748b" } })
|
|
1310
1310
|
] })
|
|
1311
1311
|
},
|
|
1312
|
-
|
|
1312
|
+
L.name
|
|
1313
1313
|
)) }),
|
|
1314
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-grid-body", children: t.map((
|
|
1315
|
-
const
|
|
1314
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-grid-body", children: t.map((L) => {
|
|
1315
|
+
const Z = u?.id === L.id, U = u?.descendantIds.includes(L.id);
|
|
1316
1316
|
return /* @__PURE__ */ e.jsxs(
|
|
1317
1317
|
"div",
|
|
1318
1318
|
{
|
|
1319
|
-
className: `gantt-grid-row ${l ===
|
|
1320
|
-
onClick: () => r(
|
|
1321
|
-
onContextMenu: (D) => x?.(D,
|
|
1319
|
+
className: `gantt-grid-row ${l === L.id ? "selected" : ""} ${Z ? "dragging-row" : ""} ${U ? "descendant-dragging-row" : ""} ${S?.taskId === L.id ? `drop-target-${S.position}` : ""}`,
|
|
1320
|
+
onClick: () => r(L.id),
|
|
1321
|
+
onContextMenu: (D) => x?.(D, L.id),
|
|
1322
1322
|
style: {
|
|
1323
1323
|
display: "flex",
|
|
1324
1324
|
minWidth: "100%"
|
|
@@ -1344,22 +1344,22 @@ const nt = (t) => t ? {
|
|
|
1344
1344
|
opacity: 1
|
|
1345
1345
|
/* Ensure column is not transparent */
|
|
1346
1346
|
},
|
|
1347
|
-
children:
|
|
1347
|
+
children: he(L, D)
|
|
1348
1348
|
},
|
|
1349
|
-
`${
|
|
1349
|
+
`${L.id}-${D.name}`
|
|
1350
1350
|
);
|
|
1351
1351
|
}),
|
|
1352
|
-
|
|
1352
|
+
S?.taskId === L.id && /* @__PURE__ */ e.jsx("div", { className: `gantt-drop-indicator ${S.position}` })
|
|
1353
1353
|
]
|
|
1354
1354
|
},
|
|
1355
|
-
|
|
1355
|
+
L.id
|
|
1356
1356
|
);
|
|
1357
1357
|
}) })
|
|
1358
1358
|
] });
|
|
1359
1359
|
}
|
|
1360
1360
|
));
|
|
1361
|
-
|
|
1362
|
-
const
|
|
1361
|
+
Kt.displayName = "Grid";
|
|
1362
|
+
const Ir = ({
|
|
1363
1363
|
task: t,
|
|
1364
1364
|
position: o,
|
|
1365
1365
|
selected: a,
|
|
@@ -1370,12 +1370,12 @@ const Yr = ({
|
|
|
1370
1370
|
dragType: i = null,
|
|
1371
1371
|
readonly: s = !1
|
|
1372
1372
|
}) => {
|
|
1373
|
-
const
|
|
1373
|
+
const g = (p, b) => {
|
|
1374
1374
|
s || (p.preventDefault(), p.stopPropagation(), x(p.clientX, p.clientY, b));
|
|
1375
1375
|
}, c = () => {
|
|
1376
1376
|
const p = ["gantt-task-bar"];
|
|
1377
1377
|
return t.type === "milestone" && p.push("milestone"), t.type === "project" && p.push("project"), a && p.push("selected"), l && p.push("dragging"), t.status && p.push(`status-${t.status}`), p.join(" ");
|
|
1378
|
-
},
|
|
1378
|
+
}, y = () => {
|
|
1379
1379
|
let p = o.left, b = o.width;
|
|
1380
1380
|
return l && i && (i === "move" ? p += m : i === "resize-left" ? (p += m, b -= m) : i === "resize-right" && (b += m)), {
|
|
1381
1381
|
left: `${p}px`,
|
|
@@ -1383,12 +1383,12 @@ const Yr = ({
|
|
|
1383
1383
|
// Color handled by CSS classes (.project, .milestone) or task.color override
|
|
1384
1384
|
backgroundColor: t.color || void 0
|
|
1385
1385
|
};
|
|
1386
|
-
},
|
|
1386
|
+
}, S = (p = !1) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1387
1387
|
!s && !p && /* @__PURE__ */ e.jsx(
|
|
1388
1388
|
"div",
|
|
1389
1389
|
{
|
|
1390
1390
|
className: "gantt-task-resize-handle gantt-task-resize-left",
|
|
1391
|
-
onMouseDown: (b) =>
|
|
1391
|
+
onMouseDown: (b) => g(b, "resize-left")
|
|
1392
1392
|
}
|
|
1393
1393
|
),
|
|
1394
1394
|
!p && t.type !== "milestone" && /* @__PURE__ */ e.jsx(
|
|
@@ -1407,15 +1407,15 @@ const Yr = ({
|
|
|
1407
1407
|
"div",
|
|
1408
1408
|
{
|
|
1409
1409
|
className: "gantt-task-resize-handle gantt-task-resize-right",
|
|
1410
|
-
onMouseDown: (b) =>
|
|
1410
|
+
onMouseDown: (b) => g(b, "resize-right")
|
|
1411
1411
|
}
|
|
1412
1412
|
)
|
|
1413
1413
|
] }), u = /* @__PURE__ */ e.jsxs("div", { className: "gantt-tooltip", children: [
|
|
1414
1414
|
/* @__PURE__ */ e.jsx("div", { className: "gantt-tooltip-title", children: t.text }),
|
|
1415
1415
|
/* @__PURE__ */ e.jsxs("div", { className: "gantt-tooltip-dates", children: [
|
|
1416
|
-
|
|
1416
|
+
be(t.start, "MMM D"),
|
|
1417
1417
|
" - ",
|
|
1418
|
-
|
|
1418
|
+
be(t.end, "MMM D")
|
|
1419
1419
|
] }),
|
|
1420
1420
|
/* @__PURE__ */ e.jsxs("div", { className: "gantt-tooltip-progress", children: [
|
|
1421
1421
|
"Progress: ",
|
|
@@ -1430,7 +1430,7 @@ const Yr = ({
|
|
|
1430
1430
|
if (t.segments && t.segments.length > 0 || t.onHoldPeriods && t.onHoldPeriods.length > 0) {
|
|
1431
1431
|
const p = t.end.getTime() - t.start.getTime(), b = t.segments && t.segments.length > 0 ? t.segments : [{ start: t.start, end: t.end, duration: t.duration || 0 }];
|
|
1432
1432
|
return /* @__PURE__ */ e.jsxs("div", { className: "gantt-task-group", children: [
|
|
1433
|
-
t.onHoldPeriods?.map((w,
|
|
1433
|
+
t.onHoldPeriods?.map((w, j) => /* @__PURE__ */ e.jsx(
|
|
1434
1434
|
"div",
|
|
1435
1435
|
{
|
|
1436
1436
|
className: "gantt-on-hold-period",
|
|
@@ -1439,9 +1439,9 @@ const Yr = ({
|
|
|
1439
1439
|
width: `${(w.end.getTime() - w.start.getTime()) / p * o.width}px`
|
|
1440
1440
|
}
|
|
1441
1441
|
},
|
|
1442
|
-
`hold-${
|
|
1442
|
+
`hold-${j}`
|
|
1443
1443
|
)),
|
|
1444
|
-
b.map((w,
|
|
1444
|
+
b.map((w, j) => /* @__PURE__ */ e.jsx(Ce, { title: u, mouseEnterDelay: 0.5, children: /* @__PURE__ */ e.jsx(
|
|
1445
1445
|
"div",
|
|
1446
1446
|
{
|
|
1447
1447
|
className: c() + " segment",
|
|
@@ -1451,85 +1451,85 @@ const Yr = ({
|
|
|
1451
1451
|
backgroundColor: t.color || void 0
|
|
1452
1452
|
},
|
|
1453
1453
|
onClick: r,
|
|
1454
|
-
onMouseDown: (
|
|
1455
|
-
children: j
|
|
1454
|
+
onMouseDown: (M) => g(M, "move"),
|
|
1455
|
+
children: S(j > 0)
|
|
1456
1456
|
}
|
|
1457
|
-
) }, `seg-${
|
|
1457
|
+
) }, `seg-${j}`))
|
|
1458
1458
|
] });
|
|
1459
1459
|
}
|
|
1460
|
-
return /* @__PURE__ */ e.jsx(
|
|
1460
|
+
return /* @__PURE__ */ e.jsx(Ce, { title: u, mouseEnterDelay: 0.5, children: /* @__PURE__ */ e.jsx(
|
|
1461
1461
|
"div",
|
|
1462
1462
|
{
|
|
1463
1463
|
className: c(),
|
|
1464
|
-
style:
|
|
1464
|
+
style: y(),
|
|
1465
1465
|
onClick: r,
|
|
1466
|
-
onMouseDown: (p) =>
|
|
1467
|
-
children:
|
|
1466
|
+
onMouseDown: (p) => g(p, "move"),
|
|
1467
|
+
children: S()
|
|
1468
1468
|
}
|
|
1469
1469
|
) });
|
|
1470
|
-
},
|
|
1471
|
-
const l = (i) => o.find((s) => s.id === i), r =
|
|
1470
|
+
}, Yr = ({ links: t, tasks: o, getTaskPosition: a }) => {
|
|
1471
|
+
const l = (i) => o.find((s) => s.id === i), r = Q.useMemo(() => {
|
|
1472
1472
|
let i = 0, s = 0;
|
|
1473
|
-
return o.forEach((
|
|
1473
|
+
return o.forEach((g) => {
|
|
1474
1474
|
try {
|
|
1475
|
-
const c = a(
|
|
1475
|
+
const c = a(g);
|
|
1476
1476
|
c && typeof c.left == "number" && typeof c.width == "number" && (i = Math.max(i, c.left + c.width)), c && typeof c.top == "number" && typeof c.height == "number" && (s = Math.max(s, c.top + c.height));
|
|
1477
1477
|
} catch (c) {
|
|
1478
|
-
console.warn("Failed to position task for link rendering:",
|
|
1478
|
+
console.warn("Failed to position task for link rendering:", g.id, c);
|
|
1479
1479
|
}
|
|
1480
1480
|
}), {
|
|
1481
1481
|
width: Math.max(i, 1e3),
|
|
1482
1482
|
height: Math.max(s, 100)
|
|
1483
1483
|
};
|
|
1484
1484
|
}, [o, a]), x = (i) => {
|
|
1485
|
-
const s = l(i.source),
|
|
1486
|
-
if (!s || !
|
|
1487
|
-
const c = a(s),
|
|
1485
|
+
const s = l(i.source), g = l(i.target);
|
|
1486
|
+
if (!s || !g) return "";
|
|
1487
|
+
const c = a(s), y = a(g), S = c.top + c.height / 2, u = y.top + y.height / 2;
|
|
1488
1488
|
let p = 0, b = 0;
|
|
1489
1489
|
switch (i.type) {
|
|
1490
1490
|
case "e2s":
|
|
1491
|
-
p = c.left + c.width, b =
|
|
1491
|
+
p = c.left + c.width, b = y.left;
|
|
1492
1492
|
break;
|
|
1493
1493
|
case "s2s":
|
|
1494
|
-
p = c.left, b =
|
|
1494
|
+
p = c.left, b = y.left;
|
|
1495
1495
|
break;
|
|
1496
1496
|
case "e2e":
|
|
1497
|
-
p = c.left + c.width, b =
|
|
1497
|
+
p = c.left + c.width, b = y.left + y.width;
|
|
1498
1498
|
break;
|
|
1499
1499
|
case "s2e":
|
|
1500
|
-
p = c.left, b =
|
|
1500
|
+
p = c.left, b = y.left + y.width;
|
|
1501
1501
|
break;
|
|
1502
1502
|
}
|
|
1503
|
-
const w = b - p,
|
|
1503
|
+
const w = b - p, j = u - S, M = 20;
|
|
1504
1504
|
if (i.type === "e2s")
|
|
1505
|
-
if (w >=
|
|
1505
|
+
if (w >= M) {
|
|
1506
1506
|
const $ = p + w / 2;
|
|
1507
|
-
return `M ${p},${
|
|
1507
|
+
return `M ${p},${S} L ${$},${S} L ${$},${u} L ${b},${u}`;
|
|
1508
1508
|
} else {
|
|
1509
|
-
const $ =
|
|
1510
|
-
return `M ${p},${
|
|
1509
|
+
const $ = M / 2, B = S + j / 2;
|
|
1510
|
+
return `M ${p},${S} L ${p + $},${S} L ${p + $},${B} L ${b - $},${B} L ${b - $},${u} L ${b},${u}`;
|
|
1511
1511
|
}
|
|
1512
1512
|
else if (i.type === "s2s") {
|
|
1513
|
-
const $ = Math.min(p, b) -
|
|
1514
|
-
return `M ${p},${
|
|
1513
|
+
const $ = Math.min(p, b) - M / 2;
|
|
1514
|
+
return `M ${p},${S} L ${$},${S} L ${$},${u} L ${b},${u}`;
|
|
1515
1515
|
} else if (i.type === "e2e") {
|
|
1516
|
-
const $ = Math.max(p, b) +
|
|
1517
|
-
return `M ${p},${
|
|
1516
|
+
const $ = Math.max(p, b) + M / 2;
|
|
1517
|
+
return `M ${p},${S} L ${$},${S} L ${$},${u} L ${b},${u}`;
|
|
1518
1518
|
} else if (i.type === "s2e")
|
|
1519
|
-
if (w <= -
|
|
1519
|
+
if (w <= -M) {
|
|
1520
1520
|
const $ = p + w / 2;
|
|
1521
|
-
return `M ${p},${
|
|
1521
|
+
return `M ${p},${S} L ${$},${S} L ${$},${u} L ${b},${u}`;
|
|
1522
1522
|
} else {
|
|
1523
|
-
const $ =
|
|
1524
|
-
return `M ${p},${
|
|
1523
|
+
const $ = M / 2, B = S + j / 2;
|
|
1524
|
+
return `M ${p},${S} L ${p - $},${S} L ${p - $},${B} L ${b + $},${B} L ${b + $},${u} L ${b},${u}`;
|
|
1525
1525
|
}
|
|
1526
1526
|
return "";
|
|
1527
1527
|
}, m = (i) => {
|
|
1528
1528
|
const s = l(i.target);
|
|
1529
1529
|
if (!s) return "";
|
|
1530
|
-
const
|
|
1530
|
+
const g = a(s), c = g.top + g.height / 2, y = 8, S = 6;
|
|
1531
1531
|
let u = 0, p = !0;
|
|
1532
|
-
return i.type === "e2s" || i.type === "s2s" ? (u =
|
|
1532
|
+
return i.type === "e2s" || i.type === "s2s" ? (u = g.left, p = !0) : (u = g.left + g.width, p = !1), p ? `M ${u},${c} L ${u - y},${c - S / 2} L ${u - y},${c + S / 2} Z` : `M ${u},${c} L ${u + y},${c - S / 2} L ${u + y},${c + S / 2} Z`;
|
|
1533
1533
|
};
|
|
1534
1534
|
return t.length === 0 ? null : /* @__PURE__ */ e.jsx(
|
|
1535
1535
|
"svg",
|
|
@@ -1545,10 +1545,10 @@ const Yr = ({
|
|
|
1545
1545
|
pointerEvents: "none"
|
|
1546
1546
|
},
|
|
1547
1547
|
children: t.map((i) => {
|
|
1548
|
-
const s = l(i.source),
|
|
1549
|
-
if (!s || !
|
|
1550
|
-
const c = x(i),
|
|
1551
|
-
return !c || !
|
|
1548
|
+
const s = l(i.source), g = l(i.target);
|
|
1549
|
+
if (!s || !g) return null;
|
|
1550
|
+
const c = x(i), y = m(i);
|
|
1551
|
+
return !c || !y ? null : /* @__PURE__ */ e.jsxs("g", { className: "gantt-link", children: [
|
|
1552
1552
|
/* @__PURE__ */ e.jsx(
|
|
1553
1553
|
"path",
|
|
1554
1554
|
{
|
|
@@ -1561,7 +1561,7 @@ const Yr = ({
|
|
|
1561
1561
|
/* @__PURE__ */ e.jsx(
|
|
1562
1562
|
"path",
|
|
1563
1563
|
{
|
|
1564
|
-
d:
|
|
1564
|
+
d: y,
|
|
1565
1565
|
className: "gantt-link-arrow"
|
|
1566
1566
|
}
|
|
1567
1567
|
)
|
|
@@ -1569,7 +1569,7 @@ const Yr = ({
|
|
|
1569
1569
|
})
|
|
1570
1570
|
}
|
|
1571
1571
|
);
|
|
1572
|
-
},
|
|
1572
|
+
}, Ar = (t, o, a = 60, l = "day", r = 1) => {
|
|
1573
1573
|
const [x, m] = z({
|
|
1574
1574
|
taskId: null,
|
|
1575
1575
|
initialX: 0,
|
|
@@ -1579,52 +1579,52 @@ const Yr = ({
|
|
|
1579
1579
|
type: null,
|
|
1580
1580
|
dragDeltaX: 0,
|
|
1581
1581
|
dragDeltaY: 0
|
|
1582
|
-
}), i =
|
|
1582
|
+
}), i = Me((c, y, S, u) => {
|
|
1583
1583
|
const p = t.find((b) => b.id === c);
|
|
1584
1584
|
p && m({
|
|
1585
1585
|
taskId: c,
|
|
1586
|
-
initialX:
|
|
1587
|
-
initialY:
|
|
1586
|
+
initialX: y,
|
|
1587
|
+
initialY: S,
|
|
1588
1588
|
initialStart: new Date(p.start),
|
|
1589
1589
|
initialEnd: new Date(p.end),
|
|
1590
1590
|
type: u,
|
|
1591
1591
|
dragDeltaX: 0,
|
|
1592
1592
|
dragDeltaY: 0
|
|
1593
1593
|
});
|
|
1594
|
-
}, [t]), s =
|
|
1594
|
+
}, [t]), s = Me((c, y) => {
|
|
1595
1595
|
if (!x.taskId || !x.type) return null;
|
|
1596
|
-
const
|
|
1596
|
+
const S = c - x.initialX, u = y - x.initialY;
|
|
1597
1597
|
if (m(($) => ({
|
|
1598
1598
|
...$,
|
|
1599
|
-
dragDeltaX:
|
|
1599
|
+
dragDeltaX: S,
|
|
1600
1600
|
dragDeltaY: u
|
|
1601
1601
|
})), x.type === "reorder") return null;
|
|
1602
1602
|
const p = t.find(($) => $.id === x.taskId);
|
|
1603
1603
|
if (!p) return null;
|
|
1604
|
-
const b = Math.round(
|
|
1605
|
-
let w = new Date(x.initialStart),
|
|
1604
|
+
const b = Math.round(S / a);
|
|
1605
|
+
let w = new Date(x.initialStart), j = new Date(x.initialEnd);
|
|
1606
1606
|
switch (x.type) {
|
|
1607
1607
|
case "move":
|
|
1608
|
-
w =
|
|
1608
|
+
w = me(x.initialStart, b * r, l), j = me(x.initialEnd, b * r, l);
|
|
1609
1609
|
break;
|
|
1610
1610
|
case "resize-left":
|
|
1611
|
-
w =
|
|
1611
|
+
w = me(x.initialStart, b * r, l), w >= j && (w = me(j, -r, l));
|
|
1612
1612
|
break;
|
|
1613
1613
|
case "resize-right":
|
|
1614
|
-
|
|
1614
|
+
j = me(x.initialEnd, b * r, l), j <= w && (j = me(w, r, l));
|
|
1615
1615
|
break;
|
|
1616
1616
|
}
|
|
1617
|
-
const
|
|
1617
|
+
const M = wt(w, j);
|
|
1618
1618
|
return {
|
|
1619
1619
|
...p,
|
|
1620
1620
|
start: w,
|
|
1621
|
-
end:
|
|
1622
|
-
duration:
|
|
1621
|
+
end: j,
|
|
1622
|
+
duration: M
|
|
1623
1623
|
};
|
|
1624
|
-
}, [x, t, a, r, l]),
|
|
1624
|
+
}, [x, t, a, r, l]), g = Me((c) => {
|
|
1625
1625
|
if (c && o) {
|
|
1626
|
-
const { id:
|
|
1627
|
-
o(
|
|
1626
|
+
const { id: y, ...S } = c;
|
|
1627
|
+
o(y, S);
|
|
1628
1628
|
}
|
|
1629
1629
|
m({
|
|
1630
1630
|
taskId: null,
|
|
@@ -1641,9 +1641,9 @@ const Yr = ({
|
|
|
1641
1641
|
dragState: x,
|
|
1642
1642
|
handleDragStart: i,
|
|
1643
1643
|
handleDrag: s,
|
|
1644
|
-
handleDragEnd:
|
|
1644
|
+
handleDragEnd: g
|
|
1645
1645
|
};
|
|
1646
|
-
},
|
|
1646
|
+
}, Qt = Ct(
|
|
1647
1647
|
({
|
|
1648
1648
|
tasks: t,
|
|
1649
1649
|
links: o,
|
|
@@ -1654,34 +1654,34 @@ const Yr = ({
|
|
|
1654
1654
|
onTaskClick: m,
|
|
1655
1655
|
onTaskDragStart: i,
|
|
1656
1656
|
onTaskDragEnd: s,
|
|
1657
|
-
onTaskUpdate:
|
|
1657
|
+
onTaskUpdate: g,
|
|
1658
1658
|
zoomLevel: c,
|
|
1659
|
-
baselines:
|
|
1660
|
-
},
|
|
1661
|
-
const [u, p] = z(t), b = (r.columnWidth || 60) * c, w = r.baselines &&
|
|
1659
|
+
baselines: y
|
|
1660
|
+
}, S) => {
|
|
1661
|
+
const [u, p] = z(t), b = (r.columnWidth || 60) * c, w = r.baselines && y && y.size > 0, { dragState: j, handleDragStart: M, handleDrag: $, handleDragEnd: B } = Ar(
|
|
1662
1662
|
u,
|
|
1663
|
-
|
|
1663
|
+
g,
|
|
1664
1664
|
b,
|
|
1665
1665
|
l[1].unit,
|
|
1666
1666
|
l[1].step
|
|
1667
1667
|
);
|
|
1668
|
-
|
|
1668
|
+
Q.useEffect(() => {
|
|
1669
1669
|
(t.length !== u.length || t.some((k, F) => {
|
|
1670
1670
|
const P = u[F];
|
|
1671
1671
|
return !P || k.id !== P.id || k.start.getTime() !== P.start.getTime() || k.end.getTime() !== P.end.getTime();
|
|
1672
1672
|
})) && p(t);
|
|
1673
1673
|
}, [t]);
|
|
1674
|
-
const
|
|
1674
|
+
const ae = Q.useCallback((f) => {
|
|
1675
1675
|
const k = [];
|
|
1676
1676
|
let F = new Date(a.start);
|
|
1677
1677
|
for (; F <= a.end; )
|
|
1678
1678
|
k.push({
|
|
1679
1679
|
date: new Date(F),
|
|
1680
|
-
label:
|
|
1681
|
-
}), F =
|
|
1680
|
+
label: be(F, f.format || "D")
|
|
1681
|
+
}), F = me(F, f.step, f.unit);
|
|
1682
1682
|
return k;
|
|
1683
|
-
}, [a.start, a.end]), X =
|
|
1684
|
-
const k = l[1], F = a.start.getTime(),
|
|
1683
|
+
}, [a.start, a.end]), X = Q.useCallback((f) => {
|
|
1684
|
+
const k = l[1], F = a.start.getTime(), N = f.getTime() - F, re = {
|
|
1685
1685
|
hour: 36e5,
|
|
1686
1686
|
day: 864e5,
|
|
1687
1687
|
week: 6048e5,
|
|
@@ -1689,84 +1689,84 @@ const Yr = ({
|
|
|
1689
1689
|
quarter: 7776e6,
|
|
1690
1690
|
year: 31536e6
|
|
1691
1691
|
}[k.unit] || 864e5;
|
|
1692
|
-
return
|
|
1693
|
-
}, [l, a.start, b]),
|
|
1694
|
-
const k = X(
|
|
1692
|
+
return N / (re * k.step) * b;
|
|
1693
|
+
}, [l, a.start, b]), he = (f) => {
|
|
1694
|
+
const k = X(f.start), F = X(f.end);
|
|
1695
1695
|
return {
|
|
1696
1696
|
left: k,
|
|
1697
1697
|
width: Math.max(F - k, 0)
|
|
1698
1698
|
};
|
|
1699
|
-
},
|
|
1700
|
-
const k = X(
|
|
1699
|
+
}, L = (f) => {
|
|
1700
|
+
const k = X(f.start), F = X(f.end);
|
|
1701
1701
|
return {
|
|
1702
1702
|
left: k,
|
|
1703
1703
|
width: Math.max(F - k, 0)
|
|
1704
1704
|
};
|
|
1705
|
-
},
|
|
1706
|
-
const k =
|
|
1705
|
+
}, Z = (f) => {
|
|
1706
|
+
const k = he(f), F = u.findIndex((re) => re.id === f.id), P = r.rowHeight || 48, N = 32, se = (P - N) / 2;
|
|
1707
1707
|
return {
|
|
1708
1708
|
left: k.left,
|
|
1709
1709
|
width: k.width,
|
|
1710
|
-
top: F * P +
|
|
1711
|
-
height:
|
|
1710
|
+
top: F * P + se,
|
|
1711
|
+
height: N
|
|
1712
1712
|
};
|
|
1713
|
-
},
|
|
1714
|
-
|
|
1715
|
-
const k = $(
|
|
1713
|
+
}, U = Q.useRef(null), D = Me((f) => {
|
|
1714
|
+
j.taskId && j.type && (U.current && cancelAnimationFrame(U.current), U.current = requestAnimationFrame(() => {
|
|
1715
|
+
const k = $(f.clientX, f.clientY);
|
|
1716
1716
|
k && p(
|
|
1717
1717
|
(F) => F.map((P) => P.id === k.id ? k : P)
|
|
1718
1718
|
);
|
|
1719
1719
|
}));
|
|
1720
|
-
}, [
|
|
1721
|
-
if (
|
|
1722
|
-
const
|
|
1723
|
-
B(
|
|
1720
|
+
}, [j, $]), W = Me(() => {
|
|
1721
|
+
if (j.taskId) {
|
|
1722
|
+
const f = u.find((k) => k.id === j.taskId);
|
|
1723
|
+
B(f || null), s();
|
|
1724
1724
|
}
|
|
1725
|
-
}, [
|
|
1726
|
-
const
|
|
1727
|
-
let k = -1, F = -1, P = 0,
|
|
1728
|
-
return
|
|
1729
|
-
const
|
|
1730
|
-
|
|
1731
|
-
}), k !== -1 &&
|
|
1732
|
-
}, [
|
|
1733
|
-
const
|
|
1734
|
-
let k = -1, F = 0, P = -1,
|
|
1735
|
-
return
|
|
1736
|
-
const
|
|
1737
|
-
|
|
1738
|
-
}), k !== -1 &&
|
|
1739
|
-
}, [
|
|
1740
|
-
const
|
|
1741
|
-
return
|
|
1742
|
-
}, []),
|
|
1725
|
+
}, [j, u, B, s]), oe = l[1], G = Q.useMemo(() => ae(oe), [ae, oe]), xe = Q.useCallback(() => {
|
|
1726
|
+
const f = [];
|
|
1727
|
+
let k = -1, F = -1, P = 0, N = "";
|
|
1728
|
+
return G.forEach((se) => {
|
|
1729
|
+
const re = se.date.getMonth(), Ee = se.date.getFullYear(), ie = be(se.date, "MMM YYYY");
|
|
1730
|
+
re !== k || Ee !== F ? (k !== -1 && f.push({ label: N, width: P }), k = re, F = Ee, P = b, N = ie) : P += b;
|
|
1731
|
+
}), k !== -1 && f.push({ label: N, width: P }), f;
|
|
1732
|
+
}, [G, b]), $e = Q.useCallback(() => {
|
|
1733
|
+
const f = [];
|
|
1734
|
+
let k = -1, F = 0, P = -1, N = -1, se = "";
|
|
1735
|
+
return G.forEach((re) => {
|
|
1736
|
+
const ie = re.date.getDate() <= 15 ? 0 : 1, ke = re.date.getMonth(), _e = re.date.getFullYear(), Fe = be(re.date, "MMM"), Se = new Date(_e, ke + 1, 0).getDate(), Re = ie === 0 ? `${Fe} 1 - 15` : `${Fe} 16 - ${Se}`;
|
|
1737
|
+
ie !== k || ke !== P || _e !== N ? (k !== -1 && f.push({ label: se, width: F }), k = ie, P = ke, N = _e, F = b, se = Re) : F += b;
|
|
1738
|
+
}), k !== -1 && f.push({ label: se, width: F }), f;
|
|
1739
|
+
}, [G, b]), De = Q.useMemo(() => xe(), [xe]), I = Q.useMemo(() => $e(), [$e]), Y = Q.useMemo(() => G.length * b, [G.length, b]), ue = Q.useMemo(() => {
|
|
1740
|
+
const f = /* @__PURE__ */ new Date();
|
|
1741
|
+
return f.setHours(0, 0, 0, 0), f;
|
|
1742
|
+
}, []), ee = Q.useMemo(() => {
|
|
1743
1743
|
if (!r.showTodayLine) return null;
|
|
1744
|
-
const
|
|
1745
|
-
return
|
|
1746
|
-
}, [r.showTodayLine,
|
|
1744
|
+
const f = X(ue);
|
|
1745
|
+
return f >= -b && f <= Y + b ? Math.max(0, Math.min(f, Y)) : null;
|
|
1746
|
+
}, [r.showTodayLine, ue, Y, b, X]), te = Q.useMemo(() => {
|
|
1747
1747
|
if (r.projectStartDate)
|
|
1748
|
-
return
|
|
1748
|
+
return tt(r.projectStartDate);
|
|
1749
1749
|
if (t.length > 0) {
|
|
1750
|
-
const
|
|
1751
|
-
return
|
|
1750
|
+
const f = t.map((k) => k.start.getTime());
|
|
1751
|
+
return tt(new Date(Math.min(...f)));
|
|
1752
1752
|
}
|
|
1753
1753
|
return null;
|
|
1754
|
-
}, [r.projectStartDate, t]),
|
|
1755
|
-
if (!r.showProjectStartLine || !
|
|
1756
|
-
const
|
|
1757
|
-
return
|
|
1758
|
-
}, [r.showProjectStartLine,
|
|
1754
|
+
}, [r.projectStartDate, t]), K = Q.useMemo(() => {
|
|
1755
|
+
if (!r.showProjectStartLine || !te) return null;
|
|
1756
|
+
const f = X(te);
|
|
1757
|
+
return f >= -b && f <= Y + b ? Math.max(0, Math.min(f, Y)) : null;
|
|
1758
|
+
}, [r.showProjectStartLine, te, Y, b, X]);
|
|
1759
1759
|
return /* @__PURE__ */ e.jsxs(
|
|
1760
1760
|
"div",
|
|
1761
1761
|
{
|
|
1762
1762
|
className: "gantt-timeline-container",
|
|
1763
|
-
ref:
|
|
1763
|
+
ref: S,
|
|
1764
1764
|
onMouseMove: D,
|
|
1765
1765
|
onMouseUp: W,
|
|
1766
1766
|
style: { width: Y, position: "relative" },
|
|
1767
1767
|
children: [
|
|
1768
1768
|
/* @__PURE__ */ e.jsxs("div", { className: "gantt-timeline-header", style: { width: Y, minWidth: Y, position: "relative" }, children: [
|
|
1769
|
-
|
|
1769
|
+
ee !== null && r.showTodayLine && r.todayLineLabel && r.todayLineLabel !== "" && /* @__PURE__ */ e.jsx(
|
|
1770
1770
|
"div",
|
|
1771
1771
|
{
|
|
1772
1772
|
className: "gantt-today-line-label",
|
|
@@ -1774,7 +1774,7 @@ const Yr = ({
|
|
|
1774
1774
|
position: "absolute",
|
|
1775
1775
|
top: "calc(var(--gantt-scale-height, 24px) * 2)",
|
|
1776
1776
|
// Position at the start of the day row (after month and range rows)
|
|
1777
|
-
left: `${
|
|
1777
|
+
left: `${ee}px`,
|
|
1778
1778
|
transform: "translateX(-50%)",
|
|
1779
1779
|
backgroundColor: r.todayLineColor || "#ff4d4f",
|
|
1780
1780
|
color: "#ffffff",
|
|
@@ -1793,7 +1793,7 @@ const Yr = ({
|
|
|
1793
1793
|
children: r.todayLineLabel
|
|
1794
1794
|
}
|
|
1795
1795
|
),
|
|
1796
|
-
|
|
1796
|
+
K !== null && r.showProjectStartLine && r.projectStartLineLabel && r.projectStartLineLabel !== "" && /* @__PURE__ */ e.jsx(
|
|
1797
1797
|
"div",
|
|
1798
1798
|
{
|
|
1799
1799
|
className: "gantt-project-start-line-label",
|
|
@@ -1801,7 +1801,7 @@ const Yr = ({
|
|
|
1801
1801
|
position: "absolute",
|
|
1802
1802
|
top: "calc(var(--gantt-scale-height, 24px) * 2)",
|
|
1803
1803
|
// Position at the start of the day row (after month and range rows)
|
|
1804
|
-
left: `${
|
|
1804
|
+
left: `${K}px`,
|
|
1805
1805
|
transform: "translateX(-50%)",
|
|
1806
1806
|
backgroundColor: r.projectStartLineColor || "#40a9ff",
|
|
1807
1807
|
color: "#ffffff",
|
|
@@ -1820,36 +1820,36 @@ const Yr = ({
|
|
|
1820
1820
|
children: r.projectStartLineLabel
|
|
1821
1821
|
}
|
|
1822
1822
|
),
|
|
1823
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-month", style: { width: Y }, children:
|
|
1823
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-month", style: { width: Y }, children: De.map((f, k) => /* @__PURE__ */ e.jsx(
|
|
1824
1824
|
"div",
|
|
1825
1825
|
{
|
|
1826
1826
|
className: "gantt-timeline-cell",
|
|
1827
1827
|
style: {
|
|
1828
|
-
width:
|
|
1829
|
-
minWidth:
|
|
1830
|
-
maxWidth:
|
|
1831
|
-
borderRight: k ===
|
|
1828
|
+
width: f.width,
|
|
1829
|
+
minWidth: f.width,
|
|
1830
|
+
maxWidth: f.width,
|
|
1831
|
+
borderRight: k === De.length - 1 ? "none" : "var(--wx-gantt-border)"
|
|
1832
1832
|
},
|
|
1833
|
-
children:
|
|
1833
|
+
children: f.label
|
|
1834
1834
|
},
|
|
1835
1835
|
`top-${k}`
|
|
1836
1836
|
)) }),
|
|
1837
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-range", style: { width: Y }, children:
|
|
1837
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-range", style: { width: Y }, children: I.map((f, k) => /* @__PURE__ */ e.jsx(
|
|
1838
1838
|
"div",
|
|
1839
1839
|
{
|
|
1840
1840
|
className: "gantt-timeline-cell",
|
|
1841
1841
|
style: {
|
|
1842
|
-
width:
|
|
1843
|
-
minWidth:
|
|
1844
|
-
maxWidth:
|
|
1845
|
-
borderRight: k ===
|
|
1842
|
+
width: f.width,
|
|
1843
|
+
minWidth: f.width,
|
|
1844
|
+
maxWidth: f.width,
|
|
1845
|
+
borderRight: k === I.length - 1 ? "none" : "var(--wx-gantt-border)"
|
|
1846
1846
|
},
|
|
1847
|
-
children:
|
|
1847
|
+
children: f.label
|
|
1848
1848
|
},
|
|
1849
1849
|
`mid-${k}`
|
|
1850
1850
|
)) }),
|
|
1851
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-day", style: { width: Y }, children:
|
|
1852
|
-
const F = r.weekends && Bt(
|
|
1851
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-day", style: { width: Y }, children: G.map((f, k) => {
|
|
1852
|
+
const F = r.weekends && Bt(f.date), P = r.holidays && Wt(f.date, r.holidays);
|
|
1853
1853
|
return /* @__PURE__ */ e.jsx(
|
|
1854
1854
|
"div",
|
|
1855
1855
|
{
|
|
@@ -1858,32 +1858,32 @@ const Yr = ({
|
|
|
1858
1858
|
width: b,
|
|
1859
1859
|
minWidth: b,
|
|
1860
1860
|
maxWidth: b,
|
|
1861
|
-
borderRight: k ===
|
|
1861
|
+
borderRight: k === G.length - 1 ? "none" : "var(--wx-gantt-border)"
|
|
1862
1862
|
},
|
|
1863
|
-
children:
|
|
1863
|
+
children: f.label
|
|
1864
1864
|
},
|
|
1865
1865
|
`day-${k}`
|
|
1866
1866
|
);
|
|
1867
1867
|
}) })
|
|
1868
1868
|
] }),
|
|
1869
1869
|
/* @__PURE__ */ e.jsxs("div", { className: "gantt-timeline-body", style: { width: Y, position: "relative" }, children: [
|
|
1870
|
-
|
|
1870
|
+
ee !== null && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1871
1871
|
r.showTodayLineMarker !== !1 && (() => {
|
|
1872
|
-
const
|
|
1872
|
+
const f = r.todayLineMarkerSize || 8, k = r.todayLineColor || "#ff4d4f", F = r.todayLineMarkerStyle || "triangle", P = r.todayLineOpacity !== void 0 ? r.todayLineOpacity : 1;
|
|
1873
1873
|
return F === "triangle" ? /* @__PURE__ */ e.jsx(
|
|
1874
1874
|
"div",
|
|
1875
1875
|
{
|
|
1876
1876
|
className: "gantt-today-line-marker",
|
|
1877
1877
|
style: {
|
|
1878
1878
|
position: "absolute",
|
|
1879
|
-
left: `${
|
|
1879
|
+
left: `${ee}px`,
|
|
1880
1880
|
top: "-4px",
|
|
1881
1881
|
transform: "translateX(-50%)",
|
|
1882
1882
|
width: 0,
|
|
1883
1883
|
height: 0,
|
|
1884
|
-
borderLeft: `${
|
|
1885
|
-
borderRight: `${
|
|
1886
|
-
borderBottom: `${
|
|
1884
|
+
borderLeft: `${f}px solid transparent`,
|
|
1885
|
+
borderRight: `${f}px solid transparent`,
|
|
1886
|
+
borderBottom: `${f}px solid ${k}`,
|
|
1887
1887
|
zIndex: 7,
|
|
1888
1888
|
pointerEvents: "none",
|
|
1889
1889
|
opacity: P
|
|
@@ -1895,14 +1895,14 @@ const Yr = ({
|
|
|
1895
1895
|
className: "gantt-today-line-marker",
|
|
1896
1896
|
style: {
|
|
1897
1897
|
position: "absolute",
|
|
1898
|
-
left: `${
|
|
1898
|
+
left: `${ee}px`,
|
|
1899
1899
|
top: "-6px",
|
|
1900
1900
|
transform: "translateX(-50%)",
|
|
1901
1901
|
width: 0,
|
|
1902
1902
|
height: 0,
|
|
1903
|
-
borderLeft: `${
|
|
1904
|
-
borderRight: `${
|
|
1905
|
-
borderBottom: `${
|
|
1903
|
+
borderLeft: `${f}px solid transparent`,
|
|
1904
|
+
borderRight: `${f}px solid transparent`,
|
|
1905
|
+
borderBottom: `${f * 0.7}px solid ${k}`,
|
|
1906
1906
|
zIndex: 7,
|
|
1907
1907
|
pointerEvents: "none",
|
|
1908
1908
|
opacity: P
|
|
@@ -1914,11 +1914,11 @@ const Yr = ({
|
|
|
1914
1914
|
className: "gantt-today-line-marker",
|
|
1915
1915
|
style: {
|
|
1916
1916
|
position: "absolute",
|
|
1917
|
-
left: `${
|
|
1918
|
-
top: `-${
|
|
1917
|
+
left: `${ee}px`,
|
|
1918
|
+
top: `-${f / 2}px`,
|
|
1919
1919
|
transform: "translateX(-50%)",
|
|
1920
|
-
width: `${
|
|
1921
|
-
height: `${
|
|
1920
|
+
width: `${f}px`,
|
|
1921
|
+
height: `${f}px`,
|
|
1922
1922
|
borderRadius: "50%",
|
|
1923
1923
|
backgroundColor: k,
|
|
1924
1924
|
zIndex: 7,
|
|
@@ -1934,7 +1934,7 @@ const Yr = ({
|
|
|
1934
1934
|
className: "gantt-today-line",
|
|
1935
1935
|
style: {
|
|
1936
1936
|
position: "absolute",
|
|
1937
|
-
left: `${
|
|
1937
|
+
left: `${ee}px`,
|
|
1938
1938
|
top: 0,
|
|
1939
1939
|
bottom: 0,
|
|
1940
1940
|
width: `${r.todayLineWidth || 1}px`,
|
|
@@ -1949,23 +1949,23 @@ const Yr = ({
|
|
|
1949
1949
|
}
|
|
1950
1950
|
)
|
|
1951
1951
|
] }),
|
|
1952
|
-
|
|
1952
|
+
K !== null && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1953
1953
|
r.showProjectStartLineMarker !== !1 && (() => {
|
|
1954
|
-
const
|
|
1954
|
+
const f = r.projectStartLineMarkerSize || 8, k = r.projectStartLineColor || "#40a9ff", F = r.projectStartLineMarkerStyle || "triangle", P = r.projectStartLineOpacity !== void 0 ? r.projectStartLineOpacity : 1;
|
|
1955
1955
|
return F === "triangle" ? /* @__PURE__ */ e.jsx(
|
|
1956
1956
|
"div",
|
|
1957
1957
|
{
|
|
1958
1958
|
className: "gantt-project-start-line-marker",
|
|
1959
1959
|
style: {
|
|
1960
1960
|
position: "absolute",
|
|
1961
|
-
left: `${
|
|
1961
|
+
left: `${K}px`,
|
|
1962
1962
|
top: "-4px",
|
|
1963
1963
|
transform: "translateX(-50%)",
|
|
1964
1964
|
width: 0,
|
|
1965
1965
|
height: 0,
|
|
1966
|
-
borderLeft: `${
|
|
1967
|
-
borderRight: `${
|
|
1968
|
-
borderBottom: `${
|
|
1966
|
+
borderLeft: `${f}px solid transparent`,
|
|
1967
|
+
borderRight: `${f}px solid transparent`,
|
|
1968
|
+
borderBottom: `${f}px solid ${k}`,
|
|
1969
1969
|
zIndex: 7,
|
|
1970
1970
|
pointerEvents: "none",
|
|
1971
1971
|
opacity: P
|
|
@@ -1977,14 +1977,14 @@ const Yr = ({
|
|
|
1977
1977
|
className: "gantt-project-start-line-marker",
|
|
1978
1978
|
style: {
|
|
1979
1979
|
position: "absolute",
|
|
1980
|
-
left: `${
|
|
1980
|
+
left: `${K}px`,
|
|
1981
1981
|
top: "-6px",
|
|
1982
1982
|
transform: "translateX(-50%)",
|
|
1983
1983
|
width: 0,
|
|
1984
1984
|
height: 0,
|
|
1985
|
-
borderLeft: `${
|
|
1986
|
-
borderRight: `${
|
|
1987
|
-
borderBottom: `${
|
|
1985
|
+
borderLeft: `${f}px solid transparent`,
|
|
1986
|
+
borderRight: `${f}px solid transparent`,
|
|
1987
|
+
borderBottom: `${f * 0.7}px solid ${k}`,
|
|
1988
1988
|
zIndex: 7,
|
|
1989
1989
|
pointerEvents: "none",
|
|
1990
1990
|
opacity: P
|
|
@@ -1996,11 +1996,11 @@ const Yr = ({
|
|
|
1996
1996
|
className: "gantt-project-start-line-marker",
|
|
1997
1997
|
style: {
|
|
1998
1998
|
position: "absolute",
|
|
1999
|
-
left: `${
|
|
2000
|
-
top: `-${
|
|
1999
|
+
left: `${K}px`,
|
|
2000
|
+
top: `-${f / 2}px`,
|
|
2001
2001
|
transform: "translateX(-50%)",
|
|
2002
|
-
width: `${
|
|
2003
|
-
height: `${
|
|
2002
|
+
width: `${f}px`,
|
|
2003
|
+
height: `${f}px`,
|
|
2004
2004
|
borderRadius: "50%",
|
|
2005
2005
|
backgroundColor: k,
|
|
2006
2006
|
zIndex: 7,
|
|
@@ -2016,7 +2016,7 @@ const Yr = ({
|
|
|
2016
2016
|
className: "gantt-project-start-line",
|
|
2017
2017
|
style: {
|
|
2018
2018
|
position: "absolute",
|
|
2019
|
-
left: `${
|
|
2019
|
+
left: `${K}px`,
|
|
2020
2020
|
top: 0,
|
|
2021
2021
|
bottom: 0,
|
|
2022
2022
|
width: `${r.projectStartLineWidth || 1}px`,
|
|
@@ -2031,8 +2031,8 @@ const Yr = ({
|
|
|
2031
2031
|
}
|
|
2032
2032
|
)
|
|
2033
2033
|
] }),
|
|
2034
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-grid", children:
|
|
2035
|
-
const F = r.weekends && Bt(
|
|
2034
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-grid", children: G.map((f, k) => {
|
|
2035
|
+
const F = r.weekends && Bt(f.date), P = r.holidays && Wt(f.date, r.holidays);
|
|
2036
2036
|
return /* @__PURE__ */ e.jsx(
|
|
2037
2037
|
"div",
|
|
2038
2038
|
{
|
|
@@ -2043,15 +2043,15 @@ const Yr = ({
|
|
|
2043
2043
|
);
|
|
2044
2044
|
}) }),
|
|
2045
2045
|
o.length > 0 && /* @__PURE__ */ e.jsx(
|
|
2046
|
-
|
|
2046
|
+
Yr,
|
|
2047
2047
|
{
|
|
2048
2048
|
links: o,
|
|
2049
2049
|
tasks: u,
|
|
2050
|
-
getTaskPosition:
|
|
2050
|
+
getTaskPosition: Z
|
|
2051
2051
|
}
|
|
2052
2052
|
),
|
|
2053
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-tasks", style: { width: Y }, children: u.map((
|
|
2054
|
-
const k =
|
|
2053
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-tasks", style: { width: Y }, children: u.map((f) => {
|
|
2054
|
+
const k = he(f), F = w ? y?.get(f.id) : void 0, P = F ? L(F) : void 0;
|
|
2055
2055
|
return /* @__PURE__ */ e.jsxs(
|
|
2056
2056
|
"div",
|
|
2057
2057
|
{
|
|
@@ -2060,7 +2060,7 @@ const Yr = ({
|
|
|
2060
2060
|
F && P && /* @__PURE__ */ e.jsx(
|
|
2061
2061
|
"div",
|
|
2062
2062
|
{
|
|
2063
|
-
className: `gantt-baseline-bar ${
|
|
2063
|
+
className: `gantt-baseline-bar ${f.type === "milestone" ? "milestone" : ""}`,
|
|
2064
2064
|
style: {
|
|
2065
2065
|
left: `${P.left}px`,
|
|
2066
2066
|
width: `${P.width}px`
|
|
@@ -2069,24 +2069,24 @@ const Yr = ({
|
|
|
2069
2069
|
}
|
|
2070
2070
|
),
|
|
2071
2071
|
/* @__PURE__ */ e.jsx(
|
|
2072
|
-
|
|
2072
|
+
Ir,
|
|
2073
2073
|
{
|
|
2074
|
-
task:
|
|
2074
|
+
task: f,
|
|
2075
2075
|
position: k,
|
|
2076
|
-
selected: x ===
|
|
2077
|
-
dragging:
|
|
2078
|
-
dragDeltaX:
|
|
2079
|
-
dragType:
|
|
2080
|
-
onClick: () => m(
|
|
2081
|
-
onDragStart: (
|
|
2082
|
-
|
|
2076
|
+
selected: x === f.id,
|
|
2077
|
+
dragging: j.taskId === f.id,
|
|
2078
|
+
dragDeltaX: j.dragDeltaX,
|
|
2079
|
+
dragType: j.type,
|
|
2080
|
+
onClick: () => m(f.id),
|
|
2081
|
+
onDragStart: (N, se, re) => {
|
|
2082
|
+
M(f.id, N, se, re), i(f.id, N, se);
|
|
2083
2083
|
},
|
|
2084
2084
|
readonly: r.readonly
|
|
2085
2085
|
}
|
|
2086
2086
|
)
|
|
2087
2087
|
]
|
|
2088
2088
|
},
|
|
2089
|
-
|
|
2089
|
+
f.id
|
|
2090
2090
|
);
|
|
2091
2091
|
}) })
|
|
2092
2092
|
] })
|
|
@@ -2095,18 +2095,18 @@ const Yr = ({
|
|
|
2095
2095
|
);
|
|
2096
2096
|
}
|
|
2097
2097
|
);
|
|
2098
|
-
|
|
2099
|
-
const
|
|
2100
|
-
|
|
2101
|
-
const { Search: zr } =
|
|
2098
|
+
Qt.displayName = "Timeline";
|
|
2099
|
+
const er = Ct((t, o) => /* @__PURE__ */ e.jsx("div", { className: "gantt-chart-wrapper", style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ e.jsx(Qt, { ...t, ref: o }) }));
|
|
2100
|
+
er.displayName = "Chart";
|
|
2101
|
+
const { Search: zr } = ze, Br = ({ onFilterChange: t, owners: o = [], uiConfig: a = {} }) => {
|
|
2102
2102
|
const [l, r] = z({
|
|
2103
2103
|
searchText: "",
|
|
2104
2104
|
status: "all",
|
|
2105
2105
|
priority: "all",
|
|
2106
2106
|
owner: ""
|
|
2107
2107
|
}), x = (s) => {
|
|
2108
|
-
const
|
|
2109
|
-
r(
|
|
2108
|
+
const g = { ...l, ...s };
|
|
2109
|
+
r(g), t(g);
|
|
2110
2110
|
}, m = () => {
|
|
2111
2111
|
const s = {
|
|
2112
2112
|
searchText: "",
|
|
@@ -2130,7 +2130,7 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2130
2130
|
) }),
|
|
2131
2131
|
/* @__PURE__ */ e.jsxs("div", { className: "gantt-filter-right", children: [
|
|
2132
2132
|
/* @__PURE__ */ e.jsx(
|
|
2133
|
-
|
|
2133
|
+
ge,
|
|
2134
2134
|
{
|
|
2135
2135
|
value: l.status,
|
|
2136
2136
|
onChange: (s) => x({ status: s }),
|
|
@@ -2145,7 +2145,7 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2145
2145
|
}
|
|
2146
2146
|
),
|
|
2147
2147
|
/* @__PURE__ */ e.jsx(
|
|
2148
|
-
|
|
2148
|
+
ge,
|
|
2149
2149
|
{
|
|
2150
2150
|
value: l.priority,
|
|
2151
2151
|
onChange: (s) => x({ priority: s }),
|
|
@@ -2160,7 +2160,7 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2160
2160
|
}
|
|
2161
2161
|
),
|
|
2162
2162
|
/* @__PURE__ */ e.jsx(
|
|
2163
|
-
|
|
2163
|
+
ge,
|
|
2164
2164
|
{
|
|
2165
2165
|
value: l.owner || void 0,
|
|
2166
2166
|
onChange: (s) => x({ owner: s || "" }),
|
|
@@ -2175,11 +2175,11 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2175
2175
|
}
|
|
2176
2176
|
),
|
|
2177
2177
|
i && /* @__PURE__ */ e.jsx(
|
|
2178
|
-
|
|
2178
|
+
fe,
|
|
2179
2179
|
{
|
|
2180
2180
|
type: "default",
|
|
2181
2181
|
danger: !0,
|
|
2182
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2182
|
+
icon: /* @__PURE__ */ e.jsx(pe, { icon: mr }),
|
|
2183
2183
|
onClick: m,
|
|
2184
2184
|
className: "gantt-filter-clear-antd",
|
|
2185
2185
|
children: a.clearFiltersText || "Clear"
|
|
@@ -2187,7 +2187,7 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2187
2187
|
)
|
|
2188
2188
|
] })
|
|
2189
2189
|
] }) });
|
|
2190
|
-
},
|
|
2190
|
+
}, Ae = (t, o) => t ? typeof t == "string" ? /* @__PURE__ */ e.jsx(pe, { icon: o }) : t : /* @__PURE__ */ e.jsx(pe, { icon: o }), Wr = ({
|
|
2191
2191
|
zoomLevel: t,
|
|
2192
2192
|
setZoomLevel: o,
|
|
2193
2193
|
onExport: a,
|
|
@@ -2198,78 +2198,78 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2198
2198
|
iconConfig: i = {},
|
|
2199
2199
|
styleConfig: s
|
|
2200
2200
|
}) => {
|
|
2201
|
-
const
|
|
2201
|
+
const g = rt(s), c = m.showZoomButtons !== !1, y = m.showExportButtons !== !1, S = c && y;
|
|
2202
2202
|
return /* @__PURE__ */ e.jsxs("div", { className: "gantt-toolbar-wrapper", children: [
|
|
2203
2203
|
/* @__PURE__ */ e.jsxs("div", { className: "gantt-toolbar", children: [
|
|
2204
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-toolbar-left", children: /* @__PURE__ */ e.jsx(
|
|
2205
|
-
|
|
2204
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-toolbar-left", children: /* @__PURE__ */ e.jsx(Pt, { size: 8, children: m.showAddTaskButton !== !1 && /* @__PURE__ */ e.jsx(
|
|
2205
|
+
fe,
|
|
2206
2206
|
{
|
|
2207
2207
|
type: "primary",
|
|
2208
|
-
icon:
|
|
2208
|
+
icon: Ae(i.addTask, Nt),
|
|
2209
2209
|
onClick: () => x?.(),
|
|
2210
|
-
style:
|
|
2210
|
+
style: g.buttonPrimary,
|
|
2211
2211
|
children: m.addTaskButtonText || "New Stage"
|
|
2212
2212
|
}
|
|
2213
2213
|
) }) }),
|
|
2214
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-toolbar-right", children: /* @__PURE__ */ e.jsxs(
|
|
2214
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-toolbar-right", children: /* @__PURE__ */ e.jsxs(Pt, { size: 4, children: [
|
|
2215
2215
|
c && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2216
|
-
/* @__PURE__ */ e.jsx(
|
|
2217
|
-
|
|
2216
|
+
/* @__PURE__ */ e.jsx(Ce, { title: m.zoomOutTooltip || "Zoom Out", children: /* @__PURE__ */ e.jsx(
|
|
2217
|
+
fe,
|
|
2218
2218
|
{
|
|
2219
|
-
icon:
|
|
2219
|
+
icon: Ae(i.zoomOut, xr),
|
|
2220
2220
|
onClick: () => o(Math.max(0.5, t - 0.25)),
|
|
2221
|
-
style:
|
|
2221
|
+
style: g.buttonSecondary
|
|
2222
2222
|
}
|
|
2223
2223
|
) }),
|
|
2224
|
-
/* @__PURE__ */ e.jsx(
|
|
2225
|
-
|
|
2224
|
+
/* @__PURE__ */ e.jsx(Ce, { title: m.zoomInTooltip || "Zoom In", children: /* @__PURE__ */ e.jsx(
|
|
2225
|
+
fe,
|
|
2226
2226
|
{
|
|
2227
|
-
icon:
|
|
2227
|
+
icon: Ae(i.zoomIn, gr),
|
|
2228
2228
|
onClick: () => o(Math.min(2, t + 0.25)),
|
|
2229
|
-
style:
|
|
2229
|
+
style: g.buttonSecondary
|
|
2230
2230
|
}
|
|
2231
2231
|
) }),
|
|
2232
|
-
/* @__PURE__ */ e.jsx(
|
|
2233
|
-
|
|
2232
|
+
/* @__PURE__ */ e.jsx(Ce, { title: m.resetZoomTooltip || "Reset Zoom", children: /* @__PURE__ */ e.jsx(
|
|
2233
|
+
fe,
|
|
2234
2234
|
{
|
|
2235
|
-
icon:
|
|
2235
|
+
icon: Ae(i.resetZoom, Jt),
|
|
2236
2236
|
onClick: () => o(1),
|
|
2237
|
-
style:
|
|
2237
|
+
style: g.buttonSecondary
|
|
2238
2238
|
}
|
|
2239
2239
|
) })
|
|
2240
2240
|
] }),
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
/* @__PURE__ */ e.jsx(
|
|
2244
|
-
|
|
2241
|
+
S && /* @__PURE__ */ e.jsx(Ut, { type: "vertical", style: { height: 24, margin: "0 4px" } }),
|
|
2242
|
+
y && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2243
|
+
/* @__PURE__ */ e.jsx(Ce, { title: m.exportCSVTooltip || "Export to CSV", children: /* @__PURE__ */ e.jsx(
|
|
2244
|
+
fe,
|
|
2245
2245
|
{
|
|
2246
|
-
icon:
|
|
2246
|
+
icon: Ae(i.exportCSV, yr),
|
|
2247
2247
|
onClick: () => a("csv"),
|
|
2248
|
-
style:
|
|
2248
|
+
style: g.buttonSecondary
|
|
2249
2249
|
}
|
|
2250
2250
|
) }),
|
|
2251
|
-
/* @__PURE__ */ e.jsx(
|
|
2252
|
-
|
|
2251
|
+
/* @__PURE__ */ e.jsx(Ce, { title: m.exportExcelTooltip || "Export to Excel", children: /* @__PURE__ */ e.jsx(
|
|
2252
|
+
fe,
|
|
2253
2253
|
{
|
|
2254
|
-
icon:
|
|
2254
|
+
icon: Ae(i.exportExcel, br),
|
|
2255
2255
|
onClick: () => a("excel"),
|
|
2256
|
-
style:
|
|
2256
|
+
style: g.buttonSecondary
|
|
2257
2257
|
}
|
|
2258
2258
|
) }),
|
|
2259
|
-
/* @__PURE__ */ e.jsx(
|
|
2260
|
-
|
|
2259
|
+
/* @__PURE__ */ e.jsx(Ce, { title: m.exportJSONTooltip || "Export to JSON", children: /* @__PURE__ */ e.jsx(
|
|
2260
|
+
fe,
|
|
2261
2261
|
{
|
|
2262
|
-
icon:
|
|
2262
|
+
icon: Ae(i.exportJSON, wr),
|
|
2263
2263
|
onClick: () => a("json"),
|
|
2264
|
-
style:
|
|
2264
|
+
style: g.buttonSecondary
|
|
2265
2265
|
}
|
|
2266
2266
|
) }),
|
|
2267
|
-
/* @__PURE__ */ e.jsx(
|
|
2268
|
-
|
|
2267
|
+
/* @__PURE__ */ e.jsx(Ce, { title: m.exportPDFTooltip || "Export to PDF", children: /* @__PURE__ */ e.jsx(
|
|
2268
|
+
fe,
|
|
2269
2269
|
{
|
|
2270
|
-
icon:
|
|
2270
|
+
icon: Ae(i.exportPDF, vr),
|
|
2271
2271
|
onClick: () => a("pdf"),
|
|
2272
|
-
style:
|
|
2272
|
+
style: g.buttonSecondary
|
|
2273
2273
|
}
|
|
2274
2274
|
) })
|
|
2275
2275
|
] })
|
|
@@ -2284,26 +2284,26 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2284
2284
|
}
|
|
2285
2285
|
)
|
|
2286
2286
|
] });
|
|
2287
|
-
}, { Option:
|
|
2288
|
-
const [m] =
|
|
2289
|
-
const c =
|
|
2290
|
-
|
|
2291
|
-
text:
|
|
2287
|
+
}, { Option: Qe } = ge, { TextArea: Hr } = ze, Ur = ({ onCreateTask: t, onClose: o, uiConfig: a = {}, parentId: l, parentTaskName: r, styleConfig: x }) => {
|
|
2288
|
+
const [m] = ce.useForm(), i = rt(x), s = (g) => {
|
|
2289
|
+
const c = g.start.toDate(), y = new Date(c);
|
|
2290
|
+
y.setDate(y.getDate() + (g.duration || 1)), t({
|
|
2291
|
+
text: g.text,
|
|
2292
2292
|
start: c,
|
|
2293
|
-
end:
|
|
2294
|
-
duration:
|
|
2295
|
-
progress:
|
|
2296
|
-
type:
|
|
2297
|
-
color: typeof
|
|
2298
|
-
owner:
|
|
2299
|
-
priority:
|
|
2300
|
-
details:
|
|
2293
|
+
end: y,
|
|
2294
|
+
duration: g.duration || 1,
|
|
2295
|
+
progress: g.progress || 0,
|
|
2296
|
+
type: g.type,
|
|
2297
|
+
color: typeof g.color == "string" ? g.color : g.color?.toHexString?.() || "#4A90E2",
|
|
2298
|
+
owner: g.owner || "",
|
|
2299
|
+
priority: g.priority || "medium",
|
|
2300
|
+
details: g.details || "",
|
|
2301
2301
|
parent: l
|
|
2302
2302
|
// Set parent for subtasks
|
|
2303
2303
|
}, l), o();
|
|
2304
2304
|
};
|
|
2305
2305
|
return /* @__PURE__ */ e.jsx(
|
|
2306
|
-
|
|
2306
|
+
vt,
|
|
2307
2307
|
{
|
|
2308
2308
|
title: l ? (a.taskCreatorTitle || "Create Checklist") + (r ? ` for "${r}"` : "") : a.taskCreatorTitle || "Create New Stage",
|
|
2309
2309
|
open: !0,
|
|
@@ -2320,7 +2320,7 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2320
2320
|
okButtonProps: { style: i.buttonPrimary },
|
|
2321
2321
|
cancelButtonProps: { style: i.buttonSecondary },
|
|
2322
2322
|
children: /* @__PURE__ */ e.jsxs(
|
|
2323
|
-
|
|
2323
|
+
ce,
|
|
2324
2324
|
{
|
|
2325
2325
|
form: m,
|
|
2326
2326
|
layout: "vertical",
|
|
@@ -2328,56 +2328,56 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2328
2328
|
initialValues: {
|
|
2329
2329
|
type: "task",
|
|
2330
2330
|
priority: "medium",
|
|
2331
|
-
start:
|
|
2331
|
+
start: Zt(),
|
|
2332
2332
|
duration: 1,
|
|
2333
2333
|
progress: 0,
|
|
2334
2334
|
color: "#4A90E2"
|
|
2335
2335
|
},
|
|
2336
2336
|
children: [
|
|
2337
2337
|
/* @__PURE__ */ e.jsx(
|
|
2338
|
-
|
|
2338
|
+
ce.Item,
|
|
2339
2339
|
{
|
|
2340
2340
|
name: "text",
|
|
2341
2341
|
label: a.taskNameLabel || "Stage Name",
|
|
2342
2342
|
rules: [{ required: !0, message: a.taskNameRequired || "Please enter stage name" }],
|
|
2343
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2343
|
+
children: /* @__PURE__ */ e.jsx(ze, { placeholder: a.taskNamePlaceholder || "Enter stage name", autoFocus: !0, style: i.input })
|
|
2344
2344
|
}
|
|
2345
2345
|
),
|
|
2346
2346
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
|
|
2347
|
-
/* @__PURE__ */ e.jsx(
|
|
2348
|
-
/* @__PURE__ */ e.jsx(
|
|
2349
|
-
/* @__PURE__ */ e.jsx(
|
|
2350
|
-
/* @__PURE__ */ e.jsx(
|
|
2347
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "type", label: a.typeLabel || "Type", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(ge, { style: i.input, children: [
|
|
2348
|
+
/* @__PURE__ */ e.jsx(Qe, { value: "task", children: a.taskTypeOptions?.task || "Stage" }),
|
|
2349
|
+
/* @__PURE__ */ e.jsx(Qe, { value: "milestone", children: a.taskTypeOptions?.milestone || "Milestone" }),
|
|
2350
|
+
/* @__PURE__ */ e.jsx(Qe, { value: "project", children: a.taskTypeOptions?.project || "Project" })
|
|
2351
2351
|
] }) }),
|
|
2352
|
-
/* @__PURE__ */ e.jsx(
|
|
2353
|
-
/* @__PURE__ */ e.jsx(
|
|
2354
|
-
/* @__PURE__ */ e.jsx(
|
|
2355
|
-
/* @__PURE__ */ e.jsx(
|
|
2352
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "priority", label: a.priorityLabel || "Priority", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(ge, { style: i.input, children: [
|
|
2353
|
+
/* @__PURE__ */ e.jsx(Qe, { value: "low", children: a.priorityOptions?.low || "Low" }),
|
|
2354
|
+
/* @__PURE__ */ e.jsx(Qe, { value: "medium", children: a.priorityOptions?.medium || "Medium" }),
|
|
2355
|
+
/* @__PURE__ */ e.jsx(Qe, { value: "high", children: a.priorityOptions?.high || "High" })
|
|
2356
2356
|
] }) })
|
|
2357
2357
|
] }),
|
|
2358
2358
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
|
|
2359
|
-
/* @__PURE__ */ e.jsx(
|
|
2360
|
-
/* @__PURE__ */ e.jsx(
|
|
2359
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "start", label: a.startDateLabel || "Start Date", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Vt, { style: { width: "100%", ...i.input } }) }),
|
|
2360
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "duration", label: a.durationLabel || "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Ne, { min: 0, style: { width: "100%", ...i.input } }) })
|
|
2361
2361
|
] }),
|
|
2362
2362
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
|
|
2363
|
-
/* @__PURE__ */ e.jsx(
|
|
2364
|
-
/* @__PURE__ */ e.jsx(
|
|
2363
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "color", label: a.colorLabel || "Color", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Xt, { showText: !0 }) }),
|
|
2364
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "progress", label: a.progressLabel || "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Ne, { min: 0, max: 100, style: { width: "100%", ...i.input } }) })
|
|
2365
2365
|
] }),
|
|
2366
|
-
/* @__PURE__ */ e.jsx(
|
|
2367
|
-
/* @__PURE__ */ e.jsx(
|
|
2366
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "owner", label: a.ownerLabel || "Owner", children: /* @__PURE__ */ e.jsx(ze, { placeholder: a.ownerPlaceholder || "Assign to...", style: i.input }) }),
|
|
2367
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "details", label: a.detailsLabel || "Details", children: /* @__PURE__ */ e.jsx(Hr, { placeholder: a.detailsPlaceholder || "Add stage description...", rows: 3, style: i.input }) })
|
|
2368
2368
|
]
|
|
2369
2369
|
}
|
|
2370
2370
|
)
|
|
2371
2371
|
}
|
|
2372
2372
|
);
|
|
2373
|
-
}, { Option:
|
|
2374
|
-
const [m] =
|
|
2375
|
-
const
|
|
2376
|
-
|
|
2373
|
+
}, { Option: et } = ge, { TextArea: Vr } = ze, { confirm: Xr } = vt, Jr = ({ task: t, onUpdate: o, onDelete: a, onClose: l, uiConfig: r = {}, styleConfig: x }) => {
|
|
2374
|
+
const [m] = ce.useForm(), i = rt(x), s = (c) => {
|
|
2375
|
+
const y = c.start.toDate(), S = new Date(y);
|
|
2376
|
+
S.setDate(S.getDate() + (c.duration || 1)), o({
|
|
2377
2377
|
...t,
|
|
2378
2378
|
text: c.text,
|
|
2379
|
-
start:
|
|
2380
|
-
end:
|
|
2379
|
+
start: y,
|
|
2380
|
+
end: S,
|
|
2381
2381
|
duration: c.duration || 1,
|
|
2382
2382
|
progress: c.progress || 0,
|
|
2383
2383
|
type: c.type,
|
|
@@ -2386,10 +2386,10 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2386
2386
|
priority: c.priority || "medium",
|
|
2387
2387
|
details: c.details || ""
|
|
2388
2388
|
}), l();
|
|
2389
|
-
},
|
|
2389
|
+
}, g = () => {
|
|
2390
2390
|
Xr({
|
|
2391
2391
|
title: r.deleteConfirmTitle ? `${r.deleteConfirmTitle}: "${t.text}"?` : `Are you sure you want to delete "${t.text}"?`,
|
|
2392
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2392
|
+
icon: /* @__PURE__ */ e.jsx(pe, { icon: Sr, style: { color: "#faad14", marginRight: 8 } }),
|
|
2393
2393
|
content: r.deleteConfirmContent || "This action cannot be undone.",
|
|
2394
2394
|
okText: r.deleteConfirmOkText || "Yes, Delete",
|
|
2395
2395
|
okType: "danger",
|
|
@@ -2400,15 +2400,15 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2400
2400
|
});
|
|
2401
2401
|
};
|
|
2402
2402
|
return /* @__PURE__ */ e.jsx(
|
|
2403
|
-
|
|
2403
|
+
vt,
|
|
2404
2404
|
{
|
|
2405
2405
|
title: r.taskEditorTitle || "Edit Stage",
|
|
2406
2406
|
open: !0,
|
|
2407
2407
|
onCancel: l,
|
|
2408
2408
|
footer: [
|
|
2409
|
-
/* @__PURE__ */ e.jsx(
|
|
2410
|
-
/* @__PURE__ */ e.jsx(
|
|
2411
|
-
/* @__PURE__ */ e.jsx(
|
|
2409
|
+
/* @__PURE__ */ e.jsx(fe, { danger: !0, onClick: g, style: { float: "left", ...i.buttonDanger }, children: r.taskEditorDeleteText || "Delete" }, "delete"),
|
|
2410
|
+
/* @__PURE__ */ e.jsx(fe, { onClick: l, style: i.buttonSecondary, children: r.taskEditorCancelText || "Cancel" }, "cancel"),
|
|
2411
|
+
/* @__PURE__ */ e.jsx(fe, { type: "primary", onClick: () => m.submit(), style: i.buttonPrimary, children: r.taskEditorSaveText || "Save Changes" }, "submit")
|
|
2412
2412
|
],
|
|
2413
2413
|
width: 600,
|
|
2414
2414
|
className: "gantt-modal-antd",
|
|
@@ -2417,7 +2417,7 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2417
2417
|
header: { borderBottom: `1px solid ${i.modal?.borderColor || "#f0f0f0"}`, marginBottom: 16 }
|
|
2418
2418
|
},
|
|
2419
2419
|
children: /* @__PURE__ */ e.jsxs(
|
|
2420
|
-
|
|
2420
|
+
ce,
|
|
2421
2421
|
{
|
|
2422
2422
|
form: m,
|
|
2423
2423
|
layout: "vertical",
|
|
@@ -2426,7 +2426,7 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2426
2426
|
text: t.text,
|
|
2427
2427
|
type: t.type || "task",
|
|
2428
2428
|
priority: t.priority || "medium",
|
|
2429
|
-
start:
|
|
2429
|
+
start: Zt(t.start),
|
|
2430
2430
|
duration: t.duration,
|
|
2431
2431
|
progress: t.progress,
|
|
2432
2432
|
color: t.color || "#4A90E2",
|
|
@@ -2435,42 +2435,42 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2435
2435
|
},
|
|
2436
2436
|
children: [
|
|
2437
2437
|
/* @__PURE__ */ e.jsx(
|
|
2438
|
-
|
|
2438
|
+
ce.Item,
|
|
2439
2439
|
{
|
|
2440
2440
|
name: "text",
|
|
2441
2441
|
label: r.taskNameLabel || "Stage Name",
|
|
2442
2442
|
rules: [{ required: !0, message: r.taskNameRequired || "Please enter stage name" }],
|
|
2443
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2443
|
+
children: /* @__PURE__ */ e.jsx(ze, { placeholder: r.taskNamePlaceholder || "Enter stage name", style: i.input })
|
|
2444
2444
|
}
|
|
2445
2445
|
),
|
|
2446
2446
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
|
|
2447
|
-
/* @__PURE__ */ e.jsx(
|
|
2448
|
-
/* @__PURE__ */ e.jsx(
|
|
2449
|
-
/* @__PURE__ */ e.jsx(
|
|
2450
|
-
/* @__PURE__ */ e.jsx(
|
|
2447
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "type", label: r.typeLabel || "Type", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(ge, { style: i.input, children: [
|
|
2448
|
+
/* @__PURE__ */ e.jsx(et, { value: "task", children: r.taskTypeOptions?.task || "Stage" }),
|
|
2449
|
+
/* @__PURE__ */ e.jsx(et, { value: "milestone", children: r.taskTypeOptions?.milestone || "Milestone" }),
|
|
2450
|
+
/* @__PURE__ */ e.jsx(et, { value: "project", children: r.taskTypeOptions?.project || "Project" })
|
|
2451
2451
|
] }) }),
|
|
2452
|
-
/* @__PURE__ */ e.jsx(
|
|
2453
|
-
/* @__PURE__ */ e.jsx(
|
|
2454
|
-
/* @__PURE__ */ e.jsx(
|
|
2455
|
-
/* @__PURE__ */ e.jsx(
|
|
2452
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "priority", label: r.priorityLabel || "Priority", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(ge, { style: i.input, children: [
|
|
2453
|
+
/* @__PURE__ */ e.jsx(et, { value: "low", children: r.priorityOptions?.low || "Low" }),
|
|
2454
|
+
/* @__PURE__ */ e.jsx(et, { value: "medium", children: r.priorityOptions?.medium || "Medium" }),
|
|
2455
|
+
/* @__PURE__ */ e.jsx(et, { value: "high", children: r.priorityOptions?.high || "High" })
|
|
2456
2456
|
] }) })
|
|
2457
2457
|
] }),
|
|
2458
2458
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
|
|
2459
|
-
/* @__PURE__ */ e.jsx(
|
|
2460
|
-
/* @__PURE__ */ e.jsx(
|
|
2459
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "start", label: r.startDateLabel || "Start Date", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Vt, { style: { width: "100%", ...i.input } }) }),
|
|
2460
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "duration", label: r.durationLabel || "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Ne, { min: 0, style: { width: "100%", ...i.input } }) })
|
|
2461
2461
|
] }),
|
|
2462
2462
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
|
|
2463
|
-
/* @__PURE__ */ e.jsx(
|
|
2464
|
-
/* @__PURE__ */ e.jsx(
|
|
2463
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "color", label: r.colorLabel || "Color", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Xt, { showText: !0 }) }),
|
|
2464
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "progress", label: r.progressLabel || "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(Ne, { min: 0, max: 100, style: { width: "100%", ...i.input } }) })
|
|
2465
2465
|
] }),
|
|
2466
|
-
/* @__PURE__ */ e.jsx(
|
|
2467
|
-
/* @__PURE__ */ e.jsx(
|
|
2466
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "owner", label: r.ownerLabel || "Owner", children: /* @__PURE__ */ e.jsx(ze, { placeholder: r.ownerPlaceholder || "Assign to...", style: i.input }) }),
|
|
2467
|
+
/* @__PURE__ */ e.jsx(ce.Item, { name: "details", label: r.detailsLabel || "Details", children: /* @__PURE__ */ e.jsx(Vr, { placeholder: r.detailsPlaceholder || "Add stage description...", rows: 3, style: i.input }) })
|
|
2468
2468
|
]
|
|
2469
2469
|
}
|
|
2470
2470
|
)
|
|
2471
2471
|
}
|
|
2472
2472
|
);
|
|
2473
|
-
}, { Title: ct, Text: Xe, Paragraph: qr } = Ht, { Option:
|
|
2473
|
+
}, { Title: ct, Text: Xe, Paragraph: qr } = Ht, { Option: Oe } = ge, Gr = ({
|
|
2474
2474
|
task: t,
|
|
2475
2475
|
allTasks: o,
|
|
2476
2476
|
links: a,
|
|
@@ -2480,20 +2480,20 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2480
2480
|
onClose: m,
|
|
2481
2481
|
styleConfig: i
|
|
2482
2482
|
}) => {
|
|
2483
|
-
const s =
|
|
2484
|
-
if (
|
|
2485
|
-
const D =
|
|
2486
|
-
if (
|
|
2487
|
-
const W =
|
|
2483
|
+
const s = rt(i), [g, c] = z(""), [y, S] = z("e2s"), [u, p] = z(0), [b, w] = z("day"), [j, M] = z(t.duration), [$, B] = z(""), ae = a.filter((D) => D.target === t.id), X = o.filter((D) => D.id !== t.id && D.id !== t.parent), he = () => {
|
|
2484
|
+
if (g) {
|
|
2485
|
+
const D = Ot(u, b);
|
|
2486
|
+
if (j !== t.duration && x) {
|
|
2487
|
+
const W = me(new Date(t.start), j, "day");
|
|
2488
2488
|
x({
|
|
2489
2489
|
...t,
|
|
2490
|
-
duration:
|
|
2490
|
+
duration: j,
|
|
2491
2491
|
end: W
|
|
2492
2492
|
});
|
|
2493
2493
|
}
|
|
2494
|
-
l(
|
|
2494
|
+
l(g, t.id, y, D), c(""), p(0), w("day");
|
|
2495
2495
|
}
|
|
2496
|
-
},
|
|
2496
|
+
}, L = () => {
|
|
2497
2497
|
if (!$.trim()) return;
|
|
2498
2498
|
const D = Pr($.trim());
|
|
2499
2499
|
if (!D) {
|
|
@@ -2501,14 +2501,14 @@ const { Search: zr } = He, Br = ({ onFilterChange: t, owners: o = [], uiConfig:
|
|
|
2501
2501
|
Example: 3FS+10d`);
|
|
2502
2502
|
return;
|
|
2503
2503
|
}
|
|
2504
|
-
const W = D.taskNumber - 1,
|
|
2505
|
-
if (!
|
|
2504
|
+
const W = D.taskNumber - 1, oe = o[W];
|
|
2505
|
+
if (!oe) {
|
|
2506
2506
|
alert(`Task ${D.taskNumber} not found`);
|
|
2507
2507
|
return;
|
|
2508
2508
|
}
|
|
2509
|
-
const
|
|
2510
|
-
l(
|
|
2511
|
-
},
|
|
2509
|
+
const G = Cr(D.type), xe = Ot(D.lag, D.lagUnit);
|
|
2510
|
+
l(oe.id, t.id, G, xe), B("");
|
|
2511
|
+
}, Z = (D) => {
|
|
2512
2512
|
switch (D) {
|
|
2513
2513
|
case "e2s":
|
|
2514
2514
|
return "Finish-to-Start (FS)";
|
|
@@ -2519,7 +2519,7 @@ Example: 3FS+10d`);
|
|
|
2519
2519
|
case "s2e":
|
|
2520
2520
|
return "Start-to-Finish (SF)";
|
|
2521
2521
|
}
|
|
2522
|
-
},
|
|
2522
|
+
}, U = (D) => {
|
|
2523
2523
|
switch (D) {
|
|
2524
2524
|
case "e2s":
|
|
2525
2525
|
return "blue";
|
|
@@ -2532,7 +2532,7 @@ Example: 3FS+10d`);
|
|
|
2532
2532
|
}
|
|
2533
2533
|
};
|
|
2534
2534
|
return /* @__PURE__ */ e.jsx(
|
|
2535
|
-
|
|
2535
|
+
vt,
|
|
2536
2536
|
{
|
|
2537
2537
|
title: /* @__PURE__ */ e.jsx(ct, { level: 4, style: { margin: 0, color: s.font?.color }, children: "Dependency Editor" }),
|
|
2538
2538
|
open: !0,
|
|
@@ -2545,7 +2545,7 @@ Example: 3FS+10d`);
|
|
|
2545
2545
|
},
|
|
2546
2546
|
children: /* @__PURE__ */ e.jsxs("div", { style: { padding: "8px 0" }, children: [
|
|
2547
2547
|
/* @__PURE__ */ e.jsx(
|
|
2548
|
-
|
|
2548
|
+
cr,
|
|
2549
2549
|
{
|
|
2550
2550
|
message: "Managing dependencies helps in auto-scheduling and critical path calculation.",
|
|
2551
2551
|
type: "info",
|
|
@@ -2561,19 +2561,19 @@ Example: 3FS+10d`);
|
|
|
2561
2561
|
size: "small",
|
|
2562
2562
|
style: { flex: 1, ...s.modal },
|
|
2563
2563
|
headStyle: { borderBottom: `1px solid ${s.modal?.borderColor || "#f0f0f0"}` },
|
|
2564
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
2564
|
+
children: /* @__PURE__ */ e.jsxs(Pt, { direction: "vertical", style: { width: "100%" }, size: "middle", children: [
|
|
2565
2565
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
2566
2566
|
/* @__PURE__ */ e.jsx(Xe, { style: { display: "block", marginBottom: 8, fontSize: 13, color: s.font?.color }, children: "Predecessor" }),
|
|
2567
2567
|
/* @__PURE__ */ e.jsx(
|
|
2568
|
-
|
|
2568
|
+
ge,
|
|
2569
2569
|
{
|
|
2570
2570
|
showSearch: !0,
|
|
2571
2571
|
placeholder: "Select a task",
|
|
2572
2572
|
optionFilterProp: "children",
|
|
2573
2573
|
style: { width: "100%", ...s.input },
|
|
2574
|
-
value:
|
|
2574
|
+
value: g,
|
|
2575
2575
|
onChange: c,
|
|
2576
|
-
children: X.map((D) => /* @__PURE__ */ e.jsxs(
|
|
2576
|
+
children: X.map((D) => /* @__PURE__ */ e.jsxs(Oe, { value: D.id, children: [
|
|
2577
2577
|
"[",
|
|
2578
2578
|
o.indexOf(D) + 1,
|
|
2579
2579
|
"] ",
|
|
@@ -2585,16 +2585,16 @@ Example: 3FS+10d`);
|
|
|
2585
2585
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
2586
2586
|
/* @__PURE__ */ e.jsx(Xe, { style: { display: "block", marginBottom: 8, fontSize: 13, color: s.font?.color }, children: "Type" }),
|
|
2587
2587
|
/* @__PURE__ */ e.jsxs(
|
|
2588
|
-
|
|
2588
|
+
ge,
|
|
2589
2589
|
{
|
|
2590
2590
|
style: { width: "100%", ...s.input },
|
|
2591
|
-
value:
|
|
2592
|
-
onChange:
|
|
2591
|
+
value: y,
|
|
2592
|
+
onChange: S,
|
|
2593
2593
|
children: [
|
|
2594
|
-
/* @__PURE__ */ e.jsx(
|
|
2595
|
-
/* @__PURE__ */ e.jsx(
|
|
2596
|
-
/* @__PURE__ */ e.jsx(
|
|
2597
|
-
/* @__PURE__ */ e.jsx(
|
|
2594
|
+
/* @__PURE__ */ e.jsx(Oe, { value: "e2s", children: "Finish-to-Start (FS)" }),
|
|
2595
|
+
/* @__PURE__ */ e.jsx(Oe, { value: "s2s", children: "Start-to-Start (SS)" }),
|
|
2596
|
+
/* @__PURE__ */ e.jsx(Oe, { value: "e2e", children: "Finish-to-Finish (FF)" }),
|
|
2597
|
+
/* @__PURE__ */ e.jsx(Oe, { value: "s2e", children: "Start-to-Finish (SF)" })
|
|
2598
2598
|
]
|
|
2599
2599
|
}
|
|
2600
2600
|
)
|
|
@@ -2603,7 +2603,7 @@ Example: 3FS+10d`);
|
|
|
2603
2603
|
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1 }, children: [
|
|
2604
2604
|
/* @__PURE__ */ e.jsx(Xe, { style: { display: "block", marginBottom: 8, fontSize: 13, color: s.font?.color }, children: "Lag/Lead" }),
|
|
2605
2605
|
/* @__PURE__ */ e.jsx(
|
|
2606
|
-
|
|
2606
|
+
Ne,
|
|
2607
2607
|
{
|
|
2608
2608
|
style: { width: "100%", ...s.input },
|
|
2609
2609
|
value: u,
|
|
@@ -2614,16 +2614,16 @@ Example: 3FS+10d`);
|
|
|
2614
2614
|
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1 }, children: [
|
|
2615
2615
|
/* @__PURE__ */ e.jsx(Xe, { style: { display: "block", marginBottom: 8, fontSize: 13, color: s.font?.color }, children: "Units" }),
|
|
2616
2616
|
/* @__PURE__ */ e.jsxs(
|
|
2617
|
-
|
|
2617
|
+
ge,
|
|
2618
2618
|
{
|
|
2619
2619
|
style: { width: "100%", ...s.input },
|
|
2620
2620
|
value: b,
|
|
2621
2621
|
onChange: w,
|
|
2622
2622
|
children: [
|
|
2623
|
-
/* @__PURE__ */ e.jsx(
|
|
2624
|
-
/* @__PURE__ */ e.jsx(
|
|
2625
|
-
/* @__PURE__ */ e.jsx(
|
|
2626
|
-
/* @__PURE__ */ e.jsx(
|
|
2623
|
+
/* @__PURE__ */ e.jsx(Oe, { value: "day", children: "Days" }),
|
|
2624
|
+
/* @__PURE__ */ e.jsx(Oe, { value: "hour", children: "Hours" }),
|
|
2625
|
+
/* @__PURE__ */ e.jsx(Oe, { value: "week", children: "Weeks" }),
|
|
2626
|
+
/* @__PURE__ */ e.jsx(Oe, { value: "month", children: "Months" })
|
|
2627
2627
|
]
|
|
2628
2628
|
}
|
|
2629
2629
|
)
|
|
@@ -2632,23 +2632,23 @@ Example: 3FS+10d`);
|
|
|
2632
2632
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
2633
2633
|
/* @__PURE__ */ e.jsx(Xe, { style: { display: "block", marginBottom: 8, fontSize: 13, color: s.font?.color }, children: "Duration (days)" }),
|
|
2634
2634
|
/* @__PURE__ */ e.jsx(
|
|
2635
|
-
|
|
2635
|
+
Ne,
|
|
2636
2636
|
{
|
|
2637
2637
|
style: { width: "100%", ...s.input },
|
|
2638
2638
|
min: 1,
|
|
2639
|
-
value:
|
|
2640
|
-
onChange: (D) =>
|
|
2639
|
+
value: j,
|
|
2640
|
+
onChange: (D) => M(D || 1)
|
|
2641
2641
|
}
|
|
2642
2642
|
)
|
|
2643
2643
|
] }),
|
|
2644
2644
|
/* @__PURE__ */ e.jsx(
|
|
2645
|
-
|
|
2645
|
+
fe,
|
|
2646
2646
|
{
|
|
2647
2647
|
type: "primary",
|
|
2648
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2648
|
+
icon: /* @__PURE__ */ e.jsx(pe, { icon: Nt, style: { marginRight: 8 } }),
|
|
2649
2649
|
block: !0,
|
|
2650
|
-
onClick:
|
|
2651
|
-
disabled: !
|
|
2650
|
+
onClick: he,
|
|
2651
|
+
disabled: !g,
|
|
2652
2652
|
style: {
|
|
2653
2653
|
height: 40,
|
|
2654
2654
|
marginTop: 8,
|
|
@@ -2674,12 +2674,12 @@ Example: 3FS+10d`);
|
|
|
2674
2674
|
"Example: 3FS+10d"
|
|
2675
2675
|
] }),
|
|
2676
2676
|
/* @__PURE__ */ e.jsx(
|
|
2677
|
-
|
|
2677
|
+
ze,
|
|
2678
2678
|
{
|
|
2679
2679
|
placeholder: "e.g. 5FS+2d",
|
|
2680
2680
|
value: $,
|
|
2681
2681
|
onChange: (D) => B(D.target.value),
|
|
2682
|
-
onPressEnter:
|
|
2682
|
+
onPressEnter: L,
|
|
2683
2683
|
style: {
|
|
2684
2684
|
marginBottom: 16,
|
|
2685
2685
|
height: 40,
|
|
@@ -2688,10 +2688,10 @@ Example: 3FS+10d`);
|
|
|
2688
2688
|
}
|
|
2689
2689
|
),
|
|
2690
2690
|
/* @__PURE__ */ e.jsx(
|
|
2691
|
-
|
|
2691
|
+
fe,
|
|
2692
2692
|
{
|
|
2693
2693
|
block: !0,
|
|
2694
|
-
onClick:
|
|
2694
|
+
onClick: L,
|
|
2695
2695
|
style: {
|
|
2696
2696
|
height: 40,
|
|
2697
2697
|
...s.buttonSecondary
|
|
@@ -2707,14 +2707,14 @@ Example: 3FS+10d`);
|
|
|
2707
2707
|
/* @__PURE__ */ e.jsxs("div", { style: { maxHeight: 300, overflowY: "auto" }, children: [
|
|
2708
2708
|
/* @__PURE__ */ e.jsx(ct, { level: 5, style: { fontSize: 14, marginBottom: 16, color: s.font?.color }, children: "Current Dependencies" }),
|
|
2709
2709
|
/* @__PURE__ */ e.jsx(
|
|
2710
|
-
|
|
2710
|
+
Rt,
|
|
2711
2711
|
{
|
|
2712
|
-
dataSource:
|
|
2712
|
+
dataSource: ae,
|
|
2713
2713
|
locale: { emptyText: /* @__PURE__ */ e.jsx(Xe, { type: "secondary", style: { color: s.font?.color, opacity: 0.5 }, children: "No dependencies added yet." }) },
|
|
2714
2714
|
renderItem: (D) => {
|
|
2715
|
-
const W = o.find((
|
|
2715
|
+
const W = o.find((oe) => oe.id === D.source);
|
|
2716
2716
|
return /* @__PURE__ */ e.jsx(
|
|
2717
|
-
|
|
2717
|
+
Rt.Item,
|
|
2718
2718
|
{
|
|
2719
2719
|
style: {
|
|
2720
2720
|
padding: "12px 16px",
|
|
@@ -2725,18 +2725,18 @@ Example: 3FS+10d`);
|
|
|
2725
2725
|
},
|
|
2726
2726
|
actions: [
|
|
2727
2727
|
/* @__PURE__ */ e.jsx(
|
|
2728
|
-
|
|
2728
|
+
fe,
|
|
2729
2729
|
{
|
|
2730
2730
|
type: "text",
|
|
2731
2731
|
danger: !0,
|
|
2732
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2732
|
+
icon: /* @__PURE__ */ e.jsx(pe, { icon: Gt }),
|
|
2733
2733
|
onClick: () => r(D.id)
|
|
2734
2734
|
},
|
|
2735
2735
|
"delete"
|
|
2736
2736
|
)
|
|
2737
2737
|
],
|
|
2738
2738
|
children: /* @__PURE__ */ e.jsx(
|
|
2739
|
-
|
|
2739
|
+
Rt.Item.Meta,
|
|
2740
2740
|
{
|
|
2741
2741
|
avatar: /* @__PURE__ */ e.jsx("div", { style: {
|
|
2742
2742
|
width: 32,
|
|
@@ -2752,10 +2752,10 @@ Example: 3FS+10d`);
|
|
|
2752
2752
|
}, children: W ? o.indexOf(W) + 1 : "?" }),
|
|
2753
2753
|
title: /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
|
|
2754
2754
|
/* @__PURE__ */ e.jsx("span", { style: { fontWeight: 600, color: s.font?.color }, children: W?.text || "Unknown Task" }),
|
|
2755
|
-
/* @__PURE__ */ e.jsx(
|
|
2755
|
+
/* @__PURE__ */ e.jsx(ur, { color: U(D.type), style: { margin: 0 }, children: Z(D.type) })
|
|
2756
2756
|
] }),
|
|
2757
2757
|
description: /* @__PURE__ */ e.jsx("div", { style: { display: "flex", alignItems: "center", gap: 16, marginTop: 4 }, children: /* @__PURE__ */ e.jsxs("span", { style: { fontSize: 12, color: s.font?.color, opacity: 0.7 }, children: [
|
|
2758
|
-
/* @__PURE__ */ e.jsx(
|
|
2758
|
+
/* @__PURE__ */ e.jsx(pe, { icon: qt, style: { marginRight: 6 } }),
|
|
2759
2759
|
"Lag: ",
|
|
2760
2760
|
D.lag || 0,
|
|
2761
2761
|
" days"
|
|
@@ -2770,7 +2770,7 @@ Example: 3FS+10d`);
|
|
|
2770
2770
|
] }),
|
|
2771
2771
|
/* @__PURE__ */ e.jsxs("div", { style: { marginTop: 24, padding: "16px", background: "#fff7e6", borderRadius: 8, border: "1px solid #ffe7ba" }, children: [
|
|
2772
2772
|
/* @__PURE__ */ e.jsxs(ct, { level: 5, style: { fontSize: 13, marginBottom: 8, display: "flex", alignItems: "center" }, children: [
|
|
2773
|
-
/* @__PURE__ */ e.jsx(
|
|
2773
|
+
/* @__PURE__ */ e.jsx(pe, { icon: jr, style: { marginRight: 8, color: "#fa8c16" } }),
|
|
2774
2774
|
"Coming soon"
|
|
2775
2775
|
] }),
|
|
2776
2776
|
/* @__PURE__ */ e.jsx(Xe, { style: { fontSize: 12, color: "rgba(0,0,0,0.65)" }, children: "Dependency visualization on the chart and automatic lag calculations based on working hours." })
|
|
@@ -2788,36 +2788,36 @@ Example: 3FS+10d`);
|
|
|
2788
2788
|
onDependencies: m,
|
|
2789
2789
|
onConvertToMilestone: i,
|
|
2790
2790
|
onConvertToTask: s,
|
|
2791
|
-
onConvertToProject:
|
|
2791
|
+
onConvertToProject: g,
|
|
2792
2792
|
onAutoSchedule: c,
|
|
2793
|
-
onClose:
|
|
2794
|
-
styleConfig:
|
|
2793
|
+
onClose: y,
|
|
2794
|
+
styleConfig: S
|
|
2795
2795
|
}) => {
|
|
2796
|
-
const u =
|
|
2796
|
+
const u = rt(S);
|
|
2797
2797
|
if (!a) return null;
|
|
2798
2798
|
const p = [
|
|
2799
2799
|
{
|
|
2800
2800
|
key: "edit",
|
|
2801
2801
|
label: "Edit",
|
|
2802
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2802
|
+
icon: /* @__PURE__ */ e.jsx(pe, { icon: Tr }),
|
|
2803
2803
|
onClick: () => {
|
|
2804
|
-
l(),
|
|
2804
|
+
l(), y();
|
|
2805
2805
|
}
|
|
2806
2806
|
},
|
|
2807
2807
|
{
|
|
2808
2808
|
key: "copy",
|
|
2809
2809
|
label: "Copy",
|
|
2810
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2810
|
+
icon: /* @__PURE__ */ e.jsx(pe, { icon: Dr }),
|
|
2811
2811
|
onClick: () => {
|
|
2812
|
-
x(),
|
|
2812
|
+
x(), y();
|
|
2813
2813
|
}
|
|
2814
2814
|
},
|
|
2815
2815
|
{
|
|
2816
2816
|
key: "dependencies",
|
|
2817
2817
|
label: "Dependencies",
|
|
2818
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2818
|
+
icon: /* @__PURE__ */ e.jsx(pe, { icon: qt }),
|
|
2819
2819
|
onClick: () => {
|
|
2820
|
-
m(),
|
|
2820
|
+
m(), y();
|
|
2821
2821
|
}
|
|
2822
2822
|
},
|
|
2823
2823
|
{
|
|
@@ -2831,28 +2831,28 @@ Example: 3FS+10d`);
|
|
|
2831
2831
|
{
|
|
2832
2832
|
key: "milestone",
|
|
2833
2833
|
label: "Milestone",
|
|
2834
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2834
|
+
icon: /* @__PURE__ */ e.jsx(pe, { icon: kr }),
|
|
2835
2835
|
disabled: a.type === "milestone",
|
|
2836
2836
|
onClick: () => {
|
|
2837
|
-
i(),
|
|
2837
|
+
i(), y();
|
|
2838
2838
|
}
|
|
2839
2839
|
},
|
|
2840
2840
|
{
|
|
2841
2841
|
key: "task",
|
|
2842
2842
|
label: "Task",
|
|
2843
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2843
|
+
icon: /* @__PURE__ */ e.jsx(pe, { icon: Lr }),
|
|
2844
2844
|
disabled: a.type === "task",
|
|
2845
2845
|
onClick: () => {
|
|
2846
|
-
s(),
|
|
2846
|
+
s(), y();
|
|
2847
2847
|
}
|
|
2848
2848
|
},
|
|
2849
2849
|
{
|
|
2850
2850
|
key: "project",
|
|
2851
2851
|
label: "Project",
|
|
2852
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2852
|
+
icon: /* @__PURE__ */ e.jsx(pe, { icon: Mr }),
|
|
2853
2853
|
disabled: a.type === "project",
|
|
2854
2854
|
onClick: () => {
|
|
2855
|
-
|
|
2855
|
+
g(), y();
|
|
2856
2856
|
}
|
|
2857
2857
|
}
|
|
2858
2858
|
]
|
|
@@ -2860,9 +2860,9 @@ Example: 3FS+10d`);
|
|
|
2860
2860
|
{
|
|
2861
2861
|
key: "auto-schedule",
|
|
2862
2862
|
label: "Auto Schedule",
|
|
2863
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2863
|
+
icon: /* @__PURE__ */ e.jsx(pe, { icon: Jt }),
|
|
2864
2864
|
onClick: () => {
|
|
2865
|
-
c?.(),
|
|
2865
|
+
c?.(), y();
|
|
2866
2866
|
}
|
|
2867
2867
|
},
|
|
2868
2868
|
{
|
|
@@ -2871,10 +2871,10 @@ Example: 3FS+10d`);
|
|
|
2871
2871
|
{
|
|
2872
2872
|
key: "delete",
|
|
2873
2873
|
label: "Delete",
|
|
2874
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2874
|
+
icon: /* @__PURE__ */ e.jsx(pe, { icon: Gt }),
|
|
2875
2875
|
danger: !0,
|
|
2876
2876
|
onClick: () => {
|
|
2877
|
-
r(),
|
|
2877
|
+
r(), y();
|
|
2878
2878
|
}
|
|
2879
2879
|
}
|
|
2880
2880
|
];
|
|
@@ -2890,7 +2890,7 @@ Example: 3FS+10d`);
|
|
|
2890
2890
|
},
|
|
2891
2891
|
onClick: (b) => b.stopPropagation(),
|
|
2892
2892
|
children: /* @__PURE__ */ e.jsx(
|
|
2893
|
-
|
|
2893
|
+
pr,
|
|
2894
2894
|
{
|
|
2895
2895
|
items: p,
|
|
2896
2896
|
style: {
|
|
@@ -2906,54 +2906,54 @@ Example: 3FS+10d`);
|
|
|
2906
2906
|
}
|
|
2907
2907
|
);
|
|
2908
2908
|
}, Kr = (t, o = []) => {
|
|
2909
|
-
const [a, l] = z([]), [r, x] = z(-1), [m, i] = z(t), [s,
|
|
2909
|
+
const [a, l] = z([]), [r, x] = z(-1), [m, i] = z(t), [s, g] = z(o);
|
|
2910
2910
|
Je(() => {
|
|
2911
2911
|
i(t);
|
|
2912
2912
|
}, [t]), Je(() => {
|
|
2913
|
-
|
|
2913
|
+
g(o);
|
|
2914
2914
|
}, [o]);
|
|
2915
|
-
const c =
|
|
2916
|
-
const
|
|
2917
|
-
type:
|
|
2915
|
+
const c = Me((M, $, B) => {
|
|
2916
|
+
const ae = {
|
|
2917
|
+
type: M,
|
|
2918
2918
|
before: $,
|
|
2919
2919
|
after: B,
|
|
2920
2920
|
timestamp: Date.now()
|
|
2921
2921
|
}, X = a.slice(0, r + 1);
|
|
2922
|
-
X.push(
|
|
2923
|
-
}, [a, r]),
|
|
2922
|
+
X.push(ae), X.length > 50 ? X.shift() : x(r + 1), l(X);
|
|
2923
|
+
}, [a, r]), y = Me(() => {
|
|
2924
2924
|
if (r < 0) return;
|
|
2925
|
-
const
|
|
2926
|
-
i(
|
|
2927
|
-
}, [a, r]),
|
|
2925
|
+
const M = a[r];
|
|
2926
|
+
i(M.before.tasks), g(M.before.links), x(r - 1);
|
|
2927
|
+
}, [a, r]), S = Me(() => {
|
|
2928
2928
|
if (r >= a.length - 1) return;
|
|
2929
|
-
const
|
|
2930
|
-
i(
|
|
2931
|
-
}, [a, r]), u = r >= 0, p = r < a.length - 1, b =
|
|
2932
|
-
const $ = { tasks: m, links: s }, B = m.map((X) => X.id ===
|
|
2929
|
+
const M = a[r + 1];
|
|
2930
|
+
i(M.after.tasks), g(M.after.links), x(r + 1);
|
|
2931
|
+
}, [a, r]), u = r >= 0, p = r < a.length - 1, b = Me((M) => {
|
|
2932
|
+
const $ = { tasks: m, links: s }, B = m.map((X) => X.id === M.id ? M : X);
|
|
2933
2933
|
c("task_update", $, { tasks: B, links: s }), i(B);
|
|
2934
|
-
}, [m, s, c]), w =
|
|
2935
|
-
const $ = { tasks: m, links: s }, B = [...m,
|
|
2934
|
+
}, [m, s, c]), w = Me((M) => {
|
|
2935
|
+
const $ = { tasks: m, links: s }, B = [...m, M];
|
|
2936
2936
|
c("task_create", $, { tasks: B, links: s }), i(B);
|
|
2937
|
-
}, [m, s, c]),
|
|
2938
|
-
const $ = { tasks: m, links: s }, B = m.filter((
|
|
2939
|
-
c("task_delete", $, { tasks: B, links:
|
|
2937
|
+
}, [m, s, c]), j = Me((M) => {
|
|
2938
|
+
const $ = { tasks: m, links: s }, B = m.filter((he) => he.id !== M), ae = s.filter((he) => he.source !== M && he.target !== M);
|
|
2939
|
+
c("task_delete", $, { tasks: B, links: ae }), i(B), g(ae);
|
|
2940
2940
|
}, [m, s, c]);
|
|
2941
2941
|
return {
|
|
2942
2942
|
tasks: m,
|
|
2943
2943
|
links: s,
|
|
2944
2944
|
setTasks: i,
|
|
2945
|
-
setLinks:
|
|
2946
|
-
undo:
|
|
2947
|
-
redo:
|
|
2945
|
+
setLinks: g,
|
|
2946
|
+
undo: y,
|
|
2947
|
+
redo: S,
|
|
2948
2948
|
canUndo: u,
|
|
2949
2949
|
canRedo: p,
|
|
2950
2950
|
updateTask: b,
|
|
2951
2951
|
createTask: w,
|
|
2952
|
-
deleteTask:
|
|
2952
|
+
deleteTask: j,
|
|
2953
2953
|
saveState: c,
|
|
2954
2954
|
history: a
|
|
2955
2955
|
};
|
|
2956
|
-
},
|
|
2956
|
+
}, tr = (t, o, a = { mode: "forward" }) => {
|
|
2957
2957
|
const l = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
2958
2958
|
return t.forEach((x) => {
|
|
2959
2959
|
l.set(x.id, []), r.set(x.id, []);
|
|
@@ -2965,17 +2965,17 @@ Example: 3FS+10d`);
|
|
|
2965
2965
|
if (r.has(i)) return;
|
|
2966
2966
|
const s = t.find((p) => p.id === i);
|
|
2967
2967
|
if (!s) return;
|
|
2968
|
-
const
|
|
2969
|
-
|
|
2968
|
+
const g = o.get(i) || [];
|
|
2969
|
+
g.forEach((p) => m(p));
|
|
2970
2970
|
let c = x;
|
|
2971
|
-
|
|
2971
|
+
g.forEach((p) => {
|
|
2972
2972
|
const b = l.get(p);
|
|
2973
2973
|
b && b.end > c && (c = new Date(b.end));
|
|
2974
2974
|
});
|
|
2975
|
-
const
|
|
2975
|
+
const y = new Date(c), S = me(y, s.duration, "day"), u = {
|
|
2976
2976
|
...s,
|
|
2977
|
-
start:
|
|
2978
|
-
end:
|
|
2977
|
+
start: y,
|
|
2978
|
+
end: S
|
|
2979
2979
|
};
|
|
2980
2980
|
l.set(i, u), r.add(i);
|
|
2981
2981
|
};
|
|
@@ -2987,17 +2987,17 @@ Example: 3FS+10d`);
|
|
|
2987
2987
|
if (r.has(i)) return;
|
|
2988
2988
|
const s = t.find((p) => p.id === i);
|
|
2989
2989
|
if (!s) return;
|
|
2990
|
-
const
|
|
2991
|
-
|
|
2990
|
+
const g = o.get(i) || [];
|
|
2991
|
+
g.forEach((p) => m(p));
|
|
2992
2992
|
let c = x;
|
|
2993
|
-
|
|
2993
|
+
g.forEach((p) => {
|
|
2994
2994
|
const b = l.get(p);
|
|
2995
2995
|
b && b.start < c && (c = new Date(b.start));
|
|
2996
2996
|
});
|
|
2997
|
-
const
|
|
2997
|
+
const y = new Date(c), S = me(y, -s.duration, "day"), u = {
|
|
2998
2998
|
...s,
|
|
2999
|
-
start:
|
|
3000
|
-
end:
|
|
2999
|
+
start: S,
|
|
3000
|
+
end: y
|
|
3001
3001
|
};
|
|
3002
3002
|
l.set(i, u), r.add(i);
|
|
3003
3003
|
};
|
|
@@ -3013,12 +3013,12 @@ Example: 3FS+10d`);
|
|
|
3013
3013
|
for (let x = 1; x < r.length; x++) {
|
|
3014
3014
|
const m = r[x], i = r[x - 1];
|
|
3015
3015
|
if (m.start < i.end) {
|
|
3016
|
-
const s = a.findIndex((
|
|
3016
|
+
const s = a.findIndex((g) => g.id === m.id);
|
|
3017
3017
|
if (s >= 0) {
|
|
3018
|
-
const
|
|
3018
|
+
const g = new Date(i.end), c = me(g, m.duration, "day");
|
|
3019
3019
|
a[s] = {
|
|
3020
3020
|
...m,
|
|
3021
|
-
start:
|
|
3021
|
+
start: g,
|
|
3022
3022
|
end: c
|
|
3023
3023
|
};
|
|
3024
3024
|
}
|
|
@@ -3027,7 +3027,7 @@ Example: 3FS+10d`);
|
|
|
3027
3027
|
}), a;
|
|
3028
3028
|
}, vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3029
3029
|
__proto__: null,
|
|
3030
|
-
autoSchedule:
|
|
3030
|
+
autoSchedule: tr,
|
|
3031
3031
|
levelResources: tn
|
|
3032
3032
|
}, Symbol.toStringTag, { value: "Module" })), rn = (t) => {
|
|
3033
3033
|
const o = /* @__PURE__ */ new Map();
|
|
@@ -3038,12 +3038,12 @@ Example: 3FS+10d`);
|
|
|
3038
3038
|
end: new Date(a.end)
|
|
3039
3039
|
});
|
|
3040
3040
|
}), o;
|
|
3041
|
-
},
|
|
3041
|
+
}, rr = (t) => {
|
|
3042
3042
|
const o = ["ID", "Task Name", "Start Date", "End Date", "Duration", "Progress", "Type", "Owner", "Priority"], a = t.map((r) => [
|
|
3043
3043
|
r.id,
|
|
3044
3044
|
r.text,
|
|
3045
|
-
|
|
3046
|
-
|
|
3045
|
+
be(r.start, "YYYY-MM-DD"),
|
|
3046
|
+
be(r.end, "YYYY-MM-DD"),
|
|
3047
3047
|
r.duration.toString(),
|
|
3048
3048
|
`${r.progress}%`,
|
|
3049
3049
|
r.type || "task",
|
|
@@ -3054,13 +3054,13 @@ Example: 3FS+10d`);
|
|
|
3054
3054
|
...a.map((r) => r.map((x) => `"${x}"`).join(","))
|
|
3055
3055
|
].join(`
|
|
3056
3056
|
`);
|
|
3057
|
-
|
|
3058
|
-
},
|
|
3057
|
+
St(l, "gantt-tasks.csv", "text/csv");
|
|
3058
|
+
}, nr = (t) => {
|
|
3059
3059
|
const o = ["ID", "Task Name", "Start Date", "End Date", "Duration", "Progress", "Type", "Owner", "Priority", "Details"], a = t.map((r) => [
|
|
3060
3060
|
r.id,
|
|
3061
3061
|
r.text,
|
|
3062
|
-
|
|
3063
|
-
|
|
3062
|
+
be(r.start, "MM/DD/YYYY"),
|
|
3063
|
+
be(r.end, "MM/DD/YYYY"),
|
|
3064
3064
|
r.duration.toString(),
|
|
3065
3065
|
r.progress.toString(),
|
|
3066
3066
|
r.type || "task",
|
|
@@ -3073,16 +3073,16 @@ Example: 3FS+10d`);
|
|
|
3073
3073
|
...a.map((r) => r.map((x) => x.replace(/\t/g, " ")).join(" "))
|
|
3074
3074
|
].join(`
|
|
3075
3075
|
`);
|
|
3076
|
-
|
|
3077
|
-
},
|
|
3076
|
+
St(l, "gantt-tasks.xls", "application/vnd.ms-excel");
|
|
3077
|
+
}, ar = (t, o) => {
|
|
3078
3078
|
const a = {
|
|
3079
3079
|
tasks: t,
|
|
3080
3080
|
links: o,
|
|
3081
3081
|
exported: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3082
3082
|
version: "1.0"
|
|
3083
3083
|
}, l = JSON.stringify(a, null, 2);
|
|
3084
|
-
|
|
3085
|
-
},
|
|
3084
|
+
St(l, "gantt-project.json", "application/json");
|
|
3085
|
+
}, or = (t) => {
|
|
3086
3086
|
const o = `
|
|
3087
3087
|
GANTT CHART PROJECT
|
|
3088
3088
|
Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
|
|
@@ -3090,15 +3090,15 @@ Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
|
|
|
3090
3090
|
Tasks:
|
|
3091
3091
|
${t.map((a, l) => `
|
|
3092
3092
|
${l + 1}. ${a.text}
|
|
3093
|
-
Start: ${
|
|
3094
|
-
End: ${
|
|
3093
|
+
Start: ${be(a.start, "MM/DD/YYYY")}
|
|
3094
|
+
End: ${be(a.end, "MM/DD/YYYY")}
|
|
3095
3095
|
Duration: ${a.duration} days
|
|
3096
3096
|
Progress: ${a.progress}%
|
|
3097
3097
|
${a.owner ? `Owner: ${a.owner}` : ""}
|
|
3098
3098
|
`).join(`
|
|
3099
3099
|
`)}
|
|
3100
3100
|
`.trim();
|
|
3101
|
-
|
|
3101
|
+
St(o, "gantt-report.txt", "text/plain"), alert("PDF export is a simplified text version. For full PDF with charts, a PDF library would be needed.");
|
|
3102
3102
|
}, nn = (t, o, a = "png") => {
|
|
3103
3103
|
if (!document.getElementById(t)) {
|
|
3104
3104
|
alert("Could not find Gantt chart element to export");
|
|
@@ -3109,7 +3109,7 @@ ${l + 1}. ${a.text}
|
|
|
3109
3109
|
return;
|
|
3110
3110
|
}
|
|
3111
3111
|
alert("Image export requires html2canvas library. Install with: npm install html2canvas");
|
|
3112
|
-
},
|
|
3112
|
+
}, St = (t, o, a) => {
|
|
3113
3113
|
const l = new Blob([t], { type: a }), r = URL.createObjectURL(l);
|
|
3114
3114
|
an(r, o), URL.revokeObjectURL(r);
|
|
3115
3115
|
}, an = (t, o) => {
|
|
@@ -3129,13 +3129,13 @@ ${l + 1}. ${a.text}
|
|
|
3129
3129
|
a(new Error("Invalid JSON file"));
|
|
3130
3130
|
}
|
|
3131
3131
|
}, l.onerror = () => a(new Error("Failed to read file")), l.readAsText(t);
|
|
3132
|
-
}),
|
|
3132
|
+
}), Sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3133
3133
|
__proto__: null,
|
|
3134
|
-
exportToCSV:
|
|
3135
|
-
exportToExcel:
|
|
3134
|
+
exportToCSV: rr,
|
|
3135
|
+
exportToExcel: nr,
|
|
3136
3136
|
exportToImage: nn,
|
|
3137
|
-
exportToJSON:
|
|
3138
|
-
exportToPDF:
|
|
3137
|
+
exportToJSON: ar,
|
|
3138
|
+
exportToPDF: or,
|
|
3139
3139
|
importFromJSON: on
|
|
3140
3140
|
}, Symbol.toStringTag, { value: "Module" })), sn = (t, o) => t.filter((a) => {
|
|
3141
3141
|
if (o.searchText) {
|
|
@@ -3239,7 +3239,7 @@ ${l + 1}. ${a.text}
|
|
|
3239
3239
|
start: "Start"
|
|
3240
3240
|
},
|
|
3241
3241
|
taskNameRequired: "Please enter task name"
|
|
3242
|
-
},
|
|
3242
|
+
}, jn = ({
|
|
3243
3243
|
tasks: t = [],
|
|
3244
3244
|
links: o = [],
|
|
3245
3245
|
config: a = {},
|
|
@@ -3249,36 +3249,36 @@ ${l + 1}. ${a.text}
|
|
|
3249
3249
|
onTaskUpdate: m,
|
|
3250
3250
|
onTaskCreate: i,
|
|
3251
3251
|
onTaskDelete: s,
|
|
3252
|
-
onLinkCreate:
|
|
3252
|
+
onLinkCreate: g,
|
|
3253
3253
|
onLinkDelete: c,
|
|
3254
|
-
baselines:
|
|
3254
|
+
baselines: y
|
|
3255
3255
|
}) => {
|
|
3256
|
-
const
|
|
3256
|
+
const S = { ...cn, ...l }, u = Q.useMemo(() => {
|
|
3257
3257
|
const d = {};
|
|
3258
|
-
return r.primary && (d["--wx-gantt-primary"] = r.primary), r.primarySelected && (d["--wx-gantt-primary-selected"] = r.primarySelected), r.success && (d["--wx-gantt-success"] = r.success), r.warning && (d["--wx-gantt-warning"] = r.warning), r.danger && (d["--wx-gantt-danger"] = r.danger), r.background && (d["--wx-gantt-background"] = r.background), r.backgroundAlt && (d["--wx-gantt-background-alt"] = r.backgroundAlt), r.backgroundHover && (d["--wx-gantt-background-hover"] = r.backgroundHover), r.selectColor && (d["--wx-gantt-select-color"] = r.selectColor), r.taskColor && (d["--wx-gantt-task-color"] = r.taskColor), r.taskFillColor && (d["--wx-gantt-task-fill-color"] = r.taskFillColor), r.projectColor && (d["--wx-gantt-project-color"] = r.projectColor), r.milestoneColor && (d["--wx-gantt-milestone-color"] = r.milestoneColor), r.fontColor && (d["--wx-gantt-font-color"] = r.fontColor), r.fontColorAlt && (d["--wx-gantt-font-color-alt"] = r.fontColorAlt), r.iconColor && (d["--wx-gantt-icon-color"] = r.iconColor), r.borderColor && (d["--wx-gantt-border-color"] = r.borderColor), r.fontFamily && (d["--wx-gantt-font-family"] = r.fontFamily), r.fontMono && (d["--wx-gantt-font-mono"] = r.fontMono), r.fontSize && (d["--wx-gantt-font-size"] = r.fontSize), r.fontWeight && (d["--wx-gantt-font-weight"] = String(r.fontWeight)), r.lineHeight && (d["--wx-gantt-line-height"] = String(r.lineHeight)), r.spacingXS && (d["--gantt-spacing-xs"] = r.spacingXS), r.spacingSM && (d["--gantt-spacing-sm"] = r.spacingSM), r.spacingMD && (d["--gantt-spacing-md"] = r.spacingMD), r.spacingLG && (d["--gantt-spacing-lg"] = r.spacingLG), r.customCSSVariables && Object.entries(r.customCSSVariables).forEach(([v,
|
|
3259
|
-
d[v.startsWith("--") ? v : `--${v}`] =
|
|
3258
|
+
return r.primary && (d["--wx-gantt-primary"] = r.primary), r.primarySelected && (d["--wx-gantt-primary-selected"] = r.primarySelected), r.success && (d["--wx-gantt-success"] = r.success), r.warning && (d["--wx-gantt-warning"] = r.warning), r.danger && (d["--wx-gantt-danger"] = r.danger), r.background && (d["--wx-gantt-background"] = r.background), r.backgroundAlt && (d["--wx-gantt-background-alt"] = r.backgroundAlt), r.backgroundHover && (d["--wx-gantt-background-hover"] = r.backgroundHover), r.selectColor && (d["--wx-gantt-select-color"] = r.selectColor), r.taskColor && (d["--wx-gantt-task-color"] = r.taskColor), r.taskFillColor && (d["--wx-gantt-task-fill-color"] = r.taskFillColor), r.projectColor && (d["--wx-gantt-project-color"] = r.projectColor), r.milestoneColor && (d["--wx-gantt-milestone-color"] = r.milestoneColor), r.fontColor && (d["--wx-gantt-font-color"] = r.fontColor), r.fontColorAlt && (d["--wx-gantt-font-color-alt"] = r.fontColorAlt), r.iconColor && (d["--wx-gantt-icon-color"] = r.iconColor), r.borderColor && (d["--wx-gantt-border-color"] = r.borderColor), r.fontFamily && (d["--wx-gantt-font-family"] = r.fontFamily), r.fontMono && (d["--wx-gantt-font-mono"] = r.fontMono), r.fontSize && (d["--wx-gantt-font-size"] = r.fontSize), r.fontWeight && (d["--wx-gantt-font-weight"] = String(r.fontWeight)), r.lineHeight && (d["--wx-gantt-line-height"] = String(r.lineHeight)), r.spacingXS && (d["--gantt-spacing-xs"] = r.spacingXS), r.spacingSM && (d["--gantt-spacing-sm"] = r.spacingSM), r.spacingMD && (d["--gantt-spacing-md"] = r.spacingMD), r.spacingLG && (d["--gantt-spacing-lg"] = r.spacingLG), r.customCSSVariables && Object.entries(r.customCSSVariables).forEach(([v, E]) => {
|
|
3259
|
+
d[v.startsWith("--") ? v : `--${v}`] = E;
|
|
3260
3260
|
}), d;
|
|
3261
3261
|
}, [r]), p = Array.isArray(t) ? t : [], b = Array.isArray(o) ? o : [], {
|
|
3262
3262
|
tasks: w,
|
|
3263
|
-
links:
|
|
3264
|
-
setTasks:
|
|
3263
|
+
links: j,
|
|
3264
|
+
setTasks: M,
|
|
3265
3265
|
setLinks: $,
|
|
3266
3266
|
undo: B,
|
|
3267
|
-
redo:
|
|
3267
|
+
redo: ae,
|
|
3268
3268
|
updateTask: X,
|
|
3269
|
-
createTask:
|
|
3270
|
-
deleteTask:
|
|
3271
|
-
saveState:
|
|
3272
|
-
} = Kr(p, b), [
|
|
3269
|
+
createTask: he,
|
|
3270
|
+
deleteTask: L,
|
|
3271
|
+
saveState: Z
|
|
3272
|
+
} = Kr(p, b), [U, D] = z(w), [W, oe] = z(null), [G, xe] = z(null), [$e, De] = z(!1), [I, Y] = z(void 0), [ue, ee] = z(void 0), [te, K] = z(!1), [f, k] = z(null), [F, P] = z(null), [N, se] = z(null), [re, Ee] = z(null), [ie, ke] = z(null), [_e, Fe] = z(1), [Se, Re] = z(() => y && y.size > 0 ? y : p.length > 0 ? rn(p) : /* @__PURE__ */ new Map());
|
|
3273
3273
|
Je(() => {
|
|
3274
|
-
|
|
3275
|
-
}, [
|
|
3276
|
-
const [
|
|
3274
|
+
y && y.size > 0 && Re(y);
|
|
3275
|
+
}, [y]);
|
|
3276
|
+
const [nt] = z(a.theme || "light"), [Be, jt] = z({
|
|
3277
3277
|
searchText: "",
|
|
3278
3278
|
status: "all",
|
|
3279
3279
|
priority: "all",
|
|
3280
3280
|
owner: ""
|
|
3281
|
-
}), ut =
|
|
3281
|
+
}), ut = Ve(null), We = Ve(null), Tt = Ve(null), pt = Ve(null), Pe = Ve(!1), Le = Ve(null), je = {
|
|
3282
3282
|
columns: a.columns || ln(l),
|
|
3283
3283
|
scales: dn,
|
|
3284
3284
|
readonly: !1,
|
|
@@ -3294,7 +3294,7 @@ ${l + 1}. ${a.text}
|
|
|
3294
3294
|
// Always enabled
|
|
3295
3295
|
weekends: !0,
|
|
3296
3296
|
holidays: [],
|
|
3297
|
-
theme:
|
|
3297
|
+
theme: nt,
|
|
3298
3298
|
locale: "en",
|
|
3299
3299
|
// Today and Project Start lines - enabled by default, labels visible by default
|
|
3300
3300
|
showTodayLine: a.showTodayLine !== !1,
|
|
@@ -3342,19 +3342,19 @@ ${l + 1}. ${a.text}
|
|
|
3342
3342
|
...a
|
|
3343
3343
|
};
|
|
3344
3344
|
Je(() => {
|
|
3345
|
-
const d = sn(w,
|
|
3346
|
-
D(((
|
|
3347
|
-
const
|
|
3348
|
-
if (!
|
|
3349
|
-
const ye =
|
|
3350
|
-
return ye && !ye.open && ye.type === "project" ? !0 :
|
|
3345
|
+
const d = sn(w, Be);
|
|
3346
|
+
D(((E) => {
|
|
3347
|
+
const O = [], V = (J) => {
|
|
3348
|
+
if (!J) return !1;
|
|
3349
|
+
const ye = E.find((le) => le.id === J);
|
|
3350
|
+
return ye && !ye.open && ye.type === "project" ? !0 : V(ye?.parent);
|
|
3351
3351
|
};
|
|
3352
|
-
return
|
|
3353
|
-
|
|
3354
|
-
}),
|
|
3352
|
+
return E.forEach((J) => {
|
|
3353
|
+
V(J.parent) || O.push(J);
|
|
3354
|
+
}), O;
|
|
3355
3355
|
})(d));
|
|
3356
|
-
}, [w,
|
|
3357
|
-
const
|
|
3356
|
+
}, [w, Be]);
|
|
3357
|
+
const Dt = Q.useMemo(() => {
|
|
3358
3358
|
if (!w || !Array.isArray(w)) return [];
|
|
3359
3359
|
try {
|
|
3360
3360
|
return Array.from(new Set(w.map((d) => d?.owner).filter(Boolean)));
|
|
@@ -3362,256 +3362,270 @@ ${l + 1}. ${a.text}
|
|
|
3362
3362
|
return console.warn("Error extracting owners:", d), [];
|
|
3363
3363
|
}
|
|
3364
3364
|
}, [w]), ht = (() => {
|
|
3365
|
-
const d =
|
|
3365
|
+
const d = U.length > 0 ? U : w;
|
|
3366
3366
|
if (d.length === 0) {
|
|
3367
|
-
const
|
|
3367
|
+
const J = /* @__PURE__ */ new Date();
|
|
3368
3368
|
return {
|
|
3369
|
-
start:
|
|
3370
|
-
end:
|
|
3369
|
+
start: tt(me(J, -30, "day")),
|
|
3370
|
+
end: tt(me(J, 60, "day"))
|
|
3371
3371
|
};
|
|
3372
3372
|
}
|
|
3373
|
-
const v = d.map((
|
|
3373
|
+
const v = d.map((J) => J.start.getTime()), E = d.map((J) => J.end.getTime()), O = new Date(Math.min(...v)), V = new Date(Math.max(...E));
|
|
3374
3374
|
return {
|
|
3375
|
-
start:
|
|
3376
|
-
end:
|
|
3375
|
+
start: tt(me(O, -7, "day")),
|
|
3376
|
+
end: tt(V)
|
|
3377
3377
|
};
|
|
3378
|
-
})(),
|
|
3379
|
-
|
|
3380
|
-
},
|
|
3381
|
-
if (
|
|
3378
|
+
})(), Lt = (d) => {
|
|
3379
|
+
oe(d);
|
|
3380
|
+
}, Mt = (d, v) => {
|
|
3381
|
+
if (je.readonly) return;
|
|
3382
3382
|
d.preventDefault();
|
|
3383
|
-
const
|
|
3384
|
-
|
|
3385
|
-
},
|
|
3386
|
-
if (!
|
|
3387
|
-
const d =
|
|
3383
|
+
const E = w.find((O) => O.id === v);
|
|
3384
|
+
E && ke({ x: d.clientX, y: d.clientY, task: E });
|
|
3385
|
+
}, Et = () => {
|
|
3386
|
+
if (!ie?.task) return;
|
|
3387
|
+
const d = ie.task, v = {
|
|
3388
3388
|
...d,
|
|
3389
3389
|
id: `task-${Date.now()}`,
|
|
3390
3390
|
text: `${d.text} (Copy)`,
|
|
3391
|
-
start:
|
|
3392
|
-
end:
|
|
3391
|
+
start: me(d.start, 7, "day"),
|
|
3392
|
+
end: me(d.end, 7, "day")
|
|
3393
3393
|
};
|
|
3394
|
-
|
|
3395
|
-
},
|
|
3396
|
-
if (!
|
|
3397
|
-
const v = { ...
|
|
3394
|
+
he(v), i && i(v);
|
|
3395
|
+
}, at = (d) => {
|
|
3396
|
+
if (!ie?.task) return;
|
|
3397
|
+
const v = { ...ie.task, type: d };
|
|
3398
3398
|
X(v), m && m(v);
|
|
3399
|
-
},
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3399
|
+
}, qe = Q.useCallback((d, v) => {
|
|
3400
|
+
let E = [];
|
|
3401
|
+
return v.filter((V) => V.parent === d).forEach((V) => {
|
|
3402
|
+
E.push(V.id), E = [...E, ...qe(V.id, v)];
|
|
3403
|
+
}), E;
|
|
3404
|
+
}, []), ft = (d, v) => (d ?? null) === (v ?? null), $t = (d, v, E, O) => {
|
|
3405
|
+
if (!je.readonly)
|
|
3406
|
+
if (O === "reorder") {
|
|
3407
|
+
const V = U.findIndex((ye) => ye.id === d), J = qe(d, w);
|
|
3408
|
+
se({ id: d, initialIndex: V, currentX: v, currentY: E, descendantIds: J }), document.body.classList.add("gantt-dragging");
|
|
3409
3409
|
} else
|
|
3410
3410
|
P(d);
|
|
3411
|
-
},
|
|
3412
|
-
if (
|
|
3413
|
-
const d = w.find((
|
|
3411
|
+
}, ot = () => {
|
|
3412
|
+
if (N && re) {
|
|
3413
|
+
const d = w.find((E) => E.id === N.id), v = w.find((E) => E.id === re.taskId);
|
|
3414
3414
|
if (d && v && d.id !== v.id) {
|
|
3415
|
-
const
|
|
3416
|
-
if (!
|
|
3417
|
-
const
|
|
3418
|
-
|
|
3419
|
-
const ye =
|
|
3420
|
-
let
|
|
3421
|
-
if (
|
|
3422
|
-
const
|
|
3423
|
-
|
|
3424
|
-
} else if (
|
|
3425
|
-
const
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3415
|
+
const E = [d.id, ...N.descendantIds];
|
|
3416
|
+
if (!E.includes(v.id)) {
|
|
3417
|
+
const O = [...w], V = (re.position === "inside" ? v.id : v.parent) ?? void 0, J = O.findIndex((C) => C.id === d.id);
|
|
3418
|
+
J !== -1 && (O[J] = { ...O[J], parent: V });
|
|
3419
|
+
const ye = O.filter((C) => E.includes(C.id)), le = O.filter((C) => !E.includes(C.id));
|
|
3420
|
+
let n = le.findIndex((C) => C.id === v.id);
|
|
3421
|
+
if (re.position === "inside") {
|
|
3422
|
+
const C = [v.id, ...qe(v.id, le)], ne = C[C.length - 1];
|
|
3423
|
+
n = le.findIndex((de) => de.id === ne) + 1;
|
|
3424
|
+
} else if (re.position === "below") {
|
|
3425
|
+
const C = qe(v.id, le);
|
|
3426
|
+
C.length > 0 ? n = le.findIndex((ne) => ne.id === C[C.length - 1]) + 1 : n++;
|
|
3427
|
+
}
|
|
3428
|
+
n < 0 && (n = le.length);
|
|
3429
|
+
const h = { tasks: [...w], links: [...j] };
|
|
3430
|
+
le.splice(n, 0, ...ye), M(le), Z("task_update", h, { tasks: le, links: j });
|
|
3431
|
+
const R = w.filter((C) => ft(C.parent, d.parent)).findIndex((C) => C.id === d.id) + 1, q = le.filter((C) => ft(C.parent, V)).findIndex((C) => C.id === d.id) + 1, A = {
|
|
3432
|
+
currentSequenceId: R,
|
|
3433
|
+
targetSequenceId: q,
|
|
3434
|
+
targetStageId: V ?? null
|
|
3435
|
+
}, _ = le.find((C) => C.id === d.id);
|
|
3436
|
+
if (_ && m) {
|
|
3437
|
+
const C = {
|
|
3438
|
+
..._,
|
|
3439
|
+
sequence_id: q,
|
|
3440
|
+
stage_id: V ?? null
|
|
3441
|
+
};
|
|
3442
|
+
m(C, A);
|
|
3432
3443
|
}
|
|
3433
|
-
const ze = { tasks: [...w], links: [...S] };
|
|
3434
|
-
te.splice(ge, 0, ...ye), L(te), q("task_update", ze, { tasks: te, links: S });
|
|
3435
|
-
const yt = U + 1, n = te.findIndex((E) => E.id === d.id) + 1, f = {
|
|
3436
|
-
currentSequenceId: yt,
|
|
3437
|
-
targetSequenceId: n,
|
|
3438
|
-
targetStageId: ie ?? null
|
|
3439
|
-
}, T = te.find((E) => E.id === d.id);
|
|
3440
|
-
T && m && m(T, f);
|
|
3441
3444
|
}
|
|
3442
3445
|
}
|
|
3443
3446
|
}
|
|
3444
|
-
P(null),
|
|
3445
|
-
},
|
|
3446
|
-
|
|
3447
|
-
const
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
const
|
|
3455
|
-
let
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3447
|
+
P(null), se(null), Ee(null), document.body.classList.remove("gantt-dragging");
|
|
3448
|
+
}, Ge = Ve(null), Ie = Q.useCallback((d) => {
|
|
3449
|
+
if (N) {
|
|
3450
|
+
const { clientX: v, clientY: E } = d;
|
|
3451
|
+
Ge.current && cancelAnimationFrame(Ge.current), Ge.current = requestAnimationFrame(() => {
|
|
3452
|
+
const O = je.rowHeight || 44, V = We.current?.querySelector(".gantt-grid-body");
|
|
3453
|
+
if (!V || U.length === 0) {
|
|
3454
|
+
Ee(null);
|
|
3455
|
+
return;
|
|
3456
|
+
}
|
|
3457
|
+
const J = V.getBoundingClientRect(), ye = E - J.top + V.scrollTop;
|
|
3458
|
+
let le = Math.floor(ye / O);
|
|
3459
|
+
le = Math.max(0, Math.min(le, U.length - 1));
|
|
3460
|
+
const n = U[le];
|
|
3461
|
+
if (n) {
|
|
3462
|
+
if (n.id === N.id || N.descendantIds.includes(n.id)) {
|
|
3463
|
+
Ee(null), se((H) => H ? { ...H, currentX: v, currentY: E } : null);
|
|
3464
|
+
return;
|
|
3465
|
+
}
|
|
3466
|
+
const T = ye - le * O;
|
|
3467
|
+
let R = "above";
|
|
3468
|
+
n.type !== "milestone" ? T < O * 0.3 ? R = "above" : T > O * 0.7 ? R = "below" : R = "inside" : R = T < O / 2 ? "above" : "below", Ee({ taskId: n.id, position: R });
|
|
3469
|
+
}
|
|
3470
|
+
se((h) => h ? { ...h, currentX: v, currentY: E } : null);
|
|
3471
|
+
});
|
|
3472
|
+
}
|
|
3473
|
+
}, [N, U, je.rowHeight]), Ze = () => {
|
|
3474
|
+
N && ot();
|
|
3475
|
+
}, st = (d, v) => {
|
|
3476
|
+
const E = {
|
|
3464
3477
|
...d,
|
|
3465
3478
|
id: `task-${Date.now()}`,
|
|
3466
3479
|
parent: v
|
|
3467
3480
|
// Set parent if provided (for subtasks)
|
|
3468
3481
|
};
|
|
3469
|
-
|
|
3470
|
-
const
|
|
3471
|
-
taskId:
|
|
3472
|
-
start: new Date(
|
|
3482
|
+
he(E);
|
|
3483
|
+
const O = {
|
|
3484
|
+
taskId: E.id,
|
|
3485
|
+
start: new Date(E.start),
|
|
3473
3486
|
// Capture original start date
|
|
3474
|
-
end: new Date(
|
|
3487
|
+
end: new Date(E.end)
|
|
3475
3488
|
// Capture original end date
|
|
3476
3489
|
};
|
|
3477
|
-
|
|
3478
|
-
const
|
|
3479
|
-
return
|
|
3480
|
-
}), i && i(
|
|
3481
|
-
},
|
|
3490
|
+
Re((V) => {
|
|
3491
|
+
const J = new Map(V);
|
|
3492
|
+
return J.set(E.id, O), J;
|
|
3493
|
+
}), i && i(E);
|
|
3494
|
+
}, He = (d) => {
|
|
3482
3495
|
X(d), m && m(d);
|
|
3483
|
-
},
|
|
3484
|
-
|
|
3485
|
-
const
|
|
3486
|
-
return
|
|
3496
|
+
}, mt = (d) => {
|
|
3497
|
+
L(d), Re((v) => {
|
|
3498
|
+
const E = new Map(v);
|
|
3499
|
+
return E.delete(d), E;
|
|
3487
3500
|
}), s && s(d);
|
|
3488
|
-
},
|
|
3489
|
-
const
|
|
3490
|
-
$([...
|
|
3491
|
-
},
|
|
3492
|
-
const v =
|
|
3501
|
+
}, it = (d, v, E, O) => {
|
|
3502
|
+
const V = { id: `link-${Date.now()}`, source: d, target: v, type: E, lag: O };
|
|
3503
|
+
$([...j, V]), g && g(V);
|
|
3504
|
+
}, xt = (d) => {
|
|
3505
|
+
const v = j.filter((E) => E.id !== d);
|
|
3493
3506
|
$(v), c && c(d);
|
|
3494
3507
|
};
|
|
3495
3508
|
Je(() => {
|
|
3496
|
-
const d = new Map(
|
|
3509
|
+
const d = new Map(Se);
|
|
3497
3510
|
let v = !1;
|
|
3498
|
-
w.forEach((
|
|
3499
|
-
|
|
3500
|
-
taskId:
|
|
3501
|
-
start: new Date(
|
|
3511
|
+
w.forEach((O) => {
|
|
3512
|
+
Se.has(O.id) || (d.set(O.id, {
|
|
3513
|
+
taskId: O.id,
|
|
3514
|
+
start: new Date(O.start),
|
|
3502
3515
|
// Capture original start date
|
|
3503
|
-
end: new Date(
|
|
3516
|
+
end: new Date(O.end)
|
|
3504
3517
|
// Capture original end date
|
|
3505
3518
|
}), v = !0);
|
|
3506
3519
|
});
|
|
3507
|
-
const
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
}), v &&
|
|
3520
|
+
const E = new Set(w.map((O) => O.id));
|
|
3521
|
+
Se.forEach((O, V) => {
|
|
3522
|
+
E.has(V) || (d.delete(V), v = !0);
|
|
3523
|
+
}), v && Re(d);
|
|
3511
3524
|
}, [w]), Je(() => {
|
|
3512
3525
|
const d = (v) => {
|
|
3513
|
-
(v.ctrlKey || v.metaKey) && (v.key === "z" && !v.shiftKey ? (v.preventDefault(), B()) : (v.key === "y" || v.key === "z" && v.shiftKey) && (v.preventDefault(),
|
|
3526
|
+
(v.ctrlKey || v.metaKey) && (v.key === "z" && !v.shiftKey ? (v.preventDefault(), B()) : (v.key === "y" || v.key === "z" && v.shiftKey) && (v.preventDefault(), ae()));
|
|
3514
3527
|
};
|
|
3515
3528
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
3516
|
-
}, [B,
|
|
3517
|
-
const d =
|
|
3529
|
+
}, [B, ae]), Je(() => {
|
|
3530
|
+
const d = We.current?.querySelector(".gantt-grid-body"), v = ut.current?.querySelector(".gantt-timeline-body");
|
|
3518
3531
|
if (!d || !v) return;
|
|
3519
|
-
const
|
|
3520
|
-
|
|
3521
|
-
|
|
3532
|
+
const E = () => {
|
|
3533
|
+
Pe.current || (Pe.current = !0, v.scrollTop = d.scrollTop, Le.current && clearTimeout(Le.current), Le.current = window.setTimeout(() => {
|
|
3534
|
+
Pe.current = !1;
|
|
3522
3535
|
}, 150));
|
|
3523
|
-
},
|
|
3524
|
-
|
|
3525
|
-
|
|
3536
|
+
}, O = () => {
|
|
3537
|
+
Pe.current || (Pe.current = !0, d.scrollTop = v.scrollTop, Le.current && clearTimeout(Le.current), Le.current = window.setTimeout(() => {
|
|
3538
|
+
Pe.current = !1;
|
|
3526
3539
|
}, 150));
|
|
3527
3540
|
};
|
|
3528
|
-
return d.addEventListener("scroll",
|
|
3529
|
-
d.removeEventListener("scroll",
|
|
3541
|
+
return d.addEventListener("scroll", E, { passive: !0 }), v.addEventListener("scroll", O, { passive: !0 }), () => {
|
|
3542
|
+
d.removeEventListener("scroll", E), v.removeEventListener("scroll", O), Le.current && clearTimeout(Le.current);
|
|
3530
3543
|
};
|
|
3531
|
-
}, [
|
|
3532
|
-
const
|
|
3544
|
+
}, [U]);
|
|
3545
|
+
const gt = {
|
|
3533
3546
|
height: a.containerHeight || "100%",
|
|
3534
3547
|
minHeight: a.containerMinHeight || "400px"
|
|
3535
|
-
},
|
|
3548
|
+
}, yt = a.gridWidth ? { "--gantt-grid-width": a.gridWidth } : {};
|
|
3536
3549
|
return /* @__PURE__ */ e.jsxs(
|
|
3537
3550
|
"div",
|
|
3538
3551
|
{
|
|
3539
|
-
className: `gantt-page-wrapper theme-${
|
|
3540
|
-
style: { ...
|
|
3552
|
+
className: `gantt-page-wrapper theme-${nt}`,
|
|
3553
|
+
style: { ...gt, ...u },
|
|
3541
3554
|
children: [
|
|
3542
|
-
|
|
3555
|
+
S.showHeader && /* @__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: S.headerTitle }) }) }),
|
|
3543
3556
|
/* @__PURE__ */ e.jsxs(
|
|
3544
3557
|
"div",
|
|
3545
3558
|
{
|
|
3546
|
-
className: `gantt-container theme-${
|
|
3547
|
-
|
|
3559
|
+
className: `gantt-container theme-${je.theme}`,
|
|
3560
|
+
ref: pt,
|
|
3561
|
+
style: yt,
|
|
3548
3562
|
children: [
|
|
3549
3563
|
/* @__PURE__ */ e.jsx(
|
|
3550
3564
|
Wr,
|
|
3551
3565
|
{
|
|
3552
|
-
zoomLevel:
|
|
3553
|
-
setZoomLevel:
|
|
3566
|
+
zoomLevel: _e,
|
|
3567
|
+
setZoomLevel: Fe,
|
|
3554
3568
|
onExport: (d) => {
|
|
3555
|
-
d === "csv" &&
|
|
3569
|
+
d === "csv" && rr(w), d === "excel" && nr(w), d === "json" && ar(w, j), d === "pdf" && or(w);
|
|
3556
3570
|
},
|
|
3557
3571
|
onFilterChange: (d) => jt(d),
|
|
3558
|
-
owners:
|
|
3572
|
+
owners: Dt || [],
|
|
3559
3573
|
onAddTask: (d) => {
|
|
3560
3574
|
if (d) {
|
|
3561
|
-
const v = w.find((
|
|
3562
|
-
Y(d),
|
|
3575
|
+
const v = w.find((E) => E.id === d);
|
|
3576
|
+
Y(d), ee(v?.text);
|
|
3563
3577
|
} else
|
|
3564
|
-
Y(void 0),
|
|
3565
|
-
|
|
3578
|
+
Y(void 0), ee(void 0);
|
|
3579
|
+
De(!0);
|
|
3566
3580
|
},
|
|
3567
|
-
uiConfig:
|
|
3581
|
+
uiConfig: S,
|
|
3568
3582
|
iconConfig: x,
|
|
3569
3583
|
styleConfig: r
|
|
3570
3584
|
}
|
|
3571
3585
|
),
|
|
3572
|
-
/* @__PURE__ */ e.jsxs("div", { className: "gantt-layout", ref:
|
|
3586
|
+
/* @__PURE__ */ e.jsxs("div", { className: "gantt-layout", ref: Tt, onMouseMove: Ie, onMouseUp: Ze, onMouseLeave: Ze, children: [
|
|
3573
3587
|
/* @__PURE__ */ e.jsx(
|
|
3574
|
-
|
|
3588
|
+
Kt,
|
|
3575
3589
|
{
|
|
3576
|
-
ref:
|
|
3577
|
-
tasks:
|
|
3578
|
-
columns:
|
|
3590
|
+
ref: We,
|
|
3591
|
+
tasks: U,
|
|
3592
|
+
columns: je.columns || [],
|
|
3579
3593
|
selectedTask: W,
|
|
3580
|
-
onTaskClick:
|
|
3581
|
-
onTaskContextMenu:
|
|
3582
|
-
onTaskUpdate:
|
|
3583
|
-
onTaskDragStart:
|
|
3594
|
+
onTaskClick: Lt,
|
|
3595
|
+
onTaskContextMenu: Mt,
|
|
3596
|
+
onTaskUpdate: He,
|
|
3597
|
+
onTaskDragStart: $t,
|
|
3584
3598
|
onAddTask: (d) => {
|
|
3585
3599
|
if (d) {
|
|
3586
|
-
const v = w.find((
|
|
3587
|
-
Y(d),
|
|
3600
|
+
const v = w.find((E) => E.id === d);
|
|
3601
|
+
Y(d), ee(v?.text);
|
|
3588
3602
|
} else
|
|
3589
|
-
Y(void 0),
|
|
3590
|
-
|
|
3603
|
+
Y(void 0), ee(void 0);
|
|
3604
|
+
De(!0);
|
|
3591
3605
|
},
|
|
3592
|
-
onAddDependency:
|
|
3593
|
-
onRemoveDependency:
|
|
3606
|
+
onAddDependency: it,
|
|
3607
|
+
onRemoveDependency: xt,
|
|
3594
3608
|
onDependencyClick: (d) => {
|
|
3595
|
-
const v = w.find((
|
|
3596
|
-
v && (k(v),
|
|
3609
|
+
const v = w.find((E) => E.id === d);
|
|
3610
|
+
v && (k(v), K(!0));
|
|
3597
3611
|
},
|
|
3598
|
-
links:
|
|
3612
|
+
links: j,
|
|
3599
3613
|
allTasks: w,
|
|
3600
|
-
dropIndicator:
|
|
3601
|
-
reorderTask:
|
|
3614
|
+
dropIndicator: re,
|
|
3615
|
+
reorderTask: N,
|
|
3602
3616
|
iconConfig: x,
|
|
3603
3617
|
styleConfig: r
|
|
3604
3618
|
}
|
|
3605
3619
|
),
|
|
3606
3620
|
/* @__PURE__ */ e.jsx(
|
|
3607
|
-
|
|
3621
|
+
er,
|
|
3608
3622
|
{
|
|
3609
3623
|
ref: ut,
|
|
3610
|
-
tasks:
|
|
3611
|
-
links:
|
|
3624
|
+
tasks: U,
|
|
3625
|
+
links: j,
|
|
3612
3626
|
range: ht,
|
|
3613
|
-
scales:
|
|
3614
|
-
config:
|
|
3627
|
+
scales: je.scales,
|
|
3628
|
+
config: je,
|
|
3615
3629
|
selectedTask: W,
|
|
3616
3630
|
draggedTask: F,
|
|
3617
3631
|
onTaskClick: () => {
|
|
@@ -3621,121 +3635,103 @@ ${l + 1}. ${a.text}
|
|
|
3621
3635
|
onTaskDragEnd: () => {
|
|
3622
3636
|
},
|
|
3623
3637
|
onTaskUpdate: (d, v) => {
|
|
3624
|
-
const
|
|
3625
|
-
|
|
3638
|
+
const E = w.find((O) => O.id === d);
|
|
3639
|
+
E && He({ ...E, ...v });
|
|
3626
3640
|
},
|
|
3627
|
-
zoomLevel:
|
|
3628
|
-
baselines:
|
|
3641
|
+
zoomLevel: _e,
|
|
3642
|
+
baselines: Se
|
|
3629
3643
|
}
|
|
3630
3644
|
)
|
|
3631
3645
|
] }),
|
|
3632
|
-
|
|
3646
|
+
$e && /* @__PURE__ */ e.jsx(
|
|
3633
3647
|
Ur,
|
|
3634
3648
|
{
|
|
3635
|
-
onCreateTask:
|
|
3649
|
+
onCreateTask: st,
|
|
3636
3650
|
onClose: () => {
|
|
3637
|
-
|
|
3651
|
+
De(!1), Y(void 0), ee(void 0);
|
|
3638
3652
|
},
|
|
3639
|
-
uiConfig:
|
|
3640
|
-
parentId:
|
|
3641
|
-
parentTaskName:
|
|
3653
|
+
uiConfig: S,
|
|
3654
|
+
parentId: I,
|
|
3655
|
+
parentTaskName: ue,
|
|
3642
3656
|
styleConfig: r
|
|
3643
3657
|
}
|
|
3644
3658
|
),
|
|
3645
|
-
|
|
3646
|
-
|
|
3659
|
+
G && /* @__PURE__ */ e.jsx(Jr, { task: G, onUpdate: He, onDelete: mt, onClose: () => xe(null), uiConfig: S, styleConfig: r }),
|
|
3660
|
+
te && f && /* @__PURE__ */ e.jsx(
|
|
3647
3661
|
Gr,
|
|
3648
3662
|
{
|
|
3649
|
-
task:
|
|
3663
|
+
task: f,
|
|
3650
3664
|
allTasks: w,
|
|
3651
|
-
links:
|
|
3652
|
-
onAddDependency:
|
|
3653
|
-
onRemoveDependency:
|
|
3654
|
-
onTaskUpdate:
|
|
3665
|
+
links: j,
|
|
3666
|
+
onAddDependency: it,
|
|
3667
|
+
onRemoveDependency: xt,
|
|
3668
|
+
onTaskUpdate: He,
|
|
3655
3669
|
onClose: () => {
|
|
3656
|
-
|
|
3670
|
+
K(!1), k(null);
|
|
3657
3671
|
},
|
|
3658
3672
|
styleConfig: r
|
|
3659
3673
|
}
|
|
3660
3674
|
),
|
|
3661
|
-
|
|
3662
|
-
/* @__PURE__ */ e.jsx("div", { className: "gantt-context-menu-overlay", onClick: () =>
|
|
3663
|
-
d.preventDefault(),
|
|
3675
|
+
ie && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3676
|
+
/* @__PURE__ */ e.jsx("div", { className: "gantt-context-menu-overlay", onClick: () => ke(null), onContextMenu: (d) => {
|
|
3677
|
+
d.preventDefault(), ke(null);
|
|
3664
3678
|
} }),
|
|
3665
3679
|
/* @__PURE__ */ e.jsx(
|
|
3666
3680
|
Zr,
|
|
3667
3681
|
{
|
|
3668
|
-
x:
|
|
3669
|
-
y:
|
|
3670
|
-
task:
|
|
3682
|
+
x: ie.x,
|
|
3683
|
+
y: ie.y,
|
|
3684
|
+
task: ie.task,
|
|
3671
3685
|
onEdit: () => {
|
|
3672
|
-
|
|
3686
|
+
ie.task && xe(ie.task);
|
|
3673
3687
|
},
|
|
3674
3688
|
onDelete: () => {
|
|
3675
|
-
|
|
3689
|
+
ie.task && mt(ie.task.id);
|
|
3676
3690
|
},
|
|
3677
|
-
onCopy:
|
|
3691
|
+
onCopy: Et,
|
|
3678
3692
|
onDependencies: () => {
|
|
3679
|
-
|
|
3693
|
+
ie.task && (k(ie.task), K(!0));
|
|
3680
3694
|
},
|
|
3681
|
-
onConvertToMilestone: () =>
|
|
3682
|
-
onConvertToTask: () =>
|
|
3683
|
-
onConvertToProject: () =>
|
|
3684
|
-
onClose: () =>
|
|
3695
|
+
onConvertToMilestone: () => at("milestone"),
|
|
3696
|
+
onConvertToTask: () => at("task"),
|
|
3697
|
+
onConvertToProject: () => at("project"),
|
|
3698
|
+
onClose: () => ke(null),
|
|
3685
3699
|
onAutoSchedule: () => {
|
|
3686
|
-
const d =
|
|
3687
|
-
|
|
3700
|
+
const d = tr(w, j, { mode: "forward" });
|
|
3701
|
+
M(d), ke(null);
|
|
3688
3702
|
},
|
|
3689
3703
|
iconConfig: x,
|
|
3690
3704
|
styleConfig: r
|
|
3691
3705
|
}
|
|
3692
3706
|
)
|
|
3693
3707
|
] }),
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
v.text,
|
|
3722
|
-
A.descendantIds.length > 0 && /* @__PURE__ */ e.jsxs("span", { children: [
|
|
3723
|
-
" +",
|
|
3724
|
-
A.descendantIds.length,
|
|
3725
|
-
" subtasks"
|
|
3726
|
-
] })
|
|
3727
|
-
] })
|
|
3728
|
-
] });
|
|
3729
|
-
case "start":
|
|
3730
|
-
return we(v.start, "DD MMM YYYY");
|
|
3731
|
-
case "duration":
|
|
3732
|
-
return `${v.duration}`;
|
|
3733
|
-
default:
|
|
3734
|
-
return v[d.name] || "";
|
|
3735
|
-
}
|
|
3736
|
-
})() }, `ghost-${d.name}`))
|
|
3737
|
-
}
|
|
3738
|
-
)
|
|
3708
|
+
N && (() => {
|
|
3709
|
+
const d = w.find((n) => n.id === N.id);
|
|
3710
|
+
if (!d) return null;
|
|
3711
|
+
const v = Number.isFinite(N.currentX) ? N.currentX : 0, E = Number.isFinite(N.currentY) ? N.currentY : 0, O = je.rowHeight || 48, J = pt.current?.getBoundingClientRect(), ye = J ? v - J.left + 12 : v + 12, le = J ? E - J.top + 12 : E + 12;
|
|
3712
|
+
return /* @__PURE__ */ e.jsxs(
|
|
3713
|
+
"div",
|
|
3714
|
+
{
|
|
3715
|
+
className: "gantt-drag-preview",
|
|
3716
|
+
style: {
|
|
3717
|
+
height: O,
|
|
3718
|
+
top: le,
|
|
3719
|
+
left: ye,
|
|
3720
|
+
position: "absolute",
|
|
3721
|
+
pointerEvents: "none",
|
|
3722
|
+
zIndex: 9999,
|
|
3723
|
+
maxWidth: "420px"
|
|
3724
|
+
},
|
|
3725
|
+
children: [
|
|
3726
|
+
/* @__PURE__ */ e.jsx("span", { className: "gantt-drag-preview-name", title: d.text, children: d.text }),
|
|
3727
|
+
N.descendantIds.length > 0 && /* @__PURE__ */ e.jsxs("span", { className: "gantt-drag-preview-count", children: [
|
|
3728
|
+
"+",
|
|
3729
|
+
N.descendantIds.length
|
|
3730
|
+
] })
|
|
3731
|
+
]
|
|
3732
|
+
}
|
|
3733
|
+
);
|
|
3734
|
+
})()
|
|
3739
3735
|
]
|
|
3740
3736
|
}
|
|
3741
3737
|
)
|
|
@@ -3752,45 +3748,45 @@ ${l + 1}. ${a.text}
|
|
|
3752
3748
|
const m = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = (u, p = /* @__PURE__ */ new Set()) => {
|
|
3753
3749
|
if (p.has(u)) return;
|
|
3754
3750
|
p.add(u);
|
|
3755
|
-
const b = t.find((
|
|
3751
|
+
const b = t.find((j) => j.id === u);
|
|
3756
3752
|
if (!b) return;
|
|
3757
3753
|
const w = x.get(u) || [];
|
|
3758
3754
|
if (w.length === 0)
|
|
3759
3755
|
m.set(u, 0), i.set(u, b.duration);
|
|
3760
3756
|
else {
|
|
3761
|
-
let
|
|
3762
|
-
w.forEach((
|
|
3763
|
-
s(
|
|
3764
|
-
const $ = i.get(
|
|
3765
|
-
|
|
3766
|
-
}), m.set(u,
|
|
3757
|
+
let j = 0;
|
|
3758
|
+
w.forEach((M) => {
|
|
3759
|
+
s(M, p);
|
|
3760
|
+
const $ = i.get(M) || 0;
|
|
3761
|
+
j = Math.max(j, $);
|
|
3762
|
+
}), m.set(u, j), i.set(u, j + b.duration);
|
|
3767
3763
|
}
|
|
3768
3764
|
};
|
|
3769
3765
|
t.forEach((u) => s(u.id));
|
|
3770
|
-
const
|
|
3766
|
+
const g = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), y = Math.max(...Array.from(i.values())), S = (u, p = /* @__PURE__ */ new Set()) => {
|
|
3771
3767
|
if (p.has(u)) return;
|
|
3772
3768
|
p.add(u);
|
|
3773
|
-
const b = t.find((
|
|
3769
|
+
const b = t.find((j) => j.id === u);
|
|
3774
3770
|
if (!b) return;
|
|
3775
3771
|
const w = r.get(u) || [];
|
|
3776
3772
|
if (w.length === 0)
|
|
3777
|
-
c.set(u,
|
|
3773
|
+
c.set(u, y), g.set(u, y - b.duration);
|
|
3778
3774
|
else {
|
|
3779
|
-
let
|
|
3780
|
-
w.forEach((
|
|
3781
|
-
|
|
3782
|
-
const $ =
|
|
3783
|
-
|
|
3784
|
-
}), c.set(u,
|
|
3775
|
+
let j = 1 / 0;
|
|
3776
|
+
w.forEach((M) => {
|
|
3777
|
+
S(M, p);
|
|
3778
|
+
const $ = g.get(M) || 0;
|
|
3779
|
+
j = Math.min(j, $);
|
|
3780
|
+
}), c.set(u, j), g.set(u, j - b.duration);
|
|
3785
3781
|
}
|
|
3786
3782
|
};
|
|
3787
|
-
return t.forEach((u) =>
|
|
3788
|
-
const p = m.get(u.id) || 0, w = (
|
|
3783
|
+
return t.forEach((u) => S(u.id)), t.forEach((u) => {
|
|
3784
|
+
const p = m.get(u.id) || 0, w = (g.get(u.id) || 0) - p;
|
|
3789
3785
|
l.set(u.id, w), Math.abs(w) < 0.01 && a.add(u.id);
|
|
3790
3786
|
}), {
|
|
3791
3787
|
criticalTasks: a,
|
|
3792
3788
|
taskFloats: l,
|
|
3793
|
-
projectDuration:
|
|
3789
|
+
projectDuration: y
|
|
3794
3790
|
};
|
|
3795
3791
|
}, pn = (t, o) => o.criticalTasks.has(t), hn = (t, o) => o.taskFloats.get(t) || 0, Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3796
3792
|
__proto__: null,
|
|
@@ -3800,27 +3796,27 @@ ${l + 1}. ${a.text}
|
|
|
3800
3796
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3801
3797
|
export {
|
|
3802
3798
|
vn as AutoScheduler,
|
|
3803
|
-
|
|
3799
|
+
er as Chart,
|
|
3804
3800
|
Tn as CriticalPath,
|
|
3805
3801
|
Gr as DependencyEditor,
|
|
3806
|
-
|
|
3802
|
+
Sn as ExportUtils,
|
|
3807
3803
|
Br as FilterSearch,
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3804
|
+
jn as Gantt,
|
|
3805
|
+
Kt as Grid,
|
|
3806
|
+
Ir as TaskBar,
|
|
3811
3807
|
Ur as TaskCreator,
|
|
3812
3808
|
Jr as TaskEditor,
|
|
3813
|
-
|
|
3809
|
+
Qt as Timeline,
|
|
3814
3810
|
Wr as Toolbar,
|
|
3815
|
-
|
|
3811
|
+
me as addToDate,
|
|
3816
3812
|
sn as applyFilters,
|
|
3817
3813
|
wn as calculateDuration,
|
|
3818
3814
|
rn as createBaseline,
|
|
3819
|
-
|
|
3820
|
-
|
|
3815
|
+
be as formatDate,
|
|
3816
|
+
wt as getDaysBetween,
|
|
3821
3817
|
bn as getEndOfDay,
|
|
3822
3818
|
Rr as getHoursBetween,
|
|
3823
|
-
|
|
3819
|
+
tt as getStartOfDay,
|
|
3824
3820
|
Wt as isHoliday,
|
|
3825
3821
|
Bt as isWeekend,
|
|
3826
3822
|
Kr as useUndoRedo
|