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