@devalok/shilp-sutra-karm 0.18.0 → 0.19.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/task-detail-panel.js +1339 -1144
- package/dist/tasks/activity-tab.d.ts +2 -11
- package/dist/tasks/activity-tab.d.ts.map +1 -1
- package/dist/tasks/conversation-tab.d.ts +2 -21
- package/dist/tasks/conversation-tab.d.ts.map +1 -1
- package/dist/tasks/files-tab.d.ts +2 -18
- package/dist/tasks/files-tab.d.ts.map +1 -1
- package/dist/tasks/index.d.ts +12 -6
- package/dist/tasks/index.d.ts.map +1 -1
- package/dist/tasks/index.js +765 -8
- package/dist/tasks/pickers/index.d.ts +16 -0
- package/dist/tasks/pickers/index.d.ts.map +1 -0
- package/dist/tasks/pickers/task-assignee-picker.d.ts +14 -0
- package/dist/tasks/pickers/task-assignee-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-column-picker.d.ts +13 -0
- package/dist/tasks/pickers/task-column-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-date-picker.d.ts +12 -0
- package/dist/tasks/pickers/task-date-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-label-editor.d.ts +13 -0
- package/dist/tasks/pickers/task-label-editor.d.ts.map +1 -0
- package/dist/tasks/pickers/task-member-picker.d.ts +14 -0
- package/dist/tasks/pickers/task-member-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-priority-picker.d.ts +12 -0
- package/dist/tasks/pickers/task-priority-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-visibility-picker.d.ts +13 -0
- package/dist/tasks/pickers/task-visibility-picker.d.ts.map +1 -0
- package/dist/tasks/review-tab.d.ts +4 -20
- package/dist/tasks/review-tab.d.ts.map +1 -1
- package/dist/tasks/subtasks-tab.d.ts +2 -18
- package/dist/tasks/subtasks-tab.d.ts.map +1 -1
- package/dist/tasks/tabs/activity-entry.d.ts +9 -0
- package/dist/tasks/tabs/activity-entry.d.ts.map +1 -0
- package/dist/tasks/tabs/activity-timeline.d.ts +8 -0
- package/dist/tasks/tabs/activity-timeline.d.ts.map +1 -0
- package/dist/tasks/tabs/file-drop-zone.d.ts +10 -0
- package/dist/tasks/tabs/file-drop-zone.d.ts.map +1 -0
- package/dist/tasks/tabs/file-item.d.ts +11 -0
- package/dist/tasks/tabs/file-item.d.ts.map +1 -0
- package/dist/tasks/tabs/file-list.d.ts +8 -0
- package/dist/tasks/tabs/file-list.d.ts.map +1 -0
- package/dist/tasks/tabs/index.d.ts +34 -0
- package/dist/tasks/tabs/index.d.ts.map +1 -0
- package/dist/tasks/tabs/message-bubble.d.ts +14 -0
- package/dist/tasks/tabs/message-bubble.d.ts.map +1 -0
- package/dist/tasks/tabs/message-input.d.ts +16 -0
- package/dist/tasks/tabs/message-input.d.ts.map +1 -0
- package/dist/tasks/tabs/message-list.d.ts +9 -0
- package/dist/tasks/tabs/message-list.d.ts.map +1 -0
- package/dist/tasks/tabs/review-card.d.ts +10 -0
- package/dist/tasks/tabs/review-card.d.ts.map +1 -0
- package/dist/tasks/tabs/review-request-button.d.ts +10 -0
- package/dist/tasks/tabs/review-request-button.d.ts.map +1 -0
- package/dist/tasks/tabs/review-response-form.d.ts +11 -0
- package/dist/tasks/tabs/review-response-form.d.ts.map +1 -0
- package/dist/tasks/tabs/subtask-add-form.d.ts +9 -0
- package/dist/tasks/tabs/subtask-add-form.d.ts.map +1 -0
- package/dist/tasks/tabs/subtask-item.d.ts +12 -0
- package/dist/tasks/tabs/subtask-item.d.ts.map +1 -0
- package/dist/tasks/tabs/subtask-list.d.ts +8 -0
- package/dist/tasks/tabs/subtask-list.d.ts.map +1 -0
- package/dist/tasks/tabs/subtask-progress.d.ts +9 -0
- package/dist/tasks/tabs/subtask-progress.d.ts.map +1 -0
- package/dist/tasks/tabs/visibility-warning.d.ts +7 -0
- package/dist/tasks/tabs/visibility-warning.d.ts.map +1 -0
- package/dist/tasks/task-panel.d.ts +104 -0
- package/dist/tasks/task-panel.d.ts.map +1 -0
- package/dist/tasks/task-properties.d.ts +2 -12
- package/dist/tasks/task-properties.d.ts.map +1 -1
- package/dist/tasks/task-types.d.ts +104 -0
- package/dist/tasks/task-types.d.ts.map +1 -0
- package/docs/components/admin/admin-dashboard.md +215 -0
- package/docs/components/admin/admin-types.md +167 -0
- package/docs/components/admin/admin-utils.md +165 -0
- package/docs/components/admin/break-admin.md +167 -0
- package/docs/components/board/board-column.md +35 -0
- package/docs/components/board/board-provider.md +89 -0
- package/docs/components/board/board-toolbar.md +36 -0
- package/docs/components/board/board-types.md +62 -0
- package/docs/components/board/bulk-action-bar.md +38 -0
- package/docs/components/board/column-empty.md +33 -0
- package/docs/components/board/column-header.md +36 -0
- package/docs/components/board/kanban-board.md +53 -0
- package/docs/components/board/task-card.md +62 -0
- package/docs/components/board/task-context-menu.md +36 -0
- package/docs/components/chat/chat-input.md +37 -0
- package/docs/components/chat/chat-panel.md +58 -0
- package/docs/components/chat/conversation-list.md +47 -0
- package/docs/components/chat/message-list.md +44 -0
- package/docs/components/chat/streaming-text.md +29 -0
- package/docs/components/client/accent-provider.md +29 -0
- package/docs/components/client/client-portal-header.md +40 -0
- package/docs/components/client/project-card.md +39 -0
- package/docs/components/dashboard/attendance-cta.md +47 -0
- package/docs/components/dashboard/daily-brief.md +45 -0
- package/docs/components/dashboard/scratchpad-widget.md +52 -0
- package/docs/components/dashboard/sidebar-scratchpad.md +39 -0
- package/docs/components/other/karm-command-registry.md +61 -0
- package/docs/components/other/page-skeletons.md +52 -0
- package/docs/components/tasks/activity-tab.md +45 -0
- package/docs/components/tasks/conversation-tab.md +56 -0
- package/docs/components/tasks/files-tab.md +55 -0
- package/docs/components/tasks/review-tab.md +53 -0
- package/docs/components/tasks/subtasks-tab.md +61 -0
- package/docs/components/tasks/task-assignee-picker.md +36 -0
- package/docs/components/tasks/task-column-picker.md +37 -0
- package/docs/components/tasks/task-date-picker.md +49 -0
- package/docs/components/tasks/task-detail-panel.md +275 -0
- package/docs/components/tasks/task-label-editor.md +42 -0
- package/docs/components/tasks/task-member-picker.md +35 -0
- package/docs/components/tasks/task-panel.md +89 -0
- package/docs/components/tasks/task-priority-picker.md +37 -0
- package/docs/components/tasks/task-properties.md +84 -0
- package/docs/components/tasks/task-visibility-picker.md +38 -0
- package/llms.txt +40 -13
- package/package.json +82 -80
|
@@ -1,1054 +1,747 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Sheet as
|
|
6
|
-
import { VisuallyHidden as
|
|
7
|
-
import { Skeleton as
|
|
8
|
-
import { Progress as
|
|
9
|
-
import { Avatar as
|
|
2
|
+
import { jsxs as r, jsx as s, Fragment as ge } from "react/jsx-runtime";
|
|
3
|
+
import * as c from "react";
|
|
4
|
+
import { cn as h } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
5
|
+
import { Sheet as xs, SheetContent as Ns, SheetTitle as vs } from "@devalok/shilp-sutra/ui/sheet";
|
|
6
|
+
import { VisuallyHidden as ys } from "@devalok/shilp-sutra/ui/visually-hidden";
|
|
7
|
+
import { Skeleton as A } from "@devalok/shilp-sutra/ui/skeleton";
|
|
8
|
+
import { Progress as ws, Tabs as Is, TabsList as Cs, TabsTrigger as U } from "@devalok/shilp-sutra/ui";
|
|
9
|
+
import { Avatar as F, AvatarImage as V, AvatarFallback as j } from "@devalok/shilp-sutra/ui/avatar";
|
|
10
10
|
import { Popover as de, PopoverTrigger as ue, PopoverContent as me } from "@devalok/shilp-sutra/ui/popover";
|
|
11
|
-
import {
|
|
12
|
-
import { getInitials as
|
|
13
|
-
import { MemberPicker as
|
|
14
|
-
import { EmptyState as
|
|
15
|
-
import { Badge as
|
|
16
|
-
import { RichTextViewer as
|
|
17
|
-
import { formatRelativeTime as
|
|
18
|
-
import { Dialog as
|
|
19
|
-
import { Button as
|
|
20
|
-
const
|
|
11
|
+
import { IconSquareCheck as Ds, IconSquare as Rs, IconPlus as B, IconSend as Es, IconUpload as Ts, IconExternalLink as As, IconDownload as Ss, IconTrash as ks, IconFile as fe, IconPhoto as Ls, IconFileText as Ps, IconFileCode as Os, IconFileSpreadsheet as _s, IconFileZip as Fs, IconCheck as xe, IconMessage as Ne, IconX as Y, IconCalendarEvent as ve, IconTag as ye, IconFlag as we, IconEye as Ie, IconCircleCheck as Vs, IconGitPullRequest as ee, IconPaperclip as se, IconUserMinus as js, IconUserPlus as Bs, IconArrowRight as Hs, IconEdit as qs, IconActivity as te, IconListCheck as Ce, IconMessageCircle as De, IconColumns3 as Gs, IconChevronDown as $s, IconUser as Ms, IconUsers as zs } from "@tabler/icons-react";
|
|
12
|
+
import { getInitials as H } from "@devalok/shilp-sutra/composed/lib/string-utils";
|
|
13
|
+
import { MemberPicker as X } from "@devalok/shilp-sutra/composed/member-picker";
|
|
14
|
+
import { EmptyState as q } from "@devalok/shilp-sutra/composed/empty-state";
|
|
15
|
+
import { Badge as Ys } from "@devalok/shilp-sutra/ui/badge";
|
|
16
|
+
import { RichTextViewer as Ws, RichTextEditor as Ks } from "@devalok/shilp-sutra/composed/rich-text-editor";
|
|
17
|
+
import { formatRelativeTime as Zs } from "@devalok/shilp-sutra/ui/lib/date-utils";
|
|
18
|
+
import { Dialog as Js, DialogTrigger as Qs, DialogContent as Us, DialogHeader as Xs, DialogTitle as et, DialogDescription as st, DialogFooter as tt, DialogClose as pe } from "@devalok/shilp-sutra/ui/dialog";
|
|
19
|
+
import { Button as he } from "@devalok/shilp-sutra/ui/button";
|
|
20
|
+
const rt = {
|
|
21
21
|
LOW: "Low",
|
|
22
22
|
MEDIUM: "Medium",
|
|
23
23
|
HIGH: "High",
|
|
24
24
|
URGENT: "Urgent"
|
|
25
|
-
},
|
|
25
|
+
}, Re = {
|
|
26
26
|
LOW: "bg-category-slate-9",
|
|
27
27
|
MEDIUM: "bg-warning-9",
|
|
28
28
|
HIGH: "bg-error-9",
|
|
29
29
|
URGENT: "bg-error-9"
|
|
30
|
-
},
|
|
30
|
+
}, at = {
|
|
31
31
|
PENDING: { color: "warning", label: "Pending" },
|
|
32
32
|
APPROVED: { color: "success", label: "Approved" },
|
|
33
33
|
CHANGES_REQUESTED: { color: "brand", label: "Changes Requested" },
|
|
34
34
|
REJECTED: { color: "error", label: "Rejected" }
|
|
35
|
-
},
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
renderPriorityIndicator: C,
|
|
77
|
-
renderDatePicker: N,
|
|
78
|
-
onConfirmVisibilityChange: w,
|
|
79
|
-
...I
|
|
80
|
-
}, i) {
|
|
81
|
-
const [v, l] = o.useState(""), [c, f] = o.useState(!1), u = s.assignees.map((a) => a.user.id), E = o.useMemo(
|
|
82
|
-
() => h.map((a) => ({ id: a.id, name: a.name, avatar: a.image ?? void 0 })),
|
|
83
|
-
[h]
|
|
84
|
-
), T = (a) => {
|
|
85
|
-
b("columnId", a);
|
|
86
|
-
}, S = (a) => {
|
|
87
|
-
b("ownerId", a === s.ownerId ? null : a);
|
|
88
|
-
}, _ = (a) => {
|
|
89
|
-
u.includes(a) ? y(a) : m(a);
|
|
90
|
-
}, R = (a) => {
|
|
91
|
-
b("priority", a);
|
|
92
|
-
}, k = (a) => {
|
|
93
|
-
b("dueDate", a ? a.toISOString() : null);
|
|
94
|
-
}, z = () => {
|
|
95
|
-
const a = v.trim();
|
|
96
|
-
a && !s.labels.includes(a) && b("labels", [...s.labels, a]), l(""), f(!1);
|
|
97
|
-
}, J = (a) => {
|
|
98
|
-
b("labels", s.labels.filter((Q) => Q !== a));
|
|
99
|
-
}, M = () => {
|
|
100
|
-
const a = s.visibility === "INTERNAL" ? "EVERYONE" : "INTERNAL";
|
|
101
|
-
if (a === "EVERYONE" && w) {
|
|
102
|
-
w();
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
b("visibility", a);
|
|
106
|
-
}, q = C || qs;
|
|
107
|
-
return /* @__PURE__ */ t("div", { ref: i, className: p("space-y-ds-01", D), ...I, children: [
|
|
108
|
-
/* @__PURE__ */ e(O, { icon: os, label: "Column", children: x && !(d != null && d.includes("columnId")) ? /* @__PURE__ */ e("span", { className: "px-ds-03 py-ds-02 text-ds-md text-surface-fg", children: s.column.name }) : /* @__PURE__ */ t(de, { children: [
|
|
109
|
-
/* @__PURE__ */ e(ue, { asChild: !0, children: /* @__PURE__ */ t(
|
|
110
|
-
"button",
|
|
111
|
-
{
|
|
112
|
-
type: "button",
|
|
113
|
-
className: "inline-flex items-center gap-ds-02b rounded-ds-md px-ds-03 py-ds-02 text-ds-md text-surface-fg transition-colors hover:bg-surface-3",
|
|
114
|
-
children: [
|
|
115
|
-
/* @__PURE__ */ e("span", { children: s.column.name }),
|
|
116
|
-
/* @__PURE__ */ e(ds, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
) }),
|
|
120
|
-
/* @__PURE__ */ e(
|
|
121
|
-
me,
|
|
122
|
-
{
|
|
123
|
-
className: "w-[180px] border-surface-border-strong bg-surface-1 p-ds-02",
|
|
124
|
-
align: "start",
|
|
125
|
-
sideOffset: 4,
|
|
126
|
-
children: g.map((a) => /* @__PURE__ */ t(
|
|
127
|
-
"button",
|
|
128
|
-
{
|
|
129
|
-
type: "button",
|
|
130
|
-
onClick: () => T(a.id),
|
|
131
|
-
className: p(
|
|
132
|
-
"flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-left text-ds-md transition-colors",
|
|
133
|
-
"hover:bg-surface-3",
|
|
134
|
-
a.id === s.columnId ? "text-accent-11" : "text-surface-fg"
|
|
135
|
-
),
|
|
136
|
-
children: [
|
|
137
|
-
a.name,
|
|
138
|
-
a.id === s.columnId && /* @__PURE__ */ e(xe, { className: "ml-auto h-ico-sm w-ico-sm" })
|
|
139
|
-
]
|
|
140
|
-
},
|
|
141
|
-
a.id
|
|
142
|
-
))
|
|
143
|
-
}
|
|
144
|
-
)
|
|
145
|
-
] }) }),
|
|
146
|
-
!x && /* @__PURE__ */ e(O, { icon: us, label: "Owner", children: /* @__PURE__ */ e(
|
|
147
|
-
ee,
|
|
148
|
-
{
|
|
149
|
-
members: E,
|
|
150
|
-
selectedIds: s.ownerId ? [s.ownerId] : [],
|
|
151
|
-
onSelect: S,
|
|
152
|
-
children: /* @__PURE__ */ e(
|
|
35
|
+
}, Ee = c.forwardRef(
|
|
36
|
+
function({ completed: e, total: i, className: l, ...d }, u) {
|
|
37
|
+
return /* @__PURE__ */ r("div", { ref: u, className: h("mb-ds-05 flex items-center gap-ds-04", l), ...d, children: [
|
|
38
|
+
/* @__PURE__ */ s(ws, { value: i > 0 ? e / i * 100 : 0, className: "h-ds-02b" }),
|
|
39
|
+
/* @__PURE__ */ r("span", { className: "shrink-0 text-ds-sm font-medium text-surface-fg-subtle", children: [
|
|
40
|
+
e,
|
|
41
|
+
"/",
|
|
42
|
+
i
|
|
43
|
+
] })
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
Ee.displayName = "SubtaskProgress";
|
|
48
|
+
const Te = c.forwardRef(
|
|
49
|
+
function({ children: e, className: i, ...l }, d) {
|
|
50
|
+
return /* @__PURE__ */ s("div", { ref: d, className: h("space-y-ds-01", i), ...l, children: e });
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
Te.displayName = "SubtaskList";
|
|
54
|
+
const Ae = c.forwardRef(
|
|
55
|
+
function({ subtask: e, isComplete: i, onToggle: l, onClick: d, className: u, ...f }, m) {
|
|
56
|
+
var o;
|
|
57
|
+
const p = (o = e.assignees[0]) == null ? void 0 : o.user;
|
|
58
|
+
return /* @__PURE__ */ r(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
ref: m,
|
|
62
|
+
role: "button",
|
|
63
|
+
tabIndex: 0,
|
|
64
|
+
className: h(
|
|
65
|
+
"group flex items-center gap-ds-03 rounded-ds-lg px-ds-03 py-ds-02b transition-colors",
|
|
66
|
+
"hover:bg-surface-3 cursor-pointer",
|
|
67
|
+
u
|
|
68
|
+
),
|
|
69
|
+
onClick: () => d == null ? void 0 : d(e.id),
|
|
70
|
+
onKeyDown: (x) => {
|
|
71
|
+
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), d == null || d(e.id));
|
|
72
|
+
},
|
|
73
|
+
...f,
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ s(
|
|
153
76
|
"button",
|
|
154
77
|
{
|
|
155
78
|
type: "button",
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
/* @__PURE__ */ t(j, { className: "h-ico-md w-ico-md", children: [
|
|
159
|
-
s.owner.image && /* @__PURE__ */ e(H, { src: s.owner.image, alt: s.owner.name }),
|
|
160
|
-
/* @__PURE__ */ e(G, { className: "bg-surface-3 text-ds-xs font-semibold text-accent-fg", children: B(s.owner.name) })
|
|
161
|
-
] }),
|
|
162
|
-
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg", children: s.owner.name })
|
|
163
|
-
] }) : /* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: "No owner" })
|
|
164
|
-
}
|
|
165
|
-
)
|
|
166
|
-
}
|
|
167
|
-
) }),
|
|
168
|
-
/* @__PURE__ */ e(O, { icon: ms, label: "Assignees", children: /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-ds-02b", children: [
|
|
169
|
-
s.assignees.map((a) => /* @__PURE__ */ t(
|
|
170
|
-
"div",
|
|
171
|
-
{
|
|
172
|
-
className: "inline-flex items-center gap-ds-02 rounded-ds-full bg-surface-2 py-ds-01 pl-ds-01 pr-ds-03",
|
|
173
|
-
children: [
|
|
174
|
-
/* @__PURE__ */ t(j, { className: "h-ico-sm w-ico-sm", children: [
|
|
175
|
-
a.user.image && /* @__PURE__ */ e(H, { src: a.user.image, alt: a.user.name }),
|
|
176
|
-
/* @__PURE__ */ e(G, { className: "bg-surface-3 text-ds-xs font-semibold text-accent-fg", children: B(a.user.name) })
|
|
177
|
-
] }),
|
|
178
|
-
/* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-muted", children: a.user.name.split(" ")[0] }),
|
|
179
|
-
!x && /* @__PURE__ */ e(
|
|
180
|
-
"button",
|
|
181
|
-
{
|
|
182
|
-
type: "button",
|
|
183
|
-
onClick: () => y(a.user.id),
|
|
184
|
-
className: "ml-ds-01 rounded-ds-full p-ds-01 transition-colors hover:bg-surface-3",
|
|
185
|
-
"aria-label": `Remove ${a.user.name}`,
|
|
186
|
-
children: /* @__PURE__ */ e(W, { className: "h-ds-03 w-ds-03 text-surface-fg-subtle" })
|
|
187
|
-
}
|
|
188
|
-
)
|
|
189
|
-
]
|
|
190
|
-
},
|
|
191
|
-
a.user.id
|
|
192
|
-
)),
|
|
193
|
-
!x && /* @__PURE__ */ e(
|
|
194
|
-
ee,
|
|
195
|
-
{
|
|
196
|
-
members: E,
|
|
197
|
-
selectedIds: u,
|
|
198
|
-
onSelect: _,
|
|
199
|
-
multiple: !0,
|
|
200
|
-
children: /* @__PURE__ */ e(
|
|
201
|
-
"button",
|
|
202
|
-
{
|
|
203
|
-
type: "button",
|
|
204
|
-
className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded-ds-full border border-dashed border-surface-border transition-colors hover:bg-surface-3 hover:border-surface-border",
|
|
205
|
-
"aria-label": "Add assignee",
|
|
206
|
-
children: /* @__PURE__ */ e($, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
207
|
-
}
|
|
208
|
-
)
|
|
209
|
-
}
|
|
210
|
-
),
|
|
211
|
-
x && s.assignees.length === 0 && /* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: "None" })
|
|
212
|
-
] }) }),
|
|
213
|
-
/* @__PURE__ */ e(O, { icon: Ne, label: "Priority", children: /* @__PURE__ */ t(de, { children: [
|
|
214
|
-
/* @__PURE__ */ e(ue, { asChild: !0, children: /* @__PURE__ */ e(
|
|
215
|
-
"button",
|
|
216
|
-
{
|
|
217
|
-
type: "button",
|
|
218
|
-
className: "rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-surface-3",
|
|
219
|
-
children: /* @__PURE__ */ e(q, { priority: s.priority })
|
|
220
|
-
}
|
|
221
|
-
) }),
|
|
222
|
-
/* @__PURE__ */ e(
|
|
223
|
-
me,
|
|
224
|
-
{
|
|
225
|
-
className: "w-[160px] border-surface-border-strong bg-surface-1 p-ds-02",
|
|
226
|
-
align: "start",
|
|
227
|
-
sideOffset: 4,
|
|
228
|
-
children: zs.map((a) => /* @__PURE__ */ e(
|
|
229
|
-
"button",
|
|
230
|
-
{
|
|
231
|
-
type: "button",
|
|
232
|
-
onClick: () => R(a),
|
|
233
|
-
className: p(
|
|
234
|
-
"flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b transition-colors",
|
|
235
|
-
"hover:bg-surface-3",
|
|
236
|
-
a === s.priority && "bg-surface-3"
|
|
237
|
-
),
|
|
238
|
-
children: /* @__PURE__ */ e(q, { priority: a })
|
|
79
|
+
onClick: (x) => {
|
|
80
|
+
x.stopPropagation(), l == null || l(e.id, !i);
|
|
239
81
|
},
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
{
|
|
254
|
-
type: "date",
|
|
255
|
-
value: s.dueDate ? new Date(s.dueDate).toISOString().split("T")[0] : "",
|
|
256
|
-
onChange: (a) => k(a.target.value ? new Date(a.target.value) : null),
|
|
257
|
-
"aria-label": "Due date",
|
|
258
|
-
className: "h-ds-xs-plus border-none bg-transparent px-ds-03 text-ds-md text-surface-fg outline-none hover:bg-surface-3 rounded-ds-md"
|
|
259
|
-
}
|
|
260
|
-
),
|
|
261
|
-
s.dueDate && /* @__PURE__ */ e(
|
|
262
|
-
"button",
|
|
263
|
-
{
|
|
264
|
-
type: "button",
|
|
265
|
-
onClick: () => k(null),
|
|
266
|
-
className: "rounded-ds-md p-ds-02 transition-colors hover:bg-surface-3",
|
|
267
|
-
"aria-label": "Clear due date",
|
|
268
|
-
children: /* @__PURE__ */ e(W, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
269
|
-
}
|
|
270
|
-
)
|
|
271
|
-
] }) }),
|
|
272
|
-
/* @__PURE__ */ e(O, { icon: ye, label: "Labels", children: /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-ds-02b", children: [
|
|
273
|
-
s.labels.map((a) => /* @__PURE__ */ t(
|
|
274
|
-
"span",
|
|
275
|
-
{
|
|
276
|
-
className: "inline-flex items-center gap-ds-02 rounded-ds-full bg-accent-2 px-ds-03 py-ds-01 text-ds-sm font-medium text-accent-11",
|
|
277
|
-
children: [
|
|
278
|
-
a,
|
|
279
|
-
!x && /* @__PURE__ */ e(
|
|
280
|
-
"button",
|
|
281
|
-
{
|
|
282
|
-
type: "button",
|
|
283
|
-
onClick: () => J(a),
|
|
284
|
-
className: "rounded-ds-full p-ds-01 transition-colors hover:bg-surface-3",
|
|
285
|
-
"aria-label": `Remove label ${a}`,
|
|
286
|
-
children: /* @__PURE__ */ e(W, { className: "h-ds-03 w-ds-03" })
|
|
287
|
-
}
|
|
82
|
+
className: h(
|
|
83
|
+
"shrink-0 rounded p-ds-01 transition-colors",
|
|
84
|
+
l ? "hover:bg-surface-2" : "cursor-default"
|
|
85
|
+
),
|
|
86
|
+
children: i ? /* @__PURE__ */ s(Ds, { className: "h-ico-sm w-ico-sm text-accent-11", stroke: 1.5 }) : /* @__PURE__ */ s(Rs, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle", stroke: 1.5 })
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ s(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
className: h(
|
|
93
|
+
"h-2 w-2 shrink-0 rounded-ds-full",
|
|
94
|
+
Re[e.priority]
|
|
288
95
|
)
|
|
289
|
-
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ s(
|
|
99
|
+
"span",
|
|
100
|
+
{
|
|
101
|
+
className: h(
|
|
102
|
+
"flex-1 truncate text-ds-md",
|
|
103
|
+
i ? "text-surface-fg-subtle line-through" : "text-surface-fg"
|
|
104
|
+
),
|
|
105
|
+
children: e.title
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
p && /* @__PURE__ */ r(F, { className: "h-ico-md w-ico-md shrink-0", children: [
|
|
109
|
+
p.image && /* @__PURE__ */ s(V, { src: p.image, alt: p.name }),
|
|
110
|
+
/* @__PURE__ */ s(j, { className: "bg-surface-3 text-ds-xs font-semibold text-accent-fg", children: H(p.name) })
|
|
111
|
+
] })
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
Ae.displayName = "SubtaskItem";
|
|
118
|
+
const Se = c.forwardRef(
|
|
119
|
+
function({ onCreate: e, placeholder: i = "Subtask title...", className: l, ...d }, u) {
|
|
120
|
+
const [f, m] = c.useState(""), [p, o] = c.useState(!1), x = c.useRef(null), b = () => {
|
|
121
|
+
const g = f.trim();
|
|
122
|
+
g && (e(g), m(""));
|
|
123
|
+
}, N = (g) => {
|
|
124
|
+
g.key === "Enter" && (g.preventDefault(), b()), g.key === "Escape" && (o(!1), m(""));
|
|
125
|
+
};
|
|
126
|
+
return c.useEffect(() => {
|
|
127
|
+
p && x.current && x.current.focus();
|
|
128
|
+
}, [p]), /* @__PURE__ */ s("div", { ref: u, className: h(l), ...d, children: p ? /* @__PURE__ */ r("div", { className: "mt-ds-03 flex items-center gap-ds-03 rounded-ds-lg border border-surface-border-strong bg-surface-1 shadow-01 px-ds-04 py-ds-03", children: [
|
|
129
|
+
/* @__PURE__ */ s(
|
|
130
|
+
"input",
|
|
131
|
+
{
|
|
132
|
+
ref: x,
|
|
133
|
+
type: "text",
|
|
134
|
+
value: f,
|
|
135
|
+
onChange: (g) => m(g.target.value),
|
|
136
|
+
onKeyDown: N,
|
|
137
|
+
onBlur: () => {
|
|
138
|
+
f.trim() || o(!1);
|
|
290
139
|
},
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
type: "text",
|
|
297
|
-
value: v,
|
|
298
|
-
onChange: (a) => l(a.target.value),
|
|
299
|
-
"aria-label": "New label name",
|
|
300
|
-
onKeyDown: (a) => {
|
|
301
|
-
a.key === "Enter" && z(), a.key === "Escape" && (f(!1), l(""));
|
|
302
|
-
},
|
|
303
|
-
onBlur: z,
|
|
304
|
-
placeholder: "Label name",
|
|
305
|
-
className: "h-5 w-20 rounded border border-surface-border-strong bg-transparent px-ds-02b text-ds-sm text-surface-fg outline-none placeholder:text-surface-fg-subtle focus:border-surface-border",
|
|
306
|
-
autoFocus: !0
|
|
307
|
-
}
|
|
308
|
-
) }) : /* @__PURE__ */ e(
|
|
309
|
-
"button",
|
|
310
|
-
{
|
|
311
|
-
type: "button",
|
|
312
|
-
onClick: () => f(!0),
|
|
313
|
-
className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded-ds-full border border-dashed border-surface-border transition-colors hover:bg-surface-3 hover:border-surface-border",
|
|
314
|
-
"aria-label": "Add label",
|
|
315
|
-
children: /* @__PURE__ */ e($, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
316
|
-
}
|
|
317
|
-
)),
|
|
318
|
-
x && s.labels.length === 0 && /* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: "None" })
|
|
319
|
-
] }) }),
|
|
320
|
-
!x && /* @__PURE__ */ e(O, { icon: we, label: "Visibility", children: /* @__PURE__ */ t(
|
|
140
|
+
placeholder: i,
|
|
141
|
+
className: "flex-1 bg-transparent text-ds-md text-surface-fg placeholder:text-surface-fg-subtle outline-none"
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
/* @__PURE__ */ s(
|
|
321
145
|
"button",
|
|
322
146
|
{
|
|
323
147
|
type: "button",
|
|
324
|
-
onClick:
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
),
|
|
329
|
-
children: [
|
|
330
|
-
/* @__PURE__ */ e(
|
|
331
|
-
"span",
|
|
332
|
-
{
|
|
333
|
-
className: p(
|
|
334
|
-
"h-ds-02b w-ds-02b rounded-ds-full",
|
|
335
|
-
s.visibility === "EVERYONE" ? "bg-success-9" : "bg-disabled"
|
|
336
|
-
)
|
|
337
|
-
}
|
|
338
|
-
),
|
|
339
|
-
s.visibility === "EVERYONE" ? "Everyone" : "Internal"
|
|
340
|
-
]
|
|
148
|
+
onClick: b,
|
|
149
|
+
disabled: !f.trim(),
|
|
150
|
+
className: "inline-flex h-6 items-center gap-ds-02 rounded-ds-md bg-accent-9 px-ds-03 text-ds-sm font-semibold text-accent-fg transition-colors hover:bg-accent-10 disabled:opacity-action-disabled",
|
|
151
|
+
children: "Add"
|
|
341
152
|
}
|
|
342
|
-
)
|
|
343
|
-
] })
|
|
153
|
+
)
|
|
154
|
+
] }) : /* @__PURE__ */ r(
|
|
155
|
+
"button",
|
|
156
|
+
{
|
|
157
|
+
type: "button",
|
|
158
|
+
onClick: () => o(!0),
|
|
159
|
+
className: "mt-ds-03 inline-flex items-center gap-ds-02b rounded-ds-lg px-ds-03 py-ds-02b text-ds-md text-surface-fg-subtle transition-colors hover:bg-surface-3 hover:text-surface-fg-muted",
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ s(B, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
|
|
162
|
+
"Add subtask"
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
) });
|
|
344
166
|
}
|
|
345
167
|
);
|
|
346
|
-
|
|
347
|
-
const
|
|
348
|
-
function({
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
168
|
+
Se.displayName = "SubtaskAddForm";
|
|
169
|
+
const ke = c.forwardRef(
|
|
170
|
+
function({ children: e, autoScroll: i = !0, className: l, ...d }, u) {
|
|
171
|
+
const f = c.useRef(null), m = c.Children.count(e);
|
|
172
|
+
c.useEffect(() => {
|
|
173
|
+
i && f.current && (f.current.scrollTop = f.current.scrollHeight);
|
|
174
|
+
}, [i, m]);
|
|
175
|
+
const p = c.useCallback(
|
|
176
|
+
(o) => {
|
|
177
|
+
f.current = o, typeof u == "function" ? u(o) : u && (u.current = o);
|
|
178
|
+
},
|
|
179
|
+
[u]
|
|
180
|
+
);
|
|
181
|
+
return /* @__PURE__ */ s(
|
|
182
|
+
"div",
|
|
183
|
+
{
|
|
184
|
+
ref: p,
|
|
185
|
+
className: h("flex-1 space-y-ds-05 overflow-y-auto", l),
|
|
186
|
+
...d,
|
|
187
|
+
children: e
|
|
362
188
|
}
|
|
363
|
-
)
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
ke.displayName = "MessageList";
|
|
193
|
+
function Le(t) {
|
|
194
|
+
const e = new Date(t), l = (/* @__PURE__ */ new Date()).getTime() - e.getTime();
|
|
195
|
+
return Math.floor(l / 864e5) < 7 ? Zs(t) : e.toLocaleDateString("en-IN", {
|
|
196
|
+
month: "short",
|
|
197
|
+
day: "numeric",
|
|
198
|
+
hour: "numeric",
|
|
199
|
+
minute: "2-digit"
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
function nt(t) {
|
|
203
|
+
return t.authorType === "INTERNAL" && t.internalAuthor ? t.internalAuthor : t.authorType === "CLIENT" && t.clientAuthor ? {
|
|
204
|
+
id: t.clientAuthor.id,
|
|
205
|
+
name: t.clientAuthor.name,
|
|
206
|
+
email: t.clientAuthor.email,
|
|
207
|
+
image: null
|
|
208
|
+
} : { id: t.authorId, name: "Unknown", image: null };
|
|
209
|
+
}
|
|
210
|
+
function it(t) {
|
|
211
|
+
return t.replace(/<[^>]*>/g, "");
|
|
212
|
+
}
|
|
213
|
+
const Pe = c.forwardRef(
|
|
214
|
+
function({ comment: e, clientMode: i = !1, renderViewer: l, className: d, ...u }, f) {
|
|
215
|
+
const m = nt(e), p = e.authorType === "CLIENT";
|
|
216
|
+
return /* @__PURE__ */ r("div", { ref: f, className: h("flex gap-ds-03", d), ...u, children: [
|
|
217
|
+
/* @__PURE__ */ r(F, { className: "h-ds-xs-plus w-ds-xs-plus shrink-0 mt-ds-01", children: [
|
|
218
|
+
m.image && /* @__PURE__ */ s(V, { src: m.image, alt: m.name }),
|
|
219
|
+
/* @__PURE__ */ s(
|
|
220
|
+
j,
|
|
385
221
|
{
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
"group flex items-center gap-ds-03 rounded-ds-lg px-ds-03 py-ds-02b transition-colors",
|
|
390
|
-
"hover:bg-surface-3 cursor-pointer"
|
|
222
|
+
className: h(
|
|
223
|
+
"text-ds-xs font-semibold",
|
|
224
|
+
p ? "bg-warning-3 text-warning-11" : "bg-surface-3 text-accent-fg"
|
|
391
225
|
),
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
T.image && /* @__PURE__ */ e(H, { src: T.image, alt: T.name }),
|
|
432
|
-
/* @__PURE__ */ e(G, { className: "bg-surface-3 text-ds-xs font-semibold text-accent-fg", children: B(T.name) })
|
|
433
|
-
] })
|
|
434
|
-
]
|
|
435
|
-
},
|
|
436
|
-
u.id
|
|
437
|
-
);
|
|
438
|
-
}) }) : !w && /* @__PURE__ */ e(
|
|
439
|
-
F,
|
|
226
|
+
children: H(m.name)
|
|
227
|
+
}
|
|
228
|
+
)
|
|
229
|
+
] }),
|
|
230
|
+
/* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: [
|
|
231
|
+
/* @__PURE__ */ r("div", { className: "flex items-baseline gap-ds-03", children: [
|
|
232
|
+
/* @__PURE__ */ s("span", { className: "text-ds-md font-medium text-surface-fg", children: m.name }),
|
|
233
|
+
i ? !p && /* @__PURE__ */ s("span", { className: "rounded bg-surface-3 px-ds-02 py-px text-ds-xs font-semibold uppercase tracking-wider text-accent-fg", children: "Team" }) : p && /* @__PURE__ */ s("span", { className: "rounded bg-warning-3 px-ds-02 py-px text-ds-xs font-semibold uppercase tracking-wider text-warning-11", children: "Client" }),
|
|
234
|
+
/* @__PURE__ */ s("span", { className: "text-ds-sm text-surface-fg-subtle", children: Le(e.createdAt) })
|
|
235
|
+
] }),
|
|
236
|
+
/* @__PURE__ */ s("div", { className: "mt-ds-02", children: l ? l({
|
|
237
|
+
content: e.content,
|
|
238
|
+
className: "[&_.ProseMirror]:!min-h-0 [&_.ProseMirror]:!p-0"
|
|
239
|
+
}) : /* @__PURE__ */ s("p", { className: "text-ds-md text-surface-fg-muted whitespace-pre-wrap", children: it(e.content) }) })
|
|
240
|
+
] })
|
|
241
|
+
] });
|
|
242
|
+
}
|
|
243
|
+
);
|
|
244
|
+
Pe.displayName = "MessageBubble";
|
|
245
|
+
const Oe = c.forwardRef(
|
|
246
|
+
function({
|
|
247
|
+
onSubmit: e,
|
|
248
|
+
renderEditor: i,
|
|
249
|
+
placeholder: l = "Write a comment...",
|
|
250
|
+
clientMode: d = !1,
|
|
251
|
+
className: u,
|
|
252
|
+
...f
|
|
253
|
+
}, m) {
|
|
254
|
+
const [p, o] = c.useState(""), x = () => {
|
|
255
|
+
const b = p.trim();
|
|
256
|
+
b.replace(/<[^>]*>/g, "").trim() && (e(b, d ? "CLIENT" : "INTERNAL"), o(""));
|
|
257
|
+
};
|
|
258
|
+
return /* @__PURE__ */ r("div", { ref: m, className: h("space-y-ds-03", u), ...f, children: [
|
|
259
|
+
i ? i({
|
|
260
|
+
content: p,
|
|
261
|
+
onChange: o,
|
|
262
|
+
placeholder: l
|
|
263
|
+
}) : /* @__PURE__ */ s(
|
|
264
|
+
"textarea",
|
|
440
265
|
{
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
266
|
+
value: p,
|
|
267
|
+
onChange: (b) => o(b.target.value),
|
|
268
|
+
placeholder: l,
|
|
269
|
+
rows: 3,
|
|
270
|
+
className: "w-full resize-none rounded-ds-md border border-surface-border-strong bg-transparent px-ds-04 py-ds-03 text-ds-md text-surface-fg placeholder:text-surface-fg-subtle outline-none focus:border-surface-border"
|
|
445
271
|
}
|
|
446
272
|
),
|
|
447
|
-
|
|
448
|
-
/* @__PURE__ */ e(
|
|
449
|
-
"input",
|
|
450
|
-
{
|
|
451
|
-
ref: i,
|
|
452
|
-
type: "text",
|
|
453
|
-
value: C,
|
|
454
|
-
onChange: (u) => N(u.target.value),
|
|
455
|
-
onKeyDown: f,
|
|
456
|
-
onBlur: () => {
|
|
457
|
-
C.trim() || I(!1);
|
|
458
|
-
},
|
|
459
|
-
placeholder: "Subtask title...",
|
|
460
|
-
className: "flex-1 bg-transparent text-ds-md text-surface-fg placeholder:text-surface-fg-subtle outline-none"
|
|
461
|
-
}
|
|
462
|
-
),
|
|
463
|
-
/* @__PURE__ */ e(
|
|
464
|
-
"button",
|
|
465
|
-
{
|
|
466
|
-
type: "button",
|
|
467
|
-
onClick: c,
|
|
468
|
-
disabled: !C.trim(),
|
|
469
|
-
className: "inline-flex h-6 items-center gap-ds-02 rounded-ds-md bg-accent-9 px-ds-03 text-ds-sm font-semibold text-accent-fg transition-colors hover:bg-accent-10 disabled:opacity-action-disabled",
|
|
470
|
-
children: "Add"
|
|
471
|
-
}
|
|
472
|
-
)
|
|
473
|
-
] }) : /* @__PURE__ */ t(
|
|
273
|
+
/* @__PURE__ */ s("div", { className: "flex justify-end", children: /* @__PURE__ */ r(
|
|
474
274
|
"button",
|
|
475
275
|
{
|
|
476
276
|
type: "button",
|
|
477
|
-
onClick:
|
|
478
|
-
|
|
277
|
+
onClick: x,
|
|
278
|
+
disabled: !p.replace(/<[^>]*>/g, "").trim(),
|
|
279
|
+
className: "inline-flex items-center gap-ds-02b rounded-ds-lg bg-accent-9 px-ds-04 py-ds-02b text-ds-sm font-semibold text-accent-fg transition-colors hover:bg-accent-10 disabled:opacity-action-disabled disabled:cursor-not-allowed",
|
|
479
280
|
children: [
|
|
480
|
-
/* @__PURE__ */
|
|
481
|
-
"
|
|
281
|
+
/* @__PURE__ */ s(Es, { className: "h-ico-sm w-ico-sm", stroke: 2 }),
|
|
282
|
+
"Comment"
|
|
482
283
|
]
|
|
483
284
|
}
|
|
484
|
-
))
|
|
285
|
+
) })
|
|
485
286
|
] });
|
|
486
287
|
}
|
|
487
288
|
);
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}, D) {
|
|
510
|
-
const [x, d] = o.useState({}), [C, N] = o.useState(null), w = o.useMemo(
|
|
511
|
-
() => g.map((i) => ({ id: i.id, name: i.name, avatar: i.image ?? void 0 })),
|
|
512
|
-
[g]
|
|
513
|
-
), I = (i, v) => {
|
|
514
|
-
b(i, v, x[i]), d((l) => {
|
|
515
|
-
const c = { ...l };
|
|
516
|
-
return delete c[i], c;
|
|
517
|
-
}), N(null);
|
|
289
|
+
Oe.displayName = "MessageInput";
|
|
290
|
+
const _e = c.forwardRef(
|
|
291
|
+
function({ className: e, ...i }, l) {
|
|
292
|
+
return /* @__PURE__ */ s(
|
|
293
|
+
"p",
|
|
294
|
+
{
|
|
295
|
+
ref: l,
|
|
296
|
+
className: h("text-ds-xs text-warning-11", e),
|
|
297
|
+
...i,
|
|
298
|
+
children: "This task is visible to clients. Comments may be seen by external users."
|
|
299
|
+
}
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
);
|
|
303
|
+
_e.displayName = "VisibilityWarning";
|
|
304
|
+
const Fe = c.forwardRef(
|
|
305
|
+
function({ onUpload: e, isUploading: i = !1, accept: l, className: d, ...u }, f) {
|
|
306
|
+
const m = c.useRef(null), [p, o] = c.useState(!1), x = (v) => {
|
|
307
|
+
var y;
|
|
308
|
+
const w = (y = v.target.files) == null ? void 0 : y[0];
|
|
309
|
+
w && e(w), m.current && (m.current.value = "");
|
|
518
310
|
};
|
|
519
|
-
return /* @__PURE__ */
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
i.status === "PENDING" && /* @__PURE__ */ e("div", { className: "mt-ds-03", children: l ? /* @__PURE__ */ t("div", { className: "space-y-ds-03", children: [
|
|
555
|
-
/* @__PURE__ */ e(
|
|
556
|
-
"textarea",
|
|
557
|
-
{
|
|
558
|
-
value: x[i.id] || "",
|
|
559
|
-
onChange: (c) => d((f) => ({
|
|
560
|
-
...f,
|
|
561
|
-
[i.id]: c.target.value
|
|
562
|
-
})),
|
|
563
|
-
placeholder: "Add feedback (optional)...",
|
|
564
|
-
rows: 2,
|
|
565
|
-
className: "w-full resize-none rounded-ds-md border border-surface-border-strong bg-transparent px-ds-03 py-ds-03 text-ds-sm text-surface-fg placeholder:text-surface-fg-subtle outline-none focus:border-surface-border"
|
|
566
|
-
}
|
|
567
|
-
),
|
|
568
|
-
/* @__PURE__ */ t("div", { className: "flex items-center gap-ds-02b", children: [
|
|
569
|
-
Ks.map((c) => {
|
|
570
|
-
const f = c.icon;
|
|
571
|
-
return /* @__PURE__ */ t(
|
|
572
|
-
"button",
|
|
573
|
-
{
|
|
574
|
-
type: "button",
|
|
575
|
-
onClick: () => I(i.id, c.status),
|
|
576
|
-
className: p(
|
|
577
|
-
"inline-flex items-center gap-ds-02 rounded-ds-md px-ds-03 py-ds-02 text-ds-sm font-semibold transition-colors",
|
|
578
|
-
c.status === "APPROVED" && "bg-success-3 text-success-11 hover:opacity-90",
|
|
579
|
-
c.status === "CHANGES_REQUESTED" && "bg-warning-3 text-warning-11 hover:opacity-90",
|
|
580
|
-
c.status === "REJECTED" && "bg-error-3 text-error-11 hover:opacity-90"
|
|
581
|
-
),
|
|
582
|
-
children: [
|
|
583
|
-
/* @__PURE__ */ e(f, { className: "h-3 w-3", stroke: 2 }),
|
|
584
|
-
c.label
|
|
585
|
-
]
|
|
586
|
-
},
|
|
587
|
-
c.status
|
|
588
|
-
);
|
|
589
|
-
}),
|
|
590
|
-
/* @__PURE__ */ e(
|
|
591
|
-
"button",
|
|
592
|
-
{
|
|
593
|
-
type: "button",
|
|
594
|
-
onClick: () => N(null),
|
|
595
|
-
className: "ml-auto text-ds-sm text-surface-fg-subtle hover:text-surface-fg-muted",
|
|
596
|
-
children: "Cancel"
|
|
597
|
-
}
|
|
598
|
-
)
|
|
599
|
-
] })
|
|
600
|
-
] }) : /* @__PURE__ */ e(
|
|
311
|
+
return /* @__PURE__ */ r(
|
|
312
|
+
"div",
|
|
313
|
+
{
|
|
314
|
+
ref: f,
|
|
315
|
+
role: "region",
|
|
316
|
+
"aria-label": "File upload drop zone",
|
|
317
|
+
onDrop: (v) => {
|
|
318
|
+
var y;
|
|
319
|
+
v.preventDefault(), o(!1);
|
|
320
|
+
const w = (y = v.dataTransfer.files) == null ? void 0 : y[0];
|
|
321
|
+
w && e(w);
|
|
322
|
+
},
|
|
323
|
+
onDragOver: (v) => {
|
|
324
|
+
v.preventDefault(), o(!0);
|
|
325
|
+
},
|
|
326
|
+
onDragLeave: () => {
|
|
327
|
+
o(!1);
|
|
328
|
+
},
|
|
329
|
+
className: h(
|
|
330
|
+
"rounded-ds-lg border-2 border-dashed transition-colors",
|
|
331
|
+
p ? "border-accent-7 bg-accent-1" : "border-surface-border-strong",
|
|
332
|
+
d
|
|
333
|
+
),
|
|
334
|
+
...u,
|
|
335
|
+
children: [
|
|
336
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col items-center gap-ds-03 py-ds-06", children: [
|
|
337
|
+
/* @__PURE__ */ s("div", { className: "flex h-ds-sm-plus w-ds-sm-plus items-center justify-center rounded-ds-lg bg-surface-2", children: /* @__PURE__ */ s(
|
|
338
|
+
Ts,
|
|
339
|
+
{
|
|
340
|
+
className: "h-ico-sm w-ico-sm text-surface-fg-subtle",
|
|
341
|
+
stroke: 1.5
|
|
342
|
+
}
|
|
343
|
+
) }),
|
|
344
|
+
/* @__PURE__ */ r("div", { className: "text-center", children: [
|
|
345
|
+
/* @__PURE__ */ s(
|
|
601
346
|
"button",
|
|
602
347
|
{
|
|
603
348
|
type: "button",
|
|
604
|
-
onClick: () =>
|
|
605
|
-
|
|
606
|
-
|
|
349
|
+
onClick: () => {
|
|
350
|
+
var v;
|
|
351
|
+
return (v = m.current) == null ? void 0 : v.click();
|
|
352
|
+
},
|
|
353
|
+
disabled: i,
|
|
354
|
+
className: "text-ds-md font-medium text-accent-11 transition-colors hover:underline disabled:opacity-action-disabled",
|
|
355
|
+
children: i ? "Uploading..." : "Click to upload"
|
|
607
356
|
}
|
|
608
|
-
)
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
icon: /* @__PURE__ */ e(se, {}),
|
|
618
|
-
title: "No reviews yet",
|
|
619
|
-
description: "Request a review from a team member",
|
|
620
|
-
compact: !0
|
|
621
|
-
}
|
|
622
|
-
),
|
|
623
|
-
/* @__PURE__ */ e(
|
|
624
|
-
ee,
|
|
625
|
-
{
|
|
626
|
-
members: w,
|
|
627
|
-
selectedIds: [],
|
|
628
|
-
onSelect: (i) => h(i),
|
|
629
|
-
children: /* @__PURE__ */ t(
|
|
630
|
-
"button",
|
|
357
|
+
),
|
|
358
|
+
/* @__PURE__ */ r("span", { className: "text-ds-md text-surface-fg-subtle", children: [
|
|
359
|
+
" ",
|
|
360
|
+
"or drag and drop"
|
|
361
|
+
] })
|
|
362
|
+
] })
|
|
363
|
+
] }),
|
|
364
|
+
/* @__PURE__ */ s(
|
|
365
|
+
"input",
|
|
631
366
|
{
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
]
|
|
367
|
+
ref: m,
|
|
368
|
+
type: "file",
|
|
369
|
+
accept: l,
|
|
370
|
+
onChange: x,
|
|
371
|
+
className: "hidden"
|
|
638
372
|
}
|
|
639
373
|
)
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
);
|
|
379
|
+
Fe.displayName = "FileDropZone";
|
|
380
|
+
const Ve = c.forwardRef(
|
|
381
|
+
function({ children: e, className: i, ...l }, d) {
|
|
382
|
+
return /* @__PURE__ */ s("div", { ref: d, className: h("space-y-ds-02", i), ...l, children: e });
|
|
643
383
|
}
|
|
644
384
|
);
|
|
645
|
-
|
|
646
|
-
function
|
|
647
|
-
|
|
648
|
-
|
|
385
|
+
Ve.displayName = "FileList";
|
|
386
|
+
function ct(t) {
|
|
387
|
+
if (!t) return fe;
|
|
388
|
+
const e = t.toLowerCase();
|
|
389
|
+
return ["jpg", "jpeg", "png", "gif", "svg", "webp", "bmp"].includes(e) ? Ls : ["pdf", "doc", "docx", "txt", "rtf"].includes(e) ? Ps : ["js", "ts", "jsx", "tsx", "py", "rb", "go", "rs", "html", "css", "json"].includes(e) ? Os : ["xls", "xlsx", "csv"].includes(e) ? _s : ["zip", "tar", "gz", "rar", "7z"].includes(e) ? Fs : fe;
|
|
390
|
+
}
|
|
391
|
+
function lt(t) {
|
|
392
|
+
return new Date(t).toLocaleDateString("en-IN", {
|
|
649
393
|
month: "short",
|
|
650
394
|
day: "numeric",
|
|
651
|
-
|
|
652
|
-
minute: "2-digit"
|
|
395
|
+
year: "numeric"
|
|
653
396
|
});
|
|
654
397
|
}
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
image: null
|
|
661
|
-
} : { id: n.authorId, name: "Unknown", image: null };
|
|
662
|
-
}
|
|
663
|
-
function Js(n) {
|
|
664
|
-
return n.replace(/<[^>]*>/g, "");
|
|
665
|
-
}
|
|
666
|
-
const ke = o.forwardRef(
|
|
667
|
-
function({
|
|
668
|
-
comments: s,
|
|
669
|
-
taskVisibility: g,
|
|
670
|
-
onPostComment: h,
|
|
671
|
-
className: b,
|
|
672
|
-
clientMode: m = !1,
|
|
673
|
-
richText: y = !0,
|
|
674
|
-
renderEditor: D,
|
|
675
|
-
renderViewer: x,
|
|
676
|
-
...d
|
|
677
|
-
}, C) {
|
|
678
|
-
const [N, w] = o.useState(""), I = o.useRef(null), i = D ?? (y ? (c) => /* @__PURE__ */ e(
|
|
679
|
-
Ps,
|
|
398
|
+
const je = c.forwardRef(
|
|
399
|
+
function({ file: e, onDelete: i, readOnly: l = !1, className: d, ...u }, f) {
|
|
400
|
+
const m = ct(e.fileType);
|
|
401
|
+
return /* @__PURE__ */ r(
|
|
402
|
+
"div",
|
|
680
403
|
{
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
404
|
+
ref: f,
|
|
405
|
+
className: h(
|
|
406
|
+
"group flex items-center gap-ds-04 rounded-ds-lg px-ds-03 py-ds-03 transition-colors hover:bg-surface-3",
|
|
407
|
+
d
|
|
408
|
+
),
|
|
409
|
+
...u,
|
|
410
|
+
children: [
|
|
411
|
+
/* @__PURE__ */ s("div", { className: "flex h-ds-sm w-ds-sm shrink-0 items-center justify-center rounded-ds-lg bg-surface-2", children: /* @__PURE__ */ s(
|
|
412
|
+
m,
|
|
413
|
+
{
|
|
414
|
+
className: "h-ico-sm w-ico-sm text-surface-fg-subtle",
|
|
415
|
+
stroke: 1.5
|
|
416
|
+
}
|
|
417
|
+
) }),
|
|
418
|
+
/* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: [
|
|
419
|
+
/* @__PURE__ */ s("p", { className: "truncate text-ds-md font-medium text-surface-fg", children: e.title }),
|
|
420
|
+
/* @__PURE__ */ r("p", { className: "text-ds-sm text-surface-fg-subtle", children: [
|
|
421
|
+
lt(e.createdAt),
|
|
422
|
+
/* @__PURE__ */ s("span", { className: "mx-ds-02b", children: "by" }),
|
|
423
|
+
e.uploadedBy.name
|
|
424
|
+
] })
|
|
425
|
+
] }),
|
|
426
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02 opacity-0 transition-opacity group-hover:opacity-100", children: [
|
|
427
|
+
e.externalUrl && /* @__PURE__ */ s(
|
|
428
|
+
"a",
|
|
429
|
+
{
|
|
430
|
+
href: /^https?:\/\//.test(e.externalUrl) ? e.externalUrl : "#",
|
|
431
|
+
target: "_blank",
|
|
432
|
+
rel: "noopener noreferrer",
|
|
433
|
+
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors hover:bg-surface-2",
|
|
434
|
+
title: e.externalLabel ?? "Open externally",
|
|
435
|
+
children: /* @__PURE__ */ s(As, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" })
|
|
436
|
+
}
|
|
437
|
+
),
|
|
438
|
+
e.downloadUrl && /* @__PURE__ */ s(
|
|
439
|
+
"a",
|
|
440
|
+
{
|
|
441
|
+
href: /^https?:\/\//.test(e.downloadUrl) ? e.downloadUrl : "#",
|
|
442
|
+
target: "_blank",
|
|
443
|
+
rel: "noopener noreferrer",
|
|
444
|
+
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors hover:bg-surface-2",
|
|
445
|
+
title: "Download",
|
|
446
|
+
children: /* @__PURE__ */ s(Ss, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" })
|
|
447
|
+
}
|
|
448
|
+
),
|
|
449
|
+
!l && i && /* @__PURE__ */ r(Js, { children: [
|
|
450
|
+
/* @__PURE__ */ s(Qs, { asChild: !0, children: /* @__PURE__ */ s(
|
|
451
|
+
"button",
|
|
452
|
+
{
|
|
453
|
+
type: "button",
|
|
454
|
+
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors hover:bg-error-3",
|
|
455
|
+
"aria-label": "Delete file",
|
|
456
|
+
children: /* @__PURE__ */ s(ks, { className: "h-ico-sm w-ico-sm text-error-11" })
|
|
457
|
+
}
|
|
458
|
+
) }),
|
|
459
|
+
/* @__PURE__ */ r(Us, { children: [
|
|
460
|
+
/* @__PURE__ */ r(Xs, { children: [
|
|
461
|
+
/* @__PURE__ */ s(et, { children: "Delete file?" }),
|
|
462
|
+
/* @__PURE__ */ r(st, { children: [
|
|
463
|
+
'"',
|
|
464
|
+
e.title,
|
|
465
|
+
'" will be permanently deleted. This cannot be undone.'
|
|
466
|
+
] })
|
|
721
467
|
] }),
|
|
722
|
-
/* @__PURE__ */
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
468
|
+
/* @__PURE__ */ r(tt, { children: [
|
|
469
|
+
/* @__PURE__ */ s(pe, { asChild: !0, children: /* @__PURE__ */ s(he, { variant: "outline", size: "sm", children: "Cancel" }) }),
|
|
470
|
+
/* @__PURE__ */ s(pe, { asChild: !0, children: /* @__PURE__ */ s(
|
|
471
|
+
he,
|
|
472
|
+
{
|
|
473
|
+
variant: "solid",
|
|
474
|
+
color: "error",
|
|
475
|
+
size: "sm",
|
|
476
|
+
onClick: () => i(e.id),
|
|
477
|
+
children: "Delete"
|
|
478
|
+
}
|
|
479
|
+
) })
|
|
480
|
+
] })
|
|
726
481
|
] })
|
|
727
|
-
] }
|
|
728
|
-
})
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
482
|
+
] })
|
|
483
|
+
] })
|
|
484
|
+
]
|
|
485
|
+
}
|
|
486
|
+
);
|
|
487
|
+
}
|
|
488
|
+
);
|
|
489
|
+
je.displayName = "FileItem";
|
|
490
|
+
const ot = [
|
|
491
|
+
{ status: "APPROVED", label: "Approve", icon: xe },
|
|
492
|
+
{ status: "CHANGES_REQUESTED", label: "Request Changes", icon: Ne },
|
|
493
|
+
{ status: "REJECTED", label: "Reject", icon: Y }
|
|
494
|
+
], Be = c.forwardRef(
|
|
495
|
+
function({ reviewId: e, onSubmit: i, className: l, ...d }, u) {
|
|
496
|
+
const [f, m] = c.useState(""), [p, o] = c.useState(!1), x = (b) => {
|
|
497
|
+
i(e, b, f || void 0), m(""), o(!1);
|
|
498
|
+
};
|
|
499
|
+
return /* @__PURE__ */ s("div", { ref: u, className: h(l), ...d, children: p ? /* @__PURE__ */ r("div", { className: "space-y-ds-03", children: [
|
|
500
|
+
/* @__PURE__ */ s(
|
|
501
|
+
"textarea",
|
|
732
502
|
{
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
503
|
+
value: f,
|
|
504
|
+
onChange: (b) => m(b.target.value),
|
|
505
|
+
placeholder: "Add feedback (optional)...",
|
|
506
|
+
rows: 2,
|
|
507
|
+
className: "w-full resize-none rounded-ds-md border border-surface-border-strong bg-transparent px-ds-03 py-ds-03 text-ds-sm text-surface-fg placeholder:text-surface-fg-subtle outline-none focus:border-surface-border"
|
|
737
508
|
}
|
|
738
509
|
),
|
|
739
|
-
/* @__PURE__ */
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
510
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02b", children: [
|
|
511
|
+
ot.map((b) => {
|
|
512
|
+
const N = b.icon;
|
|
513
|
+
return /* @__PURE__ */ r(
|
|
514
|
+
"button",
|
|
515
|
+
{
|
|
516
|
+
type: "button",
|
|
517
|
+
onClick: () => x(b.status),
|
|
518
|
+
className: h(
|
|
519
|
+
"inline-flex items-center gap-ds-02 rounded-ds-md px-ds-03 py-ds-02 text-ds-sm font-semibold transition-colors",
|
|
520
|
+
b.status === "APPROVED" && "bg-success-3 text-success-11 hover:opacity-90",
|
|
521
|
+
b.status === "CHANGES_REQUESTED" && "bg-warning-3 text-warning-11 hover:opacity-90",
|
|
522
|
+
b.status === "REJECTED" && "bg-error-3 text-error-11 hover:opacity-90"
|
|
523
|
+
),
|
|
524
|
+
children: [
|
|
525
|
+
/* @__PURE__ */ s(N, { className: "h-3 w-3", stroke: 2 }),
|
|
526
|
+
b.label
|
|
527
|
+
]
|
|
528
|
+
},
|
|
529
|
+
b.status
|
|
530
|
+
);
|
|
531
|
+
}),
|
|
532
|
+
/* @__PURE__ */ s(
|
|
756
533
|
"button",
|
|
757
534
|
{
|
|
758
535
|
type: "button",
|
|
759
|
-
onClick:
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
children: [
|
|
763
|
-
/* @__PURE__ */ e(ps, { className: "h-ico-sm w-ico-sm", stroke: 2 }),
|
|
764
|
-
"Comment"
|
|
765
|
-
]
|
|
536
|
+
onClick: () => o(!1),
|
|
537
|
+
className: "ml-auto text-ds-sm text-surface-fg-subtle hover:text-surface-fg-muted",
|
|
538
|
+
children: "Cancel"
|
|
766
539
|
}
|
|
767
|
-
)
|
|
540
|
+
)
|
|
768
541
|
] })
|
|
769
|
-
] })
|
|
542
|
+
] }) : /* @__PURE__ */ s(
|
|
543
|
+
"button",
|
|
544
|
+
{
|
|
545
|
+
type: "button",
|
|
546
|
+
onClick: () => o(!0),
|
|
547
|
+
className: "text-ds-sm font-medium text-accent-11 transition-colors hover:underline",
|
|
548
|
+
children: "Respond"
|
|
549
|
+
}
|
|
550
|
+
) });
|
|
770
551
|
}
|
|
771
552
|
);
|
|
772
|
-
|
|
773
|
-
function
|
|
774
|
-
|
|
775
|
-
const s = n.toLowerCase();
|
|
776
|
-
return ["jpg", "jpeg", "png", "gif", "svg", "webp", "bmp"].includes(s) ? vs : ["pdf", "doc", "docx", "txt", "rtf"].includes(s) ? ys : ["js", "ts", "jsx", "tsx", "py", "rb", "go", "rs", "html", "css", "json"].includes(s) ? ws : ["xls", "xlsx", "csv"].includes(s) ? Is : ["zip", "tar", "gz", "rar", "7z"].includes(s) ? Cs : fe;
|
|
777
|
-
}
|
|
778
|
-
function Qs(n) {
|
|
779
|
-
return new Date(n).toLocaleDateString("en-IN", {
|
|
553
|
+
Be.displayName = "ReviewResponseForm";
|
|
554
|
+
function dt(t) {
|
|
555
|
+
return new Date(t).toLocaleDateString("en-IN", {
|
|
780
556
|
month: "short",
|
|
781
557
|
day: "numeric",
|
|
782
|
-
|
|
558
|
+
hour: "numeric",
|
|
559
|
+
minute: "2-digit"
|
|
783
560
|
});
|
|
784
561
|
}
|
|
785
|
-
const
|
|
786
|
-
function({
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
const c = (f = l.dataTransfer.files) == null ? void 0 : f[0];
|
|
803
|
-
c && g(c);
|
|
804
|
-
}, i = (l) => {
|
|
805
|
-
l.preventDefault(), N(!0);
|
|
806
|
-
}, v = () => {
|
|
807
|
-
N(!1);
|
|
808
|
-
};
|
|
809
|
-
return /* @__PURE__ */ t("div", { ref: x, className: p("flex flex-col", m), ...D, children: [
|
|
810
|
-
!y && /* @__PURE__ */ t(
|
|
811
|
-
"div",
|
|
812
|
-
{
|
|
813
|
-
role: "region",
|
|
814
|
-
"aria-label": "File upload drop zone",
|
|
815
|
-
onDrop: I,
|
|
816
|
-
onDragOver: i,
|
|
817
|
-
onDragLeave: v,
|
|
818
|
-
className: p(
|
|
819
|
-
"rounded-ds-lg border-2 border-dashed transition-colors",
|
|
820
|
-
C ? "border-accent-7 bg-accent-1" : "border-surface-border-strong"
|
|
821
|
-
),
|
|
822
|
-
children: [
|
|
823
|
-
/* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-ds-03 py-ds-06", children: [
|
|
824
|
-
/* @__PURE__ */ e("div", { className: "flex h-ds-sm-plus w-ds-sm-plus items-center justify-center rounded-ds-lg bg-surface-2", children: /* @__PURE__ */ e(
|
|
825
|
-
gs,
|
|
562
|
+
const He = c.forwardRef(
|
|
563
|
+
function({ review: e, onUpdateStatus: i, className: l, ...d }, u) {
|
|
564
|
+
const f = at[e.status];
|
|
565
|
+
return /* @__PURE__ */ r(
|
|
566
|
+
"div",
|
|
567
|
+
{
|
|
568
|
+
ref: u,
|
|
569
|
+
className: h(
|
|
570
|
+
"rounded-ds-lg border border-surface-border-strong bg-surface-1 shadow-01 p-ds-04",
|
|
571
|
+
l
|
|
572
|
+
),
|
|
573
|
+
...d,
|
|
574
|
+
children: [
|
|
575
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-ds-03", children: [
|
|
576
|
+
/* @__PURE__ */ r(F, { className: "h-ds-xs w-ds-xs shrink-0", children: [
|
|
577
|
+
e.reviewer.image && /* @__PURE__ */ s(
|
|
578
|
+
V,
|
|
826
579
|
{
|
|
827
|
-
|
|
828
|
-
|
|
580
|
+
src: e.reviewer.image,
|
|
581
|
+
alt: e.reviewer.name
|
|
829
582
|
}
|
|
830
|
-
)
|
|
831
|
-
/* @__PURE__ */
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
return (l = d.current) == null ? void 0 : l.click();
|
|
839
|
-
},
|
|
840
|
-
disabled: b,
|
|
841
|
-
className: "text-ds-md font-medium text-accent-11 transition-colors hover:underline disabled:opacity-action-disabled",
|
|
842
|
-
children: b ? "Uploading..." : "Click to upload"
|
|
843
|
-
}
|
|
844
|
-
),
|
|
845
|
-
/* @__PURE__ */ t("span", { className: "text-ds-md text-surface-fg-subtle", children: [
|
|
846
|
-
" ",
|
|
847
|
-
"or drag and drop"
|
|
848
|
-
] })
|
|
583
|
+
),
|
|
584
|
+
/* @__PURE__ */ s(j, { className: "bg-surface-3 text-ds-xs font-semibold text-accent-fg", children: H(e.reviewer.name) })
|
|
585
|
+
] }),
|
|
586
|
+
/* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: [
|
|
587
|
+
/* @__PURE__ */ s("span", { className: "text-ds-md font-medium text-surface-fg", children: e.reviewer.name }),
|
|
588
|
+
/* @__PURE__ */ r("span", { className: "ml-ds-03 text-ds-sm text-surface-fg-subtle", children: [
|
|
589
|
+
"requested by ",
|
|
590
|
+
e.requestedBy.name
|
|
849
591
|
] })
|
|
850
592
|
] }),
|
|
851
|
-
/* @__PURE__ */
|
|
852
|
-
|
|
593
|
+
/* @__PURE__ */ s(
|
|
594
|
+
Ys,
|
|
853
595
|
{
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
onChange: w,
|
|
857
|
-
className: "hidden"
|
|
596
|
+
color: f.color,
|
|
597
|
+
children: f.label
|
|
858
598
|
}
|
|
859
599
|
)
|
|
860
|
-
]
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
600
|
+
] }),
|
|
601
|
+
e.feedback && /* @__PURE__ */ s("div", { className: "mt-ds-03 rounded-ds-md bg-surface-2 px-ds-04 py-ds-03", children: /* @__PURE__ */ s("p", { className: "text-ds-sm text-surface-fg-muted", children: e.feedback }) }),
|
|
602
|
+
e.status === "PENDING" && i && /* @__PURE__ */ s("div", { className: "mt-ds-03", children: /* @__PURE__ */ s(
|
|
603
|
+
Be,
|
|
604
|
+
{
|
|
605
|
+
reviewId: e.id,
|
|
606
|
+
onSubmit: i
|
|
607
|
+
}
|
|
608
|
+
) }),
|
|
609
|
+
/* @__PURE__ */ s("p", { className: "mt-ds-03 text-ds-xs text-surface-fg-subtle", children: dt(e.createdAt) })
|
|
610
|
+
]
|
|
611
|
+
}
|
|
612
|
+
);
|
|
613
|
+
}
|
|
614
|
+
);
|
|
615
|
+
He.displayName = "ReviewCard";
|
|
616
|
+
const qe = c.forwardRef(
|
|
617
|
+
function({ members: e, onRequest: i, className: l, ...d }, u) {
|
|
618
|
+
const f = c.useMemo(
|
|
619
|
+
() => e.map((m) => ({ id: m.id, name: m.name, avatar: m.image ?? void 0 })),
|
|
620
|
+
[e]
|
|
621
|
+
);
|
|
622
|
+
return /* @__PURE__ */ s("div", { ref: u, className: h(l), ...d, children: /* @__PURE__ */ s(
|
|
623
|
+
X,
|
|
624
|
+
{
|
|
625
|
+
members: f,
|
|
626
|
+
selectedIds: [],
|
|
627
|
+
onSelect: (m) => i(m),
|
|
628
|
+
children: /* @__PURE__ */ r(
|
|
629
|
+
"button",
|
|
867
630
|
{
|
|
868
|
-
|
|
631
|
+
type: "button",
|
|
632
|
+
className: "mt-ds-04 inline-flex items-center gap-ds-02b rounded-ds-lg px-ds-03 py-ds-02b text-ds-md text-surface-fg-subtle transition-colors hover:bg-surface-3 hover:text-surface-fg-muted",
|
|
869
633
|
children: [
|
|
870
|
-
/* @__PURE__ */
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
/* @__PURE__ */ t("div", { className: "flex items-center gap-ds-02 opacity-0 transition-opacity group-hover:opacity-100", children: [
|
|
886
|
-
l.externalUrl && /* @__PURE__ */ e(
|
|
887
|
-
"a",
|
|
888
|
-
{
|
|
889
|
-
href: /^https?:\/\//.test(l.externalUrl) ? l.externalUrl : "#",
|
|
890
|
-
target: "_blank",
|
|
891
|
-
rel: "noopener noreferrer",
|
|
892
|
-
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors hover:bg-surface-2",
|
|
893
|
-
title: l.externalLabel ?? "Open externally",
|
|
894
|
-
children: /* @__PURE__ */ e(bs, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" })
|
|
895
|
-
}
|
|
896
|
-
),
|
|
897
|
-
l.downloadUrl && /* @__PURE__ */ e(
|
|
898
|
-
"a",
|
|
899
|
-
{
|
|
900
|
-
href: /^https?:\/\//.test(l.downloadUrl) ? l.downloadUrl : "#",
|
|
901
|
-
target: "_blank",
|
|
902
|
-
rel: "noopener noreferrer",
|
|
903
|
-
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors hover:bg-surface-2",
|
|
904
|
-
title: "Download",
|
|
905
|
-
children: /* @__PURE__ */ e(xs, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" })
|
|
906
|
-
}
|
|
907
|
-
),
|
|
908
|
-
!y && /* @__PURE__ */ t(Os, { children: [
|
|
909
|
-
/* @__PURE__ */ e(_s, { asChild: !0, children: /* @__PURE__ */ e(
|
|
910
|
-
"button",
|
|
911
|
-
{
|
|
912
|
-
type: "button",
|
|
913
|
-
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors hover:bg-error-3",
|
|
914
|
-
"aria-label": "Delete file",
|
|
915
|
-
children: /* @__PURE__ */ e(Ns, { className: "h-ico-sm w-ico-sm text-error-11" })
|
|
916
|
-
}
|
|
917
|
-
) }),
|
|
918
|
-
/* @__PURE__ */ t(Vs, { children: [
|
|
919
|
-
/* @__PURE__ */ t(js, { children: [
|
|
920
|
-
/* @__PURE__ */ e(Hs, { children: "Delete file?" }),
|
|
921
|
-
/* @__PURE__ */ t(Gs, { children: [
|
|
922
|
-
'"',
|
|
923
|
-
l.title,
|
|
924
|
-
'" will be permanently deleted. This cannot be undone.'
|
|
925
|
-
] })
|
|
926
|
-
] }),
|
|
927
|
-
/* @__PURE__ */ t($s, { children: [
|
|
928
|
-
/* @__PURE__ */ e(he, { asChild: !0, children: /* @__PURE__ */ e(pe, { variant: "outline", size: "sm", children: "Cancel" }) }),
|
|
929
|
-
/* @__PURE__ */ e(he, { asChild: !0, children: /* @__PURE__ */ e(
|
|
930
|
-
pe,
|
|
931
|
-
{
|
|
932
|
-
variant: "solid",
|
|
933
|
-
color: "error",
|
|
934
|
-
size: "sm",
|
|
935
|
-
onClick: () => h(l.id),
|
|
936
|
-
children: "Delete"
|
|
937
|
-
}
|
|
938
|
-
) })
|
|
939
|
-
] })
|
|
940
|
-
] })
|
|
941
|
-
] })
|
|
942
|
-
] })
|
|
943
|
-
]
|
|
944
|
-
},
|
|
945
|
-
l.id
|
|
946
|
-
);
|
|
947
|
-
}) }) : /* @__PURE__ */ e("div", { className: "mt-ds-03", children: /* @__PURE__ */ e(
|
|
948
|
-
F,
|
|
949
|
-
{
|
|
950
|
-
icon: /* @__PURE__ */ e(te, {}),
|
|
951
|
-
title: "No files attached",
|
|
952
|
-
description: "Upload files to share with your team",
|
|
953
|
-
compact: !0
|
|
954
|
-
}
|
|
955
|
-
) })
|
|
634
|
+
/* @__PURE__ */ s(B, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
|
|
635
|
+
"Request Review"
|
|
636
|
+
]
|
|
637
|
+
}
|
|
638
|
+
)
|
|
639
|
+
}
|
|
640
|
+
) });
|
|
641
|
+
}
|
|
642
|
+
);
|
|
643
|
+
qe.displayName = "ReviewRequestButton";
|
|
644
|
+
const Ge = c.forwardRef(
|
|
645
|
+
function({ children: e, className: i, ...l }, d) {
|
|
646
|
+
return /* @__PURE__ */ r("div", { ref: d, className: h("relative", i), ...l, children: [
|
|
647
|
+
/* @__PURE__ */ s("div", { className: "absolute left-[11px] top-2 bottom-2 w-px bg-surface-border" }),
|
|
648
|
+
/* @__PURE__ */ s("div", { className: "space-y-ds-05", children: e })
|
|
956
649
|
] });
|
|
957
650
|
}
|
|
958
651
|
);
|
|
959
|
-
|
|
960
|
-
const
|
|
652
|
+
Ge.displayName = "ActivityTimeline";
|
|
653
|
+
const ut = {
|
|
961
654
|
"task.created": {
|
|
962
|
-
icon:
|
|
655
|
+
icon: B,
|
|
963
656
|
color: "text-success-11",
|
|
964
657
|
dotColor: "bg-success-9",
|
|
965
658
|
getDescription: () => "created this task"
|
|
966
659
|
},
|
|
967
660
|
"task.updated": {
|
|
968
|
-
icon:
|
|
661
|
+
icon: qs,
|
|
969
662
|
color: "text-category-slate-11",
|
|
970
663
|
dotColor: "bg-category-slate-9",
|
|
971
|
-
getDescription: (
|
|
972
|
-
const
|
|
973
|
-
return (
|
|
664
|
+
getDescription: (t) => {
|
|
665
|
+
const e = t.metadata;
|
|
666
|
+
return (e == null ? void 0 : e.field) === "title" ? "updated the title" : (e == null ? void 0 : e.field) === "description" ? "updated the description" : (e == null ? void 0 : e.field) === "priority" ? `changed priority to ${(e == null ? void 0 : e.newValue) || "unknown"}` : (e == null ? void 0 : e.field) === "dueDate" ? "updated the due date" : (e == null ? void 0 : e.field) === "labels" ? "updated labels" : "updated this task";
|
|
974
667
|
}
|
|
975
668
|
},
|
|
976
669
|
"task.moved": {
|
|
977
|
-
icon:
|
|
670
|
+
icon: Hs,
|
|
978
671
|
color: "text-warning-11",
|
|
979
672
|
dotColor: "bg-warning-9",
|
|
980
|
-
getDescription: (
|
|
981
|
-
const
|
|
982
|
-
return `moved from ${
|
|
673
|
+
getDescription: (t) => {
|
|
674
|
+
const e = t.metadata, i = (e == null ? void 0 : e.fromColumn) || "unknown", l = (e == null ? void 0 : e.toColumn) || "unknown";
|
|
675
|
+
return `moved from ${i} to ${l}`;
|
|
983
676
|
}
|
|
984
677
|
},
|
|
985
678
|
"task.assigned": {
|
|
986
|
-
icon:
|
|
679
|
+
icon: Bs,
|
|
987
680
|
color: "text-category-cyan-11",
|
|
988
681
|
dotColor: "bg-category-cyan-9",
|
|
989
|
-
getDescription: (
|
|
990
|
-
const
|
|
991
|
-
return `assigned ${(
|
|
682
|
+
getDescription: (t) => {
|
|
683
|
+
const e = t.metadata;
|
|
684
|
+
return `assigned ${(e == null ? void 0 : e.assigneeName) || "a user"}`;
|
|
992
685
|
}
|
|
993
686
|
},
|
|
994
687
|
"task.unassigned": {
|
|
995
|
-
icon:
|
|
688
|
+
icon: js,
|
|
996
689
|
color: "text-surface-fg-muted",
|
|
997
690
|
dotColor: "bg-disabled",
|
|
998
|
-
getDescription: (
|
|
999
|
-
const
|
|
1000
|
-
return `removed ${(
|
|
691
|
+
getDescription: (t) => {
|
|
692
|
+
const e = t.metadata;
|
|
693
|
+
return `removed ${(e == null ? void 0 : e.assigneeName) || "a user"}`;
|
|
1001
694
|
}
|
|
1002
695
|
},
|
|
1003
696
|
"task.commented": {
|
|
1004
|
-
icon:
|
|
697
|
+
icon: Ne,
|
|
1005
698
|
color: "text-accent-11",
|
|
1006
699
|
dotColor: "bg-accent-9",
|
|
1007
700
|
getDescription: () => "added a comment"
|
|
1008
701
|
},
|
|
1009
702
|
"task.file_uploaded": {
|
|
1010
|
-
icon:
|
|
703
|
+
icon: se,
|
|
1011
704
|
color: "text-category-indigo-11",
|
|
1012
705
|
dotColor: "bg-category-indigo-9",
|
|
1013
|
-
getDescription: (
|
|
1014
|
-
const
|
|
1015
|
-
return `uploaded ${(
|
|
706
|
+
getDescription: (t) => {
|
|
707
|
+
const e = t.metadata;
|
|
708
|
+
return `uploaded ${(e == null ? void 0 : e.fileName) || "a file"}`;
|
|
1016
709
|
}
|
|
1017
710
|
},
|
|
1018
711
|
"task.review_requested": {
|
|
1019
|
-
icon:
|
|
712
|
+
icon: ee,
|
|
1020
713
|
color: "text-warning-11",
|
|
1021
714
|
dotColor: "bg-warning-9",
|
|
1022
|
-
getDescription: (
|
|
1023
|
-
const
|
|
1024
|
-
return `requested review from ${(
|
|
715
|
+
getDescription: (t) => {
|
|
716
|
+
const e = t.metadata;
|
|
717
|
+
return `requested review from ${(e == null ? void 0 : e.reviewerName) || "a reviewer"}`;
|
|
1025
718
|
}
|
|
1026
719
|
},
|
|
1027
720
|
"task.review_completed": {
|
|
1028
|
-
icon:
|
|
721
|
+
icon: Vs,
|
|
1029
722
|
color: "text-success-11",
|
|
1030
723
|
dotColor: "bg-success-9",
|
|
1031
|
-
getDescription: (
|
|
1032
|
-
const
|
|
1033
|
-
return `${(
|
|
724
|
+
getDescription: (t) => {
|
|
725
|
+
const e = t.metadata;
|
|
726
|
+
return `${(e == null ? void 0 : e.status) || "reviewed"} the task`;
|
|
1034
727
|
}
|
|
1035
728
|
},
|
|
1036
729
|
"task.visibility_changed": {
|
|
1037
|
-
icon:
|
|
730
|
+
icon: Ie,
|
|
1038
731
|
color: "text-surface-fg-subtle",
|
|
1039
732
|
dotColor: "bg-surface-fg-subtle",
|
|
1040
|
-
getDescription: (
|
|
1041
|
-
const
|
|
1042
|
-
return `changed visibility to ${(
|
|
733
|
+
getDescription: (t) => {
|
|
734
|
+
const e = t.metadata;
|
|
735
|
+
return `changed visibility to ${(e == null ? void 0 : e.visibility) || "unknown"}`;
|
|
1043
736
|
}
|
|
1044
737
|
},
|
|
1045
738
|
"task.priority_changed": {
|
|
1046
|
-
icon:
|
|
739
|
+
icon: we,
|
|
1047
740
|
color: "text-error-11",
|
|
1048
741
|
dotColor: "bg-error-9",
|
|
1049
|
-
getDescription: (
|
|
1050
|
-
const
|
|
1051
|
-
return `changed priority to ${(
|
|
742
|
+
getDescription: (t) => {
|
|
743
|
+
const e = t.metadata;
|
|
744
|
+
return `changed priority to ${(e == null ? void 0 : e.priority) || "unknown"}`;
|
|
1052
745
|
}
|
|
1053
746
|
},
|
|
1054
747
|
"task.labels_changed": {
|
|
@@ -1061,294 +754,779 @@ const Us = {
|
|
|
1061
754
|
icon: ve,
|
|
1062
755
|
color: "text-warning-11",
|
|
1063
756
|
dotColor: "bg-warning-9",
|
|
1064
|
-
getDescription: (
|
|
1065
|
-
const
|
|
1066
|
-
return
|
|
757
|
+
getDescription: (t) => {
|
|
758
|
+
const e = t.metadata;
|
|
759
|
+
return e != null && e.dueDate ? `set due date to ${e.dueDate}` : "updated the due date";
|
|
1067
760
|
}
|
|
1068
761
|
}
|
|
1069
|
-
},
|
|
1070
|
-
icon:
|
|
762
|
+
}, mt = {
|
|
763
|
+
icon: te,
|
|
1071
764
|
color: "text-surface-fg-subtle",
|
|
1072
765
|
dotColor: "bg-disabled",
|
|
1073
|
-
getDescription: (
|
|
766
|
+
getDescription: (t) => t.action
|
|
1074
767
|
};
|
|
1075
|
-
function
|
|
1076
|
-
const
|
|
1077
|
-
return
|
|
768
|
+
function ft(t) {
|
|
769
|
+
const e = t.metadata;
|
|
770
|
+
return e != null && e.actorName ? e.actorName : t.actorType === "SYSTEM" ? "System" : t.actorType === "AGENT" ? "AI Agent" : "Someone";
|
|
1078
771
|
}
|
|
1079
|
-
const
|
|
1080
|
-
function({
|
|
1081
|
-
|
|
1082
|
-
|
|
772
|
+
const $e = c.forwardRef(
|
|
773
|
+
function({ entry: e, className: i, ...l }, d) {
|
|
774
|
+
const u = ut[e.action] || mt, f = u.icon, m = ft(e), p = u.getDescription(e);
|
|
775
|
+
return /* @__PURE__ */ r("div", { ref: d, className: h("relative flex gap-ds-04 pl-0", i), ...l, children: [
|
|
776
|
+
/* @__PURE__ */ s("div", { className: "relative z-raised flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-ds-full bg-surface-1", children: /* @__PURE__ */ s(
|
|
777
|
+
"div",
|
|
778
|
+
{
|
|
779
|
+
className: h(
|
|
780
|
+
"flex h-ico-md w-ico-md items-center justify-center rounded-ds-full bg-surface-2"
|
|
781
|
+
),
|
|
782
|
+
children: /* @__PURE__ */ s(
|
|
783
|
+
f,
|
|
784
|
+
{
|
|
785
|
+
className: h("h-3 w-3", u.color),
|
|
786
|
+
stroke: 2
|
|
787
|
+
}
|
|
788
|
+
)
|
|
789
|
+
}
|
|
790
|
+
) }),
|
|
791
|
+
/* @__PURE__ */ r("div", { className: "flex-1 min-w-0 pt-ds-01", children: [
|
|
792
|
+
/* @__PURE__ */ r("p", { className: "text-ds-sm", children: [
|
|
793
|
+
/* @__PURE__ */ s("span", { className: "font-medium text-surface-fg", children: m }),
|
|
794
|
+
/* @__PURE__ */ r("span", { className: "text-surface-fg-subtle", children: [
|
|
795
|
+
" ",
|
|
796
|
+
p
|
|
797
|
+
] })
|
|
798
|
+
] }),
|
|
799
|
+
/* @__PURE__ */ s("p", { className: "mt-ds-01 text-ds-xs text-surface-fg-subtle", children: Le(e.timestamp) })
|
|
800
|
+
] })
|
|
801
|
+
] });
|
|
802
|
+
}
|
|
803
|
+
);
|
|
804
|
+
$e.displayName = "ActivityEntry";
|
|
805
|
+
const Me = c.forwardRef(
|
|
806
|
+
function({
|
|
807
|
+
subtasks: e,
|
|
808
|
+
terminalColumnId: i,
|
|
809
|
+
onCreateSubtask: l,
|
|
810
|
+
onToggleSubtask: d,
|
|
811
|
+
onClickSubtask: u,
|
|
812
|
+
className: f,
|
|
813
|
+
readOnly: m = !1,
|
|
814
|
+
...p
|
|
815
|
+
}, o) {
|
|
816
|
+
const x = e.filter(
|
|
817
|
+
(N) => {
|
|
818
|
+
var g;
|
|
819
|
+
return ((g = N.column) == null ? void 0 : g.isTerminal) || N.columnId === i;
|
|
820
|
+
}
|
|
821
|
+
).length, b = e.length;
|
|
822
|
+
return /* @__PURE__ */ r("div", { ref: o, className: h("flex flex-col", f), ...p, children: [
|
|
823
|
+
b > 0 && /* @__PURE__ */ s(Ee, { completed: x, total: b }),
|
|
824
|
+
e.length > 0 ? /* @__PURE__ */ s(Te, { children: e.map((N) => {
|
|
825
|
+
var v;
|
|
826
|
+
const g = ((v = N.column) == null ? void 0 : v.isTerminal) || N.columnId === i;
|
|
827
|
+
return /* @__PURE__ */ s(
|
|
828
|
+
Ae,
|
|
829
|
+
{
|
|
830
|
+
subtask: N,
|
|
831
|
+
isComplete: !!g,
|
|
832
|
+
onToggle: m ? void 0 : d,
|
|
833
|
+
onClick: u
|
|
834
|
+
},
|
|
835
|
+
N.id
|
|
836
|
+
);
|
|
837
|
+
}) }) : !m && /* @__PURE__ */ s(
|
|
838
|
+
q,
|
|
839
|
+
{
|
|
840
|
+
icon: /* @__PURE__ */ s(Ce, {}),
|
|
841
|
+
title: "No subtasks",
|
|
842
|
+
description: "Break this task into smaller pieces",
|
|
843
|
+
compact: !0
|
|
844
|
+
}
|
|
845
|
+
),
|
|
846
|
+
!m && /* @__PURE__ */ s(Se, { onCreate: l })
|
|
847
|
+
] });
|
|
848
|
+
}
|
|
849
|
+
);
|
|
850
|
+
Me.displayName = "SubtasksTab";
|
|
851
|
+
const ze = c.forwardRef(
|
|
852
|
+
function({
|
|
853
|
+
comments: e,
|
|
854
|
+
taskVisibility: i,
|
|
855
|
+
onPostComment: l,
|
|
856
|
+
className: d,
|
|
857
|
+
clientMode: u = !1,
|
|
858
|
+
richText: f = !0,
|
|
859
|
+
renderEditor: m,
|
|
860
|
+
renderViewer: p,
|
|
861
|
+
...o
|
|
862
|
+
}, x) {
|
|
863
|
+
const b = m ?? (f ? (g) => /* @__PURE__ */ s(
|
|
864
|
+
Ks,
|
|
865
|
+
{
|
|
866
|
+
content: g.content,
|
|
867
|
+
onChange: g.onChange,
|
|
868
|
+
placeholder: g.placeholder,
|
|
869
|
+
editable: !0,
|
|
870
|
+
className: "min-h-[80px]"
|
|
871
|
+
}
|
|
872
|
+
) : void 0), N = p ?? (f ? (g) => /* @__PURE__ */ s(Ws, { content: g.content, className: g.className }) : void 0);
|
|
873
|
+
return /* @__PURE__ */ r("div", { ref: x, className: h("flex flex-col", d), ...o, children: [
|
|
874
|
+
e.length > 0 ? /* @__PURE__ */ s(ke, { children: e.map((g) => /* @__PURE__ */ s(
|
|
875
|
+
Pe,
|
|
876
|
+
{
|
|
877
|
+
comment: g,
|
|
878
|
+
clientMode: u,
|
|
879
|
+
renderViewer: N
|
|
880
|
+
},
|
|
881
|
+
g.id
|
|
882
|
+
)) }) : /* @__PURE__ */ s(
|
|
883
|
+
q,
|
|
884
|
+
{
|
|
885
|
+
icon: /* @__PURE__ */ s(De, {}),
|
|
886
|
+
title: "No comments yet",
|
|
887
|
+
description: "Start a conversation about this task",
|
|
888
|
+
compact: !0
|
|
889
|
+
}
|
|
890
|
+
),
|
|
891
|
+
/* @__PURE__ */ r("div", { className: "mt-ds-05", children: [
|
|
892
|
+
i === "EVERYONE" && !u && /* @__PURE__ */ s(_e, { className: "mb-ds-03" }),
|
|
893
|
+
/* @__PURE__ */ s(
|
|
894
|
+
Oe,
|
|
895
|
+
{
|
|
896
|
+
onSubmit: l,
|
|
897
|
+
renderEditor: b,
|
|
898
|
+
clientMode: u
|
|
899
|
+
}
|
|
900
|
+
)
|
|
901
|
+
] })
|
|
902
|
+
] });
|
|
903
|
+
}
|
|
904
|
+
);
|
|
905
|
+
ze.displayName = "ConversationTab";
|
|
906
|
+
const Ye = c.forwardRef(
|
|
907
|
+
function({
|
|
908
|
+
files: e,
|
|
909
|
+
onUpload: i,
|
|
910
|
+
onDelete: l,
|
|
911
|
+
isUploading: d = !1,
|
|
912
|
+
className: u,
|
|
913
|
+
readOnly: f = !1,
|
|
914
|
+
...m
|
|
915
|
+
}, p) {
|
|
916
|
+
return /* @__PURE__ */ r("div", { ref: p, className: h("flex flex-col", u), ...m, children: [
|
|
917
|
+
!f && /* @__PURE__ */ s(Fe, { onUpload: i, isUploading: d }),
|
|
918
|
+
e.length > 0 ? /* @__PURE__ */ s(Ve, { className: "mt-ds-05", children: e.map((o) => /* @__PURE__ */ s(
|
|
919
|
+
je,
|
|
920
|
+
{
|
|
921
|
+
file: o,
|
|
922
|
+
onDelete: l,
|
|
923
|
+
readOnly: f
|
|
924
|
+
},
|
|
925
|
+
o.id
|
|
926
|
+
)) }) : /* @__PURE__ */ s("div", { className: "mt-ds-03", children: /* @__PURE__ */ s(
|
|
927
|
+
q,
|
|
928
|
+
{
|
|
929
|
+
icon: /* @__PURE__ */ s(se, {}),
|
|
930
|
+
title: "No files attached",
|
|
931
|
+
description: "Upload files to share with your team",
|
|
932
|
+
compact: !0
|
|
933
|
+
}
|
|
934
|
+
) })
|
|
935
|
+
] });
|
|
936
|
+
}
|
|
937
|
+
);
|
|
938
|
+
Ye.displayName = "FilesTab";
|
|
939
|
+
const We = c.forwardRef(
|
|
940
|
+
function({
|
|
941
|
+
reviews: e,
|
|
942
|
+
members: i,
|
|
943
|
+
onRequestReview: l,
|
|
944
|
+
onUpdateStatus: d,
|
|
945
|
+
className: u,
|
|
946
|
+
readOnly: f = !1,
|
|
947
|
+
...m
|
|
948
|
+
}, p) {
|
|
949
|
+
return /* @__PURE__ */ r("div", { ref: p, className: h("flex flex-col", u), ...m, children: [
|
|
950
|
+
e.length > 0 ? /* @__PURE__ */ s("div", { className: "space-y-ds-04", children: e.map((o) => /* @__PURE__ */ s(
|
|
951
|
+
He,
|
|
952
|
+
{
|
|
953
|
+
review: o,
|
|
954
|
+
onUpdateStatus: f ? void 0 : d
|
|
955
|
+
},
|
|
956
|
+
o.id
|
|
957
|
+
)) }) : /* @__PURE__ */ s(
|
|
958
|
+
q,
|
|
959
|
+
{
|
|
960
|
+
icon: /* @__PURE__ */ s(ee, {}),
|
|
961
|
+
title: "No reviews yet",
|
|
962
|
+
description: "Request a review from a team member",
|
|
963
|
+
compact: !0
|
|
964
|
+
}
|
|
965
|
+
),
|
|
966
|
+
!f && /* @__PURE__ */ s(
|
|
967
|
+
qe,
|
|
968
|
+
{
|
|
969
|
+
members: i,
|
|
970
|
+
onRequest: l
|
|
971
|
+
}
|
|
972
|
+
)
|
|
973
|
+
] });
|
|
974
|
+
}
|
|
975
|
+
);
|
|
976
|
+
We.displayName = "ReviewTab";
|
|
977
|
+
const Ke = c.forwardRef(
|
|
978
|
+
function({ activities: e, className: i, ...l }, d) {
|
|
979
|
+
return e.length === 0 ? /* @__PURE__ */ s(
|
|
980
|
+
q,
|
|
1083
981
|
{
|
|
1084
|
-
ref:
|
|
1085
|
-
icon: /* @__PURE__ */
|
|
982
|
+
ref: d,
|
|
983
|
+
icon: /* @__PURE__ */ s(te, {}),
|
|
1086
984
|
title: "No activity yet",
|
|
1087
985
|
description: "Actions on this task will appear here",
|
|
1088
986
|
compact: !0,
|
|
1089
|
-
className:
|
|
1090
|
-
...
|
|
987
|
+
className: i,
|
|
988
|
+
...l
|
|
1091
989
|
}
|
|
1092
|
-
) : /* @__PURE__ */
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
990
|
+
) : /* @__PURE__ */ s(Ge, { ref: d, className: h(i), ...l, children: e.map((u) => /* @__PURE__ */ s($e, { entry: u }, u.id)) });
|
|
991
|
+
}
|
|
992
|
+
);
|
|
993
|
+
Ke.displayName = "ActivityTab";
|
|
994
|
+
const pt = ["LOW", "MEDIUM", "HIGH", "URGENT"];
|
|
995
|
+
function S({
|
|
996
|
+
icon: t,
|
|
997
|
+
label: e,
|
|
998
|
+
children: i,
|
|
999
|
+
className: l
|
|
1000
|
+
}) {
|
|
1001
|
+
return /* @__PURE__ */ r(
|
|
1002
|
+
"div",
|
|
1003
|
+
{
|
|
1004
|
+
className: h(
|
|
1005
|
+
"flex items-center gap-ds-04 py-ds-03",
|
|
1006
|
+
l
|
|
1007
|
+
),
|
|
1008
|
+
children: [
|
|
1009
|
+
/* @__PURE__ */ r("div", { className: "flex w-[120px] shrink-0 items-center gap-ds-03 text-surface-fg-subtle", children: [
|
|
1010
|
+
/* @__PURE__ */ s(t, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
|
|
1011
|
+
/* @__PURE__ */ s("span", { className: "text-ds-sm", children: e })
|
|
1012
|
+
] }),
|
|
1013
|
+
/* @__PURE__ */ s("div", { className: "flex-1 min-w-0", children: i })
|
|
1014
|
+
]
|
|
1015
|
+
}
|
|
1016
|
+
);
|
|
1017
|
+
}
|
|
1018
|
+
function ht({ priority: t }) {
|
|
1019
|
+
return /* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02b", children: [
|
|
1020
|
+
/* @__PURE__ */ s("div", { className: h("h-2 w-2 rounded-ds-full", Re[t]) }),
|
|
1021
|
+
/* @__PURE__ */ s("span", { className: "text-ds-md text-surface-fg", children: rt[t] || t })
|
|
1022
|
+
] });
|
|
1023
|
+
}
|
|
1024
|
+
const Ze = c.forwardRef(
|
|
1025
|
+
function({
|
|
1026
|
+
task: e,
|
|
1027
|
+
columns: i,
|
|
1028
|
+
members: l,
|
|
1029
|
+
onUpdate: d,
|
|
1030
|
+
onAssign: u,
|
|
1031
|
+
onUnassign: f,
|
|
1032
|
+
className: m,
|
|
1033
|
+
readOnly: p = !1,
|
|
1034
|
+
editableFields: o,
|
|
1035
|
+
renderPriorityIndicator: x,
|
|
1036
|
+
renderDatePicker: b,
|
|
1037
|
+
onConfirmVisibilityChange: N,
|
|
1038
|
+
...g
|
|
1039
|
+
}, v) {
|
|
1040
|
+
const [w, y] = c.useState(""), [k, C] = c.useState(!1), R = e.assignees.map((n) => n.user.id), E = c.useMemo(
|
|
1041
|
+
() => l.map((n) => ({ id: n.id, name: n.name, avatar: n.image ?? void 0 })),
|
|
1042
|
+
[l]
|
|
1043
|
+
), L = (n) => {
|
|
1044
|
+
d("columnId", n);
|
|
1045
|
+
}, P = (n) => {
|
|
1046
|
+
d("ownerId", n === e.ownerId ? null : n);
|
|
1047
|
+
}, re = (n) => {
|
|
1048
|
+
R.includes(n) ? f(n) : u(n);
|
|
1049
|
+
}, O = (n) => {
|
|
1050
|
+
d("priority", n);
|
|
1051
|
+
}, D = (n) => {
|
|
1052
|
+
d("dueDate", n ? n.toISOString() : null);
|
|
1053
|
+
}, G = () => {
|
|
1054
|
+
const n = w.trim();
|
|
1055
|
+
n && !e.labels.includes(n) && d("labels", [...e.labels, n]), y(""), C(!1);
|
|
1056
|
+
}, W = (n) => {
|
|
1057
|
+
d("labels", e.labels.filter((Z) => Z !== n));
|
|
1058
|
+
}, K = () => {
|
|
1059
|
+
const n = e.visibility === "INTERNAL" ? "EVERYONE" : "INTERNAL";
|
|
1060
|
+
if (n === "EVERYONE" && N) {
|
|
1061
|
+
N();
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1064
|
+
d("visibility", n);
|
|
1065
|
+
}, $ = x || ht;
|
|
1066
|
+
return /* @__PURE__ */ r("div", { ref: v, className: h("space-y-ds-01", m), ...g, children: [
|
|
1067
|
+
/* @__PURE__ */ s(S, { icon: Gs, label: "Column", children: p && !(o != null && o.includes("columnId")) ? /* @__PURE__ */ s("span", { className: "px-ds-03 py-ds-02 text-ds-md text-surface-fg", children: e.column.name }) : /* @__PURE__ */ r(de, { children: [
|
|
1068
|
+
/* @__PURE__ */ s(ue, { asChild: !0, children: /* @__PURE__ */ r(
|
|
1069
|
+
"button",
|
|
1070
|
+
{
|
|
1071
|
+
type: "button",
|
|
1072
|
+
className: "inline-flex items-center gap-ds-02b rounded-ds-md px-ds-03 py-ds-02 text-ds-md text-surface-fg transition-colors hover:bg-surface-3",
|
|
1073
|
+
children: [
|
|
1074
|
+
/* @__PURE__ */ s("span", { children: e.column.name }),
|
|
1075
|
+
/* @__PURE__ */ s($s, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
1076
|
+
]
|
|
1077
|
+
}
|
|
1078
|
+
) }),
|
|
1079
|
+
/* @__PURE__ */ s(
|
|
1080
|
+
me,
|
|
1081
|
+
{
|
|
1082
|
+
className: "w-[180px] border-surface-border-strong bg-surface-1 p-ds-02",
|
|
1083
|
+
align: "start",
|
|
1084
|
+
sideOffset: 4,
|
|
1085
|
+
children: i.map((n) => /* @__PURE__ */ r(
|
|
1086
|
+
"button",
|
|
1087
|
+
{
|
|
1088
|
+
type: "button",
|
|
1089
|
+
onClick: () => L(n.id),
|
|
1090
|
+
className: h(
|
|
1091
|
+
"flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-left text-ds-md transition-colors",
|
|
1092
|
+
"hover:bg-surface-3",
|
|
1093
|
+
n.id === e.columnId ? "text-accent-11" : "text-surface-fg"
|
|
1094
|
+
),
|
|
1095
|
+
children: [
|
|
1096
|
+
n.name,
|
|
1097
|
+
n.id === e.columnId && /* @__PURE__ */ s(xe, { className: "ml-auto h-ico-sm w-ico-sm" })
|
|
1098
|
+
]
|
|
1099
|
+
},
|
|
1100
|
+
n.id
|
|
1101
|
+
))
|
|
1102
|
+
}
|
|
1103
|
+
)
|
|
1104
|
+
] }) }),
|
|
1105
|
+
!p && /* @__PURE__ */ s(S, { icon: Ms, label: "Owner", children: /* @__PURE__ */ s(
|
|
1106
|
+
X,
|
|
1107
|
+
{
|
|
1108
|
+
members: E,
|
|
1109
|
+
selectedIds: e.ownerId ? [e.ownerId] : [],
|
|
1110
|
+
onSelect: P,
|
|
1111
|
+
children: /* @__PURE__ */ s(
|
|
1112
|
+
"button",
|
|
1099
1113
|
{
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1114
|
+
type: "button",
|
|
1115
|
+
className: "inline-flex items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-surface-3",
|
|
1116
|
+
children: e.owner ? /* @__PURE__ */ r(ge, { children: [
|
|
1117
|
+
/* @__PURE__ */ r(F, { className: "h-ico-md w-ico-md", children: [
|
|
1118
|
+
e.owner.image && /* @__PURE__ */ s(V, { src: e.owner.image, alt: e.owner.name }),
|
|
1119
|
+
/* @__PURE__ */ s(j, { className: "bg-surface-3 text-ds-xs font-semibold text-accent-fg", children: H(e.owner.name) })
|
|
1120
|
+
] }),
|
|
1121
|
+
/* @__PURE__ */ s("span", { className: "text-ds-md text-surface-fg", children: e.owner.name })
|
|
1122
|
+
] }) : /* @__PURE__ */ s("span", { className: "text-ds-md text-surface-fg-subtle", children: "No owner" })
|
|
1123
|
+
}
|
|
1124
|
+
)
|
|
1125
|
+
}
|
|
1126
|
+
) }),
|
|
1127
|
+
/* @__PURE__ */ s(S, { icon: zs, label: "Assignees", children: /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-ds-02b", children: [
|
|
1128
|
+
e.assignees.map((n) => /* @__PURE__ */ r(
|
|
1129
|
+
"div",
|
|
1130
|
+
{
|
|
1131
|
+
className: "inline-flex items-center gap-ds-02 rounded-ds-full bg-surface-2 py-ds-01 pl-ds-01 pr-ds-03",
|
|
1132
|
+
children: [
|
|
1133
|
+
/* @__PURE__ */ r(F, { className: "h-ico-sm w-ico-sm", children: [
|
|
1134
|
+
n.user.image && /* @__PURE__ */ s(V, { src: n.user.image, alt: n.user.name }),
|
|
1135
|
+
/* @__PURE__ */ s(j, { className: "bg-surface-3 text-ds-xs font-semibold text-accent-fg", children: H(n.user.name) })
|
|
1136
|
+
] }),
|
|
1137
|
+
/* @__PURE__ */ s("span", { className: "text-ds-sm text-surface-fg-muted", children: n.user.name.split(" ")[0] }),
|
|
1138
|
+
!p && /* @__PURE__ */ s(
|
|
1139
|
+
"button",
|
|
1105
1140
|
{
|
|
1106
|
-
|
|
1107
|
-
|
|
1141
|
+
type: "button",
|
|
1142
|
+
onClick: () => f(n.user.id),
|
|
1143
|
+
className: "ml-ds-01 rounded-ds-full p-ds-01 transition-colors hover:bg-surface-3",
|
|
1144
|
+
"aria-label": `Remove ${n.user.name}`,
|
|
1145
|
+
children: /* @__PURE__ */ s(Y, { className: "h-ds-03 w-ds-03 text-surface-fg-subtle" })
|
|
1108
1146
|
}
|
|
1109
1147
|
)
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1148
|
+
]
|
|
1149
|
+
},
|
|
1150
|
+
n.user.id
|
|
1151
|
+
)),
|
|
1152
|
+
!p && /* @__PURE__ */ s(
|
|
1153
|
+
X,
|
|
1154
|
+
{
|
|
1155
|
+
members: E,
|
|
1156
|
+
selectedIds: R,
|
|
1157
|
+
onSelect: re,
|
|
1158
|
+
multiple: !0,
|
|
1159
|
+
children: /* @__PURE__ */ s(
|
|
1160
|
+
"button",
|
|
1161
|
+
{
|
|
1162
|
+
type: "button",
|
|
1163
|
+
className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded-ds-full border border-dashed border-surface-border transition-colors hover:bg-surface-3 hover:border-surface-border",
|
|
1164
|
+
"aria-label": "Add assignee",
|
|
1165
|
+
children: /* @__PURE__ */ s(B, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
1166
|
+
}
|
|
1167
|
+
)
|
|
1168
|
+
}
|
|
1169
|
+
),
|
|
1170
|
+
p && e.assignees.length === 0 && /* @__PURE__ */ s("span", { className: "text-ds-md text-surface-fg-subtle", children: "None" })
|
|
1171
|
+
] }) }),
|
|
1172
|
+
/* @__PURE__ */ s(S, { icon: we, label: "Priority", children: /* @__PURE__ */ r(de, { children: [
|
|
1173
|
+
/* @__PURE__ */ s(ue, { asChild: !0, children: /* @__PURE__ */ s(
|
|
1174
|
+
"button",
|
|
1175
|
+
{
|
|
1176
|
+
type: "button",
|
|
1177
|
+
className: "rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-surface-3",
|
|
1178
|
+
children: /* @__PURE__ */ s($, { priority: e.priority })
|
|
1179
|
+
}
|
|
1180
|
+
) }),
|
|
1181
|
+
/* @__PURE__ */ s(
|
|
1182
|
+
me,
|
|
1183
|
+
{
|
|
1184
|
+
className: "w-[160px] border-surface-border-strong bg-surface-1 p-ds-02",
|
|
1185
|
+
align: "start",
|
|
1186
|
+
sideOffset: 4,
|
|
1187
|
+
children: pt.map((n) => /* @__PURE__ */ s(
|
|
1188
|
+
"button",
|
|
1189
|
+
{
|
|
1190
|
+
type: "button",
|
|
1191
|
+
onClick: () => O(n),
|
|
1192
|
+
className: h(
|
|
1193
|
+
"flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b transition-colors",
|
|
1194
|
+
"hover:bg-surface-3",
|
|
1195
|
+
n === e.priority && "bg-surface-3"
|
|
1196
|
+
),
|
|
1197
|
+
children: /* @__PURE__ */ s($, { priority: n })
|
|
1198
|
+
},
|
|
1199
|
+
n
|
|
1200
|
+
))
|
|
1201
|
+
}
|
|
1202
|
+
)
|
|
1203
|
+
] }) }),
|
|
1204
|
+
/* @__PURE__ */ s(S, { icon: ve, label: "Due Date", children: /* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02", children: [
|
|
1205
|
+
b ? b({
|
|
1206
|
+
value: e.dueDate ? new Date(e.dueDate) : null,
|
|
1207
|
+
onChange: D,
|
|
1208
|
+
placeholder: "No due date",
|
|
1209
|
+
className: "h-ds-xs-plus border-none bg-transparent px-ds-03 text-ds-md hover:bg-surface-3"
|
|
1210
|
+
}) : /* @__PURE__ */ s(
|
|
1211
|
+
"input",
|
|
1212
|
+
{
|
|
1213
|
+
type: "date",
|
|
1214
|
+
value: e.dueDate ? new Date(e.dueDate).toISOString().split("T")[0] : "",
|
|
1215
|
+
onChange: (n) => D(n.target.value ? new Date(n.target.value) : null),
|
|
1216
|
+
"aria-label": "Due date",
|
|
1217
|
+
className: "h-ds-xs-plus border-none bg-transparent px-ds-03 text-ds-md text-surface-fg outline-none hover:bg-surface-3 rounded-ds-md"
|
|
1218
|
+
}
|
|
1219
|
+
),
|
|
1220
|
+
e.dueDate && /* @__PURE__ */ s(
|
|
1221
|
+
"button",
|
|
1222
|
+
{
|
|
1223
|
+
type: "button",
|
|
1224
|
+
onClick: () => D(null),
|
|
1225
|
+
className: "rounded-ds-md p-ds-02 transition-colors hover:bg-surface-3",
|
|
1226
|
+
"aria-label": "Clear due date",
|
|
1227
|
+
children: /* @__PURE__ */ s(Y, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
1228
|
+
}
|
|
1229
|
+
)
|
|
1230
|
+
] }) }),
|
|
1231
|
+
/* @__PURE__ */ s(S, { icon: ye, label: "Labels", children: /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-ds-02b", children: [
|
|
1232
|
+
e.labels.map((n) => /* @__PURE__ */ r(
|
|
1233
|
+
"span",
|
|
1234
|
+
{
|
|
1235
|
+
className: "inline-flex items-center gap-ds-02 rounded-ds-full bg-accent-2 px-ds-03 py-ds-01 text-ds-sm font-medium text-accent-11",
|
|
1236
|
+
children: [
|
|
1237
|
+
n,
|
|
1238
|
+
!p && /* @__PURE__ */ s(
|
|
1239
|
+
"button",
|
|
1240
|
+
{
|
|
1241
|
+
type: "button",
|
|
1242
|
+
onClick: () => W(n),
|
|
1243
|
+
className: "rounded-ds-full p-ds-01 transition-colors hover:bg-surface-3",
|
|
1244
|
+
"aria-label": `Remove label ${n}`,
|
|
1245
|
+
children: /* @__PURE__ */ s(Y, { className: "h-ds-03 w-ds-03" })
|
|
1246
|
+
}
|
|
1247
|
+
)
|
|
1248
|
+
]
|
|
1249
|
+
},
|
|
1250
|
+
n
|
|
1251
|
+
)),
|
|
1252
|
+
!p && (k ? /* @__PURE__ */ s("div", { className: "inline-flex items-center gap-ds-02", children: /* @__PURE__ */ s(
|
|
1253
|
+
"input",
|
|
1254
|
+
{
|
|
1255
|
+
type: "text",
|
|
1256
|
+
value: w,
|
|
1257
|
+
onChange: (n) => y(n.target.value),
|
|
1258
|
+
"aria-label": "New label name",
|
|
1259
|
+
onKeyDown: (n) => {
|
|
1260
|
+
n.key === "Enter" && G(), n.key === "Escape" && (C(!1), y(""));
|
|
1261
|
+
},
|
|
1262
|
+
onBlur: G,
|
|
1263
|
+
placeholder: "Label name",
|
|
1264
|
+
className: "h-5 w-20 rounded border border-surface-border-strong bg-transparent px-ds-02b text-ds-sm text-surface-fg outline-none placeholder:text-surface-fg-subtle focus:border-surface-border",
|
|
1265
|
+
autoFocus: !0
|
|
1266
|
+
}
|
|
1267
|
+
) }) : /* @__PURE__ */ s(
|
|
1268
|
+
"button",
|
|
1269
|
+
{
|
|
1270
|
+
type: "button",
|
|
1271
|
+
onClick: () => C(!0),
|
|
1272
|
+
className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded-ds-full border border-dashed border-surface-border transition-colors hover:bg-surface-3 hover:border-surface-border",
|
|
1273
|
+
"aria-label": "Add label",
|
|
1274
|
+
children: /* @__PURE__ */ s(B, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
1275
|
+
}
|
|
1276
|
+
)),
|
|
1277
|
+
p && e.labels.length === 0 && /* @__PURE__ */ s("span", { className: "text-ds-md text-surface-fg-subtle", children: "None" })
|
|
1278
|
+
] }) }),
|
|
1279
|
+
!p && /* @__PURE__ */ s(S, { icon: Ie, label: "Visibility", children: /* @__PURE__ */ r(
|
|
1280
|
+
"button",
|
|
1281
|
+
{
|
|
1282
|
+
type: "button",
|
|
1283
|
+
onClick: K,
|
|
1284
|
+
className: h(
|
|
1285
|
+
"inline-flex items-center gap-ds-02b rounded-ds-full px-ds-03 py-ds-01 text-ds-sm font-semibold tracking-wide transition-colors",
|
|
1286
|
+
e.visibility === "EVERYONE" ? "bg-success-3 text-success-11" : "bg-surface-2 text-surface-fg-subtle"
|
|
1287
|
+
),
|
|
1288
|
+
children: [
|
|
1289
|
+
/* @__PURE__ */ s(
|
|
1290
|
+
"span",
|
|
1291
|
+
{
|
|
1292
|
+
className: h(
|
|
1293
|
+
"h-ds-02b w-ds-02b rounded-ds-full",
|
|
1294
|
+
e.visibility === "EVERYONE" ? "bg-success-9" : "bg-disabled"
|
|
1295
|
+
)
|
|
1296
|
+
}
|
|
1297
|
+
),
|
|
1298
|
+
e.visibility === "EVERYONE" ? "Everyone" : "Internal"
|
|
1299
|
+
]
|
|
1300
|
+
}
|
|
1301
|
+
) })
|
|
1124
1302
|
] });
|
|
1125
1303
|
}
|
|
1126
1304
|
);
|
|
1127
|
-
|
|
1128
|
-
const
|
|
1129
|
-
{ id: "subtasks", label: "Subtasks", icon:
|
|
1130
|
-
{ id: "review", label: "Review", icon:
|
|
1305
|
+
Ze.displayName = "TaskProperties";
|
|
1306
|
+
const be = [
|
|
1307
|
+
{ id: "subtasks", label: "Subtasks", icon: Ce },
|
|
1308
|
+
{ id: "review", label: "Review", icon: ee },
|
|
1131
1309
|
{ id: "conversation", label: "Conversation", icon: De },
|
|
1132
|
-
{ id: "files", label: "Files", icon:
|
|
1133
|
-
{ id: "activity", label: "Activity", icon:
|
|
1310
|
+
{ id: "files", label: "Files", icon: se },
|
|
1311
|
+
{ id: "activity", label: "Activity", icon: te }
|
|
1134
1312
|
];
|
|
1135
|
-
function
|
|
1136
|
-
return /* @__PURE__ */
|
|
1137
|
-
/* @__PURE__ */
|
|
1138
|
-
/* @__PURE__ */
|
|
1139
|
-
/* @__PURE__ */
|
|
1140
|
-
/* @__PURE__ */
|
|
1141
|
-
] },
|
|
1142
|
-
/* @__PURE__ */
|
|
1143
|
-
/* @__PURE__ */
|
|
1144
|
-
/* @__PURE__ */
|
|
1145
|
-
/* @__PURE__ */
|
|
1146
|
-
/* @__PURE__ */
|
|
1313
|
+
function bt() {
|
|
1314
|
+
return /* @__PURE__ */ r("div", { className: "space-y-ds-06 p-ds-06", children: [
|
|
1315
|
+
/* @__PURE__ */ s(A, { className: "h-ds-xs-plus w-3/4 bg-surface-3" }),
|
|
1316
|
+
/* @__PURE__ */ s("div", { className: "space-y-ds-04", children: Array.from({ length: 6 }).map((t, e) => /* @__PURE__ */ r("div", { className: "flex items-center gap-ds-04", children: [
|
|
1317
|
+
/* @__PURE__ */ s(A, { className: "h-[16px] w-[120px] bg-surface-3" }),
|
|
1318
|
+
/* @__PURE__ */ s(A, { className: "h-[16px] flex-1 bg-surface-3" })
|
|
1319
|
+
] }, e)) }),
|
|
1320
|
+
/* @__PURE__ */ s("div", { className: "flex gap-ds-05 border-b border-surface-border-strong pb-ds-03", children: Array.from({ length: 5 }).map((t, e) => /* @__PURE__ */ s(A, { className: "h-[12px] w-[64px] bg-surface-3" }, e)) }),
|
|
1321
|
+
/* @__PURE__ */ r("div", { className: "space-y-ds-04", children: [
|
|
1322
|
+
/* @__PURE__ */ s(A, { className: "h-ds-md w-full bg-surface-3" }),
|
|
1323
|
+
/* @__PURE__ */ s(A, { className: "h-ds-md w-full bg-surface-3" }),
|
|
1324
|
+
/* @__PURE__ */ s(A, { className: "h-ds-md w-4/5 bg-surface-3" })
|
|
1147
1325
|
] })
|
|
1148
1326
|
] });
|
|
1149
1327
|
}
|
|
1150
|
-
const
|
|
1151
|
-
task:
|
|
1152
|
-
loading:
|
|
1153
|
-
open:
|
|
1154
|
-
onOpenChange:
|
|
1155
|
-
columns:
|
|
1156
|
-
members:
|
|
1157
|
-
activities:
|
|
1158
|
-
enrichedComments:
|
|
1159
|
-
clientMode:
|
|
1160
|
-
clientEditableFields:
|
|
1161
|
-
headerSlot:
|
|
1162
|
-
extraTabs:
|
|
1163
|
-
onTitleUpdate:
|
|
1164
|
-
onPropertyUpdate:
|
|
1165
|
-
onAssign:
|
|
1166
|
-
onUnassign:
|
|
1167
|
-
onCreateSubtask:
|
|
1168
|
-
onToggleSubtask:
|
|
1169
|
-
onRequestReview:
|
|
1328
|
+
const gt = c.forwardRef(function({
|
|
1329
|
+
task: e,
|
|
1330
|
+
loading: i = !1,
|
|
1331
|
+
open: l,
|
|
1332
|
+
onOpenChange: d,
|
|
1333
|
+
columns: u,
|
|
1334
|
+
members: f,
|
|
1335
|
+
activities: m = [],
|
|
1336
|
+
enrichedComments: p,
|
|
1337
|
+
clientMode: o = !1,
|
|
1338
|
+
clientEditableFields: x = ["priority", "dueDate"],
|
|
1339
|
+
headerSlot: b,
|
|
1340
|
+
extraTabs: N = [],
|
|
1341
|
+
onTitleUpdate: g,
|
|
1342
|
+
onPropertyUpdate: v,
|
|
1343
|
+
onAssign: w,
|
|
1344
|
+
onUnassign: y,
|
|
1345
|
+
onCreateSubtask: k,
|
|
1346
|
+
onToggleSubtask: C,
|
|
1347
|
+
onRequestReview: R,
|
|
1170
1348
|
onUpdateReviewStatus: E,
|
|
1171
|
-
onPostComment:
|
|
1172
|
-
onUploadFile:
|
|
1173
|
-
onUploadDeliverable:
|
|
1174
|
-
onDeleteFile:
|
|
1175
|
-
onTabChange:
|
|
1176
|
-
renderEditor:
|
|
1177
|
-
renderViewer:
|
|
1178
|
-
renderPriorityIndicator:
|
|
1179
|
-
renderDatePicker:
|
|
1180
|
-
isUploading:
|
|
1181
|
-
className:
|
|
1182
|
-
...
|
|
1183
|
-
},
|
|
1184
|
-
var
|
|
1185
|
-
const [
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
}, [
|
|
1189
|
-
|
|
1190
|
-
}, [
|
|
1191
|
-
const
|
|
1192
|
-
ae(
|
|
1193
|
-
}, [
|
|
1194
|
-
|
|
1195
|
-
}, [
|
|
1196
|
-
|
|
1197
|
-
}, [
|
|
1198
|
-
|
|
1199
|
-
}, [
|
|
1200
|
-
|
|
1201
|
-
}, [
|
|
1202
|
-
|
|
1203
|
-
}, [
|
|
1204
|
-
|
|
1205
|
-
}, [
|
|
1206
|
-
E == null || E(
|
|
1207
|
-
}, [E]),
|
|
1208
|
-
|
|
1209
|
-
}, [
|
|
1210
|
-
|
|
1211
|
-
}, [
|
|
1212
|
-
|
|
1213
|
-
}, [
|
|
1214
|
-
}, []),
|
|
1215
|
-
}, []),
|
|
1216
|
-
|
|
1217
|
-
const
|
|
1218
|
-
|
|
1219
|
-
},
|
|
1220
|
-
|
|
1349
|
+
onPostComment: L,
|
|
1350
|
+
onUploadFile: P,
|
|
1351
|
+
onUploadDeliverable: re,
|
|
1352
|
+
onDeleteFile: O,
|
|
1353
|
+
onTabChange: D,
|
|
1354
|
+
renderEditor: G,
|
|
1355
|
+
renderViewer: W,
|
|
1356
|
+
renderPriorityIndicator: K,
|
|
1357
|
+
renderDatePicker: $,
|
|
1358
|
+
isUploading: n = !1,
|
|
1359
|
+
className: Z,
|
|
1360
|
+
...Je
|
|
1361
|
+
}, Qe) {
|
|
1362
|
+
var ce, le, oe;
|
|
1363
|
+
const [T, ae] = c.useState(o ? "conversation" : "subtasks"), [J, _] = c.useState(!1), [ne, M] = c.useState(""), z = c.useRef(null);
|
|
1364
|
+
c.useEffect(() => {
|
|
1365
|
+
e && (M(e.title), _(!1));
|
|
1366
|
+
}, [e == null ? void 0 : e.id]), c.useEffect(() => {
|
|
1367
|
+
l && ae(o ? "conversation" : "subtasks");
|
|
1368
|
+
}, [l, o]);
|
|
1369
|
+
const Ue = c.useCallback((a) => {
|
|
1370
|
+
ae(a), D == null || D(a);
|
|
1371
|
+
}, [D]), Xe = c.useCallback((a, I) => {
|
|
1372
|
+
o && !x.includes(a) || v == null || v(a, I);
|
|
1373
|
+
}, [o, x, v]), es = c.useCallback((a) => {
|
|
1374
|
+
w == null || w(a);
|
|
1375
|
+
}, [w]), ss = c.useCallback((a) => {
|
|
1376
|
+
y == null || y(a);
|
|
1377
|
+
}, [y]), ts = c.useCallback((a) => {
|
|
1378
|
+
k == null || k(a);
|
|
1379
|
+
}, [k]), rs = c.useCallback((a, I) => {
|
|
1380
|
+
C == null || C(a, I);
|
|
1381
|
+
}, [C]), as = c.useCallback((a) => {
|
|
1382
|
+
R == null || R(a);
|
|
1383
|
+
}, [R]), ns = c.useCallback((a, I, gs) => {
|
|
1384
|
+
E == null || E(a, I, gs);
|
|
1385
|
+
}, [E]), is = c.useCallback((a, I) => {
|
|
1386
|
+
L == null || L(a, I);
|
|
1387
|
+
}, [L]), cs = c.useCallback((a, I) => {
|
|
1388
|
+
P == null || P(a, I);
|
|
1389
|
+
}, [P]), ls = c.useCallback((a) => {
|
|
1390
|
+
O == null || O(a);
|
|
1391
|
+
}, [O]), Q = c.useCallback((...a) => {
|
|
1392
|
+
}, []), os = c.useCallback((a, I) => {
|
|
1393
|
+
}, []), ie = () => {
|
|
1394
|
+
_(!1);
|
|
1395
|
+
const a = ne.trim();
|
|
1396
|
+
a && a !== (e == null ? void 0 : e.title) ? g == null || g(a) : e && M(e.title);
|
|
1397
|
+
}, ds = (a) => {
|
|
1398
|
+
a.key === "Enter" && (a.preventDefault(), ie()), a.key === "Escape" && (_(!1), e && M(e.title));
|
|
1221
1399
|
};
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
}, [
|
|
1225
|
-
const
|
|
1226
|
-
return /* @__PURE__ */
|
|
1227
|
-
|
|
1400
|
+
c.useEffect(() => {
|
|
1401
|
+
J && z.current && (z.current.focus(), z.current.select());
|
|
1402
|
+
}, [J]);
|
|
1403
|
+
const us = (ce = u.find((a) => a.isTerminal)) == null ? void 0 : ce.id, ms = ((le = u.find((a) => a.isDefault)) == null ? void 0 : le.id) || ((oe = u[0]) == null ? void 0 : oe.id) || "", fs = o ? be.filter((a) => a.id === "conversation") : be, ps = N.filter((a) => a.position === "before"), hs = N.filter((a) => a.position !== "before"), bs = p || (e == null ? void 0 : e.comments) || [];
|
|
1404
|
+
return /* @__PURE__ */ s(xs, { open: l, onOpenChange: d, children: /* @__PURE__ */ r(
|
|
1405
|
+
Ns,
|
|
1228
1406
|
{
|
|
1229
|
-
ref:
|
|
1407
|
+
ref: Qe,
|
|
1230
1408
|
side: "right",
|
|
1231
|
-
className:
|
|
1409
|
+
className: h(
|
|
1232
1410
|
/* intentional: task detail side panel takes 40% of screen, min 380px for form usability */
|
|
1233
1411
|
"w-full sm:max-w-none sm:w-[40%] min-w-[380px] p-0",
|
|
1234
1412
|
"flex flex-col overflow-hidden",
|
|
1235
1413
|
"border-l border-surface-border-strong bg-surface-1",
|
|
1236
|
-
|
|
1414
|
+
Z
|
|
1237
1415
|
),
|
|
1238
|
-
...
|
|
1416
|
+
...Je,
|
|
1239
1417
|
children: [
|
|
1240
|
-
/* @__PURE__ */
|
|
1241
|
-
|
|
1242
|
-
/* @__PURE__ */
|
|
1243
|
-
!
|
|
1418
|
+
/* @__PURE__ */ s(ys, { children: /* @__PURE__ */ s(vs, { children: (e == null ? void 0 : e.title) || "Task Details" }) }),
|
|
1419
|
+
i || !e ? /* @__PURE__ */ s(bt, {}) : /* @__PURE__ */ r(ge, { children: [
|
|
1420
|
+
/* @__PURE__ */ r("div", { className: "shrink-0 border-b border-surface-border-strong px-ds-06 pb-ds-05 pt-ds-06", children: [
|
|
1421
|
+
!o && J ? /* @__PURE__ */ s(
|
|
1244
1422
|
"input",
|
|
1245
1423
|
{
|
|
1246
|
-
ref:
|
|
1424
|
+
ref: z,
|
|
1247
1425
|
type: "text",
|
|
1248
1426
|
value: ne,
|
|
1249
|
-
onChange: (
|
|
1250
|
-
onBlur:
|
|
1251
|
-
onKeyDown:
|
|
1427
|
+
onChange: (a) => M(a.target.value),
|
|
1428
|
+
onBlur: ie,
|
|
1429
|
+
onKeyDown: ds,
|
|
1252
1430
|
className: "w-full bg-transparent text-ds-lg font-semibold text-surface-fg outline-none"
|
|
1253
1431
|
}
|
|
1254
|
-
) : /* @__PURE__ */
|
|
1432
|
+
) : /* @__PURE__ */ s(
|
|
1255
1433
|
"h2",
|
|
1256
1434
|
{
|
|
1257
|
-
onClick:
|
|
1258
|
-
...!
|
|
1435
|
+
onClick: o ? void 0 : () => _(!0),
|
|
1436
|
+
...!o && {
|
|
1259
1437
|
role: "button",
|
|
1260
1438
|
tabIndex: 0,
|
|
1261
|
-
onKeyDown: (
|
|
1262
|
-
(
|
|
1439
|
+
onKeyDown: (a) => {
|
|
1440
|
+
(a.key === "Enter" || a.key === " ") && (a.preventDefault(), _(!0));
|
|
1263
1441
|
}
|
|
1264
1442
|
},
|
|
1265
|
-
className:
|
|
1443
|
+
className: h(
|
|
1266
1444
|
"text-ds-lg font-semibold text-surface-fg",
|
|
1267
|
-
!
|
|
1445
|
+
!o && "cursor-text hover:text-accent-11 transition-colors"
|
|
1268
1446
|
),
|
|
1269
|
-
children:
|
|
1447
|
+
children: e.title
|
|
1270
1448
|
}
|
|
1271
1449
|
),
|
|
1272
|
-
|
|
1273
|
-
|
|
1450
|
+
e.parentTaskId && /* @__PURE__ */ s("p", { className: "mt-ds-02 text-ds-sm text-surface-fg-subtle", children: "Subtask" }),
|
|
1451
|
+
b && /* @__PURE__ */ s("div", { className: "mt-ds-03 flex items-center gap-ds-03", children: b })
|
|
1274
1452
|
] }),
|
|
1275
|
-
/* @__PURE__ */
|
|
1276
|
-
/* @__PURE__ */
|
|
1277
|
-
|
|
1453
|
+
/* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto", children: [
|
|
1454
|
+
/* @__PURE__ */ s("div", { className: "border-b border-surface-border-strong px-ds-06 py-ds-05", children: /* @__PURE__ */ s(
|
|
1455
|
+
Ze,
|
|
1278
1456
|
{
|
|
1279
|
-
task:
|
|
1280
|
-
columns:
|
|
1281
|
-
members:
|
|
1282
|
-
onUpdate:
|
|
1283
|
-
onAssign:
|
|
1284
|
-
onUnassign:
|
|
1285
|
-
readOnly:
|
|
1286
|
-
editableFields:
|
|
1287
|
-
renderPriorityIndicator:
|
|
1288
|
-
renderDatePicker:
|
|
1457
|
+
task: e,
|
|
1458
|
+
columns: u,
|
|
1459
|
+
members: f,
|
|
1460
|
+
onUpdate: Xe,
|
|
1461
|
+
onAssign: es,
|
|
1462
|
+
onUnassign: ss,
|
|
1463
|
+
readOnly: o,
|
|
1464
|
+
editableFields: o ? x : void 0,
|
|
1465
|
+
renderPriorityIndicator: K,
|
|
1466
|
+
renderDatePicker: $
|
|
1289
1467
|
}
|
|
1290
1468
|
) }),
|
|
1291
|
-
/* @__PURE__ */
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
] },
|
|
1296
|
-
|
|
1297
|
-
/* @__PURE__ */
|
|
1298
|
-
|
|
1299
|
-
] },
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
] },
|
|
1469
|
+
/* @__PURE__ */ s("div", { className: "sticky top-0 z-raised bg-surface-1 px-ds-06", children: /* @__PURE__ */ s(Is, { value: T, onValueChange: Ue, children: /* @__PURE__ */ r(Cs, { variant: "line", children: [
|
|
1470
|
+
ps.map((a) => /* @__PURE__ */ r(U, { value: a.id, children: [
|
|
1471
|
+
a.icon && /* @__PURE__ */ s("span", { className: "[&>svg]:h-ico-sm [&>svg]:w-ico-sm shrink-0", children: a.icon }),
|
|
1472
|
+
a.label
|
|
1473
|
+
] }, a.id)),
|
|
1474
|
+
fs.map((a) => /* @__PURE__ */ r(U, { value: a.id, children: [
|
|
1475
|
+
/* @__PURE__ */ s(a.icon, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
|
|
1476
|
+
a.label
|
|
1477
|
+
] }, a.id)),
|
|
1478
|
+
hs.map((a) => /* @__PURE__ */ r(U, { value: a.id, children: [
|
|
1479
|
+
a.icon && /* @__PURE__ */ s("span", { className: "[&>svg]:h-ico-sm [&>svg]:w-ico-sm shrink-0", children: a.icon }),
|
|
1480
|
+
a.label
|
|
1481
|
+
] }, a.id))
|
|
1304
1482
|
] }) }) }),
|
|
1305
|
-
/* @__PURE__ */
|
|
1306
|
-
|
|
1307
|
-
|
|
1483
|
+
/* @__PURE__ */ r("div", { className: "px-ds-06 py-ds-05", children: [
|
|
1484
|
+
T === "subtasks" && /* @__PURE__ */ s(
|
|
1485
|
+
Me,
|
|
1308
1486
|
{
|
|
1309
|
-
subtasks:
|
|
1310
|
-
terminalColumnId:
|
|
1311
|
-
projectId:
|
|
1312
|
-
parentTaskId:
|
|
1313
|
-
defaultColumnId:
|
|
1314
|
-
onCreateSubtask:
|
|
1315
|
-
onToggleSubtask:
|
|
1316
|
-
readOnly:
|
|
1487
|
+
subtasks: e.subtasks ?? [],
|
|
1488
|
+
terminalColumnId: us,
|
|
1489
|
+
projectId: e.projectId,
|
|
1490
|
+
parentTaskId: e.id,
|
|
1491
|
+
defaultColumnId: ms,
|
|
1492
|
+
onCreateSubtask: o ? Q : ts,
|
|
1493
|
+
onToggleSubtask: o ? os : rs,
|
|
1494
|
+
readOnly: o
|
|
1317
1495
|
}
|
|
1318
1496
|
),
|
|
1319
|
-
|
|
1320
|
-
|
|
1497
|
+
T === "review" && !o && /* @__PURE__ */ s(
|
|
1498
|
+
We,
|
|
1321
1499
|
{
|
|
1322
|
-
reviews:
|
|
1323
|
-
members:
|
|
1324
|
-
onRequestReview:
|
|
1325
|
-
onUpdateStatus:
|
|
1500
|
+
reviews: e.reviewRequests,
|
|
1501
|
+
members: f,
|
|
1502
|
+
onRequestReview: as,
|
|
1503
|
+
onUpdateStatus: ns
|
|
1326
1504
|
}
|
|
1327
1505
|
),
|
|
1328
|
-
|
|
1329
|
-
|
|
1506
|
+
T === "conversation" && /* @__PURE__ */ s(
|
|
1507
|
+
ze,
|
|
1330
1508
|
{
|
|
1331
|
-
comments:
|
|
1332
|
-
taskVisibility:
|
|
1333
|
-
onPostComment:
|
|
1334
|
-
clientMode:
|
|
1335
|
-
renderEditor:
|
|
1336
|
-
renderViewer:
|
|
1509
|
+
comments: bs,
|
|
1510
|
+
taskVisibility: e.visibility,
|
|
1511
|
+
onPostComment: is,
|
|
1512
|
+
clientMode: o,
|
|
1513
|
+
renderEditor: G,
|
|
1514
|
+
renderViewer: W
|
|
1337
1515
|
}
|
|
1338
1516
|
),
|
|
1339
|
-
|
|
1340
|
-
|
|
1517
|
+
T === "files" && /* @__PURE__ */ s(
|
|
1518
|
+
Ye,
|
|
1341
1519
|
{
|
|
1342
|
-
files:
|
|
1343
|
-
onUpload:
|
|
1344
|
-
onDelete:
|
|
1345
|
-
isUploading:
|
|
1346
|
-
readOnly:
|
|
1520
|
+
files: e.files ?? [],
|
|
1521
|
+
onUpload: o ? Q : cs,
|
|
1522
|
+
onDelete: o ? Q : ls,
|
|
1523
|
+
isUploading: n,
|
|
1524
|
+
readOnly: o
|
|
1347
1525
|
}
|
|
1348
1526
|
),
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
(
|
|
1527
|
+
T === "activity" && /* @__PURE__ */ s(Ke, { activities: m }),
|
|
1528
|
+
N.map(
|
|
1529
|
+
(a) => T === a.id ? /* @__PURE__ */ s(c.Fragment, { children: a.content }, a.id) : null
|
|
1352
1530
|
)
|
|
1353
1531
|
] })
|
|
1354
1532
|
] })
|
|
@@ -1357,13 +1535,30 @@ const st = o.forwardRef(function({
|
|
|
1357
1535
|
}
|
|
1358
1536
|
) });
|
|
1359
1537
|
});
|
|
1360
|
-
|
|
1538
|
+
gt.displayName = "TaskDetailPanel";
|
|
1361
1539
|
export {
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1540
|
+
Ke as A,
|
|
1541
|
+
ze as C,
|
|
1542
|
+
Ye as F,
|
|
1543
|
+
Pe as M,
|
|
1544
|
+
rt as P,
|
|
1545
|
+
We as R,
|
|
1546
|
+
Me as S,
|
|
1547
|
+
gt as T,
|
|
1548
|
+
_e as V,
|
|
1549
|
+
Ze as a,
|
|
1550
|
+
$e as b,
|
|
1551
|
+
Ge as c,
|
|
1552
|
+
Fe as d,
|
|
1553
|
+
je as e,
|
|
1554
|
+
Ve as f,
|
|
1555
|
+
Oe as g,
|
|
1556
|
+
ke as h,
|
|
1557
|
+
He as i,
|
|
1558
|
+
qe as j,
|
|
1559
|
+
Be as k,
|
|
1560
|
+
Se as l,
|
|
1561
|
+
Ae as m,
|
|
1562
|
+
Te as n,
|
|
1563
|
+
Ee as o
|
|
1369
1564
|
};
|