@devalok/shilp-sutra-karm 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/task-detail-panel.js +400 -372
- package/dist/tasks/files-tab.d.ts +4 -0
- package/dist/tasks/files-tab.d.ts.map +1 -1
- package/dist/tasks/index.d.ts +1 -1
- package/dist/tasks/index.d.ts.map +1 -1
- package/dist/tasks/task-detail-panel.d.ts +20 -0
- package/dist/tasks/task-detail-panel.d.ts.map +1 -1
- package/package.json +78 -78
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as s, jsx as t, Fragment as
|
|
2
|
+
import { jsxs as s, jsx as t, Fragment as xe } from "react/jsx-runtime";
|
|
3
3
|
import * as p from "react";
|
|
4
4
|
import { cn as N } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
5
|
-
import { Sheet as
|
|
6
|
-
import { VisuallyHidden as
|
|
7
|
-
import { Skeleton as
|
|
8
|
-
import { Progress as
|
|
9
|
-
import { Avatar as
|
|
10
|
-
import { Popover as
|
|
11
|
-
import { IconColumns3 as
|
|
12
|
-
import { getInitials as
|
|
13
|
-
import { MemberPicker as
|
|
14
|
-
import { EmptyState as
|
|
15
|
-
import { Badge as
|
|
16
|
-
import { RichTextViewer as
|
|
17
|
-
import { Dialog as
|
|
18
|
-
import { Button as
|
|
19
|
-
const
|
|
5
|
+
import { Sheet as Me, SheetContent as Fe, SheetTitle as Be } from "@devalok/shilp-sutra/ui/sheet";
|
|
6
|
+
import { VisuallyHidden as ze } from "@devalok/shilp-sutra/ui/visually-hidden";
|
|
7
|
+
import { Skeleton as O } from "@devalok/shilp-sutra/ui/skeleton";
|
|
8
|
+
import { Progress as qe, Tabs as Ye, TabsList as Ke, TabsTrigger as U } from "@devalok/shilp-sutra/ui";
|
|
9
|
+
import { Avatar as j, AvatarImage as V, AvatarFallback as $ } from "@devalok/shilp-sutra/ui/avatar";
|
|
10
|
+
import { Popover as oe, PopoverTrigger as de, PopoverContent as ce } from "@devalok/shilp-sutra/ui/popover";
|
|
11
|
+
import { IconColumns3 as We, IconChevronDown as Je, IconCheck as fe, IconUser as Qe, IconUsers as Ue, IconX as Y, IconPlus as H, IconFlag as be, IconCalendarEvent as ge, IconTag as Ne, IconEye as ye, IconSquareCheck as Xe, IconSquare as Ze, IconListCheck as ve, IconMessage as we, IconGitPullRequest as Z, IconMessageCircle as Ie, IconSend as et, IconUpload as tt, IconExternalLink as st, IconDownload as rt, IconTrash as nt, IconPaperclip as ee, IconFile as me, IconPhoto as it, IconFileText as lt, IconFileCode as at, IconFileSpreadsheet as ot, IconFileZip as dt, IconActivity as te, IconCircleCheck as ct, IconUserMinus as mt, IconUserPlus as ut, IconArrowRight as pt, IconEdit as ht } from "@tabler/icons-react";
|
|
12
|
+
import { getInitials as G } from "@devalok/shilp-sutra/composed/lib/string-utils";
|
|
13
|
+
import { MemberPicker as X } from "@devalok/shilp-sutra/composed/member-picker";
|
|
14
|
+
import { EmptyState as M } from "@devalok/shilp-sutra/composed/empty-state";
|
|
15
|
+
import { Badge as xt } from "@devalok/shilp-sutra/ui/badge";
|
|
16
|
+
import { RichTextViewer as ft, RichTextEditor as bt } from "@devalok/shilp-sutra/composed/rich-text-editor";
|
|
17
|
+
import { Dialog as gt, DialogTrigger as Nt, DialogContent as yt, DialogHeader as vt, DialogTitle as wt, DialogDescription as It, DialogFooter as Dt, DialogClose as ue } from "@devalok/shilp-sutra/ui/dialog";
|
|
18
|
+
import { Button as pe } from "@devalok/shilp-sutra/ui/button";
|
|
19
|
+
const Et = {
|
|
20
20
|
LOW: "Low",
|
|
21
21
|
MEDIUM: "Medium",
|
|
22
22
|
HIGH: "High",
|
|
23
23
|
URGENT: "Urgent"
|
|
24
|
-
},
|
|
24
|
+
}, De = {
|
|
25
25
|
LOW: "bg-[var(--color-category-slate)]",
|
|
26
26
|
MEDIUM: "bg-[var(--color-warning)]",
|
|
27
27
|
HIGH: "bg-[var(--color-error)]",
|
|
28
28
|
URGENT: "bg-[var(--color-error)]"
|
|
29
|
-
},
|
|
29
|
+
}, Tt = {
|
|
30
30
|
PENDING: { color: "warning", label: "Pending" },
|
|
31
31
|
APPROVED: { color: "success", label: "Approved" },
|
|
32
32
|
CHANGES_REQUESTED: { color: "brand", label: "Changes Requested" },
|
|
33
33
|
REJECTED: { color: "error", label: "Rejected" }
|
|
34
|
-
},
|
|
35
|
-
function
|
|
34
|
+
}, Ct = ["LOW", "MEDIUM", "HIGH", "URGENT"];
|
|
35
|
+
function _({
|
|
36
36
|
icon: n,
|
|
37
37
|
label: e,
|
|
38
38
|
children: b,
|
|
@@ -55,13 +55,13 @@ function L({
|
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Rt({ priority: n }) {
|
|
59
59
|
return /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-02b", children: [
|
|
60
|
-
/* @__PURE__ */ t("div", { className: N("h-2 w-2 rounded-ds-full",
|
|
61
|
-
/* @__PURE__ */ t("span", { className: "text-ds-md text-text-primary", children:
|
|
60
|
+
/* @__PURE__ */ t("div", { className: N("h-2 w-2 rounded-ds-full", De[n]) }),
|
|
61
|
+
/* @__PURE__ */ t("span", { className: "text-ds-md text-text-primary", children: Et[n] || n })
|
|
62
62
|
] });
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const Ee = p.forwardRef(
|
|
65
65
|
function({
|
|
66
66
|
task: e,
|
|
67
67
|
columns: b,
|
|
@@ -73,89 +73,89 @@ const we = p.forwardRef(
|
|
|
73
73
|
readOnly: f = !1,
|
|
74
74
|
editableFields: m,
|
|
75
75
|
renderPriorityIndicator: y,
|
|
76
|
-
renderDatePicker:
|
|
77
|
-
onConfirmVisibilityChange:
|
|
78
|
-
},
|
|
79
|
-
const [
|
|
80
|
-
() => x.map((
|
|
76
|
+
renderDatePicker: I,
|
|
77
|
+
onConfirmVisibilityChange: v
|
|
78
|
+
}, a) {
|
|
79
|
+
const [w, o] = p.useState(""), [l, h] = p.useState(!1), u = e.assignees.map((i) => i.user.id), E = p.useMemo(
|
|
80
|
+
() => x.map((i) => ({ id: i.id, name: i.name, avatar: i.image ?? void 0 })),
|
|
81
81
|
[x]
|
|
82
|
-
), T = (
|
|
83
|
-
d("columnId",
|
|
84
|
-
},
|
|
85
|
-
d("ownerId",
|
|
86
|
-
},
|
|
87
|
-
u.includes(
|
|
88
|
-
},
|
|
89
|
-
d("priority",
|
|
90
|
-
},
|
|
91
|
-
d("dueDate",
|
|
92
|
-
},
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
}, K = (
|
|
96
|
-
d("labels", e.labels.filter((
|
|
82
|
+
), T = (i) => {
|
|
83
|
+
d("columnId", i);
|
|
84
|
+
}, R = (i) => {
|
|
85
|
+
d("ownerId", i === e.ownerId ? null : i);
|
|
86
|
+
}, A = (i) => {
|
|
87
|
+
u.includes(i) ? g(i) : c(i);
|
|
88
|
+
}, S = (i) => {
|
|
89
|
+
d("priority", i);
|
|
90
|
+
}, P = (i) => {
|
|
91
|
+
d("dueDate", i ? i.toISOString() : null);
|
|
92
|
+
}, k = () => {
|
|
93
|
+
const i = w.trim();
|
|
94
|
+
i && !e.labels.includes(i) && d("labels", [...e.labels, i]), o(""), h(!1);
|
|
95
|
+
}, K = (i) => {
|
|
96
|
+
d("labels", e.labels.filter((J) => J !== i));
|
|
97
97
|
}, W = () => {
|
|
98
|
-
const
|
|
99
|
-
if (
|
|
100
|
-
|
|
98
|
+
const i = e.visibility === "INTERNAL" ? "EVERYONE" : "INTERNAL";
|
|
99
|
+
if (i === "EVERYONE" && v) {
|
|
100
|
+
v();
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
d("visibility",
|
|
104
|
-
},
|
|
105
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
106
|
-
/* @__PURE__ */ t(
|
|
107
|
-
/* @__PURE__ */ t(
|
|
103
|
+
d("visibility", i);
|
|
104
|
+
}, F = y || Rt;
|
|
105
|
+
return /* @__PURE__ */ s("div", { ref: a, className: N("space-y-ds-01", D), children: [
|
|
106
|
+
/* @__PURE__ */ t(_, { icon: We, label: "Column", children: f && !(m != null && m.includes("columnId")) ? /* @__PURE__ */ t("span", { className: "px-ds-03 py-ds-02 text-ds-md text-text-primary", children: e.column.name }) : /* @__PURE__ */ s(oe, { children: [
|
|
107
|
+
/* @__PURE__ */ t(de, { asChild: !0, children: /* @__PURE__ */ s(
|
|
108
108
|
"button",
|
|
109
109
|
{
|
|
110
110
|
type: "button",
|
|
111
111
|
className: "inline-flex items-center gap-ds-02b rounded-ds-md px-ds-03 py-ds-02 text-ds-md text-text-primary transition-colors hover:bg-field",
|
|
112
112
|
children: [
|
|
113
113
|
/* @__PURE__ */ t("span", { children: e.column.name }),
|
|
114
|
-
/* @__PURE__ */ t(
|
|
114
|
+
/* @__PURE__ */ t(Je, { className: "h-3 w-3 text-text-placeholder" })
|
|
115
115
|
]
|
|
116
116
|
}
|
|
117
117
|
) }),
|
|
118
118
|
/* @__PURE__ */ t(
|
|
119
|
-
|
|
119
|
+
ce,
|
|
120
120
|
{
|
|
121
121
|
className: "w-[180px] border-border bg-layer-01 p-ds-02",
|
|
122
122
|
align: "start",
|
|
123
123
|
sideOffset: 4,
|
|
124
|
-
children: b.map((
|
|
124
|
+
children: b.map((i) => /* @__PURE__ */ s(
|
|
125
125
|
"button",
|
|
126
126
|
{
|
|
127
127
|
type: "button",
|
|
128
|
-
onClick: () => T(
|
|
128
|
+
onClick: () => T(i.id),
|
|
129
129
|
className: N(
|
|
130
130
|
"flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-left text-ds-md transition-colors",
|
|
131
131
|
"hover:bg-field",
|
|
132
|
-
|
|
132
|
+
i.id === e.columnId ? "text-interactive" : "text-text-primary"
|
|
133
133
|
),
|
|
134
134
|
children: [
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
i.name,
|
|
136
|
+
i.id === e.columnId && /* @__PURE__ */ t(fe, { className: "ml-auto h-ico-sm w-ico-sm" })
|
|
137
137
|
]
|
|
138
138
|
},
|
|
139
|
-
|
|
139
|
+
i.id
|
|
140
140
|
))
|
|
141
141
|
}
|
|
142
142
|
)
|
|
143
143
|
] }) }),
|
|
144
|
-
!f && /* @__PURE__ */ t(
|
|
145
|
-
|
|
144
|
+
!f && /* @__PURE__ */ t(_, { icon: Qe, label: "Owner", children: /* @__PURE__ */ t(
|
|
145
|
+
X,
|
|
146
146
|
{
|
|
147
147
|
members: E,
|
|
148
148
|
selectedIds: e.ownerId ? [e.ownerId] : [],
|
|
149
|
-
onSelect:
|
|
149
|
+
onSelect: R,
|
|
150
150
|
children: /* @__PURE__ */ t(
|
|
151
151
|
"button",
|
|
152
152
|
{
|
|
153
153
|
type: "button",
|
|
154
154
|
className: "inline-flex items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-field",
|
|
155
|
-
children: e.owner ? /* @__PURE__ */ s(
|
|
156
|
-
/* @__PURE__ */ s(
|
|
155
|
+
children: e.owner ? /* @__PURE__ */ s(xe, { children: [
|
|
156
|
+
/* @__PURE__ */ s(j, { className: "h-ico-md w-ico-md", children: [
|
|
157
157
|
e.owner.image && /* @__PURE__ */ t(V, { src: e.owner.image, alt: e.owner.name }),
|
|
158
|
-
/* @__PURE__ */ t(
|
|
158
|
+
/* @__PURE__ */ t($, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: G(e.owner.name) })
|
|
159
159
|
] }),
|
|
160
160
|
/* @__PURE__ */ t("span", { className: "text-ds-md text-text-primary", children: e.owner.name })
|
|
161
161
|
] }) : /* @__PURE__ */ t("span", { className: "text-ds-md text-text-placeholder", children: "No owner" })
|
|
@@ -163,37 +163,37 @@ const we = p.forwardRef(
|
|
|
163
163
|
)
|
|
164
164
|
}
|
|
165
165
|
) }),
|
|
166
|
-
/* @__PURE__ */ t(
|
|
167
|
-
e.assignees.map((
|
|
166
|
+
/* @__PURE__ */ t(_, { icon: Ue, label: "Assignees", children: /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-ds-02b", children: [
|
|
167
|
+
e.assignees.map((i) => /* @__PURE__ */ s(
|
|
168
168
|
"div",
|
|
169
169
|
{
|
|
170
170
|
className: "inline-flex items-center gap-ds-02 rounded-ds-full bg-layer-02 py-ds-01 pl-ds-01 pr-ds-03",
|
|
171
171
|
children: [
|
|
172
|
-
/* @__PURE__ */ s(
|
|
173
|
-
|
|
174
|
-
/* @__PURE__ */ t(
|
|
172
|
+
/* @__PURE__ */ s(j, { className: "h-ico-sm w-ico-sm", children: [
|
|
173
|
+
i.user.image && /* @__PURE__ */ t(V, { src: i.user.image, alt: i.user.name }),
|
|
174
|
+
/* @__PURE__ */ t($, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: G(i.user.name) })
|
|
175
175
|
] }),
|
|
176
|
-
/* @__PURE__ */ t("span", { className: "text-ds-sm text-text-secondary", children:
|
|
176
|
+
/* @__PURE__ */ t("span", { className: "text-ds-sm text-text-secondary", children: i.user.name.split(" ")[0] }),
|
|
177
177
|
!f && /* @__PURE__ */ t(
|
|
178
178
|
"button",
|
|
179
179
|
{
|
|
180
180
|
type: "button",
|
|
181
|
-
onClick: () => g(
|
|
181
|
+
onClick: () => g(i.user.id),
|
|
182
182
|
className: "ml-ds-01 rounded-ds-full p-ds-01 transition-colors hover:bg-field",
|
|
183
|
-
"aria-label": `Remove ${
|
|
183
|
+
"aria-label": `Remove ${i.user.name}`,
|
|
184
184
|
children: /* @__PURE__ */ t(Y, { className: "h-ds-03 w-ds-03 text-text-placeholder" })
|
|
185
185
|
}
|
|
186
186
|
)
|
|
187
187
|
]
|
|
188
188
|
},
|
|
189
|
-
|
|
189
|
+
i.user.id
|
|
190
190
|
)),
|
|
191
191
|
!f && /* @__PURE__ */ t(
|
|
192
|
-
|
|
192
|
+
X,
|
|
193
193
|
{
|
|
194
194
|
members: E,
|
|
195
195
|
selectedIds: u,
|
|
196
|
-
onSelect:
|
|
196
|
+
onSelect: A,
|
|
197
197
|
multiple: !0,
|
|
198
198
|
children: /* @__PURE__ */ t(
|
|
199
199
|
"button",
|
|
@@ -201,49 +201,49 @@ const we = p.forwardRef(
|
|
|
201
201
|
type: "button",
|
|
202
202
|
className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded-ds-full border border-dashed border-border-subtle transition-colors hover:bg-field hover:border-text-placeholder",
|
|
203
203
|
"aria-label": "Add assignee",
|
|
204
|
-
children: /* @__PURE__ */ t(
|
|
204
|
+
children: /* @__PURE__ */ t(H, { className: "h-3 w-3 text-text-placeholder" })
|
|
205
205
|
}
|
|
206
206
|
)
|
|
207
207
|
}
|
|
208
208
|
),
|
|
209
209
|
f && e.assignees.length === 0 && /* @__PURE__ */ t("span", { className: "text-ds-md text-text-placeholder", children: "None" })
|
|
210
210
|
] }) }),
|
|
211
|
-
/* @__PURE__ */ t(
|
|
212
|
-
/* @__PURE__ */ t(
|
|
211
|
+
/* @__PURE__ */ t(_, { icon: be, label: "Priority", children: /* @__PURE__ */ s(oe, { children: [
|
|
212
|
+
/* @__PURE__ */ t(de, { asChild: !0, children: /* @__PURE__ */ t(
|
|
213
213
|
"button",
|
|
214
214
|
{
|
|
215
215
|
type: "button",
|
|
216
216
|
className: "rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-field",
|
|
217
|
-
children: /* @__PURE__ */ t(
|
|
217
|
+
children: /* @__PURE__ */ t(F, { priority: e.priority })
|
|
218
218
|
}
|
|
219
219
|
) }),
|
|
220
220
|
/* @__PURE__ */ t(
|
|
221
|
-
|
|
221
|
+
ce,
|
|
222
222
|
{
|
|
223
223
|
className: "w-[160px] border-border bg-layer-01 p-ds-02",
|
|
224
224
|
align: "start",
|
|
225
225
|
sideOffset: 4,
|
|
226
|
-
children:
|
|
226
|
+
children: Ct.map((i) => /* @__PURE__ */ t(
|
|
227
227
|
"button",
|
|
228
228
|
{
|
|
229
229
|
type: "button",
|
|
230
|
-
onClick: () =>
|
|
230
|
+
onClick: () => S(i),
|
|
231
231
|
className: N(
|
|
232
232
|
"flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b transition-colors",
|
|
233
233
|
"hover:bg-field",
|
|
234
|
-
|
|
234
|
+
i === e.priority && "bg-field"
|
|
235
235
|
),
|
|
236
|
-
children: /* @__PURE__ */ t(
|
|
236
|
+
children: /* @__PURE__ */ t(F, { priority: i })
|
|
237
237
|
},
|
|
238
|
-
|
|
238
|
+
i
|
|
239
239
|
))
|
|
240
240
|
}
|
|
241
241
|
)
|
|
242
242
|
] }) }),
|
|
243
|
-
/* @__PURE__ */ t(
|
|
244
|
-
|
|
243
|
+
/* @__PURE__ */ t(_, { icon: ge, label: "Due Date", children: /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-02", children: [
|
|
244
|
+
I ? I({
|
|
245
245
|
value: e.dueDate ? new Date(e.dueDate) : null,
|
|
246
|
-
onChange:
|
|
246
|
+
onChange: P,
|
|
247
247
|
placeholder: "No due date",
|
|
248
248
|
className: "h-ds-xs-plus border-none bg-transparent px-ds-03 text-ds-md hover:bg-field"
|
|
249
249
|
}) : /* @__PURE__ */ t(
|
|
@@ -251,7 +251,7 @@ const we = p.forwardRef(
|
|
|
251
251
|
{
|
|
252
252
|
type: "date",
|
|
253
253
|
value: e.dueDate ? new Date(e.dueDate).toISOString().split("T")[0] : "",
|
|
254
|
-
onChange: (
|
|
254
|
+
onChange: (i) => P(i.target.value ? new Date(i.target.value) : null),
|
|
255
255
|
"aria-label": "Due date",
|
|
256
256
|
className: "h-ds-xs-plus border-none bg-transparent px-ds-03 text-ds-md text-text-primary outline-none hover:bg-field rounded-ds-md"
|
|
257
257
|
}
|
|
@@ -260,45 +260,45 @@ const we = p.forwardRef(
|
|
|
260
260
|
"button",
|
|
261
261
|
{
|
|
262
262
|
type: "button",
|
|
263
|
-
onClick: () =>
|
|
263
|
+
onClick: () => P(null),
|
|
264
264
|
className: "rounded-ds-md p-ds-02 transition-colors hover:bg-field",
|
|
265
265
|
"aria-label": "Clear due date",
|
|
266
266
|
children: /* @__PURE__ */ t(Y, { className: "h-3 w-3 text-text-placeholder" })
|
|
267
267
|
}
|
|
268
268
|
)
|
|
269
269
|
] }) }),
|
|
270
|
-
/* @__PURE__ */ t(
|
|
271
|
-
e.labels.map((
|
|
270
|
+
/* @__PURE__ */ t(_, { icon: Ne, label: "Labels", children: /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-ds-02b", children: [
|
|
271
|
+
e.labels.map((i) => /* @__PURE__ */ s(
|
|
272
272
|
"span",
|
|
273
273
|
{
|
|
274
274
|
className: "inline-flex items-center gap-ds-02 rounded-ds-full bg-interactive/10 px-ds-03 py-ds-01 text-ds-sm font-medium text-interactive",
|
|
275
275
|
children: [
|
|
276
|
-
|
|
276
|
+
i,
|
|
277
277
|
!f && /* @__PURE__ */ t(
|
|
278
278
|
"button",
|
|
279
279
|
{
|
|
280
280
|
type: "button",
|
|
281
|
-
onClick: () => K(
|
|
281
|
+
onClick: () => K(i),
|
|
282
282
|
className: "rounded-ds-full p-ds-01 transition-colors hover:bg-field",
|
|
283
|
-
"aria-label": `Remove label ${
|
|
283
|
+
"aria-label": `Remove label ${i}`,
|
|
284
284
|
children: /* @__PURE__ */ t(Y, { className: "h-ds-03 w-ds-03" })
|
|
285
285
|
}
|
|
286
286
|
)
|
|
287
287
|
]
|
|
288
288
|
},
|
|
289
|
-
|
|
289
|
+
i
|
|
290
290
|
)),
|
|
291
|
-
!f && (
|
|
291
|
+
!f && (l ? /* @__PURE__ */ t("div", { className: "inline-flex items-center gap-ds-02", children: /* @__PURE__ */ t(
|
|
292
292
|
"input",
|
|
293
293
|
{
|
|
294
294
|
type: "text",
|
|
295
|
-
value:
|
|
296
|
-
onChange: (
|
|
295
|
+
value: w,
|
|
296
|
+
onChange: (i) => o(i.target.value),
|
|
297
297
|
"aria-label": "New label name",
|
|
298
|
-
onKeyDown: (
|
|
299
|
-
|
|
298
|
+
onKeyDown: (i) => {
|
|
299
|
+
i.key === "Enter" && k(), i.key === "Escape" && (h(!1), o(""));
|
|
300
300
|
},
|
|
301
|
-
onBlur:
|
|
301
|
+
onBlur: k,
|
|
302
302
|
placeholder: "Label name",
|
|
303
303
|
className: "h-5 w-20 rounded border border-border bg-transparent px-ds-02b text-ds-sm text-text-primary outline-none placeholder:text-text-placeholder focus:border-border-subtle",
|
|
304
304
|
autoFocus: !0
|
|
@@ -310,12 +310,12 @@ const we = p.forwardRef(
|
|
|
310
310
|
onClick: () => h(!0),
|
|
311
311
|
className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded-ds-full border border-dashed border-border-subtle transition-colors hover:bg-field hover:border-text-placeholder",
|
|
312
312
|
"aria-label": "Add label",
|
|
313
|
-
children: /* @__PURE__ */ t(
|
|
313
|
+
children: /* @__PURE__ */ t(H, { className: "h-3 w-3 text-text-placeholder" })
|
|
314
314
|
}
|
|
315
315
|
)),
|
|
316
316
|
f && e.labels.length === 0 && /* @__PURE__ */ t("span", { className: "text-ds-md text-text-placeholder", children: "None" })
|
|
317
317
|
] }) }),
|
|
318
|
-
!f && /* @__PURE__ */ t(
|
|
318
|
+
!f && /* @__PURE__ */ t(_, { icon: ye, label: "Visibility", children: /* @__PURE__ */ s(
|
|
319
319
|
"button",
|
|
320
320
|
{
|
|
321
321
|
type: "button",
|
|
@@ -341,8 +341,8 @@ const we = p.forwardRef(
|
|
|
341
341
|
] });
|
|
342
342
|
}
|
|
343
343
|
);
|
|
344
|
-
|
|
345
|
-
const
|
|
344
|
+
Ee.displayName = "TaskProperties";
|
|
345
|
+
const Te = p.forwardRef(
|
|
346
346
|
function({
|
|
347
347
|
subtasks: e,
|
|
348
348
|
terminalColumnId: b,
|
|
@@ -352,31 +352,31 @@ const Ie = p.forwardRef(
|
|
|
352
352
|
className: g,
|
|
353
353
|
readOnly: D = !1
|
|
354
354
|
}, f) {
|
|
355
|
-
const [m, y] = p.useState(""), [
|
|
355
|
+
const [m, y] = p.useState(""), [I, v] = p.useState(!1), a = p.useRef(null), w = e.filter(
|
|
356
356
|
(u) => {
|
|
357
357
|
var E;
|
|
358
358
|
return ((E = u.column) == null ? void 0 : E.isTerminal) || u.columnId === b;
|
|
359
359
|
}
|
|
360
|
-
).length, o = e.length,
|
|
360
|
+
).length, o = e.length, l = () => {
|
|
361
361
|
const u = m.trim();
|
|
362
362
|
u && (x(u), y(""));
|
|
363
363
|
}, h = (u) => {
|
|
364
|
-
u.key === "Enter" && (u.preventDefault(),
|
|
364
|
+
u.key === "Enter" && (u.preventDefault(), l()), u.key === "Escape" && (v(!1), y(""));
|
|
365
365
|
};
|
|
366
366
|
return p.useEffect(() => {
|
|
367
|
-
|
|
368
|
-
}, [
|
|
367
|
+
I && a.current && a.current.focus();
|
|
368
|
+
}, [I]), /* @__PURE__ */ s("div", { ref: f, className: N("flex flex-col", g), children: [
|
|
369
369
|
o > 0 && /* @__PURE__ */ s("div", { className: "mb-ds-05 flex items-center gap-ds-04", children: [
|
|
370
|
-
/* @__PURE__ */ t(
|
|
370
|
+
/* @__PURE__ */ t(qe, { value: o > 0 ? w / o * 100 : 0, className: "h-ds-02b" }),
|
|
371
371
|
/* @__PURE__ */ s("span", { className: "shrink-0 text-ds-sm font-medium text-text-placeholder", children: [
|
|
372
|
-
|
|
372
|
+
w,
|
|
373
373
|
"/",
|
|
374
374
|
o
|
|
375
375
|
] })
|
|
376
376
|
] }),
|
|
377
377
|
e.length > 0 ? /* @__PURE__ */ t("div", { className: "space-y-ds-01", children: e.map((u) => {
|
|
378
|
-
var
|
|
379
|
-
const E = ((
|
|
378
|
+
var R, A;
|
|
379
|
+
const E = ((R = u.column) == null ? void 0 : R.isTerminal) || u.columnId === b, T = (A = u.assignees[0]) == null ? void 0 : A.user;
|
|
380
380
|
return /* @__PURE__ */ s(
|
|
381
381
|
"div",
|
|
382
382
|
{
|
|
@@ -387,22 +387,22 @@ const Ie = p.forwardRef(
|
|
|
387
387
|
"hover:bg-field cursor-pointer"
|
|
388
388
|
),
|
|
389
389
|
onClick: () => c == null ? void 0 : c(u.id),
|
|
390
|
-
onKeyDown: (
|
|
391
|
-
(
|
|
390
|
+
onKeyDown: (S) => {
|
|
391
|
+
(S.key === "Enter" || S.key === " ") && (S.preventDefault(), c == null || c(u.id));
|
|
392
392
|
},
|
|
393
393
|
children: [
|
|
394
394
|
/* @__PURE__ */ t(
|
|
395
395
|
"button",
|
|
396
396
|
{
|
|
397
397
|
type: "button",
|
|
398
|
-
onClick: (
|
|
399
|
-
|
|
398
|
+
onClick: (S) => {
|
|
399
|
+
S.stopPropagation(), D || d(u.id, !E);
|
|
400
400
|
},
|
|
401
401
|
className: N(
|
|
402
402
|
"shrink-0 rounded p-ds-01 transition-colors",
|
|
403
403
|
D ? "cursor-default" : "hover:bg-layer-02"
|
|
404
404
|
),
|
|
405
|
-
children: E ? /* @__PURE__ */ t(
|
|
405
|
+
children: E ? /* @__PURE__ */ t(Xe, { className: "h-ico-sm w-ico-sm text-interactive", stroke: 1.5 }) : /* @__PURE__ */ t(Ze, { className: "h-ico-sm w-ico-sm text-text-placeholder", stroke: 1.5 })
|
|
406
406
|
}
|
|
407
407
|
),
|
|
408
408
|
/* @__PURE__ */ t(
|
|
@@ -410,7 +410,7 @@ const Ie = p.forwardRef(
|
|
|
410
410
|
{
|
|
411
411
|
className: N(
|
|
412
412
|
"h-2 w-2 shrink-0 rounded-ds-full",
|
|
413
|
-
|
|
413
|
+
De[u.priority]
|
|
414
414
|
)
|
|
415
415
|
}
|
|
416
416
|
),
|
|
@@ -424,34 +424,34 @@ const Ie = p.forwardRef(
|
|
|
424
424
|
children: u.title
|
|
425
425
|
}
|
|
426
426
|
),
|
|
427
|
-
T && /* @__PURE__ */ s(
|
|
427
|
+
T && /* @__PURE__ */ s(j, { className: "h-ico-md w-ico-md shrink-0", children: [
|
|
428
428
|
T.image && /* @__PURE__ */ t(V, { src: T.image, alt: T.name }),
|
|
429
|
-
/* @__PURE__ */ t(
|
|
429
|
+
/* @__PURE__ */ t($, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: G(T.name) })
|
|
430
430
|
] })
|
|
431
431
|
]
|
|
432
432
|
},
|
|
433
433
|
u.id
|
|
434
434
|
);
|
|
435
|
-
}) }) : !
|
|
436
|
-
|
|
435
|
+
}) }) : !I && /* @__PURE__ */ t(
|
|
436
|
+
M,
|
|
437
437
|
{
|
|
438
|
-
icon: /* @__PURE__ */ t(
|
|
438
|
+
icon: /* @__PURE__ */ t(ve, {}),
|
|
439
439
|
title: "No subtasks",
|
|
440
440
|
description: "Break this task into smaller pieces",
|
|
441
441
|
compact: !0
|
|
442
442
|
}
|
|
443
443
|
),
|
|
444
|
-
!D && (
|
|
444
|
+
!D && (I ? /* @__PURE__ */ s("div", { className: "mt-ds-03 flex items-center gap-ds-03 rounded-ds-lg border border-border bg-layer-01 shadow-01 px-ds-04 py-ds-03", children: [
|
|
445
445
|
/* @__PURE__ */ t(
|
|
446
446
|
"input",
|
|
447
447
|
{
|
|
448
|
-
ref:
|
|
448
|
+
ref: a,
|
|
449
449
|
type: "text",
|
|
450
450
|
value: m,
|
|
451
451
|
onChange: (u) => y(u.target.value),
|
|
452
452
|
onKeyDown: h,
|
|
453
453
|
onBlur: () => {
|
|
454
|
-
m.trim() ||
|
|
454
|
+
m.trim() || v(!1);
|
|
455
455
|
},
|
|
456
456
|
placeholder: "Subtask title...",
|
|
457
457
|
className: "flex-1 bg-transparent text-ds-md text-text-primary placeholder:text-text-placeholder outline-none"
|
|
@@ -461,7 +461,7 @@ const Ie = p.forwardRef(
|
|
|
461
461
|
"button",
|
|
462
462
|
{
|
|
463
463
|
type: "button",
|
|
464
|
-
onClick:
|
|
464
|
+
onClick: l,
|
|
465
465
|
disabled: !m.trim(),
|
|
466
466
|
className: "inline-flex h-6 items-center gap-ds-02 rounded-ds-md bg-interactive px-ds-03 text-ds-sm font-semibold text-text-on-color transition-colors hover:bg-interactive-hover disabled:opacity-[0.38]",
|
|
467
467
|
children: "Add"
|
|
@@ -471,10 +471,10 @@ const Ie = p.forwardRef(
|
|
|
471
471
|
"button",
|
|
472
472
|
{
|
|
473
473
|
type: "button",
|
|
474
|
-
onClick: () =>
|
|
474
|
+
onClick: () => v(!0),
|
|
475
475
|
className: "mt-ds-03 inline-flex items-center gap-ds-02b rounded-ds-lg px-ds-03 py-ds-02b text-ds-md text-text-placeholder transition-colors hover:bg-field hover:text-text-secondary",
|
|
476
476
|
children: [
|
|
477
|
-
/* @__PURE__ */ t(
|
|
477
|
+
/* @__PURE__ */ t(H, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
|
|
478
478
|
"Add subtask"
|
|
479
479
|
]
|
|
480
480
|
}
|
|
@@ -482,8 +482,8 @@ const Ie = p.forwardRef(
|
|
|
482
482
|
] });
|
|
483
483
|
}
|
|
484
484
|
);
|
|
485
|
-
|
|
486
|
-
function
|
|
485
|
+
Te.displayName = "SubtasksTab";
|
|
486
|
+
function At(n) {
|
|
487
487
|
return new Date(n).toLocaleDateString("en-IN", {
|
|
488
488
|
month: "short",
|
|
489
489
|
day: "numeric",
|
|
@@ -491,11 +491,11 @@ function It(n) {
|
|
|
491
491
|
minute: "2-digit"
|
|
492
492
|
});
|
|
493
493
|
}
|
|
494
|
-
const
|
|
495
|
-
{ status: "APPROVED", label: "Approve", icon:
|
|
496
|
-
{ status: "CHANGES_REQUESTED", label: "Request Changes", icon:
|
|
494
|
+
const St = [
|
|
495
|
+
{ status: "APPROVED", label: "Approve", icon: fe },
|
|
496
|
+
{ status: "CHANGES_REQUESTED", label: "Request Changes", icon: we },
|
|
497
497
|
{ status: "REJECTED", label: "Reject", icon: Y }
|
|
498
|
-
],
|
|
498
|
+
], Ce = p.forwardRef(
|
|
499
499
|
function({
|
|
500
500
|
reviews: e,
|
|
501
501
|
members: b,
|
|
@@ -503,58 +503,58 @@ const Dt = [
|
|
|
503
503
|
onUpdateStatus: d,
|
|
504
504
|
className: c
|
|
505
505
|
}, g) {
|
|
506
|
-
const [D, f] = p.useState({}), [m, y] = p.useState(null),
|
|
507
|
-
() => b.map((
|
|
506
|
+
const [D, f] = p.useState({}), [m, y] = p.useState(null), I = p.useMemo(
|
|
507
|
+
() => b.map((a) => ({ id: a.id, name: a.name, avatar: a.image ?? void 0 })),
|
|
508
508
|
[b]
|
|
509
|
-
),
|
|
510
|
-
d(
|
|
511
|
-
const
|
|
512
|
-
return delete
|
|
509
|
+
), v = (a, w) => {
|
|
510
|
+
d(a, w, D[a]), f((o) => {
|
|
511
|
+
const l = { ...o };
|
|
512
|
+
return delete l[a], l;
|
|
513
513
|
}), y(null);
|
|
514
514
|
};
|
|
515
515
|
return /* @__PURE__ */ s("div", { ref: g, className: N("flex flex-col", c), children: [
|
|
516
|
-
e.length > 0 ? /* @__PURE__ */ t("div", { className: "space-y-ds-04", children: e.map((
|
|
517
|
-
const
|
|
516
|
+
e.length > 0 ? /* @__PURE__ */ t("div", { className: "space-y-ds-04", children: e.map((a) => {
|
|
517
|
+
const w = Tt[a.status], o = m === a.id;
|
|
518
518
|
return /* @__PURE__ */ s(
|
|
519
519
|
"div",
|
|
520
520
|
{
|
|
521
521
|
className: "rounded-ds-lg border border-border bg-layer-01 shadow-01 p-ds-04",
|
|
522
522
|
children: [
|
|
523
523
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
524
|
-
/* @__PURE__ */ s(
|
|
525
|
-
|
|
524
|
+
/* @__PURE__ */ s(j, { className: "h-ds-xs w-ds-xs shrink-0", children: [
|
|
525
|
+
a.reviewer.image && /* @__PURE__ */ t(
|
|
526
526
|
V,
|
|
527
527
|
{
|
|
528
|
-
src:
|
|
529
|
-
alt:
|
|
528
|
+
src: a.reviewer.image,
|
|
529
|
+
alt: a.reviewer.name
|
|
530
530
|
}
|
|
531
531
|
),
|
|
532
|
-
/* @__PURE__ */ t(
|
|
532
|
+
/* @__PURE__ */ t($, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: G(a.reviewer.name) })
|
|
533
533
|
] }),
|
|
534
534
|
/* @__PURE__ */ s("div", { className: "flex-1 min-w-0", children: [
|
|
535
|
-
/* @__PURE__ */ t("span", { className: "text-ds-md font-medium text-text-primary", children:
|
|
535
|
+
/* @__PURE__ */ t("span", { className: "text-ds-md font-medium text-text-primary", children: a.reviewer.name }),
|
|
536
536
|
/* @__PURE__ */ s("span", { className: "ml-ds-03 text-ds-sm text-text-placeholder", children: [
|
|
537
537
|
"requested by ",
|
|
538
|
-
|
|
538
|
+
a.requestedBy.name
|
|
539
539
|
] })
|
|
540
540
|
] }),
|
|
541
541
|
/* @__PURE__ */ t(
|
|
542
|
-
|
|
542
|
+
xt,
|
|
543
543
|
{
|
|
544
|
-
color:
|
|
545
|
-
children:
|
|
544
|
+
color: w.color,
|
|
545
|
+
children: w.label
|
|
546
546
|
}
|
|
547
547
|
)
|
|
548
548
|
] }),
|
|
549
|
-
|
|
550
|
-
|
|
549
|
+
a.feedback && /* @__PURE__ */ t("div", { className: "mt-ds-03 rounded-ds-md bg-layer-02 px-ds-04 py-ds-03", children: /* @__PURE__ */ t("p", { className: "text-ds-sm text-text-secondary", children: a.feedback }) }),
|
|
550
|
+
a.status === "PENDING" && /* @__PURE__ */ t("div", { className: "mt-ds-03", children: o ? /* @__PURE__ */ s("div", { className: "space-y-ds-03", children: [
|
|
551
551
|
/* @__PURE__ */ t(
|
|
552
552
|
"textarea",
|
|
553
553
|
{
|
|
554
|
-
value: D[
|
|
555
|
-
onChange: (
|
|
554
|
+
value: D[a.id] || "",
|
|
555
|
+
onChange: (l) => f((h) => ({
|
|
556
556
|
...h,
|
|
557
|
-
[
|
|
557
|
+
[a.id]: l.target.value
|
|
558
558
|
})),
|
|
559
559
|
placeholder: "Add feedback (optional)...",
|
|
560
560
|
rows: 2,
|
|
@@ -562,25 +562,25 @@ const Dt = [
|
|
|
562
562
|
}
|
|
563
563
|
),
|
|
564
564
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-02b", children: [
|
|
565
|
-
|
|
566
|
-
const h =
|
|
565
|
+
St.map((l) => {
|
|
566
|
+
const h = l.icon;
|
|
567
567
|
return /* @__PURE__ */ s(
|
|
568
568
|
"button",
|
|
569
569
|
{
|
|
570
570
|
type: "button",
|
|
571
|
-
onClick: () =>
|
|
571
|
+
onClick: () => v(a.id, l.status),
|
|
572
572
|
className: N(
|
|
573
573
|
"inline-flex items-center gap-ds-02 rounded-ds-md px-ds-03 py-ds-02 text-ds-sm font-semibold transition-colors",
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
574
|
+
l.status === "APPROVED" && "bg-success-surface text-text-success hover:opacity-[0.9]",
|
|
575
|
+
l.status === "CHANGES_REQUESTED" && "bg-warning-surface text-text-warning hover:opacity-[0.9]",
|
|
576
|
+
l.status === "REJECTED" && "bg-error-surface text-text-error hover:opacity-[0.9]"
|
|
577
577
|
),
|
|
578
578
|
children: [
|
|
579
579
|
/* @__PURE__ */ t(h, { className: "h-3 w-3", stroke: 2 }),
|
|
580
|
-
|
|
580
|
+
l.label
|
|
581
581
|
]
|
|
582
582
|
},
|
|
583
|
-
|
|
583
|
+
l.status
|
|
584
584
|
);
|
|
585
585
|
}),
|
|
586
586
|
/* @__PURE__ */ t(
|
|
@@ -597,38 +597,38 @@ const Dt = [
|
|
|
597
597
|
"button",
|
|
598
598
|
{
|
|
599
599
|
type: "button",
|
|
600
|
-
onClick: () => y(
|
|
600
|
+
onClick: () => y(a.id),
|
|
601
601
|
className: "text-ds-sm font-medium text-interactive transition-colors hover:underline",
|
|
602
602
|
children: "Respond"
|
|
603
603
|
}
|
|
604
604
|
) }),
|
|
605
|
-
/* @__PURE__ */ t("p", { className: "mt-ds-03 text-ds-xs text-text-placeholder", children:
|
|
605
|
+
/* @__PURE__ */ t("p", { className: "mt-ds-03 text-ds-xs text-text-placeholder", children: At(a.createdAt) })
|
|
606
606
|
]
|
|
607
607
|
},
|
|
608
|
-
|
|
608
|
+
a.id
|
|
609
609
|
);
|
|
610
610
|
}) }) : /* @__PURE__ */ t(
|
|
611
|
-
|
|
611
|
+
M,
|
|
612
612
|
{
|
|
613
|
-
icon: /* @__PURE__ */ t(
|
|
613
|
+
icon: /* @__PURE__ */ t(Z, {}),
|
|
614
614
|
title: "No reviews yet",
|
|
615
615
|
description: "Request a review from a team member",
|
|
616
616
|
compact: !0
|
|
617
617
|
}
|
|
618
618
|
),
|
|
619
619
|
/* @__PURE__ */ t(
|
|
620
|
-
|
|
620
|
+
X,
|
|
621
621
|
{
|
|
622
|
-
members:
|
|
622
|
+
members: I,
|
|
623
623
|
selectedIds: [],
|
|
624
|
-
onSelect: (
|
|
624
|
+
onSelect: (a) => x(a),
|
|
625
625
|
children: /* @__PURE__ */ s(
|
|
626
626
|
"button",
|
|
627
627
|
{
|
|
628
628
|
type: "button",
|
|
629
629
|
className: "mt-ds-04 inline-flex items-center gap-ds-02b rounded-ds-lg px-ds-03 py-ds-02b text-ds-md text-text-placeholder transition-colors hover:bg-field hover:text-text-secondary",
|
|
630
630
|
children: [
|
|
631
|
-
/* @__PURE__ */ t(
|
|
631
|
+
/* @__PURE__ */ t(H, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
|
|
632
632
|
"Request Review"
|
|
633
633
|
]
|
|
634
634
|
}
|
|
@@ -638,8 +638,8 @@ const Dt = [
|
|
|
638
638
|
] });
|
|
639
639
|
}
|
|
640
640
|
);
|
|
641
|
-
|
|
642
|
-
function
|
|
641
|
+
Ce.displayName = "ReviewTab";
|
|
642
|
+
function Pt(n) {
|
|
643
643
|
const e = new Date(n), x = (/* @__PURE__ */ new Date()).getTime() - e.getTime(), d = Math.floor(x / 6e4), c = Math.floor(d / 60), g = Math.floor(c / 24);
|
|
644
644
|
return d < 1 ? "Just now" : d < 60 ? `${d}m ago` : c < 24 ? `${c}h ago` : g < 7 ? `${g}d ago` : e.toLocaleDateString("en-IN", {
|
|
645
645
|
month: "short",
|
|
@@ -648,7 +648,7 @@ function Et(n) {
|
|
|
648
648
|
minute: "2-digit"
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function Lt(n) {
|
|
652
652
|
return n.authorType === "INTERNAL" && n.internalAuthor ? n.internalAuthor : n.authorType === "CLIENT" && n.clientAuthor ? {
|
|
653
653
|
id: n.clientAuthor.id,
|
|
654
654
|
name: n.clientAuthor.name,
|
|
@@ -656,10 +656,10 @@ function Tt(n) {
|
|
|
656
656
|
image: null
|
|
657
657
|
} : { id: n.authorId, name: "Unknown", image: null };
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function Ot(n) {
|
|
660
660
|
return n.replace(/<[^>]*>/g, "");
|
|
661
661
|
}
|
|
662
|
-
const
|
|
662
|
+
const Re = p.forwardRef(
|
|
663
663
|
function({
|
|
664
664
|
comments: e,
|
|
665
665
|
taskVisibility: b,
|
|
@@ -670,41 +670,41 @@ const Ee = p.forwardRef(
|
|
|
670
670
|
renderEditor: D,
|
|
671
671
|
renderViewer: f
|
|
672
672
|
}, m) {
|
|
673
|
-
const [y,
|
|
674
|
-
|
|
673
|
+
const [y, I] = p.useState(""), v = p.useRef(null), a = D ?? (g ? (l) => /* @__PURE__ */ t(
|
|
674
|
+
bt,
|
|
675
675
|
{
|
|
676
|
-
content:
|
|
677
|
-
onChange:
|
|
678
|
-
placeholder:
|
|
676
|
+
content: l.content,
|
|
677
|
+
onChange: l.onChange,
|
|
678
|
+
placeholder: l.placeholder,
|
|
679
679
|
editable: !0,
|
|
680
680
|
className: "min-h-[80px]"
|
|
681
681
|
}
|
|
682
|
-
) : void 0),
|
|
683
|
-
const
|
|
684
|
-
|
|
682
|
+
) : void 0), w = f ?? (g ? (l) => /* @__PURE__ */ t(ft, { content: l.content, className: l.className }) : void 0), o = () => {
|
|
683
|
+
const l = y.trim();
|
|
684
|
+
l.replace(/<[^>]*>/g, "").trim() && (x(l, c ? "CLIENT" : "INTERNAL"), I(""));
|
|
685
685
|
};
|
|
686
686
|
return p.useEffect(() => {
|
|
687
|
-
|
|
687
|
+
v.current && (v.current.scrollTop = v.current.scrollHeight);
|
|
688
688
|
}, [e.length]), /* @__PURE__ */ s("div", { ref: m, className: N("flex flex-col", d), children: [
|
|
689
689
|
e.length > 0 ? /* @__PURE__ */ t(
|
|
690
690
|
"div",
|
|
691
691
|
{
|
|
692
|
-
ref:
|
|
692
|
+
ref: v,
|
|
693
693
|
className: "flex-1 space-y-ds-05 overflow-y-auto",
|
|
694
|
-
children: e.map((
|
|
695
|
-
const h =
|
|
694
|
+
children: e.map((l) => {
|
|
695
|
+
const h = Lt(l), u = l.authorType === "CLIENT";
|
|
696
696
|
return /* @__PURE__ */ s("div", { className: "flex gap-ds-03", children: [
|
|
697
|
-
/* @__PURE__ */ s(
|
|
697
|
+
/* @__PURE__ */ s(j, { className: "h-ds-xs-plus w-ds-xs-plus shrink-0 mt-ds-01", children: [
|
|
698
698
|
h.image && /* @__PURE__ */ t(V, { src: h.image, alt: h.name }),
|
|
699
699
|
/* @__PURE__ */ t(
|
|
700
|
-
|
|
700
|
+
$,
|
|
701
701
|
{
|
|
702
702
|
className: N(
|
|
703
703
|
"text-ds-xs font-semibold",
|
|
704
704
|
/* avatar initials — below scale, leave as-is */
|
|
705
705
|
u ? "bg-warning-surface text-text-warning" : "bg-layer-03 text-text-on-color"
|
|
706
706
|
),
|
|
707
|
-
children:
|
|
707
|
+
children: G(h.name)
|
|
708
708
|
}
|
|
709
709
|
)
|
|
710
710
|
] }),
|
|
@@ -712,20 +712,20 @@ const Ee = p.forwardRef(
|
|
|
712
712
|
/* @__PURE__ */ s("div", { className: "flex items-baseline gap-ds-03", children: [
|
|
713
713
|
/* @__PURE__ */ t("span", { className: "text-ds-md font-medium text-text-primary", children: h.name }),
|
|
714
714
|
c ? !u && /* @__PURE__ */ t("span", { className: "rounded bg-layer-03 px-ds-02 py-px text-ds-xs font-semibold uppercase tracking-wider text-text-on-color", children: "Team" }) : u && /* @__PURE__ */ t("span", { className: "rounded bg-warning-surface px-ds-02 py-px text-ds-xs font-semibold uppercase tracking-wider text-text-warning", children: "Client" }),
|
|
715
|
-
/* @__PURE__ */ t("span", { className: "text-ds-sm text-text-placeholder", children:
|
|
715
|
+
/* @__PURE__ */ t("span", { className: "text-ds-sm text-text-placeholder", children: Pt(l.createdAt) })
|
|
716
716
|
] }),
|
|
717
|
-
/* @__PURE__ */ t("div", { className: "mt-ds-02", children:
|
|
718
|
-
content:
|
|
717
|
+
/* @__PURE__ */ t("div", { className: "mt-ds-02", children: w ? w({
|
|
718
|
+
content: l.content,
|
|
719
719
|
className: "[&_.ProseMirror]:!min-h-0 [&_.ProseMirror]:!p-0"
|
|
720
|
-
}) : /* @__PURE__ */ t("p", { className: "text-ds-md text-text-secondary whitespace-pre-wrap", children:
|
|
720
|
+
}) : /* @__PURE__ */ t("p", { className: "text-ds-md text-text-secondary whitespace-pre-wrap", children: Ot(l.content) }) })
|
|
721
721
|
] })
|
|
722
|
-
] },
|
|
722
|
+
] }, l.id);
|
|
723
723
|
})
|
|
724
724
|
}
|
|
725
725
|
) : /* @__PURE__ */ t(
|
|
726
|
-
|
|
726
|
+
M,
|
|
727
727
|
{
|
|
728
|
-
icon: /* @__PURE__ */ t(
|
|
728
|
+
icon: /* @__PURE__ */ t(Ie, {}),
|
|
729
729
|
title: "No comments yet",
|
|
730
730
|
description: "Start a conversation about this task",
|
|
731
731
|
compact: !0
|
|
@@ -733,15 +733,15 @@ const Ee = p.forwardRef(
|
|
|
733
733
|
),
|
|
734
734
|
/* @__PURE__ */ s("div", { className: "mt-ds-05 space-y-ds-03", children: [
|
|
735
735
|
b === "EVERYONE" && !c && /* @__PURE__ */ t("p", { className: "text-ds-xs text-text-warning", children: "This task is visible to clients. Comments may be seen by external users." }),
|
|
736
|
-
|
|
736
|
+
a ? a({
|
|
737
737
|
content: y,
|
|
738
|
-
onChange:
|
|
738
|
+
onChange: I,
|
|
739
739
|
placeholder: "Write a comment..."
|
|
740
740
|
}) : /* @__PURE__ */ t(
|
|
741
741
|
"textarea",
|
|
742
742
|
{
|
|
743
743
|
value: y,
|
|
744
|
-
onChange: (
|
|
744
|
+
onChange: (l) => I(l.target.value),
|
|
745
745
|
placeholder: "Write a comment...",
|
|
746
746
|
rows: 3,
|
|
747
747
|
className: "w-full resize-none rounded-ds-md border border-border bg-transparent px-ds-04 py-ds-03 text-ds-md text-text-primary placeholder:text-text-placeholder outline-none focus:border-border-subtle"
|
|
@@ -755,7 +755,7 @@ const Ee = p.forwardRef(
|
|
|
755
755
|
disabled: !y.replace(/<[^>]*>/g, "").trim(),
|
|
756
756
|
className: "inline-flex items-center gap-ds-02b rounded-ds-lg bg-interactive px-ds-04 py-ds-02b text-ds-sm font-semibold text-text-on-color transition-colors hover:bg-interactive-hover disabled:opacity-[0.38] disabled:cursor-not-allowed",
|
|
757
757
|
children: [
|
|
758
|
-
/* @__PURE__ */ t(
|
|
758
|
+
/* @__PURE__ */ t(et, { className: "h-ico-sm w-ico-sm", stroke: 2 }),
|
|
759
759
|
"Comment"
|
|
760
760
|
]
|
|
761
761
|
}
|
|
@@ -764,20 +764,20 @@ const Ee = p.forwardRef(
|
|
|
764
764
|
] });
|
|
765
765
|
}
|
|
766
766
|
);
|
|
767
|
-
|
|
768
|
-
function
|
|
769
|
-
if (!n) return
|
|
767
|
+
Re.displayName = "ConversationTab";
|
|
768
|
+
function _t(n) {
|
|
769
|
+
if (!n) return me;
|
|
770
770
|
const e = n.toLowerCase();
|
|
771
|
-
return ["jpg", "jpeg", "png", "gif", "svg", "webp", "bmp"].includes(e) ?
|
|
771
|
+
return ["jpg", "jpeg", "png", "gif", "svg", "webp", "bmp"].includes(e) ? it : ["pdf", "doc", "docx", "txt", "rtf"].includes(e) ? lt : ["js", "ts", "jsx", "tsx", "py", "rb", "go", "rs", "html", "css", "json"].includes(e) ? at : ["xls", "xlsx", "csv"].includes(e) ? ot : ["zip", "tar", "gz", "rar", "7z"].includes(e) ? dt : me;
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function kt(n) {
|
|
774
774
|
return new Date(n).toLocaleDateString("en-IN", {
|
|
775
775
|
month: "short",
|
|
776
776
|
day: "numeric",
|
|
777
777
|
year: "numeric"
|
|
778
778
|
});
|
|
779
779
|
}
|
|
780
|
-
const
|
|
780
|
+
const Ae = p.forwardRef(
|
|
781
781
|
function({
|
|
782
782
|
files: e,
|
|
783
783
|
onUpload: b,
|
|
@@ -786,18 +786,18 @@ const Te = p.forwardRef(
|
|
|
786
786
|
className: c,
|
|
787
787
|
readOnly: g = !1
|
|
788
788
|
}, D) {
|
|
789
|
-
const f = p.useRef(null), [m, y] = p.useState(!1),
|
|
789
|
+
const f = p.useRef(null), [m, y] = p.useState(!1), I = (o) => {
|
|
790
790
|
var h;
|
|
791
|
-
const
|
|
792
|
-
|
|
793
|
-
},
|
|
791
|
+
const l = (h = o.target.files) == null ? void 0 : h[0];
|
|
792
|
+
l && b(l), f.current && (f.current.value = "");
|
|
793
|
+
}, v = (o) => {
|
|
794
794
|
var h;
|
|
795
795
|
o.preventDefault(), y(!1);
|
|
796
|
-
const
|
|
797
|
-
|
|
798
|
-
},
|
|
796
|
+
const l = (h = o.dataTransfer.files) == null ? void 0 : h[0];
|
|
797
|
+
l && b(l);
|
|
798
|
+
}, a = (o) => {
|
|
799
799
|
o.preventDefault(), y(!0);
|
|
800
|
-
},
|
|
800
|
+
}, w = () => {
|
|
801
801
|
y(!1);
|
|
802
802
|
};
|
|
803
803
|
return /* @__PURE__ */ s("div", { ref: D, className: N("flex flex-col", c), children: [
|
|
@@ -806,9 +806,9 @@ const Te = p.forwardRef(
|
|
|
806
806
|
{
|
|
807
807
|
role: "region",
|
|
808
808
|
"aria-label": "File upload drop zone",
|
|
809
|
-
onDrop:
|
|
810
|
-
onDragOver:
|
|
811
|
-
onDragLeave:
|
|
809
|
+
onDrop: v,
|
|
810
|
+
onDragOver: a,
|
|
811
|
+
onDragLeave: w,
|
|
812
812
|
className: N(
|
|
813
813
|
"rounded-ds-lg border-2 border-dashed transition-colors",
|
|
814
814
|
m ? "border-interactive bg-interactive/5" : "border-border"
|
|
@@ -816,7 +816,7 @@ const Te = p.forwardRef(
|
|
|
816
816
|
children: [
|
|
817
817
|
/* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-ds-03 py-ds-06", children: [
|
|
818
818
|
/* @__PURE__ */ t("div", { className: "flex h-ds-sm-plus w-ds-sm-plus items-center justify-center rounded-ds-lg bg-layer-02", children: /* @__PURE__ */ t(
|
|
819
|
-
|
|
819
|
+
tt,
|
|
820
820
|
{
|
|
821
821
|
className: "h-ico-sm w-ico-sm text-text-placeholder",
|
|
822
822
|
stroke: 1.5
|
|
@@ -847,7 +847,7 @@ const Te = p.forwardRef(
|
|
|
847
847
|
{
|
|
848
848
|
ref: f,
|
|
849
849
|
type: "file",
|
|
850
|
-
onChange:
|
|
850
|
+
onChange: I,
|
|
851
851
|
className: "hidden"
|
|
852
852
|
}
|
|
853
853
|
)
|
|
@@ -855,14 +855,14 @@ const Te = p.forwardRef(
|
|
|
855
855
|
}
|
|
856
856
|
),
|
|
857
857
|
e.length > 0 ? /* @__PURE__ */ t("div", { className: "mt-ds-05 space-y-ds-02", children: e.map((o) => {
|
|
858
|
-
const
|
|
858
|
+
const l = _t(o.fileType);
|
|
859
859
|
return /* @__PURE__ */ s(
|
|
860
860
|
"div",
|
|
861
861
|
{
|
|
862
862
|
className: "group flex items-center gap-ds-04 rounded-ds-lg px-ds-03 py-ds-03 transition-colors hover:bg-field",
|
|
863
863
|
children: [
|
|
864
864
|
/* @__PURE__ */ t("div", { className: "flex h-ds-sm w-ds-sm shrink-0 items-center justify-center rounded-ds-lg bg-layer-02", children: /* @__PURE__ */ t(
|
|
865
|
-
|
|
865
|
+
l,
|
|
866
866
|
{
|
|
867
867
|
className: "h-ico-sm w-ico-sm text-text-tertiary",
|
|
868
868
|
stroke: 1.5
|
|
@@ -871,12 +871,23 @@ const Te = p.forwardRef(
|
|
|
871
871
|
/* @__PURE__ */ s("div", { className: "flex-1 min-w-0", children: [
|
|
872
872
|
/* @__PURE__ */ t("p", { className: "truncate text-ds-md font-medium text-text-primary", children: o.title }),
|
|
873
873
|
/* @__PURE__ */ s("p", { className: "text-ds-sm text-text-placeholder", children: [
|
|
874
|
-
|
|
874
|
+
kt(o.createdAt),
|
|
875
875
|
/* @__PURE__ */ t("span", { className: "mx-ds-02b", children: "by" }),
|
|
876
876
|
o.uploadedBy.name
|
|
877
877
|
] })
|
|
878
878
|
] }),
|
|
879
879
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-02 opacity-0 transition-opacity group-hover:opacity-100", children: [
|
|
880
|
+
o.externalUrl && /* @__PURE__ */ t(
|
|
881
|
+
"a",
|
|
882
|
+
{
|
|
883
|
+
href: o.externalUrl,
|
|
884
|
+
target: "_blank",
|
|
885
|
+
rel: "noopener noreferrer",
|
|
886
|
+
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors hover:bg-layer-02",
|
|
887
|
+
title: o.externalLabel ?? "Open externally",
|
|
888
|
+
children: /* @__PURE__ */ t(st, { className: "h-ico-sm w-ico-sm text-text-tertiary" })
|
|
889
|
+
}
|
|
890
|
+
),
|
|
880
891
|
o.downloadUrl && /* @__PURE__ */ t(
|
|
881
892
|
"a",
|
|
882
893
|
{
|
|
@@ -885,32 +896,32 @@ const Te = p.forwardRef(
|
|
|
885
896
|
rel: "noopener noreferrer",
|
|
886
897
|
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors hover:bg-layer-02",
|
|
887
898
|
title: "Download",
|
|
888
|
-
children: /* @__PURE__ */ t(
|
|
899
|
+
children: /* @__PURE__ */ t(rt, { className: "h-ico-sm w-ico-sm text-text-tertiary" })
|
|
889
900
|
}
|
|
890
901
|
),
|
|
891
|
-
!g && /* @__PURE__ */ s(
|
|
892
|
-
/* @__PURE__ */ t(
|
|
902
|
+
!g && /* @__PURE__ */ s(gt, { children: [
|
|
903
|
+
/* @__PURE__ */ t(Nt, { asChild: !0, children: /* @__PURE__ */ t(
|
|
893
904
|
"button",
|
|
894
905
|
{
|
|
895
906
|
type: "button",
|
|
896
907
|
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors hover:bg-error-surface",
|
|
897
908
|
title: "Delete",
|
|
898
|
-
children: /* @__PURE__ */ t(
|
|
909
|
+
children: /* @__PURE__ */ t(nt, { className: "h-ico-sm w-ico-sm text-text-error" })
|
|
899
910
|
}
|
|
900
911
|
) }),
|
|
901
|
-
/* @__PURE__ */ s(
|
|
902
|
-
/* @__PURE__ */ s(
|
|
903
|
-
/* @__PURE__ */ t(
|
|
904
|
-
/* @__PURE__ */ s(
|
|
912
|
+
/* @__PURE__ */ s(yt, { children: [
|
|
913
|
+
/* @__PURE__ */ s(vt, { children: [
|
|
914
|
+
/* @__PURE__ */ t(wt, { children: "Delete file?" }),
|
|
915
|
+
/* @__PURE__ */ s(It, { children: [
|
|
905
916
|
'"',
|
|
906
917
|
o.title,
|
|
907
918
|
'" will be permanently deleted. This cannot be undone.'
|
|
908
919
|
] })
|
|
909
920
|
] }),
|
|
910
|
-
/* @__PURE__ */ s(
|
|
911
|
-
/* @__PURE__ */ t(
|
|
912
|
-
/* @__PURE__ */ t(
|
|
913
|
-
|
|
921
|
+
/* @__PURE__ */ s(Dt, { children: [
|
|
922
|
+
/* @__PURE__ */ t(ue, { asChild: !0, children: /* @__PURE__ */ t(pe, { variant: "outline", size: "sm", children: "Cancel" }) }),
|
|
923
|
+
/* @__PURE__ */ t(ue, { asChild: !0, children: /* @__PURE__ */ t(
|
|
924
|
+
pe,
|
|
914
925
|
{
|
|
915
926
|
variant: "solid",
|
|
916
927
|
color: "error",
|
|
@@ -928,9 +939,9 @@ const Te = p.forwardRef(
|
|
|
928
939
|
o.id
|
|
929
940
|
);
|
|
930
941
|
}) }) : /* @__PURE__ */ t("div", { className: "mt-ds-03", children: /* @__PURE__ */ t(
|
|
931
|
-
|
|
942
|
+
M,
|
|
932
943
|
{
|
|
933
|
-
icon: /* @__PURE__ */ t(
|
|
944
|
+
icon: /* @__PURE__ */ t(ee, {}),
|
|
934
945
|
title: "No files attached",
|
|
935
946
|
description: "Upload files to share with your team",
|
|
936
947
|
compact: !0
|
|
@@ -939,16 +950,16 @@ const Te = p.forwardRef(
|
|
|
939
950
|
] });
|
|
940
951
|
}
|
|
941
952
|
);
|
|
942
|
-
|
|
943
|
-
const
|
|
953
|
+
Ae.displayName = "FilesTab";
|
|
954
|
+
const jt = {
|
|
944
955
|
"task.created": {
|
|
945
|
-
icon:
|
|
956
|
+
icon: H,
|
|
946
957
|
color: "text-success-text",
|
|
947
958
|
dotColor: "bg-success",
|
|
948
959
|
getDescription: () => "created this task"
|
|
949
960
|
},
|
|
950
961
|
"task.updated": {
|
|
951
|
-
icon:
|
|
962
|
+
icon: ht,
|
|
952
963
|
color: "text-category-slate-text",
|
|
953
964
|
dotColor: "bg-category-slate",
|
|
954
965
|
getDescription: (n) => {
|
|
@@ -957,7 +968,7 @@ const St = {
|
|
|
957
968
|
}
|
|
958
969
|
},
|
|
959
970
|
"task.moved": {
|
|
960
|
-
icon:
|
|
971
|
+
icon: pt,
|
|
961
972
|
color: "text-warning-text",
|
|
962
973
|
dotColor: "bg-warning",
|
|
963
974
|
getDescription: (n) => {
|
|
@@ -966,7 +977,7 @@ const St = {
|
|
|
966
977
|
}
|
|
967
978
|
},
|
|
968
979
|
"task.assigned": {
|
|
969
|
-
icon:
|
|
980
|
+
icon: ut,
|
|
970
981
|
color: "text-category-cyan-text",
|
|
971
982
|
dotColor: "bg-category-cyan",
|
|
972
983
|
getDescription: (n) => {
|
|
@@ -975,7 +986,7 @@ const St = {
|
|
|
975
986
|
}
|
|
976
987
|
},
|
|
977
988
|
"task.unassigned": {
|
|
978
|
-
icon:
|
|
989
|
+
icon: mt,
|
|
979
990
|
color: "text-text-secondary",
|
|
980
991
|
dotColor: "bg-icon-disabled",
|
|
981
992
|
getDescription: (n) => {
|
|
@@ -984,13 +995,13 @@ const St = {
|
|
|
984
995
|
}
|
|
985
996
|
},
|
|
986
997
|
"task.commented": {
|
|
987
|
-
icon:
|
|
998
|
+
icon: we,
|
|
988
999
|
color: "text-interactive",
|
|
989
1000
|
dotColor: "bg-interactive",
|
|
990
1001
|
getDescription: () => "added a comment"
|
|
991
1002
|
},
|
|
992
1003
|
"task.file_uploaded": {
|
|
993
|
-
icon:
|
|
1004
|
+
icon: ee,
|
|
994
1005
|
color: "text-category-indigo-text",
|
|
995
1006
|
dotColor: "bg-category-indigo",
|
|
996
1007
|
getDescription: (n) => {
|
|
@@ -999,7 +1010,7 @@ const St = {
|
|
|
999
1010
|
}
|
|
1000
1011
|
},
|
|
1001
1012
|
"task.review_requested": {
|
|
1002
|
-
icon:
|
|
1013
|
+
icon: Z,
|
|
1003
1014
|
color: "text-warning-text",
|
|
1004
1015
|
dotColor: "bg-warning",
|
|
1005
1016
|
getDescription: (n) => {
|
|
@@ -1008,7 +1019,7 @@ const St = {
|
|
|
1008
1019
|
}
|
|
1009
1020
|
},
|
|
1010
1021
|
"task.review_completed": {
|
|
1011
|
-
icon:
|
|
1022
|
+
icon: ct,
|
|
1012
1023
|
color: "text-success-text",
|
|
1013
1024
|
dotColor: "bg-success",
|
|
1014
1025
|
getDescription: (n) => {
|
|
@@ -1017,7 +1028,7 @@ const St = {
|
|
|
1017
1028
|
}
|
|
1018
1029
|
},
|
|
1019
1030
|
"task.visibility_changed": {
|
|
1020
|
-
icon:
|
|
1031
|
+
icon: ye,
|
|
1021
1032
|
color: "text-text-tertiary",
|
|
1022
1033
|
dotColor: "bg-icon-secondary",
|
|
1023
1034
|
getDescription: (n) => {
|
|
@@ -1026,7 +1037,7 @@ const St = {
|
|
|
1026
1037
|
}
|
|
1027
1038
|
},
|
|
1028
1039
|
"task.priority_changed": {
|
|
1029
|
-
icon:
|
|
1040
|
+
icon: be,
|
|
1030
1041
|
color: "text-error-text",
|
|
1031
1042
|
dotColor: "bg-error",
|
|
1032
1043
|
getDescription: (n) => {
|
|
@@ -1035,13 +1046,13 @@ const St = {
|
|
|
1035
1046
|
}
|
|
1036
1047
|
},
|
|
1037
1048
|
"task.labels_changed": {
|
|
1038
|
-
icon:
|
|
1049
|
+
icon: Ne,
|
|
1039
1050
|
color: "text-category-amber-text",
|
|
1040
1051
|
dotColor: "bg-category-amber",
|
|
1041
1052
|
getDescription: () => "updated labels"
|
|
1042
1053
|
},
|
|
1043
1054
|
"task.due_date_changed": {
|
|
1044
|
-
icon:
|
|
1055
|
+
icon: ge,
|
|
1045
1056
|
color: "text-warning-text",
|
|
1046
1057
|
dotColor: "bg-warning",
|
|
1047
1058
|
getDescription: (n) => {
|
|
@@ -1049,13 +1060,13 @@ const St = {
|
|
|
1049
1060
|
return e != null && e.dueDate ? `set due date to ${e.dueDate}` : "updated the due date";
|
|
1050
1061
|
}
|
|
1051
1062
|
}
|
|
1052
|
-
},
|
|
1053
|
-
icon:
|
|
1063
|
+
}, Vt = {
|
|
1064
|
+
icon: te,
|
|
1054
1065
|
color: "text-text-placeholder",
|
|
1055
1066
|
dotColor: "bg-icon-disabled",
|
|
1056
1067
|
getDescription: (n) => n.action
|
|
1057
1068
|
};
|
|
1058
|
-
function
|
|
1069
|
+
function $t(n) {
|
|
1059
1070
|
const e = new Date(n), x = (/* @__PURE__ */ new Date()).getTime() - e.getTime(), d = Math.floor(x / 6e4), c = Math.floor(d / 60), g = Math.floor(c / 24);
|
|
1060
1071
|
return d < 1 ? "Just now" : d < 60 ? `${d}m ago` : c < 24 ? `${c}h ago` : g < 7 ? `${g}d ago` : e.toLocaleDateString("en-IN", {
|
|
1061
1072
|
month: "short",
|
|
@@ -1064,17 +1075,17 @@ function Lt(n) {
|
|
|
1064
1075
|
minute: "2-digit"
|
|
1065
1076
|
});
|
|
1066
1077
|
}
|
|
1067
|
-
function
|
|
1078
|
+
function Ht(n) {
|
|
1068
1079
|
const e = n.metadata;
|
|
1069
1080
|
return e != null && e.actorName ? e.actorName : n.actorType === "SYSTEM" ? "System" : n.actorType === "AGENT" ? "AI Agent" : "Someone";
|
|
1070
1081
|
}
|
|
1071
|
-
const
|
|
1082
|
+
const Se = p.forwardRef(
|
|
1072
1083
|
function({ activities: e, className: b }, x) {
|
|
1073
1084
|
return e.length === 0 ? /* @__PURE__ */ t(
|
|
1074
|
-
|
|
1085
|
+
M,
|
|
1075
1086
|
{
|
|
1076
1087
|
ref: x,
|
|
1077
|
-
icon: /* @__PURE__ */ t(
|
|
1088
|
+
icon: /* @__PURE__ */ t(te, {}),
|
|
1078
1089
|
title: "No activity yet",
|
|
1079
1090
|
description: "Actions on this task will appear here",
|
|
1080
1091
|
compact: !0,
|
|
@@ -1083,7 +1094,7 @@ const Ce = p.forwardRef(
|
|
|
1083
1094
|
) : /* @__PURE__ */ s("div", { ref: x, className: N("relative", b), children: [
|
|
1084
1095
|
/* @__PURE__ */ t("div", { className: "absolute left-[11px] top-2 bottom-2 w-px bg-border" }),
|
|
1085
1096
|
/* @__PURE__ */ t("div", { className: "space-y-ds-05", children: e.map((d) => {
|
|
1086
|
-
const c =
|
|
1097
|
+
const c = jt[d.action] || Vt, g = c.icon, D = Ht(d), f = c.getDescription(d);
|
|
1087
1098
|
return /* @__PURE__ */ s("div", { className: "relative flex gap-ds-04 pl-0", children: [
|
|
1088
1099
|
/* @__PURE__ */ t("div", { className: "relative z-raised flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-ds-full bg-layer-01", children: /* @__PURE__ */ t(
|
|
1089
1100
|
"div",
|
|
@@ -1108,37 +1119,37 @@ const Ce = p.forwardRef(
|
|
|
1108
1119
|
f
|
|
1109
1120
|
] })
|
|
1110
1121
|
] }),
|
|
1111
|
-
/* @__PURE__ */ t("p", { className: "mt-ds-01 text-ds-xs text-text-placeholder", children:
|
|
1122
|
+
/* @__PURE__ */ t("p", { className: "mt-ds-01 text-ds-xs text-text-placeholder", children: $t(d.timestamp) })
|
|
1112
1123
|
] })
|
|
1113
1124
|
] }, d.id);
|
|
1114
1125
|
}) })
|
|
1115
1126
|
] });
|
|
1116
1127
|
}
|
|
1117
1128
|
);
|
|
1118
|
-
|
|
1119
|
-
const
|
|
1120
|
-
{ id: "subtasks", label: "Subtasks", icon:
|
|
1121
|
-
{ id: "review", label: "Review", icon:
|
|
1122
|
-
{ id: "conversation", label: "Conversation", icon:
|
|
1123
|
-
{ id: "files", label: "Files", icon:
|
|
1124
|
-
{ id: "activity", label: "Activity", icon:
|
|
1129
|
+
Se.displayName = "ActivityTab";
|
|
1130
|
+
const he = [
|
|
1131
|
+
{ id: "subtasks", label: "Subtasks", icon: ve },
|
|
1132
|
+
{ id: "review", label: "Review", icon: Z },
|
|
1133
|
+
{ id: "conversation", label: "Conversation", icon: Ie },
|
|
1134
|
+
{ id: "files", label: "Files", icon: ee },
|
|
1135
|
+
{ id: "activity", label: "Activity", icon: te }
|
|
1125
1136
|
];
|
|
1126
|
-
function
|
|
1137
|
+
function Gt() {
|
|
1127
1138
|
return /* @__PURE__ */ s("div", { className: "space-y-ds-06 p-ds-06", children: [
|
|
1128
|
-
/* @__PURE__ */ t(
|
|
1139
|
+
/* @__PURE__ */ t(O, { className: "h-ds-xs-plus w-3/4 bg-field" }),
|
|
1129
1140
|
/* @__PURE__ */ t("div", { className: "space-y-ds-04", children: Array.from({ length: 6 }).map((n, e) => /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-04", children: [
|
|
1130
|
-
/* @__PURE__ */ t(
|
|
1131
|
-
/* @__PURE__ */ t(
|
|
1141
|
+
/* @__PURE__ */ t(O, { className: "h-[16px] w-[120px] bg-field" }),
|
|
1142
|
+
/* @__PURE__ */ t(O, { className: "h-[16px] flex-1 bg-field" })
|
|
1132
1143
|
] }, e)) }),
|
|
1133
|
-
/* @__PURE__ */ t("div", { className: "flex gap-ds-05 border-b border-border pb-ds-03", children: Array.from({ length: 5 }).map((n, e) => /* @__PURE__ */ t(
|
|
1144
|
+
/* @__PURE__ */ t("div", { className: "flex gap-ds-05 border-b border-border pb-ds-03", children: Array.from({ length: 5 }).map((n, e) => /* @__PURE__ */ t(O, { className: "h-[12px] w-[64px] bg-field" }, e)) }),
|
|
1134
1145
|
/* @__PURE__ */ s("div", { className: "space-y-ds-04", children: [
|
|
1135
|
-
/* @__PURE__ */ t(
|
|
1136
|
-
/* @__PURE__ */ t(
|
|
1137
|
-
/* @__PURE__ */ t(
|
|
1146
|
+
/* @__PURE__ */ t(O, { className: "h-ds-md w-full bg-field" }),
|
|
1147
|
+
/* @__PURE__ */ t(O, { className: "h-ds-md w-full bg-field" }),
|
|
1148
|
+
/* @__PURE__ */ t(O, { className: "h-ds-md w-4/5 bg-field" })
|
|
1138
1149
|
] })
|
|
1139
1150
|
] });
|
|
1140
1151
|
}
|
|
1141
|
-
const
|
|
1152
|
+
const Mt = p.forwardRef(function({
|
|
1142
1153
|
task: e,
|
|
1143
1154
|
loading: b = !1,
|
|
1144
1155
|
open: x,
|
|
@@ -1149,48 +1160,51 @@ const Vt = p.forwardRef(function({
|
|
|
1149
1160
|
enrichedComments: f,
|
|
1150
1161
|
clientMode: m = !1,
|
|
1151
1162
|
clientEditableFields: y = ["priority", "dueDate"],
|
|
1152
|
-
|
|
1163
|
+
headerSlot: I,
|
|
1164
|
+
extraTabs: v = [],
|
|
1165
|
+
onTitleUpdate: a,
|
|
1153
1166
|
onPropertyUpdate: w,
|
|
1154
|
-
onAssign:
|
|
1155
|
-
onUnassign:
|
|
1156
|
-
onCreateSubtask:
|
|
1157
|
-
onToggleSubtask:
|
|
1158
|
-
onRequestReview:
|
|
1159
|
-
onUpdateReviewStatus:
|
|
1160
|
-
onPostComment:
|
|
1161
|
-
onUploadFile:
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1167
|
+
onAssign: o,
|
|
1168
|
+
onUnassign: l,
|
|
1169
|
+
onCreateSubtask: h,
|
|
1170
|
+
onToggleSubtask: u,
|
|
1171
|
+
onRequestReview: E,
|
|
1172
|
+
onUpdateReviewStatus: T,
|
|
1173
|
+
onPostComment: R,
|
|
1174
|
+
onUploadFile: A,
|
|
1175
|
+
onUploadDeliverable: S,
|
|
1176
|
+
onDeleteFile: P,
|
|
1177
|
+
onTabChange: k,
|
|
1178
|
+
renderEditor: K,
|
|
1179
|
+
renderViewer: W,
|
|
1180
|
+
renderPriorityIndicator: F,
|
|
1181
|
+
renderDatePicker: i,
|
|
1182
|
+
isUploading: J = !1
|
|
1183
|
+
}, Pe) {
|
|
1184
|
+
var ie, le, ae;
|
|
1185
|
+
const [L, se] = p.useState(m ? "conversation" : "subtasks"), [Q, B] = p.useState(!1), [re, z] = p.useState(""), q = p.useRef(null);
|
|
1172
1186
|
p.useEffect(() => {
|
|
1173
|
-
e && (z(e.title),
|
|
1187
|
+
e && (z(e.title), B(!1));
|
|
1174
1188
|
}, [e == null ? void 0 : e.id]), p.useEffect(() => {
|
|
1175
|
-
x &&
|
|
1189
|
+
x && se(m ? "conversation" : "subtasks");
|
|
1176
1190
|
}, [x, m]);
|
|
1177
|
-
const
|
|
1178
|
-
|
|
1179
|
-
},
|
|
1180
|
-
|
|
1181
|
-
const
|
|
1182
|
-
|
|
1183
|
-
},
|
|
1184
|
-
|
|
1191
|
+
const Le = (r) => {
|
|
1192
|
+
se(r), k == null || k(r);
|
|
1193
|
+
}, ne = () => {
|
|
1194
|
+
B(!1);
|
|
1195
|
+
const r = re.trim();
|
|
1196
|
+
r && r !== (e == null ? void 0 : e.title) ? a == null || a(r) : e && z(e.title);
|
|
1197
|
+
}, Oe = (r) => {
|
|
1198
|
+
r.key === "Enter" && (r.preventDefault(), ne()), r.key === "Escape" && (B(!1), e && z(e.title));
|
|
1185
1199
|
};
|
|
1186
1200
|
p.useEffect(() => {
|
|
1187
|
-
|
|
1188
|
-
}, [
|
|
1189
|
-
const
|
|
1190
|
-
return /* @__PURE__ */ t(
|
|
1191
|
-
|
|
1201
|
+
Q && q.current && (q.current.focus(), q.current.select());
|
|
1202
|
+
}, [Q]);
|
|
1203
|
+
const _e = (ie = c.find((r) => r.isTerminal)) == null ? void 0 : ie.id, ke = ((le = c.find((r) => r.isDefault)) == null ? void 0 : le.id) || ((ae = c[0]) == null ? void 0 : ae.id) || "", je = m ? he.filter((r) => r.id === "conversation") : he, Ve = v.filter((r) => r.position === "before"), $e = v.filter((r) => r.position !== "before"), He = f || (e == null ? void 0 : e.comments) || [];
|
|
1204
|
+
return /* @__PURE__ */ t(Me, { open: x, onOpenChange: d, children: /* @__PURE__ */ s(
|
|
1205
|
+
Fe,
|
|
1192
1206
|
{
|
|
1193
|
-
ref:
|
|
1207
|
+
ref: Pe,
|
|
1194
1208
|
side: "right",
|
|
1195
1209
|
className: N(
|
|
1196
1210
|
/* intentional: task detail side panel takes 40% of screen, min 380px for form usability */
|
|
@@ -1199,18 +1213,18 @@ const Vt = p.forwardRef(function({
|
|
|
1199
1213
|
"border-l border-border bg-layer-01"
|
|
1200
1214
|
),
|
|
1201
1215
|
children: [
|
|
1202
|
-
/* @__PURE__ */ t(
|
|
1203
|
-
b || !e ? /* @__PURE__ */ t(
|
|
1216
|
+
/* @__PURE__ */ t(ze, { children: /* @__PURE__ */ t(Be, { children: (e == null ? void 0 : e.title) || "Task Details" }) }),
|
|
1217
|
+
b || !e ? /* @__PURE__ */ t(Gt, {}) : /* @__PURE__ */ s(xe, { children: [
|
|
1204
1218
|
/* @__PURE__ */ s("div", { className: "shrink-0 border-b border-border px-ds-06 pb-ds-05 pt-ds-06", children: [
|
|
1205
|
-
!m &&
|
|
1219
|
+
!m && Q ? /* @__PURE__ */ t(
|
|
1206
1220
|
"input",
|
|
1207
1221
|
{
|
|
1208
1222
|
ref: q,
|
|
1209
1223
|
type: "text",
|
|
1210
|
-
value:
|
|
1211
|
-
onChange: (
|
|
1212
|
-
onBlur:
|
|
1213
|
-
onKeyDown:
|
|
1224
|
+
value: re,
|
|
1225
|
+
onChange: (r) => z(r.target.value),
|
|
1226
|
+
onBlur: ne,
|
|
1227
|
+
onKeyDown: Oe,
|
|
1214
1228
|
className: "w-full bg-transparent text-ds-lg font-semibold text-text-primary outline-none"
|
|
1215
1229
|
}
|
|
1216
1230
|
) : (
|
|
@@ -1218,7 +1232,7 @@ const Vt = p.forwardRef(function({
|
|
|
1218
1232
|
/* @__PURE__ */ t(
|
|
1219
1233
|
"h2",
|
|
1220
1234
|
{
|
|
1221
|
-
onClick: m ? void 0 : () =>
|
|
1235
|
+
onClick: m ? void 0 : () => B(!0),
|
|
1222
1236
|
className: N(
|
|
1223
1237
|
"text-ds-lg font-semibold text-text-primary",
|
|
1224
1238
|
!m && "cursor-text hover:text-interactive transition-colors"
|
|
@@ -1227,79 +1241,93 @@ const Vt = p.forwardRef(function({
|
|
|
1227
1241
|
}
|
|
1228
1242
|
)
|
|
1229
1243
|
),
|
|
1230
|
-
e.parentTaskId && /* @__PURE__ */ t("p", { className: "mt-ds-02 text-ds-sm text-text-placeholder", children: "Subtask" })
|
|
1244
|
+
e.parentTaskId && /* @__PURE__ */ t("p", { className: "mt-ds-02 text-ds-sm text-text-placeholder", children: "Subtask" }),
|
|
1245
|
+
I && /* @__PURE__ */ t("div", { className: "mt-ds-03 flex items-center gap-ds-03", children: I })
|
|
1231
1246
|
] }),
|
|
1232
1247
|
/* @__PURE__ */ s("div", { className: "flex-1 overflow-y-auto", children: [
|
|
1233
1248
|
/* @__PURE__ */ t("div", { className: "border-b border-border px-ds-06 py-ds-05", children: /* @__PURE__ */ t(
|
|
1234
|
-
|
|
1249
|
+
Ee,
|
|
1235
1250
|
{
|
|
1236
1251
|
task: e,
|
|
1237
1252
|
columns: c,
|
|
1238
1253
|
members: g,
|
|
1239
|
-
onUpdate: (
|
|
1240
|
-
m && !y.includes(
|
|
1254
|
+
onUpdate: (r, C) => {
|
|
1255
|
+
m && !y.includes(r) || w == null || w(r, C);
|
|
1241
1256
|
},
|
|
1242
|
-
onAssign: (
|
|
1243
|
-
onUnassign: (
|
|
1257
|
+
onAssign: (r) => o == null ? void 0 : o(r),
|
|
1258
|
+
onUnassign: (r) => l == null ? void 0 : l(r),
|
|
1244
1259
|
readOnly: m,
|
|
1245
1260
|
editableFields: m ? y : void 0,
|
|
1246
|
-
renderPriorityIndicator:
|
|
1247
|
-
renderDatePicker:
|
|
1261
|
+
renderPriorityIndicator: F,
|
|
1262
|
+
renderDatePicker: i
|
|
1248
1263
|
}
|
|
1249
1264
|
) }),
|
|
1250
|
-
/* @__PURE__ */ t("div", { className: "sticky top-0 z-raised bg-layer-01 px-ds-06", children: /* @__PURE__ */ t(
|
|
1251
|
-
/* @__PURE__ */
|
|
1252
|
-
|
|
1253
|
-
|
|
1265
|
+
/* @__PURE__ */ t("div", { className: "sticky top-0 z-raised bg-layer-01 px-ds-06", children: /* @__PURE__ */ t(Ye, { value: L, onValueChange: Le, children: /* @__PURE__ */ s(Ke, { variant: "line", children: [
|
|
1266
|
+
Ve.map((r) => /* @__PURE__ */ s(U, { value: r.id, children: [
|
|
1267
|
+
r.icon && /* @__PURE__ */ t("span", { className: "[&>svg]:h-ico-sm [&>svg]:w-ico-sm shrink-0", children: r.icon }),
|
|
1268
|
+
r.label
|
|
1269
|
+
] }, r.id)),
|
|
1270
|
+
je.map((r) => /* @__PURE__ */ s(U, { value: r.id, children: [
|
|
1271
|
+
/* @__PURE__ */ t(r.icon, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
|
|
1272
|
+
r.label
|
|
1273
|
+
] }, r.id)),
|
|
1274
|
+
$e.map((r) => /* @__PURE__ */ s(U, { value: r.id, children: [
|
|
1275
|
+
r.icon && /* @__PURE__ */ t("span", { className: "[&>svg]:h-ico-sm [&>svg]:w-ico-sm shrink-0", children: r.icon }),
|
|
1276
|
+
r.label
|
|
1277
|
+
] }, r.id))
|
|
1278
|
+
] }) }) }),
|
|
1254
1279
|
/* @__PURE__ */ s("div", { className: "px-ds-06 py-ds-05", children: [
|
|
1255
|
-
|
|
1256
|
-
|
|
1280
|
+
L === "subtasks" && /* @__PURE__ */ t(
|
|
1281
|
+
Te,
|
|
1257
1282
|
{
|
|
1258
1283
|
subtasks: e.subtasks ?? [],
|
|
1259
|
-
terminalColumnId:
|
|
1284
|
+
terminalColumnId: _e,
|
|
1260
1285
|
projectId: e.projectId,
|
|
1261
1286
|
parentTaskId: e.id,
|
|
1262
|
-
defaultColumnId:
|
|
1287
|
+
defaultColumnId: ke,
|
|
1263
1288
|
onCreateSubtask: m ? () => {
|
|
1264
|
-
} : (
|
|
1289
|
+
} : (r) => h == null ? void 0 : h(r),
|
|
1265
1290
|
onToggleSubtask: m ? () => {
|
|
1266
|
-
} : (
|
|
1291
|
+
} : (r, C) => u == null ? void 0 : u(r, C),
|
|
1267
1292
|
readOnly: m
|
|
1268
1293
|
}
|
|
1269
1294
|
),
|
|
1270
|
-
|
|
1271
|
-
|
|
1295
|
+
L === "review" && !m && /* @__PURE__ */ t(
|
|
1296
|
+
Ce,
|
|
1272
1297
|
{
|
|
1273
1298
|
reviews: e.reviewRequests,
|
|
1274
1299
|
members: g,
|
|
1275
|
-
onRequestReview: (
|
|
1276
|
-
onUpdateStatus: (
|
|
1300
|
+
onRequestReview: (r) => E == null ? void 0 : E(r),
|
|
1301
|
+
onUpdateStatus: (r, C, Ge) => T == null ? void 0 : T(r, C, Ge)
|
|
1277
1302
|
}
|
|
1278
1303
|
),
|
|
1279
|
-
|
|
1280
|
-
|
|
1304
|
+
L === "conversation" && /* @__PURE__ */ t(
|
|
1305
|
+
Re,
|
|
1281
1306
|
{
|
|
1282
|
-
comments:
|
|
1307
|
+
comments: He,
|
|
1283
1308
|
taskVisibility: e.visibility,
|
|
1284
|
-
onPostComment: (
|
|
1309
|
+
onPostComment: (r, C) => R == null ? void 0 : R(r, C),
|
|
1285
1310
|
clientMode: m,
|
|
1286
|
-
renderEditor:
|
|
1287
|
-
renderViewer:
|
|
1311
|
+
renderEditor: K,
|
|
1312
|
+
renderViewer: W
|
|
1288
1313
|
}
|
|
1289
1314
|
),
|
|
1290
|
-
|
|
1291
|
-
|
|
1315
|
+
L === "files" && /* @__PURE__ */ t(
|
|
1316
|
+
Ae,
|
|
1292
1317
|
{
|
|
1293
1318
|
files: e.files ?? [],
|
|
1294
1319
|
onUpload: m ? () => {
|
|
1295
|
-
} : (
|
|
1320
|
+
} : (r, C) => A == null ? void 0 : A(r, C),
|
|
1296
1321
|
onDelete: m ? () => {
|
|
1297
|
-
} : (
|
|
1298
|
-
isUploading:
|
|
1322
|
+
} : (r) => P == null ? void 0 : P(r),
|
|
1323
|
+
isUploading: J,
|
|
1299
1324
|
readOnly: m
|
|
1300
1325
|
}
|
|
1301
1326
|
),
|
|
1302
|
-
|
|
1327
|
+
L === "activity" && /* @__PURE__ */ t(Se, { activities: D }),
|
|
1328
|
+
v.map(
|
|
1329
|
+
(r) => L === r.id ? /* @__PURE__ */ t(p.Fragment, { children: r.content }, r.id) : null
|
|
1330
|
+
)
|
|
1303
1331
|
] })
|
|
1304
1332
|
] })
|
|
1305
1333
|
] })
|
|
@@ -1307,13 +1335,13 @@ const Vt = p.forwardRef(function({
|
|
|
1307
1335
|
}
|
|
1308
1336
|
) });
|
|
1309
1337
|
});
|
|
1310
|
-
|
|
1338
|
+
Mt.displayName = "TaskDetailPanel";
|
|
1311
1339
|
export {
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1340
|
+
Se as A,
|
|
1341
|
+
Re as C,
|
|
1342
|
+
Ae as F,
|
|
1343
|
+
Ce as R,
|
|
1344
|
+
Te as S,
|
|
1345
|
+
Mt as T,
|
|
1346
|
+
Ee as a
|
|
1319
1347
|
};
|