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