@devalok/shilp-sutra-karm 0.14.1 → 0.16.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/_chunks/kanban-board.js +891 -883
- package/dist/board/board-context.d.ts +5 -2
- package/dist/board/board-context.d.ts.map +1 -1
- package/dist/board/board-toolbar.d.ts.map +1 -1
- package/dist/board/bulk-action-bar.d.ts.map +1 -1
- package/dist/board/column-header.d.ts.map +1 -1
- package/dist/board/task-context-menu.d.ts.map +1 -1
- package/llms.txt +7 -2
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as e, jsxs as a, Fragment as
|
|
2
|
+
import { jsx as e, jsxs as a, Fragment as re } from "react/jsx-runtime";
|
|
3
3
|
import * as Q from "react";
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import { u as
|
|
4
|
+
import { useMemo as J, useState as E, useEffect as ce, useCallback as W, useContext as Xe, createContext as Je, useRef as ie } from "react";
|
|
5
|
+
import { createPortal as Ze } from "react-dom";
|
|
6
|
+
import { u as Ie, C as De, c as Te, a as et, S as Re, v as tt, b as st, d as he, D as nt, e as at, h as rt, f as it, s as ot, K as lt, T as ct, P as dt } from "./vendor.js";
|
|
7
7
|
import { cn as N } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
8
|
-
import { Input as
|
|
9
|
-
import { Button as
|
|
10
|
-
import { Badge as
|
|
11
|
-
import { DropdownMenu as
|
|
12
|
-
import { SegmentedControl as
|
|
13
|
-
import { IconX as
|
|
14
|
-
import { AvatarGroup as
|
|
15
|
-
import { u as
|
|
16
|
-
import { Checkbox as
|
|
17
|
-
import { Avatar as
|
|
18
|
-
import { ContextMenu as
|
|
19
|
-
const
|
|
8
|
+
import { Input as oe } from "@devalok/shilp-sutra/ui/input";
|
|
9
|
+
import { Button as _ } from "@devalok/shilp-sutra/ui/button";
|
|
10
|
+
import { Badge as mt } from "@devalok/shilp-sutra/ui/badge";
|
|
11
|
+
import { DropdownMenu as F, DropdownMenuTrigger as V, DropdownMenuContent as U, DropdownMenuLabel as q, DropdownMenuSeparator as H, DropdownMenuCheckboxItem as ge, DropdownMenuRadioGroup as ut, DropdownMenuRadioItem as ht, DropdownMenuItem as z } from "@devalok/shilp-sutra/ui/dropdown-menu";
|
|
12
|
+
import { SegmentedControl as gt } from "@devalok/shilp-sutra/ui/segmented-control";
|
|
13
|
+
import { IconX as le, IconSearch as ft, IconFilter as pt, IconUser as Z, IconLayoutGrid as xt, IconLayoutList as yt, IconArrowRight as pe, IconAlertTriangle as de, IconEye as ee, IconTrash as xe, IconPlus as ye, IconDots as vt, IconPencil as bt, IconGauge as wt, IconEyeOff as Se, IconCalendar as ve, IconCheck as kt, IconArrowUp as Ae, IconArrowDown as Me, IconGripVertical as Ct, IconSubtask as Nt, IconLock as It, IconTag as Dt } from "@tabler/icons-react";
|
|
14
|
+
import { AvatarGroup as Tt } from "@devalok/shilp-sutra/composed/avatar-group";
|
|
15
|
+
import { u as Le } from "./use-composed-ref.js";
|
|
16
|
+
import { Checkbox as Ee } from "@devalok/shilp-sutra/ui";
|
|
17
|
+
import { Avatar as Rt, AvatarImage as St, AvatarFallback as At } from "@devalok/shilp-sutra/ui/avatar";
|
|
18
|
+
import { ContextMenu as Mt, ContextMenuTrigger as Lt, ContextMenuContent as Et, ContextMenuSub as se, ContextMenuSubTrigger as ne, ContextMenuSubContent as ae, ContextMenuItem as Y, ContextMenuSeparator as Ot } from "@devalok/shilp-sutra/ui/context-menu";
|
|
19
|
+
const Bt = 320, we = [
|
|
20
20
|
"bg-category-cyan",
|
|
21
21
|
"bg-category-amber",
|
|
22
22
|
"bg-category-teal",
|
|
@@ -25,417 +25,424 @@ const Ot = 320, we = [
|
|
|
25
25
|
"bg-category-emerald",
|
|
26
26
|
"bg-category-slate",
|
|
27
27
|
"bg-accent"
|
|
28
|
-
],
|
|
28
|
+
], ys = {
|
|
29
29
|
LOW: "IconArrowDown",
|
|
30
30
|
MEDIUM: "IconArrowRight",
|
|
31
31
|
HIGH: "IconArrowUp",
|
|
32
32
|
URGENT: "IconAlertTriangle"
|
|
33
|
-
},
|
|
33
|
+
}, me = {
|
|
34
34
|
LOW: "text-text-tertiary",
|
|
35
35
|
MEDIUM: "text-warning",
|
|
36
36
|
HIGH: "text-error",
|
|
37
37
|
URGENT: "text-error"
|
|
38
|
-
},
|
|
38
|
+
}, ke = {
|
|
39
39
|
search: "",
|
|
40
40
|
assignees: [],
|
|
41
41
|
priorities: [],
|
|
42
42
|
labels: [],
|
|
43
43
|
dueDateRange: null
|
|
44
44
|
};
|
|
45
|
-
function
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
function Wt(t) {
|
|
46
|
+
const s = /* @__PURE__ */ new Set(), n = [];
|
|
47
|
+
for (const r of t)
|
|
48
|
+
for (const i of r.tasks) {
|
|
49
|
+
i.owner && !s.has(i.owner.id) && (s.add(i.owner.id), n.push(i.owner));
|
|
50
|
+
for (const u of i.assignees)
|
|
51
|
+
s.has(u.id) || (s.add(u.id), n.push(u));
|
|
52
|
+
}
|
|
53
|
+
return n;
|
|
54
|
+
}
|
|
55
|
+
function Oe(t) {
|
|
56
|
+
const s = /* @__PURE__ */ new Set();
|
|
57
|
+
for (const n of t)
|
|
58
|
+
for (const r of n.tasks)
|
|
59
|
+
for (const i of r.labels) s.add(i);
|
|
60
|
+
return Array.from(s).sort();
|
|
61
|
+
}
|
|
62
|
+
function $t(t, s) {
|
|
63
|
+
if (s.search) {
|
|
64
|
+
const n = s.search.toLowerCase();
|
|
65
|
+
if (!t.title.toLowerCase().includes(n) && !t.taskId.toLowerCase().includes(n))
|
|
49
66
|
return !1;
|
|
50
67
|
}
|
|
51
|
-
if (
|
|
68
|
+
if (s.priorities.length > 0 && !s.priorities.includes(t.priority))
|
|
52
69
|
return !1;
|
|
53
|
-
if (
|
|
70
|
+
if (s.assignees.length > 0) {
|
|
54
71
|
const n = [
|
|
55
|
-
...
|
|
56
|
-
...
|
|
72
|
+
...t.owner ? [t.owner.id] : [],
|
|
73
|
+
...t.assignees.map((r) => r.id)
|
|
57
74
|
];
|
|
58
|
-
if (!
|
|
75
|
+
if (!s.assignees.some((r) => n.includes(r))) return !1;
|
|
59
76
|
}
|
|
60
|
-
if (
|
|
77
|
+
if (s.labels.length > 0 && !s.labels.some((n) => t.labels.includes(n)))
|
|
61
78
|
return !1;
|
|
62
|
-
if (
|
|
63
|
-
if (!
|
|
64
|
-
const n = new Date(
|
|
79
|
+
if (s.dueDateRange && s.dueDateRange !== "none") {
|
|
80
|
+
if (!t.dueDate) return !1;
|
|
81
|
+
const n = new Date(t.dueDate), r = /* @__PURE__ */ new Date();
|
|
65
82
|
r.setHours(0, 0, 0, 0);
|
|
66
|
-
const
|
|
67
|
-
switch (
|
|
83
|
+
const i = new Date(r);
|
|
84
|
+
switch (i.setHours(23, 59, 59, 999), s.dueDateRange) {
|
|
68
85
|
case "overdue":
|
|
69
86
|
if (n >= r) return !1;
|
|
70
87
|
break;
|
|
71
88
|
case "today":
|
|
72
|
-
if (n < r || n >
|
|
89
|
+
if (n < r || n > i) return !1;
|
|
73
90
|
break;
|
|
74
91
|
case "this-week": {
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
92
|
+
const u = new Date(r);
|
|
93
|
+
if (u.setDate(r.getDate() + (7 - r.getDay())), u.setHours(23, 59, 59, 999), n > u) return !1;
|
|
77
94
|
break;
|
|
78
95
|
}
|
|
79
96
|
}
|
|
80
97
|
}
|
|
81
98
|
return !0;
|
|
82
99
|
}
|
|
83
|
-
function
|
|
84
|
-
return
|
|
100
|
+
function Pt(t, s) {
|
|
101
|
+
return J(() => s.search !== "" || s.priorities.length > 0 || s.assignees.length > 0 || s.labels.length > 0 || s.dueDateRange != null && s.dueDateRange !== "none" ? t.map((r) => ({
|
|
85
102
|
...r,
|
|
86
|
-
tasks: r.tasks.filter((
|
|
87
|
-
})) :
|
|
103
|
+
tasks: r.tasks.filter((i) => $t(i, s))
|
|
104
|
+
})) : t, [t, s]);
|
|
88
105
|
}
|
|
89
|
-
const
|
|
90
|
-
function
|
|
91
|
-
const
|
|
92
|
-
if (!
|
|
93
|
-
return
|
|
106
|
+
const Be = Je(null);
|
|
107
|
+
function G() {
|
|
108
|
+
const t = Xe(Be);
|
|
109
|
+
if (!t) throw new Error("useBoardContext must be used within <BoardProvider>");
|
|
110
|
+
return t;
|
|
94
111
|
}
|
|
95
|
-
const
|
|
112
|
+
const $ = () => {
|
|
96
113
|
};
|
|
97
|
-
function
|
|
98
|
-
initialData:
|
|
99
|
-
currentUserId:
|
|
100
|
-
|
|
101
|
-
|
|
114
|
+
function _t({
|
|
115
|
+
initialData: t,
|
|
116
|
+
currentUserId: s = null,
|
|
117
|
+
members: n,
|
|
118
|
+
children: r,
|
|
119
|
+
...i
|
|
102
120
|
}) {
|
|
103
|
-
const [
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}, [
|
|
107
|
-
const [
|
|
108
|
-
|
|
109
|
-
}, []),
|
|
110
|
-
() =>
|
|
111
|
-
[
|
|
112
|
-
),
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
121
|
+
const [u, w] = E(t.columns);
|
|
122
|
+
ce(() => {
|
|
123
|
+
w(t.columns);
|
|
124
|
+
}, [t]);
|
|
125
|
+
const [k, h] = E("default"), [l, f] = E(ke), S = W((C) => {
|
|
126
|
+
f((M) => ({ ...M, ...C }));
|
|
127
|
+
}, []), I = W(() => f(ke), []), c = J(
|
|
128
|
+
() => l.search !== "" || l.priorities.length > 0 || l.assignees.length > 0 || l.labels.length > 0 || l.dueDateRange != null && l.dueDateRange !== "none",
|
|
129
|
+
[l]
|
|
130
|
+
), D = Pt(u, l), d = J(
|
|
131
|
+
() => n ?? Wt(u),
|
|
132
|
+
[n, u]
|
|
133
|
+
), [v, m] = E(/* @__PURE__ */ new Set()), T = W((C) => {
|
|
134
|
+
m((M) => {
|
|
135
|
+
const B = new Set(M);
|
|
136
|
+
return B.has(C) ? B.delete(C) : B.add(C), B;
|
|
116
137
|
});
|
|
117
|
-
}, []),
|
|
118
|
-
(
|
|
119
|
-
const
|
|
120
|
-
if (
|
|
121
|
-
const [
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
return
|
|
138
|
+
}, []), g = W(
|
|
139
|
+
(C, M) => {
|
|
140
|
+
const B = D.flatMap((K) => K.tasks), j = B.findIndex((K) => K.id === C), X = B.findIndex((K) => K.id === M);
|
|
141
|
+
if (j === -1 || X === -1) return;
|
|
142
|
+
const [ue, te] = j < X ? [j, X] : [X, j], b = B.slice(ue, te + 1).map((K) => K.id);
|
|
143
|
+
m((K) => {
|
|
144
|
+
const be = new Set(K);
|
|
145
|
+
return b.forEach((qe) => be.add(qe)), be;
|
|
125
146
|
});
|
|
126
147
|
},
|
|
127
|
-
[
|
|
128
|
-
),
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
}, [
|
|
148
|
+
[D]
|
|
149
|
+
), y = W(() => {
|
|
150
|
+
const C = D.flatMap((M) => M.tasks.map((B) => B.id));
|
|
151
|
+
m(new Set(C));
|
|
152
|
+
}, [D]), x = W(() => m(/* @__PURE__ */ new Set()), []), [o, p] = E(null), [R, L] = E(!1), [A, P] = E(null), O = J(
|
|
132
153
|
() => ({
|
|
133
|
-
columns:
|
|
134
|
-
rawColumns:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
154
|
+
columns: D,
|
|
155
|
+
rawColumns: u,
|
|
156
|
+
members: d,
|
|
157
|
+
viewMode: k,
|
|
158
|
+
setViewMode: h,
|
|
159
|
+
filters: l,
|
|
160
|
+
setFilters: S,
|
|
161
|
+
clearFilters: I,
|
|
162
|
+
hasActiveFilters: c,
|
|
163
|
+
selectedTaskIds: v,
|
|
164
|
+
toggleTaskSelection: T,
|
|
165
|
+
selectRange: g,
|
|
166
|
+
selectAll: y,
|
|
167
|
+
clearSelection: x,
|
|
168
|
+
focusedTaskId: o,
|
|
169
|
+
setFocusedTaskId: p,
|
|
170
|
+
currentUserId: s,
|
|
171
|
+
highlightMyTasks: R,
|
|
172
|
+
setHighlightMyTasks: L,
|
|
173
|
+
activeTask: A,
|
|
174
|
+
setActiveTask: P,
|
|
175
|
+
onTaskMove: i.onTaskMove ?? $,
|
|
176
|
+
onTaskAdd: i.onTaskAdd ?? $,
|
|
177
|
+
onBulkAction: i.onBulkAction ?? $,
|
|
178
|
+
onColumnReorder: i.onColumnReorder ?? $,
|
|
179
|
+
onColumnRename: i.onColumnRename ?? $,
|
|
180
|
+
onColumnDelete: i.onColumnDelete ?? $,
|
|
181
|
+
onColumnToggleVisibility: i.onColumnToggleVisibility ?? $,
|
|
182
|
+
onColumnWipLimitChange: i.onColumnWipLimitChange ?? $,
|
|
183
|
+
onClickTask: i.onClickTask ?? $,
|
|
184
|
+
onAddColumn: i.onAddColumn ?? $,
|
|
185
|
+
onQuickPriorityChange: i.onQuickPriorityChange ?? $,
|
|
186
|
+
onQuickAssign: i.onQuickAssign ?? $,
|
|
187
|
+
onQuickDueDateChange: i.onQuickDueDateChange ?? $,
|
|
188
|
+
onQuickLabelAdd: i.onQuickLabelAdd ?? $,
|
|
189
|
+
onQuickVisibilityChange: i.onQuickVisibilityChange ?? $,
|
|
190
|
+
onQuickDelete: i.onQuickDelete ?? $
|
|
169
191
|
}),
|
|
170
192
|
[
|
|
171
|
-
f,
|
|
172
|
-
o,
|
|
173
|
-
b,
|
|
174
|
-
d,
|
|
175
|
-
x,
|
|
176
193
|
D,
|
|
177
|
-
g,
|
|
178
|
-
A,
|
|
179
|
-
k,
|
|
180
194
|
u,
|
|
195
|
+
d,
|
|
196
|
+
k,
|
|
197
|
+
l,
|
|
198
|
+
S,
|
|
181
199
|
I,
|
|
182
|
-
|
|
200
|
+
c,
|
|
201
|
+
v,
|
|
202
|
+
T,
|
|
203
|
+
g,
|
|
183
204
|
y,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
205
|
+
x,
|
|
206
|
+
o,
|
|
207
|
+
s,
|
|
208
|
+
R,
|
|
209
|
+
A,
|
|
210
|
+
i
|
|
188
211
|
]
|
|
189
212
|
);
|
|
190
|
-
return /* @__PURE__ */ e(
|
|
213
|
+
return /* @__PURE__ */ e(Be.Provider, { value: O, children: r });
|
|
191
214
|
}
|
|
192
|
-
|
|
193
|
-
const t = /* @__PURE__ */ new Set(), n = [];
|
|
194
|
-
for (const r of s)
|
|
195
|
-
for (const o of r.tasks) {
|
|
196
|
-
o.owner && !t.has(o.owner.id) && (t.add(o.owner.id), n.push(o.owner));
|
|
197
|
-
for (const h of o.assignees)
|
|
198
|
-
t.has(h.id) || (t.add(h.id), n.push(h));
|
|
199
|
-
}
|
|
200
|
-
return n;
|
|
201
|
-
}
|
|
202
|
-
function Oe(s) {
|
|
203
|
-
const t = /* @__PURE__ */ new Set();
|
|
204
|
-
for (const n of s)
|
|
205
|
-
for (const r of n.tasks)
|
|
206
|
-
for (const o of r.labels) t.add(o);
|
|
207
|
-
return Array.from(t).sort();
|
|
208
|
-
}
|
|
209
|
-
const $t = ["LOW", "MEDIUM", "HIGH", "URGENT"], ke = [
|
|
215
|
+
const zt = ["LOW", "MEDIUM", "HIGH", "URGENT"], Ce = [
|
|
210
216
|
{ value: "overdue", label: "Overdue" },
|
|
211
217
|
{ value: "today", label: "Today" },
|
|
212
218
|
{ value: "this-week", label: "This week" }
|
|
213
219
|
];
|
|
214
|
-
function
|
|
220
|
+
function We() {
|
|
215
221
|
const {
|
|
216
|
-
rawColumns:
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
222
|
+
rawColumns: t,
|
|
223
|
+
members: s,
|
|
224
|
+
filters: n,
|
|
225
|
+
setFilters: r,
|
|
226
|
+
clearFilters: i,
|
|
227
|
+
hasActiveFilters: u,
|
|
228
|
+
viewMode: w,
|
|
229
|
+
setViewMode: k,
|
|
230
|
+
highlightMyTasks: h,
|
|
231
|
+
setHighlightMyTasks: l
|
|
232
|
+
} = G(), [f, S] = E(n.search), I = ie(null), c = W(
|
|
233
|
+
(o) => {
|
|
234
|
+
const p = o.target.value;
|
|
235
|
+
S(p), I.current && clearTimeout(I.current), I.current = setTimeout(() => {
|
|
236
|
+
r({ search: p });
|
|
230
237
|
}, 200);
|
|
231
238
|
},
|
|
232
|
-
[
|
|
239
|
+
[r]
|
|
233
240
|
);
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}, [
|
|
237
|
-
const
|
|
238
|
-
const p =
|
|
239
|
-
|
|
240
|
-
priorities: p.includes(
|
|
241
|
+
ce(() => {
|
|
242
|
+
S(n.search);
|
|
243
|
+
}, [n.search]);
|
|
244
|
+
const D = s, d = Oe(t), v = (o) => {
|
|
245
|
+
const p = n.priorities;
|
|
246
|
+
r({
|
|
247
|
+
priorities: p.includes(o) ? p.filter((R) => R !== o) : [...p, o]
|
|
241
248
|
});
|
|
242
|
-
},
|
|
243
|
-
const p =
|
|
244
|
-
|
|
245
|
-
assignees: p.includes(
|
|
249
|
+
}, m = (o) => {
|
|
250
|
+
const p = n.assignees;
|
|
251
|
+
r({
|
|
252
|
+
assignees: p.includes(o) ? p.filter((R) => R !== o) : [...p, o]
|
|
246
253
|
});
|
|
247
|
-
},
|
|
248
|
-
const p =
|
|
249
|
-
|
|
250
|
-
labels: p.includes(
|
|
254
|
+
}, T = (o) => {
|
|
255
|
+
const p = n.labels;
|
|
256
|
+
r({
|
|
257
|
+
labels: p.includes(o) ? p.filter((R) => R !== o) : [...p, o]
|
|
251
258
|
});
|
|
252
|
-
},
|
|
253
|
-
|
|
254
|
-
dueDateRange:
|
|
259
|
+
}, g = (o) => {
|
|
260
|
+
r({
|
|
261
|
+
dueDateRange: o === n.dueDateRange ? null : o
|
|
255
262
|
});
|
|
256
|
-
},
|
|
257
|
-
{ id: "default", text: "Board", icon:
|
|
258
|
-
{ id: "compact", text: "Compact", icon:
|
|
259
|
-
],
|
|
260
|
-
for (const
|
|
261
|
-
|
|
262
|
-
key: `priority-${
|
|
263
|
-
label:
|
|
264
|
-
onRemove: () =>
|
|
263
|
+
}, y = [
|
|
264
|
+
{ id: "default", text: "Board", icon: xt },
|
|
265
|
+
{ id: "compact", text: "Compact", icon: yt }
|
|
266
|
+
], x = [];
|
|
267
|
+
for (const o of n.priorities)
|
|
268
|
+
x.push({
|
|
269
|
+
key: `priority-${o}`,
|
|
270
|
+
label: o.charAt(0) + o.slice(1).toLowerCase(),
|
|
271
|
+
onRemove: () => v(o)
|
|
265
272
|
});
|
|
266
|
-
for (const
|
|
267
|
-
const p =
|
|
268
|
-
|
|
269
|
-
key: `assignee-${
|
|
270
|
-
label: (p == null ? void 0 : p.name) ??
|
|
271
|
-
onRemove: () =>
|
|
273
|
+
for (const o of n.assignees) {
|
|
274
|
+
const p = D.find((R) => R.id === o);
|
|
275
|
+
x.push({
|
|
276
|
+
key: `assignee-${o}`,
|
|
277
|
+
label: (p == null ? void 0 : p.name) ?? o,
|
|
278
|
+
onRemove: () => m(o)
|
|
272
279
|
});
|
|
273
280
|
}
|
|
274
|
-
for (const
|
|
275
|
-
|
|
276
|
-
key: `label-${
|
|
277
|
-
label:
|
|
278
|
-
onRemove: () =>
|
|
281
|
+
for (const o of n.labels)
|
|
282
|
+
x.push({
|
|
283
|
+
key: `label-${o}`,
|
|
284
|
+
label: o,
|
|
285
|
+
onRemove: () => T(o)
|
|
279
286
|
});
|
|
280
|
-
if (
|
|
281
|
-
const
|
|
282
|
-
|
|
287
|
+
if (n.dueDateRange && n.dueDateRange !== "none") {
|
|
288
|
+
const o = Ce.find((p) => p.value === n.dueDateRange);
|
|
289
|
+
x.push({
|
|
283
290
|
key: "due-date",
|
|
284
|
-
label: (
|
|
285
|
-
onRemove: () =>
|
|
291
|
+
label: (o == null ? void 0 : o.label) ?? n.dueDateRange,
|
|
292
|
+
onRemove: () => r({ dueDateRange: null })
|
|
286
293
|
});
|
|
287
294
|
}
|
|
288
295
|
return /* @__PURE__ */ a("div", { className: "flex flex-col gap-ds-02", children: [
|
|
289
296
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-ds-03", children: [
|
|
290
297
|
/* @__PURE__ */ e("div", { className: "relative flex-1 max-w-xs", children: /* @__PURE__ */ e(
|
|
291
|
-
|
|
298
|
+
oe,
|
|
292
299
|
{
|
|
293
|
-
value:
|
|
294
|
-
onChange:
|
|
300
|
+
value: f,
|
|
301
|
+
onChange: c,
|
|
295
302
|
placeholder: "Search tasks...",
|
|
296
303
|
"aria-label": "Search tasks",
|
|
297
304
|
size: "sm",
|
|
298
|
-
startIcon: /* @__PURE__ */ e(
|
|
299
|
-
endIcon:
|
|
305
|
+
startIcon: /* @__PURE__ */ e(ft, { className: "h-ico-sm w-ico-sm" }),
|
|
306
|
+
endIcon: f ? /* @__PURE__ */ e(
|
|
300
307
|
"button",
|
|
301
308
|
{
|
|
302
309
|
onClick: () => {
|
|
303
|
-
|
|
310
|
+
S(""), r({ search: "" });
|
|
304
311
|
},
|
|
305
312
|
className: "pointer-events-auto cursor-pointer text-text-tertiary hover:text-text-primary",
|
|
306
313
|
"aria-label": "Clear search",
|
|
307
|
-
children: /* @__PURE__ */ e(
|
|
314
|
+
children: /* @__PURE__ */ e(le, { className: "h-3 w-3" })
|
|
308
315
|
}
|
|
309
316
|
) : void 0
|
|
310
317
|
}
|
|
311
318
|
) }),
|
|
312
319
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-ds-01", children: [
|
|
313
|
-
/* @__PURE__ */ a(
|
|
314
|
-
/* @__PURE__ */ e(
|
|
315
|
-
|
|
320
|
+
/* @__PURE__ */ a(F, { children: [
|
|
321
|
+
/* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ a(
|
|
322
|
+
_,
|
|
316
323
|
{
|
|
317
324
|
variant: "ghost",
|
|
318
325
|
size: "sm",
|
|
319
326
|
className: N(
|
|
320
|
-
|
|
327
|
+
n.priorities.length > 0 && "text-interactive"
|
|
321
328
|
),
|
|
322
329
|
title: "Filter by priority",
|
|
323
330
|
children: [
|
|
324
|
-
/* @__PURE__ */ e(
|
|
331
|
+
/* @__PURE__ */ e(pt, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
|
|
325
332
|
"Priority",
|
|
326
|
-
|
|
333
|
+
n.priorities.length > 0 && /* @__PURE__ */ a("span", { className: "ml-ds-01 text-ds-xs", children: [
|
|
327
334
|
"(",
|
|
328
|
-
|
|
335
|
+
n.priorities.length,
|
|
329
336
|
")"
|
|
330
337
|
] })
|
|
331
338
|
]
|
|
332
339
|
}
|
|
333
340
|
) }),
|
|
334
|
-
/* @__PURE__ */ a(
|
|
335
|
-
/* @__PURE__ */ e(
|
|
341
|
+
/* @__PURE__ */ a(U, { align: "start", className: "w-44", children: [
|
|
342
|
+
/* @__PURE__ */ e(q, { children: "Priority" }),
|
|
336
343
|
/* @__PURE__ */ e(H, {}),
|
|
337
|
-
|
|
344
|
+
zt.map((o) => /* @__PURE__ */ e(
|
|
338
345
|
ge,
|
|
339
346
|
{
|
|
340
|
-
checked:
|
|
341
|
-
onCheckedChange: () =>
|
|
342
|
-
children:
|
|
347
|
+
checked: n.priorities.includes(o),
|
|
348
|
+
onCheckedChange: () => v(o),
|
|
349
|
+
children: o.charAt(0) + o.slice(1).toLowerCase()
|
|
343
350
|
},
|
|
344
|
-
|
|
351
|
+
o
|
|
345
352
|
))
|
|
346
353
|
] })
|
|
347
354
|
] }),
|
|
348
|
-
|
|
349
|
-
/* @__PURE__ */ e(
|
|
350
|
-
|
|
355
|
+
D.length > 0 && /* @__PURE__ */ a(F, { children: [
|
|
356
|
+
/* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ a(
|
|
357
|
+
_,
|
|
351
358
|
{
|
|
352
359
|
variant: "ghost",
|
|
353
360
|
size: "sm",
|
|
354
361
|
className: N(
|
|
355
|
-
|
|
362
|
+
n.assignees.length > 0 && "text-interactive"
|
|
356
363
|
),
|
|
357
364
|
title: "Filter by assignee",
|
|
358
365
|
children: [
|
|
359
|
-
/* @__PURE__ */ e(
|
|
366
|
+
/* @__PURE__ */ e(Z, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
|
|
360
367
|
"Assignee",
|
|
361
|
-
|
|
368
|
+
n.assignees.length > 0 && /* @__PURE__ */ a("span", { className: "ml-ds-01 text-ds-xs", children: [
|
|
362
369
|
"(",
|
|
363
|
-
|
|
370
|
+
n.assignees.length,
|
|
364
371
|
")"
|
|
365
372
|
] })
|
|
366
373
|
]
|
|
367
374
|
}
|
|
368
375
|
) }),
|
|
369
|
-
/* @__PURE__ */ a(
|
|
370
|
-
/* @__PURE__ */ e(
|
|
376
|
+
/* @__PURE__ */ a(U, { align: "start", className: "w-48 max-h-56 overflow-y-auto", children: [
|
|
377
|
+
/* @__PURE__ */ e(q, { children: "Assignee" }),
|
|
371
378
|
/* @__PURE__ */ e(H, {}),
|
|
372
|
-
|
|
379
|
+
D.map((o) => /* @__PURE__ */ e(
|
|
373
380
|
ge,
|
|
374
381
|
{
|
|
375
|
-
checked:
|
|
376
|
-
onCheckedChange: () =>
|
|
377
|
-
children:
|
|
382
|
+
checked: n.assignees.includes(o.id),
|
|
383
|
+
onCheckedChange: () => m(o.id),
|
|
384
|
+
children: o.name
|
|
378
385
|
},
|
|
379
|
-
|
|
386
|
+
o.id
|
|
380
387
|
))
|
|
381
388
|
] })
|
|
382
389
|
] }),
|
|
383
|
-
|
|
384
|
-
/* @__PURE__ */ e(
|
|
385
|
-
|
|
390
|
+
d.length > 0 && /* @__PURE__ */ a(F, { children: [
|
|
391
|
+
/* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ a(
|
|
392
|
+
_,
|
|
386
393
|
{
|
|
387
394
|
variant: "ghost",
|
|
388
395
|
size: "sm",
|
|
389
396
|
className: N(
|
|
390
|
-
|
|
397
|
+
n.labels.length > 0 && "text-interactive"
|
|
391
398
|
),
|
|
392
399
|
title: "Filter by label",
|
|
393
400
|
children: [
|
|
394
401
|
"Label",
|
|
395
|
-
|
|
402
|
+
n.labels.length > 0 && /* @__PURE__ */ a("span", { className: "ml-ds-01 text-ds-xs", children: [
|
|
396
403
|
"(",
|
|
397
|
-
|
|
404
|
+
n.labels.length,
|
|
398
405
|
")"
|
|
399
406
|
] })
|
|
400
407
|
]
|
|
401
408
|
}
|
|
402
409
|
) }),
|
|
403
|
-
/* @__PURE__ */ a(
|
|
404
|
-
/* @__PURE__ */ e(
|
|
410
|
+
/* @__PURE__ */ a(U, { align: "start", className: "w-44 max-h-56 overflow-y-auto", children: [
|
|
411
|
+
/* @__PURE__ */ e(q, { children: "Label" }),
|
|
405
412
|
/* @__PURE__ */ e(H, {}),
|
|
406
|
-
|
|
413
|
+
d.map((o) => /* @__PURE__ */ e(
|
|
407
414
|
ge,
|
|
408
415
|
{
|
|
409
|
-
checked:
|
|
410
|
-
onCheckedChange: () =>
|
|
411
|
-
children:
|
|
416
|
+
checked: n.labels.includes(o),
|
|
417
|
+
onCheckedChange: () => T(o),
|
|
418
|
+
children: o
|
|
412
419
|
},
|
|
413
|
-
|
|
420
|
+
o
|
|
414
421
|
))
|
|
415
422
|
] })
|
|
416
423
|
] }),
|
|
417
|
-
/* @__PURE__ */ a(
|
|
418
|
-
/* @__PURE__ */ e(
|
|
419
|
-
|
|
424
|
+
/* @__PURE__ */ a(F, { children: [
|
|
425
|
+
/* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ e(
|
|
426
|
+
_,
|
|
420
427
|
{
|
|
421
428
|
variant: "ghost",
|
|
422
429
|
size: "sm",
|
|
423
430
|
className: N(
|
|
424
|
-
|
|
431
|
+
n.dueDateRange && n.dueDateRange !== "none" && "text-interactive"
|
|
425
432
|
),
|
|
426
433
|
title: "Filter by due date",
|
|
427
434
|
children: "Due date"
|
|
428
435
|
}
|
|
429
436
|
) }),
|
|
430
|
-
/* @__PURE__ */ a(
|
|
431
|
-
/* @__PURE__ */ e(
|
|
437
|
+
/* @__PURE__ */ a(U, { align: "start", className: "w-40", children: [
|
|
438
|
+
/* @__PURE__ */ e(q, { children: "Due date" }),
|
|
432
439
|
/* @__PURE__ */ e(H, {}),
|
|
433
440
|
/* @__PURE__ */ e(
|
|
434
441
|
ut,
|
|
435
442
|
{
|
|
436
|
-
value:
|
|
437
|
-
onValueChange:
|
|
438
|
-
children:
|
|
443
|
+
value: n.dueDateRange ?? "",
|
|
444
|
+
onValueChange: g,
|
|
445
|
+
children: Ce.map((o) => /* @__PURE__ */ e(ht, { value: o.value, children: o.label }, o.value))
|
|
439
446
|
}
|
|
440
447
|
)
|
|
441
448
|
] })
|
|
@@ -443,51 +450,51 @@ function Be() {
|
|
|
443
450
|
] }),
|
|
444
451
|
/* @__PURE__ */ e("div", { className: "flex-1" }),
|
|
445
452
|
/* @__PURE__ */ e(
|
|
446
|
-
|
|
453
|
+
_,
|
|
447
454
|
{
|
|
448
|
-
variant:
|
|
455
|
+
variant: h ? "outline" : "ghost",
|
|
449
456
|
size: "sm",
|
|
450
|
-
onClick: () =>
|
|
457
|
+
onClick: () => l(!h),
|
|
451
458
|
title: "Highlight my tasks",
|
|
452
459
|
"aria-label": "Highlight my tasks",
|
|
453
|
-
"aria-pressed":
|
|
454
|
-
className: N(
|
|
455
|
-
children: /* @__PURE__ */ e(
|
|
460
|
+
"aria-pressed": h,
|
|
461
|
+
className: N(h && "text-interactive"),
|
|
462
|
+
children: /* @__PURE__ */ e(Z, { className: "h-ico-sm w-ico-sm" })
|
|
456
463
|
}
|
|
457
464
|
),
|
|
458
465
|
/* @__PURE__ */ e(
|
|
459
|
-
|
|
466
|
+
gt,
|
|
460
467
|
{
|
|
461
468
|
size: "sm",
|
|
462
469
|
variant: "tonal",
|
|
463
|
-
options:
|
|
464
|
-
selectedId:
|
|
465
|
-
onSelect: (
|
|
470
|
+
options: y,
|
|
471
|
+
selectedId: w,
|
|
472
|
+
onSelect: (o) => k(o)
|
|
466
473
|
}
|
|
467
474
|
)
|
|
468
475
|
] }),
|
|
469
|
-
|
|
470
|
-
|
|
476
|
+
x.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-02 flex-wrap", children: [
|
|
477
|
+
x.map((o, p) => /* @__PURE__ */ e(
|
|
471
478
|
"div",
|
|
472
479
|
{
|
|
473
480
|
className: "animate-scale-in delay-stagger",
|
|
474
481
|
style: { "--stagger-index": p },
|
|
475
482
|
children: /* @__PURE__ */ e(
|
|
476
|
-
|
|
483
|
+
mt,
|
|
477
484
|
{
|
|
478
485
|
variant: "subtle",
|
|
479
486
|
size: "sm",
|
|
480
|
-
onDismiss:
|
|
481
|
-
children:
|
|
487
|
+
onDismiss: o.onRemove,
|
|
488
|
+
children: o.label
|
|
482
489
|
}
|
|
483
490
|
)
|
|
484
491
|
},
|
|
485
|
-
|
|
492
|
+
o.key
|
|
486
493
|
)),
|
|
487
494
|
/* @__PURE__ */ e(
|
|
488
495
|
"button",
|
|
489
496
|
{
|
|
490
|
-
onClick:
|
|
497
|
+
onClick: i,
|
|
491
498
|
className: "text-ds-xs text-text-tertiary hover:text-interactive transition-colors",
|
|
492
499
|
"aria-label": "Clear all filters",
|
|
493
500
|
children: "Clear all"
|
|
@@ -496,34 +503,34 @@ function Be() {
|
|
|
496
503
|
] })
|
|
497
504
|
] });
|
|
498
505
|
}
|
|
499
|
-
|
|
500
|
-
const
|
|
501
|
-
function
|
|
506
|
+
We.displayName = "BoardToolbar";
|
|
507
|
+
const Ft = ["LOW", "MEDIUM", "HIGH", "URGENT"];
|
|
508
|
+
function $e() {
|
|
502
509
|
const {
|
|
503
|
-
rawColumns: s,
|
|
504
510
|
columns: t,
|
|
511
|
+
members: s,
|
|
505
512
|
selectedTaskIds: n,
|
|
506
513
|
clearSelection: r,
|
|
507
|
-
onBulkAction:
|
|
508
|
-
} =
|
|
509
|
-
|
|
514
|
+
onBulkAction: i
|
|
515
|
+
} = G(), u = n.size, w = Array.from(n), k = s, h = (l, f) => {
|
|
516
|
+
i({ type: l, taskIds: w, value: f }), r();
|
|
510
517
|
};
|
|
511
518
|
return /* @__PURE__ */ e(
|
|
512
519
|
"div",
|
|
513
520
|
{
|
|
514
521
|
className: N(
|
|
515
522
|
"grid transition-[grid-template-rows,opacity] duration-moderate-02 ease-expressive-entrance",
|
|
516
|
-
|
|
523
|
+
u > 0 ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"
|
|
517
524
|
),
|
|
518
525
|
"aria-live": "polite",
|
|
519
526
|
children: /* @__PURE__ */ e("div", { className: "overflow-hidden", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-03 py-ds-02", children: [
|
|
520
527
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-ds-02", children: [
|
|
521
528
|
/* @__PURE__ */ a("span", { className: "text-ds-sm font-medium text-text-primary", children: [
|
|
522
|
-
|
|
529
|
+
u,
|
|
523
530
|
" selected"
|
|
524
531
|
] }),
|
|
525
532
|
/* @__PURE__ */ e(
|
|
526
|
-
|
|
533
|
+
_,
|
|
527
534
|
{
|
|
528
535
|
variant: "ghost",
|
|
529
536
|
size: "icon-md",
|
|
@@ -531,86 +538,86 @@ function We() {
|
|
|
531
538
|
"aria-label": "Clear selection",
|
|
532
539
|
title: "Clear selection",
|
|
533
540
|
className: "h-6 w-6",
|
|
534
|
-
children: /* @__PURE__ */ e(
|
|
541
|
+
children: /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" })
|
|
535
542
|
}
|
|
536
543
|
)
|
|
537
544
|
] }),
|
|
538
545
|
/* @__PURE__ */ e("div", { className: "h-4 w-px bg-border-subtle" }),
|
|
539
|
-
/* @__PURE__ */ e("div", { className: "animate-fade-in delay-stagger", style: { "--stagger-index": 0 }, children: /* @__PURE__ */ a(
|
|
540
|
-
/* @__PURE__ */ e(
|
|
546
|
+
/* @__PURE__ */ e("div", { className: "animate-fade-in delay-stagger", style: { "--stagger-index": 0 }, children: /* @__PURE__ */ a(F, { children: [
|
|
547
|
+
/* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ a(_, { variant: "ghost", size: "sm", title: "Move to column", tabIndex: u > 0 ? 0 : -1, children: [
|
|
541
548
|
/* @__PURE__ */ e(pe, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
|
|
542
549
|
"Move"
|
|
543
550
|
] }) }),
|
|
544
|
-
/* @__PURE__ */ a(
|
|
545
|
-
/* @__PURE__ */ e(
|
|
551
|
+
/* @__PURE__ */ a(U, { align: "start", className: "w-44", children: [
|
|
552
|
+
/* @__PURE__ */ e(q, { children: "Move to" }),
|
|
546
553
|
/* @__PURE__ */ e(H, {}),
|
|
547
554
|
t.map((l) => /* @__PURE__ */ e(
|
|
548
|
-
|
|
555
|
+
z,
|
|
549
556
|
{
|
|
550
|
-
onClick: () =>
|
|
557
|
+
onClick: () => h("move", l.id),
|
|
551
558
|
children: l.name
|
|
552
559
|
},
|
|
553
560
|
l.id
|
|
554
561
|
))
|
|
555
562
|
] })
|
|
556
563
|
] }) }),
|
|
557
|
-
/* @__PURE__ */ e("div", { className: "animate-fade-in delay-stagger", style: { "--stagger-index": 1 }, children: /* @__PURE__ */ a(
|
|
558
|
-
/* @__PURE__ */ e(
|
|
559
|
-
/* @__PURE__ */ e(
|
|
564
|
+
/* @__PURE__ */ e("div", { className: "animate-fade-in delay-stagger", style: { "--stagger-index": 1 }, children: /* @__PURE__ */ a(F, { children: [
|
|
565
|
+
/* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ a(_, { variant: "ghost", size: "sm", title: "Set priority", tabIndex: u > 0 ? 0 : -1, children: [
|
|
566
|
+
/* @__PURE__ */ e(de, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
|
|
560
567
|
"Priority"
|
|
561
568
|
] }) }),
|
|
562
|
-
/* @__PURE__ */ a(
|
|
563
|
-
/* @__PURE__ */ e(
|
|
569
|
+
/* @__PURE__ */ a(U, { align: "start", className: "w-40", children: [
|
|
570
|
+
/* @__PURE__ */ e(q, { children: "Set priority" }),
|
|
564
571
|
/* @__PURE__ */ e(H, {}),
|
|
565
|
-
|
|
566
|
-
|
|
572
|
+
Ft.map((l) => /* @__PURE__ */ e(
|
|
573
|
+
z,
|
|
567
574
|
{
|
|
568
|
-
onClick: () =>
|
|
569
|
-
className:
|
|
575
|
+
onClick: () => h("priority", l),
|
|
576
|
+
className: me[l],
|
|
570
577
|
children: l.charAt(0) + l.slice(1).toLowerCase()
|
|
571
578
|
},
|
|
572
579
|
l
|
|
573
580
|
))
|
|
574
581
|
] })
|
|
575
582
|
] }) }),
|
|
576
|
-
|
|
577
|
-
/* @__PURE__ */ e(
|
|
578
|
-
/* @__PURE__ */ e(
|
|
583
|
+
k.length > 0 && /* @__PURE__ */ e("div", { className: "animate-fade-in delay-stagger", style: { "--stagger-index": 2 }, children: /* @__PURE__ */ a(F, { children: [
|
|
584
|
+
/* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ a(_, { variant: "ghost", size: "sm", title: "Assign", tabIndex: u > 0 ? 0 : -1, children: [
|
|
585
|
+
/* @__PURE__ */ e(Z, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
|
|
579
586
|
"Assign"
|
|
580
587
|
] }) }),
|
|
581
|
-
/* @__PURE__ */ a(
|
|
582
|
-
/* @__PURE__ */ e(
|
|
588
|
+
/* @__PURE__ */ a(U, { align: "start", className: "w-44 max-h-48 overflow-y-auto", children: [
|
|
589
|
+
/* @__PURE__ */ e(q, { children: "Assign to" }),
|
|
583
590
|
/* @__PURE__ */ e(H, {}),
|
|
584
|
-
|
|
585
|
-
|
|
591
|
+
k.map((l) => /* @__PURE__ */ e(
|
|
592
|
+
z,
|
|
586
593
|
{
|
|
587
|
-
onClick: () =>
|
|
594
|
+
onClick: () => h("assign", l.id),
|
|
588
595
|
children: l.name
|
|
589
596
|
},
|
|
590
597
|
l.id
|
|
591
598
|
))
|
|
592
599
|
] })
|
|
593
600
|
] }) }),
|
|
594
|
-
/* @__PURE__ */ e("div", { className: "animate-fade-in delay-stagger", style: { "--stagger-index": 3 }, children: /* @__PURE__ */ a(
|
|
595
|
-
/* @__PURE__ */ e(
|
|
596
|
-
/* @__PURE__ */ e(
|
|
601
|
+
/* @__PURE__ */ e("div", { className: "animate-fade-in delay-stagger", style: { "--stagger-index": 3 }, children: /* @__PURE__ */ a(F, { children: [
|
|
602
|
+
/* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ a(_, { variant: "ghost", size: "sm", title: "Set visibility", tabIndex: u > 0 ? 0 : -1, children: [
|
|
603
|
+
/* @__PURE__ */ e(ee, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
|
|
597
604
|
"Visibility"
|
|
598
605
|
] }) }),
|
|
599
|
-
/* @__PURE__ */ a(
|
|
600
|
-
/* @__PURE__ */ e(
|
|
601
|
-
/* @__PURE__ */ e(
|
|
606
|
+
/* @__PURE__ */ a(U, { align: "start", className: "w-40", children: [
|
|
607
|
+
/* @__PURE__ */ e(z, { onClick: () => h("visibility", "INTERNAL"), children: "Internal only" }),
|
|
608
|
+
/* @__PURE__ */ e(z, { onClick: () => h("visibility", "EVERYONE"), children: "Visible to all" })
|
|
602
609
|
] })
|
|
603
610
|
] }) }),
|
|
604
611
|
/* @__PURE__ */ e("div", { className: "flex-1" }),
|
|
605
612
|
/* @__PURE__ */ e("div", { className: "animate-fade-in delay-stagger", style: { "--stagger-index": 4 }, children: /* @__PURE__ */ a(
|
|
606
|
-
|
|
613
|
+
_,
|
|
607
614
|
{
|
|
608
615
|
variant: "ghost",
|
|
609
616
|
size: "sm",
|
|
610
617
|
className: "text-error hover:text-error",
|
|
611
|
-
onClick: () =>
|
|
618
|
+
onClick: () => h("delete"),
|
|
612
619
|
title: "Delete selected tasks",
|
|
613
|
-
tabIndex:
|
|
620
|
+
tabIndex: u > 0 ? 0 : -1,
|
|
614
621
|
children: [
|
|
615
622
|
/* @__PURE__ */ e(xe, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
|
|
616
623
|
"Delete"
|
|
@@ -621,39 +628,39 @@ function We() {
|
|
|
621
628
|
}
|
|
622
629
|
);
|
|
623
630
|
}
|
|
624
|
-
|
|
625
|
-
function
|
|
626
|
-
const
|
|
627
|
-
for (const r of
|
|
628
|
-
r.owner && !
|
|
629
|
-
for (const
|
|
630
|
-
|
|
631
|
+
$e.displayName = "BulkActionBar";
|
|
632
|
+
function Vt(t) {
|
|
633
|
+
const s = /* @__PURE__ */ new Set(), n = [];
|
|
634
|
+
for (const r of t.tasks) {
|
|
635
|
+
r.owner && !s.has(r.owner.id) && (s.add(r.owner.id), n.push(r.owner));
|
|
636
|
+
for (const i of r.assignees)
|
|
637
|
+
s.has(i.id) || (s.add(i.id), n.push(i));
|
|
631
638
|
}
|
|
632
639
|
return n;
|
|
633
640
|
}
|
|
634
|
-
function
|
|
635
|
-
const { onColumnWipLimitChange: r } =
|
|
636
|
-
const
|
|
637
|
-
if (
|
|
638
|
-
r(
|
|
641
|
+
function Ut({ columnId: t, currentLimit: s, onClose: n }) {
|
|
642
|
+
const { onColumnWipLimitChange: r } = G(), [i, u] = E(s != null ? String(s) : ""), w = W(() => {
|
|
643
|
+
const h = i.trim();
|
|
644
|
+
if (h === "")
|
|
645
|
+
r(t, null);
|
|
639
646
|
else {
|
|
640
|
-
const l = parseInt(
|
|
641
|
-
!isNaN(l) && l > 0 && r(
|
|
647
|
+
const l = parseInt(h, 10);
|
|
648
|
+
!isNaN(l) && l > 0 && r(t, l);
|
|
642
649
|
}
|
|
643
650
|
n();
|
|
644
|
-
}, [
|
|
651
|
+
}, [i, t, r, n]);
|
|
645
652
|
return (
|
|
646
653
|
// eslint-disable-next-line jsx-a11y/no-autofocus -- intentional: input opens after user selects "Set WIP Limit"
|
|
647
654
|
/* @__PURE__ */ e(
|
|
648
|
-
|
|
655
|
+
oe,
|
|
649
656
|
{
|
|
650
657
|
type: "number",
|
|
651
658
|
min: 1,
|
|
652
|
-
value:
|
|
653
|
-
onChange: (
|
|
654
|
-
onBlur:
|
|
655
|
-
onKeyDown: (
|
|
656
|
-
|
|
659
|
+
value: i,
|
|
660
|
+
onChange: (h) => u(h.target.value),
|
|
661
|
+
onBlur: w,
|
|
662
|
+
onKeyDown: (h) => {
|
|
663
|
+
h.key === "Enter" && w(), h.key === "Escape" && n();
|
|
657
664
|
},
|
|
658
665
|
placeholder: "Limit...",
|
|
659
666
|
"aria-label": "WIP limit",
|
|
@@ -664,36 +671,36 @@ function Ft({ columnId: s, currentLimit: t, onClose: n }) {
|
|
|
664
671
|
)
|
|
665
672
|
);
|
|
666
673
|
}
|
|
667
|
-
function Pe({ column:
|
|
668
|
-
var
|
|
674
|
+
function Pe({ column: t, index: s }) {
|
|
675
|
+
var te;
|
|
669
676
|
const {
|
|
670
|
-
|
|
677
|
+
members: n,
|
|
671
678
|
onColumnRename: r,
|
|
672
|
-
onColumnDelete:
|
|
673
|
-
onColumnToggleVisibility:
|
|
674
|
-
onTaskAdd:
|
|
675
|
-
} =
|
|
676
|
-
|
|
679
|
+
onColumnDelete: i,
|
|
680
|
+
onColumnToggleVisibility: u,
|
|
681
|
+
onTaskAdd: w
|
|
682
|
+
} = G(), [k, h] = E(!1), [l, f] = E(t.name), [S, I] = E(!1), [c, D] = E(!1), [d, v] = E(""), [m, T] = E(null), [g, y] = E(""), x = ie(null), o = n, p = we[s % we.length], R = t.tasks.length, L = t.wipLimit ?? null, A = L != null && R > L, P = Vt(t), O = () => {
|
|
683
|
+
f(t.name), h(!0);
|
|
677
684
|
}, C = () => {
|
|
678
|
-
const
|
|
679
|
-
|
|
680
|
-
},
|
|
681
|
-
|
|
682
|
-
},
|
|
683
|
-
|
|
684
|
-
},
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
title:
|
|
688
|
-
ownerId:
|
|
689
|
-
dueDate:
|
|
690
|
-
}),
|
|
691
|
-
},
|
|
692
|
-
|
|
693
|
-
},
|
|
694
|
-
|
|
695
|
-
var
|
|
696
|
-
return (
|
|
685
|
+
const b = l.trim();
|
|
686
|
+
b && b !== t.name && r(t.id, b), h(!1);
|
|
687
|
+
}, M = (b) => {
|
|
688
|
+
b.key === "Enter" && C(), b.key === "Escape" && (f(t.name), h(!1));
|
|
689
|
+
}, B = () => {
|
|
690
|
+
v(""), T(null), y(""), D(!1);
|
|
691
|
+
}, j = () => {
|
|
692
|
+
const b = d.trim();
|
|
693
|
+
b && (w(t.id, {
|
|
694
|
+
title: b,
|
|
695
|
+
ownerId: m,
|
|
696
|
+
dueDate: g || null
|
|
697
|
+
}), B());
|
|
698
|
+
}, X = (b) => {
|
|
699
|
+
b.key === "Enter" && j(), b.key === "Escape" && B();
|
|
700
|
+
}, ue = () => {
|
|
701
|
+
c ? B() : (D(!0), setTimeout(() => {
|
|
702
|
+
var b;
|
|
703
|
+
return (b = x.current) == null ? void 0 : b.focus();
|
|
697
704
|
}, 50));
|
|
698
705
|
};
|
|
699
706
|
return /* @__PURE__ */ a("div", { className: "group/header flex flex-col gap-ds-02", children: [
|
|
@@ -701,20 +708,20 @@ function Pe({ column: s, index: t }) {
|
|
|
701
708
|
/* @__PURE__ */ e(
|
|
702
709
|
"span",
|
|
703
710
|
{
|
|
704
|
-
className: N("h-2.5 w-2.5 flex-shrink-0 rounded-full",
|
|
711
|
+
className: N("h-2.5 w-2.5 flex-shrink-0 rounded-full", p),
|
|
705
712
|
"aria-hidden": "true",
|
|
706
|
-
title:
|
|
713
|
+
title: t.name
|
|
707
714
|
}
|
|
708
715
|
),
|
|
709
|
-
|
|
716
|
+
k ? (
|
|
710
717
|
// eslint-disable-next-line jsx-a11y/no-autofocus -- intentional: input appears after user double-clicks to rename
|
|
711
718
|
/* @__PURE__ */ e(
|
|
712
|
-
|
|
719
|
+
oe,
|
|
713
720
|
{
|
|
714
721
|
value: l,
|
|
715
|
-
onChange: (
|
|
722
|
+
onChange: (b) => f(b.target.value),
|
|
716
723
|
onBlur: C,
|
|
717
|
-
onKeyDown:
|
|
724
|
+
onKeyDown: M,
|
|
718
725
|
"aria-label": "Column name",
|
|
719
726
|
size: "sm",
|
|
720
727
|
className: "h-ds-xs flex-1 text-ds-sm font-semibold",
|
|
@@ -725,34 +732,34 @@ function Pe({ column: s, index: t }) {
|
|
|
725
732
|
"h3",
|
|
726
733
|
{
|
|
727
734
|
className: "flex-1 truncate text-ds-sm font-semibold text-text-primary",
|
|
728
|
-
onDoubleClick:
|
|
729
|
-
title:
|
|
730
|
-
"aria-label": L != null ? `${
|
|
735
|
+
onDoubleClick: O,
|
|
736
|
+
title: t.name,
|
|
737
|
+
"aria-label": L != null ? `${t.name}, ${R} of ${L} tasks${A ? ", WIP limit exceeded" : ""}` : `${t.name}, ${R} tasks`,
|
|
731
738
|
children: [
|
|
732
|
-
|
|
739
|
+
t.name,
|
|
733
740
|
/* @__PURE__ */ a("span", { className: "ml-ds-02 text-ds-xs font-normal text-text-tertiary", children: [
|
|
734
741
|
"(",
|
|
735
|
-
|
|
742
|
+
R,
|
|
736
743
|
")"
|
|
737
744
|
] })
|
|
738
745
|
]
|
|
739
746
|
}
|
|
740
747
|
),
|
|
741
|
-
|
|
742
|
-
|
|
748
|
+
S ? /* @__PURE__ */ e(
|
|
749
|
+
Ut,
|
|
743
750
|
{
|
|
744
|
-
columnId:
|
|
751
|
+
columnId: t.id,
|
|
745
752
|
currentLimit: L,
|
|
746
|
-
onClose: () =>
|
|
753
|
+
onClose: () => I(!1)
|
|
747
754
|
}
|
|
748
755
|
) : L != null ? /* @__PURE__ */ a(
|
|
749
756
|
"span",
|
|
750
757
|
{
|
|
751
758
|
className: N(
|
|
752
759
|
"flex-shrink-0 text-ds-xs tabular-nums",
|
|
753
|
-
|
|
760
|
+
A ? "font-semibold text-error" : "text-text-tertiary"
|
|
754
761
|
),
|
|
755
|
-
"aria-label": `WIP limit: ${L}${
|
|
762
|
+
"aria-label": `WIP limit: ${L}${A ? ", exceeded" : ""}`,
|
|
756
763
|
children: [
|
|
757
764
|
"/ ",
|
|
758
765
|
L
|
|
@@ -760,7 +767,7 @@ function Pe({ column: s, index: t }) {
|
|
|
760
767
|
}
|
|
761
768
|
) : null,
|
|
762
769
|
/* @__PURE__ */ e(
|
|
763
|
-
|
|
770
|
+
_,
|
|
764
771
|
{
|
|
765
772
|
variant: "ghost",
|
|
766
773
|
size: "icon-md",
|
|
@@ -771,13 +778,13 @@ function Pe({ column: s, index: t }) {
|
|
|
771
778
|
),
|
|
772
779
|
"aria-label": "Add task",
|
|
773
780
|
title: "Add task",
|
|
774
|
-
onClick:
|
|
781
|
+
onClick: ue,
|
|
775
782
|
children: /* @__PURE__ */ e(ye, { className: "h-ico-sm w-ico-sm" })
|
|
776
783
|
}
|
|
777
784
|
),
|
|
778
|
-
/* @__PURE__ */ a(
|
|
779
|
-
/* @__PURE__ */ e(
|
|
780
|
-
|
|
785
|
+
/* @__PURE__ */ a(F, { children: [
|
|
786
|
+
/* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ e(
|
|
787
|
+
_,
|
|
781
788
|
{
|
|
782
789
|
variant: "ghost",
|
|
783
790
|
size: "icon-md",
|
|
@@ -787,37 +794,37 @@ function Pe({ column: s, index: t }) {
|
|
|
787
794
|
),
|
|
788
795
|
"aria-label": "Column options",
|
|
789
796
|
title: "Column options",
|
|
790
|
-
children: /* @__PURE__ */ e(
|
|
797
|
+
children: /* @__PURE__ */ e(vt, { className: "h-ico-sm w-ico-sm" })
|
|
791
798
|
}
|
|
792
799
|
) }),
|
|
793
|
-
/* @__PURE__ */ a(
|
|
794
|
-
/* @__PURE__ */ a(
|
|
795
|
-
/* @__PURE__ */ e(
|
|
800
|
+
/* @__PURE__ */ a(U, { align: "end", className: "w-48", children: [
|
|
801
|
+
/* @__PURE__ */ a(z, { onClick: O, children: [
|
|
802
|
+
/* @__PURE__ */ e(bt, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
796
803
|
"Rename"
|
|
797
804
|
] }),
|
|
798
|
-
/* @__PURE__ */ a(
|
|
805
|
+
/* @__PURE__ */ a(z, { onClick: () => I(!0), children: [
|
|
799
806
|
/* @__PURE__ */ e(wt, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
800
807
|
"Set WIP Limit"
|
|
801
808
|
] }),
|
|
802
809
|
/* @__PURE__ */ e(
|
|
803
|
-
|
|
810
|
+
z,
|
|
804
811
|
{
|
|
805
|
-
onClick: () =>
|
|
806
|
-
children:
|
|
807
|
-
/* @__PURE__ */ e(
|
|
812
|
+
onClick: () => u(t.id, !(t.isClientVisible ?? !1)),
|
|
813
|
+
children: t.isClientVisible ? /* @__PURE__ */ a(re, { children: [
|
|
814
|
+
/* @__PURE__ */ e(Se, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
808
815
|
"Hide from client"
|
|
809
|
-
] }) : /* @__PURE__ */ a(
|
|
810
|
-
/* @__PURE__ */ e(
|
|
816
|
+
] }) : /* @__PURE__ */ a(re, { children: [
|
|
817
|
+
/* @__PURE__ */ e(ee, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
811
818
|
"Show to client"
|
|
812
819
|
] })
|
|
813
820
|
}
|
|
814
821
|
),
|
|
815
822
|
/* @__PURE__ */ e(H, {}),
|
|
816
823
|
/* @__PURE__ */ a(
|
|
817
|
-
|
|
824
|
+
z,
|
|
818
825
|
{
|
|
819
826
|
className: "text-error focus:text-error",
|
|
820
|
-
onClick: () =>
|
|
827
|
+
onClick: () => i(t.id),
|
|
821
828
|
children: [
|
|
822
829
|
/* @__PURE__ */ e(xe, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
823
830
|
"Delete column"
|
|
@@ -827,10 +834,10 @@ function Pe({ column: s, index: t }) {
|
|
|
827
834
|
] })
|
|
828
835
|
] })
|
|
829
836
|
] }),
|
|
830
|
-
|
|
831
|
-
|
|
837
|
+
P.length > 0 && /* @__PURE__ */ e("div", { className: "px-ds-04 pb-ds-02", children: /* @__PURE__ */ e(
|
|
838
|
+
Tt,
|
|
832
839
|
{
|
|
833
|
-
users:
|
|
840
|
+
users: P,
|
|
834
841
|
max: 3,
|
|
835
842
|
size: "sm",
|
|
836
843
|
showTooltip: !0
|
|
@@ -841,55 +848,55 @@ function Pe({ column: s, index: t }) {
|
|
|
841
848
|
{
|
|
842
849
|
className: N(
|
|
843
850
|
"grid transition-[grid-template-rows,opacity] duration-moderate-02 ease-expressive-entrance",
|
|
844
|
-
|
|
851
|
+
c ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"
|
|
845
852
|
),
|
|
846
853
|
children: /* @__PURE__ */ e("div", { className: "overflow-hidden", children: /* @__PURE__ */ a("div", { className: "px-ds-04 pb-ds-03 flex flex-col gap-ds-02", children: [
|
|
847
854
|
/* @__PURE__ */ e(
|
|
848
|
-
|
|
855
|
+
oe,
|
|
849
856
|
{
|
|
850
|
-
ref:
|
|
851
|
-
value:
|
|
852
|
-
onChange: (
|
|
853
|
-
onKeyDown:
|
|
857
|
+
ref: x,
|
|
858
|
+
value: d,
|
|
859
|
+
onChange: (b) => v(b.target.value),
|
|
860
|
+
onKeyDown: X,
|
|
854
861
|
placeholder: "Task title...",
|
|
855
862
|
"aria-label": "New task title",
|
|
856
863
|
size: "sm",
|
|
857
|
-
tabIndex:
|
|
858
|
-
autoFocus:
|
|
864
|
+
tabIndex: c ? 0 : -1,
|
|
865
|
+
autoFocus: c
|
|
859
866
|
}
|
|
860
867
|
),
|
|
861
868
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-ds-01", children: [
|
|
862
|
-
/* @__PURE__ */ a(
|
|
863
|
-
/* @__PURE__ */ e(
|
|
869
|
+
/* @__PURE__ */ a(F, { children: [
|
|
870
|
+
/* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ e(
|
|
864
871
|
"button",
|
|
865
872
|
{
|
|
866
873
|
className: N(
|
|
867
874
|
"flex items-center justify-center h-6 w-6 rounded-ds-md transition-colors",
|
|
868
|
-
|
|
875
|
+
m ? "text-interactive bg-interactive-subtle" : "text-text-tertiary hover:text-text-primary hover:bg-layer-active"
|
|
869
876
|
),
|
|
870
|
-
title:
|
|
877
|
+
title: m ? `Lead: ${(te = o.find((b) => b.id === m)) == null ? void 0 : te.name}` : "Assign task lead",
|
|
871
878
|
"aria-label": "Assign task lead",
|
|
872
|
-
tabIndex:
|
|
873
|
-
children: /* @__PURE__ */ e(
|
|
879
|
+
tabIndex: c ? 0 : -1,
|
|
880
|
+
children: /* @__PURE__ */ e(Z, { className: "h-3.5 w-3.5" })
|
|
874
881
|
}
|
|
875
882
|
) }),
|
|
876
|
-
/* @__PURE__ */ a(
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
/* @__PURE__ */ a(
|
|
880
|
-
/* @__PURE__ */ e(
|
|
883
|
+
/* @__PURE__ */ a(U, { align: "start", className: "w-44 max-h-48 overflow-y-auto", children: [
|
|
884
|
+
o.length === 0 && /* @__PURE__ */ e("div", { className: "px-ds-03 py-ds-02 text-ds-xs text-text-tertiary", children: "No members found" }),
|
|
885
|
+
m && /* @__PURE__ */ a(re, { children: [
|
|
886
|
+
/* @__PURE__ */ a(z, { onClick: () => T(null), children: [
|
|
887
|
+
/* @__PURE__ */ e(le, { className: "mr-ds-02 h-3 w-3 text-text-tertiary" }),
|
|
881
888
|
"Clear lead"
|
|
882
889
|
] }),
|
|
883
890
|
/* @__PURE__ */ e(H, {})
|
|
884
891
|
] }),
|
|
885
|
-
|
|
886
|
-
|
|
892
|
+
o.map((b) => /* @__PURE__ */ e(
|
|
893
|
+
z,
|
|
887
894
|
{
|
|
888
|
-
onClick: () =>
|
|
889
|
-
className: N(
|
|
890
|
-
children:
|
|
895
|
+
onClick: () => T(b.id),
|
|
896
|
+
className: N(m === b.id && "bg-interactive-subtle"),
|
|
897
|
+
children: b.name
|
|
891
898
|
},
|
|
892
|
-
|
|
899
|
+
b.id
|
|
893
900
|
))
|
|
894
901
|
] })
|
|
895
902
|
] }),
|
|
@@ -898,9 +905,9 @@ function Pe({ column: s, index: t }) {
|
|
|
898
905
|
{
|
|
899
906
|
className: N(
|
|
900
907
|
"relative flex items-center justify-center h-6 w-6 rounded-ds-md cursor-pointer transition-colors",
|
|
901
|
-
|
|
908
|
+
g ? "text-interactive bg-interactive-subtle" : "text-text-tertiary hover:text-text-primary hover:bg-layer-active"
|
|
902
909
|
),
|
|
903
|
-
title:
|
|
910
|
+
title: g ? `Due: ${g}` : "Set due date",
|
|
904
911
|
"aria-label": "Set due date",
|
|
905
912
|
children: [
|
|
906
913
|
/* @__PURE__ */ e(ve, { className: "h-3.5 w-3.5" }),
|
|
@@ -908,11 +915,11 @@ function Pe({ column: s, index: t }) {
|
|
|
908
915
|
"input",
|
|
909
916
|
{
|
|
910
917
|
type: "date",
|
|
911
|
-
value:
|
|
912
|
-
onChange: (
|
|
918
|
+
value: g,
|
|
919
|
+
onChange: (b) => y(b.target.value),
|
|
913
920
|
className: "absolute inset-0 opacity-0 cursor-pointer w-full h-full",
|
|
914
921
|
"aria-label": "Due date",
|
|
915
|
-
tabIndex:
|
|
922
|
+
tabIndex: c ? 0 : -1
|
|
916
923
|
}
|
|
917
924
|
)
|
|
918
925
|
]
|
|
@@ -922,27 +929,27 @@ function Pe({ column: s, index: t }) {
|
|
|
922
929
|
/* @__PURE__ */ e(
|
|
923
930
|
"button",
|
|
924
931
|
{
|
|
925
|
-
onClick:
|
|
926
|
-
disabled: !
|
|
932
|
+
onClick: j,
|
|
933
|
+
disabled: !d.trim(),
|
|
927
934
|
className: N(
|
|
928
935
|
"flex items-center justify-center h-6 w-6 rounded-ds-md transition-colors",
|
|
929
|
-
|
|
936
|
+
d.trim() ? "text-success hover:bg-success-surface" : "text-text-quaternary cursor-not-allowed"
|
|
930
937
|
),
|
|
931
938
|
title: "Confirm add task",
|
|
932
939
|
"aria-label": "Confirm add task",
|
|
933
|
-
tabIndex:
|
|
934
|
-
children: /* @__PURE__ */ e(
|
|
940
|
+
tabIndex: c ? 0 : -1,
|
|
941
|
+
children: /* @__PURE__ */ e(kt, { className: "h-3.5 w-3.5" })
|
|
935
942
|
}
|
|
936
943
|
),
|
|
937
944
|
/* @__PURE__ */ e(
|
|
938
945
|
"button",
|
|
939
946
|
{
|
|
940
|
-
onClick:
|
|
947
|
+
onClick: B,
|
|
941
948
|
className: "flex items-center justify-center h-6 w-6 rounded-ds-md text-text-tertiary hover:text-text-primary hover:bg-layer-active transition-colors",
|
|
942
949
|
title: "Cancel",
|
|
943
950
|
"aria-label": "Cancel adding task",
|
|
944
|
-
tabIndex:
|
|
945
|
-
children: /* @__PURE__ */ e(
|
|
951
|
+
tabIndex: c ? 0 : -1,
|
|
952
|
+
children: /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" })
|
|
946
953
|
}
|
|
947
954
|
)
|
|
948
955
|
] })
|
|
@@ -952,7 +959,7 @@ function Pe({ column: s, index: t }) {
|
|
|
952
959
|
] });
|
|
953
960
|
}
|
|
954
961
|
Pe.displayName = "ColumnHeader";
|
|
955
|
-
function
|
|
962
|
+
function Gt() {
|
|
956
963
|
return /* @__PURE__ */ a(
|
|
957
964
|
"svg",
|
|
958
965
|
{
|
|
@@ -972,7 +979,7 @@ function Vt() {
|
|
|
972
979
|
}
|
|
973
980
|
);
|
|
974
981
|
}
|
|
975
|
-
function
|
|
982
|
+
function Kt() {
|
|
976
983
|
return /* @__PURE__ */ a(
|
|
977
984
|
"svg",
|
|
978
985
|
{
|
|
@@ -991,7 +998,7 @@ function Ut() {
|
|
|
991
998
|
}
|
|
992
999
|
);
|
|
993
1000
|
}
|
|
994
|
-
function
|
|
1001
|
+
function Ht() {
|
|
995
1002
|
return /* @__PURE__ */ a(
|
|
996
1003
|
"svg",
|
|
997
1004
|
{
|
|
@@ -1017,7 +1024,7 @@ function Gt() {
|
|
|
1017
1024
|
}
|
|
1018
1025
|
);
|
|
1019
1026
|
}
|
|
1020
|
-
function
|
|
1027
|
+
function Qt() {
|
|
1021
1028
|
return /* @__PURE__ */ a(
|
|
1022
1029
|
"svg",
|
|
1023
1030
|
{
|
|
@@ -1053,14 +1060,14 @@ function Kt() {
|
|
|
1053
1060
|
}
|
|
1054
1061
|
);
|
|
1055
1062
|
}
|
|
1056
|
-
const
|
|
1057
|
-
Vt,
|
|
1058
|
-
Ut,
|
|
1063
|
+
const Ne = [
|
|
1059
1064
|
Gt,
|
|
1060
|
-
Kt
|
|
1065
|
+
Kt,
|
|
1066
|
+
Ht,
|
|
1067
|
+
Qt
|
|
1061
1068
|
];
|
|
1062
|
-
function
|
|
1063
|
-
const
|
|
1069
|
+
function _e({ index: t, onAddTask: s, isDropTarget: n = !1, className: r }) {
|
|
1070
|
+
const i = Ne[t % Ne.length];
|
|
1064
1071
|
return /* @__PURE__ */ a(
|
|
1065
1072
|
"div",
|
|
1066
1073
|
{
|
|
@@ -1069,15 +1076,15 @@ function $e({ index: s, onAddTask: t, isDropTarget: n = !1, className: r }) {
|
|
|
1069
1076
|
r
|
|
1070
1077
|
),
|
|
1071
1078
|
children: [
|
|
1072
|
-
/* @__PURE__ */ e("span", { className: "text-text-quaternary", children: /* @__PURE__ */ e(
|
|
1073
|
-
n ? /* @__PURE__ */ e("p", { className: "text-ds-sm text-text-tertiary", children: "Drop tasks here" }) : /* @__PURE__ */ a(
|
|
1079
|
+
/* @__PURE__ */ e("span", { className: "text-text-quaternary", children: /* @__PURE__ */ e(i, {}) }),
|
|
1080
|
+
n ? /* @__PURE__ */ e("p", { className: "text-ds-sm text-text-tertiary", children: "Drop tasks here" }) : /* @__PURE__ */ a(re, { children: [
|
|
1074
1081
|
/* @__PURE__ */ e("p", { className: "text-ds-sm text-text-tertiary", children: "No tasks yet" }),
|
|
1075
1082
|
/* @__PURE__ */ a(
|
|
1076
|
-
|
|
1083
|
+
_,
|
|
1077
1084
|
{
|
|
1078
1085
|
variant: "ghost",
|
|
1079
1086
|
size: "sm",
|
|
1080
|
-
onClick:
|
|
1087
|
+
onClick: s,
|
|
1081
1088
|
children: [
|
|
1082
1089
|
/* @__PURE__ */ e(ye, { className: "h-ico-sm w-ico-sm" }),
|
|
1083
1090
|
"Add a task"
|
|
@@ -1089,20 +1096,20 @@ function $e({ index: s, onAddTask: t, isDropTarget: n = !1, className: r }) {
|
|
|
1089
1096
|
}
|
|
1090
1097
|
);
|
|
1091
1098
|
}
|
|
1092
|
-
|
|
1093
|
-
function
|
|
1094
|
-
const
|
|
1095
|
-
return
|
|
1096
|
-
label:
|
|
1099
|
+
_e.displayName = "ColumnEmpty";
|
|
1100
|
+
function jt(t) {
|
|
1101
|
+
const s = new Date(t), n = /* @__PURE__ */ new Date(), r = s.getTime() - n.getTime(), i = Math.ceil(r / (1e3 * 60 * 60 * 24));
|
|
1102
|
+
return i < 0 ? { label: "Overdue", className: "text-error" } : i === 0 ? { label: "Today", className: "text-warning" } : i === 1 ? { label: "Tomorrow", className: "text-warning" } : {
|
|
1103
|
+
label: s.toLocaleDateString("en-IN", { month: "short", day: "numeric" }),
|
|
1097
1104
|
className: "text-text-tertiary"
|
|
1098
1105
|
};
|
|
1099
1106
|
}
|
|
1100
|
-
const
|
|
1101
|
-
LOW:
|
|
1107
|
+
const ze = {
|
|
1108
|
+
LOW: Me,
|
|
1102
1109
|
MEDIUM: pe,
|
|
1103
|
-
HIGH:
|
|
1104
|
-
URGENT:
|
|
1105
|
-
},
|
|
1110
|
+
HIGH: Ae,
|
|
1111
|
+
URGENT: de
|
|
1112
|
+
}, Yt = Te(
|
|
1106
1113
|
"group/card relative rounded-ds-lg border border-transparent bg-layer-01 pl-3 pr-ds-03 py-ds-03 transition-all duration-fast-02 ease-productive-standard cursor-pointer",
|
|
1107
1114
|
{
|
|
1108
1115
|
variants: {
|
|
@@ -1132,51 +1139,51 @@ const _e = {
|
|
|
1132
1139
|
}
|
|
1133
1140
|
}
|
|
1134
1141
|
);
|
|
1135
|
-
function
|
|
1136
|
-
const
|
|
1137
|
-
if (!
|
|
1138
|
-
const n =
|
|
1139
|
-
return n.length >= 2 ? (n[0][0] + n[1][0]).toUpperCase() :
|
|
1142
|
+
function Fe(t) {
|
|
1143
|
+
const s = t.trim();
|
|
1144
|
+
if (!s) return "";
|
|
1145
|
+
const n = s.split(/\s+/);
|
|
1146
|
+
return n.length >= 2 ? (n[0][0] + n[1][0]).toUpperCase() : s.slice(0, 2).toUpperCase();
|
|
1140
1147
|
}
|
|
1141
|
-
function
|
|
1142
|
-
task:
|
|
1143
|
-
isDragging:
|
|
1148
|
+
function Ve({
|
|
1149
|
+
task: t,
|
|
1150
|
+
isDragging: s,
|
|
1144
1151
|
isDragOverlay: n,
|
|
1145
1152
|
dragHandleProps: r
|
|
1146
1153
|
}) {
|
|
1147
|
-
var
|
|
1154
|
+
var T;
|
|
1148
1155
|
const {
|
|
1149
|
-
selectedTaskIds:
|
|
1150
|
-
toggleTaskSelection:
|
|
1151
|
-
focusedTaskId:
|
|
1152
|
-
currentUserId:
|
|
1153
|
-
highlightMyTasks:
|
|
1156
|
+
selectedTaskIds: i,
|
|
1157
|
+
toggleTaskSelection: u,
|
|
1158
|
+
focusedTaskId: w,
|
|
1159
|
+
currentUserId: k,
|
|
1160
|
+
highlightMyTasks: h,
|
|
1154
1161
|
onClickTask: l
|
|
1155
|
-
} =
|
|
1156
|
-
|
|
1157
|
-
for (const
|
|
1158
|
-
|
|
1162
|
+
} = G(), f = i.has(t.id), S = i.size > 0, I = w === t.id, c = t.dueDate ? jt(t.dueDate) : null, D = ze[t.priority], d = me[t.priority], v = h && k != null && ((T = t.owner) == null ? void 0 : T.id) !== k && !t.assignees.some((g) => g.id === k), m = [];
|
|
1163
|
+
t.owner && m.push({ name: t.owner.name, image: t.owner.image, isOwner: !0 });
|
|
1164
|
+
for (const g of t.assignees)
|
|
1165
|
+
t.owner && g.id === t.owner.id || m.push({ name: g.name, image: g.image, isOwner: !1 });
|
|
1159
1166
|
return /* @__PURE__ */ a(
|
|
1160
1167
|
"div",
|
|
1161
1168
|
{
|
|
1162
1169
|
role: "group",
|
|
1163
1170
|
tabIndex: 0,
|
|
1164
|
-
"data-task-id":
|
|
1165
|
-
"aria-label": `Task ${
|
|
1171
|
+
"data-task-id": t.id,
|
|
1172
|
+
"aria-label": `Task ${t.taskId}: ${t.title}`,
|
|
1166
1173
|
className: N(
|
|
1167
|
-
|
|
1168
|
-
state: n ? "overlay" :
|
|
1169
|
-
blocked:
|
|
1170
|
-
selected:
|
|
1171
|
-
dimmed:
|
|
1174
|
+
Yt({
|
|
1175
|
+
state: n ? "overlay" : s ? "dragging" : "default",
|
|
1176
|
+
blocked: t.isBlocked,
|
|
1177
|
+
selected: f,
|
|
1178
|
+
dimmed: v
|
|
1172
1179
|
}),
|
|
1173
1180
|
n && "scale-[1.03] rotate-[1.5deg] shadow-03",
|
|
1174
|
-
|
|
1175
|
-
|
|
1181
|
+
s && "opacity-40",
|
|
1182
|
+
I && "ring-1 ring-focus"
|
|
1176
1183
|
),
|
|
1177
|
-
onClick: () => l(
|
|
1178
|
-
onKeyDown: (
|
|
1179
|
-
(
|
|
1184
|
+
onClick: () => l(t.id),
|
|
1185
|
+
onKeyDown: (g) => {
|
|
1186
|
+
(g.key === "Enter" || g.key === " ") && (g.preventDefault(), l(t.id));
|
|
1180
1187
|
},
|
|
1181
1188
|
children: [
|
|
1182
1189
|
/* @__PURE__ */ e(
|
|
@@ -1184,23 +1191,23 @@ function Fe({
|
|
|
1184
1191
|
{
|
|
1185
1192
|
className: N(
|
|
1186
1193
|
"absolute -top-2 -left-2 z-10 transition-opacity",
|
|
1187
|
-
|
|
1194
|
+
S || f ? "opacity-100 animate-scale-bounce" : "opacity-0 group-hover/card:opacity-100"
|
|
1188
1195
|
),
|
|
1189
1196
|
children: /* @__PURE__ */ e(
|
|
1190
|
-
|
|
1197
|
+
Ee,
|
|
1191
1198
|
{
|
|
1192
|
-
checked:
|
|
1193
|
-
onCheckedChange: () =>
|
|
1194
|
-
onClick: (
|
|
1195
|
-
"aria-label": `Select task ${
|
|
1199
|
+
checked: f,
|
|
1200
|
+
onCheckedChange: () => u(t.id),
|
|
1201
|
+
onClick: (g) => g.stopPropagation(),
|
|
1202
|
+
"aria-label": `Select task ${t.taskId}`,
|
|
1196
1203
|
className: "rounded-full bg-layer-01 shadow-01"
|
|
1197
1204
|
}
|
|
1198
1205
|
)
|
|
1199
1206
|
}
|
|
1200
1207
|
),
|
|
1201
1208
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-ds-02", children: [
|
|
1202
|
-
/* @__PURE__ */ e("span", { className: "text-ds-xs font-mono leading-none text-text-tertiary", children:
|
|
1203
|
-
/* @__PURE__ */ e(
|
|
1209
|
+
/* @__PURE__ */ e("span", { className: "text-ds-xs font-mono leading-none text-text-tertiary", children: t.taskId }),
|
|
1210
|
+
/* @__PURE__ */ e(D, { className: N("h-3 w-3 flex-shrink-0", d), title: `Priority: ${t.priority}` }),
|
|
1204
1211
|
/* @__PURE__ */ e("div", { className: "flex-1" }),
|
|
1205
1212
|
/* @__PURE__ */ e(
|
|
1206
1213
|
"button",
|
|
@@ -1213,69 +1220,69 @@ function Fe({
|
|
|
1213
1220
|
),
|
|
1214
1221
|
...(r == null ? void 0 : r.attributes) ?? {},
|
|
1215
1222
|
...(r == null ? void 0 : r.listeners) ?? {},
|
|
1216
|
-
"aria-label": `Drag handle for task: ${
|
|
1223
|
+
"aria-label": `Drag handle for task: ${t.title}`,
|
|
1217
1224
|
"aria-roledescription": "sortable",
|
|
1218
|
-
onClick: (
|
|
1219
|
-
children: /* @__PURE__ */ e(
|
|
1225
|
+
onClick: (g) => g.stopPropagation(),
|
|
1226
|
+
children: /* @__PURE__ */ e(Ct, { className: "h-ico-sm w-ico-sm text-icon-secondary" })
|
|
1220
1227
|
}
|
|
1221
1228
|
)
|
|
1222
1229
|
] }),
|
|
1223
|
-
/* @__PURE__ */ e("p", { className: "mt-ds-02 text-ds-sm font-medium text-text-primary line-clamp-2", children:
|
|
1230
|
+
/* @__PURE__ */ e("p", { className: "mt-ds-02 text-ds-sm font-medium text-text-primary line-clamp-2", children: t.title }),
|
|
1224
1231
|
/* @__PURE__ */ a("div", { className: "mt-ds-03 flex items-center gap-ds-02", children: [
|
|
1225
|
-
|
|
1232
|
+
c && /* @__PURE__ */ a(
|
|
1226
1233
|
"div",
|
|
1227
1234
|
{
|
|
1228
1235
|
className: N(
|
|
1229
1236
|
"flex items-center gap-ds-01 text-ds-xs leading-tight",
|
|
1230
|
-
|
|
1237
|
+
c.className
|
|
1231
1238
|
),
|
|
1232
|
-
title: `Due: ${
|
|
1239
|
+
title: `Due: ${c.label}`,
|
|
1233
1240
|
children: [
|
|
1234
1241
|
/* @__PURE__ */ e(ve, { className: "h-3 w-3" }),
|
|
1235
|
-
/* @__PURE__ */ e("span", { children:
|
|
1242
|
+
/* @__PURE__ */ e("span", { children: c.label })
|
|
1236
1243
|
]
|
|
1237
1244
|
}
|
|
1238
1245
|
),
|
|
1239
|
-
|
|
1246
|
+
t.subtaskCount > 0 && /* @__PURE__ */ a(
|
|
1240
1247
|
"div",
|
|
1241
1248
|
{
|
|
1242
1249
|
className: "flex items-center gap-ds-01 text-ds-xs text-text-tertiary",
|
|
1243
|
-
title: `Subtasks: ${
|
|
1250
|
+
title: `Subtasks: ${t.subtasksDone} of ${t.subtaskCount} done`,
|
|
1244
1251
|
children: [
|
|
1245
|
-
/* @__PURE__ */ e(
|
|
1252
|
+
/* @__PURE__ */ e(Nt, { className: "h-3 w-3" }),
|
|
1246
1253
|
/* @__PURE__ */ a("span", { children: [
|
|
1247
|
-
|
|
1254
|
+
t.subtasksDone,
|
|
1248
1255
|
"/",
|
|
1249
|
-
|
|
1256
|
+
t.subtaskCount
|
|
1250
1257
|
] })
|
|
1251
1258
|
]
|
|
1252
1259
|
}
|
|
1253
1260
|
),
|
|
1254
|
-
|
|
1255
|
-
|
|
1261
|
+
t.visibility === "EVERYONE" && /* @__PURE__ */ e("span", { className: "flex items-center text-text-tertiary", "aria-label": "Client visible", title: "Visible to client", children: /* @__PURE__ */ e(ee, { className: "h-3 w-3" }) }),
|
|
1262
|
+
t.isBlocked && /* @__PURE__ */ e("span", { className: "flex items-center text-error", "aria-label": "Blocked", title: "Blocked", children: /* @__PURE__ */ e(It, { className: "h-3 w-3" }) }),
|
|
1256
1263
|
/* @__PURE__ */ e("div", { className: "flex-1" }),
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1264
|
+
m.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center flex-shrink-0", children: [
|
|
1265
|
+
m.slice(0, 3).map((g, y) => /* @__PURE__ */ a(
|
|
1266
|
+
Rt,
|
|
1260
1267
|
{
|
|
1261
1268
|
size: "xs",
|
|
1262
1269
|
className: N(
|
|
1263
1270
|
"text-ds-xs border-2 border-layer-01",
|
|
1264
1271
|
y > 0 && "-ml-ds-02b",
|
|
1265
|
-
|
|
1272
|
+
g.isOwner && "shadow-[0_0_0_1.5px_rgba(var(--accent-rgb,99,102,241),0.35),0_0_6px_rgba(var(--accent-rgb,99,102,241),0.2)]"
|
|
1266
1273
|
),
|
|
1267
|
-
style: { zIndex:
|
|
1268
|
-
title:
|
|
1274
|
+
style: { zIndex: m.length - y },
|
|
1275
|
+
title: g.name,
|
|
1269
1276
|
children: [
|
|
1270
|
-
|
|
1271
|
-
/* @__PURE__ */ e(
|
|
1277
|
+
g.image && /* @__PURE__ */ e(St, { src: g.image, alt: g.name }),
|
|
1278
|
+
/* @__PURE__ */ e(At, { className: "font-body font-semibold", children: Fe(g.name) })
|
|
1272
1279
|
]
|
|
1273
1280
|
},
|
|
1274
1281
|
y
|
|
1275
1282
|
)),
|
|
1276
|
-
|
|
1283
|
+
m.length > 3 && /* @__PURE__ */ a("span", { className: "ml-ds-01 text-ds-xs text-text-tertiary", children: [
|
|
1277
1284
|
"+",
|
|
1278
|
-
|
|
1285
|
+
m.length - 3
|
|
1279
1286
|
] })
|
|
1280
1287
|
] })
|
|
1281
1288
|
] })
|
|
@@ -1283,37 +1290,37 @@ function Fe({
|
|
|
1283
1290
|
}
|
|
1284
1291
|
);
|
|
1285
1292
|
}
|
|
1286
|
-
const
|
|
1287
|
-
function({ task:
|
|
1293
|
+
const Ue = Q.forwardRef(
|
|
1294
|
+
function({ task: s }, n) {
|
|
1288
1295
|
const {
|
|
1289
1296
|
attributes: r,
|
|
1290
|
-
listeners:
|
|
1291
|
-
setNodeRef:
|
|
1292
|
-
transform:
|
|
1293
|
-
transition:
|
|
1294
|
-
isDragging:
|
|
1295
|
-
} =
|
|
1296
|
-
id:
|
|
1297
|
+
listeners: i,
|
|
1298
|
+
setNodeRef: u,
|
|
1299
|
+
transform: w,
|
|
1300
|
+
transition: k,
|
|
1301
|
+
isDragging: h
|
|
1302
|
+
} = Ie({
|
|
1303
|
+
id: s.id,
|
|
1297
1304
|
data: {
|
|
1298
1305
|
type: "task",
|
|
1299
|
-
task:
|
|
1306
|
+
task: s
|
|
1300
1307
|
}
|
|
1301
|
-
}), l =
|
|
1302
|
-
transform:
|
|
1303
|
-
transition:
|
|
1308
|
+
}), l = Le(u, n), f = {
|
|
1309
|
+
transform: De.Transform.toString(w),
|
|
1310
|
+
transition: k
|
|
1304
1311
|
};
|
|
1305
|
-
return /* @__PURE__ */ e("div", { ref: l, style:
|
|
1306
|
-
|
|
1312
|
+
return /* @__PURE__ */ e("div", { ref: l, style: f, children: /* @__PURE__ */ e(
|
|
1313
|
+
Ve,
|
|
1307
1314
|
{
|
|
1308
|
-
task:
|
|
1309
|
-
isDragging:
|
|
1310
|
-
dragHandleProps: { attributes: r, listeners:
|
|
1315
|
+
task: s,
|
|
1316
|
+
isDragging: h,
|
|
1317
|
+
dragHandleProps: { attributes: r, listeners: i }
|
|
1311
1318
|
}
|
|
1312
1319
|
) });
|
|
1313
1320
|
}
|
|
1314
1321
|
);
|
|
1315
|
-
|
|
1316
|
-
const
|
|
1322
|
+
Ue.displayName = "TaskCard";
|
|
1323
|
+
const qt = Te(
|
|
1317
1324
|
"group/card flex items-center gap-ds-02 py-2 pl-3 pr-ds-03 border border-transparent rounded-ds-lg bg-layer-01 transition-all duration-fast-02 ease-productive-standard cursor-pointer hover:bg-layer-active hover:shadow-02 hover:-translate-y-px",
|
|
1318
1325
|
{
|
|
1319
1326
|
variants: {
|
|
@@ -1332,40 +1339,40 @@ const jt = De(
|
|
|
1332
1339
|
}
|
|
1333
1340
|
}
|
|
1334
1341
|
);
|
|
1335
|
-
function
|
|
1336
|
-
task:
|
|
1337
|
-
isDragging:
|
|
1342
|
+
function Ge({
|
|
1343
|
+
task: t,
|
|
1344
|
+
isDragging: s,
|
|
1338
1345
|
isDragOverlay: n
|
|
1339
1346
|
}) {
|
|
1340
|
-
var
|
|
1347
|
+
var v;
|
|
1341
1348
|
const {
|
|
1342
1349
|
selectedTaskIds: r,
|
|
1343
|
-
toggleTaskSelection:
|
|
1344
|
-
focusedTaskId:
|
|
1345
|
-
currentUserId:
|
|
1346
|
-
highlightMyTasks:
|
|
1347
|
-
onClickTask:
|
|
1348
|
-
} =
|
|
1350
|
+
toggleTaskSelection: i,
|
|
1351
|
+
focusedTaskId: u,
|
|
1352
|
+
currentUserId: w,
|
|
1353
|
+
highlightMyTasks: k,
|
|
1354
|
+
onClickTask: h
|
|
1355
|
+
} = G(), l = r.has(t.id), f = r.size > 0, S = u === t.id, I = ze[t.priority], c = me[t.priority], D = k && w != null && ((v = t.owner) == null ? void 0 : v.id) !== w && !t.assignees.some((m) => m.id === w), d = t.owner ?? t.assignees[0] ?? null;
|
|
1349
1356
|
return /* @__PURE__ */ a(
|
|
1350
1357
|
"div",
|
|
1351
1358
|
{
|
|
1352
1359
|
role: "group",
|
|
1353
1360
|
tabIndex: 0,
|
|
1354
|
-
"data-task-id":
|
|
1355
|
-
"aria-label": `Task ${
|
|
1361
|
+
"data-task-id": t.id,
|
|
1362
|
+
"aria-label": `Task ${t.taskId}: ${t.title}`,
|
|
1356
1363
|
className: N(
|
|
1357
1364
|
"relative",
|
|
1358
|
-
|
|
1365
|
+
qt({
|
|
1359
1366
|
selected: l,
|
|
1360
|
-
dimmed:
|
|
1367
|
+
dimmed: D
|
|
1361
1368
|
}),
|
|
1362
|
-
|
|
1369
|
+
s && "opacity-40",
|
|
1363
1370
|
n && "scale-[1.03] rotate-[1.5deg] shadow-03",
|
|
1364
|
-
|
|
1371
|
+
S && "ring-1 ring-focus"
|
|
1365
1372
|
),
|
|
1366
|
-
onClick: () =>
|
|
1367
|
-
onKeyDown: (
|
|
1368
|
-
(
|
|
1373
|
+
onClick: () => h(t.id),
|
|
1374
|
+
onKeyDown: (m) => {
|
|
1375
|
+
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), h(t.id));
|
|
1369
1376
|
},
|
|
1370
1377
|
children: [
|
|
1371
1378
|
/* @__PURE__ */ e(
|
|
@@ -1373,164 +1380,165 @@ function Ue({
|
|
|
1373
1380
|
{
|
|
1374
1381
|
className: N(
|
|
1375
1382
|
"absolute -top-1.5 -left-1.5 z-10 transition-opacity",
|
|
1376
|
-
|
|
1383
|
+
f || l ? "opacity-100 animate-scale-bounce" : "opacity-0 group-hover/card:opacity-100"
|
|
1377
1384
|
),
|
|
1378
1385
|
children: /* @__PURE__ */ e(
|
|
1379
|
-
|
|
1386
|
+
Ee,
|
|
1380
1387
|
{
|
|
1381
1388
|
checked: l,
|
|
1382
|
-
onCheckedChange: () =>
|
|
1383
|
-
onClick: (
|
|
1384
|
-
"aria-label": `Select task ${
|
|
1389
|
+
onCheckedChange: () => i(t.id),
|
|
1390
|
+
onClick: (m) => m.stopPropagation(),
|
|
1391
|
+
"aria-label": `Select task ${t.taskId}`,
|
|
1385
1392
|
className: "rounded-full bg-layer-01 shadow-01"
|
|
1386
1393
|
}
|
|
1387
1394
|
)
|
|
1388
1395
|
}
|
|
1389
1396
|
),
|
|
1390
|
-
/* @__PURE__ */ e(
|
|
1391
|
-
/* @__PURE__ */ e("span", { className: "text-ds-xs font-mono text-text-tertiary flex-shrink-0", children:
|
|
1392
|
-
/* @__PURE__ */ e("span", { className: "text-ds-sm text-text-primary line-clamp-1 flex-1 min-w-0", children:
|
|
1393
|
-
|
|
1394
|
-
|
|
1397
|
+
/* @__PURE__ */ e(I, { className: N("h-3.5 w-3.5 flex-shrink-0", c), title: `Priority: ${t.priority}` }),
|
|
1398
|
+
/* @__PURE__ */ e("span", { className: "text-ds-xs font-mono text-text-tertiary flex-shrink-0", children: t.taskId }),
|
|
1399
|
+
/* @__PURE__ */ e("span", { className: "text-ds-sm text-text-primary line-clamp-1 flex-1 min-w-0", children: t.title }),
|
|
1400
|
+
t.subtaskCount > 0 && /* @__PURE__ */ a("span", { className: "text-ds-xs text-text-tertiary flex-shrink-0", children: [
|
|
1401
|
+
t.subtasksDone,
|
|
1395
1402
|
"/",
|
|
1396
|
-
|
|
1403
|
+
t.subtaskCount
|
|
1397
1404
|
] }),
|
|
1398
|
-
|
|
1405
|
+
d && /* @__PURE__ */ e(
|
|
1399
1406
|
"div",
|
|
1400
1407
|
{
|
|
1401
1408
|
className: N(
|
|
1402
1409
|
"flex h-[14px] w-[14px] shrink-0 items-center justify-center rounded-full border border-layer-01 bg-interactive-subtle text-[6px] font-semibold leading-none text-interactive overflow-hidden",
|
|
1403
|
-
|
|
1410
|
+
t.owner && "shadow-[0_0_0_1px_rgba(var(--accent-rgb,99,102,241),0.35),0_0_4px_rgba(var(--accent-rgb,99,102,241),0.2)]"
|
|
1404
1411
|
),
|
|
1405
|
-
title:
|
|
1406
|
-
children:
|
|
1412
|
+
title: d.name,
|
|
1413
|
+
children: d.image ? /* @__PURE__ */ e("img", { src: d.image, alt: d.name, className: "h-full w-full object-cover" }) : Fe(d.name)
|
|
1407
1414
|
}
|
|
1408
1415
|
)
|
|
1409
1416
|
]
|
|
1410
1417
|
}
|
|
1411
1418
|
);
|
|
1412
1419
|
}
|
|
1413
|
-
const
|
|
1414
|
-
function({ task:
|
|
1420
|
+
const Ke = Q.forwardRef(
|
|
1421
|
+
function({ task: s }, n) {
|
|
1415
1422
|
const {
|
|
1416
1423
|
attributes: r,
|
|
1417
|
-
listeners:
|
|
1418
|
-
setNodeRef:
|
|
1419
|
-
transform:
|
|
1420
|
-
transition:
|
|
1421
|
-
isDragging:
|
|
1422
|
-
} =
|
|
1423
|
-
id:
|
|
1424
|
+
listeners: i,
|
|
1425
|
+
setNodeRef: u,
|
|
1426
|
+
transform: w,
|
|
1427
|
+
transition: k,
|
|
1428
|
+
isDragging: h
|
|
1429
|
+
} = Ie({
|
|
1430
|
+
id: s.id,
|
|
1424
1431
|
data: {
|
|
1425
1432
|
type: "task",
|
|
1426
|
-
task:
|
|
1433
|
+
task: s
|
|
1427
1434
|
}
|
|
1428
|
-
}), l =
|
|
1429
|
-
transform:
|
|
1430
|
-
transition:
|
|
1435
|
+
}), l = Le(u, n), f = {
|
|
1436
|
+
transform: De.Transform.toString(w),
|
|
1437
|
+
transition: k
|
|
1431
1438
|
};
|
|
1432
|
-
return /* @__PURE__ */ e("div", { ref: l, style:
|
|
1433
|
-
|
|
1439
|
+
return /* @__PURE__ */ e("div", { ref: l, style: f, children: /* @__PURE__ */ e(
|
|
1440
|
+
Ge,
|
|
1434
1441
|
{
|
|
1435
|
-
task:
|
|
1436
|
-
isDragging:
|
|
1437
|
-
dragHandleProps: { attributes: r, listeners:
|
|
1442
|
+
task: s,
|
|
1443
|
+
isDragging: h,
|
|
1444
|
+
dragHandleProps: { attributes: r, listeners: i }
|
|
1438
1445
|
}
|
|
1439
1446
|
) });
|
|
1440
1447
|
}
|
|
1441
1448
|
);
|
|
1442
|
-
|
|
1443
|
-
const
|
|
1444
|
-
return /* @__PURE__ */ e("div", { ref: n, children: /* @__PURE__ */ e(
|
|
1449
|
+
Ke.displayName = "TaskCardCompact";
|
|
1450
|
+
const He = Q.forwardRef(function({ task: s }, n) {
|
|
1451
|
+
return /* @__PURE__ */ e("div", { ref: n, children: /* @__PURE__ */ e(Ge, { task: s, isDragOverlay: !0 }) });
|
|
1445
1452
|
});
|
|
1446
|
-
|
|
1447
|
-
const
|
|
1448
|
-
function({ task:
|
|
1449
|
-
return /* @__PURE__ */ e("div", { ref: n, children: /* @__PURE__ */ e(
|
|
1453
|
+
He.displayName = "TaskCardCompactOverlay";
|
|
1454
|
+
const Qe = Q.forwardRef(
|
|
1455
|
+
function({ task: s }, n) {
|
|
1456
|
+
return /* @__PURE__ */ e("div", { ref: n, children: /* @__PURE__ */ e(Ve, { task: s, isDragOverlay: !0 }) });
|
|
1450
1457
|
}
|
|
1451
1458
|
);
|
|
1452
|
-
|
|
1453
|
-
const
|
|
1454
|
-
{ value: "LOW", label: "Low", icon:
|
|
1459
|
+
Qe.displayName = "TaskCardOverlay";
|
|
1460
|
+
const Xt = [
|
|
1461
|
+
{ value: "LOW", label: "Low", icon: Me },
|
|
1455
1462
|
{ value: "MEDIUM", label: "Medium", icon: pe },
|
|
1456
|
-
{ value: "HIGH", label: "High", icon:
|
|
1457
|
-
{ value: "URGENT", label: "Urgent", icon:
|
|
1463
|
+
{ value: "HIGH", label: "High", icon: Ae },
|
|
1464
|
+
{ value: "URGENT", label: "Urgent", icon: de }
|
|
1458
1465
|
];
|
|
1459
|
-
function
|
|
1466
|
+
function je({ taskId: t, children: s }) {
|
|
1460
1467
|
const {
|
|
1461
1468
|
rawColumns: n,
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
/* @__PURE__ */
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1469
|
+
members: r,
|
|
1470
|
+
onQuickPriorityChange: i,
|
|
1471
|
+
onQuickAssign: u,
|
|
1472
|
+
onQuickLabelAdd: w,
|
|
1473
|
+
onQuickDueDateChange: k,
|
|
1474
|
+
onQuickVisibilityChange: h,
|
|
1475
|
+
onQuickDelete: l
|
|
1476
|
+
} = G(), f = r, S = Oe(n), I = Q.useRef(null);
|
|
1477
|
+
return /* @__PURE__ */ a(Mt, { children: [
|
|
1478
|
+
/* @__PURE__ */ e(Lt, { children: s }),
|
|
1479
|
+
/* @__PURE__ */ a(Et, { className: "w-52 animate-scale-in", children: [
|
|
1480
|
+
/* @__PURE__ */ a(se, { children: [
|
|
1481
|
+
/* @__PURE__ */ a(ne, { children: [
|
|
1482
|
+
/* @__PURE__ */ e(de, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
1475
1483
|
"Set Priority"
|
|
1476
1484
|
] }),
|
|
1477
|
-
/* @__PURE__ */ e(
|
|
1478
|
-
const
|
|
1485
|
+
/* @__PURE__ */ e(ae, { className: "w-40", children: Xt.map((c) => {
|
|
1486
|
+
const D = c.icon;
|
|
1479
1487
|
return /* @__PURE__ */ a(
|
|
1480
|
-
|
|
1488
|
+
Y,
|
|
1481
1489
|
{
|
|
1482
|
-
onSelect: () =>
|
|
1490
|
+
onSelect: () => i(t, c.value),
|
|
1483
1491
|
children: [
|
|
1484
1492
|
/* @__PURE__ */ e(
|
|
1485
|
-
|
|
1493
|
+
D,
|
|
1486
1494
|
{
|
|
1487
1495
|
className: N(
|
|
1488
1496
|
"mr-ds-03 h-ico-sm w-ico-sm",
|
|
1489
|
-
|
|
1497
|
+
me[c.value]
|
|
1490
1498
|
)
|
|
1491
1499
|
}
|
|
1492
1500
|
),
|
|
1493
|
-
|
|
1501
|
+
c.label
|
|
1494
1502
|
]
|
|
1495
1503
|
},
|
|
1496
|
-
|
|
1504
|
+
c.value
|
|
1497
1505
|
);
|
|
1498
1506
|
}) })
|
|
1499
1507
|
] }),
|
|
1500
|
-
|
|
1501
|
-
/* @__PURE__ */ a(
|
|
1502
|
-
/* @__PURE__ */ e(
|
|
1508
|
+
f.length > 0 && /* @__PURE__ */ a(se, { children: [
|
|
1509
|
+
/* @__PURE__ */ a(ne, { children: [
|
|
1510
|
+
/* @__PURE__ */ e(Z, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
1503
1511
|
"Assign"
|
|
1504
1512
|
] }),
|
|
1505
|
-
/* @__PURE__ */ e(
|
|
1506
|
-
|
|
1513
|
+
/* @__PURE__ */ e(ae, { className: "w-44 max-h-48 overflow-y-auto", children: f.map((c) => /* @__PURE__ */ e(
|
|
1514
|
+
Y,
|
|
1507
1515
|
{
|
|
1508
|
-
onSelect: () =>
|
|
1509
|
-
children:
|
|
1516
|
+
onSelect: () => u(t, c.id),
|
|
1517
|
+
children: c.name
|
|
1510
1518
|
},
|
|
1511
|
-
|
|
1519
|
+
c.id
|
|
1512
1520
|
)) })
|
|
1513
1521
|
] }),
|
|
1514
|
-
/* @__PURE__ */ a(
|
|
1515
|
-
/* @__PURE__ */ a(
|
|
1516
|
-
/* @__PURE__ */ e(
|
|
1522
|
+
/* @__PURE__ */ a(se, { children: [
|
|
1523
|
+
/* @__PURE__ */ a(ne, { children: [
|
|
1524
|
+
/* @__PURE__ */ e(Dt, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
1517
1525
|
"Add Label"
|
|
1518
1526
|
] }),
|
|
1519
|
-
/* @__PURE__ */ e(
|
|
1520
|
-
|
|
1527
|
+
/* @__PURE__ */ e(ae, { className: "w-40 max-h-48 overflow-y-auto", children: S.length > 0 ? S.map((c) => /* @__PURE__ */ e(
|
|
1528
|
+
Y,
|
|
1521
1529
|
{
|
|
1522
|
-
onSelect: () =>
|
|
1523
|
-
children:
|
|
1530
|
+
onSelect: () => w(t, c),
|
|
1531
|
+
children: c
|
|
1524
1532
|
},
|
|
1525
|
-
|
|
1533
|
+
c
|
|
1526
1534
|
)) : /* @__PURE__ */ e("div", { className: "px-ds-03 py-ds-02 text-ds-xs text-text-tertiary", children: "No labels found" }) })
|
|
1527
1535
|
] }),
|
|
1528
1536
|
/* @__PURE__ */ a(
|
|
1529
|
-
|
|
1537
|
+
Y,
|
|
1530
1538
|
{
|
|
1531
|
-
onSelect: (
|
|
1532
|
-
var
|
|
1533
|
-
|
|
1539
|
+
onSelect: (c) => {
|
|
1540
|
+
var D;
|
|
1541
|
+
c.preventDefault(), (D = I.current) == null || D.showPicker();
|
|
1534
1542
|
},
|
|
1535
1543
|
children: [
|
|
1536
1544
|
/* @__PURE__ */ e(ve, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
@@ -1538,11 +1546,11 @@ function Qe({ taskId: s, children: t }) {
|
|
|
1538
1546
|
/* @__PURE__ */ e(
|
|
1539
1547
|
"input",
|
|
1540
1548
|
{
|
|
1541
|
-
ref:
|
|
1549
|
+
ref: I,
|
|
1542
1550
|
type: "date",
|
|
1543
1551
|
className: "absolute opacity-0 pointer-events-none w-0 h-0",
|
|
1544
|
-
onChange: (
|
|
1545
|
-
|
|
1552
|
+
onChange: (c) => {
|
|
1553
|
+
k(t, c.target.value || null);
|
|
1546
1554
|
},
|
|
1547
1555
|
tabIndex: -1
|
|
1548
1556
|
}
|
|
@@ -1550,40 +1558,40 @@ function Qe({ taskId: s, children: t }) {
|
|
|
1550
1558
|
]
|
|
1551
1559
|
}
|
|
1552
1560
|
),
|
|
1553
|
-
/* @__PURE__ */ a(
|
|
1554
|
-
/* @__PURE__ */ a(
|
|
1555
|
-
/* @__PURE__ */ e(
|
|
1561
|
+
/* @__PURE__ */ a(se, { children: [
|
|
1562
|
+
/* @__PURE__ */ a(ne, { children: [
|
|
1563
|
+
/* @__PURE__ */ e(ee, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
1556
1564
|
"Visibility"
|
|
1557
1565
|
] }),
|
|
1558
|
-
/* @__PURE__ */ a(
|
|
1566
|
+
/* @__PURE__ */ a(ae, { className: "w-44", children: [
|
|
1559
1567
|
/* @__PURE__ */ a(
|
|
1560
|
-
|
|
1568
|
+
Y,
|
|
1561
1569
|
{
|
|
1562
|
-
onSelect: () =>
|
|
1570
|
+
onSelect: () => h(t, "INTERNAL"),
|
|
1563
1571
|
children: [
|
|
1564
|
-
/* @__PURE__ */ e(
|
|
1572
|
+
/* @__PURE__ */ e(Se, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
1565
1573
|
"Internal only"
|
|
1566
1574
|
]
|
|
1567
1575
|
}
|
|
1568
1576
|
),
|
|
1569
1577
|
/* @__PURE__ */ a(
|
|
1570
|
-
|
|
1578
|
+
Y,
|
|
1571
1579
|
{
|
|
1572
|
-
onSelect: () =>
|
|
1580
|
+
onSelect: () => h(t, "EVERYONE"),
|
|
1573
1581
|
children: [
|
|
1574
|
-
/* @__PURE__ */ e(
|
|
1582
|
+
/* @__PURE__ */ e(ee, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
1575
1583
|
"Visible to all"
|
|
1576
1584
|
]
|
|
1577
1585
|
}
|
|
1578
1586
|
)
|
|
1579
1587
|
] })
|
|
1580
1588
|
] }),
|
|
1581
|
-
/* @__PURE__ */ e(
|
|
1589
|
+
/* @__PURE__ */ e(Ot, {}),
|
|
1582
1590
|
/* @__PURE__ */ a(
|
|
1583
|
-
|
|
1591
|
+
Y,
|
|
1584
1592
|
{
|
|
1585
1593
|
className: "text-error focus:text-error",
|
|
1586
|
-
onSelect: () =>
|
|
1594
|
+
onSelect: () => l(t),
|
|
1587
1595
|
children: [
|
|
1588
1596
|
/* @__PURE__ */ e(xe, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
1589
1597
|
"Delete"
|
|
@@ -1593,7 +1601,7 @@ function Qe({ taskId: s, children: t }) {
|
|
|
1593
1601
|
] })
|
|
1594
1602
|
] });
|
|
1595
1603
|
}
|
|
1596
|
-
|
|
1604
|
+
je.displayName = "TaskContextMenu";
|
|
1597
1605
|
function fe() {
|
|
1598
1606
|
return /* @__PURE__ */ a(
|
|
1599
1607
|
"div",
|
|
@@ -1607,58 +1615,58 @@ function fe() {
|
|
|
1607
1615
|
}
|
|
1608
1616
|
);
|
|
1609
1617
|
}
|
|
1610
|
-
const
|
|
1611
|
-
function({ column:
|
|
1612
|
-
const { viewMode:
|
|
1613
|
-
id: `column-${
|
|
1618
|
+
const Ye = Q.forwardRef(
|
|
1619
|
+
function({ column: s, index: n, isOverlay: r, dragPreview: i, draggedTask: u }, w) {
|
|
1620
|
+
const { viewMode: k } = G(), { setNodeRef: h, isOver: l } = et({
|
|
1621
|
+
id: `column-${s.id}`,
|
|
1614
1622
|
data: {
|
|
1615
1623
|
type: "column",
|
|
1616
|
-
column:
|
|
1624
|
+
column: s
|
|
1617
1625
|
}
|
|
1618
|
-
}),
|
|
1626
|
+
}), f = s.tasks.map((I) => I.id), S = s.wipLimit != null && s.tasks.length > s.wipLimit;
|
|
1619
1627
|
return /* @__PURE__ */ a(
|
|
1620
1628
|
"div",
|
|
1621
1629
|
{
|
|
1622
|
-
ref:
|
|
1630
|
+
ref: w,
|
|
1623
1631
|
className: N(
|
|
1624
1632
|
"flex h-full flex-shrink-0 flex-col rounded-ds-xl bg-layer-01/40 backdrop-blur-[2px] border border-border-subtle/20 hover:border-border-subtle/40 transition-colors p-1",
|
|
1625
1633
|
r && "shadow-04",
|
|
1626
|
-
|
|
1634
|
+
S && "bg-error-surface/50"
|
|
1627
1635
|
),
|
|
1628
|
-
style: { width:
|
|
1636
|
+
style: { width: Bt },
|
|
1629
1637
|
children: [
|
|
1630
|
-
/* @__PURE__ */ e(Pe, { column:
|
|
1638
|
+
/* @__PURE__ */ e(Pe, { column: s, index: n }),
|
|
1631
1639
|
/* @__PURE__ */ a(
|
|
1632
1640
|
"div",
|
|
1633
1641
|
{
|
|
1634
|
-
ref:
|
|
1642
|
+
ref: h,
|
|
1635
1643
|
className: N(
|
|
1636
1644
|
"no-scrollbar flex flex-1 flex-col gap-ds-02 overflow-y-auto px-ds-03 pt-2.5 pb-ds-03 transition-colors duration-fast-02 ease-productive-standard",
|
|
1637
1645
|
l && "bg-interactive-subtle/30"
|
|
1638
1646
|
),
|
|
1639
1647
|
children: [
|
|
1640
|
-
/* @__PURE__ */ a(
|
|
1641
|
-
|
|
1642
|
-
|
|
1648
|
+
/* @__PURE__ */ a(Re, { items: f, strategy: tt, children: [
|
|
1649
|
+
s.tasks.map((I, c) => /* @__PURE__ */ a(Q.Fragment, { children: [
|
|
1650
|
+
i && i.index === c && /* @__PURE__ */ e(fe, {}),
|
|
1643
1651
|
/* @__PURE__ */ e(
|
|
1644
1652
|
"div",
|
|
1645
1653
|
{
|
|
1646
1654
|
className: "animate-slide-up delay-stagger",
|
|
1647
|
-
style: { "--stagger-index":
|
|
1648
|
-
children: /* @__PURE__ */ e(
|
|
1655
|
+
style: { "--stagger-index": c },
|
|
1656
|
+
children: /* @__PURE__ */ e(je, { taskId: I.id, children: k === "compact" ? /* @__PURE__ */ e(Ke, { task: I }) : /* @__PURE__ */ e(Ue, { task: I }) })
|
|
1649
1657
|
}
|
|
1650
1658
|
)
|
|
1651
|
-
] },
|
|
1652
|
-
|
|
1659
|
+
] }, I.id)),
|
|
1660
|
+
i && i.index >= s.tasks.length && /* @__PURE__ */ e(fe, {})
|
|
1653
1661
|
] }),
|
|
1654
|
-
|
|
1655
|
-
|
|
1662
|
+
s.tasks.length === 0 && !i && /* @__PURE__ */ e(
|
|
1663
|
+
_e,
|
|
1656
1664
|
{
|
|
1657
1665
|
index: n,
|
|
1658
1666
|
isDropTarget: l
|
|
1659
1667
|
}
|
|
1660
1668
|
),
|
|
1661
|
-
|
|
1669
|
+
s.tasks.length === 0 && i && /* @__PURE__ */ e(fe, {})
|
|
1662
1670
|
]
|
|
1663
1671
|
}
|
|
1664
1672
|
)
|
|
@@ -1667,132 +1675,132 @@ const je = Q.forwardRef(
|
|
|
1667
1675
|
);
|
|
1668
1676
|
}
|
|
1669
1677
|
);
|
|
1670
|
-
|
|
1671
|
-
function
|
|
1678
|
+
Ye.displayName = "BoardColumn";
|
|
1679
|
+
function Jt(t) {
|
|
1672
1680
|
const {
|
|
1673
|
-
columns:
|
|
1681
|
+
columns: s,
|
|
1674
1682
|
focusedTaskId: n,
|
|
1675
1683
|
setFocusedTaskId: r,
|
|
1676
|
-
selectedTaskIds:
|
|
1677
|
-
toggleTaskSelection:
|
|
1678
|
-
selectRange:
|
|
1679
|
-
clearSelection:
|
|
1680
|
-
clearFilters:
|
|
1684
|
+
selectedTaskIds: i,
|
|
1685
|
+
toggleTaskSelection: u,
|
|
1686
|
+
selectRange: w,
|
|
1687
|
+
clearSelection: k,
|
|
1688
|
+
clearFilters: h,
|
|
1681
1689
|
hasActiveFilters: l,
|
|
1682
|
-
onClickTask:
|
|
1683
|
-
} =
|
|
1684
|
-
(
|
|
1685
|
-
for (let
|
|
1686
|
-
for (let
|
|
1687
|
-
if (
|
|
1688
|
-
return { columnIndex:
|
|
1690
|
+
onClickTask: f
|
|
1691
|
+
} = G(), S = W(
|
|
1692
|
+
(d) => {
|
|
1693
|
+
for (let v = 0; v < s.length; v++)
|
|
1694
|
+
for (let m = 0; m < s[v].tasks.length; m++)
|
|
1695
|
+
if (s[v].tasks[m].id === d)
|
|
1696
|
+
return { columnIndex: v, taskIndex: m, taskId: d };
|
|
1689
1697
|
return null;
|
|
1690
1698
|
},
|
|
1691
|
-
[
|
|
1692
|
-
),
|
|
1693
|
-
(
|
|
1694
|
-
const
|
|
1695
|
-
if (!
|
|
1696
|
-
const
|
|
1697
|
-
return (
|
|
1699
|
+
[s]
|
|
1700
|
+
), I = W(
|
|
1701
|
+
(d, v) => {
|
|
1702
|
+
const m = s[d];
|
|
1703
|
+
if (!m) return null;
|
|
1704
|
+
const T = m.tasks[v];
|
|
1705
|
+
return (T == null ? void 0 : T.id) ?? null;
|
|
1698
1706
|
},
|
|
1699
|
-
[
|
|
1700
|
-
),
|
|
1701
|
-
const
|
|
1702
|
-
|
|
1703
|
-
}, []),
|
|
1704
|
-
(
|
|
1705
|
-
const
|
|
1706
|
-
if (!(
|
|
1707
|
-
switch (
|
|
1707
|
+
[s]
|
|
1708
|
+
), c = W((d) => {
|
|
1709
|
+
const v = document.querySelector(`[data-task-id="${d}"]`);
|
|
1710
|
+
v && v.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
1711
|
+
}, []), D = W(
|
|
1712
|
+
(d) => {
|
|
1713
|
+
const v = d.target;
|
|
1714
|
+
if (!(v.tagName === "INPUT" || v.tagName === "TEXTAREA" || v.isContentEditable))
|
|
1715
|
+
switch (d.key) {
|
|
1708
1716
|
case "ArrowDown":
|
|
1709
1717
|
case "ArrowUp": {
|
|
1710
|
-
|
|
1711
|
-
const
|
|
1718
|
+
d.preventDefault();
|
|
1719
|
+
const m = d.key === "ArrowDown" ? 1 : -1;
|
|
1712
1720
|
if (!n) {
|
|
1713
|
-
for (const
|
|
1714
|
-
if (
|
|
1715
|
-
const
|
|
1716
|
-
r(
|
|
1721
|
+
for (const x of s)
|
|
1722
|
+
if (x.tasks.length > 0) {
|
|
1723
|
+
const o = x.tasks[0].id;
|
|
1724
|
+
r(o), c(o);
|
|
1717
1725
|
break;
|
|
1718
1726
|
}
|
|
1719
1727
|
return;
|
|
1720
1728
|
}
|
|
1721
|
-
const
|
|
1722
|
-
if (!
|
|
1723
|
-
const
|
|
1724
|
-
y && (r(y),
|
|
1729
|
+
const T = S(n);
|
|
1730
|
+
if (!T) return;
|
|
1731
|
+
const g = T.taskIndex + m, y = I(T.columnIndex, g);
|
|
1732
|
+
y && (r(y), c(y), d.shiftKey && n && w(n, y));
|
|
1725
1733
|
return;
|
|
1726
1734
|
}
|
|
1727
1735
|
case "ArrowLeft":
|
|
1728
1736
|
case "ArrowRight": {
|
|
1729
|
-
|
|
1730
|
-
const
|
|
1737
|
+
d.preventDefault();
|
|
1738
|
+
const m = d.key === "ArrowRight" ? 1 : -1;
|
|
1731
1739
|
if (!n) return;
|
|
1732
|
-
const
|
|
1733
|
-
if (!
|
|
1734
|
-
let
|
|
1735
|
-
for (;
|
|
1736
|
-
if (
|
|
1737
|
-
const y = Math.min(
|
|
1738
|
-
r(
|
|
1740
|
+
const T = S(n);
|
|
1741
|
+
if (!T) return;
|
|
1742
|
+
let g = T.columnIndex + m;
|
|
1743
|
+
for (; g >= 0 && g < s.length; ) {
|
|
1744
|
+
if (s[g].tasks.length > 0) {
|
|
1745
|
+
const y = Math.min(T.taskIndex, s[g].tasks.length - 1), x = s[g].tasks[y].id;
|
|
1746
|
+
r(x), c(x);
|
|
1739
1747
|
return;
|
|
1740
1748
|
}
|
|
1741
|
-
|
|
1749
|
+
g += m;
|
|
1742
1750
|
}
|
|
1743
1751
|
return;
|
|
1744
1752
|
}
|
|
1745
1753
|
case "Enter": {
|
|
1746
|
-
n && (
|
|
1754
|
+
n && (d.preventDefault(), f(n));
|
|
1747
1755
|
return;
|
|
1748
1756
|
}
|
|
1749
1757
|
case " ": {
|
|
1750
|
-
n && (
|
|
1758
|
+
n && (d.preventDefault(), u(n));
|
|
1751
1759
|
return;
|
|
1752
1760
|
}
|
|
1753
1761
|
case "Escape": {
|
|
1754
|
-
|
|
1762
|
+
d.preventDefault(), i.size > 0 ? k() : l && h();
|
|
1755
1763
|
return;
|
|
1756
1764
|
}
|
|
1757
1765
|
}
|
|
1758
1766
|
},
|
|
1759
1767
|
[
|
|
1760
1768
|
n,
|
|
1761
|
-
|
|
1762
|
-
|
|
1769
|
+
s,
|
|
1770
|
+
i,
|
|
1763
1771
|
l,
|
|
1764
|
-
|
|
1765
|
-
|
|
1772
|
+
S,
|
|
1773
|
+
I,
|
|
1766
1774
|
r,
|
|
1767
|
-
|
|
1775
|
+
c,
|
|
1776
|
+
u,
|
|
1777
|
+
w,
|
|
1778
|
+
k,
|
|
1768
1779
|
h,
|
|
1769
|
-
|
|
1770
|
-
v,
|
|
1771
|
-
d,
|
|
1772
|
-
x
|
|
1780
|
+
f
|
|
1773
1781
|
]
|
|
1774
1782
|
);
|
|
1775
|
-
|
|
1776
|
-
const
|
|
1777
|
-
if (
|
|
1778
|
-
return
|
|
1779
|
-
}, [
|
|
1783
|
+
ce(() => {
|
|
1784
|
+
const d = t.current;
|
|
1785
|
+
if (d)
|
|
1786
|
+
return d.addEventListener("keydown", D), () => d.removeEventListener("keydown", D);
|
|
1787
|
+
}, [t, D]);
|
|
1780
1788
|
}
|
|
1781
|
-
function
|
|
1789
|
+
function Zt() {
|
|
1782
1790
|
return {
|
|
1783
|
-
onDragStart({ active:
|
|
1784
|
-
const
|
|
1785
|
-
return (
|
|
1791
|
+
onDragStart({ active: t }) {
|
|
1792
|
+
const s = t.data.current;
|
|
1793
|
+
return (s == null ? void 0 : s.type) === "task" ? `Picked up task: ${s.task.title}` : "Picked up item";
|
|
1786
1794
|
},
|
|
1787
|
-
onDragOver({ active:
|
|
1788
|
-
if (!
|
|
1789
|
-
const n =
|
|
1795
|
+
onDragOver({ active: t, over: s }) {
|
|
1796
|
+
if (!s) return;
|
|
1797
|
+
const n = t.data.current;
|
|
1790
1798
|
if ((n == null ? void 0 : n.type) === "task")
|
|
1791
|
-
return `Task ${n.task.title} is over ${
|
|
1799
|
+
return `Task ${n.task.title} is over ${s.id}`;
|
|
1792
1800
|
},
|
|
1793
|
-
onDragEnd({ active:
|
|
1794
|
-
if (!
|
|
1795
|
-
const n =
|
|
1801
|
+
onDragEnd({ active: t, over: s }) {
|
|
1802
|
+
if (!s) return "Dropped item";
|
|
1803
|
+
const n = t.data.current;
|
|
1796
1804
|
return (n == null ? void 0 : n.type) === "task" ? `Dropped task: ${n.task.title}` : "Dropped item";
|
|
1797
1805
|
},
|
|
1798
1806
|
onDragCancel() {
|
|
@@ -1800,135 +1808,135 @@ function Xt() {
|
|
|
1800
1808
|
}
|
|
1801
1809
|
};
|
|
1802
1810
|
}
|
|
1803
|
-
function
|
|
1811
|
+
function es({ className: t }) {
|
|
1804
1812
|
const {
|
|
1805
|
-
columns:
|
|
1813
|
+
columns: s,
|
|
1806
1814
|
viewMode: n,
|
|
1807
1815
|
activeTask: r,
|
|
1808
|
-
setActiveTask:
|
|
1809
|
-
onTaskMove:
|
|
1810
|
-
onAddColumn:
|
|
1811
|
-
} =
|
|
1812
|
-
|
|
1813
|
-
const
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
+
setActiveTask: i,
|
|
1817
|
+
onTaskMove: u,
|
|
1818
|
+
onAddColumn: w
|
|
1819
|
+
} = G(), [k, h] = E(!1), [l, f] = E(null);
|
|
1820
|
+
ie(null);
|
|
1821
|
+
const S = ie(null);
|
|
1822
|
+
Jt(S), ce(() => {
|
|
1823
|
+
h(!0);
|
|
1816
1824
|
}, []);
|
|
1817
|
-
const
|
|
1818
|
-
he(
|
|
1825
|
+
const I = st(
|
|
1826
|
+
he(dt, {
|
|
1819
1827
|
activationConstraint: { distance: 5 }
|
|
1820
1828
|
}),
|
|
1821
|
-
he(
|
|
1829
|
+
he(ct, {
|
|
1822
1830
|
activationConstraint: { delay: 200, tolerance: 5 }
|
|
1823
1831
|
}),
|
|
1824
|
-
he(
|
|
1825
|
-
coordinateGetter:
|
|
1832
|
+
he(lt, {
|
|
1833
|
+
coordinateGetter: ot
|
|
1826
1834
|
})
|
|
1827
|
-
),
|
|
1835
|
+
), c = J(() => Zt(), []), D = s.map((y) => `column-${y.id}`), d = W(
|
|
1828
1836
|
(y) => {
|
|
1829
|
-
for (const
|
|
1830
|
-
if (
|
|
1831
|
-
return
|
|
1837
|
+
for (const x of s)
|
|
1838
|
+
if (x.tasks.some((o) => o.id === y))
|
|
1839
|
+
return x.id;
|
|
1832
1840
|
return null;
|
|
1833
1841
|
},
|
|
1834
|
-
[
|
|
1835
|
-
),
|
|
1842
|
+
[s]
|
|
1843
|
+
), v = W(
|
|
1836
1844
|
(y) => {
|
|
1837
|
-
const
|
|
1838
|
-
(
|
|
1845
|
+
const x = y.active.data.current;
|
|
1846
|
+
(x == null ? void 0 : x.type) === "task" && i(x.task);
|
|
1839
1847
|
},
|
|
1840
|
-
[
|
|
1841
|
-
),
|
|
1848
|
+
[i]
|
|
1849
|
+
), m = W(
|
|
1842
1850
|
(y) => {
|
|
1843
|
-
const { active:
|
|
1844
|
-
if (!
|
|
1845
|
-
|
|
1851
|
+
const { active: x, over: o } = y;
|
|
1852
|
+
if (!o) {
|
|
1853
|
+
f(null);
|
|
1846
1854
|
return;
|
|
1847
1855
|
}
|
|
1848
|
-
const
|
|
1856
|
+
const p = x.id, R = o.id, L = d(p);
|
|
1849
1857
|
if (!L) return;
|
|
1850
|
-
let
|
|
1851
|
-
if (
|
|
1852
|
-
|
|
1853
|
-
const
|
|
1854
|
-
|
|
1855
|
-
} else if (
|
|
1856
|
-
const
|
|
1857
|
-
|
|
1858
|
+
let A = null, P = 0;
|
|
1859
|
+
if (R.startsWith("column-")) {
|
|
1860
|
+
A = R.replace("column-", "");
|
|
1861
|
+
const O = s.find((C) => C.id === A);
|
|
1862
|
+
P = (O == null ? void 0 : O.tasks.length) ?? 0;
|
|
1863
|
+
} else if (A = d(R), A) {
|
|
1864
|
+
const O = s.find((C) => C.id === A);
|
|
1865
|
+
P = (O == null ? void 0 : O.tasks.findIndex((C) => C.id === R)) ?? 0;
|
|
1858
1866
|
}
|
|
1859
|
-
if (!
|
|
1860
|
-
|
|
1867
|
+
if (!A) {
|
|
1868
|
+
f(null);
|
|
1861
1869
|
return;
|
|
1862
1870
|
}
|
|
1863
|
-
if (L ===
|
|
1864
|
-
|
|
1871
|
+
if (L === A) {
|
|
1872
|
+
f(null);
|
|
1865
1873
|
return;
|
|
1866
1874
|
}
|
|
1867
|
-
|
|
1875
|
+
f({ taskId: p, columnId: A, index: P });
|
|
1868
1876
|
},
|
|
1869
|
-
[
|
|
1870
|
-
),
|
|
1877
|
+
[s, d]
|
|
1878
|
+
), T = W(
|
|
1871
1879
|
(y) => {
|
|
1872
|
-
const { active:
|
|
1873
|
-
if (
|
|
1874
|
-
const
|
|
1875
|
-
if (!
|
|
1876
|
-
if (
|
|
1877
|
-
|
|
1880
|
+
const { active: x, over: o } = y, p = l;
|
|
1881
|
+
if (i(null), f(null), !o) return;
|
|
1882
|
+
const R = x.id, L = o.id, A = d(R);
|
|
1883
|
+
if (!A) return;
|
|
1884
|
+
if (p && p.taskId === R) {
|
|
1885
|
+
u(R, p.columnId, p.index);
|
|
1878
1886
|
return;
|
|
1879
1887
|
}
|
|
1880
|
-
let
|
|
1888
|
+
let P, O;
|
|
1881
1889
|
if (L.startsWith("column-")) {
|
|
1882
|
-
|
|
1883
|
-
const C =
|
|
1884
|
-
if (
|
|
1885
|
-
const
|
|
1886
|
-
|
|
1890
|
+
P = L.replace("column-", "");
|
|
1891
|
+
const C = s.find((M) => M.id === P);
|
|
1892
|
+
if (O = (C == null ? void 0 : C.tasks.length) ?? 0, A === P) {
|
|
1893
|
+
const M = C == null ? void 0 : C.tasks.findIndex((B) => B.id === R);
|
|
1894
|
+
M !== void 0 && M >= 0 && (O = M);
|
|
1887
1895
|
}
|
|
1888
1896
|
} else {
|
|
1889
|
-
|
|
1890
|
-
const C =
|
|
1891
|
-
|
|
1897
|
+
P = d(L) ?? A;
|
|
1898
|
+
const C = s.find((M) => M.id === P);
|
|
1899
|
+
O = (C == null ? void 0 : C.tasks.findIndex((M) => M.id === L)) ?? 0;
|
|
1892
1900
|
}
|
|
1893
|
-
|
|
1901
|
+
u(R, P, O);
|
|
1894
1902
|
},
|
|
1895
|
-
[
|
|
1896
|
-
),
|
|
1897
|
-
|
|
1898
|
-
}, [
|
|
1903
|
+
[s, l, d, i, u]
|
|
1904
|
+
), g = W(() => {
|
|
1905
|
+
i(null), f(null);
|
|
1906
|
+
}, [i]);
|
|
1899
1907
|
return /* @__PURE__ */ a(
|
|
1900
|
-
|
|
1908
|
+
nt,
|
|
1901
1909
|
{
|
|
1902
|
-
sensors:
|
|
1903
|
-
collisionDetection:
|
|
1904
|
-
onDragStart:
|
|
1905
|
-
onDragOver:
|
|
1906
|
-
onDragEnd:
|
|
1907
|
-
onDragCancel:
|
|
1908
|
-
accessibility: { announcements:
|
|
1910
|
+
sensors: I,
|
|
1911
|
+
collisionDetection: at,
|
|
1912
|
+
onDragStart: v,
|
|
1913
|
+
onDragOver: m,
|
|
1914
|
+
onDragEnd: T,
|
|
1915
|
+
onDragCancel: g,
|
|
1916
|
+
accessibility: { announcements: c },
|
|
1909
1917
|
children: [
|
|
1910
1918
|
/* @__PURE__ */ a(
|
|
1911
1919
|
"div",
|
|
1912
1920
|
{
|
|
1913
|
-
ref:
|
|
1921
|
+
ref: S,
|
|
1914
1922
|
tabIndex: 0,
|
|
1915
1923
|
className: "no-scrollbar flex h-full gap-ds-05 overflow-x-auto pb-ds-05 outline-none",
|
|
1916
1924
|
children: [
|
|
1917
1925
|
/* @__PURE__ */ e(
|
|
1918
|
-
|
|
1926
|
+
Re,
|
|
1919
1927
|
{
|
|
1920
|
-
items:
|
|
1921
|
-
strategy:
|
|
1922
|
-
children:
|
|
1928
|
+
items: D,
|
|
1929
|
+
strategy: rt,
|
|
1930
|
+
children: s.map((y, x) => /* @__PURE__ */ e(
|
|
1923
1931
|
"div",
|
|
1924
1932
|
{
|
|
1925
1933
|
className: "flex-shrink-0 animate-slide-right delay-stagger-50",
|
|
1926
|
-
style: { "--stagger-index":
|
|
1934
|
+
style: { "--stagger-index": x },
|
|
1927
1935
|
children: /* @__PURE__ */ e(
|
|
1928
|
-
|
|
1936
|
+
Ye,
|
|
1929
1937
|
{
|
|
1930
1938
|
column: y,
|
|
1931
|
-
index:
|
|
1939
|
+
index: x,
|
|
1932
1940
|
dragPreview: (l == null ? void 0 : l.columnId) === y.id ? l : void 0,
|
|
1933
1941
|
draggedTask: r
|
|
1934
1942
|
}
|
|
@@ -1939,10 +1947,10 @@ function Jt({ className: s }) {
|
|
|
1939
1947
|
}
|
|
1940
1948
|
),
|
|
1941
1949
|
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ a(
|
|
1942
|
-
|
|
1950
|
+
_,
|
|
1943
1951
|
{
|
|
1944
1952
|
variant: "ghost",
|
|
1945
|
-
onClick:
|
|
1953
|
+
onClick: w,
|
|
1946
1954
|
className: "h-ds-md w-[320px] justify-start gap-ds-03 rounded-ds-xl border border-dashed border-border/60 bg-layer-02 text-text-tertiary hover:border-border-interactive hover:bg-interactive-subtle/50 hover:text-interactive",
|
|
1947
1955
|
children: [
|
|
1948
1956
|
/* @__PURE__ */ e(ye, { className: "h-ico-sm w-ico-sm" }),
|
|
@@ -1953,42 +1961,42 @@ function Jt({ className: s }) {
|
|
|
1953
1961
|
]
|
|
1954
1962
|
}
|
|
1955
1963
|
),
|
|
1956
|
-
|
|
1957
|
-
/* @__PURE__ */ e(
|
|
1964
|
+
k && Ze(
|
|
1965
|
+
/* @__PURE__ */ e(it, { dropAnimation: { duration: 240, easing: "cubic-bezier(0.34, 1.56, 0.64, 1)" }, children: r ? n === "compact" ? /* @__PURE__ */ e(He, { task: r }) : /* @__PURE__ */ e(Qe, { task: r }) : null }),
|
|
1958
1966
|
document.body
|
|
1959
1967
|
)
|
|
1960
1968
|
]
|
|
1961
1969
|
}
|
|
1962
1970
|
);
|
|
1963
1971
|
}
|
|
1964
|
-
const
|
|
1965
|
-
function({ className:
|
|
1966
|
-
return /* @__PURE__ */ e("div", { ref: r, className:
|
|
1967
|
-
/* @__PURE__ */ e(Be, {}),
|
|
1972
|
+
const ts = Q.forwardRef(
|
|
1973
|
+
function({ className: s, ...n }, r) {
|
|
1974
|
+
return /* @__PURE__ */ e("div", { ref: r, className: s, children: /* @__PURE__ */ e(_t, { ...n, children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-ds-03", children: [
|
|
1968
1975
|
/* @__PURE__ */ e(We, {}),
|
|
1969
|
-
/* @__PURE__ */ e(
|
|
1976
|
+
/* @__PURE__ */ e($e, {}),
|
|
1977
|
+
/* @__PURE__ */ e(es, {})
|
|
1970
1978
|
] }) }) });
|
|
1971
1979
|
}
|
|
1972
1980
|
);
|
|
1973
|
-
|
|
1981
|
+
ts.displayName = "KanbanBoard";
|
|
1974
1982
|
export {
|
|
1975
|
-
|
|
1983
|
+
Ye as B,
|
|
1976
1984
|
we as C,
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1985
|
+
ke as D,
|
|
1986
|
+
ts as K,
|
|
1987
|
+
me as P,
|
|
1988
|
+
Ue as T,
|
|
1989
|
+
_t as a,
|
|
1990
|
+
We as b,
|
|
1991
|
+
$e as c,
|
|
1992
|
+
Bt as d,
|
|
1993
|
+
_e as e,
|
|
1986
1994
|
Pe as f,
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1995
|
+
ys as g,
|
|
1996
|
+
Ke as h,
|
|
1997
|
+
He as i,
|
|
1998
|
+
Qe as j,
|
|
1999
|
+
je as k,
|
|
2000
|
+
Jt as l,
|
|
2001
|
+
G as u
|
|
1994
2002
|
};
|