schedulant 2.0.8 → 2.0.9
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/schedulant.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as a, Fragment as
|
|
1
|
+
import { jsx as a, Fragment as At, jsxs as O } from "react/jsx-runtime";
|
|
2
2
|
import * as ie from "react";
|
|
3
|
-
import { createContext as
|
|
3
|
+
import { createContext as bt, useReducer as Mt, useEffect as N, useContext as wt, useRef as k, useCallback as C, useState as re, useMemo as F, memo as ae, useLayoutEffect as Et } from "react";
|
|
4
4
|
import E from "dayjs";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { Dropdown as Z, Space as
|
|
5
|
+
import Ct from "dayjs/plugin/weekYear";
|
|
6
|
+
import Dt from "dayjs/plugin/weekOfYear";
|
|
7
|
+
import Tt from "dayjs/plugin/quarterOfYear";
|
|
8
|
+
import Rt from "dayjs/plugin/isSameOrBefore";
|
|
9
|
+
import { Dropdown as Z, Space as kt } from "antd";
|
|
10
10
|
import X from "@ant-design/icons/lib/components/Icon";
|
|
11
|
-
import { PlusSquareOutlined as
|
|
12
|
-
import { useSortable as
|
|
13
|
-
import { useSensors as
|
|
14
|
-
import { restrictToVerticalAxis as
|
|
15
|
-
import { flushSync as
|
|
11
|
+
import { PlusSquareOutlined as xt, MinusSquareOutlined as Ot } from "@ant-design/icons";
|
|
12
|
+
import { useSortable as It, SortableContext as Pt, verticalListSortingStrategy as Lt } from "@dnd-kit/sortable";
|
|
13
|
+
import { useSensors as Nt, useSensor as _e, PointerSensor as Yt, KeyboardSensor as _t, DndContext as Wt, closestCenter as Ht, DragOverlay as zt } from "@dnd-kit/core";
|
|
14
|
+
import { restrictToVerticalAxis as Vt } from "@dnd-kit/modifiers";
|
|
15
|
+
import { flushSync as Ft } from "react-dom";
|
|
16
16
|
const de = {
|
|
17
17
|
EXPAND_RESOURCE: "EXPAND_RESOURCE",
|
|
18
18
|
COLLAPSE_RESOURCE: "COLLAPSE_RESOURCE",
|
|
19
19
|
SET_RESOURCE_AREA_WIDTH: "SET_RESOURCE_AREA_WIDTH"
|
|
20
|
-
},
|
|
20
|
+
}, dt = "schedulant.state", Bt = () => {
|
|
21
21
|
try {
|
|
22
|
-
const t = localStorage.getItem(
|
|
22
|
+
const t = localStorage.getItem(dt);
|
|
23
23
|
if (t)
|
|
24
24
|
return JSON.parse(t);
|
|
25
25
|
} catch {
|
|
@@ -29,7 +29,7 @@ const de = {
|
|
|
29
29
|
collapseIds: [],
|
|
30
30
|
resourceAreaWidth: "20%"
|
|
31
31
|
};
|
|
32
|
-
},
|
|
32
|
+
}, qt = (t, e) => {
|
|
33
33
|
switch (e.type) {
|
|
34
34
|
case de.EXPAND_RESOURCE:
|
|
35
35
|
return {
|
|
@@ -49,23 +49,23 @@ const de = {
|
|
|
49
49
|
default:
|
|
50
50
|
return t;
|
|
51
51
|
}
|
|
52
|
-
},
|
|
53
|
-
const [e, n] =
|
|
52
|
+
}, ut = bt(void 0), Ut = ({ children: t }) => {
|
|
53
|
+
const [e, n] = Mt(qt, void 0, Bt);
|
|
54
54
|
return N(() => {
|
|
55
|
-
localStorage.setItem(
|
|
56
|
-
}, [e]), /* @__PURE__ */ a(
|
|
57
|
-
},
|
|
58
|
-
const t =
|
|
55
|
+
localStorage.setItem(dt, JSON.stringify(e));
|
|
56
|
+
}, [e]), /* @__PURE__ */ a(ut.Provider, { value: { state: e, dispatch: n }, children: t });
|
|
57
|
+
}, Te = () => {
|
|
58
|
+
const t = wt(ut);
|
|
59
59
|
if (t === void 0)
|
|
60
60
|
throw new Error("useSchedulantContext must be used within a SchedulantProvider");
|
|
61
61
|
return t;
|
|
62
|
-
}, w = (t) => `${t}px`, oe = (t) => Number(t.replace(/px$/, "")),
|
|
62
|
+
}, w = (t) => `${t}px`, oe = (t) => Number(t.replace(/px$/, "")), We = (t) => document.querySelector(`.${t}`), jt = 0.7, W = 10, ht = 16, He = 13, $t = 0.3, ze = 0.8, Gt = 0.25, Xt = 0.75, Qt = 100, Kt = (t) => {
|
|
63
63
|
N(() => {
|
|
64
|
-
const e = document.getElementById("schedulant-view-harness"), n = document.getElementById("schedulant-datagrid-body"), s = document.getElementById("schedulant-timeline-head"), i = n ? n.getBoundingClientRect().height : 0, r = s ? s.getBoundingClientRect().height : 0, o = i + r +
|
|
64
|
+
const e = document.getElementById("schedulant-view-harness"), n = document.getElementById("schedulant-datagrid-body"), s = document.getElementById("schedulant-timeline-head"), i = n ? n.getBoundingClientRect().height : 0, r = s ? s.getBoundingClientRect().height : 0, o = i + r + He, l = t - o > 0 ? o : t;
|
|
65
65
|
e && (e.style.height = w(l));
|
|
66
66
|
const c = () => {
|
|
67
|
-
const m = n ? n.getBoundingClientRect().height : 0, f = s ? s.getBoundingClientRect().height : 0,
|
|
68
|
-
e && (e.style.height = w(
|
|
67
|
+
const m = n ? n.getBoundingClientRect().height : 0, f = s ? s.getBoundingClientRect().height : 0, h = m + f + He, u = t - h > 0 ? h : t;
|
|
68
|
+
e && (e.style.height = w(u));
|
|
69
69
|
}, d = new ResizeObserver(() => {
|
|
70
70
|
c();
|
|
71
71
|
});
|
|
@@ -73,12 +73,12 @@ const de = {
|
|
|
73
73
|
d.disconnect();
|
|
74
74
|
};
|
|
75
75
|
}, [t]);
|
|
76
|
-
},
|
|
76
|
+
}, Zt = (t, e, n, s) => {
|
|
77
77
|
N(() => {
|
|
78
78
|
const i = t.current, r = e.current, o = n.current, l = s.current;
|
|
79
79
|
if (!i || !r || !o || !l) return;
|
|
80
|
-
const c = [], d = (m, f,
|
|
81
|
-
m.addEventListener(f,
|
|
80
|
+
const c = [], d = (m, f, h, u) => {
|
|
81
|
+
m.addEventListener(f, h, u), c.push(() => m.removeEventListener(f, h));
|
|
82
82
|
};
|
|
83
83
|
return d(r, "scroll", () => {
|
|
84
84
|
i.scrollTop = r.scrollTop, l.scrollLeft = r.scrollLeft;
|
|
@@ -87,31 +87,31 @@ const de = {
|
|
|
87
87
|
}), d(i, "wheel", ((m) => {
|
|
88
88
|
let f = !1;
|
|
89
89
|
if (m.deltaY !== 0) {
|
|
90
|
-
const
|
|
91
|
-
r.scrollTop =
|
|
90
|
+
const h = r.scrollHeight - r.clientHeight, u = Math.max(0, Math.min(h, r.scrollTop + m.deltaY));
|
|
91
|
+
r.scrollTop = u, i.scrollTop = u, f = !0;
|
|
92
92
|
}
|
|
93
93
|
if (f && m.deltaX !== 0) {
|
|
94
|
-
const
|
|
95
|
-
i.scrollLeft =
|
|
94
|
+
const h = i.scrollWidth - i.clientWidth, u = Math.max(0, Math.min(h, i.scrollLeft + m.deltaX));
|
|
95
|
+
i.scrollLeft = u, o.scrollLeft = u;
|
|
96
96
|
} else if (m.deltaX !== 0) {
|
|
97
|
-
const
|
|
98
|
-
o.scrollLeft = Math.max(0, Math.min(
|
|
97
|
+
const h = i.scrollWidth - i.clientWidth;
|
|
98
|
+
o.scrollLeft = Math.max(0, Math.min(h, i.scrollLeft + m.deltaX));
|
|
99
99
|
}
|
|
100
100
|
f && m.preventDefault();
|
|
101
101
|
}), { passive: !1 }), d(r, "wheel", ((m) => {
|
|
102
102
|
let f = !1;
|
|
103
103
|
if (m.deltaY !== 0) {
|
|
104
|
-
const
|
|
105
|
-
r.scrollTop =
|
|
104
|
+
const h = r.scrollHeight - r.clientHeight, u = Math.max(0, Math.min(h, r.scrollTop + m.deltaY));
|
|
105
|
+
r.scrollTop = u, i.scrollTop = u, f = !0;
|
|
106
106
|
}
|
|
107
107
|
if (m.deltaX !== 0) {
|
|
108
|
-
const
|
|
109
|
-
r.scrollLeft =
|
|
108
|
+
const h = r.scrollWidth - r.clientWidth, u = Math.max(0, Math.min(h, r.scrollLeft + m.deltaX));
|
|
109
|
+
r.scrollLeft = u, l.scrollLeft = u, f = !0;
|
|
110
110
|
}
|
|
111
111
|
f && m.preventDefault();
|
|
112
112
|
}), { passive: !1 }), () => c.forEach((m) => m());
|
|
113
113
|
}, [t, e, n, s]);
|
|
114
|
-
},
|
|
114
|
+
}, Jt = (t, e) => {
|
|
115
115
|
N(() => {
|
|
116
116
|
const n = t.current;
|
|
117
117
|
n && e && (n.style.width = e);
|
|
@@ -143,7 +143,7 @@ class x {
|
|
|
143
143
|
return this.isDefined() ? this.value : e;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
class
|
|
146
|
+
class en {
|
|
147
147
|
event;
|
|
148
148
|
resourceApi;
|
|
149
149
|
constructor(e) {
|
|
@@ -201,7 +201,7 @@ const j = (t, e) => {
|
|
|
201
201
|
n[i] ? n[i].push(s) : n[i] = [s];
|
|
202
202
|
}), n;
|
|
203
203
|
};
|
|
204
|
-
class
|
|
204
|
+
class tn {
|
|
205
205
|
depth;
|
|
206
206
|
resource;
|
|
207
207
|
parent;
|
|
@@ -291,24 +291,24 @@ class le {
|
|
|
291
291
|
return (typeof s == "number" ? s : 0) - (typeof i == "number" ? i : 0);
|
|
292
292
|
}
|
|
293
293
|
static createTree(e, n, s, i) {
|
|
294
|
-
const r = "undefined", o = e.map((
|
|
294
|
+
const r = "undefined", o = e.map((u) => new tn(u)), l = new Map(Object.entries(j(n, (u) => u.getResourceId()))), c = o.reduce((u, A) => u.set(A.getId(), A), /* @__PURE__ */ new Map()), d = new Map(Object.entries(j(s, (u) => u.getResourceId()))), m = new Map(Object.entries(j(i, (u) => u.getResourceId()))), f = [{ parentId: r, depth: 0 }], h = new Map(Object.entries(j(o, (u) => u.getParentId().getOrElse(r))));
|
|
295
295
|
for (; f.length > 0; ) {
|
|
296
|
-
const
|
|
297
|
-
if (
|
|
298
|
-
const { parentId: A, depth: p } =
|
|
299
|
-
S && S.sort(le.compare).forEach((
|
|
300
|
-
const g =
|
|
301
|
-
|
|
296
|
+
const u = f.pop();
|
|
297
|
+
if (u) {
|
|
298
|
+
const { parentId: A, depth: p } = u, S = h.get(A);
|
|
299
|
+
S && S.sort(le.compare).forEach((b) => {
|
|
300
|
+
const g = b.getId();
|
|
301
|
+
b.setDepth(p), b.setParent(c.get(A)), b.setChildren(h.get(g) || []);
|
|
302
302
|
const y = l.get(g) || [];
|
|
303
|
-
y.forEach((
|
|
303
|
+
y.forEach((D) => D.setResourceApi(b)), b.setEventApis(y);
|
|
304
304
|
const v = d.get(g) || [];
|
|
305
|
-
v.forEach((
|
|
306
|
-
const
|
|
307
|
-
|
|
305
|
+
v.forEach((D) => D.setResourceApi(b)), b.setMilestoneApis(v);
|
|
306
|
+
const M = m.get(g) || [];
|
|
307
|
+
M.forEach((D) => D.setResourceApi(b)), b.setCheckpointApis(M), f.push({ parentId: g, depth: p + 1 });
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
return
|
|
311
|
+
return h.get(r) || [];
|
|
312
312
|
}
|
|
313
313
|
static flatMapTree(e) {
|
|
314
314
|
const n = [], s = [...e];
|
|
@@ -323,7 +323,7 @@ class le {
|
|
|
323
323
|
return n;
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
class
|
|
326
|
+
class nn {
|
|
327
327
|
milestone;
|
|
328
328
|
resourceApi;
|
|
329
329
|
constructor(e) {
|
|
@@ -362,7 +362,7 @@ class rn {
|
|
|
362
362
|
return x.fromNullable(this.milestone.extendedProps);
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
class
|
|
365
|
+
class sn {
|
|
366
366
|
checkpoint;
|
|
367
367
|
resourceApi;
|
|
368
368
|
constructor(e) {
|
|
@@ -398,10 +398,10 @@ class on {
|
|
|
398
398
|
return x.fromNullable(this.checkpoint.extendedProps);
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
E.extend(xt);
|
|
402
|
-
E.extend(kt);
|
|
403
401
|
E.extend(Rt);
|
|
402
|
+
E.extend(Tt);
|
|
404
403
|
E.extend(Dt);
|
|
404
|
+
E.extend(Ct);
|
|
405
405
|
class K {
|
|
406
406
|
start;
|
|
407
407
|
end;
|
|
@@ -432,10 +432,10 @@ class K {
|
|
|
432
432
|
i.years[m] = i.years[m] || [], i.years[m].push(s.clone()), d.has(m) || d.set(m, d.size);
|
|
433
433
|
const f = s.startOf("quarter").format("YYYY-MM-DD");
|
|
434
434
|
i.quarters[f] = i.quarters[f] || [], i.quarters[f].push(s.clone()), c.has(f) || c.set(f, c.size);
|
|
435
|
-
const
|
|
436
|
-
i.months[
|
|
437
|
-
const
|
|
438
|
-
i.weeks[
|
|
435
|
+
const h = s.startOf("month").format("YYYY-MM-DD");
|
|
436
|
+
i.months[h] = i.months[h] || [], i.months[h].push(s.clone()), l.has(h) || l.set(h, l.size);
|
|
437
|
+
const u = s.startOf("week").format("YYYY-MM-DD");
|
|
438
|
+
i.weeks[u] = i.weeks[u] || [], i.weeks[u].push(s.clone()), o.has(u) || o.set(u, o.size), i.days.push(s.clone()), this.dayPositionCache.set(s.format("YYYY-MM-DD"), r), r++, s = s.add(1, "day");
|
|
439
439
|
}
|
|
440
440
|
return o.forEach((m, f) => {
|
|
441
441
|
this.weekPositionCache.set(f, m);
|
|
@@ -571,7 +571,7 @@ class K {
|
|
|
571
571
|
return i;
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
|
-
class
|
|
574
|
+
class rn {
|
|
575
575
|
schedulantProps;
|
|
576
576
|
schedulantView;
|
|
577
577
|
timelineApi;
|
|
@@ -610,7 +610,7 @@ class ln {
|
|
|
610
610
|
return n.setSpecialWorkdays(e.specialWorkdays || []), n.setCompanyHolidays(e.companyHolidays || []), n.setNationalHolidays(e.nationalHolidays || []), n;
|
|
611
611
|
}
|
|
612
612
|
constructor(e, n) {
|
|
613
|
-
this.eventApis = n.events.map((s) => new
|
|
613
|
+
this.eventApis = n.events.map((s) => new en(s)), this.milestoneApis = n.milestones?.map((s) => new nn(s)) || [], this.checkpointApis = n.checkpoints?.map((s) => new sn(s)) || [], this.schedulantProps = n, this.schedulantView = e, this.timelineApi = this.generateTimelineApi(n), this.resourceApis = le.createTree(n.resources, this.eventApis, this.milestoneApis, this.checkpointApis), this.flatMapResourceApis = le.flatMapTree(this.resourceApis);
|
|
614
614
|
}
|
|
615
615
|
updateProps(e) {
|
|
616
616
|
this.schedulantProps = e;
|
|
@@ -812,7 +812,7 @@ class ln {
|
|
|
812
812
|
return this.schedulantProps.onResourceSelect;
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
|
-
const
|
|
815
|
+
const on = (t, e, n) => {
|
|
816
816
|
N(() => {
|
|
817
817
|
const s = t.current;
|
|
818
818
|
if (s)
|
|
@@ -826,43 +826,43 @@ const an = (t, e, n) => {
|
|
|
826
826
|
});
|
|
827
827
|
};
|
|
828
828
|
}, [t, e, n]);
|
|
829
|
-
}, H = ({ condition: t, children: e, fallback: n }) => /* @__PURE__ */ a(
|
|
830
|
-
const s = k(-1), i = C(() =>
|
|
831
|
-
|
|
832
|
-
const
|
|
833
|
-
if (
|
|
834
|
-
const A =
|
|
835
|
-
|
|
829
|
+
}, H = ({ condition: t, children: e, fallback: n }) => /* @__PURE__ */ a(At, { children: t ? e : n }), ln = (t, e, n) => {
|
|
830
|
+
const s = k(-1), i = C(() => We("schedulant-datagrid-head"), []), r = C(() => We("schedulant-datagrid-body"), []), o = C((h) => {
|
|
831
|
+
h.preventDefault();
|
|
832
|
+
const u = n.current;
|
|
833
|
+
if (u) {
|
|
834
|
+
const A = u.getBoundingClientRect(), p = h.clientX - A.left;
|
|
835
|
+
u.style.width = w(p), t({ type: "SET_RESOURCE_AREA_WIDTH", width: u.style.width });
|
|
836
836
|
}
|
|
837
|
-
}, [t, n]), l = C((
|
|
838
|
-
|
|
839
|
-
const
|
|
840
|
-
|
|
841
|
-
}, [o, e]), c = C((
|
|
842
|
-
|
|
843
|
-
const
|
|
844
|
-
|
|
845
|
-
}, [o, e]), d = C((
|
|
846
|
-
|
|
847
|
-
const
|
|
837
|
+
}, [t, n]), l = C((h) => {
|
|
838
|
+
h.preventDefault();
|
|
839
|
+
const u = e.current;
|
|
840
|
+
u ? u.removeEventListener("mousemove", o) : console.error("scheduleEl", u);
|
|
841
|
+
}, [o, e]), c = C((h) => {
|
|
842
|
+
h.preventDefault();
|
|
843
|
+
const u = e.current;
|
|
844
|
+
u ? u.addEventListener("mousemove", o) : console.error("scheduleEl", u);
|
|
845
|
+
}, [o, e]), d = C((h) => {
|
|
846
|
+
h.preventDefault();
|
|
847
|
+
const u = s.current, A = i(), p = r(), S = A.firstElementChild, b = p.firstElementChild, g = S?.children, y = b?.children;
|
|
848
848
|
if (g && y) {
|
|
849
|
-
const v = g[
|
|
850
|
-
v.style.width = w(
|
|
849
|
+
const v = g[u], M = y[u], D = h.clientX - v.getBoundingClientRect().left, T = h.clientX - M.getBoundingClientRect().left;
|
|
850
|
+
v.style.width = w(D), M.style.width = w(T);
|
|
851
851
|
}
|
|
852
|
-
}, [r, i, s]), m = C((
|
|
853
|
-
|
|
854
|
-
const
|
|
855
|
-
|
|
856
|
-
}, [s, i, r, d]), f = C((
|
|
857
|
-
|
|
858
|
-
const A =
|
|
852
|
+
}, [r, i, s]), m = C((h) => {
|
|
853
|
+
h.preventDefault(), s.current = -1;
|
|
854
|
+
const u = i(), A = r();
|
|
855
|
+
u.removeEventListener("mousemove", d), A.removeEventListener("mousemove", d);
|
|
856
|
+
}, [s, i, r, d]), f = C((h) => (u) => {
|
|
857
|
+
u.preventDefault();
|
|
858
|
+
const A = h.current?.parentElement, p = h.current?.parentElement?.parentElement;
|
|
859
859
|
if (p) {
|
|
860
860
|
let S = p.getElementsByTagName("td");
|
|
861
861
|
S.length === 0 && (S = p.getElementsByTagName("th"));
|
|
862
862
|
for (let y = 0; y < S.length; y++)
|
|
863
863
|
S[y] === A && (s.current = y);
|
|
864
|
-
const
|
|
865
|
-
|
|
864
|
+
const b = i(), g = r();
|
|
865
|
+
b.addEventListener("mousemove", d), g.addEventListener("mousemove", d);
|
|
866
866
|
} else
|
|
867
867
|
console.error("trElement", p);
|
|
868
868
|
}, [i, r, d, s]);
|
|
@@ -872,9 +872,9 @@ const an = (t, e, n) => {
|
|
|
872
872
|
datagridCellResizerMouseUp: m,
|
|
873
873
|
datagridCellResizerMouseDownFunc: f
|
|
874
874
|
};
|
|
875
|
-
},
|
|
875
|
+
}, an = (t) => {
|
|
876
876
|
const e = k(null);
|
|
877
|
-
return
|
|
877
|
+
return on(e, t.resourceAreaColumn, t.schedulantApi), /* @__PURE__ */ a("th", { role: "columnheader", className: "schedulant-datagrid-cell", children: /* @__PURE__ */ a(
|
|
878
878
|
Z,
|
|
879
879
|
{
|
|
880
880
|
disabled: !t.schedulantApi.isEnableResourceLabelContextMenu(),
|
|
@@ -892,7 +892,7 @@ const an = (t, e, n) => {
|
|
|
892
892
|
});
|
|
893
893
|
}
|
|
894
894
|
},
|
|
895
|
-
children: /* @__PURE__ */
|
|
895
|
+
children: /* @__PURE__ */ O("div", { className: "schedulant-datagrid-cell-frame", ref: e, children: [
|
|
896
896
|
/* @__PURE__ */ a("div", { className: "schedulant-datagrid-cell-cushion schedulant-scrollgrid-sync-inner", children: /* @__PURE__ */ a(
|
|
897
897
|
"span",
|
|
898
898
|
{
|
|
@@ -911,7 +911,7 @@ const an = (t, e, n) => {
|
|
|
911
911
|
] })
|
|
912
912
|
}
|
|
913
913
|
) });
|
|
914
|
-
},
|
|
914
|
+
}, cn = (t, e, n, s) => {
|
|
915
915
|
N(() => {
|
|
916
916
|
const i = t.current;
|
|
917
917
|
if (i)
|
|
@@ -929,7 +929,7 @@ const an = (t, e, n) => {
|
|
|
929
929
|
});
|
|
930
930
|
};
|
|
931
931
|
}, [t, e, n, s]);
|
|
932
|
-
},
|
|
932
|
+
}, dn = (t) => /* @__PURE__ */ a(X, { component: () => /* @__PURE__ */ a(
|
|
933
933
|
"svg",
|
|
934
934
|
{
|
|
935
935
|
className: "milestone-icon",
|
|
@@ -956,24 +956,24 @@ function Re() {
|
|
|
956
956
|
function ke(t) {
|
|
957
957
|
t?.(Array.from(L));
|
|
958
958
|
}
|
|
959
|
-
function
|
|
959
|
+
function mt() {
|
|
960
960
|
return L;
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function De(t) {
|
|
963
963
|
L.size !== 0 && (L.clear(), G = null, Re(), ke(t));
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function un(t, e) {
|
|
966
966
|
L.clear(), L.add(t), G = t, Re(), ke(e);
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function hn(t, e, n) {
|
|
969
969
|
const i = t.target.closest("[data-resource-id]");
|
|
970
970
|
if (!i) {
|
|
971
|
-
|
|
971
|
+
De(n);
|
|
972
972
|
return;
|
|
973
973
|
}
|
|
974
974
|
const r = i.getAttribute("data-resource-id");
|
|
975
975
|
if (!r) {
|
|
976
|
-
|
|
976
|
+
De(n);
|
|
977
977
|
return;
|
|
978
978
|
}
|
|
979
979
|
if (t.button === 2 && L.has(r))
|
|
@@ -984,14 +984,14 @@ function gn(t, e, n) {
|
|
|
984
984
|
if (c !== -1 && d !== -1) {
|
|
985
985
|
const m = Math.min(c, d), f = Math.max(c, d);
|
|
986
986
|
o || L.clear();
|
|
987
|
-
for (let
|
|
988
|
-
L.add(e[
|
|
987
|
+
for (let h = m; h <= f; h++)
|
|
988
|
+
L.add(e[h]);
|
|
989
989
|
}
|
|
990
990
|
} else o ? (L.has(r) ? L.delete(r) : L.add(r), G = r) : (L.clear(), L.add(r), G = r);
|
|
991
991
|
Re(), ke(n);
|
|
992
992
|
}
|
|
993
|
-
function
|
|
994
|
-
const s =
|
|
993
|
+
function mn(t, e, n) {
|
|
994
|
+
const s = mt();
|
|
995
995
|
return s.size > 1 && s.has(e.getId()) ? {
|
|
996
996
|
items: t.getResourceLaneMultiSelectContextMenuItems(),
|
|
997
997
|
onClick: (r) => {
|
|
@@ -1018,37 +1018,37 @@ function fn(t, e, n) {
|
|
|
1018
1018
|
}
|
|
1019
1019
|
};
|
|
1020
1020
|
}
|
|
1021
|
-
const
|
|
1022
|
-
const { dispatch: e } =
|
|
1023
|
-
const
|
|
1024
|
-
if (Object.keys(
|
|
1025
|
-
const
|
|
1026
|
-
if (typeof
|
|
1027
|
-
return
|
|
1021
|
+
const gn = (t) => {
|
|
1022
|
+
const { dispatch: e } = Te(), n = k(null), i = t.schedulantApi.getScheduleView().getTimelineView().calculateLaneHeight(t.resourceApi), r = C((y, v) => {
|
|
1023
|
+
const M = v.getResource();
|
|
1024
|
+
if (Object.keys(M).includes(y)) {
|
|
1025
|
+
const I = M[y];
|
|
1026
|
+
if (typeof I == "string")
|
|
1027
|
+
return I;
|
|
1028
1028
|
} else {
|
|
1029
|
-
const
|
|
1030
|
-
if (typeof
|
|
1031
|
-
return
|
|
1029
|
+
const I = M.extendedProps?.[y];
|
|
1030
|
+
if (typeof I == "string" || typeof I == "number")
|
|
1031
|
+
return I;
|
|
1032
1032
|
}
|
|
1033
1033
|
return "";
|
|
1034
1034
|
}, []);
|
|
1035
|
-
|
|
1036
|
-
const o = t.resourceApi.getId(), l = !t.isDraggable || !t.showPlusSquare, { attributes: c, listeners: d, setNodeRef: m, isDragging: f } =
|
|
1035
|
+
cn(n, t.resourceAreaColumn, t.schedulantApi, t.resourceApi);
|
|
1036
|
+
const o = t.resourceApi.getId(), l = !t.isDraggable || !t.showPlusSquare, { attributes: c, listeners: d, setNodeRef: m, isDragging: f } = It({
|
|
1037
1037
|
id: o,
|
|
1038
1038
|
disabled: l,
|
|
1039
1039
|
transition: null
|
|
1040
|
-
}),
|
|
1040
|
+
}), h = t.overId === o && t.activeId !== o, u = () => {
|
|
1041
1041
|
const y = ["schedulant-datagrid-cell", "schedulant-resource"];
|
|
1042
|
-
return
|
|
1043
|
-
}, [A, p] = re(!1), [S,
|
|
1044
|
-
y &&
|
|
1042
|
+
return mt().has(o) && y.push("schedulant-resource-selected"), t.isDraggable && f && y.push("schedulant-resource-dragging"), t.isDraggable && h && t.dropPosition && y.push(`schedulant-resource-drop-${t.dropPosition}`), y.join(" ");
|
|
1043
|
+
}, [A, p] = re(!1), [S, b] = re({}), g = C((y) => {
|
|
1044
|
+
y && b(mn(t.schedulantApi, t.resourceApi, t.resourceAreaColumn)), p(y);
|
|
1045
1045
|
}, [t.schedulantApi, t.resourceApi, t.resourceAreaColumn]);
|
|
1046
1046
|
return /* @__PURE__ */ a(
|
|
1047
1047
|
"td",
|
|
1048
1048
|
{
|
|
1049
1049
|
ref: m,
|
|
1050
1050
|
"data-resource-id": t.resourceApi.getId(),
|
|
1051
|
-
className:
|
|
1051
|
+
className: u(),
|
|
1052
1052
|
...l ? {} : { ...c, ...d },
|
|
1053
1053
|
children: /* @__PURE__ */ a(
|
|
1054
1054
|
Z,
|
|
@@ -1059,22 +1059,22 @@ const pn = (t) => {
|
|
|
1059
1059
|
open: A,
|
|
1060
1060
|
onOpenChange: g,
|
|
1061
1061
|
menu: S,
|
|
1062
|
-
children: /* @__PURE__ */
|
|
1062
|
+
children: /* @__PURE__ */ O(
|
|
1063
1063
|
"div",
|
|
1064
1064
|
{
|
|
1065
1065
|
className: "schedulant-datagrid-cell-frame",
|
|
1066
1066
|
style: { height: w(i) },
|
|
1067
1067
|
ref: n,
|
|
1068
1068
|
children: [
|
|
1069
|
-
/* @__PURE__ */ a("div", { className: "schedulant-datagrid-cell-cushion schedulant-scrollgrid-sync-inner", children: /* @__PURE__ */
|
|
1070
|
-
t.showPlusSquare && /* @__PURE__ */
|
|
1069
|
+
/* @__PURE__ */ a("div", { className: "schedulant-datagrid-cell-cushion schedulant-scrollgrid-sync-inner", children: /* @__PURE__ */ O(kt, { size: "small", children: [
|
|
1070
|
+
t.showPlusSquare && /* @__PURE__ */ O(
|
|
1071
1071
|
"span",
|
|
1072
1072
|
{
|
|
1073
1073
|
className: "schedulant-datagrid-expander schedulant-datagrid-expander-placeholder",
|
|
1074
1074
|
children: [
|
|
1075
1075
|
t.showIndentation && Array.from({ length: t.resourceApi.getDepth() }, (y, v) => /* @__PURE__ */ a("span", { className: "schedulant-icon" }, v + 1)),
|
|
1076
1076
|
/* @__PURE__ */ a("span", { className: "schedulant-icon", children: t.collapseIds.some((y) => y === t.resourceApi.getId()) ? /* @__PURE__ */ a(
|
|
1077
|
-
|
|
1077
|
+
xt,
|
|
1078
1078
|
{
|
|
1079
1079
|
onClick: () => e({
|
|
1080
1080
|
type: "EXPAND_RESOURCE",
|
|
@@ -1082,7 +1082,7 @@ const pn = (t) => {
|
|
|
1082
1082
|
})
|
|
1083
1083
|
}
|
|
1084
1084
|
) : t.resourceApi.getChildren().length > 0 ? /* @__PURE__ */ a(
|
|
1085
|
-
|
|
1085
|
+
Ot,
|
|
1086
1086
|
{
|
|
1087
1087
|
onClick: () => e({
|
|
1088
1088
|
type: "COLLAPSE_RESOURCE",
|
|
@@ -1093,9 +1093,9 @@ const pn = (t) => {
|
|
|
1093
1093
|
]
|
|
1094
1094
|
}
|
|
1095
1095
|
),
|
|
1096
|
-
/* @__PURE__ */
|
|
1096
|
+
/* @__PURE__ */ O("div", { className: "schedulant-datagrid-cell-main", children: [
|
|
1097
1097
|
r(t.resourceAreaColumn.field, t.resourceApi),
|
|
1098
|
-
t.showPlusSquare && t.resourceApi.getMilestoneApis().length > 0 && /* @__PURE__ */ a("span", { className: "schedulant-milestone-indicator", children: /* @__PURE__ */ a(
|
|
1098
|
+
t.showPlusSquare && t.resourceApi.getMilestoneApis().length > 0 && /* @__PURE__ */ a("span", { className: "schedulant-milestone-indicator", children: /* @__PURE__ */ a(dn, { width: 14, height: 14, color: "#91003c" }) })
|
|
1099
1099
|
] })
|
|
1100
1100
|
] }) }),
|
|
1101
1101
|
/* @__PURE__ */ a(H, { condition: t.isResizable, children: /* @__PURE__ */ a("div", { className: "schedulant-datagrid-cell-resizer", onMouseUp: t.cellResizerMouseUp, onMouseDown: t.cellResizerMouseDownFunc(n) }) })
|
|
@@ -1106,7 +1106,7 @@ const pn = (t) => {
|
|
|
1106
1106
|
)
|
|
1107
1107
|
}
|
|
1108
1108
|
);
|
|
1109
|
-
},
|
|
1109
|
+
}, fn = (t) => /* @__PURE__ */ a("colgroup", { children: t.resourceAreaColumns.map((e) => /* @__PURE__ */ a("col", { style: { minWidth: Qt } }, e.field)) }), pn = () => /* @__PURE__ */ a("div", { className: "schedulant-timeline-lane" }), yn = (t, e, n) => {
|
|
1110
1110
|
const s = n.getStart(), i = n.getEnd(), r = i.isBefore(E(), "day"), o = s.isAfter(E(), "day"), l = s.isSameOrBefore(E(), "day") && (i.isAfter(E(), "day") || i.isSame(E(), "day"));
|
|
1111
1111
|
return N(() => {
|
|
1112
1112
|
const c = t.current;
|
|
@@ -1131,46 +1131,46 @@ const pn = (t) => {
|
|
|
1131
1131
|
}, [t, e, n, r, o, l]), { isPast: r, isFuture: o, isProcess: l };
|
|
1132
1132
|
};
|
|
1133
1133
|
var se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1134
|
-
function
|
|
1134
|
+
function vn(t) {
|
|
1135
1135
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1136
1136
|
}
|
|
1137
|
-
var ue,
|
|
1137
|
+
var ue, Ve;
|
|
1138
1138
|
function xe() {
|
|
1139
|
-
if (
|
|
1140
|
-
|
|
1139
|
+
if (Ve) return ue;
|
|
1140
|
+
Ve = 1;
|
|
1141
1141
|
function t(e) {
|
|
1142
1142
|
var n = typeof e;
|
|
1143
1143
|
return e != null && (n == "object" || n == "function");
|
|
1144
1144
|
}
|
|
1145
1145
|
return ue = t, ue;
|
|
1146
1146
|
}
|
|
1147
|
-
var he,
|
|
1148
|
-
function
|
|
1149
|
-
if (
|
|
1150
|
-
|
|
1147
|
+
var he, Fe;
|
|
1148
|
+
function Sn() {
|
|
1149
|
+
if (Fe) return he;
|
|
1150
|
+
Fe = 1;
|
|
1151
1151
|
var t = typeof se == "object" && se && se.Object === Object && se;
|
|
1152
1152
|
return he = t, he;
|
|
1153
1153
|
}
|
|
1154
|
-
var me,
|
|
1155
|
-
function
|
|
1156
|
-
if (
|
|
1157
|
-
|
|
1158
|
-
var t =
|
|
1154
|
+
var me, Be;
|
|
1155
|
+
function gt() {
|
|
1156
|
+
if (Be) return me;
|
|
1157
|
+
Be = 1;
|
|
1158
|
+
var t = Sn(), e = typeof self == "object" && self && self.Object === Object && self, n = t || e || Function("return this")();
|
|
1159
1159
|
return me = n, me;
|
|
1160
1160
|
}
|
|
1161
|
-
var ge,
|
|
1162
|
-
function
|
|
1163
|
-
if (
|
|
1164
|
-
|
|
1165
|
-
var t =
|
|
1161
|
+
var ge, qe;
|
|
1162
|
+
function An() {
|
|
1163
|
+
if (qe) return ge;
|
|
1164
|
+
qe = 1;
|
|
1165
|
+
var t = gt(), e = function() {
|
|
1166
1166
|
return t.Date.now();
|
|
1167
1167
|
};
|
|
1168
1168
|
return ge = e, ge;
|
|
1169
1169
|
}
|
|
1170
|
-
var fe,
|
|
1171
|
-
function
|
|
1172
|
-
if (
|
|
1173
|
-
|
|
1170
|
+
var fe, Ue;
|
|
1171
|
+
function bn() {
|
|
1172
|
+
if (Ue) return fe;
|
|
1173
|
+
Ue = 1;
|
|
1174
1174
|
var t = /\s/;
|
|
1175
1175
|
function e(n) {
|
|
1176
1176
|
for (var s = n.length; s-- && t.test(n.charAt(s)); )
|
|
@@ -1179,28 +1179,28 @@ function wn() {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
return fe = e, fe;
|
|
1181
1181
|
}
|
|
1182
|
-
var pe,
|
|
1183
|
-
function
|
|
1184
|
-
if (
|
|
1185
|
-
|
|
1186
|
-
var t =
|
|
1182
|
+
var pe, je;
|
|
1183
|
+
function Mn() {
|
|
1184
|
+
if (je) return pe;
|
|
1185
|
+
je = 1;
|
|
1186
|
+
var t = bn(), e = /^\s+/;
|
|
1187
1187
|
function n(s) {
|
|
1188
1188
|
return s && s.slice(0, t(s) + 1).replace(e, "");
|
|
1189
1189
|
}
|
|
1190
1190
|
return pe = n, pe;
|
|
1191
1191
|
}
|
|
1192
|
-
var ye,
|
|
1193
|
-
function
|
|
1194
|
-
if (
|
|
1195
|
-
|
|
1196
|
-
var t =
|
|
1192
|
+
var ye, $e;
|
|
1193
|
+
function ft() {
|
|
1194
|
+
if ($e) return ye;
|
|
1195
|
+
$e = 1;
|
|
1196
|
+
var t = gt(), e = t.Symbol;
|
|
1197
1197
|
return ye = e, ye;
|
|
1198
1198
|
}
|
|
1199
|
-
var ve,
|
|
1200
|
-
function
|
|
1201
|
-
if (
|
|
1202
|
-
|
|
1203
|
-
var t =
|
|
1199
|
+
var ve, Ge;
|
|
1200
|
+
function wn() {
|
|
1201
|
+
if (Ge) return ve;
|
|
1202
|
+
Ge = 1;
|
|
1203
|
+
var t = ft(), e = Object.prototype, n = e.hasOwnProperty, s = e.toString, i = t ? t.toStringTag : void 0;
|
|
1204
1204
|
function r(o) {
|
|
1205
1205
|
var l = n.call(o, i), c = o[i];
|
|
1206
1206
|
try {
|
|
@@ -1213,50 +1213,50 @@ function Cn() {
|
|
|
1213
1213
|
}
|
|
1214
1214
|
return ve = r, ve;
|
|
1215
1215
|
}
|
|
1216
|
-
var Se,
|
|
1217
|
-
function
|
|
1218
|
-
if (
|
|
1219
|
-
|
|
1216
|
+
var Se, Xe;
|
|
1217
|
+
function En() {
|
|
1218
|
+
if (Xe) return Se;
|
|
1219
|
+
Xe = 1;
|
|
1220
1220
|
var t = Object.prototype, e = t.toString;
|
|
1221
1221
|
function n(s) {
|
|
1222
1222
|
return e.call(s);
|
|
1223
1223
|
}
|
|
1224
1224
|
return Se = n, Se;
|
|
1225
1225
|
}
|
|
1226
|
-
var Ae,
|
|
1227
|
-
function
|
|
1228
|
-
if (
|
|
1229
|
-
|
|
1230
|
-
var t =
|
|
1226
|
+
var Ae, Qe;
|
|
1227
|
+
function Cn() {
|
|
1228
|
+
if (Qe) return Ae;
|
|
1229
|
+
Qe = 1;
|
|
1230
|
+
var t = ft(), e = wn(), n = En(), s = "[object Null]", i = "[object Undefined]", r = t ? t.toStringTag : void 0;
|
|
1231
1231
|
function o(l) {
|
|
1232
1232
|
return l == null ? l === void 0 ? i : s : r && r in Object(l) ? e(l) : n(l);
|
|
1233
1233
|
}
|
|
1234
1234
|
return Ae = o, Ae;
|
|
1235
1235
|
}
|
|
1236
|
-
var
|
|
1237
|
-
function
|
|
1238
|
-
if (
|
|
1239
|
-
|
|
1236
|
+
var be, Ke;
|
|
1237
|
+
function Dn() {
|
|
1238
|
+
if (Ke) return be;
|
|
1239
|
+
Ke = 1;
|
|
1240
1240
|
function t(e) {
|
|
1241
1241
|
return e != null && typeof e == "object";
|
|
1242
1242
|
}
|
|
1243
|
-
return
|
|
1243
|
+
return be = t, be;
|
|
1244
1244
|
}
|
|
1245
|
-
var
|
|
1246
|
-
function
|
|
1247
|
-
if (
|
|
1248
|
-
|
|
1249
|
-
var t =
|
|
1245
|
+
var Me, Ze;
|
|
1246
|
+
function Tn() {
|
|
1247
|
+
if (Ze) return Me;
|
|
1248
|
+
Ze = 1;
|
|
1249
|
+
var t = Cn(), e = Dn(), n = "[object Symbol]";
|
|
1250
1250
|
function s(i) {
|
|
1251
1251
|
return typeof i == "symbol" || e(i) && t(i) == n;
|
|
1252
1252
|
}
|
|
1253
|
-
return
|
|
1253
|
+
return Me = s, Me;
|
|
1254
1254
|
}
|
|
1255
|
-
var we,
|
|
1256
|
-
function
|
|
1257
|
-
if (
|
|
1258
|
-
|
|
1259
|
-
var t =
|
|
1255
|
+
var we, Je;
|
|
1256
|
+
function Rn() {
|
|
1257
|
+
if (Je) return we;
|
|
1258
|
+
Je = 1;
|
|
1259
|
+
var t = Mn(), e = xe(), n = Tn(), s = NaN, i = /^[-+]0x[0-9a-f]+$/i, r = /^0b[01]+$/i, o = /^0o[0-7]+$/i, l = parseInt;
|
|
1260
1260
|
function c(d) {
|
|
1261
1261
|
if (typeof d == "number")
|
|
1262
1262
|
return d;
|
|
@@ -1274,65 +1274,65 @@ function xn() {
|
|
|
1274
1274
|
}
|
|
1275
1275
|
return we = c, we;
|
|
1276
1276
|
}
|
|
1277
|
-
var Ee,
|
|
1278
|
-
function
|
|
1279
|
-
if (
|
|
1280
|
-
|
|
1281
|
-
var t = xe(), e =
|
|
1277
|
+
var Ee, et;
|
|
1278
|
+
function kn() {
|
|
1279
|
+
if (et) return Ee;
|
|
1280
|
+
et = 1;
|
|
1281
|
+
var t = xe(), e = An(), n = Rn(), s = "Expected a function", i = Math.max, r = Math.min;
|
|
1282
1282
|
function o(l, c, d) {
|
|
1283
|
-
var m, f,
|
|
1283
|
+
var m, f, h, u, A, p, S = 0, b = !1, g = !1, y = !0;
|
|
1284
1284
|
if (typeof l != "function")
|
|
1285
1285
|
throw new TypeError(s);
|
|
1286
|
-
c = n(c) || 0, t(d) && (
|
|
1286
|
+
c = n(c) || 0, t(d) && (b = !!d.leading, g = "maxWait" in d, h = g ? i(n(d.maxWait) || 0, c) : h, y = "trailing" in d ? !!d.trailing : y);
|
|
1287
1287
|
function v(R) {
|
|
1288
1288
|
var V = m, q = f;
|
|
1289
|
-
return m = f = void 0, S = R,
|
|
1289
|
+
return m = f = void 0, S = R, u = l.apply(q, V), u;
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1292
|
-
return S = R, A = setTimeout(
|
|
1291
|
+
function M(R) {
|
|
1292
|
+
return S = R, A = setTimeout(I, c), b ? v(R) : u;
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function D(R) {
|
|
1295
1295
|
var V = R - p, q = R - S, Q = c - V;
|
|
1296
|
-
return g ? r(Q,
|
|
1296
|
+
return g ? r(Q, h - q) : Q;
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1298
|
+
function T(R) {
|
|
1299
1299
|
var V = R - p, q = R - S;
|
|
1300
|
-
return p === void 0 || V >= c || V < 0 || g && q >=
|
|
1300
|
+
return p === void 0 || V >= c || V < 0 || g && q >= h;
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function I() {
|
|
1303
1303
|
var R = e();
|
|
1304
|
-
if (
|
|
1304
|
+
if (T(R))
|
|
1305
1305
|
return P(R);
|
|
1306
|
-
A = setTimeout(
|
|
1306
|
+
A = setTimeout(I, D(R));
|
|
1307
1307
|
}
|
|
1308
1308
|
function P(R) {
|
|
1309
|
-
return A = void 0, y && m ? v(R) : (m = f = void 0,
|
|
1309
|
+
return A = void 0, y && m ? v(R) : (m = f = void 0, u);
|
|
1310
1310
|
}
|
|
1311
1311
|
function Y() {
|
|
1312
1312
|
A !== void 0 && clearTimeout(A), S = 0, m = p = f = A = void 0;
|
|
1313
1313
|
}
|
|
1314
1314
|
function z() {
|
|
1315
|
-
return A === void 0 ?
|
|
1315
|
+
return A === void 0 ? u : P(e());
|
|
1316
1316
|
}
|
|
1317
1317
|
function _() {
|
|
1318
|
-
var R = e(), V =
|
|
1318
|
+
var R = e(), V = T(R);
|
|
1319
1319
|
if (m = arguments, f = this, p = R, V) {
|
|
1320
1320
|
if (A === void 0)
|
|
1321
|
-
return
|
|
1321
|
+
return M(p);
|
|
1322
1322
|
if (g)
|
|
1323
|
-
return clearTimeout(A), A = setTimeout(
|
|
1323
|
+
return clearTimeout(A), A = setTimeout(I, c), v(p);
|
|
1324
1324
|
}
|
|
1325
|
-
return A === void 0 && (A = setTimeout(
|
|
1325
|
+
return A === void 0 && (A = setTimeout(I, c)), u;
|
|
1326
1326
|
}
|
|
1327
1327
|
return _.cancel = Y, _.flush = z, _;
|
|
1328
1328
|
}
|
|
1329
1329
|
return Ee = o, Ee;
|
|
1330
1330
|
}
|
|
1331
|
-
var Ce,
|
|
1332
|
-
function
|
|
1333
|
-
if (
|
|
1334
|
-
|
|
1335
|
-
var t =
|
|
1331
|
+
var Ce, tt;
|
|
1332
|
+
function xn() {
|
|
1333
|
+
if (tt) return Ce;
|
|
1334
|
+
tt = 1;
|
|
1335
|
+
var t = kn(), e = xe(), n = "Expected a function";
|
|
1336
1336
|
function s(i, r, o) {
|
|
1337
1337
|
var l = !0, c = !0;
|
|
1338
1338
|
if (typeof i != "function")
|
|
@@ -1345,115 +1345,115 @@ function On() {
|
|
|
1345
1345
|
}
|
|
1346
1346
|
return Ce = s, Ce;
|
|
1347
1347
|
}
|
|
1348
|
-
var
|
|
1349
|
-
const
|
|
1348
|
+
var On = xn();
|
|
1349
|
+
const pt = /* @__PURE__ */ vn(On), In = (t) => {
|
|
1350
1350
|
const e = F(() => "schedulant-timeline-event-position-guide", []), n = k(0), s = k(0), i = k(0), r = k(!1), o = k("none"), l = C((g) => {
|
|
1351
|
-
const
|
|
1352
|
-
return { moveSlots: P, distance: Y, deltaX:
|
|
1351
|
+
const M = t.schedulantApi.getScheduleView().getTimelineView(), D = g - n.current, T = t.timelineWidth, I = M.getTotalSlots(), P = Math.round(D / T * I), Y = P / I * T;
|
|
1352
|
+
return { moveSlots: P, distance: Y, deltaX: D };
|
|
1353
1353
|
}, [t]), c = C((g) => {
|
|
1354
|
-
const y = t.schedulantApi.getScheduleView().getTimelineView(), v = g.style.left,
|
|
1355
|
-
|
|
1354
|
+
const y = t.schedulantApi.getScheduleView().getTimelineView(), v = g.style.left, M = g.style.right, D = y.calculateLaneHeight(t.resourceApi), T = document.createElement("div");
|
|
1355
|
+
T.className = e, Object.assign(T.style, {
|
|
1356
1356
|
position: "absolute",
|
|
1357
1357
|
zIndex: 1,
|
|
1358
1358
|
left: v,
|
|
1359
|
-
right:
|
|
1360
|
-
height: w(
|
|
1359
|
+
right: M,
|
|
1360
|
+
height: w(D),
|
|
1361
1361
|
backgroundColor: t.schedulantApi.getDragHintColor()
|
|
1362
|
-
}), g.parentNode?.insertBefore(
|
|
1362
|
+
}), g.parentNode?.insertBefore(T, g);
|
|
1363
1363
|
}, [t, e]), d = C((g) => {
|
|
1364
1364
|
const y = g.previousElementSibling;
|
|
1365
1365
|
y?.className === e && g.parentElement?.removeChild(y);
|
|
1366
1366
|
}, [e]), m = C((g, y) => {
|
|
1367
1367
|
const v = g.previousElementSibling;
|
|
1368
1368
|
if (v && v.className === e) {
|
|
1369
|
-
const
|
|
1370
|
-
switch (
|
|
1369
|
+
const M = o.current, { distance: D } = l(y);
|
|
1370
|
+
switch (M) {
|
|
1371
1371
|
case "press_event": {
|
|
1372
|
-
v.style.left = w(Math.max(s.current +
|
|
1372
|
+
v.style.left = w(Math.max(s.current + D, 0)), v.style.right = w(i.current - D);
|
|
1373
1373
|
break;
|
|
1374
1374
|
}
|
|
1375
1375
|
case "press_event_left": {
|
|
1376
|
-
const
|
|
1377
|
-
v.style.left = w(
|
|
1376
|
+
const T = Math.max(s.current + D, 0);
|
|
1377
|
+
v.style.left = w(T);
|
|
1378
1378
|
break;
|
|
1379
1379
|
}
|
|
1380
1380
|
case "press_event_right": {
|
|
1381
|
-
const
|
|
1382
|
-
v.style.right = w(
|
|
1381
|
+
const T = i.current - D;
|
|
1382
|
+
v.style.right = w(T);
|
|
1383
1383
|
break;
|
|
1384
1384
|
}
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
1387
|
}, [l, e]), f = C((g, y) => {
|
|
1388
|
-
const v = t.eventApi,
|
|
1389
|
-
switch (
|
|
1388
|
+
const v = t.eventApi, M = t.schedulantApi, D = o.current, { moveSlots: T, distance: I } = l(y);
|
|
1389
|
+
switch (D) {
|
|
1390
1390
|
case "press_event": {
|
|
1391
|
-
g.style.left = w(Math.max(s.current +
|
|
1392
|
-
const P = v.getStart().add(
|
|
1393
|
-
|
|
1391
|
+
g.style.left = w(Math.max(s.current + I, 0)), g.style.right = w(i.current - I);
|
|
1392
|
+
const P = v.getStart().add(T, "day"), Y = v.getEnd().add(T, "day");
|
|
1393
|
+
M.eventMove({
|
|
1394
1394
|
el: g,
|
|
1395
1395
|
startDate: P,
|
|
1396
1396
|
endDate: Y,
|
|
1397
1397
|
eventApi: v,
|
|
1398
|
-
schedulantApi:
|
|
1398
|
+
schedulantApi: M
|
|
1399
1399
|
});
|
|
1400
1400
|
break;
|
|
1401
1401
|
}
|
|
1402
1402
|
case "press_event_left": {
|
|
1403
|
-
const P = Math.max(s.current +
|
|
1403
|
+
const P = Math.max(s.current + I, 0);
|
|
1404
1404
|
g.style.left = w(P);
|
|
1405
|
-
const Y = v.getStart().add(
|
|
1406
|
-
|
|
1405
|
+
const Y = v.getStart().add(T, "day");
|
|
1406
|
+
M.eventResizeStart({
|
|
1407
1407
|
el: g,
|
|
1408
1408
|
date: Y,
|
|
1409
1409
|
eventApi: v,
|
|
1410
|
-
schedulantApi:
|
|
1410
|
+
schedulantApi: M
|
|
1411
1411
|
});
|
|
1412
1412
|
break;
|
|
1413
1413
|
}
|
|
1414
1414
|
case "press_event_right": {
|
|
1415
|
-
const P = i.current -
|
|
1415
|
+
const P = i.current - I;
|
|
1416
1416
|
g.style.right = w(P);
|
|
1417
|
-
const Y = v.getEnd().add(
|
|
1418
|
-
|
|
1417
|
+
const Y = v.getEnd().add(T, "day");
|
|
1418
|
+
M.eventResizeEnd({
|
|
1419
1419
|
el: g,
|
|
1420
1420
|
date: Y,
|
|
1421
1421
|
eventApi: v,
|
|
1422
|
-
schedulantApi:
|
|
1422
|
+
schedulantApi: M
|
|
1423
1423
|
});
|
|
1424
1424
|
break;
|
|
1425
1425
|
}
|
|
1426
1426
|
}
|
|
1427
|
-
}, [t, l]),
|
|
1427
|
+
}, [t, l]), h = C((g) => {
|
|
1428
1428
|
g.preventDefault();
|
|
1429
1429
|
const y = r.current, v = t.timelineEventHarnessRef.current;
|
|
1430
1430
|
if (y && v) {
|
|
1431
|
-
const { deltaX:
|
|
1431
|
+
const { deltaX: M } = l(g.clientX), D = s.current + M, T = i.current - M;
|
|
1432
1432
|
switch (o.current) {
|
|
1433
1433
|
case "press_event":
|
|
1434
|
-
v.style.left = w(
|
|
1434
|
+
v.style.left = w(D), v.style.right = w(T);
|
|
1435
1435
|
break;
|
|
1436
1436
|
case "press_event_left":
|
|
1437
|
-
v.style.left = w(
|
|
1437
|
+
v.style.left = w(D);
|
|
1438
1438
|
break;
|
|
1439
1439
|
case "press_event_right":
|
|
1440
|
-
v.style.right = w(
|
|
1440
|
+
v.style.right = w(T);
|
|
1441
1441
|
break;
|
|
1442
1442
|
}
|
|
1443
1443
|
m(v, g.clientX);
|
|
1444
1444
|
}
|
|
1445
|
-
}, [t.timelineEventHarnessRef, m, l]),
|
|
1446
|
-
() =>
|
|
1447
|
-
[
|
|
1445
|
+
}, [t.timelineEventHarnessRef, m, l]), u = F(
|
|
1446
|
+
() => pt(h, ht),
|
|
1447
|
+
[h]
|
|
1448
1448
|
), A = C((g, y) => {
|
|
1449
1449
|
g.preventDefault();
|
|
1450
|
-
const v = t.schedulantApi.getSchedulantElRef().current,
|
|
1451
|
-
|
|
1452
|
-
}, [t.schedulantApi, t.timelineEventHarnessRef, c,
|
|
1450
|
+
const v = t.schedulantApi.getSchedulantElRef().current, M = t.timelineEventHarnessRef.current;
|
|
1451
|
+
M && v ? (r.current = !0, o.current = y, n.current = g.clientX, s.current = oe(M.style.left), i.current = oe(M.style.right), c(M), v.addEventListener("mousemove", u)) : (console.error("scheduleEl", v), console.error("timelineEventHarness", M));
|
|
1452
|
+
}, [t.schedulantApi, t.timelineEventHarnessRef, c, u]), p = C((g) => {
|
|
1453
1453
|
A(g, "press_event");
|
|
1454
1454
|
}, [A]), S = C((g) => {
|
|
1455
1455
|
A(g, "press_event_left");
|
|
1456
|
-
}, [A]),
|
|
1456
|
+
}, [A]), b = C((g) => {
|
|
1457
1457
|
A(g, "press_event_right");
|
|
1458
1458
|
}, [A]);
|
|
1459
1459
|
return N(() => {
|
|
@@ -1461,16 +1461,16 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1461
1461
|
if (y && g) {
|
|
1462
1462
|
const v = g.parentElement?.parentElement;
|
|
1463
1463
|
if (v) {
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1464
|
+
const M = (D) => {
|
|
1465
|
+
D.preventDefault(), r.current && !v.contains(D.relatedTarget) && (d(g), f(g, D.clientX), y.removeEventListener("mousemove", u), r.current = !1, o.current = "none");
|
|
1466
1466
|
};
|
|
1467
|
-
return v.addEventListener("mouseup",
|
|
1468
|
-
v.removeEventListener("mouseup",
|
|
1467
|
+
return v.addEventListener("mouseup", M), v.addEventListener("mouseout", M), () => {
|
|
1468
|
+
v.removeEventListener("mouseup", M), v.removeEventListener("mouseout", M), y.removeEventListener("mousemove", u), u.cancel();
|
|
1469
1469
|
};
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
1472
|
-
}, [
|
|
1473
|
-
},
|
|
1472
|
+
}, [u, t, d, f]), { handleMouseDown: p, leftHandleMouseDown: S, rightHandleMouseDown: b };
|
|
1473
|
+
}, nt = (t) => /* @__PURE__ */ a(X, { component: () => /* @__PURE__ */ a(
|
|
1474
1474
|
"svg",
|
|
1475
1475
|
{
|
|
1476
1476
|
className: "triangle-left-icon",
|
|
@@ -1487,7 +1487,7 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
)
|
|
1489
1489
|
}
|
|
1490
|
-
), ...t }),
|
|
1490
|
+
), ...t }), st = (t) => /* @__PURE__ */ a(X, { component: () => /* @__PURE__ */ a(
|
|
1491
1491
|
"svg",
|
|
1492
1492
|
{
|
|
1493
1493
|
className: "drag-icon",
|
|
@@ -1498,7 +1498,7 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1498
1498
|
height: `${w(t.height)}`,
|
|
1499
1499
|
children: /* @__PURE__ */ a("path", { d: "M368 0h32v1024h-32zM496 0h32v1024h-32zM624 0h32v1024h-32z", fill: t.color })
|
|
1500
1500
|
}
|
|
1501
|
-
), ...t }),
|
|
1501
|
+
), ...t }), it = (t) => /* @__PURE__ */ a(X, { component: () => /* @__PURE__ */ a(
|
|
1502
1502
|
"svg",
|
|
1503
1503
|
{
|
|
1504
1504
|
className: "triangle-left-icon",
|
|
@@ -1515,8 +1515,8 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1515
1515
|
}
|
|
1516
1516
|
)
|
|
1517
1517
|
}
|
|
1518
|
-
), ...t }),
|
|
1519
|
-
const e = k(null), n = k(null), s = t.schedulantApi.getTimelineApi(), i = t.schedulantApi.getScheduleView().getTimelineView(), r = t.eventApi.getTextColor().getOrElse("white"), o = t.eventApi.getBorderColor().getOrElse(t.eventApi.getColor()), l = t.eventApi.getBackgroundColor().getOrElse(t.eventApi.getColor()), c = i.calculateLaneHeight(t.resourceApi), d = i.calculateEventHeight(), m = (c - d) / 2 - 1, { isPast: f, isFuture:
|
|
1518
|
+
), ...t }), Pn = ae((t) => {
|
|
1519
|
+
const e = k(null), n = k(null), s = t.schedulantApi.getTimelineApi(), i = t.schedulantApi.getScheduleView().getTimelineView(), r = t.eventApi.getTextColor().getOrElse("white"), o = t.eventApi.getBorderColor().getOrElse(t.eventApi.getColor()), l = t.eventApi.getBackgroundColor().getOrElse(t.eventApi.getColor()), c = i.calculateLaneHeight(t.resourceApi), d = i.calculateEventHeight(), m = (c - d) / 2 - 1, { isPast: f, isFuture: h, isProcess: u } = yn(e, t.schedulantApi, t.eventApi), { handleMouseDown: A, leftHandleMouseDown: p, rightHandleMouseDown: S } = In({
|
|
1520
1520
|
timelineEventHarnessRef: n,
|
|
1521
1521
|
timelineWidth: t.timelineWidth,
|
|
1522
1522
|
eventApi: t.eventApi,
|
|
@@ -1537,21 +1537,21 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1537
1537
|
trigger: ["contextMenu"],
|
|
1538
1538
|
menu: {
|
|
1539
1539
|
items: t.schedulantApi.getEventContextMenuItems(),
|
|
1540
|
-
onClick: (
|
|
1541
|
-
const { key: g, keyPath: y, domEvent: v } =
|
|
1540
|
+
onClick: (b) => {
|
|
1541
|
+
const { key: g, keyPath: y, domEvent: v } = b;
|
|
1542
1542
|
t.schedulantApi.onEventContextMenuClick({
|
|
1543
1543
|
key: g,
|
|
1544
1544
|
keyPath: y,
|
|
1545
1545
|
domEvent: v,
|
|
1546
1546
|
isPast: f,
|
|
1547
|
-
isFuture:
|
|
1548
|
-
isProcess:
|
|
1547
|
+
isFuture: h,
|
|
1548
|
+
isProcess: u,
|
|
1549
1549
|
eventApi: t.eventApi,
|
|
1550
1550
|
schedulantApi: t.schedulantApi
|
|
1551
1551
|
});
|
|
1552
1552
|
}
|
|
1553
1553
|
},
|
|
1554
|
-
children: /* @__PURE__ */
|
|
1554
|
+
children: /* @__PURE__ */ O(
|
|
1555
1555
|
"div",
|
|
1556
1556
|
{
|
|
1557
1557
|
className: "schedulant-timeline-event",
|
|
@@ -1567,21 +1567,21 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1567
1567
|
{
|
|
1568
1568
|
condition: t.eventApi.getStart().isBefore(s.getStart()),
|
|
1569
1569
|
fallback: /* @__PURE__ */ a("div", { style: { width: W, height: d } }),
|
|
1570
|
-
children: /* @__PURE__ */ a(
|
|
1570
|
+
children: /* @__PURE__ */ a(nt, { width: W, height: d, color: "#FFFFFF" })
|
|
1571
1571
|
}
|
|
1572
1572
|
),
|
|
1573
1573
|
children: /* @__PURE__ */ a(
|
|
1574
1574
|
H,
|
|
1575
1575
|
{
|
|
1576
1576
|
condition: !t.eventApi.getStart().isBefore(s.getStart()),
|
|
1577
|
-
fallback: /* @__PURE__ */ a(
|
|
1577
|
+
fallback: /* @__PURE__ */ a(nt, { width: W, height: d, color: "#FFFFFF" }),
|
|
1578
1578
|
children: /* @__PURE__ */ a(
|
|
1579
1579
|
"div",
|
|
1580
1580
|
{
|
|
1581
1581
|
className: "schedulant-event-resize-handle",
|
|
1582
1582
|
onMouseDown: p,
|
|
1583
1583
|
style: { width: W, height: d, cursor: "ew-resize" },
|
|
1584
|
-
children: /* @__PURE__ */ a(
|
|
1584
|
+
children: /* @__PURE__ */ a(st, { width: W, height: d, color: "#FFFFFF" })
|
|
1585
1585
|
}
|
|
1586
1586
|
)
|
|
1587
1587
|
}
|
|
@@ -1648,21 +1648,21 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1648
1648
|
{
|
|
1649
1649
|
condition: t.eventApi.getEnd().isAfter(s.getEnd()),
|
|
1650
1650
|
fallback: /* @__PURE__ */ a("div", { style: { width: W, height: d } }),
|
|
1651
|
-
children: /* @__PURE__ */ a(
|
|
1651
|
+
children: /* @__PURE__ */ a(it, { width: W, height: d, color: "#FFFFFF" })
|
|
1652
1652
|
}
|
|
1653
1653
|
),
|
|
1654
1654
|
children: /* @__PURE__ */ a(
|
|
1655
1655
|
H,
|
|
1656
1656
|
{
|
|
1657
1657
|
condition: t.eventApi.getEnd().isSameOrBefore(s.getEnd()),
|
|
1658
|
-
fallback: /* @__PURE__ */ a(
|
|
1658
|
+
fallback: /* @__PURE__ */ a(it, { width: W, height: d, color: "#FFFFFF" }),
|
|
1659
1659
|
children: /* @__PURE__ */ a(
|
|
1660
1660
|
"div",
|
|
1661
1661
|
{
|
|
1662
1662
|
className: "schedulant-event-resize-handle",
|
|
1663
1663
|
onMouseDown: S,
|
|
1664
1664
|
style: { width: W, height: d, cursor: "ew-resize" },
|
|
1665
|
-
children: /* @__PURE__ */ a(
|
|
1665
|
+
children: /* @__PURE__ */ a(st, { width: W, height: d, color: "#FFFFFF" })
|
|
1666
1666
|
}
|
|
1667
1667
|
)
|
|
1668
1668
|
}
|
|
@@ -1674,7 +1674,7 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1674
1674
|
)
|
|
1675
1675
|
}
|
|
1676
1676
|
) });
|
|
1677
|
-
}),
|
|
1677
|
+
}), Ln = (t, e, n) => {
|
|
1678
1678
|
const s = n.getTime(), i = s.isBefore(E(), "day"), r = s.isAfter(E(), "day"), o = s.isSame(E(), "day");
|
|
1679
1679
|
return N(() => {
|
|
1680
1680
|
const l = t.current;
|
|
@@ -1697,39 +1697,39 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1697
1697
|
});
|
|
1698
1698
|
};
|
|
1699
1699
|
}, [e, n, t, i, r, o]), { isPast: i, isFuture: r, isProcess: o };
|
|
1700
|
-
},
|
|
1700
|
+
}, yt = (t) => {
|
|
1701
1701
|
const e = F(() => "schedulant-timeline-marker-position-guide", []), n = k(0), s = k(0), i = k(0), r = k(!1), o = C((p) => {
|
|
1702
|
-
const S = p.style.left,
|
|
1703
|
-
|
|
1702
|
+
const S = p.style.left, b = p.style.right, g = t.schedulantApi.getScheduleView().getTimelineView(), y = t.milestoneApi?.getResourceApi() ?? t.checkpointApi?.getResourceApi(), v = g.calculateLaneHeight(y), M = document.createElement("div");
|
|
1703
|
+
M.className = e, Object.assign(M.style, {
|
|
1704
1704
|
position: "absolute",
|
|
1705
1705
|
zIndex: 1,
|
|
1706
1706
|
left: S,
|
|
1707
|
-
right:
|
|
1707
|
+
right: b,
|
|
1708
1708
|
height: w(v),
|
|
1709
1709
|
backgroundColor: t.schedulantApi.getDragHintColor()
|
|
1710
|
-
}), p.parentNode?.insertBefore(
|
|
1710
|
+
}), p.parentNode?.insertBefore(M, p);
|
|
1711
1711
|
}, [t, e]), l = C((p) => {
|
|
1712
1712
|
const S = p.previousElementSibling;
|
|
1713
1713
|
S?.className === e && p.parentElement?.removeChild(S);
|
|
1714
1714
|
}, [e]), c = C((p) => {
|
|
1715
|
-
const g = t.schedulantApi.getScheduleView().getTimelineView(), y = p - n.current, v = t.timelineWidth,
|
|
1715
|
+
const g = t.schedulantApi.getScheduleView().getTimelineView(), y = p - n.current, v = t.timelineWidth, M = g.getTotalSlots(), D = Math.round(y / v * M), T = D / M * t.timelineWidth;
|
|
1716
1716
|
return {
|
|
1717
|
-
moveSlots:
|
|
1718
|
-
distance:
|
|
1717
|
+
moveSlots: D,
|
|
1718
|
+
distance: T,
|
|
1719
1719
|
deltaX: y,
|
|
1720
1720
|
totalWidth: v,
|
|
1721
|
-
totalSlots:
|
|
1721
|
+
totalSlots: M
|
|
1722
1722
|
};
|
|
1723
1723
|
}, [t]), d = C((p, S) => {
|
|
1724
|
-
const
|
|
1725
|
-
if (
|
|
1724
|
+
const b = p.previousElementSibling;
|
|
1725
|
+
if (b && b.className === e) {
|
|
1726
1726
|
const { distance: g } = c(S);
|
|
1727
|
-
|
|
1727
|
+
b.style.left = w(Math.max(s.current + g, 0)), b.style.right = w(i.current - g);
|
|
1728
1728
|
}
|
|
1729
1729
|
}, [e, c]), m = C((p, S) => {
|
|
1730
|
-
const { moveSlots:
|
|
1730
|
+
const { moveSlots: b, distance: g } = c(S);
|
|
1731
1731
|
if (p.style.left = w(Math.max(s.current + g, 0)), p.style.right = w(i.current - g), t.milestoneApi) {
|
|
1732
|
-
const y = t.milestoneApi.getTime().add(
|
|
1732
|
+
const y = t.milestoneApi.getTime().add(b, "day");
|
|
1733
1733
|
t.schedulantApi.milestoneMove({
|
|
1734
1734
|
el: p,
|
|
1735
1735
|
date: y,
|
|
@@ -1737,7 +1737,7 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1737
1737
|
milestoneApi: t.milestoneApi
|
|
1738
1738
|
});
|
|
1739
1739
|
} else if (t.checkpointApi) {
|
|
1740
|
-
const y = t.checkpointApi.getTime().add(
|
|
1740
|
+
const y = t.checkpointApi.getTime().add(b, "day");
|
|
1741
1741
|
t.schedulantApi.checkpointMove({
|
|
1742
1742
|
el: p,
|
|
1743
1743
|
date: y,
|
|
@@ -1748,38 +1748,38 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1748
1748
|
n.current = 0;
|
|
1749
1749
|
}, [t, c]), f = C((p) => {
|
|
1750
1750
|
p.preventDefault();
|
|
1751
|
-
const S = t.markerRef.current,
|
|
1752
|
-
if (S &&
|
|
1751
|
+
const S = t.markerRef.current, b = r.current;
|
|
1752
|
+
if (S && b) {
|
|
1753
1753
|
const g = p.clientX - n.current, y = s.current + g, v = i.current - g;
|
|
1754
1754
|
S.style.left = w(y), S.style.right = w(v), d(S, p.clientX);
|
|
1755
1755
|
}
|
|
1756
|
-
}, [t.markerRef, d]),
|
|
1757
|
-
() =>
|
|
1756
|
+
}, [t.markerRef, d]), h = F(
|
|
1757
|
+
() => pt(f, ht),
|
|
1758
1758
|
[f]
|
|
1759
|
-
),
|
|
1759
|
+
), u = C((p) => {
|
|
1760
1760
|
p.preventDefault();
|
|
1761
|
-
const S = t.markerRef.current,
|
|
1762
|
-
|
|
1763
|
-
}, [
|
|
1761
|
+
const S = t.markerRef.current, b = r.current, g = t.schedulantApi.getSchedulantElRef().current;
|
|
1762
|
+
b && g && S && (l(S), m(S, p.clientX), g.removeEventListener("mousemove", h), r.current = !1);
|
|
1763
|
+
}, [h, t.markerRef, t.schedulantApi, l, m]), A = C((p) => {
|
|
1764
1764
|
p.preventDefault();
|
|
1765
|
-
const S = t.schedulantApi.getSchedulantElRef().current,
|
|
1766
|
-
S &&
|
|
1767
|
-
}, [o,
|
|
1765
|
+
const S = t.schedulantApi.getSchedulantElRef().current, b = t.markerRef.current;
|
|
1766
|
+
S && b && (r.current = !0, n.current = p.clientX, s.current = oe(b.style.left), i.current = oe(b.style.right), o(b), S.addEventListener("mousemove", h));
|
|
1767
|
+
}, [o, h, t.markerRef, t.schedulantApi]);
|
|
1768
1768
|
return N(() => {
|
|
1769
1769
|
const p = t.schedulantApi.getSchedulantElRef().current, S = t.markerRef.current;
|
|
1770
1770
|
if (p && S) {
|
|
1771
|
-
const
|
|
1772
|
-
if (
|
|
1771
|
+
const b = S.parentElement?.parentElement;
|
|
1772
|
+
if (b) {
|
|
1773
1773
|
const g = (y) => {
|
|
1774
|
-
y.preventDefault(), r.current && !
|
|
1774
|
+
y.preventDefault(), r.current && !b.contains(y.relatedTarget) && (l(S), m(S, y.clientX), p.removeEventListener("mousemove", h), r.current = !1);
|
|
1775
1775
|
};
|
|
1776
|
-
return
|
|
1777
|
-
|
|
1776
|
+
return b.addEventListener("mouseup", g), b.addEventListener("mouseout", g), () => {
|
|
1777
|
+
b.removeEventListener("mouseup", g), b.removeEventListener("mouseout", g), p.removeEventListener("mousemove", h), h.cancel();
|
|
1778
1778
|
};
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
|
-
}, [
|
|
1782
|
-
},
|
|
1781
|
+
}, [h, t, l, m]), { handleMouseUp: u, handleMouseDown: A };
|
|
1782
|
+
}, Nn = (t) => /* @__PURE__ */ a(X, { component: () => /* @__PURE__ */ O(
|
|
1783
1783
|
"svg",
|
|
1784
1784
|
{
|
|
1785
1785
|
className: "flag-icon",
|
|
@@ -1805,20 +1805,22 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1805
1805
|
)
|
|
1806
1806
|
]
|
|
1807
1807
|
}
|
|
1808
|
-
), ...t }),
|
|
1809
|
-
const e = k(null), n = k(null), s = t.schedulantApi.isEditable(), i = t.milestoneApi.getStatus(),
|
|
1808
|
+
), ...t }), Yn = ae((t) => {
|
|
1809
|
+
const e = k(null), n = k(null), s = t.schedulantApi.isEditable(), i = t.milestoneApi.getStatus(), o = t.schedulantApi.getScheduleView().getTimelineView().calculateLaneHeight(t.milestoneApi.getResourceApi()), l = o * $t * -1, { isPast: c, isFuture: d, isProcess: m } = Ln(e, t.schedulantApi, t.milestoneApi), f = t.milestoneApi.getColor().getOrElse(
|
|
1810
|
+
d ? "#1677ff" : m ? i === "Success" ? "#1677ff" : i === "Failure" ? "#f5222d" : "#faad14" : i === "Success" ? "#52c41a" : i === "Failure" ? "#f5222d" : "#faad14"
|
|
1811
|
+
), { handleMouseUp: h, handleMouseDown: u } = yt({
|
|
1810
1812
|
markerRef: n,
|
|
1811
1813
|
timelineWidth: t.timelineWidth,
|
|
1812
1814
|
schedulantApi: t.schedulantApi,
|
|
1813
1815
|
milestoneApi: t.milestoneApi
|
|
1814
1816
|
});
|
|
1815
1817
|
return /* @__PURE__ */ a("div", { className: "schedulant-timeline-milestone-harness", style: {
|
|
1816
|
-
top: w(
|
|
1817
|
-
height: w(
|
|
1818
|
-
lineHeight: w(
|
|
1818
|
+
top: w(l),
|
|
1819
|
+
height: w(o),
|
|
1820
|
+
lineHeight: w(o),
|
|
1819
1821
|
left: w(t.position.left),
|
|
1820
1822
|
right: w(t.position.right)
|
|
1821
|
-
}, onMouseUp: s ?
|
|
1823
|
+
}, onMouseUp: s ? h : void 0, onMouseDown: s ? u : void 0, ref: n, children: /* @__PURE__ */ a(
|
|
1822
1824
|
Z,
|
|
1823
1825
|
{
|
|
1824
1826
|
disabled: !t.schedulantApi.isEnableMilestoneContextMenu(),
|
|
@@ -1827,23 +1829,31 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1827
1829
|
menu: {
|
|
1828
1830
|
items: t.schedulantApi.getMilestoneContextMenuItems(),
|
|
1829
1831
|
onClick: (A) => {
|
|
1830
|
-
const { key: p, keyPath: S, domEvent:
|
|
1832
|
+
const { key: p, keyPath: S, domEvent: b } = A;
|
|
1831
1833
|
t.schedulantApi.onMilestoneContextMenuClick({
|
|
1832
1834
|
key: p,
|
|
1833
1835
|
keyPath: S,
|
|
1834
|
-
domEvent:
|
|
1835
|
-
isPast:
|
|
1836
|
-
isFuture:
|
|
1837
|
-
isProcess:
|
|
1836
|
+
domEvent: b,
|
|
1837
|
+
isPast: c,
|
|
1838
|
+
isFuture: d,
|
|
1839
|
+
isProcess: m,
|
|
1838
1840
|
milestoneApi: t.milestoneApi,
|
|
1839
1841
|
schedulantApi: t.schedulantApi
|
|
1840
1842
|
});
|
|
1841
1843
|
}
|
|
1842
1844
|
},
|
|
1843
|
-
children: /* @__PURE__ */ a(
|
|
1845
|
+
children: /* @__PURE__ */ a(
|
|
1846
|
+
"div",
|
|
1847
|
+
{
|
|
1848
|
+
className: `schedulant-timeline-milestone${m ? " schedulant-milestone-today" : ""}`,
|
|
1849
|
+
style: m ? { "--milestone-glow-color": f } : void 0,
|
|
1850
|
+
ref: e,
|
|
1851
|
+
children: /* @__PURE__ */ a("div", { className: "schedulant-milestone-main", children: /* @__PURE__ */ a(Nn, { width: o * ze, height: o * ze, color: f }) })
|
|
1852
|
+
}
|
|
1853
|
+
)
|
|
1844
1854
|
}
|
|
1845
1855
|
) });
|
|
1846
|
-
}),
|
|
1856
|
+
}), _n = (t, e, n) => {
|
|
1847
1857
|
const s = n.getTime(), i = s.isBefore(E(), "day"), r = s.isAfter(E(), "day"), o = s.isSame(E(), "day");
|
|
1848
1858
|
return N(() => {
|
|
1849
1859
|
const l = t.current;
|
|
@@ -1866,7 +1876,7 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1866
1876
|
});
|
|
1867
1877
|
};
|
|
1868
1878
|
}, [e, n, t, i, r, o]), { isPast: i, isFuture: r, isProcess: o };
|
|
1869
|
-
},
|
|
1879
|
+
}, Wn = (t) => /* @__PURE__ */ a(X, { component: () => /* @__PURE__ */ O(
|
|
1870
1880
|
"svg",
|
|
1871
1881
|
{
|
|
1872
1882
|
className: "droplet-icon",
|
|
@@ -1893,12 +1903,12 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1893
1903
|
/* @__PURE__ */ a("path", { d: "M 517,116 A 154,154 0 1 1 517,424 A 154,154 0 1 1 517,116 Z", fill: t.color })
|
|
1894
1904
|
]
|
|
1895
1905
|
}
|
|
1896
|
-
), ...t }),
|
|
1906
|
+
), ...t }), Hn = ae((t) => {
|
|
1897
1907
|
const e = k(null), n = k(null), s = t.schedulantApi.isEditable(), i = t.checkpointApi.getColor().getOrElse("black"), r = t.schedulantApi.getScheduleView().getTimelineView(), o = r.calculateLaneHeight(t.checkpointApi.getResourceApi()), l = r.calculateEventHeight(), c = (o - l) / 2 + 2, {
|
|
1898
1908
|
isPast: d,
|
|
1899
1909
|
isFuture: m,
|
|
1900
1910
|
isProcess: f
|
|
1901
|
-
} =
|
|
1911
|
+
} = _n(e, t.schedulantApi, t.checkpointApi), { handleMouseUp: h, handleMouseDown: u } = yt({
|
|
1902
1912
|
markerRef: n,
|
|
1903
1913
|
timelineWidth: t.timelineWidth,
|
|
1904
1914
|
schedulantApi: t.schedulantApi,
|
|
@@ -1915,8 +1925,8 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1915
1925
|
left: w(t.position.left),
|
|
1916
1926
|
right: w(t.position.right)
|
|
1917
1927
|
},
|
|
1918
|
-
onMouseUp: s ?
|
|
1919
|
-
onMouseDown: s ?
|
|
1928
|
+
onMouseUp: s ? h : void 0,
|
|
1929
|
+
onMouseDown: s ? u : void 0,
|
|
1920
1930
|
ref: n,
|
|
1921
1931
|
children: /* @__PURE__ */ a(
|
|
1922
1932
|
Z,
|
|
@@ -1927,11 +1937,11 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1927
1937
|
menu: {
|
|
1928
1938
|
items: t.schedulantApi.getCheckpointContextMenuItems(),
|
|
1929
1939
|
onClick: (A) => {
|
|
1930
|
-
const { key: p, keyPath: S, domEvent:
|
|
1940
|
+
const { key: p, keyPath: S, domEvent: b } = A;
|
|
1931
1941
|
t.schedulantApi.onCheckpointContextMenuClick({
|
|
1932
1942
|
key: p,
|
|
1933
1943
|
keyPath: S,
|
|
1934
|
-
domEvent:
|
|
1944
|
+
domEvent: b,
|
|
1935
1945
|
isPast: d,
|
|
1936
1946
|
isFuture: m,
|
|
1937
1947
|
isProcess: f,
|
|
@@ -1940,7 +1950,7 @@ const vt = /* @__PURE__ */ An(Pn), Ln = (t) => {
|
|
|
1940
1950
|
});
|
|
1941
1951
|
}
|
|
1942
1952
|
},
|
|
1943
|
-
children: /* @__PURE__ */ a("div", { className: "schedulant-timeline-checkpoint", ref: e, children: /* @__PURE__ */ a("div", { className: "schedulant-checkpoint-main", children: /* @__PURE__ */ a(
|
|
1953
|
+
children: /* @__PURE__ */ a("div", { className: "schedulant-timeline-checkpoint", ref: e, children: /* @__PURE__ */ a("div", { className: "schedulant-checkpoint-main", children: /* @__PURE__ */ a(Wn, { width: l, height: l, color: i }) }) })
|
|
1944
1954
|
}
|
|
1945
1955
|
)
|
|
1946
1956
|
}
|
|
@@ -1958,14 +1968,14 @@ class J {
|
|
|
1958
1968
|
return this.schedulantApi.getTimelineApi();
|
|
1959
1969
|
}
|
|
1960
1970
|
renderLane() {
|
|
1961
|
-
return /* @__PURE__ */ a(
|
|
1971
|
+
return /* @__PURE__ */ a(pn, {});
|
|
1962
1972
|
}
|
|
1963
1973
|
renderEvents(e, n) {
|
|
1964
1974
|
const s = this.schedulantApi.getTimelineApi(), i = e.getEventApis();
|
|
1965
1975
|
return /* @__PURE__ */ a("div", { className: "schedulant-timeline-events schedulant-scrollgrid-sync-inner", children: i.filter((r) => !r.getStart().isAfter(s.getEnd()) && !r.getEnd().isBefore(s.getStart())).map((r) => {
|
|
1966
1976
|
const o = this.calculatePosition(n, r.getStart(), r.getEnd());
|
|
1967
1977
|
return /* @__PURE__ */ a(
|
|
1968
|
-
|
|
1978
|
+
Pn,
|
|
1969
1979
|
{
|
|
1970
1980
|
eventApi: r,
|
|
1971
1981
|
position: o,
|
|
@@ -1982,7 +1992,7 @@ class J {
|
|
|
1982
1992
|
return /* @__PURE__ */ a("div", { className: "schedulant-timeline-milestones schedulant-scrollgrid-sync-inner", children: i.filter((r) => (r.getTime().isAfter(s.getStart(), "day") || r.getTime().isSame(s.getStart(), "day")) && r.getTime().isSameOrBefore(s.getEnd(), "day")).map((r) => {
|
|
1983
1993
|
const o = this.calculatePosition(n, r.getTime(), r.getTime());
|
|
1984
1994
|
return /* @__PURE__ */ a(
|
|
1985
|
-
|
|
1995
|
+
Yn,
|
|
1986
1996
|
{
|
|
1987
1997
|
position: o,
|
|
1988
1998
|
milestoneApi: r,
|
|
@@ -1998,7 +2008,7 @@ class J {
|
|
|
1998
2008
|
return /* @__PURE__ */ a("div", { className: "schedulant-timeline-checkpoints schedulant-scrollgrid-sync-inner", children: i.filter((r) => (r.getTime().isAfter(s.getStart(), "day") || r.getTime().isSame(s.getStart(), "day")) && r.getTime().isSameOrBefore(s.getEnd(), "day")).map((r) => {
|
|
1999
2009
|
const o = this.calculatePosition(n, r.getTime(), r.getTime());
|
|
2000
2010
|
return /* @__PURE__ */ a(
|
|
2001
|
-
|
|
2011
|
+
Hn,
|
|
2002
2012
|
{
|
|
2003
2013
|
position: o,
|
|
2004
2014
|
timelineWidth: n,
|
|
@@ -2010,17 +2020,16 @@ class J {
|
|
|
2010
2020
|
}) });
|
|
2011
2021
|
}
|
|
2012
2022
|
calculateLaneHeight(e) {
|
|
2013
|
-
|
|
2014
|
-
return e.getMilestoneApis().filter((r) => !r.getTime().isBefore(n) && !r.getTime().isAfter(s)).length === 0 ? this.schedulantApi.getLineHeight() : this.schedulantApi.getLineHeight() * mt;
|
|
2023
|
+
return this.schedulantApi.getLineHeight();
|
|
2015
2024
|
}
|
|
2016
2025
|
calculateEventHeight() {
|
|
2017
|
-
return this.schedulantApi.getLineHeight() *
|
|
2026
|
+
return this.schedulantApi.getLineHeight() * jt;
|
|
2018
2027
|
}
|
|
2019
2028
|
}
|
|
2020
2029
|
const ee = (t) => {
|
|
2021
2030
|
const { dates: e, minWidth: n } = t;
|
|
2022
2031
|
return /* @__PURE__ */ a("colgroup", { children: e.map((s) => /* @__PURE__ */ a("col", { style: { minWidth: n } }, s.format("YYYY-MM-DD"))) });
|
|
2023
|
-
},
|
|
2032
|
+
}, zn = (t, e, n) => {
|
|
2024
2033
|
const s = n.isBefore(E(), "day"), i = n.isAfter(E(), "day"), r = n.isSame(E(), "day");
|
|
2025
2034
|
N(() => {
|
|
2026
2035
|
const o = t.current;
|
|
@@ -2047,7 +2056,7 @@ const ee = (t) => {
|
|
|
2047
2056
|
}, [n, i, s, r, e, t]);
|
|
2048
2057
|
}, te = ae((t) => {
|
|
2049
2058
|
const e = k(null);
|
|
2050
|
-
return
|
|
2059
|
+
return zn(e, t.schedulantApi, t.date), /* @__PURE__ */ a(
|
|
2051
2060
|
"td",
|
|
2052
2061
|
{
|
|
2053
2062
|
ref: e,
|
|
@@ -2057,7 +2066,7 @@ const ee = (t) => {
|
|
|
2057
2066
|
},
|
|
2058
2067
|
t.date.format("YYYY-MM-DD")
|
|
2059
2068
|
);
|
|
2060
|
-
}),
|
|
2069
|
+
}), Vn = (t, e, n, s, i) => {
|
|
2061
2070
|
const r = n.isBefore(E(), "day"), o = n.isAfter(E(), "day"), l = n.isSame(E(), "day");
|
|
2062
2071
|
N(() => {
|
|
2063
2072
|
const c = t.current;
|
|
@@ -2088,7 +2097,7 @@ const ee = (t) => {
|
|
|
2088
2097
|
}, [n, o, r, l, s, e, i, t]);
|
|
2089
2098
|
}, B = (t) => {
|
|
2090
2099
|
const e = k(null);
|
|
2091
|
-
return
|
|
2100
|
+
return Vn(e, t.schedulantApi, t.date, t.level, t.timeText), /* @__PURE__ */ a(
|
|
2092
2101
|
"th",
|
|
2093
2102
|
{
|
|
2094
2103
|
ref: e,
|
|
@@ -2107,7 +2116,7 @@ const ee = (t) => {
|
|
|
2107
2116
|
t.date.format("YYYY-MM-DD")
|
|
2108
2117
|
);
|
|
2109
2118
|
};
|
|
2110
|
-
class
|
|
2119
|
+
class Fn extends J {
|
|
2111
2120
|
renderColgroup() {
|
|
2112
2121
|
const e = this.getSchedulantApi(), s = this.getTimelineApi().getDays(), i = e.getSlotMinWidth();
|
|
2113
2122
|
return /* @__PURE__ */ a(ee, { dates: s, minWidth: i });
|
|
@@ -2127,7 +2136,7 @@ class qn extends J {
|
|
|
2127
2136
|
}
|
|
2128
2137
|
renderHeaderSlots() {
|
|
2129
2138
|
const e = this.getTimelineApi(), n = e.getDays(), s = e.populateMonthsWithDays(), i = e.populateYearsWithDays();
|
|
2130
|
-
return /* @__PURE__ */
|
|
2139
|
+
return /* @__PURE__ */ O("tbody", { children: [
|
|
2131
2140
|
/* @__PURE__ */ a("tr", { role: "row", className: "schedulant-timeline-head-row", children: i.map((r) => /* @__PURE__ */ a(
|
|
2132
2141
|
B,
|
|
2133
2142
|
{
|
|
@@ -2190,7 +2199,7 @@ class qn extends J {
|
|
|
2190
2199
|
return { left: o, right: l };
|
|
2191
2200
|
}
|
|
2192
2201
|
}
|
|
2193
|
-
class
|
|
2202
|
+
class Bn extends J {
|
|
2194
2203
|
getTotalSlots() {
|
|
2195
2204
|
return this.getTimelineApi().getMonths().length;
|
|
2196
2205
|
}
|
|
@@ -2213,7 +2222,7 @@ class Un extends J {
|
|
|
2213
2222
|
}
|
|
2214
2223
|
renderHeaderSlots() {
|
|
2215
2224
|
const e = this.getTimelineApi(), n = e.getMonths(), s = e.populateYearsWithMonths();
|
|
2216
|
-
return /* @__PURE__ */
|
|
2225
|
+
return /* @__PURE__ */ O("tbody", { children: [
|
|
2217
2226
|
/* @__PURE__ */ a("tr", { role: "row", className: "schedulant-timeline-head-row", children: s.map((i) => /* @__PURE__ */ a(
|
|
2218
2227
|
B,
|
|
2219
2228
|
{
|
|
@@ -2243,11 +2252,11 @@ class Un extends J {
|
|
|
2243
2252
|
] });
|
|
2244
2253
|
}
|
|
2245
2254
|
calculatePosition(e, n, s) {
|
|
2246
|
-
const i = this.getTimelineApi(), r = i.getMonths(), o = e / r.length, l = n.isBefore(i.getStart()) ? i.getStart() : n, c = s.isAfter(i.getEnd()) ? i.getEnd() : s, d = l.date() - 1, m = o / l.daysInMonth(), f = i.getMonthPosition(l) * o,
|
|
2247
|
-
return { left:
|
|
2255
|
+
const i = this.getTimelineApi(), r = i.getMonths(), o = e / r.length, l = n.isBefore(i.getStart()) ? i.getStart() : n, c = s.isAfter(i.getEnd()) ? i.getEnd() : s, d = l.date() - 1, m = o / l.daysInMonth(), f = i.getMonthPosition(l) * o, h = n.isSameOrBefore(i.getStart(), "day") ? f : f + d * m, u = c.daysInMonth() - c.date(), A = o / c.daysInMonth(), p = (i.getMonthPosition(c) + 1) * o * -1, S = s.isBefore(i.getEnd(), "day") ? p + u * A : p;
|
|
2256
|
+
return { left: h, right: S };
|
|
2248
2257
|
}
|
|
2249
2258
|
}
|
|
2250
|
-
class
|
|
2259
|
+
class qn extends J {
|
|
2251
2260
|
getTotalSlots() {
|
|
2252
2261
|
return this.getTimelineApi().getQuarters().length;
|
|
2253
2262
|
}
|
|
@@ -2270,7 +2279,7 @@ class jn extends J {
|
|
|
2270
2279
|
}
|
|
2271
2280
|
renderHeaderSlots() {
|
|
2272
2281
|
const e = this.getTimelineApi(), n = e.getQuarters(), s = e.populateYearsWithQuarters();
|
|
2273
|
-
return /* @__PURE__ */
|
|
2282
|
+
return /* @__PURE__ */ O("tbody", { children: [
|
|
2274
2283
|
/* @__PURE__ */ a("tr", { role: "row", className: "schedulant-timeline-head-row", children: s.map((i) => /* @__PURE__ */ a(
|
|
2275
2284
|
B,
|
|
2276
2285
|
{
|
|
@@ -2300,11 +2309,11 @@ class jn extends J {
|
|
|
2300
2309
|
] });
|
|
2301
2310
|
}
|
|
2302
2311
|
calculatePosition(e, n, s) {
|
|
2303
|
-
const i = this.getTimelineApi(), r = i.getQuarters(), o = e / r.length, l = n.isBefore(i.getStart()) ? i.getStart() : n, c = s.isAfter(i.getEnd()) ? i.getEnd() : s, d = l.endOf("quarter").diff(l.startOf("quarter"), "day") + 1, m = n.diff(l.startOf("quarter"), "day"), f = o / d,
|
|
2312
|
+
const i = this.getTimelineApi(), r = i.getQuarters(), o = e / r.length, l = n.isBefore(i.getStart()) ? i.getStart() : n, c = s.isAfter(i.getEnd()) ? i.getEnd() : s, d = l.endOf("quarter").diff(l.startOf("quarter"), "day") + 1, m = n.diff(l.startOf("quarter"), "day"), f = o / d, h = m * f, u = i.getQuarterPosition(l) * o, A = n.isSameOrBefore(i.getStart(), "day") ? u : u + h, p = c.endOf("quarter").diff(c.startOf("quarter"), "day") + 1, S = c.endOf("quarter").diff(c, "day"), b = o / p, g = S * b, y = (i.getQuarterPosition(c) + 1) * o * -1, v = s.isBefore(i.getEnd(), "day") ? y + g : y;
|
|
2304
2313
|
return { left: A, right: v };
|
|
2305
2314
|
}
|
|
2306
2315
|
}
|
|
2307
|
-
class
|
|
2316
|
+
class Un extends J {
|
|
2308
2317
|
getTotalSlots() {
|
|
2309
2318
|
return this.getTimelineApi().getWeeks().length;
|
|
2310
2319
|
}
|
|
@@ -2342,11 +2351,11 @@ class $n extends J {
|
|
|
2342
2351
|
)) }) });
|
|
2343
2352
|
}
|
|
2344
2353
|
calculatePosition(e, n, s) {
|
|
2345
|
-
const i = this.getTimelineApi(), r = i.getWeeks(), o = e / r.length, l = n.isBefore(i.getStart()) ? i.getStart() : n, c = s.isAfter(i.getEnd()) ? i.getEnd() : s, d = o / 7, m = l.day(), f = i.getWeekPosition(l) * o,
|
|
2346
|
-
return { left:
|
|
2354
|
+
const i = this.getTimelineApi(), r = i.getWeeks(), o = e / r.length, l = n.isBefore(i.getStart()) ? i.getStart() : n, c = s.isAfter(i.getEnd()) ? i.getEnd() : s, d = o / 7, m = l.day(), f = i.getWeekPosition(l) * o, h = n.isSameOrBefore(i.getStart(), "day") ? f : f + m * d, u = 6 - c.day(), A = (i.getWeekPosition(c) + 1) * o * -1, p = s.isBefore(i.getEnd(), "day") ? A + u * d : A;
|
|
2355
|
+
return { left: h, right: p };
|
|
2347
2356
|
}
|
|
2348
2357
|
}
|
|
2349
|
-
class
|
|
2358
|
+
class jn extends J {
|
|
2350
2359
|
getTotalSlots() {
|
|
2351
2360
|
return this.getTimelineApi().getYears().length;
|
|
2352
2361
|
}
|
|
@@ -2384,30 +2393,30 @@ class Gn extends J {
|
|
|
2384
2393
|
)) }) });
|
|
2385
2394
|
}
|
|
2386
2395
|
calculatePosition(e, n, s) {
|
|
2387
|
-
const i = this.getTimelineApi(), r = i.getYears(), o = e / r.length, l = n.isBefore(i.getStart()) ? i.getStart() : n, c = s.isAfter(i.getEnd()) ? i.getEnd() : s, d = l.endOf("year").diff(l.startOf("year"), "day") + 1, m = l.diff(l.startOf("year"), "day"), f = o / d,
|
|
2396
|
+
const i = this.getTimelineApi(), r = i.getYears(), o = e / r.length, l = n.isBefore(i.getStart()) ? i.getStart() : n, c = s.isAfter(i.getEnd()) ? i.getEnd() : s, d = l.endOf("year").diff(l.startOf("year"), "day") + 1, m = l.diff(l.startOf("year"), "day"), f = o / d, h = m * f, u = i.getYearPosition(l) * o, A = n.isSameOrBefore(i.getStart(), "day") ? u : u + h, p = c.endOf("year").diff(c.startOf("year"), "day") + 1, S = c.endOf("year").diff(c, "day"), b = o / p, g = S * b, y = (i.getYearPosition(c) + 1) * o * -1, v = s.isBefore(i.getEnd(), "day") ? y + g : y;
|
|
2388
2397
|
return { left: A, right: v };
|
|
2389
2398
|
}
|
|
2390
2399
|
}
|
|
2391
|
-
class
|
|
2400
|
+
class $n {
|
|
2392
2401
|
schedulantApi;
|
|
2393
2402
|
timelineView;
|
|
2394
2403
|
schedulantElRef;
|
|
2395
2404
|
constructor(e, n) {
|
|
2396
|
-
switch (this.schedulantElRef = n, this.schedulantApi = new
|
|
2405
|
+
switch (this.schedulantElRef = n, this.schedulantApi = new rn(this, e), this.schedulantApi.getSchedulantViewType()) {
|
|
2397
2406
|
case "Day":
|
|
2398
|
-
this.timelineView = new
|
|
2407
|
+
this.timelineView = new Fn(this.schedulantApi);
|
|
2399
2408
|
break;
|
|
2400
2409
|
case "Week":
|
|
2401
|
-
this.timelineView = new
|
|
2410
|
+
this.timelineView = new Un(this.schedulantApi);
|
|
2402
2411
|
break;
|
|
2403
2412
|
case "Month":
|
|
2404
|
-
this.timelineView = new
|
|
2413
|
+
this.timelineView = new Bn(this.schedulantApi);
|
|
2405
2414
|
break;
|
|
2406
2415
|
case "Quarter":
|
|
2407
|
-
this.timelineView = new
|
|
2416
|
+
this.timelineView = new qn(this.schedulantApi);
|
|
2408
2417
|
break;
|
|
2409
2418
|
case "Year":
|
|
2410
|
-
this.timelineView = new
|
|
2419
|
+
this.timelineView = new jn(this.schedulantApi);
|
|
2411
2420
|
break;
|
|
2412
2421
|
}
|
|
2413
2422
|
}
|
|
@@ -2428,7 +2437,7 @@ class Xn {
|
|
|
2428
2437
|
{
|
|
2429
2438
|
"data-resource-id": c.getId(),
|
|
2430
2439
|
className: "schedulant-timeline-lane schedulant-resource",
|
|
2431
|
-
children: /* @__PURE__ */
|
|
2440
|
+
children: /* @__PURE__ */ O("div", { className: "schedulant-timeline-lane-frame", style: { height: d }, children: [
|
|
2432
2441
|
this.timelineView.renderLane(),
|
|
2433
2442
|
/* @__PURE__ */ a("div", { className: "schedulant-timeline-lane-bg" }),
|
|
2434
2443
|
this.timelineView.renderEvents(c, i),
|
|
@@ -2438,7 +2447,7 @@ class Xn {
|
|
|
2438
2447
|
}
|
|
2439
2448
|
) }, c.getId());
|
|
2440
2449
|
}, o = n.length > 0 ? n[0].start : 0, l = n.length > 0 ? s - n[n.length - 1].end : 0;
|
|
2441
|
-
return /* @__PURE__ */
|
|
2450
|
+
return /* @__PURE__ */ O("tbody", { children: [
|
|
2442
2451
|
o > 0 && /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { style: { height: o, padding: 0, border: "none" } }) }),
|
|
2443
2452
|
n.map((c) => {
|
|
2444
2453
|
const d = e[c.index];
|
|
@@ -2449,12 +2458,12 @@ class Xn {
|
|
|
2449
2458
|
}
|
|
2450
2459
|
renderResourceTableColgroup() {
|
|
2451
2460
|
const e = this.schedulantApi.getResourceAreaColumns();
|
|
2452
|
-
return /* @__PURE__ */ a(
|
|
2461
|
+
return /* @__PURE__ */ a(fn, { resourceAreaColumns: e });
|
|
2453
2462
|
}
|
|
2454
2463
|
renderResourceLabel(e, n) {
|
|
2455
2464
|
const s = this.schedulantApi.getResourceAreaColumns();
|
|
2456
2465
|
return /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ a("tr", { role: "row", children: s.map((i, r) => /* @__PURE__ */ a(
|
|
2457
|
-
|
|
2466
|
+
an,
|
|
2458
2467
|
{
|
|
2459
2468
|
schedulantApi: this.schedulantApi,
|
|
2460
2469
|
cellResizerMouseUp: e,
|
|
@@ -2466,7 +2475,7 @@ class Xn {
|
|
|
2466
2475
|
)) }) });
|
|
2467
2476
|
}
|
|
2468
2477
|
renderResourceLane(e, n, s, i, r, o, l) {
|
|
2469
|
-
const c = this.schedulantApi.getResourceAreaColumns(), d = (
|
|
2478
|
+
const c = this.schedulantApi.getResourceAreaColumns(), d = (h) => c.map((u, A) => {
|
|
2470
2479
|
const p = l ? {
|
|
2471
2480
|
isDraggable: l.isDraggable,
|
|
2472
2481
|
activeId: l.dragState.activeId,
|
|
@@ -2474,27 +2483,27 @@ class Xn {
|
|
|
2474
2483
|
dropPosition: l.dragState.dropPosition
|
|
2475
2484
|
} : {};
|
|
2476
2485
|
return /* @__PURE__ */ a(
|
|
2477
|
-
|
|
2486
|
+
gn,
|
|
2478
2487
|
{
|
|
2479
2488
|
schedulantApi: this.schedulantApi,
|
|
2480
|
-
resourceApi:
|
|
2489
|
+
resourceApi: h,
|
|
2481
2490
|
collapseIds: i,
|
|
2482
2491
|
showPlusSquare: A === 0,
|
|
2483
2492
|
showIndentation: !0,
|
|
2484
2493
|
cellResizerMouseUp: r,
|
|
2485
|
-
resourceAreaColumn:
|
|
2494
|
+
resourceAreaColumn: u,
|
|
2486
2495
|
cellResizerMouseDownFunc: o,
|
|
2487
2496
|
isResizable: A != c.length - 1,
|
|
2488
2497
|
...p
|
|
2489
2498
|
},
|
|
2490
|
-
|
|
2499
|
+
u.field
|
|
2491
2500
|
);
|
|
2492
2501
|
}), m = n.length > 0 ? n[0].start : 0, f = n.length > 0 ? s - n[n.length - 1].end : 0;
|
|
2493
|
-
return /* @__PURE__ */
|
|
2502
|
+
return /* @__PURE__ */ O("tbody", { children: [
|
|
2494
2503
|
m > 0 && /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: c.length, style: { height: m, padding: 0, border: "none" } }) }),
|
|
2495
|
-
n.map((
|
|
2496
|
-
const
|
|
2497
|
-
return /* @__PURE__ */ a("tr", { role: "row", children: d(
|
|
2504
|
+
n.map((h) => {
|
|
2505
|
+
const u = e[h.index];
|
|
2506
|
+
return /* @__PURE__ */ a("tr", { role: "row", children: d(u) }, u.getId());
|
|
2498
2507
|
}),
|
|
2499
2508
|
f > 0 && /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: c.length, style: { height: f, padding: 0, border: "none" } }) })
|
|
2500
2509
|
] });
|
|
@@ -2509,21 +2518,21 @@ class Xn {
|
|
|
2509
2518
|
return this.schedulantElRef;
|
|
2510
2519
|
}
|
|
2511
2520
|
}
|
|
2512
|
-
const
|
|
2521
|
+
const Gn = (t) => {
|
|
2513
2522
|
const { schedulantView: e, cellResizerMouseUp: n, cellResizerMouseDownFunc: s } = t;
|
|
2514
|
-
return /* @__PURE__ */
|
|
2523
|
+
return /* @__PURE__ */ O("table", { role: "presentation", className: "schedulant-datagrid-head schedulant-scrollgrid-sync-table", children: [
|
|
2515
2524
|
e.renderResourceTableColgroup(),
|
|
2516
2525
|
e.renderResourceLabel(n, s)
|
|
2517
2526
|
] });
|
|
2518
|
-
},
|
|
2527
|
+
}, Xn = (t) => /* @__PURE__ */ O("table", { "aria-hidden": !0, className: "schedulant-scrollgrid-sync-table", children: [
|
|
2519
2528
|
t.schedulantView.renderTimelineTableColgroup(),
|
|
2520
2529
|
t.schedulantView.renderTimelineHeaderTableSlots()
|
|
2521
2530
|
] });
|
|
2522
|
-
function
|
|
2531
|
+
function Qn(t, e) {
|
|
2523
2532
|
const n = t - e.top, s = e.height;
|
|
2524
|
-
return n < s *
|
|
2533
|
+
return n < s * Gt ? "before" : n > s * Xt ? "after" : "child";
|
|
2525
2534
|
}
|
|
2526
|
-
function
|
|
2535
|
+
function Kn(t, e) {
|
|
2527
2536
|
let n = e;
|
|
2528
2537
|
for (; n; ) {
|
|
2529
2538
|
if (n.getId() === t) return !0;
|
|
@@ -2532,7 +2541,7 @@ function Jn(t, e) {
|
|
|
2532
2541
|
}
|
|
2533
2542
|
return !1;
|
|
2534
2543
|
}
|
|
2535
|
-
const
|
|
2544
|
+
const Zn = (t, e) => {
|
|
2536
2545
|
const [n, s] = re({
|
|
2537
2546
|
activeId: null,
|
|
2538
2547
|
overId: null,
|
|
@@ -2542,40 +2551,40 @@ const es = (t, e) => {
|
|
|
2542
2551
|
);
|
|
2543
2552
|
o.current = new Map(t.map((f) => [f.getId(), f]));
|
|
2544
2553
|
const l = C((f) => {
|
|
2545
|
-
i.current = null, r.current = null,
|
|
2554
|
+
i.current = null, r.current = null, un(String(f.active.id)), s({
|
|
2546
2555
|
activeId: f.active.id,
|
|
2547
2556
|
overId: null,
|
|
2548
2557
|
dropPosition: null
|
|
2549
2558
|
});
|
|
2550
2559
|
}, []), c = C((f) => {
|
|
2551
|
-
const { active:
|
|
2552
|
-
if (!
|
|
2560
|
+
const { active: h, over: u, activatorEvent: A, delta: p } = f;
|
|
2561
|
+
if (!u || h.id === u.id) {
|
|
2553
2562
|
r.current !== null && (r.current = null, i.current = null, s((y) => ({ ...y, overId: null, dropPosition: null })));
|
|
2554
2563
|
return;
|
|
2555
2564
|
}
|
|
2556
|
-
const S = o.current.get(String(
|
|
2557
|
-
if (!S ||
|
|
2565
|
+
const S = o.current.get(String(u.id));
|
|
2566
|
+
if (!S || Kn(String(h.id), S)) {
|
|
2558
2567
|
r.current !== null && (r.current = null, i.current = null, s((y) => ({ ...y, overId: null, dropPosition: null })));
|
|
2559
2568
|
return;
|
|
2560
2569
|
}
|
|
2561
|
-
const
|
|
2562
|
-
top:
|
|
2563
|
-
height:
|
|
2570
|
+
const b = A.clientY + p.y, g = Qn(b, {
|
|
2571
|
+
top: u.rect.top,
|
|
2572
|
+
height: u.rect.height
|
|
2564
2573
|
});
|
|
2565
|
-
(r.current !==
|
|
2574
|
+
(r.current !== u.id || i.current !== g) && (r.current = u.id, i.current = g, s((y) => ({
|
|
2566
2575
|
...y,
|
|
2567
|
-
overId:
|
|
2576
|
+
overId: u.id,
|
|
2568
2577
|
dropPosition: g
|
|
2569
2578
|
})));
|
|
2570
2579
|
}, []), d = C((f) => {
|
|
2571
|
-
const { active:
|
|
2572
|
-
if (
|
|
2580
|
+
const { active: h, over: u } = f, A = i.current, p = r.current;
|
|
2581
|
+
if (u && h.id !== u.id && A && p) {
|
|
2573
2582
|
const S = document.querySelector(
|
|
2574
2583
|
`[data-resource-id="${String(p)}"]`
|
|
2575
2584
|
);
|
|
2576
2585
|
e(
|
|
2577
2586
|
S || document.body,
|
|
2578
|
-
String(
|
|
2587
|
+
String(h.id),
|
|
2579
2588
|
String(p),
|
|
2580
2589
|
A
|
|
2581
2590
|
);
|
|
@@ -2591,40 +2600,40 @@ const es = (t, e) => {
|
|
|
2591
2600
|
handleDragEnd: d,
|
|
2592
2601
|
handleDragCancel: m
|
|
2593
2602
|
};
|
|
2594
|
-
},
|
|
2603
|
+
}, Jn = ({ transform: t, activatorEvent: e }) => e ? {
|
|
2595
2604
|
...t,
|
|
2596
2605
|
x: t.x + 20,
|
|
2597
2606
|
y: t.y + 20
|
|
2598
|
-
} : t,
|
|
2599
|
-
const { schedulantView: e, virtualizer: n, visibleResources: s, collapseIds: i, cellResizerMouseUp: r, cellResizerMouseDownFunc: o } = t, l = e.getScheduleApi(), c = l.getFlatMapResourceApis(), d = C(async (
|
|
2600
|
-
const P = c.find((z) => z.getId() ===
|
|
2607
|
+
} : t, es = (t) => {
|
|
2608
|
+
const { schedulantView: e, virtualizer: n, visibleResources: s, collapseIds: i, cellResizerMouseUp: r, cellResizerMouseDownFunc: o } = t, l = e.getScheduleApi(), c = l.getFlatMapResourceApis(), d = C(async (M, D, T, I) => {
|
|
2609
|
+
const P = c.find((z) => z.getId() === D), Y = c.find((z) => z.getId() === T);
|
|
2601
2610
|
if (P && Y) {
|
|
2602
2611
|
const z = P.getParent();
|
|
2603
2612
|
l.resourceLaneMove({
|
|
2604
|
-
el:
|
|
2613
|
+
el: M,
|
|
2605
2614
|
schedulantApi: l,
|
|
2606
2615
|
draggedResourceApi: P,
|
|
2607
2616
|
targetResourceApi: Y,
|
|
2608
|
-
position:
|
|
2617
|
+
position: I,
|
|
2609
2618
|
oldParentResourceApi: z.isDefined() ? z.get() : void 0
|
|
2610
2619
|
});
|
|
2611
2620
|
}
|
|
2612
|
-
}, [l, c]), { dragState: m, handleDragStart: f, handleDragMove:
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
), S = s.map((
|
|
2616
|
-
return /* @__PURE__ */
|
|
2617
|
-
|
|
2621
|
+
}, [l, c]), { dragState: m, handleDragStart: f, handleDragMove: h, handleDragEnd: u, handleDragCancel: A } = Zn(c, d), p = Nt(
|
|
2622
|
+
_e(Yt, { activationConstraint: { delay: 300, tolerance: 5 } }),
|
|
2623
|
+
_e(_t)
|
|
2624
|
+
), S = s.map((M) => M.getId()), b = l.isEditable(), g = n.getVirtualItems(), y = n.getTotalSize(), v = F(() => m.activeId ? c.find((M) => M.getId() === String(m.activeId)) ?? null : null, [m.activeId, c]);
|
|
2625
|
+
return /* @__PURE__ */ O(
|
|
2626
|
+
Wt,
|
|
2618
2627
|
{
|
|
2619
2628
|
sensors: p,
|
|
2620
|
-
collisionDetection:
|
|
2621
|
-
modifiers: [
|
|
2629
|
+
collisionDetection: Ht,
|
|
2630
|
+
modifiers: [Vt],
|
|
2622
2631
|
onDragStart: f,
|
|
2623
|
-
onDragMove:
|
|
2624
|
-
onDragEnd:
|
|
2632
|
+
onDragMove: h,
|
|
2633
|
+
onDragEnd: u,
|
|
2625
2634
|
onDragCancel: A,
|
|
2626
2635
|
children: [
|
|
2627
|
-
/* @__PURE__ */ a(
|
|
2636
|
+
/* @__PURE__ */ a(Pt, { items: S, strategy: Lt, children: /* @__PURE__ */ O(
|
|
2628
2637
|
"table",
|
|
2629
2638
|
{
|
|
2630
2639
|
role: "presentation",
|
|
@@ -2633,25 +2642,25 @@ const es = (t, e) => {
|
|
|
2633
2642
|
children: [
|
|
2634
2643
|
e.renderResourceTableColgroup(),
|
|
2635
2644
|
e.renderResourceLane(s, g, y, i, r, o, {
|
|
2636
|
-
isDraggable:
|
|
2645
|
+
isDraggable: b,
|
|
2637
2646
|
dragState: m
|
|
2638
2647
|
})
|
|
2639
2648
|
]
|
|
2640
2649
|
}
|
|
2641
2650
|
) }),
|
|
2642
|
-
/* @__PURE__ */ a(
|
|
2651
|
+
/* @__PURE__ */ a(zt, { dropAnimation: null, modifiers: [Jn], children: v ? /* @__PURE__ */ a("div", { className: "schedulant-drag-overlay", children: v.getTitle() }) : null })
|
|
2643
2652
|
]
|
|
2644
2653
|
}
|
|
2645
2654
|
);
|
|
2646
|
-
},
|
|
2655
|
+
}, ts = (t) => /* @__PURE__ */ a("div", { id: "schedulant-timeline-slots", className: "schedulant-timeline-slots", children: /* @__PURE__ */ O("table", { "aria-hidden": !0, children: [
|
|
2647
2656
|
t.schedulantView.renderTimelineTableColgroup(),
|
|
2648
2657
|
t.schedulantView.renderTimelineBodyTableSlots()
|
|
2649
|
-
] }) }),
|
|
2658
|
+
] }) }), ns = () => {
|
|
2650
2659
|
const t = C(() => {
|
|
2651
2660
|
const l = document.getElementsByClassName("schedulant-timeline-head").item(0).getElementsByTagName("table").item(0)?.offsetWidth;
|
|
2652
2661
|
return l || 0;
|
|
2653
|
-
}, []), [e, n] = re(0), { state: s } =
|
|
2654
|
-
return
|
|
2662
|
+
}, []), [e, n] = re(0), { state: s } = Te();
|
|
2663
|
+
return Et(() => {
|
|
2655
2664
|
const i = () => {
|
|
2656
2665
|
const d = t();
|
|
2657
2666
|
n(d);
|
|
@@ -2672,8 +2681,8 @@ const es = (t, e) => {
|
|
|
2672
2681
|
window.removeEventListener("resize", r), c?.disconnect();
|
|
2673
2682
|
};
|
|
2674
2683
|
}, [t, s.resourceAreaWidth]), e;
|
|
2675
|
-
},
|
|
2676
|
-
const e =
|
|
2684
|
+
}, ss = (t) => {
|
|
2685
|
+
const e = ns(), n = t.virtualizer.getVirtualItems(), s = t.virtualizer.getTotalSize();
|
|
2677
2686
|
return /* @__PURE__ */ a(
|
|
2678
2687
|
"table",
|
|
2679
2688
|
{
|
|
@@ -2683,7 +2692,7 @@ const es = (t, e) => {
|
|
|
2683
2692
|
children: t.schedulantView.renderTimelineDrawingBoardTable(t.visibleResources, n, s, e)
|
|
2684
2693
|
}
|
|
2685
2694
|
);
|
|
2686
|
-
},
|
|
2695
|
+
}, is = (t, e) => {
|
|
2687
2696
|
N(() => {
|
|
2688
2697
|
const n = t.current, s = e.getScheduleApi();
|
|
2689
2698
|
if (n)
|
|
@@ -2708,15 +2717,15 @@ function $(t, e, n) {
|
|
|
2708
2717
|
if (!(f.length !== s.length || f.some((A, p) => s[p] !== A)))
|
|
2709
2718
|
return i;
|
|
2710
2719
|
s = f;
|
|
2711
|
-
let
|
|
2712
|
-
if (n.key && ((c = n.debug) != null && c.call(n)) && (
|
|
2713
|
-
const A = Math.round((Date.now() - m) * 100) / 100, p = Math.round((Date.now() -
|
|
2720
|
+
let u;
|
|
2721
|
+
if (n.key && ((c = n.debug) != null && c.call(n)) && (u = Date.now()), i = e(...f), n.key && ((d = n.debug) != null && d.call(n))) {
|
|
2722
|
+
const A = Math.round((Date.now() - m) * 100) / 100, p = Math.round((Date.now() - u) * 100) / 100, S = p / 16, b = (g, y) => {
|
|
2714
2723
|
for (g = String(g); g.length < y; )
|
|
2715
2724
|
g = " " + g;
|
|
2716
2725
|
return g;
|
|
2717
2726
|
};
|
|
2718
2727
|
console.info(
|
|
2719
|
-
`%c⏱ ${
|
|
2728
|
+
`%c⏱ ${b(p, 5)} /${b(A, 5)} ms`,
|
|
2720
2729
|
`
|
|
2721
2730
|
font-size: .6rem;
|
|
2722
2731
|
font-weight: bold;
|
|
@@ -2733,25 +2742,25 @@ function $(t, e, n) {
|
|
|
2733
2742
|
s = l;
|
|
2734
2743
|
}, o;
|
|
2735
2744
|
}
|
|
2736
|
-
function
|
|
2745
|
+
function rt(t, e) {
|
|
2737
2746
|
if (t === void 0)
|
|
2738
2747
|
throw new Error("Unexpected undefined");
|
|
2739
2748
|
return t;
|
|
2740
2749
|
}
|
|
2741
|
-
const
|
|
2750
|
+
const rs = (t, e) => Math.abs(t - e) < 1.01, os = (t, e, n) => {
|
|
2742
2751
|
let s;
|
|
2743
2752
|
return function(...i) {
|
|
2744
2753
|
t.clearTimeout(s), s = t.setTimeout(() => e.apply(this, i), n);
|
|
2745
2754
|
};
|
|
2746
|
-
},
|
|
2755
|
+
}, ot = (t) => {
|
|
2747
2756
|
const { offsetWidth: e, offsetHeight: n } = t;
|
|
2748
2757
|
return { width: e, height: n };
|
|
2749
|
-
},
|
|
2758
|
+
}, ls = (t) => t, as = (t) => {
|
|
2750
2759
|
const e = Math.max(t.startIndex - t.overscan, 0), n = Math.min(t.endIndex + t.overscan, t.count - 1), s = [];
|
|
2751
2760
|
for (let i = e; i <= n; i++)
|
|
2752
2761
|
s.push(i);
|
|
2753
2762
|
return s;
|
|
2754
|
-
},
|
|
2763
|
+
}, cs = (t, e) => {
|
|
2755
2764
|
const n = t.scrollElement;
|
|
2756
2765
|
if (!n)
|
|
2757
2766
|
return;
|
|
@@ -2762,7 +2771,7 @@ const ls = (t, e) => Math.abs(t - e) < 1.01, as = (t, e, n) => {
|
|
|
2762
2771
|
const { width: l, height: c } = o;
|
|
2763
2772
|
e({ width: Math.round(l), height: Math.round(c) });
|
|
2764
2773
|
};
|
|
2765
|
-
if (i(
|
|
2774
|
+
if (i(ot(n)), !s.ResizeObserver)
|
|
2766
2775
|
return () => {
|
|
2767
2776
|
};
|
|
2768
2777
|
const r = new s.ResizeObserver((o) => {
|
|
@@ -2775,16 +2784,16 @@ const ls = (t, e) => Math.abs(t - e) < 1.01, as = (t, e, n) => {
|
|
|
2775
2784
|
return;
|
|
2776
2785
|
}
|
|
2777
2786
|
}
|
|
2778
|
-
i(
|
|
2787
|
+
i(ot(n));
|
|
2779
2788
|
};
|
|
2780
2789
|
t.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(l) : l();
|
|
2781
2790
|
});
|
|
2782
2791
|
return r.observe(n, { box: "border-box" }), () => {
|
|
2783
2792
|
r.unobserve(n);
|
|
2784
2793
|
};
|
|
2785
|
-
},
|
|
2794
|
+
}, lt = {
|
|
2786
2795
|
passive: !0
|
|
2787
|
-
},
|
|
2796
|
+
}, at = typeof window > "u" ? !0 : "onscrollend" in window, ds = (t, e) => {
|
|
2788
2797
|
const n = t.scrollElement;
|
|
2789
2798
|
if (!n)
|
|
2790
2799
|
return;
|
|
@@ -2792,23 +2801,23 @@ const ls = (t, e) => Math.abs(t - e) < 1.01, as = (t, e, n) => {
|
|
|
2792
2801
|
if (!s)
|
|
2793
2802
|
return;
|
|
2794
2803
|
let i = 0;
|
|
2795
|
-
const r = t.options.useScrollendEvent &&
|
|
2796
|
-
} :
|
|
2804
|
+
const r = t.options.useScrollendEvent && at ? () => {
|
|
2805
|
+
} : os(
|
|
2797
2806
|
s,
|
|
2798
2807
|
() => {
|
|
2799
2808
|
e(i, !1);
|
|
2800
2809
|
},
|
|
2801
2810
|
t.options.isScrollingResetDelay
|
|
2802
2811
|
), o = (m) => () => {
|
|
2803
|
-
const { horizontal: f, isRtl:
|
|
2804
|
-
i = f ? n.scrollLeft * (
|
|
2812
|
+
const { horizontal: f, isRtl: h } = t.options;
|
|
2813
|
+
i = f ? n.scrollLeft * (h && -1 || 1) : n.scrollTop, r(), e(i, m);
|
|
2805
2814
|
}, l = o(!0), c = o(!1);
|
|
2806
|
-
n.addEventListener("scroll", l,
|
|
2807
|
-
const d = t.options.useScrollendEvent &&
|
|
2808
|
-
return d && n.addEventListener("scrollend", c,
|
|
2815
|
+
n.addEventListener("scroll", l, lt);
|
|
2816
|
+
const d = t.options.useScrollendEvent && at;
|
|
2817
|
+
return d && n.addEventListener("scrollend", c, lt), () => {
|
|
2809
2818
|
n.removeEventListener("scroll", l), d && n.removeEventListener("scrollend", c);
|
|
2810
2819
|
};
|
|
2811
|
-
},
|
|
2820
|
+
}, us = (t, e, n) => {
|
|
2812
2821
|
if (e?.borderBoxSize) {
|
|
2813
2822
|
const s = e.borderBoxSize[0];
|
|
2814
2823
|
if (s)
|
|
@@ -2817,7 +2826,7 @@ const ls = (t, e) => Math.abs(t - e) < 1.01, as = (t, e, n) => {
|
|
|
2817
2826
|
);
|
|
2818
2827
|
}
|
|
2819
2828
|
return t[n.options.horizontal ? "offsetWidth" : "offsetHeight"];
|
|
2820
|
-
},
|
|
2829
|
+
}, hs = (t, {
|
|
2821
2830
|
adjustments: e = 0,
|
|
2822
2831
|
behavior: n
|
|
2823
2832
|
}, s) => {
|
|
@@ -2828,7 +2837,7 @@ const ls = (t, e) => Math.abs(t - e) < 1.01, as = (t, e, n) => {
|
|
|
2828
2837
|
behavior: n
|
|
2829
2838
|
});
|
|
2830
2839
|
};
|
|
2831
|
-
class
|
|
2840
|
+
class ms {
|
|
2832
2841
|
constructor(e) {
|
|
2833
2842
|
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollState = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.laneAssignments = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.prevLanes = void 0, this.lanesChangedFlag = !1, this.lanesSettling = !1, this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.now = () => {
|
|
2834
2843
|
var n, s, i;
|
|
@@ -2869,11 +2878,11 @@ class fs {
|
|
|
2869
2878
|
scrollPaddingStart: 0,
|
|
2870
2879
|
scrollPaddingEnd: 0,
|
|
2871
2880
|
horizontal: !1,
|
|
2872
|
-
getItemKey:
|
|
2873
|
-
rangeExtractor:
|
|
2881
|
+
getItemKey: ls,
|
|
2882
|
+
rangeExtractor: as,
|
|
2874
2883
|
onChange: () => {
|
|
2875
2884
|
},
|
|
2876
|
-
measureElement:
|
|
2885
|
+
measureElement: us,
|
|
2877
2886
|
initialRect: { width: 0, height: 0 },
|
|
2878
2887
|
scrollMargin: 0,
|
|
2879
2888
|
gap: 0,
|
|
@@ -2974,40 +2983,40 @@ class fs {
|
|
|
2974
2983
|
if (!o)
|
|
2975
2984
|
return this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), [];
|
|
2976
2985
|
if (this.laneAssignments.size > n)
|
|
2977
|
-
for (const
|
|
2978
|
-
|
|
2979
|
-
this.lanesChangedFlag && (this.lanesChangedFlag = !1, this.lanesSettling = !0, this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), this.pendingMeasuredCacheIndexes = []), this.measurementsCache.length === 0 && !this.lanesSettling && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((
|
|
2980
|
-
this.itemSizeCache.set(
|
|
2986
|
+
for (const h of this.laneAssignments.keys())
|
|
2987
|
+
h >= n && this.laneAssignments.delete(h);
|
|
2988
|
+
this.lanesChangedFlag && (this.lanesChangedFlag = !1, this.lanesSettling = !0, this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), this.pendingMeasuredCacheIndexes = []), this.measurementsCache.length === 0 && !this.lanesSettling && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((h) => {
|
|
2989
|
+
this.itemSizeCache.set(h.key, h.size);
|
|
2981
2990
|
}));
|
|
2982
2991
|
const d = this.lanesSettling ? 0 : this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
2983
2992
|
this.pendingMeasuredCacheIndexes = [], this.lanesSettling && this.measurementsCache.length === n && (this.lanesSettling = !1);
|
|
2984
2993
|
const m = this.measurementsCache.slice(0, d), f = new Array(l).fill(
|
|
2985
2994
|
void 0
|
|
2986
2995
|
);
|
|
2987
|
-
for (let
|
|
2988
|
-
const
|
|
2989
|
-
|
|
2996
|
+
for (let h = 0; h < d; h++) {
|
|
2997
|
+
const u = m[h];
|
|
2998
|
+
u && (f[u.lane] = h);
|
|
2990
2999
|
}
|
|
2991
|
-
for (let
|
|
2992
|
-
const
|
|
3000
|
+
for (let h = d; h < n; h++) {
|
|
3001
|
+
const u = r(h), A = this.laneAssignments.get(h);
|
|
2993
3002
|
let p, S;
|
|
2994
3003
|
if (A !== void 0 && this.options.lanes > 1) {
|
|
2995
3004
|
p = A;
|
|
2996
|
-
const v = f[p],
|
|
2997
|
-
S =
|
|
3005
|
+
const v = f[p], M = v !== void 0 ? m[v] : void 0;
|
|
3006
|
+
S = M ? M.end + this.options.gap : s + i;
|
|
2998
3007
|
} else {
|
|
2999
|
-
const v = this.options.lanes === 1 ? m[
|
|
3000
|
-
S = v ? v.end + this.options.gap : s + i, p = v ? v.lane :
|
|
3008
|
+
const v = this.options.lanes === 1 ? m[h - 1] : this.getFurthestMeasurement(m, h);
|
|
3009
|
+
S = v ? v.end + this.options.gap : s + i, p = v ? v.lane : h % this.options.lanes, this.options.lanes > 1 && this.laneAssignments.set(h, p);
|
|
3001
3010
|
}
|
|
3002
|
-
const
|
|
3003
|
-
m[
|
|
3004
|
-
index:
|
|
3011
|
+
const b = c.get(u), g = typeof b == "number" ? b : this.options.estimateSize(h), y = S + g;
|
|
3012
|
+
m[h] = {
|
|
3013
|
+
index: h,
|
|
3005
3014
|
start: S,
|
|
3006
3015
|
size: g,
|
|
3007
3016
|
end: y,
|
|
3008
|
-
key:
|
|
3017
|
+
key: u,
|
|
3009
3018
|
lane: p
|
|
3010
|
-
}, f[p] =
|
|
3019
|
+
}, f[p] = h;
|
|
3011
3020
|
}
|
|
3012
3021
|
return this.measurementsCache = m, m;
|
|
3013
3022
|
},
|
|
@@ -3022,7 +3031,7 @@ class fs {
|
|
|
3022
3031
|
this.getScrollOffset(),
|
|
3023
3032
|
this.options.lanes
|
|
3024
3033
|
],
|
|
3025
|
-
(n, s, i, r) => this.range = n.length > 0 && s > 0 ?
|
|
3034
|
+
(n, s, i, r) => this.range = n.length > 0 && s > 0 ? gs({
|
|
3026
3035
|
measurements: n,
|
|
3027
3036
|
outerSize: s,
|
|
3028
3037
|
scrollOffset: i,
|
|
@@ -3120,11 +3129,11 @@ class fs {
|
|
|
3120
3129
|
), this.getVirtualItemForOffset = (n) => {
|
|
3121
3130
|
const s = this.getMeasurements();
|
|
3122
3131
|
if (s.length !== 0)
|
|
3123
|
-
return
|
|
3124
|
-
s[
|
|
3132
|
+
return rt(
|
|
3133
|
+
s[vt(
|
|
3125
3134
|
0,
|
|
3126
3135
|
s.length - 1,
|
|
3127
|
-
(i) =>
|
|
3136
|
+
(i) => rt(s[i]).start,
|
|
3128
3137
|
n
|
|
3129
3138
|
)]
|
|
3130
3139
|
);
|
|
@@ -3243,7 +3252,7 @@ class fs {
|
|
|
3243
3252
|
return;
|
|
3244
3253
|
}
|
|
3245
3254
|
const s = this.scrollState.index != null ? this.getOffsetForIndex(this.scrollState.index, this.scrollState.align) : void 0, i = s ? s[0] : this.scrollState.lastTargetOffset, r = 1, o = i !== this.scrollState.lastTargetOffset;
|
|
3246
|
-
if (!o &&
|
|
3255
|
+
if (!o && rs(i, this.getScrollOffset())) {
|
|
3247
3256
|
if (this.scrollState.stableFrames++, this.scrollState.stableFrames >= r) {
|
|
3248
3257
|
this.scrollState = null;
|
|
3249
3258
|
return;
|
|
@@ -3256,7 +3265,7 @@ class fs {
|
|
|
3256
3265
|
this.scheduleScrollReconcile();
|
|
3257
3266
|
}
|
|
3258
3267
|
}
|
|
3259
|
-
const
|
|
3268
|
+
const vt = (t, e, n, s) => {
|
|
3260
3269
|
for (; t <= e; ) {
|
|
3261
3270
|
const i = (t + e) / 2 | 0, r = n(i);
|
|
3262
3271
|
if (r < s)
|
|
@@ -3268,7 +3277,7 @@ const At = (t, e, n, s) => {
|
|
|
3268
3277
|
}
|
|
3269
3278
|
return t > 0 ? t - 1 : 0;
|
|
3270
3279
|
};
|
|
3271
|
-
function
|
|
3280
|
+
function gs({
|
|
3272
3281
|
measurements: t,
|
|
3273
3282
|
outerSize: e,
|
|
3274
3283
|
scrollOffset: n,
|
|
@@ -3280,7 +3289,7 @@ function ps({
|
|
|
3280
3289
|
startIndex: 0,
|
|
3281
3290
|
endIndex: i
|
|
3282
3291
|
};
|
|
3283
|
-
let o =
|
|
3292
|
+
let o = vt(
|
|
3284
3293
|
0,
|
|
3285
3294
|
i,
|
|
3286
3295
|
r,
|
|
@@ -3304,8 +3313,8 @@ function ps({
|
|
|
3304
3313
|
}
|
|
3305
3314
|
return { startIndex: o, endIndex: l };
|
|
3306
3315
|
}
|
|
3307
|
-
const
|
|
3308
|
-
function
|
|
3316
|
+
const ct = typeof document < "u" ? ie.useLayoutEffect : ie.useEffect;
|
|
3317
|
+
function fs({
|
|
3309
3318
|
useFlushSync: t = !0,
|
|
3310
3319
|
...e
|
|
3311
3320
|
}) {
|
|
@@ -3313,84 +3322,79 @@ function ys({
|
|
|
3313
3322
|
...e,
|
|
3314
3323
|
onChange: (r, o) => {
|
|
3315
3324
|
var l;
|
|
3316
|
-
t && o ?
|
|
3325
|
+
t && o ? Ft(n) : n(), (l = e.onChange) == null || l.call(e, r, o);
|
|
3317
3326
|
}
|
|
3318
3327
|
}, [i] = ie.useState(
|
|
3319
|
-
() => new
|
|
3328
|
+
() => new ms(s)
|
|
3320
3329
|
);
|
|
3321
|
-
return i.setOptions(s),
|
|
3330
|
+
return i.setOptions(s), ct(() => i._didMount(), []), ct(() => i._willUpdate()), i;
|
|
3322
3331
|
}
|
|
3323
|
-
function
|
|
3324
|
-
return
|
|
3325
|
-
observeElementRect:
|
|
3326
|
-
observeElementOffset:
|
|
3327
|
-
scrollToFn:
|
|
3332
|
+
function ps(t) {
|
|
3333
|
+
return fs({
|
|
3334
|
+
observeElementRect: cs,
|
|
3335
|
+
observeElementOffset: ds,
|
|
3336
|
+
scrollToFn: hs,
|
|
3328
3337
|
...t
|
|
3329
3338
|
});
|
|
3330
3339
|
}
|
|
3331
|
-
function
|
|
3340
|
+
function ys(t, e) {
|
|
3332
3341
|
const n = [], s = (i) => {
|
|
3333
3342
|
n.push(i), !e.some((o) => o === i.getId()) && i.getChildren().length > 0 && i.getChildren().forEach((o) => s(o));
|
|
3334
3343
|
};
|
|
3335
3344
|
return t.forEach((i) => s(i)), n;
|
|
3336
3345
|
}
|
|
3337
|
-
const
|
|
3338
|
-
const
|
|
3339
|
-
() =>
|
|
3346
|
+
const vs = (t, e, n, s) => {
|
|
3347
|
+
const i = F(
|
|
3348
|
+
() => ys(e, n),
|
|
3340
3349
|
[e, n]
|
|
3341
|
-
),
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
(u) => !u.getTime().isBefore(i) && !u.getTime().isAfter(r)
|
|
3345
|
-
) ? s * mt : s;
|
|
3346
|
-
}, [o, s, i, r]);
|
|
3347
|
-
return { virtualizer: vs({
|
|
3348
|
-
count: o.length,
|
|
3350
|
+
), r = C(() => s, [s]);
|
|
3351
|
+
return { virtualizer: ps({
|
|
3352
|
+
count: i.length,
|
|
3349
3353
|
getScrollElement: () => t.current,
|
|
3350
|
-
estimateSize:
|
|
3354
|
+
estimateSize: r,
|
|
3351
3355
|
overscan: 5
|
|
3352
|
-
}), visibleResources:
|
|
3353
|
-
},
|
|
3354
|
-
const { state: e, dispatch: n } =
|
|
3356
|
+
}), visibleResources: i };
|
|
3357
|
+
}, Ls = (t) => /* @__PURE__ */ a(Ut, { children: /* @__PURE__ */ a(Ss, { ...t }) }), Ss = (t) => {
|
|
3358
|
+
const { state: e, dispatch: n } = Te(), s = k(null), i = k(null), r = k(null), o = k(null), l = k(null), c = k(null), {
|
|
3355
3359
|
start: d,
|
|
3356
3360
|
end: m,
|
|
3357
3361
|
editable: f,
|
|
3358
|
-
selectable:
|
|
3359
|
-
lineHeight:
|
|
3362
|
+
selectable: h,
|
|
3363
|
+
lineHeight: u,
|
|
3360
3364
|
slotMinWidth: A,
|
|
3361
3365
|
schedulantMaxHeight: p,
|
|
3362
3366
|
schedulantViewType: S,
|
|
3363
|
-
events:
|
|
3367
|
+
events: b,
|
|
3364
3368
|
resources: g,
|
|
3365
3369
|
milestones: y,
|
|
3366
3370
|
checkpoints: v,
|
|
3367
|
-
resourceAreaColumns:
|
|
3368
|
-
resourceAreaWidth:
|
|
3369
|
-
companyHolidays:
|
|
3370
|
-
specialWorkdays:
|
|
3371
|
+
resourceAreaColumns: M,
|
|
3372
|
+
resourceAreaWidth: D,
|
|
3373
|
+
companyHolidays: T,
|
|
3374
|
+
specialWorkdays: I,
|
|
3371
3375
|
nationalHolidays: P,
|
|
3372
3376
|
dragHintColor: Y,
|
|
3373
3377
|
selectionColor: z
|
|
3374
3378
|
} = t, _ = F(
|
|
3375
|
-
() => new
|
|
3379
|
+
() => new $n(t, s),
|
|
3376
3380
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3377
3381
|
[
|
|
3378
3382
|
d,
|
|
3379
3383
|
m,
|
|
3380
3384
|
f,
|
|
3381
|
-
u,
|
|
3382
3385
|
h,
|
|
3386
|
+
u,
|
|
3383
3387
|
A,
|
|
3384
3388
|
p,
|
|
3385
3389
|
S,
|
|
3386
|
-
|
|
3390
|
+
b,
|
|
3387
3391
|
g,
|
|
3388
3392
|
y,
|
|
3389
3393
|
v,
|
|
3390
|
-
|
|
3391
|
-
T,
|
|
3394
|
+
M,
|
|
3392
3395
|
D,
|
|
3393
|
-
|
|
3396
|
+
T,
|
|
3397
|
+
I,
|
|
3394
3398
|
P,
|
|
3395
3399
|
Y,
|
|
3396
3400
|
z
|
|
@@ -3403,50 +3407,48 @@ const As = (t, e, n, s, i, r) => {
|
|
|
3403
3407
|
}), [R]), {
|
|
3404
3408
|
datagridResizerMouseUp: q,
|
|
3405
3409
|
datagridResizerMouseDown: Q,
|
|
3406
|
-
datagridCellResizerMouseUp:
|
|
3407
|
-
datagridCellResizerMouseDownFunc:
|
|
3408
|
-
} =
|
|
3410
|
+
datagridCellResizerMouseUp: Oe,
|
|
3411
|
+
datagridCellResizerMouseDownFunc: Ie
|
|
3412
|
+
} = ln(n, s, c), { virtualizer: Pe, visibleResources: ne } = vs(
|
|
3409
3413
|
o,
|
|
3410
3414
|
R.getResourceApis(),
|
|
3411
3415
|
e.collapseIds,
|
|
3412
|
-
R.getLineHeight()
|
|
3413
|
-
Pe.getStart(),
|
|
3414
|
-
Pe.getEnd()
|
|
3416
|
+
R.getLineHeight()
|
|
3415
3417
|
);
|
|
3416
|
-
|
|
3418
|
+
Kt(t.schedulantMaxHeight), is(s, _), Jt(c, t.resourceAreaWidth), Zt(l, o, i, r);
|
|
3417
3419
|
const ce = k(R.onResourceSelect());
|
|
3418
3420
|
ce.current = R.onResourceSelect();
|
|
3419
|
-
const
|
|
3421
|
+
const Le = C((U) => {
|
|
3420
3422
|
ce.current?.(U);
|
|
3421
|
-
}, []),
|
|
3423
|
+
}, []), Ne = F(
|
|
3422
3424
|
() => ne.map((U) => U.getId()),
|
|
3423
3425
|
[ne]
|
|
3424
|
-
),
|
|
3425
|
-
R.isSelectable() &&
|
|
3426
|
-
}, [R,
|
|
3426
|
+
), Ye = C((U) => {
|
|
3427
|
+
R.isSelectable() && hn(U.nativeEvent, Ne, Le);
|
|
3428
|
+
}, [R, Ne, Le]);
|
|
3427
3429
|
return N(() => {
|
|
3428
|
-
const U = (
|
|
3429
|
-
s.current && !s.current.contains(
|
|
3430
|
+
const U = (St) => {
|
|
3431
|
+
s.current && !s.current.contains(St.target) && De(ce.current);
|
|
3430
3432
|
};
|
|
3431
3433
|
return document.addEventListener("click", U), () => document.removeEventListener("click", U);
|
|
3432
|
-
}, []), /* @__PURE__ */ a("div", { className: "schedulant", ref: s, onMouseUp: q, onClick:
|
|
3433
|
-
/* @__PURE__ */
|
|
3434
|
+
}, []), /* @__PURE__ */ a("div", { className: "schedulant", ref: s, onMouseUp: q, onClick: Ye, onContextMenu: Ye, style: V, children: /* @__PURE__ */ a("div", { id: "schedulant-view-harness", className: "schedulant-view-harness", children: /* @__PURE__ */ a("div", { className: "schedulant-view", children: /* @__PURE__ */ O("table", { role: "grid", className: "schedulant-scrollgrid", children: [
|
|
3435
|
+
/* @__PURE__ */ O("colgroup", { children: [
|
|
3434
3436
|
/* @__PURE__ */ a("col", { style: { width: e.resourceAreaWidth }, ref: c }),
|
|
3435
3437
|
/* @__PURE__ */ a("col", {}),
|
|
3436
3438
|
/* @__PURE__ */ a("col", {})
|
|
3437
3439
|
] }),
|
|
3438
|
-
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */
|
|
3440
|
+
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ O(
|
|
3439
3441
|
"tr",
|
|
3440
3442
|
{
|
|
3441
3443
|
role: "presentation",
|
|
3442
3444
|
className: "schedulant-scrollgrid-section schedulant-scrollgrid-section-head",
|
|
3443
3445
|
children: [
|
|
3444
3446
|
/* @__PURE__ */ a("th", { role: "presentation", children: /* @__PURE__ */ a("div", { className: "schedulant-scroller-harness", children: /* @__PURE__ */ a("div", { className: "schedulant-scroller-head-left", ref: i, children: /* @__PURE__ */ a(
|
|
3445
|
-
|
|
3447
|
+
Gn,
|
|
3446
3448
|
{
|
|
3447
3449
|
schedulantView: _,
|
|
3448
|
-
cellResizerMouseUp:
|
|
3449
|
-
cellResizerMouseDownFunc:
|
|
3450
|
+
cellResizerMouseUp: Oe,
|
|
3451
|
+
cellResizerMouseDownFunc: Ie
|
|
3450
3452
|
}
|
|
3451
3453
|
) }) }) }),
|
|
3452
3454
|
/* @__PURE__ */ a(
|
|
@@ -3463,27 +3465,27 @@ const As = (t, e, n, s, i, r) => {
|
|
|
3463
3465
|
{
|
|
3464
3466
|
id: "schedulant-timeline-head",
|
|
3465
3467
|
className: "schedulant-timeline-head",
|
|
3466
|
-
children: /* @__PURE__ */ a(
|
|
3468
|
+
children: /* @__PURE__ */ a(Xn, { schedulantView: _ })
|
|
3467
3469
|
}
|
|
3468
3470
|
) }) }) })
|
|
3469
3471
|
]
|
|
3470
3472
|
}
|
|
3471
3473
|
) }),
|
|
3472
|
-
/* @__PURE__ */ a("tbody", { children: /* @__PURE__ */
|
|
3474
|
+
/* @__PURE__ */ a("tbody", { children: /* @__PURE__ */ O(
|
|
3473
3475
|
"tr",
|
|
3474
3476
|
{
|
|
3475
3477
|
role: "presentation",
|
|
3476
3478
|
className: "schedulant-scrollgrid-section schedulant-scrollgrid-section-body",
|
|
3477
3479
|
children: [
|
|
3478
3480
|
/* @__PURE__ */ a("td", { role: "presentation", children: /* @__PURE__ */ a("div", { className: "schedulant-scroller-harness", children: /* @__PURE__ */ a("div", { className: "schedulant-scroller-body-left", ref: l, children: /* @__PURE__ */ a(
|
|
3479
|
-
|
|
3481
|
+
es,
|
|
3480
3482
|
{
|
|
3481
3483
|
schedulantView: _,
|
|
3482
|
-
virtualizer:
|
|
3484
|
+
virtualizer: Pe,
|
|
3483
3485
|
visibleResources: ne,
|
|
3484
3486
|
collapseIds: e.collapseIds,
|
|
3485
|
-
cellResizerMouseUp:
|
|
3486
|
-
cellResizerMouseDownFunc:
|
|
3487
|
+
cellResizerMouseUp: Oe,
|
|
3488
|
+
cellResizerMouseDownFunc: Ie
|
|
3487
3489
|
}
|
|
3488
3490
|
) }) }) }),
|
|
3489
3491
|
/* @__PURE__ */ a(
|
|
@@ -3495,13 +3497,13 @@ const As = (t, e, n, s, i, r) => {
|
|
|
3495
3497
|
onMouseDown: Q
|
|
3496
3498
|
}
|
|
3497
3499
|
),
|
|
3498
|
-
/* @__PURE__ */ a("td", { role: "presentation", children: /* @__PURE__ */ a("div", { className: "schedulant-scroller-harness", children: /* @__PURE__ */ a("div", { className: "schedulant-scroller-body-right", ref: o, children: /* @__PURE__ */
|
|
3499
|
-
/* @__PURE__ */ a(
|
|
3500
|
+
/* @__PURE__ */ a("td", { role: "presentation", children: /* @__PURE__ */ a("div", { className: "schedulant-scroller-harness", children: /* @__PURE__ */ a("div", { className: "schedulant-scroller-body-right", ref: o, children: /* @__PURE__ */ O("div", { className: "schedulant-timeline-body", children: [
|
|
3501
|
+
/* @__PURE__ */ a(ts, { schedulantView: _ }),
|
|
3500
3502
|
/* @__PURE__ */ a(
|
|
3501
|
-
|
|
3503
|
+
ss,
|
|
3502
3504
|
{
|
|
3503
3505
|
schedulantView: _,
|
|
3504
|
-
virtualizer:
|
|
3506
|
+
virtualizer: Pe,
|
|
3505
3507
|
visibleResources: ne
|
|
3506
3508
|
}
|
|
3507
3509
|
)
|
|
@@ -3512,5 +3514,5 @@ const As = (t, e, n, s, i, r) => {
|
|
|
3512
3514
|
] }) }) }) });
|
|
3513
3515
|
};
|
|
3514
3516
|
export {
|
|
3515
|
-
|
|
3517
|
+
Ls as Schedulant
|
|
3516
3518
|
};
|