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