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