@devalok/shilp-sutra-karm 0.20.2 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/chat-panel.js +51 -51
- package/dist/_chunks/kanban-board.js +40 -39
- package/dist/_chunks/markdown-components.js +15 -15
- package/dist/_chunks/project-card.js +25 -25
- package/dist/_chunks/render-adjustment-type.js +190 -190
- package/dist/_chunks/sidebar-scratchpad.js +225 -224
- package/dist/_chunks/task-detail-panel.js +362 -350
- package/dist/_chunks/vendor-dnd.js +3353 -0
- package/dist/_chunks/vendor-markdown.js +4939 -0
- package/dist/_chunks/vendor-utils.js +3264 -0
- package/dist/dashboard/index.js +80 -80
- package/dist/index.js +8 -8
- package/dist/tasks/index.js +205 -205
- package/dist/tasks/task-detail-panel.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/_chunks/vendor.js +0 -11522
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as o, jsx as s, Fragment as ke } from "react/jsx-runtime";
|
|
3
3
|
import * as n from "react";
|
|
4
|
-
import { cn as
|
|
4
|
+
import { cn as p } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
5
5
|
import { Checkbox as Ss } from "@devalok/shilp-sutra/ui/checkbox";
|
|
6
|
-
import { PriorityIndicator as
|
|
6
|
+
import { PriorityIndicator as Ps } from "@devalok/shilp-sutra/composed/priority-indicator";
|
|
7
7
|
import { Badge as W } from "@devalok/shilp-sutra/ui/badge";
|
|
8
|
-
import { StatusBadge as
|
|
9
|
-
import { IconSquareCheck as js, IconSquare as Os, IconPlus as _, IconSend as _s, IconUpload as Fs, IconExternalLink as Bs, IconDownload as Vs, IconTrash as zs, IconFile as we, IconPhoto as Hs, IconFileText as Ms, IconFileCode as $s, IconFileSpreadsheet as qs, IconFileZip as Gs, IconCheck as Ee, IconMessage as Ae, IconX as K, IconCalendarEvent as Se, IconTag as
|
|
8
|
+
import { StatusBadge as Ls } from "@devalok/shilp-sutra/composed/status-badge";
|
|
9
|
+
import { IconSquareCheck as js, IconSquare as Os, IconPlus as _, IconSend as _s, IconUpload as Fs, IconExternalLink as Bs, IconDownload as Vs, IconTrash as zs, IconFile as we, IconPhoto as Hs, IconFileText as Ms, IconFileCode as $s, IconFileSpreadsheet as qs, IconFileZip as Gs, IconCheck as Ee, IconMessage as Ae, IconX as K, IconCalendarEvent as Se, IconTag as Pe, IconFlag as Le, IconEye as je, IconCircleCheck as Ys, IconGitPullRequest as te, IconPaperclip as re, IconUserMinus as Ks, IconUserPlus as Ws, IconArrowRight as Us, IconEdit as Zs, IconActivity as ae, IconListCheck as Oe, IconMessageCircle as _e, IconChevronRight as Js, IconColumns3 as Qs, IconChevronDown as Xs, IconUser as et, IconUsers as st } from "@tabler/icons-react";
|
|
10
10
|
import { IconButton as tt } from "@devalok/shilp-sutra/ui/icon-button";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { AnimatePresence as rt, motion as at } from "framer-motion";
|
|
12
|
+
import { Sheet as nt, SheetContent as it, SheetTitle as ot } from "@devalok/shilp-sutra/ui/sheet";
|
|
13
|
+
import { VisuallyHidden as ct } from "@devalok/shilp-sutra/ui/visually-hidden";
|
|
13
14
|
import { Skeleton as A } from "@devalok/shilp-sutra/ui/skeleton";
|
|
14
|
-
import { Progress as
|
|
15
|
+
import { Progress as lt, Tabs as dt, TabsList as ut, TabsTrigger as ee } from "@devalok/shilp-sutra/ui";
|
|
15
16
|
import { Avatar as F, AvatarImage as B, AvatarFallback as V } from "@devalok/shilp-sutra/ui/avatar";
|
|
16
17
|
import { Popover as ye, PopoverTrigger as Re, PopoverContent as Ce } from "@devalok/shilp-sutra/ui/popover";
|
|
17
18
|
import { getInitials as z } from "@devalok/shilp-sutra/composed/lib/string-utils";
|
|
18
19
|
import { MemberPicker as se } from "@devalok/shilp-sutra/composed/member-picker";
|
|
19
20
|
import { EmptyState as H } from "@devalok/shilp-sutra/composed/empty-state";
|
|
20
|
-
import { RichTextViewer as
|
|
21
|
-
import { formatRelativeTime as
|
|
22
|
-
import { Dialog as
|
|
21
|
+
import { RichTextViewer as mt, RichTextEditor as ft } from "@devalok/shilp-sutra/composed/rich-text-editor";
|
|
22
|
+
import { formatRelativeTime as ht } from "@devalok/shilp-sutra/ui/lib/date-utils";
|
|
23
|
+
import { Dialog as pt, DialogTrigger as bt, DialogContent as gt, DialogHeader as xt, DialogTitle as vt, DialogDescription as Nt, DialogFooter as wt, DialogClose as De } from "@devalok/shilp-sutra/ui/dialog";
|
|
23
24
|
import { Button as Ie } from "@devalok/shilp-sutra/ui/button";
|
|
24
|
-
const
|
|
25
|
+
const yt = {
|
|
25
26
|
LOW: "Low",
|
|
26
27
|
MEDIUM: "Medium",
|
|
27
28
|
HIGH: "High",
|
|
@@ -31,15 +32,15 @@ const vt = {
|
|
|
31
32
|
MEDIUM: "bg-warning-9",
|
|
32
33
|
HIGH: "bg-error-9",
|
|
33
34
|
URGENT: "bg-error-9"
|
|
34
|
-
},
|
|
35
|
+
}, Rt = {
|
|
35
36
|
PENDING: { color: "warning", label: "Pending" },
|
|
36
37
|
APPROVED: { color: "success", label: "Approved" },
|
|
37
38
|
CHANGES_REQUESTED: { color: "brand", label: "Changes Requested" },
|
|
38
39
|
REJECTED: { color: "error", label: "Rejected" }
|
|
39
40
|
}, Be = n.forwardRef(
|
|
40
41
|
function({ completed: e, total: r, className: a, ...i }, d) {
|
|
41
|
-
return /* @__PURE__ */ o("div", { ref: d, className:
|
|
42
|
-
/* @__PURE__ */ s(
|
|
42
|
+
return /* @__PURE__ */ o("div", { ref: d, className: p("mb-ds-05 flex items-center gap-ds-04", a), ...i, children: [
|
|
43
|
+
/* @__PURE__ */ s(lt, { value: r > 0 ? e / r * 100 : 0, className: "h-ds-02b" }),
|
|
43
44
|
/* @__PURE__ */ o("span", { className: "shrink-0 text-ds-sm font-medium text-surface-fg-subtle", children: [
|
|
44
45
|
e,
|
|
45
46
|
"/",
|
|
@@ -51,23 +52,23 @@ const vt = {
|
|
|
51
52
|
Be.displayName = "SubtaskProgress";
|
|
52
53
|
const Ve = n.forwardRef(
|
|
53
54
|
function({ children: e, className: r, ...a }, i) {
|
|
54
|
-
return /* @__PURE__ */ s("div", { ref: i, className:
|
|
55
|
+
return /* @__PURE__ */ s("div", { ref: i, className: p("space-y-ds-01", r), ...a, children: e });
|
|
55
56
|
}
|
|
56
57
|
);
|
|
57
58
|
Ve.displayName = "SubtaskList";
|
|
58
59
|
const ze = n.forwardRef(
|
|
59
60
|
function({ subtask: e, isComplete: r, onToggle: a, onClick: i, className: d, ...f }, m) {
|
|
60
61
|
var u;
|
|
61
|
-
const
|
|
62
|
+
const h = (u = e.assignees[0]) == null ? void 0 : u.user;
|
|
62
63
|
return /* @__PURE__ */ o(
|
|
63
64
|
"div",
|
|
64
65
|
{
|
|
65
66
|
ref: m,
|
|
66
67
|
role: "button",
|
|
67
68
|
tabIndex: 0,
|
|
68
|
-
className:
|
|
69
|
+
className: p(
|
|
69
70
|
"group flex items-center gap-ds-03 rounded-ds-lg px-ds-03 py-ds-02b transition-colors",
|
|
70
|
-
"hover:bg-surface-
|
|
71
|
+
"hover:bg-surface-raised-hover cursor-pointer",
|
|
71
72
|
d
|
|
72
73
|
),
|
|
73
74
|
onClick: () => i == null ? void 0 : i(e.id),
|
|
@@ -83,9 +84,9 @@ const ze = n.forwardRef(
|
|
|
83
84
|
onClick: (x) => {
|
|
84
85
|
x.stopPropagation(), a == null || a(e.id, !r);
|
|
85
86
|
},
|
|
86
|
-
className:
|
|
87
|
+
className: p(
|
|
87
88
|
"shrink-0 rounded p-ds-01 transition-colors",
|
|
88
|
-
a ? "hover:bg-surface-
|
|
89
|
+
a ? "hover:bg-surface-raised-hover" : "cursor-default"
|
|
89
90
|
),
|
|
90
91
|
children: r ? /* @__PURE__ */ s(js, { className: "h-ico-sm w-ico-sm text-accent-11", stroke: 1.5 }) : /* @__PURE__ */ s(Os, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle", stroke: 1.5 })
|
|
91
92
|
}
|
|
@@ -93,7 +94,7 @@ const ze = n.forwardRef(
|
|
|
93
94
|
/* @__PURE__ */ s(
|
|
94
95
|
"div",
|
|
95
96
|
{
|
|
96
|
-
className:
|
|
97
|
+
className: p(
|
|
97
98
|
"h-2 w-2 shrink-0 rounded-ds-full",
|
|
98
99
|
Fe[e.priority]
|
|
99
100
|
)
|
|
@@ -102,16 +103,16 @@ const ze = n.forwardRef(
|
|
|
102
103
|
/* @__PURE__ */ s(
|
|
103
104
|
"span",
|
|
104
105
|
{
|
|
105
|
-
className:
|
|
106
|
+
className: p(
|
|
106
107
|
"flex-1 truncate text-ds-md",
|
|
107
108
|
r ? "text-surface-fg-subtle line-through" : "text-surface-fg"
|
|
108
109
|
),
|
|
109
110
|
children: e.title
|
|
110
111
|
}
|
|
111
112
|
),
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
/* @__PURE__ */ s(V, { className: "bg-surface-
|
|
113
|
+
h && /* @__PURE__ */ o(F, { className: "h-ico-md w-ico-md shrink-0", children: [
|
|
114
|
+
h.image && /* @__PURE__ */ s(B, { src: h.image, alt: h.name }),
|
|
115
|
+
/* @__PURE__ */ s(V, { className: "bg-surface-raised-hover text-ds-xs font-semibold text-surface-fg", children: z(h.name) })
|
|
115
116
|
] })
|
|
116
117
|
]
|
|
117
118
|
}
|
|
@@ -121,23 +122,23 @@ const ze = n.forwardRef(
|
|
|
121
122
|
ze.displayName = "SubtaskItem";
|
|
122
123
|
const He = n.forwardRef(
|
|
123
124
|
function({ onCreate: e, placeholder: r = "Subtask title...", className: a, ...i }, d) {
|
|
124
|
-
const [f, m] = n.useState(""), [
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
},
|
|
128
|
-
|
|
125
|
+
const [f, m] = n.useState(""), [h, u] = n.useState(!1), x = n.useRef(null), b = () => {
|
|
126
|
+
const g = f.trim();
|
|
127
|
+
g && (e(g), m(""));
|
|
128
|
+
}, v = (g) => {
|
|
129
|
+
g.key === "Enter" && (g.preventDefault(), b()), g.key === "Escape" && (u(!1), m(""));
|
|
129
130
|
};
|
|
130
131
|
return n.useEffect(() => {
|
|
131
|
-
|
|
132
|
-
}, [
|
|
132
|
+
h && x.current && x.current.focus();
|
|
133
|
+
}, [h]), /* @__PURE__ */ s("div", { ref: d, className: p(a), ...i, children: h ? /* @__PURE__ */ o("div", { className: "mt-ds-03 flex items-center gap-ds-03 rounded-ds-lg border border-surface-border-strong bg-surface-raised shadow-raised px-ds-04 py-ds-03", children: [
|
|
133
134
|
/* @__PURE__ */ s(
|
|
134
135
|
"input",
|
|
135
136
|
{
|
|
136
137
|
ref: x,
|
|
137
138
|
type: "text",
|
|
138
139
|
value: f,
|
|
139
|
-
onChange: (
|
|
140
|
-
onKeyDown:
|
|
140
|
+
onChange: (g) => m(g.target.value),
|
|
141
|
+
onKeyDown: v,
|
|
141
142
|
onBlur: () => {
|
|
142
143
|
f.trim() || u(!1);
|
|
143
144
|
},
|
|
@@ -149,7 +150,7 @@ const He = n.forwardRef(
|
|
|
149
150
|
"button",
|
|
150
151
|
{
|
|
151
152
|
type: "button",
|
|
152
|
-
onClick:
|
|
153
|
+
onClick: b,
|
|
153
154
|
disabled: !f.trim(),
|
|
154
155
|
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",
|
|
155
156
|
children: "Add"
|
|
@@ -160,7 +161,7 @@ const He = n.forwardRef(
|
|
|
160
161
|
{
|
|
161
162
|
type: "button",
|
|
162
163
|
onClick: () => u(!0),
|
|
163
|
-
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-
|
|
164
|
+
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-raised-hover hover:text-surface-fg-muted",
|
|
164
165
|
children: [
|
|
165
166
|
/* @__PURE__ */ s(_, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
|
|
166
167
|
"Add subtask"
|
|
@@ -176,7 +177,7 @@ const Me = n.forwardRef(
|
|
|
176
177
|
n.useEffect(() => {
|
|
177
178
|
r && f.current && (f.current.scrollTop = f.current.scrollHeight);
|
|
178
179
|
}, [r, m]);
|
|
179
|
-
const
|
|
180
|
+
const h = n.useCallback(
|
|
180
181
|
(u) => {
|
|
181
182
|
f.current = u, typeof d == "function" ? d(u) : d && (d.current = u);
|
|
182
183
|
},
|
|
@@ -185,8 +186,8 @@ const Me = n.forwardRef(
|
|
|
185
186
|
return /* @__PURE__ */ s(
|
|
186
187
|
"div",
|
|
187
188
|
{
|
|
188
|
-
ref:
|
|
189
|
-
className:
|
|
189
|
+
ref: h,
|
|
190
|
+
className: p("flex-1 space-y-ds-05 overflow-y-auto", a),
|
|
190
191
|
...i,
|
|
191
192
|
children: e
|
|
192
193
|
}
|
|
@@ -196,14 +197,14 @@ const Me = n.forwardRef(
|
|
|
196
197
|
Me.displayName = "MessageList";
|
|
197
198
|
function $e(t) {
|
|
198
199
|
const e = new Date(t), a = (/* @__PURE__ */ new Date()).getTime() - e.getTime();
|
|
199
|
-
return Math.floor(a / 864e5) < 7 ?
|
|
200
|
+
return Math.floor(a / 864e5) < 7 ? ht(t) : e.toLocaleDateString("en-IN", {
|
|
200
201
|
month: "short",
|
|
201
202
|
day: "numeric",
|
|
202
203
|
hour: "numeric",
|
|
203
204
|
minute: "2-digit"
|
|
204
205
|
});
|
|
205
206
|
}
|
|
206
|
-
function
|
|
207
|
+
function Ct(t) {
|
|
207
208
|
return t.authorType === "INTERNAL" && t.internalAuthor ? t.internalAuthor : t.authorType === "CLIENT" && t.clientAuthor ? {
|
|
208
209
|
id: t.clientAuthor.id,
|
|
209
210
|
name: t.clientAuthor.name,
|
|
@@ -211,21 +212,21 @@ function yt(t) {
|
|
|
211
212
|
image: null
|
|
212
213
|
} : { id: t.authorId, name: "Unknown", image: null };
|
|
213
214
|
}
|
|
214
|
-
function
|
|
215
|
+
function Dt(t) {
|
|
215
216
|
return t.replace(/<[^>]*>/g, "");
|
|
216
217
|
}
|
|
217
218
|
const qe = n.forwardRef(
|
|
218
219
|
function({ comment: e, clientMode: r = !1, renderViewer: a, className: i, ...d }, f) {
|
|
219
|
-
const m =
|
|
220
|
-
return /* @__PURE__ */ o("div", { ref: f, className:
|
|
220
|
+
const m = Ct(e), h = e.authorType === "CLIENT";
|
|
221
|
+
return /* @__PURE__ */ o("div", { ref: f, className: p("flex gap-ds-03", i), ...d, children: [
|
|
221
222
|
/* @__PURE__ */ o(F, { className: "h-ds-xs-plus w-ds-xs-plus shrink-0 mt-ds-01", children: [
|
|
222
223
|
m.image && /* @__PURE__ */ s(B, { src: m.image, alt: m.name }),
|
|
223
224
|
/* @__PURE__ */ s(
|
|
224
225
|
V,
|
|
225
226
|
{
|
|
226
|
-
className:
|
|
227
|
+
className: p(
|
|
227
228
|
"text-ds-xs font-semibold",
|
|
228
|
-
|
|
229
|
+
h ? "bg-warning-3 text-warning-11" : "bg-surface-raised-hover text-surface-fg"
|
|
229
230
|
),
|
|
230
231
|
children: z(m.name)
|
|
231
232
|
}
|
|
@@ -234,13 +235,13 @@ const qe = n.forwardRef(
|
|
|
234
235
|
/* @__PURE__ */ o("div", { className: "flex-1 min-w-0", children: [
|
|
235
236
|
/* @__PURE__ */ o("div", { className: "flex items-baseline gap-ds-03", children: [
|
|
236
237
|
/* @__PURE__ */ s("span", { className: "text-ds-md font-medium text-surface-fg", children: m.name }),
|
|
237
|
-
r ? !
|
|
238
|
+
r ? !h && /* @__PURE__ */ s("span", { className: "rounded bg-surface-raised-hover px-ds-02 py-px text-ds-xs font-semibold uppercase tracking-wider text-surface-fg", children: "Team" }) : h && /* @__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" }),
|
|
238
239
|
/* @__PURE__ */ s("span", { className: "text-ds-sm text-surface-fg-subtle", children: $e(e.createdAt) })
|
|
239
240
|
] }),
|
|
240
241
|
/* @__PURE__ */ s("div", { className: "mt-ds-02", children: a ? a({
|
|
241
242
|
content: e.content,
|
|
242
243
|
className: "[&_.ProseMirror]:!min-h-0 [&_.ProseMirror]:!p-0"
|
|
243
|
-
}) : /* @__PURE__ */ s("p", { className: "text-ds-md text-surface-fg-muted whitespace-pre-wrap", children:
|
|
244
|
+
}) : /* @__PURE__ */ s("p", { className: "text-ds-md text-surface-fg-muted whitespace-pre-wrap", children: Dt(e.content) }) })
|
|
244
245
|
] })
|
|
245
246
|
] });
|
|
246
247
|
}
|
|
@@ -255,20 +256,20 @@ const Ge = n.forwardRef(
|
|
|
255
256
|
className: d,
|
|
256
257
|
...f
|
|
257
258
|
}, m) {
|
|
258
|
-
const [
|
|
259
|
-
const
|
|
260
|
-
|
|
259
|
+
const [h, u] = n.useState(""), x = () => {
|
|
260
|
+
const b = h.trim();
|
|
261
|
+
b.replace(/<[^>]*>/g, "").trim() && (e(b, i ? "CLIENT" : "INTERNAL"), u(""));
|
|
261
262
|
};
|
|
262
|
-
return /* @__PURE__ */ o("div", { ref: m, className:
|
|
263
|
+
return /* @__PURE__ */ o("div", { ref: m, className: p("space-y-ds-03", d), ...f, children: [
|
|
263
264
|
r ? r({
|
|
264
|
-
content:
|
|
265
|
+
content: h,
|
|
265
266
|
onChange: u,
|
|
266
267
|
placeholder: a
|
|
267
268
|
}) : /* @__PURE__ */ s(
|
|
268
269
|
"textarea",
|
|
269
270
|
{
|
|
270
|
-
value:
|
|
271
|
-
onChange: (
|
|
271
|
+
value: h,
|
|
272
|
+
onChange: (b) => u(b.target.value),
|
|
272
273
|
placeholder: a,
|
|
273
274
|
rows: 3,
|
|
274
275
|
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"
|
|
@@ -279,7 +280,7 @@ const Ge = n.forwardRef(
|
|
|
279
280
|
{
|
|
280
281
|
type: "button",
|
|
281
282
|
onClick: x,
|
|
282
|
-
disabled: !
|
|
283
|
+
disabled: !h.replace(/<[^>]*>/g, "").trim(),
|
|
283
284
|
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",
|
|
284
285
|
children: [
|
|
285
286
|
/* @__PURE__ */ s(_s, { className: "h-ico-sm w-ico-sm", stroke: 2 }),
|
|
@@ -297,7 +298,7 @@ const Ye = n.forwardRef(
|
|
|
297
298
|
"p",
|
|
298
299
|
{
|
|
299
300
|
ref: a,
|
|
300
|
-
className:
|
|
301
|
+
className: p("text-ds-xs text-warning-11", e),
|
|
301
302
|
...r,
|
|
302
303
|
children: "This task is visible to clients. Comments may be seen by external users."
|
|
303
304
|
}
|
|
@@ -307,9 +308,9 @@ const Ye = n.forwardRef(
|
|
|
307
308
|
Ye.displayName = "VisibilityWarning";
|
|
308
309
|
const Ke = n.forwardRef(
|
|
309
310
|
function({ onUpload: e, isUploading: r = !1, accept: a, className: i, ...d }, f) {
|
|
310
|
-
const m = n.useRef(null), [
|
|
311
|
+
const m = n.useRef(null), [h, u] = n.useState(!1), x = (N) => {
|
|
311
312
|
var w;
|
|
312
|
-
const y = (w =
|
|
313
|
+
const y = (w = N.target.files) == null ? void 0 : w[0];
|
|
313
314
|
y && e(y), m.current && (m.current.value = "");
|
|
314
315
|
};
|
|
315
316
|
return /* @__PURE__ */ o(
|
|
@@ -318,27 +319,27 @@ const Ke = n.forwardRef(
|
|
|
318
319
|
ref: f,
|
|
319
320
|
role: "region",
|
|
320
321
|
"aria-label": "File upload drop zone",
|
|
321
|
-
onDrop: (
|
|
322
|
+
onDrop: (N) => {
|
|
322
323
|
var w;
|
|
323
|
-
|
|
324
|
-
const y = (w =
|
|
324
|
+
N.preventDefault(), u(!1);
|
|
325
|
+
const y = (w = N.dataTransfer.files) == null ? void 0 : w[0];
|
|
325
326
|
y && e(y);
|
|
326
327
|
},
|
|
327
|
-
onDragOver: (
|
|
328
|
-
|
|
328
|
+
onDragOver: (N) => {
|
|
329
|
+
N.preventDefault(), u(!0);
|
|
329
330
|
},
|
|
330
331
|
onDragLeave: () => {
|
|
331
332
|
u(!1);
|
|
332
333
|
},
|
|
333
|
-
className:
|
|
334
|
+
className: p(
|
|
334
335
|
"rounded-ds-lg border-2 border-dashed transition-colors",
|
|
335
|
-
|
|
336
|
+
h ? "border-accent-7 bg-accent-1" : "border-surface-border-strong",
|
|
336
337
|
i
|
|
337
338
|
),
|
|
338
339
|
...d,
|
|
339
340
|
children: [
|
|
340
341
|
/* @__PURE__ */ o("div", { className: "flex flex-col items-center gap-ds-03 py-ds-06", children: [
|
|
341
|
-
/* @__PURE__ */ s("div", { className: "flex h-ds-sm-plus w-ds-sm-plus items-center justify-center rounded-ds-lg bg-surface-
|
|
342
|
+
/* @__PURE__ */ s("div", { className: "flex h-ds-sm-plus w-ds-sm-plus items-center justify-center rounded-ds-lg bg-surface-raised", children: /* @__PURE__ */ s(
|
|
342
343
|
Fs,
|
|
343
344
|
{
|
|
344
345
|
className: "h-ico-sm w-ico-sm text-surface-fg-subtle",
|
|
@@ -351,8 +352,8 @@ const Ke = n.forwardRef(
|
|
|
351
352
|
{
|
|
352
353
|
type: "button",
|
|
353
354
|
onClick: () => {
|
|
354
|
-
var
|
|
355
|
-
return (
|
|
355
|
+
var N;
|
|
356
|
+
return (N = m.current) == null ? void 0 : N.click();
|
|
356
357
|
},
|
|
357
358
|
disabled: r,
|
|
358
359
|
className: "text-ds-md font-medium text-accent-11 transition-colors hover:underline disabled:opacity-action-disabled",
|
|
@@ -383,16 +384,16 @@ const Ke = n.forwardRef(
|
|
|
383
384
|
Ke.displayName = "FileDropZone";
|
|
384
385
|
const We = n.forwardRef(
|
|
385
386
|
function({ children: e, className: r, ...a }, i) {
|
|
386
|
-
return /* @__PURE__ */ s("div", { ref: i, className:
|
|
387
|
+
return /* @__PURE__ */ s("div", { ref: i, className: p("space-y-ds-02", r), ...a, children: e });
|
|
387
388
|
}
|
|
388
389
|
);
|
|
389
390
|
We.displayName = "FileList";
|
|
390
|
-
function
|
|
391
|
+
function It(t) {
|
|
391
392
|
if (!t) return we;
|
|
392
393
|
const e = t.toLowerCase();
|
|
393
394
|
return ["jpg", "jpeg", "png", "gif", "svg", "webp", "bmp"].includes(e) ? Hs : ["pdf", "doc", "docx", "txt", "rtf"].includes(e) ? Ms : ["js", "ts", "jsx", "tsx", "py", "rb", "go", "rs", "html", "css", "json"].includes(e) ? $s : ["xls", "xlsx", "csv"].includes(e) ? qs : ["zip", "tar", "gz", "rar", "7z"].includes(e) ? Gs : we;
|
|
394
395
|
}
|
|
395
|
-
function
|
|
396
|
+
function Tt(t) {
|
|
396
397
|
return new Date(t).toLocaleDateString("en-IN", {
|
|
397
398
|
month: "short",
|
|
398
399
|
day: "numeric",
|
|
@@ -401,18 +402,18 @@ function Dt(t) {
|
|
|
401
402
|
}
|
|
402
403
|
const Ue = n.forwardRef(
|
|
403
404
|
function({ file: e, onDelete: r, readOnly: a = !1, className: i, ...d }, f) {
|
|
404
|
-
const m =
|
|
405
|
+
const m = It(e.fileType);
|
|
405
406
|
return /* @__PURE__ */ o(
|
|
406
407
|
"div",
|
|
407
408
|
{
|
|
408
409
|
ref: f,
|
|
409
|
-
className:
|
|
410
|
-
"group flex items-center gap-ds-04 rounded-ds-lg px-ds-03 py-ds-03 transition-colors hover:bg-surface-
|
|
410
|
+
className: p(
|
|
411
|
+
"group flex items-center gap-ds-04 rounded-ds-lg px-ds-03 py-ds-03 transition-colors hover:bg-surface-raised-hover",
|
|
411
412
|
i
|
|
412
413
|
),
|
|
413
414
|
...d,
|
|
414
415
|
children: [
|
|
415
|
-
/* @__PURE__ */ s("div", { className: "flex h-ds-sm w-ds-sm shrink-0 items-center justify-center rounded-ds-lg bg-surface-
|
|
416
|
+
/* @__PURE__ */ s("div", { className: "flex h-ds-sm w-ds-sm shrink-0 items-center justify-center rounded-ds-lg bg-surface-raised", children: /* @__PURE__ */ s(
|
|
416
417
|
m,
|
|
417
418
|
{
|
|
418
419
|
className: "h-ico-sm w-ico-sm text-surface-fg-subtle",
|
|
@@ -422,7 +423,7 @@ const Ue = n.forwardRef(
|
|
|
422
423
|
/* @__PURE__ */ o("div", { className: "flex-1 min-w-0", children: [
|
|
423
424
|
/* @__PURE__ */ s("p", { className: "truncate text-ds-md font-medium text-surface-fg", children: e.title }),
|
|
424
425
|
/* @__PURE__ */ o("p", { className: "text-ds-sm text-surface-fg-subtle", children: [
|
|
425
|
-
|
|
426
|
+
Tt(e.createdAt),
|
|
426
427
|
/* @__PURE__ */ s("span", { className: "mx-ds-02b", children: "by" }),
|
|
427
428
|
e.uploadedBy.name
|
|
428
429
|
] })
|
|
@@ -434,7 +435,7 @@ const Ue = n.forwardRef(
|
|
|
434
435
|
href: /^https?:\/\//.test(e.externalUrl) ? e.externalUrl : "#",
|
|
435
436
|
target: "_blank",
|
|
436
437
|
rel: "noopener noreferrer",
|
|
437
|
-
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors hover:bg-surface-
|
|
438
|
+
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors hover:bg-surface-raised-hover",
|
|
438
439
|
title: e.externalLabel ?? "Open externally",
|
|
439
440
|
children: /* @__PURE__ */ s(Bs, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" })
|
|
440
441
|
}
|
|
@@ -445,13 +446,13 @@ const Ue = n.forwardRef(
|
|
|
445
446
|
href: /^https?:\/\//.test(e.downloadUrl) ? e.downloadUrl : "#",
|
|
446
447
|
target: "_blank",
|
|
447
448
|
rel: "noopener noreferrer",
|
|
448
|
-
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors hover:bg-surface-
|
|
449
|
+
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors hover:bg-surface-raised-hover",
|
|
449
450
|
title: "Download",
|
|
450
451
|
children: /* @__PURE__ */ s(Vs, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" })
|
|
451
452
|
}
|
|
452
453
|
),
|
|
453
|
-
!a && r && /* @__PURE__ */ o(
|
|
454
|
-
/* @__PURE__ */ s(
|
|
454
|
+
!a && r && /* @__PURE__ */ o(pt, { children: [
|
|
455
|
+
/* @__PURE__ */ s(bt, { asChild: !0, children: /* @__PURE__ */ s(
|
|
455
456
|
"button",
|
|
456
457
|
{
|
|
457
458
|
type: "button",
|
|
@@ -460,16 +461,16 @@ const Ue = n.forwardRef(
|
|
|
460
461
|
children: /* @__PURE__ */ s(zs, { className: "h-ico-sm w-ico-sm text-error-11" })
|
|
461
462
|
}
|
|
462
463
|
) }),
|
|
463
|
-
/* @__PURE__ */ o(
|
|
464
|
-
/* @__PURE__ */ o(
|
|
465
|
-
/* @__PURE__ */ s(
|
|
466
|
-
/* @__PURE__ */ o(
|
|
464
|
+
/* @__PURE__ */ o(gt, { children: [
|
|
465
|
+
/* @__PURE__ */ o(xt, { children: [
|
|
466
|
+
/* @__PURE__ */ s(vt, { children: "Delete file?" }),
|
|
467
|
+
/* @__PURE__ */ o(Nt, { children: [
|
|
467
468
|
'"',
|
|
468
469
|
e.title,
|
|
469
470
|
'" will be permanently deleted. This cannot be undone.'
|
|
470
471
|
] })
|
|
471
472
|
] }),
|
|
472
|
-
/* @__PURE__ */ o(
|
|
473
|
+
/* @__PURE__ */ o(wt, { children: [
|
|
473
474
|
/* @__PURE__ */ s(De, { asChild: !0, children: /* @__PURE__ */ s(Ie, { variant: "outline", size: "sm", children: "Cancel" }) }),
|
|
474
475
|
/* @__PURE__ */ s(De, { asChild: !0, children: /* @__PURE__ */ s(
|
|
475
476
|
Ie,
|
|
@@ -491,46 +492,46 @@ const Ue = n.forwardRef(
|
|
|
491
492
|
}
|
|
492
493
|
);
|
|
493
494
|
Ue.displayName = "FileItem";
|
|
494
|
-
const
|
|
495
|
+
const kt = [
|
|
495
496
|
{ status: "APPROVED", label: "Approve", icon: Ee },
|
|
496
497
|
{ status: "CHANGES_REQUESTED", label: "Request Changes", icon: Ae },
|
|
497
498
|
{ status: "REJECTED", label: "Reject", icon: K }
|
|
498
499
|
], Ze = n.forwardRef(
|
|
499
500
|
function({ reviewId: e, onSubmit: r, className: a, ...i }, d) {
|
|
500
|
-
const [f, m] = n.useState(""), [
|
|
501
|
-
r(e,
|
|
501
|
+
const [f, m] = n.useState(""), [h, u] = n.useState(!1), x = (b) => {
|
|
502
|
+
r(e, b, f || void 0), m(""), u(!1);
|
|
502
503
|
};
|
|
503
|
-
return /* @__PURE__ */ s("div", { ref: d, className:
|
|
504
|
+
return /* @__PURE__ */ s("div", { ref: d, className: p(a), ...i, children: h ? /* @__PURE__ */ o("div", { className: "space-y-ds-03", children: [
|
|
504
505
|
/* @__PURE__ */ s(
|
|
505
506
|
"textarea",
|
|
506
507
|
{
|
|
507
508
|
value: f,
|
|
508
|
-
onChange: (
|
|
509
|
+
onChange: (b) => m(b.target.value),
|
|
509
510
|
placeholder: "Add feedback (optional)...",
|
|
510
511
|
rows: 2,
|
|
511
512
|
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"
|
|
512
513
|
}
|
|
513
514
|
),
|
|
514
515
|
/* @__PURE__ */ o("div", { className: "flex items-center gap-ds-02b", children: [
|
|
515
|
-
|
|
516
|
-
const
|
|
516
|
+
kt.map((b) => {
|
|
517
|
+
const v = b.icon;
|
|
517
518
|
return /* @__PURE__ */ o(
|
|
518
519
|
"button",
|
|
519
520
|
{
|
|
520
521
|
type: "button",
|
|
521
|
-
onClick: () => x(
|
|
522
|
-
className:
|
|
522
|
+
onClick: () => x(b.status),
|
|
523
|
+
className: p(
|
|
523
524
|
"inline-flex items-center gap-ds-02 rounded-ds-md px-ds-03 py-ds-02 text-ds-sm font-semibold transition-colors",
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
525
|
+
b.status === "APPROVED" && "bg-success-3 text-success-11 hover:opacity-90",
|
|
526
|
+
b.status === "CHANGES_REQUESTED" && "bg-warning-3 text-warning-11 hover:opacity-90",
|
|
527
|
+
b.status === "REJECTED" && "bg-error-3 text-error-11 hover:opacity-90"
|
|
527
528
|
),
|
|
528
529
|
children: [
|
|
529
|
-
/* @__PURE__ */ s(
|
|
530
|
-
|
|
530
|
+
/* @__PURE__ */ s(v, { className: "h-3 w-3", stroke: 2 }),
|
|
531
|
+
b.label
|
|
531
532
|
]
|
|
532
533
|
},
|
|
533
|
-
|
|
534
|
+
b.status
|
|
534
535
|
);
|
|
535
536
|
}),
|
|
536
537
|
/* @__PURE__ */ s(
|
|
@@ -555,7 +556,7 @@ const It = [
|
|
|
555
556
|
}
|
|
556
557
|
);
|
|
557
558
|
Ze.displayName = "ReviewResponseForm";
|
|
558
|
-
function
|
|
559
|
+
function Et(t) {
|
|
559
560
|
return new Date(t).toLocaleDateString("en-IN", {
|
|
560
561
|
month: "short",
|
|
561
562
|
day: "numeric",
|
|
@@ -565,13 +566,13 @@ function Tt(t) {
|
|
|
565
566
|
}
|
|
566
567
|
const Je = n.forwardRef(
|
|
567
568
|
function({ review: e, onUpdateStatus: r, className: a, ...i }, d) {
|
|
568
|
-
const f =
|
|
569
|
+
const f = Rt[e.status];
|
|
569
570
|
return /* @__PURE__ */ o(
|
|
570
571
|
"div",
|
|
571
572
|
{
|
|
572
573
|
ref: d,
|
|
573
|
-
className:
|
|
574
|
-
"rounded-ds-lg border border-surface-border-strong bg-surface-
|
|
574
|
+
className: p(
|
|
575
|
+
"rounded-ds-lg border border-surface-border-strong bg-surface-raised shadow-raised p-ds-04",
|
|
575
576
|
a
|
|
576
577
|
),
|
|
577
578
|
...i,
|
|
@@ -585,7 +586,7 @@ const Je = n.forwardRef(
|
|
|
585
586
|
alt: e.reviewer.name
|
|
586
587
|
}
|
|
587
588
|
),
|
|
588
|
-
/* @__PURE__ */ s(V, { className: "bg-surface-
|
|
589
|
+
/* @__PURE__ */ s(V, { className: "bg-surface-raised-hover text-ds-xs font-semibold text-surface-fg", children: z(e.reviewer.name) })
|
|
589
590
|
] }),
|
|
590
591
|
/* @__PURE__ */ o("div", { className: "flex-1 min-w-0", children: [
|
|
591
592
|
/* @__PURE__ */ s("span", { className: "text-ds-md font-medium text-surface-fg", children: e.reviewer.name }),
|
|
@@ -602,7 +603,7 @@ const Je = n.forwardRef(
|
|
|
602
603
|
}
|
|
603
604
|
)
|
|
604
605
|
] }),
|
|
605
|
-
e.feedback && /* @__PURE__ */ s("div", { className: "mt-ds-03 rounded-ds-md bg-surface-
|
|
606
|
+
e.feedback && /* @__PURE__ */ s("div", { className: "mt-ds-03 rounded-ds-md bg-surface-raised px-ds-04 py-ds-03", children: /* @__PURE__ */ s("p", { className: "text-ds-sm text-surface-fg-muted", children: e.feedback }) }),
|
|
606
607
|
e.status === "PENDING" && r && /* @__PURE__ */ s("div", { className: "mt-ds-03", children: /* @__PURE__ */ s(
|
|
607
608
|
Ze,
|
|
608
609
|
{
|
|
@@ -610,7 +611,7 @@ const Je = n.forwardRef(
|
|
|
610
611
|
onSubmit: r
|
|
611
612
|
}
|
|
612
613
|
) }),
|
|
613
|
-
/* @__PURE__ */ s("p", { className: "mt-ds-03 text-ds-xs text-surface-fg-subtle", children:
|
|
614
|
+
/* @__PURE__ */ s("p", { className: "mt-ds-03 text-ds-xs text-surface-fg-subtle", children: Et(e.createdAt) })
|
|
614
615
|
]
|
|
615
616
|
}
|
|
616
617
|
);
|
|
@@ -623,7 +624,7 @@ const Qe = n.forwardRef(
|
|
|
623
624
|
() => e.map((m) => ({ id: m.id, name: m.name, avatar: m.image ?? void 0 })),
|
|
624
625
|
[e]
|
|
625
626
|
);
|
|
626
|
-
return /* @__PURE__ */ s("div", { ref: d, className:
|
|
627
|
+
return /* @__PURE__ */ s("div", { ref: d, className: p(a), ...i, children: /* @__PURE__ */ s(
|
|
627
628
|
se,
|
|
628
629
|
{
|
|
629
630
|
members: f,
|
|
@@ -633,7 +634,7 @@ const Qe = n.forwardRef(
|
|
|
633
634
|
"button",
|
|
634
635
|
{
|
|
635
636
|
type: "button",
|
|
636
|
-
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-
|
|
637
|
+
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-raised-hover hover:text-surface-fg-muted",
|
|
637
638
|
children: [
|
|
638
639
|
/* @__PURE__ */ s(_, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
|
|
639
640
|
"Request Review"
|
|
@@ -647,14 +648,14 @@ const Qe = n.forwardRef(
|
|
|
647
648
|
Qe.displayName = "ReviewRequestButton";
|
|
648
649
|
const Xe = n.forwardRef(
|
|
649
650
|
function({ children: e, className: r, ...a }, i) {
|
|
650
|
-
return /* @__PURE__ */ o("div", { ref: i, className:
|
|
651
|
+
return /* @__PURE__ */ o("div", { ref: i, className: p("relative", r), ...a, children: [
|
|
651
652
|
/* @__PURE__ */ s("div", { className: "absolute left-[11px] top-2 bottom-2 w-px bg-surface-border" }),
|
|
652
653
|
/* @__PURE__ */ s("div", { className: "space-y-ds-05", children: e })
|
|
653
654
|
] });
|
|
654
655
|
}
|
|
655
656
|
);
|
|
656
657
|
Xe.displayName = "ActivityTimeline";
|
|
657
|
-
const
|
|
658
|
+
const At = {
|
|
658
659
|
"task.created": {
|
|
659
660
|
icon: _,
|
|
660
661
|
color: "text-success-11",
|
|
@@ -740,7 +741,7 @@ const kt = {
|
|
|
740
741
|
}
|
|
741
742
|
},
|
|
742
743
|
"task.priority_changed": {
|
|
743
|
-
icon:
|
|
744
|
+
icon: Le,
|
|
744
745
|
color: "text-error-11",
|
|
745
746
|
dotColor: "bg-error-9",
|
|
746
747
|
getDescription: (t) => {
|
|
@@ -749,7 +750,7 @@ const kt = {
|
|
|
749
750
|
}
|
|
750
751
|
},
|
|
751
752
|
"task.labels_changed": {
|
|
752
|
-
icon:
|
|
753
|
+
icon: Pe,
|
|
753
754
|
color: "text-category-amber-11",
|
|
754
755
|
dotColor: "bg-category-amber-9",
|
|
755
756
|
getDescription: () => "updated labels"
|
|
@@ -763,30 +764,30 @@ const kt = {
|
|
|
763
764
|
return e != null && e.dueDate ? `set due date to ${e.dueDate}` : "updated the due date";
|
|
764
765
|
}
|
|
765
766
|
}
|
|
766
|
-
},
|
|
767
|
+
}, St = {
|
|
767
768
|
icon: ae,
|
|
768
769
|
color: "text-surface-fg-subtle",
|
|
769
770
|
dotColor: "bg-disabled",
|
|
770
771
|
getDescription: (t) => t.action
|
|
771
772
|
};
|
|
772
|
-
function
|
|
773
|
+
function Pt(t) {
|
|
773
774
|
const e = t.metadata;
|
|
774
775
|
return e != null && e.actorName ? e.actorName : t.actorType === "SYSTEM" ? "System" : t.actorType === "AGENT" ? "AI Agent" : "Someone";
|
|
775
776
|
}
|
|
776
777
|
const es = n.forwardRef(
|
|
777
778
|
function({ entry: e, className: r, ...a }, i) {
|
|
778
|
-
const d =
|
|
779
|
-
return /* @__PURE__ */ o("div", { ref: i, className:
|
|
780
|
-
/* @__PURE__ */ s("div", { className: "relative z-raised flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-ds-full bg-surface-
|
|
779
|
+
const d = At[e.action] || St, f = d.icon, m = Pt(e), h = d.getDescription(e);
|
|
780
|
+
return /* @__PURE__ */ o("div", { ref: i, className: p("relative flex gap-ds-04 pl-0", r), ...a, children: [
|
|
781
|
+
/* @__PURE__ */ s("div", { className: "relative z-raised flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-ds-full bg-surface-base", children: /* @__PURE__ */ s(
|
|
781
782
|
"div",
|
|
782
783
|
{
|
|
783
|
-
className:
|
|
784
|
-
"flex h-ico-md w-ico-md items-center justify-center rounded-ds-full bg-surface-
|
|
784
|
+
className: p(
|
|
785
|
+
"flex h-ico-md w-ico-md items-center justify-center rounded-ds-full bg-surface-raised"
|
|
785
786
|
),
|
|
786
787
|
children: /* @__PURE__ */ s(
|
|
787
788
|
f,
|
|
788
789
|
{
|
|
789
|
-
className:
|
|
790
|
+
className: p("h-3 w-3", d.color),
|
|
790
791
|
stroke: 2
|
|
791
792
|
}
|
|
792
793
|
)
|
|
@@ -797,7 +798,7 @@ const es = n.forwardRef(
|
|
|
797
798
|
/* @__PURE__ */ s("span", { className: "font-medium text-surface-fg", children: m }),
|
|
798
799
|
/* @__PURE__ */ o("span", { className: "text-surface-fg-subtle", children: [
|
|
799
800
|
" ",
|
|
800
|
-
|
|
801
|
+
h
|
|
801
802
|
] })
|
|
802
803
|
] }),
|
|
803
804
|
/* @__PURE__ */ s("p", { className: "mt-ds-01 text-ds-xs text-surface-fg-subtle", children: $e(e.timestamp) })
|
|
@@ -815,28 +816,28 @@ const ss = n.forwardRef(
|
|
|
815
816
|
onClickSubtask: d,
|
|
816
817
|
className: f,
|
|
817
818
|
readOnly: m = !1,
|
|
818
|
-
...
|
|
819
|
+
...h
|
|
819
820
|
}, u) {
|
|
820
821
|
const x = e.filter(
|
|
821
|
-
(
|
|
822
|
-
var
|
|
823
|
-
return ((
|
|
822
|
+
(v) => {
|
|
823
|
+
var g;
|
|
824
|
+
return ((g = v.column) == null ? void 0 : g.isTerminal) || v.columnId === r;
|
|
824
825
|
}
|
|
825
|
-
).length,
|
|
826
|
-
return /* @__PURE__ */ o("div", { ref: u, className:
|
|
827
|
-
|
|
828
|
-
e.length > 0 ? /* @__PURE__ */ s(Ve, { children: e.map((
|
|
829
|
-
var
|
|
830
|
-
const
|
|
826
|
+
).length, b = e.length;
|
|
827
|
+
return /* @__PURE__ */ o("div", { ref: u, className: p("flex flex-col", f), ...h, children: [
|
|
828
|
+
b > 0 && /* @__PURE__ */ s(Be, { completed: x, total: b }),
|
|
829
|
+
e.length > 0 ? /* @__PURE__ */ s(Ve, { children: e.map((v) => {
|
|
830
|
+
var N;
|
|
831
|
+
const g = ((N = v.column) == null ? void 0 : N.isTerminal) || v.columnId === r;
|
|
831
832
|
return /* @__PURE__ */ s(
|
|
832
833
|
ze,
|
|
833
834
|
{
|
|
834
|
-
subtask:
|
|
835
|
-
isComplete: !!
|
|
835
|
+
subtask: v,
|
|
836
|
+
isComplete: !!g,
|
|
836
837
|
onToggle: m ? void 0 : i,
|
|
837
838
|
onClick: d
|
|
838
839
|
},
|
|
839
|
-
|
|
840
|
+
v.id
|
|
840
841
|
);
|
|
841
842
|
}) }) : !m && /* @__PURE__ */ s(
|
|
842
843
|
H,
|
|
@@ -861,28 +862,28 @@ const ts = n.forwardRef(
|
|
|
861
862
|
clientMode: d = !1,
|
|
862
863
|
richText: f = !0,
|
|
863
864
|
renderEditor: m,
|
|
864
|
-
renderViewer:
|
|
865
|
+
renderViewer: h,
|
|
865
866
|
...u
|
|
866
867
|
}, x) {
|
|
867
|
-
const
|
|
868
|
-
|
|
868
|
+
const b = m ?? (f ? (g) => /* @__PURE__ */ s(
|
|
869
|
+
ft,
|
|
869
870
|
{
|
|
870
|
-
content:
|
|
871
|
-
onChange:
|
|
872
|
-
placeholder:
|
|
871
|
+
content: g.content,
|
|
872
|
+
onChange: g.onChange,
|
|
873
|
+
placeholder: g.placeholder,
|
|
873
874
|
editable: !0,
|
|
874
875
|
className: "min-h-[80px]"
|
|
875
876
|
}
|
|
876
|
-
) : void 0),
|
|
877
|
-
return /* @__PURE__ */ o("div", { ref: x, className:
|
|
878
|
-
e.length > 0 ? /* @__PURE__ */ s(Me, { children: e.map((
|
|
877
|
+
) : void 0), v = h ?? (f ? (g) => /* @__PURE__ */ s(mt, { content: g.content, className: g.className }) : void 0);
|
|
878
|
+
return /* @__PURE__ */ o("div", { ref: x, className: p("flex flex-col", i), ...u, children: [
|
|
879
|
+
e.length > 0 ? /* @__PURE__ */ s(Me, { children: e.map((g) => /* @__PURE__ */ s(
|
|
879
880
|
qe,
|
|
880
881
|
{
|
|
881
|
-
comment:
|
|
882
|
+
comment: g,
|
|
882
883
|
clientMode: d,
|
|
883
|
-
renderViewer:
|
|
884
|
+
renderViewer: v
|
|
884
885
|
},
|
|
885
|
-
|
|
886
|
+
g.id
|
|
886
887
|
)) }) : /* @__PURE__ */ s(
|
|
887
888
|
H,
|
|
888
889
|
{
|
|
@@ -898,7 +899,7 @@ const ts = n.forwardRef(
|
|
|
898
899
|
Ge,
|
|
899
900
|
{
|
|
900
901
|
onSubmit: a,
|
|
901
|
-
renderEditor:
|
|
902
|
+
renderEditor: b,
|
|
902
903
|
clientMode: d
|
|
903
904
|
}
|
|
904
905
|
)
|
|
@@ -916,8 +917,8 @@ const rs = n.forwardRef(
|
|
|
916
917
|
className: d,
|
|
917
918
|
readOnly: f = !1,
|
|
918
919
|
...m
|
|
919
|
-
},
|
|
920
|
-
return /* @__PURE__ */ o("div", { ref:
|
|
920
|
+
}, h) {
|
|
921
|
+
return /* @__PURE__ */ o("div", { ref: h, className: p("flex flex-col", d), ...m, children: [
|
|
921
922
|
!f && /* @__PURE__ */ s(Ke, { onUpload: r, isUploading: i }),
|
|
922
923
|
e.length > 0 ? /* @__PURE__ */ s(We, { className: "mt-ds-05", children: e.map((u) => /* @__PURE__ */ s(
|
|
923
924
|
Ue,
|
|
@@ -949,8 +950,8 @@ const as = n.forwardRef(
|
|
|
949
950
|
className: d,
|
|
950
951
|
readOnly: f = !1,
|
|
951
952
|
...m
|
|
952
|
-
},
|
|
953
|
-
return /* @__PURE__ */ o("div", { ref:
|
|
953
|
+
}, h) {
|
|
954
|
+
return /* @__PURE__ */ o("div", { ref: h, className: p("flex flex-col", d), ...m, children: [
|
|
954
955
|
e.length > 0 ? /* @__PURE__ */ s("div", { className: "space-y-ds-04", children: e.map((u) => /* @__PURE__ */ s(
|
|
955
956
|
Je,
|
|
956
957
|
{
|
|
@@ -991,12 +992,12 @@ const ns = n.forwardRef(
|
|
|
991
992
|
className: r,
|
|
992
993
|
...a
|
|
993
994
|
}
|
|
994
|
-
) : /* @__PURE__ */ s(Xe, { ref: i, className:
|
|
995
|
+
) : /* @__PURE__ */ s(Xe, { ref: i, className: p(r), ...a, children: e.map((d) => /* @__PURE__ */ s(es, { entry: d }, d.id)) });
|
|
995
996
|
}
|
|
996
997
|
);
|
|
997
998
|
ns.displayName = "ActivityTab";
|
|
998
999
|
const is = n.createContext(null);
|
|
999
|
-
function
|
|
1000
|
+
function P() {
|
|
1000
1001
|
const t = n.useContext(is);
|
|
1001
1002
|
if (!t)
|
|
1002
1003
|
throw new Error("useTaskActionRow must be used within a TaskActionRow.Root");
|
|
@@ -1005,8 +1006,8 @@ function L() {
|
|
|
1005
1006
|
const ne = n.forwardRef(
|
|
1006
1007
|
({ task: t, children: e, onClick: r, onContextMenu: a, showSeparator: i = !0, className: d }, f) => {
|
|
1007
1008
|
const m = n.useCallback(
|
|
1008
|
-
(
|
|
1009
|
-
r && (
|
|
1009
|
+
(h) => {
|
|
1010
|
+
r && (h.key === "Enter" || h.key === " ") && (h.preventDefault(), r());
|
|
1010
1011
|
},
|
|
1011
1012
|
[r]
|
|
1012
1013
|
);
|
|
@@ -1019,9 +1020,9 @@ const ne = n.forwardRef(
|
|
|
1019
1020
|
onClick: r,
|
|
1020
1021
|
onKeyDown: r ? m : void 0,
|
|
1021
1022
|
onContextMenu: a,
|
|
1022
|
-
className:
|
|
1023
|
+
className: p(
|
|
1023
1024
|
"group flex items-center gap-ds-03 px-ds-04 py-ds-03 rounded-ds-md",
|
|
1024
|
-
r && "hover:bg-surface-
|
|
1025
|
+
r && "hover:bg-surface-raised-hover active:bg-surface-raised-active transition-colors duration-150",
|
|
1025
1026
|
i && "border-b border-surface-border",
|
|
1026
1027
|
d
|
|
1027
1028
|
),
|
|
@@ -1033,7 +1034,7 @@ const ne = n.forwardRef(
|
|
|
1033
1034
|
ne.displayName = "TaskActionRowRoot";
|
|
1034
1035
|
const ie = n.forwardRef(
|
|
1035
1036
|
({ onComplete: t }, e) => {
|
|
1036
|
-
const { task: r } =
|
|
1037
|
+
const { task: r } = P(), [a, i] = n.useState(!1), d = n.useCallback(
|
|
1037
1038
|
(m) => {
|
|
1038
1039
|
m.stopPropagation();
|
|
1039
1040
|
},
|
|
@@ -1059,9 +1060,9 @@ const ie = n.forwardRef(
|
|
|
1059
1060
|
ie.displayName = "TaskActionRowCheckbox";
|
|
1060
1061
|
const oe = n.forwardRef(
|
|
1061
1062
|
(t, e) => {
|
|
1062
|
-
const { task: r } =
|
|
1063
|
+
const { task: r } = P();
|
|
1063
1064
|
return /* @__PURE__ */ s(
|
|
1064
|
-
|
|
1065
|
+
Ps,
|
|
1065
1066
|
{
|
|
1066
1067
|
ref: e,
|
|
1067
1068
|
priority: r.priority,
|
|
@@ -1073,12 +1074,12 @@ const oe = n.forwardRef(
|
|
|
1073
1074
|
oe.displayName = "TaskActionRowPriority";
|
|
1074
1075
|
const ce = n.forwardRef(
|
|
1075
1076
|
({ truncate: t, className: e }, r) => {
|
|
1076
|
-
const { task: a } =
|
|
1077
|
+
const { task: a } = P();
|
|
1077
1078
|
return /* @__PURE__ */ s(
|
|
1078
1079
|
"span",
|
|
1079
1080
|
{
|
|
1080
1081
|
ref: r,
|
|
1081
|
-
className:
|
|
1082
|
+
className: p(
|
|
1082
1083
|
"flex-1 text-surface-fg text-ds-md font-medium",
|
|
1083
1084
|
t && "truncate",
|
|
1084
1085
|
e
|
|
@@ -1091,7 +1092,7 @@ const ce = n.forwardRef(
|
|
|
1091
1092
|
ce.displayName = "TaskActionRowTitle";
|
|
1092
1093
|
const le = n.forwardRef(
|
|
1093
1094
|
({ max: t }, e) => {
|
|
1094
|
-
const { task: r } =
|
|
1095
|
+
const { task: r } = P();
|
|
1095
1096
|
if (!r.labels || r.labels.length === 0) return null;
|
|
1096
1097
|
const a = t != null ? r.labels.slice(0, t) : r.labels, i = t != null ? r.labels.length - t : 0;
|
|
1097
1098
|
return /* @__PURE__ */ o("div", { ref: e, className: "flex items-center gap-ds-02", children: [
|
|
@@ -1106,7 +1107,7 @@ const le = n.forwardRef(
|
|
|
1106
1107
|
le.displayName = "TaskActionRowLabels";
|
|
1107
1108
|
const de = n.forwardRef(
|
|
1108
1109
|
({ onClick: t }, e) => {
|
|
1109
|
-
const { task: r } =
|
|
1110
|
+
const { task: r } = P(), a = n.useCallback(
|
|
1110
1111
|
(i) => {
|
|
1111
1112
|
t && (i.stopPropagation(), t(i));
|
|
1112
1113
|
},
|
|
@@ -1120,17 +1121,17 @@ const de = n.forwardRef(
|
|
|
1120
1121
|
color: "default",
|
|
1121
1122
|
size: "xs",
|
|
1122
1123
|
onClick: a,
|
|
1123
|
-
className:
|
|
1124
|
+
className: p(t && "cursor-pointer hover:bg-surface-raised-active transition-colors duration-150"),
|
|
1124
1125
|
children: r.projectName
|
|
1125
1126
|
}
|
|
1126
1127
|
) : null;
|
|
1127
1128
|
}
|
|
1128
1129
|
);
|
|
1129
1130
|
de.displayName = "TaskActionRowProjectBadge";
|
|
1130
|
-
function
|
|
1131
|
+
function Lt(t) {
|
|
1131
1132
|
return (/* @__PURE__ */ new Date(t + "T00:00:00")).toLocaleDateString("en-US", { month: "short", day: "numeric" });
|
|
1132
1133
|
}
|
|
1133
|
-
function
|
|
1134
|
+
function jt(t) {
|
|
1134
1135
|
const e = /* @__PURE__ */ new Date(), r = [
|
|
1135
1136
|
e.getFullYear(),
|
|
1136
1137
|
String(e.getMonth() + 1).padStart(2, "0"),
|
|
@@ -1140,26 +1141,26 @@ function Lt(t) {
|
|
|
1140
1141
|
}
|
|
1141
1142
|
const ue = n.forwardRef(
|
|
1142
1143
|
(t, e) => {
|
|
1143
|
-
const { task: r } =
|
|
1144
|
+
const { task: r } = P();
|
|
1144
1145
|
if (!r.dueDate) return null;
|
|
1145
|
-
const a = r.isOverdue, i =
|
|
1146
|
+
const a = r.isOverdue, i = jt(r.dueDate);
|
|
1146
1147
|
return /* @__PURE__ */ s(
|
|
1147
1148
|
"span",
|
|
1148
1149
|
{
|
|
1149
1150
|
ref: e,
|
|
1150
|
-
className:
|
|
1151
|
+
className: p(
|
|
1151
1152
|
"text-ds-sm whitespace-nowrap",
|
|
1152
1153
|
a && "text-error-11 font-medium",
|
|
1153
1154
|
!a && i && "text-warning-11",
|
|
1154
1155
|
!a && !i && "text-surface-fg-muted"
|
|
1155
1156
|
),
|
|
1156
|
-
children:
|
|
1157
|
+
children: Lt(r.dueDate)
|
|
1157
1158
|
}
|
|
1158
1159
|
);
|
|
1159
1160
|
}
|
|
1160
1161
|
);
|
|
1161
1162
|
ue.displayName = "TaskActionRowDueDate";
|
|
1162
|
-
const
|
|
1163
|
+
const Ot = {
|
|
1163
1164
|
active: "active",
|
|
1164
1165
|
pending: "pending",
|
|
1165
1166
|
approved: "approved",
|
|
@@ -1170,11 +1171,11 @@ const Pt = {
|
|
|
1170
1171
|
draft: "draft"
|
|
1171
1172
|
}, me = n.forwardRef(
|
|
1172
1173
|
(t, e) => {
|
|
1173
|
-
const { task: r } =
|
|
1174
|
+
const { task: r } = P();
|
|
1174
1175
|
if (!r.stage) return null;
|
|
1175
|
-
const a = r.stage.toLowerCase(), i =
|
|
1176
|
+
const a = r.stage.toLowerCase(), i = Ot[a];
|
|
1176
1177
|
return i ? /* @__PURE__ */ s(
|
|
1177
|
-
|
|
1178
|
+
Ls,
|
|
1178
1179
|
{
|
|
1179
1180
|
ref: e,
|
|
1180
1181
|
status: i,
|
|
@@ -1218,13 +1219,13 @@ const os = n.forwardRef(
|
|
|
1218
1219
|
showPriority: d,
|
|
1219
1220
|
showLabels: f,
|
|
1220
1221
|
showProject: m,
|
|
1221
|
-
showDueDate:
|
|
1222
|
+
showDueDate: h,
|
|
1222
1223
|
showNavigate: u,
|
|
1223
1224
|
showStatusBadge: x,
|
|
1224
|
-
truncateTitle:
|
|
1225
|
-
showSeparator:
|
|
1226
|
-
maxLabels:
|
|
1227
|
-
navigateHref:
|
|
1225
|
+
truncateTitle: b,
|
|
1226
|
+
showSeparator: v,
|
|
1227
|
+
maxLabels: g = 2,
|
|
1228
|
+
navigateHref: N,
|
|
1228
1229
|
onProjectClick: y,
|
|
1229
1230
|
onNavigateClick: w,
|
|
1230
1231
|
className: D
|
|
@@ -1235,23 +1236,23 @@ const os = n.forwardRef(
|
|
|
1235
1236
|
task: t,
|
|
1236
1237
|
onClick: e,
|
|
1237
1238
|
onContextMenu: a,
|
|
1238
|
-
showSeparator:
|
|
1239
|
+
showSeparator: v,
|
|
1239
1240
|
className: D,
|
|
1240
1241
|
children: [
|
|
1241
1242
|
i && /* @__PURE__ */ s(ie, { onComplete: r }),
|
|
1242
1243
|
d && /* @__PURE__ */ s(oe, {}),
|
|
1243
|
-
/* @__PURE__ */ s(ce, { truncate:
|
|
1244
|
-
f && /* @__PURE__ */ s(le, { max:
|
|
1244
|
+
/* @__PURE__ */ s(ce, { truncate: b }),
|
|
1245
|
+
f && /* @__PURE__ */ s(le, { max: g }),
|
|
1245
1246
|
m && /* @__PURE__ */ s(de, { onClick: y }),
|
|
1246
|
-
|
|
1247
|
+
h && /* @__PURE__ */ s(ue, {}),
|
|
1247
1248
|
x && /* @__PURE__ */ s(me, {}),
|
|
1248
|
-
u && /* @__PURE__ */ s(fe, { href:
|
|
1249
|
+
u && /* @__PURE__ */ s(fe, { href: N, onClick: w })
|
|
1249
1250
|
]
|
|
1250
1251
|
}
|
|
1251
1252
|
)
|
|
1252
1253
|
);
|
|
1253
1254
|
os.displayName = "TaskActionRow";
|
|
1254
|
-
const
|
|
1255
|
+
const cr = Object.assign(os, {
|
|
1255
1256
|
Root: ne,
|
|
1256
1257
|
Checkbox: ie,
|
|
1257
1258
|
Priority: oe,
|
|
@@ -1261,7 +1262,7 @@ const nr = Object.assign(os, {
|
|
|
1261
1262
|
DueDate: ue,
|
|
1262
1263
|
StatusBadge: me,
|
|
1263
1264
|
Navigate: fe
|
|
1264
|
-
}),
|
|
1265
|
+
}), _t = ["LOW", "MEDIUM", "HIGH", "URGENT"];
|
|
1265
1266
|
function S({
|
|
1266
1267
|
icon: t,
|
|
1267
1268
|
label: e,
|
|
@@ -1271,7 +1272,7 @@ function S({
|
|
|
1271
1272
|
return /* @__PURE__ */ o(
|
|
1272
1273
|
"div",
|
|
1273
1274
|
{
|
|
1274
|
-
className:
|
|
1275
|
+
className: p(
|
|
1275
1276
|
"flex items-center gap-ds-04 py-ds-03",
|
|
1276
1277
|
a
|
|
1277
1278
|
),
|
|
@@ -1285,10 +1286,10 @@ function S({
|
|
|
1285
1286
|
}
|
|
1286
1287
|
);
|
|
1287
1288
|
}
|
|
1288
|
-
function
|
|
1289
|
+
function Ft({ priority: t }) {
|
|
1289
1290
|
return /* @__PURE__ */ o("div", { className: "flex items-center gap-ds-02b", children: [
|
|
1290
|
-
/* @__PURE__ */ s("div", { className:
|
|
1291
|
-
/* @__PURE__ */ s("span", { className: "text-ds-md text-surface-fg", children:
|
|
1291
|
+
/* @__PURE__ */ s("div", { className: p("h-2 w-2 rounded-ds-full", Fe[t]) }),
|
|
1292
|
+
/* @__PURE__ */ s("span", { className: "text-ds-md text-surface-fg", children: yt[t] || t })
|
|
1292
1293
|
] });
|
|
1293
1294
|
}
|
|
1294
1295
|
const cs = n.forwardRef(
|
|
@@ -1300,22 +1301,22 @@ const cs = n.forwardRef(
|
|
|
1300
1301
|
onAssign: d,
|
|
1301
1302
|
onUnassign: f,
|
|
1302
1303
|
className: m,
|
|
1303
|
-
readOnly:
|
|
1304
|
+
readOnly: h = !1,
|
|
1304
1305
|
editableFields: u,
|
|
1305
1306
|
renderPriorityIndicator: x,
|
|
1306
|
-
renderDatePicker:
|
|
1307
|
-
onConfirmVisibilityChange:
|
|
1308
|
-
...
|
|
1309
|
-
},
|
|
1310
|
-
const [y, w] = n.useState(""), [D, R] = n.useState(!1),
|
|
1307
|
+
renderDatePicker: b,
|
|
1308
|
+
onConfirmVisibilityChange: v,
|
|
1309
|
+
...g
|
|
1310
|
+
}, N) {
|
|
1311
|
+
const [y, w] = n.useState(""), [D, R] = n.useState(!1), k = e.assignees.map((l) => l.user.id), E = n.useMemo(
|
|
1311
1312
|
() => a.map((l) => ({ id: l.id, name: l.name, avatar: l.image ?? void 0 })),
|
|
1312
1313
|
[a]
|
|
1313
|
-
),
|
|
1314
|
+
), L = (l) => {
|
|
1314
1315
|
i("columnId", l);
|
|
1315
1316
|
}, j = (l) => {
|
|
1316
1317
|
i("ownerId", l === e.ownerId ? null : l);
|
|
1317
|
-
},
|
|
1318
|
-
|
|
1318
|
+
}, he = (l) => {
|
|
1319
|
+
k.includes(l) ? f(l) : d(l);
|
|
1319
1320
|
}, O = (l) => {
|
|
1320
1321
|
i("priority", l);
|
|
1321
1322
|
}, I = (l) => {
|
|
@@ -1327,19 +1328,19 @@ const cs = n.forwardRef(
|
|
|
1327
1328
|
i("labels", e.labels.filter((J) => J !== l));
|
|
1328
1329
|
}, Z = () => {
|
|
1329
1330
|
const l = e.visibility === "INTERNAL" ? "EVERYONE" : "INTERNAL";
|
|
1330
|
-
if (l === "EVERYONE" &&
|
|
1331
|
-
|
|
1331
|
+
if (l === "EVERYONE" && v) {
|
|
1332
|
+
v();
|
|
1332
1333
|
return;
|
|
1333
1334
|
}
|
|
1334
1335
|
i("visibility", l);
|
|
1335
|
-
}, $ = x ||
|
|
1336
|
-
return /* @__PURE__ */ o("div", { ref:
|
|
1337
|
-
/* @__PURE__ */ s(S, { icon: Qs, label: "Column", children:
|
|
1336
|
+
}, $ = x || Ft;
|
|
1337
|
+
return /* @__PURE__ */ o("div", { ref: N, className: p("space-y-ds-01", m), ...g, children: [
|
|
1338
|
+
/* @__PURE__ */ s(S, { icon: Qs, label: "Column", children: h && !(u != null && u.includes("columnId")) ? /* @__PURE__ */ s("span", { className: "px-ds-03 py-ds-02 text-ds-md text-surface-fg", children: e.column.name }) : /* @__PURE__ */ o(ye, { children: [
|
|
1338
1339
|
/* @__PURE__ */ s(Re, { asChild: !0, children: /* @__PURE__ */ o(
|
|
1339
1340
|
"button",
|
|
1340
1341
|
{
|
|
1341
1342
|
type: "button",
|
|
1342
|
-
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-
|
|
1343
|
+
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-raised-hover",
|
|
1343
1344
|
children: [
|
|
1344
1345
|
/* @__PURE__ */ s("span", { children: e.column.name }),
|
|
1345
1346
|
/* @__PURE__ */ s(Xs, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
@@ -1349,17 +1350,17 @@ const cs = n.forwardRef(
|
|
|
1349
1350
|
/* @__PURE__ */ s(
|
|
1350
1351
|
Ce,
|
|
1351
1352
|
{
|
|
1352
|
-
className: "w-[180px] border-surface-border-strong bg-surface-
|
|
1353
|
+
className: "w-[180px] border-surface-border-strong bg-surface-overlay p-ds-02",
|
|
1353
1354
|
align: "start",
|
|
1354
1355
|
sideOffset: 4,
|
|
1355
1356
|
children: r.map((l) => /* @__PURE__ */ o(
|
|
1356
1357
|
"button",
|
|
1357
1358
|
{
|
|
1358
1359
|
type: "button",
|
|
1359
|
-
onClick: () =>
|
|
1360
|
-
className:
|
|
1360
|
+
onClick: () => L(l.id),
|
|
1361
|
+
className: p(
|
|
1361
1362
|
"flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-left text-ds-md transition-colors",
|
|
1362
|
-
"hover:bg-surface-
|
|
1363
|
+
"hover:bg-surface-raised-hover",
|
|
1363
1364
|
l.id === e.columnId ? "text-accent-11" : "text-surface-fg"
|
|
1364
1365
|
),
|
|
1365
1366
|
children: [
|
|
@@ -1372,21 +1373,21 @@ const cs = n.forwardRef(
|
|
|
1372
1373
|
}
|
|
1373
1374
|
)
|
|
1374
1375
|
] }) }),
|
|
1375
|
-
!
|
|
1376
|
+
!h && /* @__PURE__ */ s(S, { icon: et, label: "Owner", children: /* @__PURE__ */ s(
|
|
1376
1377
|
se,
|
|
1377
1378
|
{
|
|
1378
|
-
members:
|
|
1379
|
+
members: E,
|
|
1379
1380
|
selectedIds: e.ownerId ? [e.ownerId] : [],
|
|
1380
1381
|
onSelect: j,
|
|
1381
1382
|
children: /* @__PURE__ */ s(
|
|
1382
1383
|
"button",
|
|
1383
1384
|
{
|
|
1384
1385
|
type: "button",
|
|
1385
|
-
className: "inline-flex items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-surface-
|
|
1386
|
+
className: "inline-flex items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-surface-raised-hover",
|
|
1386
1387
|
children: e.owner ? /* @__PURE__ */ o(ke, { children: [
|
|
1387
1388
|
/* @__PURE__ */ o(F, { className: "h-ico-md w-ico-md", children: [
|
|
1388
1389
|
e.owner.image && /* @__PURE__ */ s(B, { src: e.owner.image, alt: e.owner.name }),
|
|
1389
|
-
/* @__PURE__ */ s(V, { className: "bg-surface-
|
|
1390
|
+
/* @__PURE__ */ s(V, { className: "bg-surface-raised-hover text-ds-xs font-semibold text-surface-fg", children: z(e.owner.name) })
|
|
1390
1391
|
] }),
|
|
1391
1392
|
/* @__PURE__ */ s("span", { className: "text-ds-md text-surface-fg", children: e.owner.name })
|
|
1392
1393
|
] }) : /* @__PURE__ */ s("span", { className: "text-ds-md text-surface-fg-subtle", children: "No owner" })
|
|
@@ -1398,19 +1399,19 @@ const cs = n.forwardRef(
|
|
|
1398
1399
|
e.assignees.map((l) => /* @__PURE__ */ o(
|
|
1399
1400
|
"div",
|
|
1400
1401
|
{
|
|
1401
|
-
className: "inline-flex items-center gap-ds-02 rounded-ds-full bg-surface-
|
|
1402
|
+
className: "inline-flex items-center gap-ds-02 rounded-ds-full bg-surface-raised py-ds-01 pl-ds-01 pr-ds-03",
|
|
1402
1403
|
children: [
|
|
1403
1404
|
/* @__PURE__ */ o(F, { className: "h-ico-sm w-ico-sm", children: [
|
|
1404
1405
|
l.user.image && /* @__PURE__ */ s(B, { src: l.user.image, alt: l.user.name }),
|
|
1405
|
-
/* @__PURE__ */ s(V, { className: "bg-surface-
|
|
1406
|
+
/* @__PURE__ */ s(V, { className: "bg-surface-raised-hover text-ds-xs font-semibold text-surface-fg", children: z(l.user.name) })
|
|
1406
1407
|
] }),
|
|
1407
1408
|
/* @__PURE__ */ s("span", { className: "text-ds-sm text-surface-fg-muted", children: l.user.name.split(" ")[0] }),
|
|
1408
|
-
!
|
|
1409
|
+
!h && /* @__PURE__ */ s(
|
|
1409
1410
|
"button",
|
|
1410
1411
|
{
|
|
1411
1412
|
type: "button",
|
|
1412
1413
|
onClick: () => f(l.user.id),
|
|
1413
|
-
className: "ml-ds-01 rounded-ds-full p-ds-01 transition-colors hover:bg-surface-
|
|
1414
|
+
className: "ml-ds-01 rounded-ds-full p-ds-01 transition-colors hover:bg-surface-raised-hover",
|
|
1414
1415
|
"aria-label": `Remove ${l.user.name}`,
|
|
1415
1416
|
children: /* @__PURE__ */ s(K, { className: "h-ds-03 w-ds-03 text-surface-fg-subtle" })
|
|
1416
1417
|
}
|
|
@@ -1419,50 +1420,50 @@ const cs = n.forwardRef(
|
|
|
1419
1420
|
},
|
|
1420
1421
|
l.user.id
|
|
1421
1422
|
)),
|
|
1422
|
-
!
|
|
1423
|
+
!h && /* @__PURE__ */ s(
|
|
1423
1424
|
se,
|
|
1424
1425
|
{
|
|
1425
|
-
members:
|
|
1426
|
-
selectedIds:
|
|
1427
|
-
onSelect:
|
|
1426
|
+
members: E,
|
|
1427
|
+
selectedIds: k,
|
|
1428
|
+
onSelect: he,
|
|
1428
1429
|
multiple: !0,
|
|
1429
1430
|
children: /* @__PURE__ */ s(
|
|
1430
1431
|
"button",
|
|
1431
1432
|
{
|
|
1432
1433
|
type: "button",
|
|
1433
|
-
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-
|
|
1434
|
+
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-raised-hover hover:border-surface-border",
|
|
1434
1435
|
"aria-label": "Add assignee",
|
|
1435
1436
|
children: /* @__PURE__ */ s(_, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
1436
1437
|
}
|
|
1437
1438
|
)
|
|
1438
1439
|
}
|
|
1439
1440
|
),
|
|
1440
|
-
|
|
1441
|
+
h && e.assignees.length === 0 && /* @__PURE__ */ s("span", { className: "text-ds-md text-surface-fg-subtle", children: "None" })
|
|
1441
1442
|
] }) }),
|
|
1442
|
-
/* @__PURE__ */ s(S, { icon:
|
|
1443
|
+
/* @__PURE__ */ s(S, { icon: Le, label: "Priority", children: /* @__PURE__ */ o(ye, { children: [
|
|
1443
1444
|
/* @__PURE__ */ s(Re, { asChild: !0, children: /* @__PURE__ */ s(
|
|
1444
1445
|
"button",
|
|
1445
1446
|
{
|
|
1446
1447
|
type: "button",
|
|
1447
|
-
className: "rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-surface-
|
|
1448
|
+
className: "rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-surface-raised-hover",
|
|
1448
1449
|
children: /* @__PURE__ */ s($, { priority: e.priority })
|
|
1449
1450
|
}
|
|
1450
1451
|
) }),
|
|
1451
1452
|
/* @__PURE__ */ s(
|
|
1452
1453
|
Ce,
|
|
1453
1454
|
{
|
|
1454
|
-
className: "w-[160px] border-surface-border-strong bg-surface-
|
|
1455
|
+
className: "w-[160px] border-surface-border-strong bg-surface-overlay p-ds-02",
|
|
1455
1456
|
align: "start",
|
|
1456
1457
|
sideOffset: 4,
|
|
1457
|
-
children:
|
|
1458
|
+
children: _t.map((l) => /* @__PURE__ */ s(
|
|
1458
1459
|
"button",
|
|
1459
1460
|
{
|
|
1460
1461
|
type: "button",
|
|
1461
1462
|
onClick: () => O(l),
|
|
1462
|
-
className:
|
|
1463
|
+
className: p(
|
|
1463
1464
|
"flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b transition-colors",
|
|
1464
|
-
"hover:bg-surface-
|
|
1465
|
-
l === e.priority && "bg-surface-
|
|
1465
|
+
"hover:bg-surface-raised-hover",
|
|
1466
|
+
l === e.priority && "bg-surface-raised-hover"
|
|
1466
1467
|
),
|
|
1467
1468
|
children: /* @__PURE__ */ s($, { priority: l })
|
|
1468
1469
|
},
|
|
@@ -1472,11 +1473,11 @@ const cs = n.forwardRef(
|
|
|
1472
1473
|
)
|
|
1473
1474
|
] }) }),
|
|
1474
1475
|
/* @__PURE__ */ s(S, { icon: Se, label: "Due Date", children: /* @__PURE__ */ o("div", { className: "flex items-center gap-ds-02", children: [
|
|
1475
|
-
|
|
1476
|
+
b ? b({
|
|
1476
1477
|
value: e.dueDate ? new Date(e.dueDate) : null,
|
|
1477
1478
|
onChange: I,
|
|
1478
1479
|
placeholder: "No due date",
|
|
1479
|
-
className: "h-ds-xs-plus border-none bg-transparent px-ds-03 text-ds-md hover:bg-surface-
|
|
1480
|
+
className: "h-ds-xs-plus border-none bg-transparent px-ds-03 text-ds-md hover:bg-surface-raised-hover"
|
|
1480
1481
|
}) : /* @__PURE__ */ s(
|
|
1481
1482
|
"input",
|
|
1482
1483
|
{
|
|
@@ -1484,7 +1485,7 @@ const cs = n.forwardRef(
|
|
|
1484
1485
|
value: e.dueDate ? new Date(e.dueDate).toISOString().split("T")[0] : "",
|
|
1485
1486
|
onChange: (l) => I(l.target.value ? new Date(l.target.value) : null),
|
|
1486
1487
|
"aria-label": "Due date",
|
|
1487
|
-
className: "h-ds-xs-plus border-none bg-transparent px-ds-03 text-ds-md text-surface-fg outline-none hover:bg-surface-
|
|
1488
|
+
className: "h-ds-xs-plus border-none bg-transparent px-ds-03 text-ds-md text-surface-fg outline-none hover:bg-surface-raised-hover rounded-ds-md"
|
|
1488
1489
|
}
|
|
1489
1490
|
),
|
|
1490
1491
|
e.dueDate && /* @__PURE__ */ s(
|
|
@@ -1492,25 +1493,25 @@ const cs = n.forwardRef(
|
|
|
1492
1493
|
{
|
|
1493
1494
|
type: "button",
|
|
1494
1495
|
onClick: () => I(null),
|
|
1495
|
-
className: "rounded-ds-md p-ds-02 transition-colors hover:bg-surface-
|
|
1496
|
+
className: "rounded-ds-md p-ds-02 transition-colors hover:bg-surface-raised-hover",
|
|
1496
1497
|
"aria-label": "Clear due date",
|
|
1497
1498
|
children: /* @__PURE__ */ s(K, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
1498
1499
|
}
|
|
1499
1500
|
)
|
|
1500
1501
|
] }) }),
|
|
1501
|
-
/* @__PURE__ */ s(S, { icon:
|
|
1502
|
+
/* @__PURE__ */ s(S, { icon: Pe, label: "Labels", children: /* @__PURE__ */ o("div", { className: "flex flex-wrap items-center gap-ds-02b", children: [
|
|
1502
1503
|
e.labels.map((l) => /* @__PURE__ */ o(
|
|
1503
1504
|
"span",
|
|
1504
1505
|
{
|
|
1505
1506
|
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",
|
|
1506
1507
|
children: [
|
|
1507
1508
|
l,
|
|
1508
|
-
!
|
|
1509
|
+
!h && /* @__PURE__ */ s(
|
|
1509
1510
|
"button",
|
|
1510
1511
|
{
|
|
1511
1512
|
type: "button",
|
|
1512
1513
|
onClick: () => U(l),
|
|
1513
|
-
className: "rounded-ds-full p-ds-01 transition-colors hover:bg-surface-
|
|
1514
|
+
className: "rounded-ds-full p-ds-01 transition-colors hover:bg-surface-raised-hover",
|
|
1514
1515
|
"aria-label": `Remove label ${l}`,
|
|
1515
1516
|
children: /* @__PURE__ */ s(K, { className: "h-ds-03 w-ds-03" })
|
|
1516
1517
|
}
|
|
@@ -1519,7 +1520,7 @@ const cs = n.forwardRef(
|
|
|
1519
1520
|
},
|
|
1520
1521
|
l
|
|
1521
1522
|
)),
|
|
1522
|
-
!
|
|
1523
|
+
!h && (D ? /* @__PURE__ */ s("div", { className: "inline-flex items-center gap-ds-02", children: /* @__PURE__ */ s(
|
|
1523
1524
|
"input",
|
|
1524
1525
|
{
|
|
1525
1526
|
type: "text",
|
|
@@ -1539,27 +1540,27 @@ const cs = n.forwardRef(
|
|
|
1539
1540
|
{
|
|
1540
1541
|
type: "button",
|
|
1541
1542
|
onClick: () => R(!0),
|
|
1542
|
-
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-
|
|
1543
|
+
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-raised-hover hover:border-surface-border",
|
|
1543
1544
|
"aria-label": "Add label",
|
|
1544
1545
|
children: /* @__PURE__ */ s(_, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
1545
1546
|
}
|
|
1546
1547
|
)),
|
|
1547
|
-
|
|
1548
|
+
h && e.labels.length === 0 && /* @__PURE__ */ s("span", { className: "text-ds-md text-surface-fg-subtle", children: "None" })
|
|
1548
1549
|
] }) }),
|
|
1549
|
-
!
|
|
1550
|
+
!h && /* @__PURE__ */ s(S, { icon: je, label: "Visibility", children: /* @__PURE__ */ o(
|
|
1550
1551
|
"button",
|
|
1551
1552
|
{
|
|
1552
1553
|
type: "button",
|
|
1553
1554
|
onClick: Z,
|
|
1554
|
-
className:
|
|
1555
|
+
className: p(
|
|
1555
1556
|
"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",
|
|
1556
|
-
e.visibility === "EVERYONE" ? "bg-success-3 text-success-11" : "bg-surface-
|
|
1557
|
+
e.visibility === "EVERYONE" ? "bg-success-3 text-success-11" : "bg-surface-raised text-surface-fg-subtle"
|
|
1557
1558
|
),
|
|
1558
1559
|
children: [
|
|
1559
1560
|
/* @__PURE__ */ s(
|
|
1560
1561
|
"span",
|
|
1561
1562
|
{
|
|
1562
|
-
className:
|
|
1563
|
+
className: p(
|
|
1563
1564
|
"h-ds-02b w-ds-02b rounded-ds-full",
|
|
1564
1565
|
e.visibility === "EVERYONE" ? "bg-success-9" : "bg-disabled"
|
|
1565
1566
|
)
|
|
@@ -1580,22 +1581,22 @@ const Te = [
|
|
|
1580
1581
|
{ id: "files", label: "Files", icon: re },
|
|
1581
1582
|
{ id: "activity", label: "Activity", icon: ae }
|
|
1582
1583
|
];
|
|
1583
|
-
function
|
|
1584
|
+
function Bt() {
|
|
1584
1585
|
return /* @__PURE__ */ o("div", { className: "space-y-ds-06 p-ds-06", children: [
|
|
1585
|
-
/* @__PURE__ */ s(A, { className: "h-ds-xs-plus w-3/4 bg-surface-
|
|
1586
|
+
/* @__PURE__ */ s(A, { className: "h-ds-xs-plus w-3/4 bg-surface-raised-hover" }),
|
|
1586
1587
|
/* @__PURE__ */ s("div", { className: "space-y-ds-04", children: Array.from({ length: 6 }).map((t, e) => /* @__PURE__ */ o("div", { className: "flex items-center gap-ds-04", children: [
|
|
1587
|
-
/* @__PURE__ */ s(A, { className: "h-[16px] w-[120px] bg-surface-
|
|
1588
|
-
/* @__PURE__ */ s(A, { className: "h-[16px] flex-1 bg-surface-
|
|
1588
|
+
/* @__PURE__ */ s(A, { className: "h-[16px] w-[120px] bg-surface-raised-hover" }),
|
|
1589
|
+
/* @__PURE__ */ s(A, { className: "h-[16px] flex-1 bg-surface-raised-hover" })
|
|
1589
1590
|
] }, e)) }),
|
|
1590
|
-
/* @__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-
|
|
1591
|
+
/* @__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-raised-hover" }, e)) }),
|
|
1591
1592
|
/* @__PURE__ */ o("div", { className: "space-y-ds-04", children: [
|
|
1592
|
-
/* @__PURE__ */ s(A, { className: "h-ds-md w-full bg-surface-
|
|
1593
|
-
/* @__PURE__ */ s(A, { className: "h-ds-md w-full bg-surface-
|
|
1594
|
-
/* @__PURE__ */ s(A, { className: "h-ds-md w-4/5 bg-surface-
|
|
1593
|
+
/* @__PURE__ */ s(A, { className: "h-ds-md w-full bg-surface-raised-hover" }),
|
|
1594
|
+
/* @__PURE__ */ s(A, { className: "h-ds-md w-full bg-surface-raised-hover" }),
|
|
1595
|
+
/* @__PURE__ */ s(A, { className: "h-ds-md w-4/5 bg-surface-raised-hover" })
|
|
1595
1596
|
] })
|
|
1596
1597
|
] });
|
|
1597
1598
|
}
|
|
1598
|
-
const
|
|
1599
|
+
const Vt = n.forwardRef(function({
|
|
1599
1600
|
task: e,
|
|
1600
1601
|
loading: r = !1,
|
|
1601
1602
|
open: a,
|
|
@@ -1603,22 +1604,22 @@ const Ft = n.forwardRef(function({
|
|
|
1603
1604
|
columns: d,
|
|
1604
1605
|
members: f,
|
|
1605
1606
|
activities: m = [],
|
|
1606
|
-
enrichedComments:
|
|
1607
|
+
enrichedComments: h,
|
|
1607
1608
|
clientMode: u = !1,
|
|
1608
1609
|
clientEditableFields: x = ["priority", "dueDate"],
|
|
1609
|
-
headerSlot:
|
|
1610
|
-
extraTabs:
|
|
1611
|
-
onTitleUpdate:
|
|
1612
|
-
onPropertyUpdate:
|
|
1610
|
+
headerSlot: b,
|
|
1611
|
+
extraTabs: v = [],
|
|
1612
|
+
onTitleUpdate: g,
|
|
1613
|
+
onPropertyUpdate: N,
|
|
1613
1614
|
onAssign: y,
|
|
1614
1615
|
onUnassign: w,
|
|
1615
1616
|
onCreateSubtask: D,
|
|
1616
1617
|
onToggleSubtask: R,
|
|
1617
|
-
onRequestReview:
|
|
1618
|
-
onUpdateReviewStatus:
|
|
1619
|
-
onPostComment:
|
|
1618
|
+
onRequestReview: k,
|
|
1619
|
+
onUpdateReviewStatus: E,
|
|
1620
|
+
onPostComment: L,
|
|
1620
1621
|
onUploadFile: j,
|
|
1621
|
-
onUploadDeliverable:
|
|
1622
|
+
onUploadDeliverable: he,
|
|
1622
1623
|
onDeleteFile: O,
|
|
1623
1624
|
onTabChange: I,
|
|
1624
1625
|
renderEditor: M,
|
|
@@ -1629,73 +1630,73 @@ const Ft = n.forwardRef(function({
|
|
|
1629
1630
|
className: J,
|
|
1630
1631
|
...ls
|
|
1631
1632
|
}, ds) {
|
|
1632
|
-
var xe,
|
|
1633
|
-
const [
|
|
1633
|
+
var xe, ve, Ne;
|
|
1634
|
+
const [T, pe] = n.useState(u ? "conversation" : "subtasks"), [Q, q] = n.useState(!1), [be, G] = n.useState(""), Y = n.useRef(null);
|
|
1634
1635
|
n.useEffect(() => {
|
|
1635
1636
|
e && (G(e.title), q(!1));
|
|
1636
1637
|
}, [e == null ? void 0 : e.id]), n.useEffect(() => {
|
|
1637
|
-
a &&
|
|
1638
|
+
a && pe(u ? "conversation" : "subtasks");
|
|
1638
1639
|
}, [a, u]);
|
|
1639
1640
|
const us = n.useCallback((c) => {
|
|
1640
|
-
|
|
1641
|
+
pe(c), I == null || I(c);
|
|
1641
1642
|
}, [I]), ms = n.useCallback((c, C) => {
|
|
1642
|
-
u && !x.includes(c) ||
|
|
1643
|
-
}, [u, x,
|
|
1643
|
+
u && !x.includes(c) || N == null || N(c, C);
|
|
1644
|
+
}, [u, x, N]), fs = n.useCallback((c) => {
|
|
1644
1645
|
y == null || y(c);
|
|
1645
|
-
}, [y]),
|
|
1646
|
+
}, [y]), hs = n.useCallback((c) => {
|
|
1646
1647
|
w == null || w(c);
|
|
1647
|
-
}, [w]),
|
|
1648
|
+
}, [w]), ps = n.useCallback((c) => {
|
|
1648
1649
|
D == null || D(c);
|
|
1649
|
-
}, [D]),
|
|
1650
|
+
}, [D]), bs = n.useCallback((c, C) => {
|
|
1650
1651
|
R == null || R(c, C);
|
|
1651
|
-
}, [R]),
|
|
1652
|
-
|
|
1653
|
-
}, [
|
|
1654
|
-
|
|
1655
|
-
}, [
|
|
1656
|
-
|
|
1657
|
-
}, [
|
|
1652
|
+
}, [R]), gs = n.useCallback((c) => {
|
|
1653
|
+
k == null || k(c);
|
|
1654
|
+
}, [k]), xs = n.useCallback((c, C, As) => {
|
|
1655
|
+
E == null || E(c, C, As);
|
|
1656
|
+
}, [E]), vs = n.useCallback((c, C) => {
|
|
1657
|
+
L == null || L(c, C);
|
|
1658
|
+
}, [L]), Ns = n.useCallback((c, C) => {
|
|
1658
1659
|
j == null || j(c, C);
|
|
1659
1660
|
}, [j]), ws = n.useCallback((c) => {
|
|
1660
1661
|
O == null || O(c);
|
|
1661
1662
|
}, [O]), X = n.useCallback((...c) => {
|
|
1662
1663
|
}, []), ys = n.useCallback((c, C) => {
|
|
1663
|
-
}, []),
|
|
1664
|
+
}, []), ge = () => {
|
|
1664
1665
|
q(!1);
|
|
1665
|
-
const c =
|
|
1666
|
-
c && c !== (e == null ? void 0 : e.title) ?
|
|
1666
|
+
const c = be.trim();
|
|
1667
|
+
c && c !== (e == null ? void 0 : e.title) ? g == null || g(c) : e && G(e.title);
|
|
1667
1668
|
}, Rs = (c) => {
|
|
1668
|
-
c.key === "Enter" && (c.preventDefault(),
|
|
1669
|
+
c.key === "Enter" && (c.preventDefault(), ge()), c.key === "Escape" && (q(!1), e && G(e.title));
|
|
1669
1670
|
};
|
|
1670
1671
|
n.useEffect(() => {
|
|
1671
1672
|
Q && Y.current && (Y.current.focus(), Y.current.select());
|
|
1672
1673
|
}, [Q]);
|
|
1673
|
-
const Cs = (xe = d.find((c) => c.isTerminal)) == null ? void 0 : xe.id, Ds = ((
|
|
1674
|
-
return /* @__PURE__ */ s(
|
|
1675
|
-
|
|
1674
|
+
const Cs = (xe = d.find((c) => c.isTerminal)) == null ? void 0 : xe.id, Ds = ((ve = d.find((c) => c.isDefault)) == null ? void 0 : ve.id) || ((Ne = d[0]) == null ? void 0 : Ne.id) || "", Is = u ? Te.filter((c) => c.id === "conversation") : Te, Ts = v.filter((c) => c.position === "before"), ks = v.filter((c) => c.position !== "before"), Es = h || (e == null ? void 0 : e.comments) || [];
|
|
1675
|
+
return /* @__PURE__ */ s(nt, { open: a, onOpenChange: i, children: /* @__PURE__ */ o(
|
|
1676
|
+
it,
|
|
1676
1677
|
{
|
|
1677
1678
|
ref: ds,
|
|
1678
1679
|
side: "right",
|
|
1679
|
-
className:
|
|
1680
|
+
className: p(
|
|
1680
1681
|
/* intentional: task detail side panel takes 40% of screen, min 380px for form usability */
|
|
1681
1682
|
"w-full sm:max-w-none sm:w-[40%] min-w-[380px] p-0",
|
|
1682
1683
|
"flex flex-col overflow-hidden",
|
|
1683
|
-
"border-l border-surface-border-strong bg-surface-
|
|
1684
|
+
"border-l border-surface-border-strong bg-surface-raised",
|
|
1684
1685
|
J
|
|
1685
1686
|
),
|
|
1686
1687
|
...ls,
|
|
1687
1688
|
children: [
|
|
1688
|
-
/* @__PURE__ */ s(
|
|
1689
|
-
r || !e ? /* @__PURE__ */ s(
|
|
1689
|
+
/* @__PURE__ */ s(ct, { children: /* @__PURE__ */ s(ot, { children: (e == null ? void 0 : e.title) || "Task Details" }) }),
|
|
1690
|
+
r || !e ? /* @__PURE__ */ s(Bt, {}) : /* @__PURE__ */ o(ke, { children: [
|
|
1690
1691
|
/* @__PURE__ */ o("div", { className: "shrink-0 border-b border-surface-border-strong px-ds-06 pb-ds-05 pt-ds-06", children: [
|
|
1691
1692
|
!u && Q ? /* @__PURE__ */ s(
|
|
1692
1693
|
"input",
|
|
1693
1694
|
{
|
|
1694
1695
|
ref: Y,
|
|
1695
1696
|
type: "text",
|
|
1696
|
-
value:
|
|
1697
|
+
value: be,
|
|
1697
1698
|
onChange: (c) => G(c.target.value),
|
|
1698
|
-
onBlur:
|
|
1699
|
+
onBlur: ge,
|
|
1699
1700
|
onKeyDown: Rs,
|
|
1700
1701
|
className: "w-full bg-transparent text-ds-lg font-semibold text-surface-fg outline-none"
|
|
1701
1702
|
}
|
|
@@ -1715,7 +1716,7 @@ const Ft = n.forwardRef(function({
|
|
|
1715
1716
|
}
|
|
1716
1717
|
),
|
|
1717
1718
|
e.parentTaskId && /* @__PURE__ */ s("p", { className: "mt-ds-02 text-ds-sm text-surface-fg-subtle", children: "Subtask" }),
|
|
1718
|
-
|
|
1719
|
+
b && /* @__PURE__ */ s("div", { className: "mt-ds-03 flex items-center gap-ds-03", children: b })
|
|
1719
1720
|
] }),
|
|
1720
1721
|
/* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto", children: [
|
|
1721
1722
|
/* @__PURE__ */ s("div", { className: "border-b border-surface-border-strong px-ds-06 py-ds-05", children: /* @__PURE__ */ s(
|
|
@@ -1726,14 +1727,14 @@ const Ft = n.forwardRef(function({
|
|
|
1726
1727
|
members: f,
|
|
1727
1728
|
onUpdate: ms,
|
|
1728
1729
|
onAssign: fs,
|
|
1729
|
-
onUnassign:
|
|
1730
|
+
onUnassign: hs,
|
|
1730
1731
|
readOnly: u,
|
|
1731
1732
|
editableFields: u ? x : void 0,
|
|
1732
1733
|
renderPriorityIndicator: Z,
|
|
1733
1734
|
renderDatePicker: $
|
|
1734
1735
|
}
|
|
1735
1736
|
) }),
|
|
1736
|
-
/* @__PURE__ */ s("div", { className: "sticky top-0 z-raised bg-surface-
|
|
1737
|
+
/* @__PURE__ */ s("div", { className: "sticky top-0 z-raised bg-surface-overlay px-ds-06", children: /* @__PURE__ */ s(dt, { value: T, onValueChange: us, children: /* @__PURE__ */ o(ut, { variant: "line", children: [
|
|
1737
1738
|
Ts.map((c) => /* @__PURE__ */ o(ee, { value: c.id, children: [
|
|
1738
1739
|
c.icon && /* @__PURE__ */ s("span", { className: "[&>svg]:h-ico-sm [&>svg]:w-ico-sm shrink-0", children: c.icon }),
|
|
1739
1740
|
c.label
|
|
@@ -1747,73 +1748,84 @@ const Ft = n.forwardRef(function({
|
|
|
1747
1748
|
c.label
|
|
1748
1749
|
] }, c.id))
|
|
1749
1750
|
] }) }) }),
|
|
1750
|
-
/* @__PURE__ */
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
{
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1751
|
+
/* @__PURE__ */ s(rt, { mode: "wait", children: /* @__PURE__ */ o(
|
|
1752
|
+
at.div,
|
|
1753
|
+
{
|
|
1754
|
+
initial: { opacity: 0 },
|
|
1755
|
+
animate: { opacity: 1 },
|
|
1756
|
+
exit: { opacity: 0 },
|
|
1757
|
+
transition: { duration: 0.15 },
|
|
1758
|
+
className: "px-ds-06 py-ds-05",
|
|
1759
|
+
children: [
|
|
1760
|
+
T === "subtasks" && /* @__PURE__ */ s(
|
|
1761
|
+
ss,
|
|
1762
|
+
{
|
|
1763
|
+
subtasks: e.subtasks ?? [],
|
|
1764
|
+
terminalColumnId: Cs,
|
|
1765
|
+
projectId: e.projectId,
|
|
1766
|
+
parentTaskId: e.id,
|
|
1767
|
+
defaultColumnId: Ds,
|
|
1768
|
+
onCreateSubtask: u ? X : ps,
|
|
1769
|
+
onToggleSubtask: u ? ys : bs,
|
|
1770
|
+
readOnly: u
|
|
1771
|
+
}
|
|
1772
|
+
),
|
|
1773
|
+
T === "review" && !u && /* @__PURE__ */ s(
|
|
1774
|
+
as,
|
|
1775
|
+
{
|
|
1776
|
+
reviews: e.reviewRequests,
|
|
1777
|
+
members: f,
|
|
1778
|
+
onRequestReview: gs,
|
|
1779
|
+
onUpdateStatus: xs
|
|
1780
|
+
}
|
|
1781
|
+
),
|
|
1782
|
+
T === "conversation" && /* @__PURE__ */ s(
|
|
1783
|
+
ts,
|
|
1784
|
+
{
|
|
1785
|
+
comments: Es,
|
|
1786
|
+
taskVisibility: e.visibility,
|
|
1787
|
+
onPostComment: vs,
|
|
1788
|
+
clientMode: u,
|
|
1789
|
+
renderEditor: M,
|
|
1790
|
+
renderViewer: U
|
|
1791
|
+
}
|
|
1792
|
+
),
|
|
1793
|
+
T === "files" && /* @__PURE__ */ s(
|
|
1794
|
+
rs,
|
|
1795
|
+
{
|
|
1796
|
+
files: e.files ?? [],
|
|
1797
|
+
onUpload: u ? X : Ns,
|
|
1798
|
+
onDelete: u ? X : ws,
|
|
1799
|
+
isUploading: l,
|
|
1800
|
+
readOnly: u
|
|
1801
|
+
}
|
|
1802
|
+
),
|
|
1803
|
+
T === "activity" && /* @__PURE__ */ s(ns, { activities: m }),
|
|
1804
|
+
v.map(
|
|
1805
|
+
(c) => T === c.id ? /* @__PURE__ */ s(n.Fragment, { children: c.content }, c.id) : null
|
|
1806
|
+
)
|
|
1807
|
+
]
|
|
1808
|
+
},
|
|
1809
|
+
T
|
|
1810
|
+
) })
|
|
1799
1811
|
] })
|
|
1800
1812
|
] })
|
|
1801
1813
|
]
|
|
1802
1814
|
}
|
|
1803
1815
|
) });
|
|
1804
1816
|
});
|
|
1805
|
-
|
|
1817
|
+
Vt.displayName = "TaskDetailPanel";
|
|
1806
1818
|
export {
|
|
1807
1819
|
ns as A,
|
|
1808
1820
|
ts as C,
|
|
1809
1821
|
rs as F,
|
|
1810
1822
|
qe as M,
|
|
1811
|
-
|
|
1823
|
+
yt as P,
|
|
1812
1824
|
as as R,
|
|
1813
1825
|
ss as S,
|
|
1814
|
-
|
|
1826
|
+
cr as T,
|
|
1815
1827
|
Ye as V,
|
|
1816
|
-
|
|
1828
|
+
Vt as a,
|
|
1817
1829
|
cs as b,
|
|
1818
1830
|
es as c,
|
|
1819
1831
|
Xe as d,
|