@parallelworks/tandem-web 0.138.0 → 0.139.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/components/AgentWork.js +35 -35
- package/components/AppRoot.js +4 -4
- package/components/AreaWork.js +1 -1
- package/components/BlockHandle.js +3 -3
- package/components/CommandPalette.js +27 -27
- package/components/DateChip.js +27 -27
- package/components/DocLinkPicker.js +17 -17
- package/components/Graph.js +6 -6
- package/components/HoverCards.js +30 -29
- package/components/IssueListBlock.js +83 -83
- package/components/LinkCard.js +20 -20
- package/components/MentionPicker.js +12 -12
- package/components/NewIssueDialog.js +116 -116
- package/components/NewProjectDialog.js +5 -4
- package/components/Planning.js +31 -43
- package/components/RouterLink.js +4 -4
- package/components/ShareDialog.js +12 -12
- package/components/SharedUI.js +19 -19
- package/components/SlashMenu.js +11 -11
- package/components/SubPages.js +10 -10
- package/components/UnlinkedMentions.js +10 -10
- package/components/WorkCounts.js +8 -8
- package/components/settings.js +26 -26
- package/hostedApp.js +36 -36
- package/hosting.d.ts +24 -11
- package/index.js +58 -27
- package/lib/base.js +1 -14
- package/lib/docs.js +6 -6
- package/lib/issueMenu.js +33 -33
- package/lib/knowledge.js +90 -101
- package/lib/knowledgeKinds.js +14 -0
- package/lib/projectList.js +1 -1
- package/lib/projectStates.js +15 -0
- package/lib/router.js +20 -34
- package/package.json +6 -6
- package/pages/areas.js +147 -147
- package/pages/decisions.js +40 -40
- package/pages/issues.js +4 -4
- package/pages/projects.js +232 -231
- package/pages/triage.js +86 -86
- package/pages.js +21 -0
- package/routes/__root.js +6 -6
- package/routes/_workspace/docs/_doc2.js +12 -12
- package/routes/_workspace/docs2.js +8 -8
- package/routes/_workspace/graph2.js +9 -9
- package/routes/_workspace/issues/_identifier2.js +327 -327
- package/routes/_workspace/issues/index.js +6 -6
- package/routes/_workspace/knowledge/_term2.js +125 -124
- package/routes/_workspace/knowledge/index.js +8 -8
- package/routes/_workspace/knowledge/index2.js +22 -21
- package/routes/_workspace/measures2.js +4 -4
- package/routes/_workspace/people/_username.js +4 -4
- package/routes/_workspace/projects/_projectId3.js +264 -263
- package/routes/_workspace/projects/index.js +7 -7
- package/routes/_workspace/settings/account2.js +3 -3
- package/routes/_workspace/settings/audit-log2.js +4 -4
- package/routes/_workspace/settings/audit-log3.js +51 -51
- package/routes/_workspace/settings/labels2.js +14 -14
- package/routes/_workspace/settings/members2.js +9 -9
- package/routes/_workspace/settings/runners2.js +11 -11
- package/routes/_workspace/settings/teams2.js +15 -15
- package/routes/_workspace/settings/tokens2.js +5 -5
- package/routes/_workspace/settings/webhooks2.js +7 -7
- package/routes/_workspace/settings2.js +3 -3
- package/routes/_workspace/teams/_key/cycles/_number2.js +8 -8
- package/routes/_workspace/teams/_key/cycles/index2.js +20 -20
- package/routes/_workspace/teams/_key/issues.js +4 -4
- package/routes/_workspace/teams/_key/projects.js +4 -4
- package/routes/_workspace/teams/_key/settings2.js +8 -8
- package/routes/_workspace2.js +319 -319
- package/routes/docs/route2.js +15 -15
|
@@ -5,59 +5,59 @@ import { areasQuery as a, attachmentsQuery as o, commentsQuery as s, cyclesQuery
|
|
|
5
5
|
import { AreaIcon as y, BranchIcon as b, CalendarIcon as x, CloseIcon as S, CycleIcon as C, EstimateIcon as w, FileTextIcon as T, InboxIcon as E, PriorityIcon as D, ProjectIcon as O, StatusIcon as k, TriageIcon as A, usePriorityNames as j } from "../../../components/icons.js";
|
|
6
6
|
import { Route as ee } from "./_identifier.js";
|
|
7
7
|
import { copyItem as M } from "../../../lib/menus.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { connectorActor as
|
|
13
|
-
import { PickManyBox as
|
|
14
|
-
import { assigneeKey as
|
|
15
|
-
import { issueURL as
|
|
16
|
-
import { rememberPage as
|
|
17
|
-
import { usePageTitle as
|
|
18
|
-
import { issueScope as
|
|
19
|
-
import { useConfirm as
|
|
20
|
-
import { useLinkedIssues as
|
|
21
|
-
import { PersonHoverCard as
|
|
22
|
-
import { AttachButton as
|
|
23
|
-
import { actorAvatar as
|
|
24
|
-
import { Editor as
|
|
25
|
-
import { useOthersOn as
|
|
26
|
-
import { useReadIssueNotifications as
|
|
27
|
-
import { useShortcuts as
|
|
28
|
-
import { AgentPage as
|
|
29
|
-
import { AgentWork as
|
|
30
|
-
import { FavoriteStar as
|
|
31
|
-
import { caretColor as
|
|
32
|
-
import { CollabEditor as
|
|
33
|
-
import { FieldNote as
|
|
34
|
-
import { Timeline as
|
|
35
|
-
import { CustomerRequests as
|
|
36
|
-
import { IssueLinkChips as
|
|
37
|
-
import { IssueCode as
|
|
38
|
-
import { EventLine as
|
|
39
|
-
import { ParentProperty as
|
|
40
|
-
import { Reactions as
|
|
41
|
-
import { TimeInStatus as
|
|
42
|
-
import { SubscribeButton as
|
|
43
|
-
import { Widgets as
|
|
44
|
-
import { Avatar as
|
|
45
|
-
import { createContext as
|
|
46
|
-
import { useErrorMessage as
|
|
47
|
-
import { useTranslations as
|
|
48
|
-
import { Fragment as
|
|
49
|
-
import { useMutation as
|
|
50
|
-
import { ArchiveIcon as
|
|
51
|
-
import { MoreButton as
|
|
8
|
+
import { docRef as N, useDocMenu as P } from "../../../lib/docs.js";
|
|
9
|
+
import { invalidateIssueViews as F, useUpdateIssue as te } from "../../../api/mutations.js";
|
|
10
|
+
import { useTime as ne } from "../../../lib/time.js";
|
|
11
|
+
import { DueDate as I, ProjectStatusIcon as re, SlaBadge as ie, scalePoints as ae, useEstimateLabel as oe } from "../../../components/Planning.js";
|
|
12
|
+
import { connectorActor as se, usePeople as ce } from "../../../lib/people.js";
|
|
13
|
+
import { PickManyBox as le, usePickMany as ue } from "../../../lib/pickMany.js";
|
|
14
|
+
import { assigneeKey as de, parseAssigneeKey as fe, useAssigneeOptions as pe } from "../../../lib/assignees.js";
|
|
15
|
+
import { issueURL as me, useIssueMenu as he } from "../../../lib/issueMenu.js";
|
|
16
|
+
import { rememberPage as ge } from "../../../lib/recent.js";
|
|
17
|
+
import { usePageTitle as _e } from "../../../lib/pageTitle.js";
|
|
18
|
+
import { issueScope as ve, useCan as ye, useCanTriage as be } from "../../../lib/roles.js";
|
|
19
|
+
import { useConfirm as xe } from "../../../lib/confirm.js";
|
|
20
|
+
import { useLinkedIssues as Se } from "../../../lib/linkedIssues.js";
|
|
21
|
+
import { PersonHoverCard as Ce } from "../../../components/PersonHoverCard.js";
|
|
22
|
+
import { AttachButton as we, IssueAttachments as Te, UploadStatus as Ee, useAttachmentUpload as De } from "../../../components/Attachments.js";
|
|
23
|
+
import { actorAvatar as Oe } from "../../../lib/avatar.js";
|
|
24
|
+
import { Editor as L } from "../../../components/Editor.js";
|
|
25
|
+
import { useOthersOn as ke, useReportLocation as Ae } from "../../../lib/live.js";
|
|
26
|
+
import { useReadIssueNotifications as je } from "../../../lib/notifications.js";
|
|
27
|
+
import { useShortcuts as Me } from "../../../lib/shortcuts.js";
|
|
28
|
+
import { AgentPage as Ne } from "../../../components/AgentPage.js";
|
|
29
|
+
import { AgentWork as Pe } from "../../../components/AgentWork.js";
|
|
30
|
+
import { FavoriteStar as Fe } from "../../../components/FavoriteStar.js";
|
|
31
|
+
import { caretColor as Ie, useCollabSession as Le } from "../../../lib/collab.js";
|
|
32
|
+
import { CollabEditor as Re } from "../../../components/CollabEditor.js";
|
|
33
|
+
import { FieldNote as ze, Viewers as Be } from "../../../components/Presence.js";
|
|
34
|
+
import { Timeline as Ve } from "../../../components/ActivityTimeline.js";
|
|
35
|
+
import { CustomerRequests as He } from "../../../components/CustomerRequests.js";
|
|
36
|
+
import { IssueLinkChips as Ue, IssueLinks as We, SharedThreadHeader as Ge } from "../../../components/GitHub.js";
|
|
37
|
+
import { IssueCode as Ke } from "../../../components/IssueCode.js";
|
|
38
|
+
import { EventLine as qe } from "../../../components/IssueEvent.js";
|
|
39
|
+
import { ParentProperty as Je, SubIssuesAndRelations as Ye } from "../../../components/IssueRelations.js";
|
|
40
|
+
import { Reactions as Xe } from "../../../components/Reactions.js";
|
|
41
|
+
import { TimeInStatus as Ze } from "../../../components/Reports.js";
|
|
42
|
+
import { SubscribeButton as Qe } from "../../../components/SubscribeButton.js";
|
|
43
|
+
import { Widgets as $e } from "../../../components/Widgets.js";
|
|
44
|
+
import { Avatar as et, Button as R, Callout as tt, Card as nt, Combobox as z, CopyButton as rt, DatePicker as it, ErrorText as at, IconButton as ot, Kbd as st, RelativeTime as ct, Select as B, TitleInput as lt, Tooltip as ut, buttonClasses as dt, menuDivider as ft, toast as pt, useOpenMenu as V } from "@parallelworks/ui";
|
|
45
|
+
import { createContext as mt, useCallback as ht, useContext as gt, useEffect as _t, useMemo as vt, useRef as H, useState as U } from "react";
|
|
46
|
+
import { useErrorMessage as yt } from "@parallelworks/problem/react";
|
|
47
|
+
import { useTranslations as W } from "use-intl";
|
|
48
|
+
import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
49
|
+
import { useMutation as J, useQuery as Y, useQueryClient as X, useSuspenseQuery as Z } from "@tanstack/react-query";
|
|
50
|
+
import { ArchiveIcon as bt } from "@parallelworks/ui/icons";
|
|
51
|
+
import { MoreButton as xt } from "@parallelworks/ui/list";
|
|
52
52
|
// src/routes/$workspace/issues/$identifier.tsx?tsr-split=component
|
|
53
|
-
function
|
|
54
|
-
let a =
|
|
55
|
-
|
|
53
|
+
function St() {
|
|
54
|
+
let a = W("issue"), o = ne(), s = yt(), c = W("common"), { workspace: l, identifier: u } = ee.useParams(), { data: p } = Z(f(l, u)), { data: h } = Z(v(l)), { data: g } = Z(m), { data: _ = [] } = Y(d(l, u)), [y, x] = U();
|
|
55
|
+
Ae({
|
|
56
56
|
identifier: p.identifier,
|
|
57
57
|
...y && { field: y }
|
|
58
|
-
}),
|
|
58
|
+
}), _e(`${p.identifier} ${p.title}`), je(l, p.identifier);
|
|
59
59
|
let S = i(), C = n(p.identifier, p.title);
|
|
60
|
-
|
|
60
|
+
_t(() => {
|
|
61
61
|
window.location.pathname.endsWith(`/issues/${C}`) || S({
|
|
62
62
|
to: "/$workspace/issues/$identifier",
|
|
63
63
|
params: {
|
|
@@ -74,21 +74,21 @@ function xt() {
|
|
|
74
74
|
l,
|
|
75
75
|
p.identifier
|
|
76
76
|
]);
|
|
77
|
-
let w =
|
|
77
|
+
let w = ye(l, "delete_issues", ve(p)), T = X(), { confirm: E, dialog: D } = xe(), O = J({
|
|
78
78
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/restore", { params: { path: {
|
|
79
79
|
workspace: l,
|
|
80
80
|
identifier: p.identifier
|
|
81
81
|
} } })),
|
|
82
82
|
onSuccess: (e) => {
|
|
83
|
-
T.setQueryData(f(l, p.identifier).queryKey, e),
|
|
83
|
+
T.setQueryData(f(l, p.identifier).queryKey, e), F(T, l, p.identifier);
|
|
84
84
|
}
|
|
85
|
-
}), k =
|
|
85
|
+
}), k = J({
|
|
86
86
|
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}", { params: { path: {
|
|
87
87
|
workspace: l,
|
|
88
88
|
identifier: p.identifier
|
|
89
89
|
} } })),
|
|
90
90
|
onSuccess: () => {
|
|
91
|
-
|
|
91
|
+
pt.success(a("deleted", { identifier: p.identifier })), F(T, l);
|
|
92
92
|
let e = h.find((e) => e.id === p.teamId)?.key;
|
|
93
93
|
S(e ? {
|
|
94
94
|
to: "/$workspace/teams/$key/issues",
|
|
@@ -101,15 +101,15 @@ function xt() {
|
|
|
101
101
|
params: { workspace: l }
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
}), A =
|
|
104
|
+
}), A = ht((e) => S({
|
|
105
105
|
to: "/$workspace/issues/$identifier",
|
|
106
106
|
params: {
|
|
107
107
|
workspace: l,
|
|
108
108
|
identifier: e
|
|
109
109
|
}
|
|
110
110
|
}), [S, l]);
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
Se(l, p.body, A), _t(() => {
|
|
112
|
+
ge(l, {
|
|
113
113
|
kind: "issue",
|
|
114
114
|
href: `/${l}/issues/${p.identifier}`,
|
|
115
115
|
label: `${p.identifier} ${p.title}`
|
|
@@ -119,8 +119,8 @@ function xt() {
|
|
|
119
119
|
p.identifier,
|
|
120
120
|
p.title
|
|
121
121
|
]);
|
|
122
|
-
let j =
|
|
123
|
-
return
|
|
122
|
+
let j = ke({ issue: p.identifier }, g?.user.username), M = h.find((e) => e.id === p.teamId), N = te(l, u), [P, I] = U(null), re = V(), ie = he(l);
|
|
123
|
+
return Me({
|
|
124
124
|
s: () => I("status"),
|
|
125
125
|
p: () => I("priority"),
|
|
126
126
|
a: () => I("assignees"),
|
|
@@ -129,14 +129,14 @@ function xt() {
|
|
|
129
129
|
to: "/$workspace/issues",
|
|
130
130
|
params: { workspace: l }
|
|
131
131
|
})
|
|
132
|
-
},
|
|
132
|
+
}, P === null), /* @__PURE__ */ q("div", {
|
|
133
133
|
className: "flex h-full flex-col",
|
|
134
134
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ q("header", {
|
|
136
136
|
className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-4 text-sm md:px-5",
|
|
137
|
-
onContextMenu: (e) =>
|
|
137
|
+
onContextMenu: (e) => re(e, ie([p])),
|
|
138
138
|
children: [
|
|
139
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ K(r, {
|
|
140
140
|
to: M ? "/$workspace/teams/$key/issues" : "/$workspace/issues",
|
|
141
141
|
params: {
|
|
142
142
|
workspace: l,
|
|
@@ -145,48 +145,48 @@ function xt() {
|
|
|
145
145
|
className: "text-muted-foreground hover:text-foreground",
|
|
146
146
|
children: M?.name ?? a("issues")
|
|
147
147
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ K("span", {
|
|
149
149
|
className: "text-muted-foreground",
|
|
150
150
|
"aria-hidden": "true",
|
|
151
151
|
children: "/"
|
|
152
152
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ K("span", {
|
|
154
154
|
className: "shrink-0 font-medium whitespace-nowrap",
|
|
155
155
|
children: p.identifier
|
|
156
156
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ K(Fe, {
|
|
158
158
|
workspace: l,
|
|
159
159
|
kind: "issue",
|
|
160
160
|
target: p.id
|
|
161
161
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ K(Qe, {
|
|
163
163
|
workspace: l,
|
|
164
164
|
identifier: p.identifier
|
|
165
165
|
}),
|
|
166
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ K(rt, {
|
|
167
167
|
text: n(p.identifier, p.title),
|
|
168
168
|
label: a("copyBranchName"),
|
|
169
|
-
icon: /* @__PURE__ */
|
|
169
|
+
icon: /* @__PURE__ */ K(b, {}),
|
|
170
170
|
size: "sm",
|
|
171
171
|
variant: "ghost",
|
|
172
172
|
success: a("copiedBranchName", { name: n(p.identifier, p.title) }),
|
|
173
173
|
failure: a("copyFailed"),
|
|
174
174
|
className: "max-sm:hidden"
|
|
175
175
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ K(Ue, { links: _ }),
|
|
177
|
+
/* @__PURE__ */ q("span", {
|
|
178
178
|
className: "ml-auto flex items-center gap-3",
|
|
179
179
|
children: [
|
|
180
|
-
|
|
180
|
+
N.isPending && /* @__PURE__ */ K("span", {
|
|
181
181
|
className: "text-xs text-muted-foreground",
|
|
182
182
|
children: c("saving")
|
|
183
183
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ K(Be, {
|
|
185
185
|
workspace: l,
|
|
186
186
|
others: j
|
|
187
187
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
items: () => [...
|
|
188
|
+
/* @__PURE__ */ K(xt, {
|
|
189
|
+
items: () => [...ie([p]), ...w ? [{
|
|
190
190
|
label: a("deleteIssue"),
|
|
191
191
|
destructive: !0,
|
|
192
192
|
onClick: () => E({
|
|
@@ -201,35 +201,35 @@ function xt() {
|
|
|
201
201
|
})
|
|
202
202
|
]
|
|
203
203
|
}),
|
|
204
|
-
|
|
204
|
+
N.isError && /* @__PURE__ */ K(at, {
|
|
205
205
|
inline: !0,
|
|
206
206
|
className: "ml-auto text-xs",
|
|
207
|
-
children: s(
|
|
207
|
+
children: s(N.error)
|
|
208
208
|
})
|
|
209
209
|
]
|
|
210
210
|
}),
|
|
211
211
|
D,
|
|
212
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ q("div", {
|
|
213
213
|
className: "flex min-h-0 flex-1 flex-col overflow-y-auto md:flex-row md:overflow-hidden",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ K("div", {
|
|
215
215
|
className: "min-w-0 md:flex-1 md:overflow-y-auto",
|
|
216
|
-
children: /* @__PURE__ */
|
|
216
|
+
children: /* @__PURE__ */ q("article", {
|
|
217
217
|
className: "w-full px-4 pt-6 pb-24 md:px-8 md:pt-8",
|
|
218
218
|
children: [
|
|
219
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ q(Lt.Provider, {
|
|
220
220
|
value: x,
|
|
221
221
|
children: [
|
|
222
|
-
p.triage && /* @__PURE__ */
|
|
222
|
+
p.triage && /* @__PURE__ */ K(Ct, {
|
|
223
223
|
workspace: l,
|
|
224
224
|
issue: p
|
|
225
225
|
}),
|
|
226
|
-
p.archivedAt && /* @__PURE__ */
|
|
226
|
+
p.archivedAt && /* @__PURE__ */ K(tt, {
|
|
227
227
|
tone: "muted",
|
|
228
|
-
icon: /* @__PURE__ */
|
|
228
|
+
icon: /* @__PURE__ */ K(bt, {}),
|
|
229
229
|
className: "mb-5",
|
|
230
|
-
children: /* @__PURE__ */
|
|
230
|
+
children: /* @__PURE__ */ q("span", {
|
|
231
231
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
232
|
-
children: [a("archivedNote", { when: o.day(p.archivedAt.slice(0, 10)) }), /* @__PURE__ */
|
|
232
|
+
children: [a("archivedNote", { when: o.day(p.archivedAt.slice(0, 10)) }), /* @__PURE__ */ K(R, {
|
|
233
233
|
type: "button",
|
|
234
234
|
size: "sm",
|
|
235
235
|
onClick: () => O.mutate(),
|
|
@@ -238,77 +238,77 @@ function xt() {
|
|
|
238
238
|
})]
|
|
239
239
|
})
|
|
240
240
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ K(wt, {
|
|
242
242
|
issue: p,
|
|
243
|
-
onSave: (e) =>
|
|
243
|
+
onSave: (e) => N.mutate({ title: e })
|
|
244
244
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ K(ze, {
|
|
246
246
|
workspace: l,
|
|
247
247
|
others: j,
|
|
248
248
|
field: "title"
|
|
249
249
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ K(Tt, {
|
|
251
251
|
workspace: l,
|
|
252
252
|
issue: p
|
|
253
253
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ K(ze, {
|
|
255
255
|
workspace: l,
|
|
256
256
|
others: j,
|
|
257
257
|
field: "body"
|
|
258
258
|
}),
|
|
259
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ K(Ye, {
|
|
260
260
|
workspace: l,
|
|
261
261
|
issue: p
|
|
262
262
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ K(He, {
|
|
264
264
|
workspace: l,
|
|
265
265
|
identifier: p.identifier,
|
|
266
266
|
enabled: !!M?.customerRequestsEnabled
|
|
267
267
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ K(Et, {
|
|
269
269
|
workspace: l,
|
|
270
270
|
identifier: u
|
|
271
271
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ K(Ke, {
|
|
273
273
|
workspace: l,
|
|
274
274
|
identifier: u,
|
|
275
275
|
title: p.title
|
|
276
276
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ K(Pe, {
|
|
278
278
|
workspace: l,
|
|
279
279
|
identifier: u
|
|
280
280
|
}),
|
|
281
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ K(Mt, {
|
|
282
282
|
workspace: l,
|
|
283
283
|
identifier: u,
|
|
284
284
|
others: j
|
|
285
285
|
})
|
|
286
286
|
]
|
|
287
287
|
}),
|
|
288
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ K(jt, {
|
|
289
289
|
workspace: l,
|
|
290
290
|
identifier: u
|
|
291
291
|
}),
|
|
292
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ K(Te, {
|
|
293
293
|
workspace: l,
|
|
294
294
|
identifier: u
|
|
295
295
|
})
|
|
296
296
|
]
|
|
297
297
|
})
|
|
298
|
-
}), /* @__PURE__ */
|
|
298
|
+
}), /* @__PURE__ */ K(Dt, {
|
|
299
299
|
workspace: l,
|
|
300
300
|
issue: p,
|
|
301
301
|
team: M,
|
|
302
|
-
open:
|
|
302
|
+
open: P,
|
|
303
303
|
setOpen: I,
|
|
304
|
-
update: (e) =>
|
|
304
|
+
update: (e) => N.mutate(e)
|
|
305
305
|
})]
|
|
306
306
|
})
|
|
307
307
|
]
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
|
-
function
|
|
311
|
-
let i =
|
|
310
|
+
function Ct({ workspace: n, issue: r }) {
|
|
311
|
+
let i = W("triage"), a = yt(), o = X(), s = be(n, r.teamId), c = J({
|
|
312
312
|
mutationFn: async (i) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
|
|
313
313
|
params: { path: {
|
|
314
314
|
workspace: n,
|
|
@@ -322,27 +322,27 @@ function St({ workspace: n, issue: r }) {
|
|
|
322
322
|
"issues"
|
|
323
323
|
] })
|
|
324
324
|
});
|
|
325
|
-
return /* @__PURE__ */
|
|
325
|
+
return /* @__PURE__ */ q("div", {
|
|
326
326
|
className: "mb-5 flex flex-wrap items-center gap-3 rounded-xl border border-border bg-muted/40 px-4 py-3",
|
|
327
327
|
children: [
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ K(A, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
329
|
+
/* @__PURE__ */ K("p", {
|
|
330
330
|
className: "min-w-0 flex-1 text-sm",
|
|
331
331
|
children: i("waiting")
|
|
332
332
|
}),
|
|
333
|
-
c.error && /* @__PURE__ */
|
|
333
|
+
c.error && /* @__PURE__ */ K("span", {
|
|
334
334
|
className: "text-xs text-danger",
|
|
335
335
|
children: a(c.error)
|
|
336
336
|
}),
|
|
337
|
-
s && /* @__PURE__ */
|
|
337
|
+
s && /* @__PURE__ */ q("span", {
|
|
338
338
|
className: "flex gap-2",
|
|
339
|
-
children: [/* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ K(R, {
|
|
340
340
|
variant: "outline",
|
|
341
341
|
size: "sm",
|
|
342
342
|
disabled: c.isPending,
|
|
343
343
|
onClick: () => c.mutate("decline"),
|
|
344
344
|
children: i("decline")
|
|
345
|
-
}), /* @__PURE__ */
|
|
345
|
+
}), /* @__PURE__ */ K(R, {
|
|
346
346
|
variant: "primary",
|
|
347
347
|
size: "sm",
|
|
348
348
|
loading: c.isPending && c.variables === "accept",
|
|
@@ -353,12 +353,12 @@ function St({ workspace: n, issue: r }) {
|
|
|
353
353
|
]
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
|
-
function
|
|
357
|
-
let n =
|
|
358
|
-
return /* @__PURE__ */
|
|
356
|
+
function wt({ issue: e, onSave: t }) {
|
|
357
|
+
let n = W("issue"), r = gt(Lt);
|
|
358
|
+
return /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K("h1", {
|
|
359
359
|
className: "sr-only",
|
|
360
360
|
children: e.title
|
|
361
|
-
}), /* @__PURE__ */
|
|
361
|
+
}), /* @__PURE__ */ K(lt, {
|
|
362
362
|
value: e.title,
|
|
363
363
|
onCommit: t,
|
|
364
364
|
onFocus: () => r("title"),
|
|
@@ -366,24 +366,24 @@ function Ct({ issue: e, onSave: t }) {
|
|
|
366
366
|
"aria-label": n("title")
|
|
367
367
|
})] });
|
|
368
368
|
}
|
|
369
|
-
function
|
|
370
|
-
let n =
|
|
369
|
+
function Tt({ workspace: e, issue: t }) {
|
|
370
|
+
let n = W("issue"), r = W("common"), i = gt(Lt), { data: a } = Z(m), o = H(null), s = vt(() => ({
|
|
371
371
|
name: a?.user.name ?? n("someone"),
|
|
372
|
-
color:
|
|
372
|
+
color: Ie(a?.user.username ?? "")
|
|
373
373
|
}), [
|
|
374
374
|
a?.user.name,
|
|
375
375
|
a?.user.username,
|
|
376
376
|
n
|
|
377
|
-
]), { session: c, error: l } =
|
|
377
|
+
]), { session: c, error: l } = Le({
|
|
378
378
|
workspace: e,
|
|
379
379
|
target: { issue: t.identifier },
|
|
380
380
|
user: s,
|
|
381
381
|
getMarkdown: o
|
|
382
|
-
}), u =
|
|
383
|
-
return /* @__PURE__ */
|
|
382
|
+
}), u = H(null), d = De(e, t.identifier), { data: f = [] } = Y(g(e, t.identifier)), p = ye(e, "comment", ve(t));
|
|
383
|
+
return /* @__PURE__ */ q("div", {
|
|
384
384
|
className: "group mt-4 min-h-32",
|
|
385
385
|
children: [
|
|
386
|
-
c ? /* @__PURE__ */
|
|
386
|
+
c ? /* @__PURE__ */ K(Re, {
|
|
387
387
|
session: c,
|
|
388
388
|
user: s,
|
|
389
389
|
getMarkdown: o,
|
|
@@ -396,23 +396,23 @@ function wt({ workspace: e, issue: t }) {
|
|
|
396
396
|
placeholder: n("addDescription"),
|
|
397
397
|
label: r("description"),
|
|
398
398
|
className: "min-h-32"
|
|
399
|
-
}, `${c.generation}:${c.doc.guid}`) : /* @__PURE__ */
|
|
399
|
+
}, `${c.generation}:${c.doc.guid}`) : /* @__PURE__ */ K(L, {
|
|
400
400
|
value: t.body,
|
|
401
401
|
editable: !1,
|
|
402
402
|
className: "min-h-32"
|
|
403
403
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ K(at, {
|
|
405
405
|
className: "mt-1",
|
|
406
406
|
children: l
|
|
407
407
|
}),
|
|
408
|
-
c && /* @__PURE__ */
|
|
408
|
+
c && /* @__PURE__ */ q("div", {
|
|
409
409
|
className: "mt-1 flex items-center justify-end gap-2",
|
|
410
|
-
children: [/* @__PURE__ */
|
|
410
|
+
children: [/* @__PURE__ */ K(Ee, {
|
|
411
411
|
pending: d.pending,
|
|
412
412
|
error: d.error
|
|
413
|
-
}), /* @__PURE__ */
|
|
413
|
+
}), /* @__PURE__ */ K(we, { onFiles: (e) => d.upload(u.current, e) })]
|
|
414
414
|
}),
|
|
415
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ K(Xe, {
|
|
416
416
|
workspace: e,
|
|
417
417
|
identifier: t.identifier,
|
|
418
418
|
reactions: f,
|
|
@@ -422,25 +422,25 @@ function wt({ workspace: e, issue: t }) {
|
|
|
422
422
|
]
|
|
423
423
|
});
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
let n =
|
|
427
|
-
return i.length === 0 ? null : /* @__PURE__ */
|
|
425
|
+
function Et({ workspace: e, identifier: t }) {
|
|
426
|
+
let n = W("issue"), { data: i } = Z(u(e, t)), a = V(), o = P(e);
|
|
427
|
+
return i.length === 0 ? null : /* @__PURE__ */ q("section", {
|
|
428
428
|
className: "mt-6",
|
|
429
429
|
"aria-label": n("docs"),
|
|
430
|
-
children: [/* @__PURE__ */
|
|
430
|
+
children: [/* @__PURE__ */ K("h2", {
|
|
431
431
|
className: "text-xs font-medium text-muted-foreground",
|
|
432
432
|
children: n("docs")
|
|
433
|
-
}), /* @__PURE__ */
|
|
433
|
+
}), /* @__PURE__ */ K("ul", {
|
|
434
434
|
className: "mt-1 flex flex-wrap gap-1.5",
|
|
435
|
-
children: i.map((t) => /* @__PURE__ */
|
|
435
|
+
children: i.map((t) => /* @__PURE__ */ K("li", { children: /* @__PURE__ */ q(r, {
|
|
436
436
|
to: "/$workspace/docs/$doc",
|
|
437
437
|
params: {
|
|
438
438
|
workspace: e,
|
|
439
|
-
doc:
|
|
439
|
+
doc: N(t)
|
|
440
440
|
},
|
|
441
441
|
onContextMenu: (e) => a(e, o(t)),
|
|
442
|
-
className: `${
|
|
443
|
-
children: [/* @__PURE__ */
|
|
442
|
+
className: `${dt({ size: "sm" })} max-w-72`,
|
|
443
|
+
children: [/* @__PURE__ */ K(T, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ K("span", {
|
|
444
444
|
className: "truncate",
|
|
445
445
|
children: t.title
|
|
446
446
|
})]
|
|
@@ -448,55 +448,55 @@ function Tt({ workspace: e, identifier: t }) {
|
|
|
448
448
|
})]
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
|
-
function
|
|
452
|
-
let l =
|
|
451
|
+
function Dt({ workspace: n, issue: r, team: a, open: o, setOpen: s, update: c }) {
|
|
452
|
+
let l = W("relations"), u = a?.key, f = W("issue.properties"), m = W("common"), h = j(), { data: g = [] } = Y({
|
|
453
453
|
..._(n, u ?? ""),
|
|
454
454
|
enabled: !!u
|
|
455
|
-
}), { data: v = [] } =
|
|
455
|
+
}), { data: v = [] } = Y(p(n)), { data: y = [] } = Y(d(n, r.identifier)), { nameOf: b, actorName: x, avatarOf: S } = ce(n), C = X(), w = J({
|
|
456
456
|
mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/labels", {
|
|
457
457
|
params: { path: { workspace: n } },
|
|
458
458
|
body: {
|
|
459
459
|
name: r,
|
|
460
|
-
color:
|
|
460
|
+
color: Ot[v.length % Ot.length] ?? "#d73a4a"
|
|
461
461
|
}
|
|
462
462
|
})),
|
|
463
463
|
onSuccess: (e) => {
|
|
464
464
|
C.invalidateQueries({ queryKey: p(n).queryKey }), c({ addLabels: [e.id] });
|
|
465
465
|
}
|
|
466
|
-
}), T = r.assignees.map(
|
|
466
|
+
}), T = r.assignees.map(de), E = pe(n, !0), O = (e) => (t) => s(t ? e : null), A = ue(o === "assignees", () => s(null)), ee = ue(o === "labels", () => s(null)), M = "flex h-8 w-full items-center gap-2 rounded-md px-2 text-sm hover:bg-muted", N = V(), P = he(n), F = i(), te = (e, t) => {
|
|
467
467
|
e.stopPropagation(), N(e, t);
|
|
468
468
|
};
|
|
469
|
-
return /* @__PURE__ */
|
|
469
|
+
return /* @__PURE__ */ q("aside", {
|
|
470
470
|
className: "order-first grid shrink-0 grid-cols-2 gap-4 border-b border-border px-4 py-4 md:order-none md:block md:w-72 md:space-y-5 md:overflow-y-auto md:border-b-0 md:border-l md:py-6",
|
|
471
471
|
"aria-label": f("title"),
|
|
472
472
|
onContextMenu: (e) => N(e, P([r])),
|
|
473
473
|
children: [
|
|
474
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ K(Q, {
|
|
475
475
|
label: m("status"),
|
|
476
476
|
shortcut: "S",
|
|
477
|
-
children: /* @__PURE__ */
|
|
477
|
+
children: /* @__PURE__ */ K(z, {
|
|
478
478
|
"aria-label": m("status"),
|
|
479
479
|
open: o === "status",
|
|
480
480
|
onOpenChange: O("status"),
|
|
481
481
|
items: g.map((e) => ({
|
|
482
482
|
value: e.id,
|
|
483
483
|
label: e.name,
|
|
484
|
-
icon: /* @__PURE__ */
|
|
484
|
+
icon: /* @__PURE__ */ K(k, { category: e.category })
|
|
485
485
|
})),
|
|
486
486
|
value: r.status.id,
|
|
487
487
|
onValueChange: (e) => e !== null && e !== r.status.id && c({ statusId: e }),
|
|
488
488
|
placeholder: f("changeStatus"),
|
|
489
|
-
trigger: /* @__PURE__ */
|
|
489
|
+
trigger: /* @__PURE__ */ q("button", {
|
|
490
490
|
type: "button",
|
|
491
491
|
className: M,
|
|
492
|
-
children: [/* @__PURE__ */
|
|
492
|
+
children: [/* @__PURE__ */ K(k, { category: r.status.category }), r.status.name]
|
|
493
493
|
})
|
|
494
494
|
})
|
|
495
495
|
}),
|
|
496
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ K(Q, {
|
|
497
497
|
label: m("priority"),
|
|
498
498
|
shortcut: "P",
|
|
499
|
-
children: /* @__PURE__ */
|
|
499
|
+
children: /* @__PURE__ */ K(z, {
|
|
500
500
|
"aria-label": m("priority"),
|
|
501
501
|
open: o === "priority",
|
|
502
502
|
onOpenChange: O("priority"),
|
|
@@ -509,22 +509,22 @@ function Et({ workspace: n, issue: r, team: a, open: o, setOpen: s, update: c })
|
|
|
509
509
|
].map((e) => ({
|
|
510
510
|
value: String(e),
|
|
511
511
|
label: h[e] ?? "",
|
|
512
|
-
icon: /* @__PURE__ */
|
|
512
|
+
icon: /* @__PURE__ */ K(D, { priority: e })
|
|
513
513
|
})),
|
|
514
514
|
value: String(r.priority),
|
|
515
515
|
onValueChange: (e) => e !== null && c({ priority: Number(e) }),
|
|
516
516
|
placeholder: f("setPriority"),
|
|
517
|
-
trigger: /* @__PURE__ */
|
|
517
|
+
trigger: /* @__PURE__ */ q("button", {
|
|
518
518
|
type: "button",
|
|
519
519
|
className: M,
|
|
520
|
-
children: [/* @__PURE__ */
|
|
520
|
+
children: [/* @__PURE__ */ K(D, { priority: r.priority }), h[r.priority]]
|
|
521
521
|
})
|
|
522
522
|
})
|
|
523
523
|
}),
|
|
524
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ K(Q, {
|
|
525
525
|
label: f("assignees"),
|
|
526
526
|
shortcut: "A",
|
|
527
|
-
children: /* @__PURE__ */
|
|
527
|
+
children: /* @__PURE__ */ K(z, {
|
|
528
528
|
"aria-label": f("assignees"),
|
|
529
529
|
multiple: !0,
|
|
530
530
|
open: o === "assignees",
|
|
@@ -534,21 +534,21 @@ function Et({ workspace: n, issue: r, team: a, open: o, setOpen: s, update: c })
|
|
|
534
534
|
onValueChange: (e) => {
|
|
535
535
|
let t = e.filter((e) => !T.includes(e)), n = T.filter((t) => !e.includes(t));
|
|
536
536
|
c({
|
|
537
|
-
...t.length > 0 && { addAssignees: t.map(
|
|
538
|
-
...n.length > 0 && { removeAssignees: n.map(
|
|
537
|
+
...t.length > 0 && { addAssignees: t.map(fe) },
|
|
538
|
+
...n.length > 0 && { removeAssignees: n.map(fe) }
|
|
539
539
|
}), A();
|
|
540
540
|
},
|
|
541
541
|
placeholder: f("assignTo"),
|
|
542
|
-
trigger: /* @__PURE__ */
|
|
542
|
+
trigger: /* @__PURE__ */ q("button", {
|
|
543
543
|
type: "button",
|
|
544
544
|
className: `${M} h-auto min-h-8 flex-wrap py-1`,
|
|
545
|
-
children: [r.assignees.length === 0 && /* @__PURE__ */
|
|
545
|
+
children: [r.assignees.length === 0 && /* @__PURE__ */ K("span", {
|
|
546
546
|
className: "text-muted-foreground",
|
|
547
547
|
children: f("unassigned")
|
|
548
548
|
}), r.assignees.map((e) => {
|
|
549
549
|
let t = b(e.kind, e.handle);
|
|
550
|
-
return /* @__PURE__ */
|
|
551
|
-
onContextMenu: (r) =>
|
|
550
|
+
return /* @__PURE__ */ K("span", {
|
|
551
|
+
onContextMenu: (r) => te(r, [{
|
|
552
552
|
label: f("unassign", { name: t }),
|
|
553
553
|
onClick: () => c({ removeAssignees: [{
|
|
554
554
|
kind: e.kind,
|
|
@@ -566,13 +566,13 @@ function Et({ workspace: n, issue: r, team: a, open: o, setOpen: s, update: c })
|
|
|
566
566
|
})
|
|
567
567
|
}]),
|
|
568
568
|
className: "flex items-center gap-1.5",
|
|
569
|
-
children: /* @__PURE__ */
|
|
569
|
+
children: /* @__PURE__ */ q(Ce, {
|
|
570
570
|
workspace: n,
|
|
571
571
|
kind: e.kind,
|
|
572
572
|
handle: e.handle,
|
|
573
573
|
className: "flex items-center gap-1.5",
|
|
574
|
-
children: [/* @__PURE__ */
|
|
575
|
-
...
|
|
574
|
+
children: [/* @__PURE__ */ K(et, {
|
|
575
|
+
...Oe(e.kind),
|
|
576
576
|
name: t,
|
|
577
577
|
src: S(e.kind, e.handle),
|
|
578
578
|
size: "xs",
|
|
@@ -584,10 +584,10 @@ function Et({ workspace: n, issue: r, team: a, open: o, setOpen: s, update: c })
|
|
|
584
584
|
})
|
|
585
585
|
})
|
|
586
586
|
}),
|
|
587
|
-
/* @__PURE__ */
|
|
587
|
+
/* @__PURE__ */ K(Q, {
|
|
588
588
|
label: m("labels"),
|
|
589
589
|
shortcut: "L",
|
|
590
|
-
children: /* @__PURE__ */
|
|
590
|
+
children: /* @__PURE__ */ K(z, {
|
|
591
591
|
"aria-label": m("labels"),
|
|
592
592
|
multiple: !0,
|
|
593
593
|
open: o === "labels",
|
|
@@ -595,9 +595,9 @@ function Et({ workspace: n, issue: r, team: a, open: o, setOpen: s, update: c })
|
|
|
595
595
|
items: v.map((e) => ({
|
|
596
596
|
value: e.id,
|
|
597
597
|
label: e.name,
|
|
598
|
-
icon: /* @__PURE__ */
|
|
598
|
+
icon: /* @__PURE__ */ q("span", {
|
|
599
599
|
className: "flex items-center gap-2",
|
|
600
|
-
children: [/* @__PURE__ */
|
|
600
|
+
children: [/* @__PURE__ */ K(le, {}), /* @__PURE__ */ K("span", {
|
|
601
601
|
className: "size-2.5 rounded-full",
|
|
602
602
|
style: { background: e.color }
|
|
603
603
|
})]
|
|
@@ -614,14 +614,14 @@ function Et({ workspace: n, issue: r, team: a, open: o, setOpen: s, update: c })
|
|
|
614
614
|
},
|
|
615
615
|
onCreate: (e) => w.mutate(e),
|
|
616
616
|
placeholder: f("addLabels"),
|
|
617
|
-
trigger: /* @__PURE__ */
|
|
617
|
+
trigger: /* @__PURE__ */ q("button", {
|
|
618
618
|
type: "button",
|
|
619
619
|
className: `${M} h-auto min-h-8 flex-wrap py-1`,
|
|
620
|
-
children: [r.labels.length === 0 && /* @__PURE__ */
|
|
620
|
+
children: [r.labels.length === 0 && /* @__PURE__ */ K("span", {
|
|
621
621
|
className: "text-muted-foreground",
|
|
622
622
|
children: f("noLabels")
|
|
623
|
-
}), r.labels.map((e) => /* @__PURE__ */
|
|
624
|
-
onContextMenu: (t) =>
|
|
623
|
+
}), r.labels.map((e) => /* @__PURE__ */ q("span", {
|
|
624
|
+
onContextMenu: (t) => te(t, [{
|
|
625
625
|
label: f("removeLabel", { name: e.name }),
|
|
626
626
|
onClick: () => c({ removeLabels: [e.id] })
|
|
627
627
|
}, {
|
|
@@ -634,10 +634,10 @@ function Et({ workspace: n, issue: r, team: a, open: o, setOpen: s, update: c })
|
|
|
634
634
|
}]),
|
|
635
635
|
title: e.name,
|
|
636
636
|
className: "inline-flex max-w-full min-w-0 items-center gap-1 rounded-full border border-border px-2 py-0.5 text-xs",
|
|
637
|
-
children: [/* @__PURE__ */
|
|
637
|
+
children: [/* @__PURE__ */ K("span", {
|
|
638
638
|
className: "size-2 shrink-0 rounded-full",
|
|
639
639
|
style: { background: e.color }
|
|
640
|
-
}), /* @__PURE__ */
|
|
640
|
+
}), /* @__PURE__ */ K("span", {
|
|
641
641
|
className: "truncate",
|
|
642
642
|
children: e.name
|
|
643
643
|
})]
|
|
@@ -645,57 +645,57 @@ function Et({ workspace: n, issue: r, team: a, open: o, setOpen: s, update: c })
|
|
|
645
645
|
})
|
|
646
646
|
})
|
|
647
647
|
}),
|
|
648
|
-
/* @__PURE__ */
|
|
648
|
+
/* @__PURE__ */ K(Q, {
|
|
649
649
|
label: l("parent"),
|
|
650
|
-
children: /* @__PURE__ */
|
|
650
|
+
children: /* @__PURE__ */ K(Je, {
|
|
651
651
|
workspace: n,
|
|
652
652
|
issue: r,
|
|
653
653
|
row: M
|
|
654
654
|
})
|
|
655
655
|
}),
|
|
656
|
-
/* @__PURE__ */
|
|
656
|
+
/* @__PURE__ */ K(At, {
|
|
657
657
|
workspace: n,
|
|
658
658
|
issue: r,
|
|
659
659
|
team: a,
|
|
660
660
|
update: c,
|
|
661
661
|
row: M
|
|
662
662
|
}),
|
|
663
|
-
/* @__PURE__ */
|
|
663
|
+
/* @__PURE__ */ K(Q, {
|
|
664
664
|
label: f("created"),
|
|
665
|
-
children: /* @__PURE__ */
|
|
665
|
+
children: /* @__PURE__ */ q("p", {
|
|
666
666
|
className: "flex items-center gap-2 px-2 text-sm",
|
|
667
|
-
children: [/* @__PURE__ */
|
|
667
|
+
children: [/* @__PURE__ */ K(Ce, {
|
|
668
668
|
workspace: n,
|
|
669
669
|
kind: r.creator.kind,
|
|
670
670
|
handle: r.creator.handle,
|
|
671
|
-
children: /* @__PURE__ */
|
|
672
|
-
...
|
|
671
|
+
children: /* @__PURE__ */ K(et, {
|
|
672
|
+
...Oe(r.creator.kind),
|
|
673
673
|
name: x(r.creator),
|
|
674
674
|
src: S(r.creator.kind, r.creator.handle),
|
|
675
675
|
size: "xs",
|
|
676
676
|
tooltip: r.creator.kind !== "user"
|
|
677
677
|
})
|
|
678
|
-
}), /* @__PURE__ */
|
|
678
|
+
}), /* @__PURE__ */ K(ct, {
|
|
679
679
|
value: r.createdAt,
|
|
680
680
|
exact: "medium"
|
|
681
681
|
})]
|
|
682
682
|
})
|
|
683
683
|
}),
|
|
684
|
-
/* @__PURE__ */
|
|
684
|
+
/* @__PURE__ */ K(Q, {
|
|
685
685
|
label: f("timeInStatus"),
|
|
686
|
-
children: /* @__PURE__ */
|
|
686
|
+
children: /* @__PURE__ */ K(Ze, {
|
|
687
687
|
workspace: n,
|
|
688
688
|
identifier: r.identifier
|
|
689
689
|
})
|
|
690
690
|
}),
|
|
691
|
-
y.length > 0 && /* @__PURE__ */
|
|
691
|
+
y.length > 0 && /* @__PURE__ */ K(Q, {
|
|
692
692
|
label: f("syncedWith"),
|
|
693
|
-
children: /* @__PURE__ */
|
|
693
|
+
children: /* @__PURE__ */ K(We, { links: y })
|
|
694
694
|
})
|
|
695
695
|
]
|
|
696
696
|
});
|
|
697
697
|
}
|
|
698
|
-
var
|
|
698
|
+
var Ot = [
|
|
699
699
|
"#d73a4a",
|
|
700
700
|
"#2f8a57",
|
|
701
701
|
"#8250df",
|
|
@@ -704,63 +704,63 @@ var Dt = [
|
|
|
704
704
|
"#57606a",
|
|
705
705
|
"#1a7f37"
|
|
706
706
|
];
|
|
707
|
-
function
|
|
707
|
+
function kt({ workspace: e, origin: t, className: n }) {
|
|
708
708
|
let i = "size-3.5 shrink-0 text-muted-foreground", a = t.title.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
|
|
709
709
|
switch (t.kind) {
|
|
710
|
-
case "decision": return /* @__PURE__ */
|
|
710
|
+
case "decision": return /* @__PURE__ */ q(r, {
|
|
711
711
|
to: "/$workspace/issues/$identifier",
|
|
712
712
|
params: {
|
|
713
713
|
workspace: e,
|
|
714
714
|
identifier: t.key
|
|
715
715
|
},
|
|
716
716
|
className: n,
|
|
717
|
-
children: [/* @__PURE__ */
|
|
717
|
+
children: [/* @__PURE__ */ K(E, { className: i }), /* @__PURE__ */ K(ut, {
|
|
718
718
|
content: a,
|
|
719
719
|
overflowOnly: !0,
|
|
720
|
-
children: /* @__PURE__ */
|
|
720
|
+
children: /* @__PURE__ */ K("span", {
|
|
721
721
|
className: "truncate",
|
|
722
722
|
children: a
|
|
723
723
|
})
|
|
724
724
|
})]
|
|
725
725
|
});
|
|
726
|
-
case "area": return /* @__PURE__ */
|
|
726
|
+
case "area": return /* @__PURE__ */ q(r, {
|
|
727
727
|
to: "/$workspace/areas/$area",
|
|
728
728
|
params: {
|
|
729
729
|
workspace: e,
|
|
730
730
|
area: t.key
|
|
731
731
|
},
|
|
732
732
|
className: n,
|
|
733
|
-
children: [/* @__PURE__ */
|
|
733
|
+
children: [/* @__PURE__ */ K(y, { className: i }), /* @__PURE__ */ K("span", {
|
|
734
734
|
className: "truncate",
|
|
735
735
|
children: a
|
|
736
736
|
})]
|
|
737
737
|
});
|
|
738
|
-
default: return /* @__PURE__ */
|
|
738
|
+
default: return /* @__PURE__ */ q(r, {
|
|
739
739
|
to: "/$workspace/docs/$doc",
|
|
740
740
|
params: {
|
|
741
741
|
workspace: e,
|
|
742
742
|
doc: t.key
|
|
743
743
|
},
|
|
744
744
|
className: n,
|
|
745
|
-
children: [/* @__PURE__ */
|
|
745
|
+
children: [/* @__PURE__ */ K(T, { className: i }), /* @__PURE__ */ K("span", {
|
|
746
746
|
className: "truncate",
|
|
747
747
|
children: a
|
|
748
748
|
})]
|
|
749
749
|
});
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
|
-
function
|
|
753
|
-
let o =
|
|
752
|
+
function At({ workspace: e, issue: t, team: n, update: r, row: i }) {
|
|
753
|
+
let o = W("planning"), s = W("flow"), l = ne(), u = oe(), { data: d = [] } = Y(h(e)), f = d.find((e) => e.id === t.project?.id), { data: p = [] } = Y({
|
|
754
754
|
...c(e, n?.key ?? ""),
|
|
755
755
|
enabled: !!n?.cyclesEnabled
|
|
756
756
|
}), m = n?.estimateScale ?? "none", g = t.status.category === "completed" || t.status.category === "canceled", _ = (e) => e.name ? o("cycleNamed", {
|
|
757
757
|
number: e.number,
|
|
758
758
|
name: e.name
|
|
759
|
-
}) : o("cycle", { number: e.number }), v = p.filter((e) => e.state !== "past" || e.id === t.cycle?.id), { data: b = [] } =
|
|
760
|
-
return /* @__PURE__ */
|
|
761
|
-
n && n.flow.length > 0 && /* @__PURE__ */
|
|
759
|
+
}) : o("cycle", { number: e.number }), v = p.filter((e) => e.state !== "past" || e.id === t.cycle?.id), { data: b = [] } = Y(a(e)), T = b.filter((e) => !e.teamId || e.teamId === t.teamId);
|
|
760
|
+
return /* @__PURE__ */ q(G, { children: [
|
|
761
|
+
n && n.flow.length > 0 && /* @__PURE__ */ K(Q, {
|
|
762
762
|
label: s("stage"),
|
|
763
|
-
children: /* @__PURE__ */
|
|
763
|
+
children: /* @__PURE__ */ K(B, {
|
|
764
764
|
"aria-label": s("stage"),
|
|
765
765
|
value: t.stage ?? "",
|
|
766
766
|
onValueChange: (e) => r({ stage: e ?? "" }),
|
|
@@ -771,22 +771,22 @@ function kt({ workspace: e, issue: t, team: n, update: r, row: i }) {
|
|
|
771
771
|
value: e.stage,
|
|
772
772
|
label: s(`stages.${e.stage}`)
|
|
773
773
|
}))],
|
|
774
|
-
trigger: /* @__PURE__ */
|
|
774
|
+
trigger: /* @__PURE__ */ q("button", {
|
|
775
775
|
type: "button",
|
|
776
776
|
className: i,
|
|
777
|
-
children: [/* @__PURE__ */
|
|
777
|
+
children: [/* @__PURE__ */ K(C, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.stage ? /* @__PURE__ */ K("span", {
|
|
778
778
|
className: "truncate",
|
|
779
779
|
children: s(`stages.${t.stage}`)
|
|
780
|
-
}) : /* @__PURE__ */
|
|
780
|
+
}) : /* @__PURE__ */ K("span", {
|
|
781
781
|
className: "text-muted-foreground",
|
|
782
782
|
children: s("notInFlow")
|
|
783
783
|
})]
|
|
784
784
|
})
|
|
785
785
|
})
|
|
786
786
|
}),
|
|
787
|
-
/* @__PURE__ */
|
|
787
|
+
/* @__PURE__ */ K(Q, {
|
|
788
788
|
label: o("area"),
|
|
789
|
-
children: /* @__PURE__ */
|
|
789
|
+
children: /* @__PURE__ */ K(B, {
|
|
790
790
|
"aria-label": o("area"),
|
|
791
791
|
value: t.area?.key ?? "",
|
|
792
792
|
onValueChange: (e) => r({ area: e ?? "" }),
|
|
@@ -798,30 +798,30 @@ function kt({ workspace: e, issue: t, team: n, update: r, row: i }) {
|
|
|
798
798
|
label: e.title,
|
|
799
799
|
...e.status === "proposed" && { description: o("proposedArea") }
|
|
800
800
|
}))],
|
|
801
|
-
trigger: /* @__PURE__ */
|
|
801
|
+
trigger: /* @__PURE__ */ q("button", {
|
|
802
802
|
type: "button",
|
|
803
803
|
className: i,
|
|
804
|
-
children: [/* @__PURE__ */
|
|
804
|
+
children: [/* @__PURE__ */ K(y, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.area ? /* @__PURE__ */ K("span", {
|
|
805
805
|
className: "truncate",
|
|
806
806
|
children: t.area.title
|
|
807
|
-
}) : /* @__PURE__ */
|
|
807
|
+
}) : /* @__PURE__ */ K("span", {
|
|
808
808
|
className: "text-muted-foreground",
|
|
809
809
|
children: o("noArea")
|
|
810
810
|
})]
|
|
811
811
|
})
|
|
812
812
|
})
|
|
813
813
|
}),
|
|
814
|
-
t.origin && /* @__PURE__ */
|
|
814
|
+
t.origin && /* @__PURE__ */ K(Q, {
|
|
815
815
|
label: o("startedFrom"),
|
|
816
|
-
children: /* @__PURE__ */
|
|
816
|
+
children: /* @__PURE__ */ K(kt, {
|
|
817
817
|
workspace: e,
|
|
818
818
|
origin: t.origin,
|
|
819
819
|
className: i
|
|
820
820
|
})
|
|
821
821
|
}),
|
|
822
|
-
/* @__PURE__ */
|
|
822
|
+
/* @__PURE__ */ K(Q, {
|
|
823
823
|
label: o("project"),
|
|
824
|
-
children: /* @__PURE__ */
|
|
824
|
+
children: /* @__PURE__ */ K(B, {
|
|
825
825
|
"aria-label": o("project"),
|
|
826
826
|
value: t.project?.id ?? "",
|
|
827
827
|
onValueChange: (e) => r({ projectId: e ?? "" }),
|
|
@@ -831,24 +831,24 @@ function kt({ workspace: e, issue: t, team: n, update: r, row: i }) {
|
|
|
831
831
|
}, ...d.map((e) => ({
|
|
832
832
|
value: e.id,
|
|
833
833
|
label: e.name,
|
|
834
|
-
icon: /* @__PURE__ */
|
|
834
|
+
icon: /* @__PURE__ */ K(re, { status: e.status })
|
|
835
835
|
}))],
|
|
836
|
-
trigger: /* @__PURE__ */
|
|
836
|
+
trigger: /* @__PURE__ */ q("button", {
|
|
837
837
|
type: "button",
|
|
838
838
|
className: i,
|
|
839
|
-
children: [/* @__PURE__ */
|
|
839
|
+
children: [/* @__PURE__ */ K(O, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.project ? /* @__PURE__ */ K("span", {
|
|
840
840
|
className: "truncate",
|
|
841
841
|
children: t.project.name
|
|
842
|
-
}) : /* @__PURE__ */
|
|
842
|
+
}) : /* @__PURE__ */ K("span", {
|
|
843
843
|
className: "text-muted-foreground",
|
|
844
844
|
children: o("noProject")
|
|
845
845
|
})]
|
|
846
846
|
})
|
|
847
847
|
})
|
|
848
848
|
}),
|
|
849
|
-
t.project && /* @__PURE__ */
|
|
849
|
+
t.project && /* @__PURE__ */ K(Q, {
|
|
850
850
|
label: o("milestone"),
|
|
851
|
-
children: /* @__PURE__ */
|
|
851
|
+
children: /* @__PURE__ */ K(B, {
|
|
852
852
|
"aria-label": o("milestone"),
|
|
853
853
|
value: t.milestone?.id ?? "",
|
|
854
854
|
onValueChange: (e) => r({ milestoneId: e ?? "" }),
|
|
@@ -860,22 +860,22 @@ function kt({ workspace: e, issue: t, team: n, update: r, row: i }) {
|
|
|
860
860
|
label: e.name,
|
|
861
861
|
...e.targetDate && { description: l.day(e.targetDate) }
|
|
862
862
|
}))],
|
|
863
|
-
trigger: /* @__PURE__ */
|
|
863
|
+
trigger: /* @__PURE__ */ K("button", {
|
|
864
864
|
type: "button",
|
|
865
865
|
className: i,
|
|
866
|
-
children: t.milestone ? /* @__PURE__ */
|
|
866
|
+
children: t.milestone ? /* @__PURE__ */ K("span", {
|
|
867
867
|
className: "truncate",
|
|
868
868
|
children: t.milestone.name
|
|
869
|
-
}) : /* @__PURE__ */
|
|
869
|
+
}) : /* @__PURE__ */ K("span", {
|
|
870
870
|
className: "text-muted-foreground",
|
|
871
871
|
children: o("noMilestone")
|
|
872
872
|
})
|
|
873
873
|
})
|
|
874
874
|
})
|
|
875
875
|
}),
|
|
876
|
-
n?.cyclesEnabled && /* @__PURE__ */
|
|
876
|
+
n?.cyclesEnabled && /* @__PURE__ */ K(Q, {
|
|
877
877
|
label: o("cycleLabel"),
|
|
878
|
-
children: /* @__PURE__ */
|
|
878
|
+
children: /* @__PURE__ */ K(B, {
|
|
879
879
|
"aria-label": o("cycleLabel"),
|
|
880
880
|
value: t.cycle?.id ?? "",
|
|
881
881
|
onValueChange: (e) => r({ cycleId: e ?? "" }),
|
|
@@ -890,75 +890,75 @@ function kt({ workspace: e, issue: t, team: n, update: r, row: i }) {
|
|
|
890
890
|
dates: l.dayRange(e.startsOn, e.endsOn)
|
|
891
891
|
})
|
|
892
892
|
}))],
|
|
893
|
-
trigger: /* @__PURE__ */
|
|
893
|
+
trigger: /* @__PURE__ */ q("button", {
|
|
894
894
|
type: "button",
|
|
895
895
|
className: i,
|
|
896
|
-
children: [/* @__PURE__ */
|
|
896
|
+
children: [/* @__PURE__ */ K(C, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.cycle ? /* @__PURE__ */ K("span", {
|
|
897
897
|
className: "truncate",
|
|
898
898
|
children: _(t.cycle)
|
|
899
|
-
}) : /* @__PURE__ */
|
|
899
|
+
}) : /* @__PURE__ */ K("span", {
|
|
900
900
|
className: "text-muted-foreground",
|
|
901
901
|
children: o("noCycle")
|
|
902
902
|
})]
|
|
903
903
|
})
|
|
904
904
|
})
|
|
905
905
|
}),
|
|
906
|
-
(m !== "none" || !!t.estimate) && /* @__PURE__ */
|
|
906
|
+
(m !== "none" || !!t.estimate) && /* @__PURE__ */ K(Q, {
|
|
907
907
|
label: o("estimate"),
|
|
908
|
-
children: /* @__PURE__ */
|
|
908
|
+
children: /* @__PURE__ */ K(B, {
|
|
909
909
|
"aria-label": o("estimate"),
|
|
910
910
|
value: t.estimate ?? 0,
|
|
911
911
|
onValueChange: (e) => r({ estimate: e ?? 0 }),
|
|
912
912
|
items: [{
|
|
913
913
|
value: 0,
|
|
914
914
|
label: o("noEstimate")
|
|
915
|
-
}, ...
|
|
915
|
+
}, ...ae(m).map((e) => ({
|
|
916
916
|
value: e,
|
|
917
917
|
label: u(e, m)
|
|
918
918
|
}))],
|
|
919
|
-
trigger: /* @__PURE__ */
|
|
919
|
+
trigger: /* @__PURE__ */ q("button", {
|
|
920
920
|
type: "button",
|
|
921
921
|
className: i,
|
|
922
|
-
children: [/* @__PURE__ */
|
|
922
|
+
children: [/* @__PURE__ */ K(w, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.estimate ? u(t.estimate, m) : /* @__PURE__ */ K("span", {
|
|
923
923
|
className: "text-muted-foreground",
|
|
924
924
|
children: o("noEstimate")
|
|
925
925
|
})]
|
|
926
926
|
})
|
|
927
927
|
})
|
|
928
928
|
}),
|
|
929
|
-
/* @__PURE__ */
|
|
929
|
+
/* @__PURE__ */ K(Q, {
|
|
930
930
|
label: o("dueDate"),
|
|
931
|
-
children: /* @__PURE__ */
|
|
931
|
+
children: /* @__PURE__ */ q("div", {
|
|
932
932
|
className: "flex items-center",
|
|
933
|
-
children: [/* @__PURE__ */
|
|
933
|
+
children: [/* @__PURE__ */ K(it, {
|
|
934
934
|
value: t.dueDate ?? "",
|
|
935
935
|
onValueChange: (e) => r({ dueDate: e }),
|
|
936
936
|
"aria-label": o("dueDate"),
|
|
937
937
|
required: !0,
|
|
938
|
-
trigger: /* @__PURE__ */
|
|
938
|
+
trigger: /* @__PURE__ */ K("button", {
|
|
939
939
|
type: "button",
|
|
940
940
|
className: i,
|
|
941
|
-
children: t.dueDate ? /* @__PURE__ */
|
|
941
|
+
children: t.dueDate ? /* @__PURE__ */ K(I, {
|
|
942
942
|
date: t.dueDate,
|
|
943
943
|
closed: g
|
|
944
|
-
}) : /* @__PURE__ */
|
|
944
|
+
}) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(x, { className: "size-3.5 shrink-0 text-muted-foreground" }), /* @__PURE__ */ K("span", {
|
|
945
945
|
className: "text-muted-foreground",
|
|
946
946
|
children: o("noDueDate")
|
|
947
947
|
})] })
|
|
948
948
|
})
|
|
949
|
-
}), t.dueDate && /* @__PURE__ */
|
|
949
|
+
}), t.dueDate && /* @__PURE__ */ K(ot, {
|
|
950
950
|
variant: "ghost",
|
|
951
|
-
icon: /* @__PURE__ */
|
|
951
|
+
icon: /* @__PURE__ */ K(S, { className: "size-3.5" }),
|
|
952
952
|
label: o("clearDueDate"),
|
|
953
953
|
onClick: () => r({ dueDate: "" })
|
|
954
954
|
})]
|
|
955
955
|
})
|
|
956
956
|
}),
|
|
957
|
-
t.slaDueAt && !g && /* @__PURE__ */
|
|
957
|
+
t.slaDueAt && !g && /* @__PURE__ */ K(Q, {
|
|
958
958
|
label: o("sla.label"),
|
|
959
|
-
children: /* @__PURE__ */
|
|
959
|
+
children: /* @__PURE__ */ K("span", {
|
|
960
960
|
className: "flex h-7 items-center px-2",
|
|
961
|
-
children: /* @__PURE__ */
|
|
961
|
+
children: /* @__PURE__ */ K(ie, {
|
|
962
962
|
issue: t,
|
|
963
963
|
team: n
|
|
964
964
|
})
|
|
@@ -966,18 +966,18 @@ function kt({ workspace: e, issue: t, team: n, update: r, row: i }) {
|
|
|
966
966
|
})
|
|
967
967
|
] });
|
|
968
968
|
}
|
|
969
|
-
function
|
|
970
|
-
return /* @__PURE__ */
|
|
969
|
+
function Q({ label: e, shortcut: t, children: n }) {
|
|
970
|
+
return /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ q("p", {
|
|
971
971
|
className: "mb-1 flex items-center justify-between px-2 text-xs text-muted-foreground",
|
|
972
|
-
children: [e, t && /* @__PURE__ */
|
|
972
|
+
children: [e, t && /* @__PURE__ */ K(st, {
|
|
973
973
|
keys: t,
|
|
974
974
|
size: "xs",
|
|
975
975
|
className: "hidden md:inline-flex"
|
|
976
976
|
})]
|
|
977
977
|
}), n] });
|
|
978
978
|
}
|
|
979
|
-
function
|
|
980
|
-
let n =
|
|
979
|
+
function jt({ workspace: e, identifier: t }) {
|
|
980
|
+
let n = W("issue.activity"), { data: r } = Z(l(e, t)), [i, a] = U(!1), o = vt(() => {
|
|
981
981
|
let e = [];
|
|
982
982
|
for (let t of r) {
|
|
983
983
|
if (t.type.startsWith("comment.") || t.type.startsWith("issue.reaction_")) continue;
|
|
@@ -986,23 +986,23 @@ function At({ workspace: e, identifier: t }) {
|
|
|
986
986
|
}
|
|
987
987
|
return e;
|
|
988
988
|
}, [r]), s = i ? 0 : Math.max(0, o.length - 5);
|
|
989
|
-
return /* @__PURE__ */
|
|
989
|
+
return /* @__PURE__ */ q("section", {
|
|
990
990
|
className: "mt-10",
|
|
991
991
|
"aria-label": n("title"),
|
|
992
992
|
children: [
|
|
993
|
-
/* @__PURE__ */
|
|
993
|
+
/* @__PURE__ */ K("h2", {
|
|
994
994
|
className: "text-base font-semibold",
|
|
995
995
|
children: n("title")
|
|
996
996
|
}),
|
|
997
|
-
s > 0 && /* @__PURE__ */
|
|
997
|
+
s > 0 && /* @__PURE__ */ K("button", {
|
|
998
998
|
type: "button",
|
|
999
999
|
onClick: () => a(!0),
|
|
1000
1000
|
className: "mt-3 text-xs text-muted-foreground hover:text-foreground",
|
|
1001
1001
|
children: n("showEarlier", { count: s })
|
|
1002
1002
|
}),
|
|
1003
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ K(Ve, {
|
|
1004
1004
|
className: "mt-3",
|
|
1005
|
-
children: o.slice(s).map((t) => /* @__PURE__ */
|
|
1005
|
+
children: o.slice(s).map((t) => /* @__PURE__ */ K(qe, {
|
|
1006
1006
|
workspace: e,
|
|
1007
1007
|
event: t
|
|
1008
1008
|
}, t.id))
|
|
@@ -1010,57 +1010,57 @@ function At({ workspace: e, identifier: t }) {
|
|
|
1010
1010
|
]
|
|
1011
1011
|
});
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1014
|
-
let r =
|
|
1013
|
+
function Mt({ workspace: e, identifier: t, others: n }) {
|
|
1014
|
+
let r = W("issue.comments"), { data: i } = Z(s(e, t)), { data: a = [] } = Y(d(e, t)), o = vt(() => {
|
|
1015
1015
|
let e = i.filter((e) => !e.parentId);
|
|
1016
|
-
return e.sort((e, t) => Number(
|
|
1016
|
+
return e.sort((e, t) => Number($(t)) - Number($(e))), e.map((e) => ({
|
|
1017
1017
|
root: e,
|
|
1018
1018
|
replies: i.filter((t) => t.parentId === e.id)
|
|
1019
1019
|
}));
|
|
1020
|
-
}, [i]), [c, l] =
|
|
1021
|
-
return /* @__PURE__ */
|
|
1020
|
+
}, [i]), [c, l] = U(null), u = i.filter((e) => !e.deletedAt && !$(e)).length;
|
|
1021
|
+
return /* @__PURE__ */ q("section", {
|
|
1022
1022
|
className: "mt-12 border-t border-border pt-6",
|
|
1023
1023
|
"aria-label": r("title"),
|
|
1024
1024
|
children: [
|
|
1025
|
-
/* @__PURE__ */
|
|
1025
|
+
/* @__PURE__ */ q("h2", {
|
|
1026
1026
|
className: "text-base font-semibold",
|
|
1027
1027
|
children: [
|
|
1028
1028
|
r("title"),
|
|
1029
1029
|
" ",
|
|
1030
|
-
u > 0 && /* @__PURE__ */
|
|
1030
|
+
u > 0 && /* @__PURE__ */ K("span", {
|
|
1031
1031
|
className: "font-normal text-muted-foreground",
|
|
1032
1032
|
children: u
|
|
1033
1033
|
})
|
|
1034
1034
|
]
|
|
1035
1035
|
}),
|
|
1036
|
-
/* @__PURE__ */
|
|
1036
|
+
/* @__PURE__ */ K("div", {
|
|
1037
1037
|
className: "mt-4 space-y-3",
|
|
1038
1038
|
children: o.map(({ root: n, replies: i }) => {
|
|
1039
|
-
let o =
|
|
1040
|
-
return /* @__PURE__ */
|
|
1039
|
+
let o = $(n) ? n.sharedWith : void 0, s = o ? se(o).source : void 0;
|
|
1040
|
+
return /* @__PURE__ */ q(nt, {
|
|
1041
1041
|
size: "fill",
|
|
1042
1042
|
padding: "none",
|
|
1043
1043
|
highlight: !!o,
|
|
1044
|
-
render: /* @__PURE__ */
|
|
1044
|
+
render: /* @__PURE__ */ K("article", {
|
|
1045
1045
|
id: `comment-${n.id}`,
|
|
1046
1046
|
"aria-label": s && r("sharedThreadLabel", { source: s })
|
|
1047
1047
|
}),
|
|
1048
1048
|
children: [
|
|
1049
|
-
o && s ? /* @__PURE__ */
|
|
1049
|
+
o && s ? /* @__PURE__ */ K(Ge, {
|
|
1050
1050
|
source: s,
|
|
1051
1051
|
link: a.find((e) => e.connector === o)
|
|
1052
|
-
}) : /* @__PURE__ */
|
|
1052
|
+
}) : /* @__PURE__ */ K(Pt, {
|
|
1053
1053
|
workspace: e,
|
|
1054
1054
|
identifier: t,
|
|
1055
1055
|
comment: n,
|
|
1056
1056
|
onReply: () => l(n.id)
|
|
1057
1057
|
}),
|
|
1058
|
-
i.length > 0 && /* @__PURE__ */
|
|
1058
|
+
i.length > 0 && /* @__PURE__ */ K("ol", {
|
|
1059
1059
|
className: o ? "" : "border-t border-border/70",
|
|
1060
|
-
children: i.map((r) => /* @__PURE__ */
|
|
1060
|
+
children: i.map((r) => /* @__PURE__ */ K("li", {
|
|
1061
1061
|
id: `comment-${r.id}`,
|
|
1062
1062
|
className: "border-b border-border/50 last:border-b-0",
|
|
1063
|
-
children: /* @__PURE__ */
|
|
1063
|
+
children: /* @__PURE__ */ K(Pt, {
|
|
1064
1064
|
workspace: e,
|
|
1065
1065
|
identifier: t,
|
|
1066
1066
|
comment: r,
|
|
@@ -1068,16 +1068,16 @@ function jt({ workspace: e, identifier: t, others: n }) {
|
|
|
1068
1068
|
})
|
|
1069
1069
|
}, r.id))
|
|
1070
1070
|
}),
|
|
1071
|
-
/* @__PURE__ */
|
|
1071
|
+
/* @__PURE__ */ K("div", {
|
|
1072
1072
|
className: "border-t border-border/70 px-3 py-2",
|
|
1073
|
-
children: c === n.id ? /* @__PURE__ */
|
|
1073
|
+
children: c === n.id ? /* @__PURE__ */ K(It, {
|
|
1074
1074
|
workspace: e,
|
|
1075
1075
|
identifier: t,
|
|
1076
1076
|
parentId: n.id,
|
|
1077
1077
|
publicOn: s,
|
|
1078
1078
|
autofocus: !0,
|
|
1079
1079
|
onDone: () => l(null)
|
|
1080
|
-
}) : /* @__PURE__ */
|
|
1080
|
+
}) : /* @__PURE__ */ K("button", {
|
|
1081
1081
|
type: "button",
|
|
1082
1082
|
onClick: () => l(n.id),
|
|
1083
1083
|
className: "w-full text-left text-xs text-muted-foreground hover:text-foreground",
|
|
@@ -1088,19 +1088,19 @@ function jt({ workspace: e, identifier: t, others: n }) {
|
|
|
1088
1088
|
}, n.id);
|
|
1089
1089
|
})
|
|
1090
1090
|
}),
|
|
1091
|
-
/* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ K(nt, {
|
|
1092
1092
|
size: "fill",
|
|
1093
1093
|
padding: "sm",
|
|
1094
1094
|
focusWithin: !0,
|
|
1095
1095
|
className: "mt-4",
|
|
1096
|
-
children: /* @__PURE__ */
|
|
1096
|
+
children: /* @__PURE__ */ K(It, {
|
|
1097
1097
|
workspace: e,
|
|
1098
1098
|
identifier: t
|
|
1099
1099
|
})
|
|
1100
1100
|
}),
|
|
1101
|
-
/* @__PURE__ */
|
|
1101
|
+
/* @__PURE__ */ K("div", {
|
|
1102
1102
|
className: "mt-2",
|
|
1103
|
-
children: /* @__PURE__ */
|
|
1103
|
+
children: /* @__PURE__ */ K(ze, {
|
|
1104
1104
|
workspace: e,
|
|
1105
1105
|
others: n,
|
|
1106
1106
|
field: "comment"
|
|
@@ -1109,20 +1109,20 @@ function jt({ workspace: e, identifier: t, others: n }) {
|
|
|
1109
1109
|
]
|
|
1110
1110
|
});
|
|
1111
1111
|
}
|
|
1112
|
-
var
|
|
1112
|
+
var $ = (e) => !!e.sharedWith && !e.parentId;
|
|
1113
1113
|
function Nt({ comment: e }) {
|
|
1114
|
-
let t =
|
|
1115
|
-
return e.author.kind === "connector" ? /* @__PURE__ */
|
|
1114
|
+
let t = W("issue.comments");
|
|
1115
|
+
return e.author.kind === "connector" ? /* @__PURE__ */ K("span", {
|
|
1116
1116
|
className: "rounded border border-border px-1.5 py-px text-[10px] text-muted-foreground",
|
|
1117
|
-
children: t("via", { source:
|
|
1117
|
+
children: t("via", { source: se(e.author.handle).source })
|
|
1118
1118
|
}) : null;
|
|
1119
1119
|
}
|
|
1120
1120
|
function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
1121
|
-
let o =
|
|
1121
|
+
let o = W("issue.comments"), s = W("common"), { actorName: c, avatarOf: l } = ce(n), { data: u } = Z(m), { data: d = [] } = Y(g(n, r)), f = ye(n, "comment", { team: r.slice(0, r.lastIndexOf("-")) }), p = X(), h = V(), [_, v] = U(!1), [y, b] = U(i.body), [x, S] = U(!1), C = H(null), w = De(n, r), T = i.author.kind === "user" && i.author.handle === u?.user.username, E = { path: {
|
|
1122
1122
|
workspace: n,
|
|
1123
1123
|
identifier: r,
|
|
1124
1124
|
commentId: i.id
|
|
1125
|
-
} }, D = () =>
|
|
1125
|
+
} }, D = () => F(p, n, r), O = J({
|
|
1126
1126
|
mutationFn: async () => t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}/comments/{commentId}", {
|
|
1127
1127
|
params: E,
|
|
1128
1128
|
body: { body: y }
|
|
@@ -1130,15 +1130,15 @@ function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
|
1130
1130
|
onSuccess: () => {
|
|
1131
1131
|
v(!1), D();
|
|
1132
1132
|
}
|
|
1133
|
-
}), k =
|
|
1133
|
+
}), k = J({
|
|
1134
1134
|
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}/comments/{commentId}", { params: E })),
|
|
1135
1135
|
onSuccess: D
|
|
1136
1136
|
});
|
|
1137
|
-
if (i.deletedAt) return /* @__PURE__ */
|
|
1137
|
+
if (i.deletedAt) return /* @__PURE__ */ K("p", {
|
|
1138
1138
|
className: "px-3 py-2.5 text-xs text-muted-foreground italic",
|
|
1139
1139
|
children: o("deleted")
|
|
1140
1140
|
});
|
|
1141
|
-
let A = `${
|
|
1141
|
+
let A = `${me(n, r)}#comment-${i.id}`, j = [
|
|
1142
1142
|
{
|
|
1143
1143
|
label: o("reply"),
|
|
1144
1144
|
onClick: a
|
|
@@ -1146,7 +1146,7 @@ function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
|
1146
1146
|
M(s("copyLink"), A),
|
|
1147
1147
|
M(o("copyText"), i.body),
|
|
1148
1148
|
...T ? [
|
|
1149
|
-
|
|
1149
|
+
ft,
|
|
1150
1150
|
{
|
|
1151
1151
|
label: o("edit"),
|
|
1152
1152
|
onClick: () => {
|
|
@@ -1160,51 +1160,51 @@ function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
] : []
|
|
1162
1162
|
];
|
|
1163
|
-
return /* @__PURE__ */
|
|
1163
|
+
return /* @__PURE__ */ q("div", {
|
|
1164
1164
|
className: "group px-3 py-2.5",
|
|
1165
1165
|
onContextMenu: (e) => !_ && h(e, j),
|
|
1166
|
-
children: [/* @__PURE__ */
|
|
1166
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1167
1167
|
className: "flex items-center gap-2 text-xs",
|
|
1168
1168
|
children: [
|
|
1169
|
-
/* @__PURE__ */
|
|
1169
|
+
/* @__PURE__ */ q(Ce, {
|
|
1170
1170
|
workspace: n,
|
|
1171
1171
|
kind: i.author.kind,
|
|
1172
1172
|
handle: i.author.handle,
|
|
1173
1173
|
className: "flex items-center gap-2",
|
|
1174
|
-
children: [/* @__PURE__ */
|
|
1175
|
-
...
|
|
1174
|
+
children: [/* @__PURE__ */ K(et, {
|
|
1175
|
+
...Oe(i.author.kind),
|
|
1176
1176
|
name: c(i.author),
|
|
1177
1177
|
src: l(i.author.kind, i.author.handle),
|
|
1178
1178
|
size: "xs",
|
|
1179
1179
|
decorative: !0
|
|
1180
|
-
}), /* @__PURE__ */
|
|
1180
|
+
}), /* @__PURE__ */ K("span", {
|
|
1181
1181
|
className: "font-medium",
|
|
1182
1182
|
children: c(i.author)
|
|
1183
1183
|
})]
|
|
1184
1184
|
}),
|
|
1185
|
-
/* @__PURE__ */
|
|
1186
|
-
/* @__PURE__ */
|
|
1185
|
+
/* @__PURE__ */ K(Nt, { comment: i }),
|
|
1186
|
+
/* @__PURE__ */ q("span", {
|
|
1187
1187
|
className: "text-muted-foreground",
|
|
1188
|
-
children: [/* @__PURE__ */
|
|
1188
|
+
children: [/* @__PURE__ */ K(ct, {
|
|
1189
1189
|
value: i.createdAt,
|
|
1190
1190
|
exact: "medium"
|
|
1191
|
-
}), i.updatedAt !== i.createdAt && /* @__PURE__ */
|
|
1191
|
+
}), i.updatedAt !== i.createdAt && /* @__PURE__ */ q(G, { children: [" ", o("edited")] })]
|
|
1192
1192
|
}),
|
|
1193
|
-
!x && !_ && /* @__PURE__ */
|
|
1193
|
+
!x && !_ && /* @__PURE__ */ K(xt, {
|
|
1194
1194
|
items: j,
|
|
1195
1195
|
className: "ml-auto"
|
|
1196
1196
|
}),
|
|
1197
|
-
x && /* @__PURE__ */
|
|
1197
|
+
x && /* @__PURE__ */ q("span", {
|
|
1198
1198
|
className: "ml-auto flex gap-2 text-muted-foreground",
|
|
1199
1199
|
children: [
|
|
1200
|
-
/* @__PURE__ */
|
|
1201
|
-
/* @__PURE__ */
|
|
1200
|
+
/* @__PURE__ */ K("span", { children: o("confirmDelete") }),
|
|
1201
|
+
/* @__PURE__ */ K("button", {
|
|
1202
1202
|
type: "button",
|
|
1203
1203
|
className: "text-danger hover:underline",
|
|
1204
1204
|
onClick: () => k.mutate(),
|
|
1205
1205
|
children: s("delete")
|
|
1206
1206
|
}),
|
|
1207
|
-
/* @__PURE__ */
|
|
1207
|
+
/* @__PURE__ */ K("button", {
|
|
1208
1208
|
type: "button",
|
|
1209
1209
|
className: "hover:underline",
|
|
1210
1210
|
onClick: () => S(!1),
|
|
@@ -1213,10 +1213,10 @@ function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
|
1213
1213
|
]
|
|
1214
1214
|
})
|
|
1215
1215
|
]
|
|
1216
|
-
}), /* @__PURE__ */
|
|
1216
|
+
}), /* @__PURE__ */ K("div", {
|
|
1217
1217
|
className: "mt-1",
|
|
1218
|
-
children: _ ? /* @__PURE__ */
|
|
1219
|
-
/* @__PURE__ */
|
|
1218
|
+
children: _ ? /* @__PURE__ */ q(G, { children: [
|
|
1219
|
+
/* @__PURE__ */ K(L, {
|
|
1220
1220
|
value: y,
|
|
1221
1221
|
onChange: b,
|
|
1222
1222
|
onSubmit: () => O.mutate(),
|
|
@@ -1227,19 +1227,19 @@ function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
|
1227
1227
|
},
|
|
1228
1228
|
onFiles: (e, t) => w.upload(C.current, e, t)
|
|
1229
1229
|
}),
|
|
1230
|
-
/* @__PURE__ */
|
|
1230
|
+
/* @__PURE__ */ K(Ee, {
|
|
1231
1231
|
pending: w.pending,
|
|
1232
1232
|
error: w.error
|
|
1233
1233
|
}),
|
|
1234
|
-
/* @__PURE__ */
|
|
1234
|
+
/* @__PURE__ */ q("div", {
|
|
1235
1235
|
className: "mt-2 flex justify-end gap-2",
|
|
1236
|
-
children: [/* @__PURE__ */
|
|
1236
|
+
children: [/* @__PURE__ */ K(R, {
|
|
1237
1237
|
type: "button",
|
|
1238
1238
|
variant: "ghost",
|
|
1239
1239
|
size: "sm",
|
|
1240
1240
|
onClick: () => v(!1),
|
|
1241
1241
|
children: s("cancel")
|
|
1242
|
-
}), /* @__PURE__ */
|
|
1242
|
+
}), /* @__PURE__ */ K(R, {
|
|
1243
1243
|
type: "button",
|
|
1244
1244
|
variant: "primary",
|
|
1245
1245
|
size: "sm",
|
|
@@ -1248,21 +1248,21 @@ function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
|
1248
1248
|
children: s("save")
|
|
1249
1249
|
})]
|
|
1250
1250
|
})
|
|
1251
|
-
] }) : /* @__PURE__ */
|
|
1252
|
-
/* @__PURE__ */
|
|
1251
|
+
] }) : /* @__PURE__ */ q(G, { children: [
|
|
1252
|
+
/* @__PURE__ */ K(L, {
|
|
1253
1253
|
value: i.body,
|
|
1254
1254
|
editable: !1
|
|
1255
1255
|
}),
|
|
1256
|
-
/* @__PURE__ */
|
|
1256
|
+
/* @__PURE__ */ K($e, {
|
|
1257
1257
|
workspace: n,
|
|
1258
1258
|
widgets: i.widgets
|
|
1259
1259
|
}),
|
|
1260
|
-
/* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ K(Ft, {
|
|
1261
1261
|
workspace: n,
|
|
1262
1262
|
identifier: r,
|
|
1263
1263
|
comment: i
|
|
1264
1264
|
}),
|
|
1265
|
-
/* @__PURE__ */
|
|
1265
|
+
/* @__PURE__ */ K(Xe, {
|
|
1266
1266
|
workspace: n,
|
|
1267
1267
|
identifier: r,
|
|
1268
1268
|
commentId: i.id,
|
|
@@ -1275,10 +1275,10 @@ function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
|
1275
1275
|
});
|
|
1276
1276
|
}
|
|
1277
1277
|
function Ft({ workspace: e, identifier: t, comment: n }) {
|
|
1278
|
-
let { data: r = [] } =
|
|
1279
|
-
return a.length === 0 ? null : /* @__PURE__ */
|
|
1278
|
+
let { data: r = [] } = Y(o(e, t)), { actorName: i } = ce(e), a = r.filter((e) => e.page && e.commentId === n.id);
|
|
1279
|
+
return a.length === 0 ? null : /* @__PURE__ */ K("div", {
|
|
1280
1280
|
className: "mt-2 space-y-2",
|
|
1281
|
-
children: a.map((e) => /* @__PURE__ */
|
|
1281
|
+
children: a.map((e) => /* @__PURE__ */ K(Ne, {
|
|
1282
1282
|
attachmentId: e.id,
|
|
1283
1283
|
name: e.name,
|
|
1284
1284
|
agent: i(n.author)
|
|
@@ -1286,7 +1286,7 @@ function Ft({ workspace: e, identifier: t, comment: n }) {
|
|
|
1286
1286
|
});
|
|
1287
1287
|
}
|
|
1288
1288
|
function It({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus: o = !1, onDone: s }) {
|
|
1289
|
-
let c =
|
|
1289
|
+
let c = W("issue.comments"), l = yt(), u = W("common"), d = gt(Lt), f = X(), [p, m] = U(""), [h, g] = U(0), _ = H(null), v = De(n, r), y = J({
|
|
1290
1290
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/comments", {
|
|
1291
1291
|
params: { path: {
|
|
1292
1292
|
workspace: n,
|
|
@@ -1298,10 +1298,10 @@ function It({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus:
|
|
|
1298
1298
|
}
|
|
1299
1299
|
})),
|
|
1300
1300
|
onSuccess: () => {
|
|
1301
|
-
m(""), g((e) => e + 1),
|
|
1301
|
+
m(""), g((e) => e + 1), F(f, n, r), s?.();
|
|
1302
1302
|
}
|
|
1303
1303
|
}), b = () => p.trim() && !y.isPending && v.pending === 0 && y.mutate();
|
|
1304
|
-
return /* @__PURE__ */
|
|
1304
|
+
return /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K(L, {
|
|
1305
1305
|
value: "",
|
|
1306
1306
|
onChange: m,
|
|
1307
1307
|
onSubmit: b,
|
|
@@ -1315,29 +1315,29 @@ function It({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus:
|
|
|
1315
1315
|
placeholder: a ? c("replyPublic", { source: a }) : c(i ? "replyPlaceholder" : "placeholder"),
|
|
1316
1316
|
label: a ? c("replyPublicButton", { source: a }) : c(i ? "reply" : "newComment"),
|
|
1317
1317
|
className: i ? "min-h-8" : "min-h-12"
|
|
1318
|
-
}, h), /* @__PURE__ */
|
|
1318
|
+
}, h), /* @__PURE__ */ q("div", {
|
|
1319
1319
|
className: "mt-1 flex items-center justify-end gap-3",
|
|
1320
1320
|
children: [
|
|
1321
|
-
/* @__PURE__ */
|
|
1321
|
+
/* @__PURE__ */ q("span", {
|
|
1322
1322
|
className: "mr-auto flex min-w-0 items-center gap-2",
|
|
1323
|
-
children: [/* @__PURE__ */
|
|
1323
|
+
children: [/* @__PURE__ */ K(we, { onFiles: (e) => v.upload(_.current, e) }), /* @__PURE__ */ K(Ee, {
|
|
1324
1324
|
pending: v.pending,
|
|
1325
1325
|
error: v.error
|
|
1326
1326
|
})]
|
|
1327
1327
|
}),
|
|
1328
|
-
y.isError && /* @__PURE__ */
|
|
1328
|
+
y.isError && /* @__PURE__ */ K(at, {
|
|
1329
1329
|
inline: !0,
|
|
1330
1330
|
className: "text-xs",
|
|
1331
1331
|
children: l(y.error)
|
|
1332
1332
|
}),
|
|
1333
|
-
s && /* @__PURE__ */
|
|
1333
|
+
s && /* @__PURE__ */ K(R, {
|
|
1334
1334
|
type: "button",
|
|
1335
1335
|
variant: "ghost",
|
|
1336
1336
|
size: "sm",
|
|
1337
1337
|
onClick: s,
|
|
1338
1338
|
children: u("cancel")
|
|
1339
1339
|
}),
|
|
1340
|
-
/* @__PURE__ */
|
|
1340
|
+
/* @__PURE__ */ K(R, {
|
|
1341
1341
|
type: "button",
|
|
1342
1342
|
variant: "primary",
|
|
1343
1343
|
size: "sm",
|
|
@@ -1349,5 +1349,5 @@ function It({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus:
|
|
|
1349
1349
|
]
|
|
1350
1350
|
})] });
|
|
1351
1351
|
}
|
|
1352
|
-
var Lt =
|
|
1353
|
-
export {
|
|
1352
|
+
var Lt = mt(() => {});
|
|
1353
|
+
export { St as component };
|