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