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