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