@timebraid/vue 1.18.0 → 1.19.0
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/index.d.ts +2 -0
- package/dist/timebraid-vue.js +15 -6
- package/dist/timebraid-vue.umd.cjs +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1792,6 +1792,7 @@ export declare interface TimelineDay {
|
|
|
1792
1792
|
export declare interface TimelineEntry {
|
|
1793
1793
|
id: string;
|
|
1794
1794
|
task: string;
|
|
1795
|
+
taskId?: string;
|
|
1795
1796
|
start: number;
|
|
1796
1797
|
end?: number | null;
|
|
1797
1798
|
color: string;
|
|
@@ -1804,6 +1805,7 @@ export declare interface TimelineSpan {
|
|
|
1804
1805
|
id: string;
|
|
1805
1806
|
start: number;
|
|
1806
1807
|
end: number;
|
|
1808
|
+
group?: string;
|
|
1807
1809
|
}
|
|
1808
1810
|
|
|
1809
1811
|
export declare function timelineSpan(e: TimelineEntry, nowMin?: number | null): TimelineSpan;
|
package/dist/timebraid-vue.js
CHANGED
|
@@ -4531,7 +4531,7 @@ function lr(A) {
|
|
|
4531
4531
|
const Ka = (A, t = !1, e = !1) => [e ? ga : null, t ? Va : null, A].filter((l) => l !== null).join(", "), qa = (A) => Da.has(A) ? "rgba(0,0,0,.82)" : "#fff", Qa = 12, xe = (A) => A.running === !0 || A.end === null || A.end === void 0;
|
|
4532
4532
|
function Ca(A, t = null) {
|
|
4533
4533
|
const e = xe(A) ? t ?? A.end ?? A.start : A.end ?? A.start;
|
|
4534
|
-
return { id: A.id, start: A.start, end: Math.max(A.start, e) };
|
|
4534
|
+
return { id: A.id, start: A.start, end: Math.max(A.start, e), group: A.taskId ?? A.task };
|
|
4535
4535
|
}
|
|
4536
4536
|
const Ba = (A, t) => A.start - t.start || A.end - t.end, Qe = (A) => [...A].sort(Ba);
|
|
4537
4537
|
function $a(A) {
|
|
@@ -4544,12 +4544,21 @@ function $a(A) {
|
|
|
4544
4544
|
return { start: l * 60, end: i * 60, hours: s };
|
|
4545
4545
|
}
|
|
4546
4546
|
function _a(A) {
|
|
4547
|
-
const t =
|
|
4548
|
-
for (const
|
|
4549
|
-
const
|
|
4550
|
-
|
|
4547
|
+
const t = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map();
|
|
4548
|
+
for (const i of Qe(A)) {
|
|
4549
|
+
const n = i.group ?? i.id, s = e.get(n);
|
|
4550
|
+
s ? s.push(i) : e.set(n, [i]);
|
|
4551
4551
|
}
|
|
4552
|
-
|
|
4552
|
+
let l = 0;
|
|
4553
|
+
for (const i of e.values()) {
|
|
4554
|
+
const n = [];
|
|
4555
|
+
for (const s of i) {
|
|
4556
|
+
const c = n.findIndex((u) => u <= s.start), f = c === -1 ? n.length : c;
|
|
4557
|
+
n[f] = s.end, t.set(s.id, l + f);
|
|
4558
|
+
}
|
|
4559
|
+
l += Math.max(1, n.length);
|
|
4560
|
+
}
|
|
4561
|
+
return { lane: t, count: Math.max(1, l) };
|
|
4553
4562
|
}
|
|
4554
4563
|
function nr(A) {
|
|
4555
4564
|
const t = A.flatMap((n) => [{ at: n.start, step: 1 }, { at: n.end, step: -1 }]).sort((n, s) => n.at - s.at || n.step - s.step);
|