@parallelworks/tandem-web 0.171.2 → 0.171.3
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/_virtual/_virtual_i18n/en/common.js +5 -2
- package/_virtual/_virtual_i18n/es/common.js +5 -2
- package/_virtual/_virtual_i18n/ja/common.js +5 -2
- package/_virtual/_virtual_i18n/ko/common.js +5 -2
- package/_virtual/_virtual_i18n/zh/common.js +5 -2
- package/components/ActivityTimeline.js +56 -56
- package/components/ActorLink.js +34 -0
- package/components/Attachments.js +67 -63
- package/components/CodeHostSettings.js +94 -60
- package/components/DashboardPanel.js +189 -152
- package/components/IssueEvent.js +91 -86
- package/components/IssueSentry.js +34 -32
- package/components/Widgets.js +96 -94
- package/lib/triageSeen.js +2 -2
- package/package.json +1 -1
- package/pages/triage.js +153 -163
- package/routes/_workspace/issues/_identifier2.js +273 -276
- package/routes/_workspace/knowledge/_term2.js +94 -92
- package/routes/_workspace/knowledge/index2.js +101 -99
|
@@ -2,72 +2,73 @@ import { api as e, unwrap as t } from "../../../api/client.js";
|
|
|
2
2
|
import { invalidateIssueViews as n, useUpdateIssue as r } from "../../../api/mutations.js";
|
|
3
3
|
import { areasQuery as i, attachmentsQuery as a, commentsQuery as o, cyclesQuery as s, eventsQuery as c, issueDocsQuery as l, issueLinksQuery as u, issueQuery as d, labelsQuery as f, meQuery as p, projectsQuery as m, reactionsQuery as h, statusesQuery as g, teamsQuery as _ } from "../../../api/queries.js";
|
|
4
4
|
import { Timeline as v } from "../../../components/ActivityTimeline.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
5
|
+
import { ActorLink as y } from "../../../components/ActorLink.js";
|
|
6
|
+
import { AgentPage as b } from "../../../components/AgentPage.js";
|
|
7
|
+
import { AgentWork as x } from "../../../components/AgentWork.js";
|
|
8
|
+
import { AreaLink as S } from "../../../components/AreaLink.js";
|
|
9
|
+
import { AttachButton as C, IssueAttachments as w, UploadStatus as T, useAttachmentUpload as E } from "../../../components/Attachments.js";
|
|
10
|
+
import { CollabEditor as D } from "../../../components/CollabEditor.js";
|
|
11
|
+
import { CustomerRequests as O } from "../../../components/CustomerRequests.js";
|
|
12
|
+
import { IssueFields as k } from "../../../components/CustomFields.js";
|
|
13
|
+
import { Editor as A } from "../../../components/Editor.js";
|
|
14
|
+
import { FavoriteStar as j } from "../../../components/FavoriteStar.js";
|
|
15
|
+
import { IssueDesigns as ee } from "../../../components/Figma.js";
|
|
16
|
+
import { IssueLinkChips as M, IssueLinks as te, SharedThreadHeader as N } from "../../../components/GitHub.js";
|
|
17
|
+
import { IssueCode as ne } from "../../../components/IssueCode.js";
|
|
18
|
+
import { EventLine as P } from "../../../components/IssueEvent.js";
|
|
18
19
|
import { IssueIntercom as re } from "../../../components/IssueIntercom.js";
|
|
19
|
-
import { ParentProperty as
|
|
20
|
+
import { ParentProperty as F, SubIssuesAndRelations as ie } from "../../../components/IssueRelations.js";
|
|
20
21
|
import { IssueSentry as ae } from "../../../components/IssueSentry.js";
|
|
21
|
-
import { TypeIcon as
|
|
22
|
+
import { TypeIcon as I } from "../../../components/IssueTypes.js";
|
|
22
23
|
import { IssueZendesk as oe } from "../../../components/IssueZendesk.js";
|
|
23
|
-
import { AreaIcon as
|
|
24
|
-
import { PersonHoverCard as
|
|
25
|
-
import { DueDate as
|
|
26
|
-
import { FieldNote as
|
|
27
|
-
import { Reactions as
|
|
28
|
-
import { TimeInStatus as
|
|
29
|
-
import { SubscribeButton as
|
|
30
|
-
import { Widgets as
|
|
31
|
-
import { assigneeKey as
|
|
32
|
-
import { actorAvatar as
|
|
33
|
-
import { branchName as
|
|
34
|
-
import { caretColor as
|
|
35
|
-
import { useConfirm as
|
|
36
|
-
import { customFieldsQuery as
|
|
37
|
-
import { docRef as
|
|
38
|
-
import { issueURL as
|
|
39
|
-
import { issueTypesQuery as
|
|
40
|
-
import { useLinkedIssues as
|
|
41
|
-
import { useOthersOn as
|
|
42
|
-
import { copyItem as
|
|
43
|
-
import { useReadIssueNotifications as
|
|
44
|
-
import { usePageTitle as
|
|
45
|
-
import { connectorActor as
|
|
46
|
-
import { PickManyBox as
|
|
47
|
-
import { rememberPage as
|
|
48
|
-
import { issueScope as
|
|
49
|
-
import { Link as R, useNavigate as
|
|
50
|
-
import { useShortcuts as
|
|
51
|
-
import { useTime as
|
|
52
|
-
import { Route as
|
|
53
|
-
import { Avatar as
|
|
54
|
-
import { createContext as
|
|
55
|
-
import { useErrorMessage as
|
|
56
|
-
import { useFormatter as
|
|
24
|
+
import { AreaIcon as L, BranchIcon as se, CalendarIcon as ce, CloseIcon as le, CycleIcon as ue, EstimateIcon as de, FileTextIcon as fe, InboxIcon as pe, PriorityIcon as me, ProjectIcon as he, StatusIcon as ge, TriageIcon as _e, usePriorityNames as ve } from "../../../components/icons.js";
|
|
25
|
+
import { PersonHoverCard as ye } from "../../../components/PersonHoverCard.js";
|
|
26
|
+
import { DueDate as be, ProjectStatusIcon as xe, SlaBadge as Se, scalePoints as Ce, useEstimateLabel as we } from "../../../components/Planning.js";
|
|
27
|
+
import { FieldNote as Te, Viewers as Ee } from "../../../components/Presence.js";
|
|
28
|
+
import { Reactions as De } from "../../../components/Reactions.js";
|
|
29
|
+
import { TimeInStatus as Oe } from "../../../components/Reports.js";
|
|
30
|
+
import { SubscribeButton as ke } from "../../../components/SubscribeButton.js";
|
|
31
|
+
import { Widgets as Ae } from "../../../components/Widgets.js";
|
|
32
|
+
import { assigneeKey as je, parseAssigneeKey as Me, useAssigneeOptions as Ne } from "../../../lib/assignees.js";
|
|
33
|
+
import { actorAvatar as Pe } from "../../../lib/avatar.js";
|
|
34
|
+
import { branchName as Fe } from "../../../lib/branch.js";
|
|
35
|
+
import { caretColor as Ie, useCollabSession as Le } from "../../../lib/collab.js";
|
|
36
|
+
import { useConfirm as Re } from "../../../lib/confirm.js";
|
|
37
|
+
import { customFieldsQuery as ze, hasValue as Be } from "../../../lib/customFields.js";
|
|
38
|
+
import { docRef as Ve, useDocMenu as He } from "../../../lib/docs.js";
|
|
39
|
+
import { issueURL as Ue, useIssueMenu as We } from "../../../lib/issueMenu.js";
|
|
40
|
+
import { issueTypesQuery as Ge, typeShows as Ke, typesFor as qe } from "../../../lib/issueTypes.js";
|
|
41
|
+
import { useLinkedIssues as Je } from "../../../lib/linkedIssues.js";
|
|
42
|
+
import { useOthersOn as Ye, useReportLocation as Xe } from "../../../lib/live.js";
|
|
43
|
+
import { copyItem as Ze } from "../../../lib/menus.js";
|
|
44
|
+
import { useReadIssueNotifications as Qe } from "../../../lib/notifications.js";
|
|
45
|
+
import { usePageTitle as $e } from "../../../lib/pageTitle.js";
|
|
46
|
+
import { connectorActor as et, usePeople as tt } from "../../../lib/people.js";
|
|
47
|
+
import { PickManyBox as nt, usePickMany as rt } from "../../../lib/pickMany.js";
|
|
48
|
+
import { rememberPage as it } from "../../../lib/recent.js";
|
|
49
|
+
import { issueScope as at, useCan as ot, useCanTriage as st } from "../../../lib/roles.js";
|
|
50
|
+
import { Link as R, useNavigate as ct } from "../../../lib/router.js";
|
|
51
|
+
import { useShortcuts as lt } from "../../../lib/shortcuts.js";
|
|
52
|
+
import { useTime as ut } from "../../../lib/time.js";
|
|
53
|
+
import { Route as dt } from "./_identifier.js";
|
|
54
|
+
import { Avatar as ft, Button as z, Callout as pt, Card as mt, Combobox as B, CopyButton as ht, DatePicker as gt, ErrorText as _t, IconButton as vt, Kbd as yt, RelativeTime as bt, Select as V, TitleInput as xt, Tooltip as St, buttonClasses as Ct, menuDivider as wt, toast as Tt, useOpenMenu as H } from "@parallelworks/ui";
|
|
55
|
+
import { createContext as Et, useCallback as Dt, useContext as Ot, useEffect as kt, useMemo as At, useRef as U, useState as W } from "react";
|
|
56
|
+
import { useErrorMessage as jt } from "@parallelworks/problem/react";
|
|
57
|
+
import { useFormatter as Mt, useTranslations as G } from "use-intl";
|
|
57
58
|
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
58
59
|
import { useMutation as Y, useQuery as X, useQueryClient as Z, useSuspenseQuery as Q } from "@tanstack/react-query";
|
|
59
|
-
import { MoreButton as
|
|
60
|
-
import { ArchiveIcon as
|
|
60
|
+
import { MoreButton as Nt } from "@parallelworks/ui/list";
|
|
61
|
+
import { ArchiveIcon as Pt } from "@parallelworks/ui/icons";
|
|
61
62
|
// src/routes/$workspace/issues/$identifier.tsx?tsr-split=component
|
|
62
|
-
function
|
|
63
|
-
let i = G("issue"), a =
|
|
64
|
-
|
|
63
|
+
function Ft() {
|
|
64
|
+
let i = G("issue"), a = ut(), o = jt(), s = G("common"), { workspace: c, identifier: l } = dt.useParams(), { data: f } = Q(d(c, l)), { data: m } = Q(_(c)), { data: h } = Q(p), { data: g = [] } = X(u(c, l)), [v, y] = W();
|
|
65
|
+
Xe({
|
|
65
66
|
identifier: f.identifier,
|
|
66
67
|
...v && { field: v }
|
|
67
|
-
}),
|
|
68
|
-
let
|
|
69
|
-
|
|
70
|
-
window.location.pathname.endsWith(`/issues/${S}`) ||
|
|
68
|
+
}), $e(`${f.identifier} ${f.title}`), Qe(c, f.identifier);
|
|
69
|
+
let b = ct(), S = Fe(f.identifier, f.title);
|
|
70
|
+
kt(() => {
|
|
71
|
+
window.location.pathname.endsWith(`/issues/${S}`) || b({
|
|
71
72
|
to: "/$workspace/issues/$identifier",
|
|
72
73
|
params: {
|
|
73
74
|
workspace: c,
|
|
@@ -79,11 +80,11 @@ function Pt() {
|
|
|
79
80
|
});
|
|
80
81
|
}, [
|
|
81
82
|
S,
|
|
82
|
-
|
|
83
|
+
b,
|
|
83
84
|
c,
|
|
84
85
|
f.identifier
|
|
85
86
|
]);
|
|
86
|
-
let
|
|
87
|
+
let C = ot(c, "delete_issues", at(f)), T = Z(), { confirm: E, dialog: D } = Re(), k = Y({
|
|
87
88
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/restore", { params: { path: {
|
|
88
89
|
workspace: c,
|
|
89
90
|
identifier: f.identifier
|
|
@@ -91,15 +92,15 @@ function Pt() {
|
|
|
91
92
|
onSuccess: (e) => {
|
|
92
93
|
T.setQueryData(d(c, f.identifier).queryKey, e), n(T, c, f.identifier);
|
|
93
94
|
}
|
|
94
|
-
}),
|
|
95
|
+
}), A = Y({
|
|
95
96
|
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}", { params: { path: {
|
|
96
97
|
workspace: c,
|
|
97
98
|
identifier: f.identifier
|
|
98
99
|
} } })),
|
|
99
100
|
onSuccess: () => {
|
|
100
|
-
|
|
101
|
+
Tt.success(i("deleted", { identifier: f.identifier })), n(T, c);
|
|
101
102
|
let e = m.find((e) => e.id === f.teamId)?.key;
|
|
102
|
-
|
|
103
|
+
b(e ? {
|
|
103
104
|
to: "/$workspace/teams/$key/issues",
|
|
104
105
|
params: {
|
|
105
106
|
workspace: c,
|
|
@@ -110,15 +111,15 @@ function Pt() {
|
|
|
110
111
|
params: { workspace: c }
|
|
111
112
|
});
|
|
112
113
|
}
|
|
113
|
-
}),
|
|
114
|
+
}), te = Dt((e) => b({
|
|
114
115
|
to: "/$workspace/issues/$identifier",
|
|
115
116
|
params: {
|
|
116
117
|
workspace: c,
|
|
117
118
|
identifier: e
|
|
118
119
|
}
|
|
119
|
-
}), [
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
}), [b, c]);
|
|
121
|
+
Je(c, f.body, te), kt(() => {
|
|
122
|
+
it(c, {
|
|
122
123
|
kind: "issue",
|
|
123
124
|
href: `/${c}/issues/${f.identifier}`,
|
|
124
125
|
label: `${f.identifier} ${f.title}`
|
|
@@ -128,22 +129,22 @@ function Pt() {
|
|
|
128
129
|
f.identifier,
|
|
129
130
|
f.title
|
|
130
131
|
]);
|
|
131
|
-
let N =
|
|
132
|
-
return
|
|
133
|
-
s: () =>
|
|
134
|
-
p: () =>
|
|
135
|
-
a: () =>
|
|
136
|
-
l: () =>
|
|
137
|
-
Escape: () =>
|
|
132
|
+
let N = Ye({ issue: f.identifier }, h?.user.username), P = m.find((e) => e.id === f.teamId), F = r(c, l), [I, L] = W(null), ce = H(), le = We(c);
|
|
133
|
+
return lt({
|
|
134
|
+
s: () => L("status"),
|
|
135
|
+
p: () => L("priority"),
|
|
136
|
+
a: () => L("assignees"),
|
|
137
|
+
l: () => L("labels"),
|
|
138
|
+
Escape: () => b({
|
|
138
139
|
to: "/$workspace/issues",
|
|
139
140
|
params: { workspace: c }
|
|
140
141
|
})
|
|
141
|
-
},
|
|
142
|
+
}, I === null), /* @__PURE__ */ J("div", {
|
|
142
143
|
className: "flex h-full flex-col",
|
|
143
144
|
children: [
|
|
144
145
|
/* @__PURE__ */ J("header", {
|
|
145
146
|
className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-4 text-sm md:px-5",
|
|
146
|
-
onContextMenu: (e) =>
|
|
147
|
+
onContextMenu: (e) => ce(e, le([f])),
|
|
147
148
|
children: [
|
|
148
149
|
/* @__PURE__ */ q(R, {
|
|
149
150
|
to: P ? "/$workspace/teams/$key/issues" : "/$workspace/issues",
|
|
@@ -163,26 +164,26 @@ function Pt() {
|
|
|
163
164
|
className: "shrink-0 font-medium whitespace-nowrap",
|
|
164
165
|
children: f.identifier
|
|
165
166
|
}),
|
|
166
|
-
/* @__PURE__ */ q(
|
|
167
|
+
/* @__PURE__ */ q(j, {
|
|
167
168
|
workspace: c,
|
|
168
169
|
kind: "issue",
|
|
169
170
|
target: f.id
|
|
170
171
|
}),
|
|
171
|
-
/* @__PURE__ */ q(
|
|
172
|
+
/* @__PURE__ */ q(ke, {
|
|
172
173
|
workspace: c,
|
|
173
174
|
identifier: f.identifier
|
|
174
175
|
}),
|
|
175
|
-
/* @__PURE__ */ q(
|
|
176
|
-
text:
|
|
176
|
+
/* @__PURE__ */ q(ht, {
|
|
177
|
+
text: Fe(f.identifier, f.title),
|
|
177
178
|
label: i("copyBranchName"),
|
|
178
|
-
icon: /* @__PURE__ */ q(
|
|
179
|
+
icon: /* @__PURE__ */ q(se, {}),
|
|
179
180
|
size: "sm",
|
|
180
181
|
variant: "ghost",
|
|
181
|
-
success: i("copiedBranchName", { name:
|
|
182
|
+
success: i("copiedBranchName", { name: Fe(f.identifier, f.title) }),
|
|
182
183
|
failure: i("copyFailed"),
|
|
183
184
|
className: "max-sm:hidden"
|
|
184
185
|
}),
|
|
185
|
-
/* @__PURE__ */ q(
|
|
186
|
+
/* @__PURE__ */ q(M, { links: g }),
|
|
186
187
|
/* @__PURE__ */ J("span", {
|
|
187
188
|
className: "ml-auto flex items-center gap-3",
|
|
188
189
|
children: [
|
|
@@ -190,19 +191,19 @@ function Pt() {
|
|
|
190
191
|
className: "text-xs text-muted-foreground",
|
|
191
192
|
children: s("saving")
|
|
192
193
|
}),
|
|
193
|
-
/* @__PURE__ */ q(
|
|
194
|
+
/* @__PURE__ */ q(Ee, {
|
|
194
195
|
workspace: c,
|
|
195
196
|
others: N
|
|
196
197
|
}),
|
|
197
|
-
/* @__PURE__ */ q(
|
|
198
|
-
items: () => [...
|
|
198
|
+
/* @__PURE__ */ q(Nt, {
|
|
199
|
+
items: () => [...le([f]), ...C ? [{
|
|
199
200
|
label: i("deleteIssue"),
|
|
200
201
|
destructive: !0,
|
|
201
202
|
onClick: () => E({
|
|
202
203
|
title: i("deleteTitle", { identifier: f.identifier }),
|
|
203
204
|
description: i("deleteDescription"),
|
|
204
205
|
confirmLabel: i("deleteIssue"),
|
|
205
|
-
onConfirm: () =>
|
|
206
|
+
onConfirm: () => A.mutateAsync()
|
|
206
207
|
})
|
|
207
208
|
}] : []],
|
|
208
209
|
label: s("moreActionsFor", { name: f.identifier }),
|
|
@@ -210,14 +211,14 @@ function Pt() {
|
|
|
210
211
|
})
|
|
211
212
|
]
|
|
212
213
|
}),
|
|
213
|
-
F.isError && /* @__PURE__ */ q(
|
|
214
|
+
F.isError && /* @__PURE__ */ q(_t, {
|
|
214
215
|
inline: !0,
|
|
215
216
|
className: "ml-auto text-xs",
|
|
216
217
|
children: o(F.error)
|
|
217
218
|
})
|
|
218
219
|
]
|
|
219
220
|
}),
|
|
220
|
-
|
|
221
|
+
D,
|
|
221
222
|
/* @__PURE__ */ J("div", {
|
|
222
223
|
className: "flex min-h-0 flex-1 flex-col overflow-y-auto md:flex-row md:overflow-hidden",
|
|
223
224
|
children: [/* @__PURE__ */ q("div", {
|
|
@@ -225,42 +226,42 @@ function Pt() {
|
|
|
225
226
|
children: /* @__PURE__ */ J("article", {
|
|
226
227
|
className: "w-full px-4 pt-6 pb-24 md:px-8 md:pt-8",
|
|
227
228
|
children: [
|
|
228
|
-
/* @__PURE__ */ J(
|
|
229
|
+
/* @__PURE__ */ J(Qt.Provider, {
|
|
229
230
|
value: y,
|
|
230
231
|
children: [
|
|
231
|
-
f.triage && /* @__PURE__ */ q(
|
|
232
|
+
f.triage && /* @__PURE__ */ q(It, {
|
|
232
233
|
workspace: c,
|
|
233
234
|
issue: f
|
|
234
235
|
}),
|
|
235
|
-
f.archivedAt && /* @__PURE__ */ q(
|
|
236
|
+
f.archivedAt && /* @__PURE__ */ q(pt, {
|
|
236
237
|
tone: "muted",
|
|
237
|
-
icon: /* @__PURE__ */ q(
|
|
238
|
+
icon: /* @__PURE__ */ q(Pt, {}),
|
|
238
239
|
className: "mb-5",
|
|
239
240
|
children: /* @__PURE__ */ J("span", {
|
|
240
241
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
241
242
|
children: [i("archivedNote", { when: a.day(f.archivedAt.slice(0, 10)) }), /* @__PURE__ */ q(z, {
|
|
242
243
|
type: "button",
|
|
243
244
|
size: "sm",
|
|
244
|
-
onClick: () =>
|
|
245
|
-
loading:
|
|
245
|
+
onClick: () => k.mutate(),
|
|
246
|
+
loading: k.isPending,
|
|
246
247
|
children: i("restore")
|
|
247
248
|
})]
|
|
248
249
|
})
|
|
249
250
|
}),
|
|
250
|
-
/* @__PURE__ */ q(
|
|
251
|
+
/* @__PURE__ */ q(Lt, {
|
|
251
252
|
issue: f,
|
|
252
253
|
onSave: (e) => F.mutate({ title: e })
|
|
253
254
|
}),
|
|
254
|
-
/* @__PURE__ */ q(
|
|
255
|
+
/* @__PURE__ */ q(Te, {
|
|
255
256
|
workspace: c,
|
|
256
257
|
others: N,
|
|
257
258
|
field: "title"
|
|
258
259
|
}),
|
|
259
|
-
/* @__PURE__ */ q(
|
|
260
|
+
/* @__PURE__ */ q(Rt, {
|
|
260
261
|
workspace: c,
|
|
261
262
|
issue: f
|
|
262
263
|
}),
|
|
263
|
-
/* @__PURE__ */ q(
|
|
264
|
+
/* @__PURE__ */ q(Te, {
|
|
264
265
|
workspace: c,
|
|
265
266
|
others: N,
|
|
266
267
|
field: "body"
|
|
@@ -269,20 +270,20 @@ function Pt() {
|
|
|
269
270
|
workspace: c,
|
|
270
271
|
issue: f
|
|
271
272
|
}),
|
|
272
|
-
/* @__PURE__ */ q(
|
|
273
|
+
/* @__PURE__ */ q(O, {
|
|
273
274
|
workspace: c,
|
|
274
275
|
identifier: f.identifier,
|
|
275
276
|
enabled: !!P?.customerRequestsEnabled
|
|
276
277
|
}),
|
|
277
|
-
/* @__PURE__ */ q(
|
|
278
|
+
/* @__PURE__ */ q(zt, {
|
|
278
279
|
workspace: c,
|
|
279
280
|
identifier: l
|
|
280
281
|
}),
|
|
281
|
-
/* @__PURE__ */ q(
|
|
282
|
+
/* @__PURE__ */ q(ee, {
|
|
282
283
|
workspace: c,
|
|
283
284
|
identifier: l
|
|
284
285
|
}),
|
|
285
|
-
/* @__PURE__ */ q(
|
|
286
|
+
/* @__PURE__ */ q(ne, {
|
|
286
287
|
workspace: c,
|
|
287
288
|
identifier: l,
|
|
288
289
|
title: f.title
|
|
@@ -299,41 +300,41 @@ function Pt() {
|
|
|
299
300
|
workspace: c,
|
|
300
301
|
identifier: l
|
|
301
302
|
}),
|
|
302
|
-
/* @__PURE__ */ q(
|
|
303
|
+
/* @__PURE__ */ q(x, {
|
|
303
304
|
workspace: c,
|
|
304
305
|
identifier: l
|
|
305
306
|
}),
|
|
306
|
-
/* @__PURE__ */ q(
|
|
307
|
+
/* @__PURE__ */ q(Kt, {
|
|
307
308
|
workspace: c,
|
|
308
309
|
identifier: l,
|
|
309
310
|
others: N
|
|
310
311
|
})
|
|
311
312
|
]
|
|
312
313
|
}),
|
|
313
|
-
/* @__PURE__ */ q(
|
|
314
|
+
/* @__PURE__ */ q(Gt, {
|
|
314
315
|
workspace: c,
|
|
315
316
|
identifier: l
|
|
316
317
|
}),
|
|
317
|
-
/* @__PURE__ */ q(
|
|
318
|
+
/* @__PURE__ */ q(w, {
|
|
318
319
|
workspace: c,
|
|
319
320
|
identifier: l
|
|
320
321
|
})
|
|
321
322
|
]
|
|
322
323
|
})
|
|
323
|
-
}), /* @__PURE__ */ q(
|
|
324
|
+
}), /* @__PURE__ */ q(Bt, {
|
|
324
325
|
workspace: c,
|
|
325
326
|
issue: f,
|
|
326
327
|
team: P,
|
|
327
|
-
open:
|
|
328
|
-
setOpen:
|
|
328
|
+
open: I,
|
|
329
|
+
setOpen: L,
|
|
329
330
|
update: (e) => F.mutate(e)
|
|
330
331
|
})]
|
|
331
332
|
})
|
|
332
333
|
]
|
|
333
334
|
});
|
|
334
335
|
}
|
|
335
|
-
function
|
|
336
|
-
let i = G("triage"), a =
|
|
336
|
+
function It({ workspace: n, issue: r }) {
|
|
337
|
+
let i = G("triage"), a = jt(), o = Z(), s = st(n, r.teamId), c = Y({
|
|
337
338
|
mutationFn: async (i) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
|
|
338
339
|
params: { path: {
|
|
339
340
|
workspace: n,
|
|
@@ -350,7 +351,7 @@ function Ft({ workspace: n, issue: r }) {
|
|
|
350
351
|
return /* @__PURE__ */ J("div", {
|
|
351
352
|
className: "mb-5 flex flex-wrap items-center gap-3 rounded-xl border border-border bg-muted/40 px-4 py-3",
|
|
352
353
|
children: [
|
|
353
|
-
/* @__PURE__ */ q(
|
|
354
|
+
/* @__PURE__ */ q(_e, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
354
355
|
/* @__PURE__ */ q("p", {
|
|
355
356
|
className: "min-w-0 flex-1 text-sm",
|
|
356
357
|
children: i("waiting")
|
|
@@ -378,12 +379,12 @@ function Ft({ workspace: n, issue: r }) {
|
|
|
378
379
|
]
|
|
379
380
|
});
|
|
380
381
|
}
|
|
381
|
-
function
|
|
382
|
-
let n = G("issue"), r =
|
|
382
|
+
function Lt({ issue: e, onSave: t }) {
|
|
383
|
+
let n = G("issue"), r = Ot(Qt);
|
|
383
384
|
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("h1", {
|
|
384
385
|
className: "sr-only",
|
|
385
386
|
children: e.title
|
|
386
|
-
}), /* @__PURE__ */ q(
|
|
387
|
+
}), /* @__PURE__ */ q(xt, {
|
|
387
388
|
value: e.title,
|
|
388
389
|
onCommit: t,
|
|
389
390
|
onFocus: () => r("title"),
|
|
@@ -391,24 +392,24 @@ function It({ issue: e, onSave: t }) {
|
|
|
391
392
|
"aria-label": n("title")
|
|
392
393
|
})] });
|
|
393
394
|
}
|
|
394
|
-
function
|
|
395
|
-
let n = G("issue"), r = G("common"), i =
|
|
395
|
+
function Rt({ workspace: e, issue: t }) {
|
|
396
|
+
let n = G("issue"), r = G("common"), i = Ot(Qt), { data: a } = Q(p), o = U(null), s = At(() => ({
|
|
396
397
|
name: a?.user.name ?? n("someone"),
|
|
397
|
-
color:
|
|
398
|
+
color: Ie(a?.user.username ?? "")
|
|
398
399
|
}), [
|
|
399
400
|
a?.user.name,
|
|
400
401
|
a?.user.username,
|
|
401
402
|
n
|
|
402
|
-
]), { session: c, error: l } =
|
|
403
|
+
]), { session: c, error: l } = Le({
|
|
403
404
|
workspace: e,
|
|
404
405
|
target: { issue: t.identifier },
|
|
405
406
|
user: s,
|
|
406
407
|
getMarkdown: o
|
|
407
|
-
}), u = U(null), d =
|
|
408
|
+
}), u = U(null), d = E(e, t.identifier), { data: f = [] } = X(h(e, t.identifier)), m = ot(e, "comment", at(t));
|
|
408
409
|
return /* @__PURE__ */ J("div", {
|
|
409
410
|
className: "group mt-4 min-h-32",
|
|
410
411
|
children: [
|
|
411
|
-
c ? /* @__PURE__ */ q(
|
|
412
|
+
c ? /* @__PURE__ */ q(D, {
|
|
412
413
|
session: c,
|
|
413
414
|
user: s,
|
|
414
415
|
getMarkdown: o,
|
|
@@ -421,23 +422,23 @@ function Lt({ workspace: e, issue: t }) {
|
|
|
421
422
|
placeholder: n("addDescription"),
|
|
422
423
|
label: r("description"),
|
|
423
424
|
className: "min-h-32"
|
|
424
|
-
}, `${c.generation}:${c.doc.guid}`) : /* @__PURE__ */ q(
|
|
425
|
+
}, `${c.generation}:${c.doc.guid}`) : /* @__PURE__ */ q(A, {
|
|
425
426
|
value: t.body,
|
|
426
427
|
editable: !1,
|
|
427
428
|
className: "min-h-32"
|
|
428
429
|
}),
|
|
429
|
-
/* @__PURE__ */ q(
|
|
430
|
+
/* @__PURE__ */ q(_t, {
|
|
430
431
|
className: "mt-1",
|
|
431
432
|
children: l
|
|
432
433
|
}),
|
|
433
434
|
c && /* @__PURE__ */ J("div", {
|
|
434
435
|
className: "mt-1 flex items-center justify-end gap-2",
|
|
435
|
-
children: [/* @__PURE__ */ q(
|
|
436
|
+
children: [/* @__PURE__ */ q(T, {
|
|
436
437
|
pending: d.pending,
|
|
437
438
|
error: d.error
|
|
438
|
-
}), /* @__PURE__ */ q(
|
|
439
|
+
}), /* @__PURE__ */ q(C, { onFiles: (e) => d.upload(u.current, e) })]
|
|
439
440
|
}),
|
|
440
|
-
/* @__PURE__ */ q(
|
|
441
|
+
/* @__PURE__ */ q(De, {
|
|
441
442
|
workspace: e,
|
|
442
443
|
identifier: t.identifier,
|
|
443
444
|
reactions: f,
|
|
@@ -447,8 +448,8 @@ function Lt({ workspace: e, issue: t }) {
|
|
|
447
448
|
]
|
|
448
449
|
});
|
|
449
450
|
}
|
|
450
|
-
function
|
|
451
|
-
let n = G("issue"), { data: r } = Q(l(e, t)), i = H(), a =
|
|
451
|
+
function zt({ workspace: e, identifier: t }) {
|
|
452
|
+
let n = G("issue"), { data: r } = Q(l(e, t)), i = H(), a = He(e);
|
|
452
453
|
return r.length === 0 ? null : /* @__PURE__ */ J("section", {
|
|
453
454
|
className: "mt-6",
|
|
454
455
|
"aria-label": n("docs"),
|
|
@@ -461,11 +462,11 @@ function Rt({ workspace: e, identifier: t }) {
|
|
|
461
462
|
to: "/$workspace/docs/$doc",
|
|
462
463
|
params: {
|
|
463
464
|
workspace: e,
|
|
464
|
-
doc:
|
|
465
|
+
doc: Ve(t)
|
|
465
466
|
},
|
|
466
467
|
onContextMenu: (e) => i(e, a(t)),
|
|
467
|
-
className: `${
|
|
468
|
-
children: [/* @__PURE__ */ q(
|
|
468
|
+
className: `${Ct({ size: "sm" })} max-w-72`,
|
|
469
|
+
children: [/* @__PURE__ */ q(fe, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ q("span", {
|
|
469
470
|
className: "truncate",
|
|
470
471
|
children: t.title
|
|
471
472
|
})]
|
|
@@ -473,28 +474,28 @@ function Rt({ workspace: e, identifier: t }) {
|
|
|
473
474
|
})]
|
|
474
475
|
});
|
|
475
476
|
}
|
|
476
|
-
function
|
|
477
|
-
let c = G("relations"), l = i?.key, d = G("issue.properties"), p = G("common"), m =
|
|
477
|
+
function Bt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s }) {
|
|
478
|
+
let c = G("relations"), l = i?.key, d = G("issue.properties"), p = G("common"), m = ve(), { data: h = [] } = X({
|
|
478
479
|
...g(n, l ?? ""),
|
|
479
480
|
enabled: !!l
|
|
480
|
-
}), { data: _ = [] } = X(f(n)), { data: v = [] } = X(u(n, r.identifier)), { nameOf: y, actorName: b, avatarOf: x } =
|
|
481
|
+
}), { data: _ = [] } = X(f(n)), { data: v = [] } = X(u(n, r.identifier)), { nameOf: y, actorName: b, avatarOf: x } = tt(n), S = Z(), C = Y({
|
|
481
482
|
mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/labels", {
|
|
482
483
|
params: { path: { workspace: n } },
|
|
483
484
|
body: {
|
|
484
485
|
name: r,
|
|
485
|
-
color:
|
|
486
|
+
color: Vt[_.length % Vt.length] ?? "#d73a4a"
|
|
486
487
|
}
|
|
487
488
|
})),
|
|
488
489
|
onSuccess: (e) => {
|
|
489
490
|
S.invalidateQueries({ queryKey: f(n).queryKey }), s({ addLabels: [e.id] });
|
|
490
491
|
}
|
|
491
|
-
}), w = r.assignees.map(
|
|
492
|
-
e.stopPropagation(),
|
|
492
|
+
}), w = r.assignees.map(je), T = Ne(n, !0), E = (e) => (t) => o(t ? e : null), D = rt(a === "assignees", () => o(null)), O = rt(a === "labels", () => o(null)), A = "flex h-8 w-full items-center gap-2 rounded-md px-2 text-sm hover:bg-muted", j = H(), ee = We(n), M = ct(), N = (e, t) => {
|
|
493
|
+
e.stopPropagation(), j(e, t);
|
|
493
494
|
};
|
|
494
495
|
return /* @__PURE__ */ J("aside", {
|
|
495
496
|
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",
|
|
496
497
|
"aria-label": d("title"),
|
|
497
|
-
onContextMenu: (e) =>
|
|
498
|
+
onContextMenu: (e) => j(e, ee([r])),
|
|
498
499
|
children: [
|
|
499
500
|
/* @__PURE__ */ q($, {
|
|
500
501
|
label: p("status"),
|
|
@@ -506,7 +507,7 @@ function zt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s })
|
|
|
506
507
|
items: h.map((e) => ({
|
|
507
508
|
value: e.id,
|
|
508
509
|
label: e.name,
|
|
509
|
-
icon: /* @__PURE__ */ q(
|
|
510
|
+
icon: /* @__PURE__ */ q(ge, {
|
|
510
511
|
category: e.category,
|
|
511
512
|
step: e.step
|
|
512
513
|
})
|
|
@@ -516,19 +517,19 @@ function zt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s })
|
|
|
516
517
|
placeholder: d("changeStatus"),
|
|
517
518
|
trigger: /* @__PURE__ */ J("button", {
|
|
518
519
|
type: "button",
|
|
519
|
-
className:
|
|
520
|
-
children: [/* @__PURE__ */ q(
|
|
520
|
+
className: A,
|
|
521
|
+
children: [/* @__PURE__ */ q(ge, {
|
|
521
522
|
category: r.status.category,
|
|
522
523
|
step: r.status.step
|
|
523
524
|
}), r.status.name]
|
|
524
525
|
})
|
|
525
526
|
})
|
|
526
527
|
}),
|
|
527
|
-
/* @__PURE__ */ q(
|
|
528
|
+
/* @__PURE__ */ q(Wt, {
|
|
528
529
|
workspace: n,
|
|
529
530
|
issue: r,
|
|
530
531
|
update: s,
|
|
531
|
-
row:
|
|
532
|
+
row: A
|
|
532
533
|
}),
|
|
533
534
|
/* @__PURE__ */ q($, {
|
|
534
535
|
label: p("priority"),
|
|
@@ -546,15 +547,15 @@ function zt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s })
|
|
|
546
547
|
].map((e) => ({
|
|
547
548
|
value: String(e),
|
|
548
549
|
label: m[e] ?? "",
|
|
549
|
-
icon: /* @__PURE__ */ q(
|
|
550
|
+
icon: /* @__PURE__ */ q(me, { priority: e })
|
|
550
551
|
})),
|
|
551
552
|
value: String(r.priority),
|
|
552
553
|
onValueChange: (e) => e !== null && s({ priority: Number(e) }),
|
|
553
554
|
placeholder: d("setPriority"),
|
|
554
555
|
trigger: /* @__PURE__ */ J("button", {
|
|
555
556
|
type: "button",
|
|
556
|
-
className:
|
|
557
|
-
children: [/* @__PURE__ */ q(
|
|
557
|
+
className: A,
|
|
558
|
+
children: [/* @__PURE__ */ q(me, { priority: r.priority }), m[r.priority]]
|
|
558
559
|
})
|
|
559
560
|
})
|
|
560
561
|
}),
|
|
@@ -571,21 +572,21 @@ function zt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s })
|
|
|
571
572
|
onValueChange: (e) => {
|
|
572
573
|
let t = e.filter((e) => !w.includes(e)), n = w.filter((t) => !e.includes(t));
|
|
573
574
|
s({
|
|
574
|
-
...t.length > 0 && { addAssignees: t.map(
|
|
575
|
-
...n.length > 0 && { removeAssignees: n.map(
|
|
575
|
+
...t.length > 0 && { addAssignees: t.map(Me) },
|
|
576
|
+
...n.length > 0 && { removeAssignees: n.map(Me) }
|
|
576
577
|
}), D();
|
|
577
578
|
},
|
|
578
579
|
placeholder: d("assignTo"),
|
|
579
580
|
trigger: /* @__PURE__ */ J("button", {
|
|
580
581
|
type: "button",
|
|
581
|
-
className: `${
|
|
582
|
+
className: `${A} h-auto min-h-8 flex-wrap py-1`,
|
|
582
583
|
children: [r.assignees.length === 0 && /* @__PURE__ */ q("span", {
|
|
583
584
|
className: "text-muted-foreground",
|
|
584
585
|
children: d("unassigned")
|
|
585
586
|
}), r.assignees.map((e) => {
|
|
586
587
|
let t = y(e.kind, e.handle);
|
|
587
588
|
return /* @__PURE__ */ q("span", {
|
|
588
|
-
onContextMenu: (r) =>
|
|
589
|
+
onContextMenu: (r) => N(r, [{
|
|
589
590
|
label: d("unassign", { name: t }),
|
|
590
591
|
onClick: () => s({ removeAssignees: [{
|
|
591
592
|
kind: e.kind,
|
|
@@ -593,7 +594,7 @@ function zt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s })
|
|
|
593
594
|
}] })
|
|
594
595
|
}, {
|
|
595
596
|
label: d("viewTheirIssues"),
|
|
596
|
-
onClick: () =>
|
|
597
|
+
onClick: () => M({
|
|
597
598
|
to: "/$workspace/issues",
|
|
598
599
|
params: { workspace: n },
|
|
599
600
|
search: {
|
|
@@ -603,13 +604,13 @@ function zt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s })
|
|
|
603
604
|
})
|
|
604
605
|
}]),
|
|
605
606
|
className: "flex items-center gap-1.5",
|
|
606
|
-
children: /* @__PURE__ */ J(
|
|
607
|
+
children: /* @__PURE__ */ J(ye, {
|
|
607
608
|
workspace: n,
|
|
608
609
|
kind: e.kind,
|
|
609
610
|
handle: e.handle,
|
|
610
611
|
className: "flex items-center gap-1.5",
|
|
611
|
-
children: [/* @__PURE__ */ q(
|
|
612
|
-
...
|
|
612
|
+
children: [/* @__PURE__ */ q(ft, {
|
|
613
|
+
...Pe(e.kind),
|
|
613
614
|
name: t,
|
|
614
615
|
src: x(e.kind, e.handle),
|
|
615
616
|
size: "xs",
|
|
@@ -634,7 +635,7 @@ function zt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s })
|
|
|
634
635
|
label: e.name,
|
|
635
636
|
icon: /* @__PURE__ */ J("span", {
|
|
636
637
|
className: "flex items-center gap-2",
|
|
637
|
-
children: [/* @__PURE__ */ q(
|
|
638
|
+
children: [/* @__PURE__ */ q(nt, {}), /* @__PURE__ */ q("span", {
|
|
638
639
|
className: "size-2.5 rounded-full",
|
|
639
640
|
style: { background: e.color }
|
|
640
641
|
})]
|
|
@@ -653,17 +654,17 @@ function zt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s })
|
|
|
653
654
|
placeholder: d("addLabels"),
|
|
654
655
|
trigger: /* @__PURE__ */ J("button", {
|
|
655
656
|
type: "button",
|
|
656
|
-
className: `${
|
|
657
|
+
className: `${A} h-auto min-h-8 flex-wrap py-1`,
|
|
657
658
|
children: [r.labels.length === 0 && /* @__PURE__ */ q("span", {
|
|
658
659
|
className: "text-muted-foreground",
|
|
659
660
|
children: d("noLabels")
|
|
660
661
|
}), r.labels.map((e) => /* @__PURE__ */ J("span", {
|
|
661
|
-
onContextMenu: (t) =>
|
|
662
|
+
onContextMenu: (t) => N(t, [{
|
|
662
663
|
label: d("removeLabel", { name: e.name }),
|
|
663
664
|
onClick: () => s({ removeLabels: [e.id] })
|
|
664
665
|
}, {
|
|
665
666
|
label: d("viewLabelIssues"),
|
|
666
|
-
onClick: () =>
|
|
667
|
+
onClick: () => M({
|
|
667
668
|
to: "/$workspace/issues",
|
|
668
669
|
params: { workspace: n },
|
|
669
670
|
search: { label: e.name }
|
|
@@ -684,35 +685,35 @@ function zt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s })
|
|
|
684
685
|
}),
|
|
685
686
|
/* @__PURE__ */ q($, {
|
|
686
687
|
label: c("parent"),
|
|
687
|
-
children: /* @__PURE__ */ q(
|
|
688
|
+
children: /* @__PURE__ */ q(F, {
|
|
688
689
|
workspace: n,
|
|
689
690
|
issue: r,
|
|
690
|
-
row:
|
|
691
|
+
row: A
|
|
691
692
|
})
|
|
692
693
|
}),
|
|
693
|
-
/* @__PURE__ */ q(
|
|
694
|
+
/* @__PURE__ */ q(Ut, {
|
|
694
695
|
workspace: n,
|
|
695
696
|
issue: r,
|
|
696
697
|
team: i,
|
|
697
698
|
update: s,
|
|
698
|
-
row:
|
|
699
|
+
row: A
|
|
699
700
|
}),
|
|
700
701
|
/* @__PURE__ */ q($, {
|
|
701
702
|
label: d("created"),
|
|
702
703
|
children: /* @__PURE__ */ J("p", {
|
|
703
704
|
className: "flex items-center gap-2 px-2 text-sm",
|
|
704
|
-
children: [/* @__PURE__ */ q(
|
|
705
|
+
children: [/* @__PURE__ */ q(ye, {
|
|
705
706
|
workspace: n,
|
|
706
707
|
kind: r.creator.kind,
|
|
707
708
|
handle: r.creator.handle,
|
|
708
|
-
children: /* @__PURE__ */ q(
|
|
709
|
-
...
|
|
709
|
+
children: /* @__PURE__ */ q(ft, {
|
|
710
|
+
...Pe(r.creator.kind),
|
|
710
711
|
name: b(r.creator),
|
|
711
712
|
src: x(r.creator.kind, r.creator.handle),
|
|
712
713
|
size: "xs",
|
|
713
714
|
tooltip: r.creator.kind !== "user"
|
|
714
715
|
})
|
|
715
|
-
}), /* @__PURE__ */ q(
|
|
716
|
+
}), /* @__PURE__ */ q(bt, {
|
|
716
717
|
value: r.createdAt,
|
|
717
718
|
exact: "medium"
|
|
718
719
|
})]
|
|
@@ -720,12 +721,12 @@ function zt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s })
|
|
|
720
721
|
}),
|
|
721
722
|
/* @__PURE__ */ q($, {
|
|
722
723
|
label: d("timeInStatus"),
|
|
723
|
-
children: /* @__PURE__ */ q(
|
|
724
|
+
children: /* @__PURE__ */ q(Oe, {
|
|
724
725
|
workspace: n,
|
|
725
726
|
identifier: r.identifier
|
|
726
727
|
})
|
|
727
728
|
}),
|
|
728
|
-
/* @__PURE__ */ q(
|
|
729
|
+
/* @__PURE__ */ q(k, {
|
|
729
730
|
workspace: n,
|
|
730
731
|
issue: r,
|
|
731
732
|
label: (e, t, n) => /* @__PURE__ */ q($, {
|
|
@@ -735,12 +736,12 @@ function zt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s })
|
|
|
735
736
|
}),
|
|
736
737
|
v.length > 0 && /* @__PURE__ */ q($, {
|
|
737
738
|
label: d("syncedWith"),
|
|
738
|
-
children: /* @__PURE__ */ q(
|
|
739
|
+
children: /* @__PURE__ */ q(te, { links: v })
|
|
739
740
|
})
|
|
740
741
|
]
|
|
741
742
|
});
|
|
742
743
|
}
|
|
743
|
-
var
|
|
744
|
+
var Vt = [
|
|
744
745
|
"#d73a4a",
|
|
745
746
|
"#2f8a57",
|
|
746
747
|
"#8250df",
|
|
@@ -749,7 +750,7 @@ var Bt = [
|
|
|
749
750
|
"#57606a",
|
|
750
751
|
"#1a7f37"
|
|
751
752
|
];
|
|
752
|
-
function
|
|
753
|
+
function Ht({ workspace: e, origin: t, className: n }) {
|
|
753
754
|
let r = "size-3.5 shrink-0 text-muted-foreground", i = t.title.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
|
|
754
755
|
switch (t.kind) {
|
|
755
756
|
case "decision": return /* @__PURE__ */ J(R, {
|
|
@@ -759,7 +760,7 @@ function Vt({ workspace: e, origin: t, className: n }) {
|
|
|
759
760
|
identifier: t.key
|
|
760
761
|
},
|
|
761
762
|
className: n,
|
|
762
|
-
children: [/* @__PURE__ */ q(
|
|
763
|
+
children: [/* @__PURE__ */ q(pe, { className: r }), /* @__PURE__ */ q(St, {
|
|
763
764
|
content: i,
|
|
764
765
|
overflowOnly: !0,
|
|
765
766
|
children: /* @__PURE__ */ q("span", {
|
|
@@ -768,11 +769,11 @@ function Vt({ workspace: e, origin: t, className: n }) {
|
|
|
768
769
|
})
|
|
769
770
|
})]
|
|
770
771
|
});
|
|
771
|
-
case "area": return /* @__PURE__ */ J(
|
|
772
|
+
case "area": return /* @__PURE__ */ J(S, {
|
|
772
773
|
workspace: e,
|
|
773
774
|
area: { key: t.key },
|
|
774
775
|
className: n,
|
|
775
|
-
children: [/* @__PURE__ */ q(
|
|
776
|
+
children: [/* @__PURE__ */ q(L, { className: r }), /* @__PURE__ */ q("span", {
|
|
776
777
|
className: "truncate",
|
|
777
778
|
children: i
|
|
778
779
|
})]
|
|
@@ -784,15 +785,15 @@ function Vt({ workspace: e, origin: t, className: n }) {
|
|
|
784
785
|
doc: t.key
|
|
785
786
|
},
|
|
786
787
|
className: n,
|
|
787
|
-
children: [/* @__PURE__ */ q(
|
|
788
|
+
children: [/* @__PURE__ */ q(fe, { className: r }), /* @__PURE__ */ q("span", {
|
|
788
789
|
className: "truncate",
|
|
789
790
|
children: i
|
|
790
791
|
})]
|
|
791
792
|
});
|
|
792
793
|
}
|
|
793
794
|
}
|
|
794
|
-
function
|
|
795
|
-
let o = G("planning"), c = G("flow"), l =
|
|
795
|
+
function Ut({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
796
|
+
let o = G("planning"), c = G("flow"), l = ut(), u = we(), { data: d = [] } = X(m(e)), f = d.find((e) => e.id === t.project?.id), { data: p = [] } = X({
|
|
796
797
|
...s(e, n?.key ?? ""),
|
|
797
798
|
enabled: !!n?.cyclesEnabled
|
|
798
799
|
}), h = n?.estimateScale ?? "none", g = t.status.category === "completed" || t.status.category === "canceled", _ = (e) => e.name ? o("cycleNamed", {
|
|
@@ -816,7 +817,7 @@ function Ht({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
816
817
|
trigger: /* @__PURE__ */ J("button", {
|
|
817
818
|
type: "button",
|
|
818
819
|
className: a,
|
|
819
|
-
children: [/* @__PURE__ */ q(
|
|
820
|
+
children: [/* @__PURE__ */ q(ue, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.stage ? /* @__PURE__ */ q("span", {
|
|
820
821
|
className: "truncate",
|
|
821
822
|
children: c(`stages.${t.stage}`)
|
|
822
823
|
}) : /* @__PURE__ */ q("span", {
|
|
@@ -843,7 +844,7 @@ function Ht({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
843
844
|
trigger: /* @__PURE__ */ J("button", {
|
|
844
845
|
type: "button",
|
|
845
846
|
className: a,
|
|
846
|
-
children: [/* @__PURE__ */ q(
|
|
847
|
+
children: [/* @__PURE__ */ q(L, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.area ? /* @__PURE__ */ q("span", {
|
|
847
848
|
className: "truncate",
|
|
848
849
|
children: t.area.title
|
|
849
850
|
}) : /* @__PURE__ */ q("span", {
|
|
@@ -855,7 +856,7 @@ function Ht({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
855
856
|
}),
|
|
856
857
|
t.origin && /* @__PURE__ */ q($, {
|
|
857
858
|
label: o("startedFrom"),
|
|
858
|
-
children: /* @__PURE__ */ q(
|
|
859
|
+
children: /* @__PURE__ */ q(Ht, {
|
|
859
860
|
workspace: e,
|
|
860
861
|
origin: t.origin,
|
|
861
862
|
className: a
|
|
@@ -873,12 +874,12 @@ function Ht({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
873
874
|
}, ...d.map((e) => ({
|
|
874
875
|
value: e.id,
|
|
875
876
|
label: e.name,
|
|
876
|
-
icon: /* @__PURE__ */ q(
|
|
877
|
+
icon: /* @__PURE__ */ q(xe, { status: e.status })
|
|
877
878
|
}))],
|
|
878
879
|
trigger: /* @__PURE__ */ J("button", {
|
|
879
880
|
type: "button",
|
|
880
881
|
className: a,
|
|
881
|
-
children: [/* @__PURE__ */ q(
|
|
882
|
+
children: [/* @__PURE__ */ q(he, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.project ? /* @__PURE__ */ q("span", {
|
|
882
883
|
className: "truncate",
|
|
883
884
|
children: t.project.name
|
|
884
885
|
}) : /* @__PURE__ */ q("span", {
|
|
@@ -935,7 +936,7 @@ function Ht({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
935
936
|
trigger: /* @__PURE__ */ J("button", {
|
|
936
937
|
type: "button",
|
|
937
938
|
className: a,
|
|
938
|
-
children: [/* @__PURE__ */ q(
|
|
939
|
+
children: [/* @__PURE__ */ q(ue, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.cycle ? /* @__PURE__ */ q("span", {
|
|
939
940
|
className: "truncate",
|
|
940
941
|
children: _(t.cycle)
|
|
941
942
|
}) : /* @__PURE__ */ q("span", {
|
|
@@ -954,14 +955,14 @@ function Ht({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
954
955
|
items: [{
|
|
955
956
|
value: 0,
|
|
956
957
|
label: o("noEstimate")
|
|
957
|
-
}, ...
|
|
958
|
+
}, ...Ce(h).map((e) => ({
|
|
958
959
|
value: e,
|
|
959
960
|
label: u(e, h)
|
|
960
961
|
}))],
|
|
961
962
|
trigger: /* @__PURE__ */ J("button", {
|
|
962
963
|
type: "button",
|
|
963
964
|
className: a,
|
|
964
|
-
children: [/* @__PURE__ */ q(
|
|
965
|
+
children: [/* @__PURE__ */ q(de, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.estimate ? u(t.estimate, h) : /* @__PURE__ */ q("span", {
|
|
965
966
|
className: "text-muted-foreground",
|
|
966
967
|
children: o("noEstimate")
|
|
967
968
|
})]
|
|
@@ -972,7 +973,7 @@ function Ht({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
972
973
|
label: o("dueDate"),
|
|
973
974
|
children: /* @__PURE__ */ J("div", {
|
|
974
975
|
className: "flex items-center",
|
|
975
|
-
children: [/* @__PURE__ */ q(
|
|
976
|
+
children: [/* @__PURE__ */ q(gt, {
|
|
976
977
|
value: t.dueDate ?? "",
|
|
977
978
|
onValueChange: (e) => r({ dueDate: e }),
|
|
978
979
|
"aria-label": o("dueDate"),
|
|
@@ -980,15 +981,15 @@ function Ht({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
980
981
|
trigger: /* @__PURE__ */ q("button", {
|
|
981
982
|
type: "button",
|
|
982
983
|
className: a,
|
|
983
|
-
children: t.dueDate ? /* @__PURE__ */ q(
|
|
984
|
+
children: t.dueDate ? /* @__PURE__ */ q(be, {
|
|
984
985
|
date: t.dueDate,
|
|
985
986
|
closed: g
|
|
986
|
-
}) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
987
|
+
}) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(ce, { className: "size-3.5 shrink-0 text-muted-foreground" }), /* @__PURE__ */ q("span", {
|
|
987
988
|
className: "text-muted-foreground",
|
|
988
989
|
children: o("noDueDate")
|
|
989
990
|
})] })
|
|
990
991
|
})
|
|
991
|
-
}), t.dueDate && /* @__PURE__ */ q(
|
|
992
|
+
}), t.dueDate && /* @__PURE__ */ q(vt, {
|
|
992
993
|
variant: "ghost",
|
|
993
994
|
icon: /* @__PURE__ */ q(le, { className: "size-3.5" }),
|
|
994
995
|
label: o("clearDueDate"),
|
|
@@ -1000,7 +1001,7 @@ function Ht({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
1000
1001
|
label: o("sla.label"),
|
|
1001
1002
|
children: /* @__PURE__ */ q("span", {
|
|
1002
1003
|
className: "flex h-7 items-center px-2",
|
|
1003
|
-
children: /* @__PURE__ */ q(
|
|
1004
|
+
children: /* @__PURE__ */ q(Se, {
|
|
1004
1005
|
issue: t,
|
|
1005
1006
|
team: n
|
|
1006
1007
|
})
|
|
@@ -1008,11 +1009,11 @@ function Ht({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
1008
1009
|
})
|
|
1009
1010
|
] });
|
|
1010
1011
|
}
|
|
1011
|
-
function
|
|
1012
|
-
let i = G("issueTypes"), a =
|
|
1012
|
+
function Wt({ workspace: e, issue: t, update: n, row: r }) {
|
|
1013
|
+
let i = G("issueTypes"), a = Mt(), { data: o } = X(Ge(e)), { data: s } = X(ze(e)), { confirm: c, dialog: l } = Re(), [u, d] = W(!1), f = qe(o, t.teamId);
|
|
1013
1014
|
if (f.length === 0 && !t.type) return null;
|
|
1014
1015
|
let p = (e) => {
|
|
1015
|
-
let r = f.find((t) => t.id === e), o = (s ?? []).filter((e) =>
|
|
1016
|
+
let r = f.find((t) => t.id === e), o = (s ?? []).filter((e) => Be(t.fields[e.id]) && !Ke(r, e.id));
|
|
1016
1017
|
if (!r || o.length === 0) return n({ typeId: e });
|
|
1017
1018
|
c({
|
|
1018
1019
|
title: i("hiddenTitle"),
|
|
@@ -1037,7 +1038,7 @@ function Ut({ workspace: e, issue: t, update: n, row: r }) {
|
|
|
1037
1038
|
}, ...f.map((e) => ({
|
|
1038
1039
|
value: e.id,
|
|
1039
1040
|
label: e.name,
|
|
1040
|
-
icon: /* @__PURE__ */ q(
|
|
1041
|
+
icon: /* @__PURE__ */ q(I, { type: e })
|
|
1041
1042
|
}))],
|
|
1042
1043
|
value: t.type?.id ?? "",
|
|
1043
1044
|
onValueChange: (e) => e !== null && e !== (t.type?.id ?? "") && p(e),
|
|
@@ -1045,7 +1046,7 @@ function Ut({ workspace: e, issue: t, update: n, row: r }) {
|
|
|
1045
1046
|
trigger: /* @__PURE__ */ q("button", {
|
|
1046
1047
|
type: "button",
|
|
1047
1048
|
className: r,
|
|
1048
|
-
children: t.type ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
1049
|
+
children: t.type ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(I, { type: t.type }), t.type.name] }) : /* @__PURE__ */ q("span", {
|
|
1049
1050
|
className: "text-muted-foreground",
|
|
1050
1051
|
children: i("noType")
|
|
1051
1052
|
})
|
|
@@ -1056,15 +1057,15 @@ function Ut({ workspace: e, issue: t, update: n, row: r }) {
|
|
|
1056
1057
|
function $({ label: e, shortcut: t, children: n }) {
|
|
1057
1058
|
return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("p", {
|
|
1058
1059
|
className: "mb-1 flex items-center justify-between px-2 text-xs text-muted-foreground",
|
|
1059
|
-
children: [e, t && /* @__PURE__ */ q(
|
|
1060
|
+
children: [e, t && /* @__PURE__ */ q(yt, {
|
|
1060
1061
|
keys: t,
|
|
1061
1062
|
size: "xs",
|
|
1062
1063
|
className: "hidden md:inline-flex"
|
|
1063
1064
|
})]
|
|
1064
1065
|
}), n] });
|
|
1065
1066
|
}
|
|
1066
|
-
function
|
|
1067
|
-
let n = G("issue.activity"), { data: r } = Q(c(e, t)), [i, a] = W(!1), o =
|
|
1067
|
+
function Gt({ workspace: e, identifier: t }) {
|
|
1068
|
+
let n = G("issue.activity"), { data: r } = Q(c(e, t)), [i, a] = W(!1), o = At(() => {
|
|
1068
1069
|
let e = [];
|
|
1069
1070
|
for (let t of r) {
|
|
1070
1071
|
if (t.type.startsWith("comment.") || t.type.startsWith("issue.reaction_")) continue;
|
|
@@ -1089,7 +1090,7 @@ function Wt({ workspace: e, identifier: t }) {
|
|
|
1089
1090
|
}),
|
|
1090
1091
|
/* @__PURE__ */ q(v, {
|
|
1091
1092
|
className: "mt-3",
|
|
1092
|
-
children: o.slice(s).map((t) => /* @__PURE__ */ q(
|
|
1093
|
+
children: o.slice(s).map((t) => /* @__PURE__ */ q(P, {
|
|
1093
1094
|
workspace: e,
|
|
1094
1095
|
event: t
|
|
1095
1096
|
}, t.id))
|
|
@@ -1097,14 +1098,14 @@ function Wt({ workspace: e, identifier: t }) {
|
|
|
1097
1098
|
]
|
|
1098
1099
|
});
|
|
1099
1100
|
}
|
|
1100
|
-
function
|
|
1101
|
-
let r = G("issue.comments"), { data: i } = Q(o(e, t)), { data: a = [] } = X(u(e, t)), s =
|
|
1101
|
+
function Kt({ workspace: e, identifier: t, others: n }) {
|
|
1102
|
+
let r = G("issue.comments"), { data: i } = Q(o(e, t)), { data: a = [] } = X(u(e, t)), s = At(() => {
|
|
1102
1103
|
let e = i.filter((e) => !e.parentId);
|
|
1103
|
-
return e.sort((e, t) => Number(
|
|
1104
|
+
return e.sort((e, t) => Number(qt(t)) - Number(qt(e))), e.map((e) => ({
|
|
1104
1105
|
root: e,
|
|
1105
1106
|
replies: i.filter((t) => t.parentId === e.id)
|
|
1106
1107
|
}));
|
|
1107
|
-
}, [i]), [c, l] = W(null), d = i.filter((e) => !e.deletedAt && !
|
|
1108
|
+
}, [i]), [c, l] = W(null), d = i.filter((e) => !e.deletedAt && !qt(e)).length;
|
|
1108
1109
|
return /* @__PURE__ */ J("section", {
|
|
1109
1110
|
className: "mt-12 border-t border-border pt-6",
|
|
1110
1111
|
"aria-label": r("title"),
|
|
@@ -1123,8 +1124,8 @@ function Gt({ workspace: e, identifier: t, others: n }) {
|
|
|
1123
1124
|
/* @__PURE__ */ q("div", {
|
|
1124
1125
|
className: "mt-4 space-y-3",
|
|
1125
1126
|
children: s.map(({ root: n, replies: i }) => {
|
|
1126
|
-
let o =
|
|
1127
|
-
return /* @__PURE__ */ J(
|
|
1127
|
+
let o = qt(n) ? n.sharedWith : void 0, s = o ? et(o).source : void 0;
|
|
1128
|
+
return /* @__PURE__ */ J(mt, {
|
|
1128
1129
|
size: "fill",
|
|
1129
1130
|
padding: "none",
|
|
1130
1131
|
highlight: !!o,
|
|
@@ -1133,10 +1134,10 @@ function Gt({ workspace: e, identifier: t, others: n }) {
|
|
|
1133
1134
|
"aria-label": s && r("sharedThreadLabel", { source: s })
|
|
1134
1135
|
}),
|
|
1135
1136
|
children: [
|
|
1136
|
-
o && s ? /* @__PURE__ */ q(
|
|
1137
|
+
o && s ? /* @__PURE__ */ q(N, {
|
|
1137
1138
|
source: s,
|
|
1138
1139
|
link: a.find((e) => e.connector === o)
|
|
1139
|
-
}) : /* @__PURE__ */ q(
|
|
1140
|
+
}) : /* @__PURE__ */ q(Yt, {
|
|
1140
1141
|
workspace: e,
|
|
1141
1142
|
identifier: t,
|
|
1142
1143
|
comment: n,
|
|
@@ -1147,7 +1148,7 @@ function Gt({ workspace: e, identifier: t, others: n }) {
|
|
|
1147
1148
|
children: i.map((r) => /* @__PURE__ */ q("li", {
|
|
1148
1149
|
id: `comment-${r.id}`,
|
|
1149
1150
|
className: "border-b border-border/50 last:border-b-0",
|
|
1150
|
-
children: /* @__PURE__ */ q(
|
|
1151
|
+
children: /* @__PURE__ */ q(Yt, {
|
|
1151
1152
|
workspace: e,
|
|
1152
1153
|
identifier: t,
|
|
1153
1154
|
comment: r,
|
|
@@ -1157,7 +1158,7 @@ function Gt({ workspace: e, identifier: t, others: n }) {
|
|
|
1157
1158
|
}),
|
|
1158
1159
|
/* @__PURE__ */ q("div", {
|
|
1159
1160
|
className: "border-t border-border/70 px-3 py-2",
|
|
1160
|
-
children: c === n.id ? /* @__PURE__ */ q(
|
|
1161
|
+
children: c === n.id ? /* @__PURE__ */ q(Zt, {
|
|
1161
1162
|
workspace: e,
|
|
1162
1163
|
identifier: t,
|
|
1163
1164
|
parentId: n.id,
|
|
@@ -1175,19 +1176,19 @@ function Gt({ workspace: e, identifier: t, others: n }) {
|
|
|
1175
1176
|
}, n.id);
|
|
1176
1177
|
})
|
|
1177
1178
|
}),
|
|
1178
|
-
/* @__PURE__ */ q(
|
|
1179
|
+
/* @__PURE__ */ q(mt, {
|
|
1179
1180
|
size: "fill",
|
|
1180
1181
|
padding: "sm",
|
|
1181
1182
|
focusWithin: !0,
|
|
1182
1183
|
className: "mt-4",
|
|
1183
|
-
children: /* @__PURE__ */ q(
|
|
1184
|
+
children: /* @__PURE__ */ q(Zt, {
|
|
1184
1185
|
workspace: e,
|
|
1185
1186
|
identifier: t
|
|
1186
1187
|
})
|
|
1187
1188
|
}),
|
|
1188
1189
|
/* @__PURE__ */ q("div", {
|
|
1189
1190
|
className: "mt-2",
|
|
1190
|
-
children: /* @__PURE__ */ q(
|
|
1191
|
+
children: /* @__PURE__ */ q(Te, {
|
|
1191
1192
|
workspace: e,
|
|
1192
1193
|
others: n,
|
|
1193
1194
|
field: "comment"
|
|
@@ -1196,105 +1197,101 @@ function Gt({ workspace: e, identifier: t, others: n }) {
|
|
|
1196
1197
|
]
|
|
1197
1198
|
});
|
|
1198
1199
|
}
|
|
1199
|
-
var
|
|
1200
|
-
function
|
|
1200
|
+
var qt = (e) => !!e.sharedWith && !e.parentId;
|
|
1201
|
+
function Jt({ comment: e }) {
|
|
1201
1202
|
let t = G("issue.comments");
|
|
1202
1203
|
return e.author.kind === "connector" ? /* @__PURE__ */ q("span", {
|
|
1203
1204
|
className: "rounded border border-border px-1.5 py-px text-[10px] text-muted-foreground",
|
|
1204
|
-
children: t("via", { source:
|
|
1205
|
+
children: t("via", { source: et(e.author.handle).source })
|
|
1205
1206
|
}) : null;
|
|
1206
1207
|
}
|
|
1207
|
-
function
|
|
1208
|
-
let s = G("issue.comments"), c = G("common"), { actorName: l, avatarOf: u } =
|
|
1208
|
+
function Yt({ workspace: r, identifier: i, comment: a, onReply: o }) {
|
|
1209
|
+
let s = G("issue.comments"), c = G("common"), { actorName: l, avatarOf: u } = tt(r), { data: d } = Q(p), { data: f = [] } = X(h(r, i)), m = ot(r, "comment", { team: i.slice(0, i.lastIndexOf("-")) }), g = Z(), _ = H(), [v, b] = W(!1), [x, S] = W(a.body), [C, w] = W(!1), D = U(null), O = E(r, i), k = a.author.kind === "user" && a.author.handle === d?.user.username, j = { path: {
|
|
1209
1210
|
workspace: r,
|
|
1210
1211
|
identifier: i,
|
|
1211
1212
|
commentId: a.id
|
|
1212
|
-
} },
|
|
1213
|
+
} }, ee = () => n(g, r, i), M = Y({
|
|
1213
1214
|
mutationFn: async () => t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}/comments/{commentId}", {
|
|
1214
|
-
params:
|
|
1215
|
-
body: { body:
|
|
1215
|
+
params: j,
|
|
1216
|
+
body: { body: x }
|
|
1216
1217
|
})),
|
|
1217
1218
|
onSuccess: () => {
|
|
1218
|
-
|
|
1219
|
+
b(!1), ee();
|
|
1219
1220
|
}
|
|
1220
|
-
}),
|
|
1221
|
-
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}/comments/{commentId}", { params:
|
|
1222
|
-
onSuccess:
|
|
1221
|
+
}), te = Y({
|
|
1222
|
+
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}/comments/{commentId}", { params: j })),
|
|
1223
|
+
onSuccess: ee
|
|
1223
1224
|
});
|
|
1224
1225
|
if (a.deletedAt) return /* @__PURE__ */ q("p", {
|
|
1225
1226
|
className: "px-3 py-2.5 text-xs text-muted-foreground italic",
|
|
1226
1227
|
children: s("deleted")
|
|
1227
1228
|
});
|
|
1228
|
-
let
|
|
1229
|
+
let N = `${Ue(r, i)}#comment-${a.id}`, ne = [
|
|
1229
1230
|
{
|
|
1230
1231
|
label: s("reply"),
|
|
1231
1232
|
onClick: o
|
|
1232
1233
|
},
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
...
|
|
1236
|
-
|
|
1234
|
+
Ze(c("copyLink"), N),
|
|
1235
|
+
Ze(s("copyText"), a.body),
|
|
1236
|
+
...k ? [
|
|
1237
|
+
wt,
|
|
1237
1238
|
{
|
|
1238
1239
|
label: s("edit"),
|
|
1239
1240
|
onClick: () => {
|
|
1240
|
-
|
|
1241
|
+
S(a.body), b(!0);
|
|
1241
1242
|
}
|
|
1242
1243
|
},
|
|
1243
1244
|
{
|
|
1244
1245
|
label: c("delete"),
|
|
1245
1246
|
destructive: !0,
|
|
1246
|
-
onClick: () =>
|
|
1247
|
+
onClick: () => w(!0)
|
|
1247
1248
|
}
|
|
1248
1249
|
] : []
|
|
1249
1250
|
];
|
|
1250
1251
|
return /* @__PURE__ */ J("div", {
|
|
1251
1252
|
className: "group px-3 py-2.5",
|
|
1252
|
-
onContextMenu: (e) => !v && _(e,
|
|
1253
|
+
onContextMenu: (e) => !v && _(e, ne),
|
|
1253
1254
|
children: [/* @__PURE__ */ J("div", {
|
|
1254
1255
|
className: "flex items-center gap-2 text-xs",
|
|
1255
1256
|
children: [
|
|
1256
|
-
/* @__PURE__ */ J(
|
|
1257
|
+
/* @__PURE__ */ J(y, {
|
|
1257
1258
|
workspace: r,
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
...Ne(a.author.kind),
|
|
1259
|
+
actor: a.author,
|
|
1260
|
+
className: "flex items-center gap-2 font-medium hover:underline",
|
|
1261
|
+
children: [/* @__PURE__ */ q(ft, {
|
|
1262
|
+
...Pe(a.author.kind),
|
|
1263
1263
|
name: l(a.author),
|
|
1264
1264
|
src: u(a.author.kind, a.author.handle),
|
|
1265
1265
|
size: "xs",
|
|
1266
1266
|
decorative: !0
|
|
1267
|
-
}),
|
|
1268
|
-
className: "font-medium",
|
|
1269
|
-
children: l(a.author)
|
|
1270
|
-
})]
|
|
1267
|
+
}), l(a.author)]
|
|
1271
1268
|
}),
|
|
1272
|
-
/* @__PURE__ */ q(
|
|
1269
|
+
/* @__PURE__ */ q(Jt, { comment: a }),
|
|
1273
1270
|
/* @__PURE__ */ J("span", {
|
|
1274
1271
|
className: "text-muted-foreground",
|
|
1275
|
-
children: [/* @__PURE__ */ q(
|
|
1272
|
+
children: [/* @__PURE__ */ q(bt, {
|
|
1276
1273
|
value: a.createdAt,
|
|
1277
1274
|
exact: "medium"
|
|
1278
1275
|
}), a.updatedAt !== a.createdAt && /* @__PURE__ */ J(K, { children: [" ", s("edited")] })]
|
|
1279
1276
|
}),
|
|
1280
|
-
!
|
|
1281
|
-
items:
|
|
1277
|
+
!C && !v && /* @__PURE__ */ q(Nt, {
|
|
1278
|
+
items: ne,
|
|
1282
1279
|
className: "ml-auto"
|
|
1283
1280
|
}),
|
|
1284
|
-
|
|
1281
|
+
C && /* @__PURE__ */ J("span", {
|
|
1285
1282
|
className: "ml-auto flex gap-2 text-muted-foreground",
|
|
1286
1283
|
children: [
|
|
1287
1284
|
/* @__PURE__ */ q("span", { children: s("confirmDelete") }),
|
|
1288
1285
|
/* @__PURE__ */ q("button", {
|
|
1289
1286
|
type: "button",
|
|
1290
1287
|
className: "text-danger hover:underline",
|
|
1291
|
-
onClick: () =>
|
|
1288
|
+
onClick: () => te.mutate(),
|
|
1292
1289
|
children: c("delete")
|
|
1293
1290
|
}),
|
|
1294
1291
|
/* @__PURE__ */ q("button", {
|
|
1295
1292
|
type: "button",
|
|
1296
1293
|
className: "hover:underline",
|
|
1297
|
-
onClick: () =>
|
|
1294
|
+
onClick: () => w(!1),
|
|
1298
1295
|
children: s("keep")
|
|
1299
1296
|
})
|
|
1300
1297
|
]
|
|
@@ -1303,20 +1300,20 @@ function Jt({ workspace: r, identifier: i, comment: a, onReply: o }) {
|
|
|
1303
1300
|
}), /* @__PURE__ */ q("div", {
|
|
1304
1301
|
className: "mt-1",
|
|
1305
1302
|
children: v ? /* @__PURE__ */ J(K, { children: [
|
|
1306
|
-
/* @__PURE__ */ q(
|
|
1307
|
-
value:
|
|
1308
|
-
onChange:
|
|
1309
|
-
onSubmit: () =>
|
|
1303
|
+
/* @__PURE__ */ q(A, {
|
|
1304
|
+
value: x,
|
|
1305
|
+
onChange: S,
|
|
1306
|
+
onSubmit: () => M.mutate(),
|
|
1310
1307
|
autofocus: !0,
|
|
1311
1308
|
label: s("editLabel"),
|
|
1312
1309
|
onEditor: (e) => {
|
|
1313
|
-
|
|
1310
|
+
D.current = e;
|
|
1314
1311
|
},
|
|
1315
|
-
onFiles: (e, t) =>
|
|
1312
|
+
onFiles: (e, t) => O.upload(D.current, e, t)
|
|
1316
1313
|
}),
|
|
1317
|
-
/* @__PURE__ */ q(
|
|
1318
|
-
pending:
|
|
1319
|
-
error:
|
|
1314
|
+
/* @__PURE__ */ q(T, {
|
|
1315
|
+
pending: O.pending,
|
|
1316
|
+
error: O.error
|
|
1320
1317
|
}),
|
|
1321
1318
|
/* @__PURE__ */ J("div", {
|
|
1322
1319
|
className: "mt-2 flex justify-end gap-2",
|
|
@@ -1324,32 +1321,32 @@ function Jt({ workspace: r, identifier: i, comment: a, onReply: o }) {
|
|
|
1324
1321
|
type: "button",
|
|
1325
1322
|
variant: "ghost",
|
|
1326
1323
|
size: "sm",
|
|
1327
|
-
onClick: () =>
|
|
1324
|
+
onClick: () => b(!1),
|
|
1328
1325
|
children: c("cancel")
|
|
1329
1326
|
}), /* @__PURE__ */ q(z, {
|
|
1330
1327
|
type: "button",
|
|
1331
1328
|
variant: "primary",
|
|
1332
1329
|
size: "sm",
|
|
1333
|
-
onClick: () =>
|
|
1334
|
-
disabled: !
|
|
1330
|
+
onClick: () => M.mutate(),
|
|
1331
|
+
disabled: !x.trim() || O.pending > 0,
|
|
1335
1332
|
children: c("save")
|
|
1336
1333
|
})]
|
|
1337
1334
|
})
|
|
1338
1335
|
] }) : /* @__PURE__ */ J(K, { children: [
|
|
1339
|
-
/* @__PURE__ */ q(
|
|
1336
|
+
/* @__PURE__ */ q(A, {
|
|
1340
1337
|
value: a.body,
|
|
1341
1338
|
editable: !1
|
|
1342
1339
|
}),
|
|
1343
|
-
/* @__PURE__ */ q(
|
|
1340
|
+
/* @__PURE__ */ q(Ae, {
|
|
1344
1341
|
workspace: r,
|
|
1345
1342
|
widgets: a.widgets
|
|
1346
1343
|
}),
|
|
1347
|
-
/* @__PURE__ */ q(
|
|
1344
|
+
/* @__PURE__ */ q(Xt, {
|
|
1348
1345
|
workspace: r,
|
|
1349
1346
|
identifier: i,
|
|
1350
1347
|
comment: a
|
|
1351
1348
|
}),
|
|
1352
|
-
/* @__PURE__ */ q(
|
|
1349
|
+
/* @__PURE__ */ q(De, {
|
|
1353
1350
|
workspace: r,
|
|
1354
1351
|
identifier: i,
|
|
1355
1352
|
commentId: a.id,
|
|
@@ -1361,19 +1358,19 @@ function Jt({ workspace: r, identifier: i, comment: a, onReply: o }) {
|
|
|
1361
1358
|
})]
|
|
1362
1359
|
});
|
|
1363
1360
|
}
|
|
1364
|
-
function
|
|
1365
|
-
let { data: r = [] } = X(a(e, t)), { actorName: i } =
|
|
1361
|
+
function Xt({ workspace: e, identifier: t, comment: n }) {
|
|
1362
|
+
let { data: r = [] } = X(a(e, t)), { actorName: i } = tt(e), o = r.filter((e) => e.page && e.commentId === n.id);
|
|
1366
1363
|
return o.length === 0 ? null : /* @__PURE__ */ q("div", {
|
|
1367
1364
|
className: "mt-2 space-y-2",
|
|
1368
|
-
children: o.map((e) => /* @__PURE__ */ q(
|
|
1365
|
+
children: o.map((e) => /* @__PURE__ */ q(b, {
|
|
1369
1366
|
attachmentId: e.id,
|
|
1370
1367
|
name: e.name,
|
|
1371
1368
|
agent: i(n.author)
|
|
1372
1369
|
}, e.id))
|
|
1373
1370
|
});
|
|
1374
1371
|
}
|
|
1375
|
-
function
|
|
1376
|
-
let l = G("issue.comments"), u =
|
|
1372
|
+
function Zt({ workspace: r, identifier: i, parentId: a, publicOn: o, autofocus: s = !1, onDone: c }) {
|
|
1373
|
+
let l = G("issue.comments"), u = jt(), d = G("common"), f = Ot(Qt), p = Z(), [m, h] = W(""), [g, _] = W(0), v = U(null), y = E(r, i), b = Y({
|
|
1377
1374
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/comments", {
|
|
1378
1375
|
params: { path: {
|
|
1379
1376
|
workspace: r,
|
|
@@ -1388,7 +1385,7 @@ function Xt({ workspace: r, identifier: i, parentId: a, publicOn: o, autofocus:
|
|
|
1388
1385
|
h(""), _((e) => e + 1), n(p, r, i), c?.();
|
|
1389
1386
|
}
|
|
1390
1387
|
}), x = () => m.trim() && !b.isPending && y.pending === 0 && b.mutate();
|
|
1391
|
-
return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
1388
|
+
return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(A, {
|
|
1392
1389
|
value: "",
|
|
1393
1390
|
onChange: h,
|
|
1394
1391
|
onSubmit: x,
|
|
@@ -1407,12 +1404,12 @@ function Xt({ workspace: r, identifier: i, parentId: a, publicOn: o, autofocus:
|
|
|
1407
1404
|
children: [
|
|
1408
1405
|
/* @__PURE__ */ J("span", {
|
|
1409
1406
|
className: "mr-auto flex min-w-0 items-center gap-2",
|
|
1410
|
-
children: [/* @__PURE__ */ q(
|
|
1407
|
+
children: [/* @__PURE__ */ q(C, { onFiles: (e) => y.upload(v.current, e) }), /* @__PURE__ */ q(T, {
|
|
1411
1408
|
pending: y.pending,
|
|
1412
1409
|
error: y.error
|
|
1413
1410
|
})]
|
|
1414
1411
|
}),
|
|
1415
|
-
b.isError && /* @__PURE__ */ q(
|
|
1412
|
+
b.isError && /* @__PURE__ */ q(_t, {
|
|
1416
1413
|
inline: !0,
|
|
1417
1414
|
className: "text-xs",
|
|
1418
1415
|
children: u(b.error)
|
|
@@ -1436,5 +1433,5 @@ function Xt({ workspace: r, identifier: i, parentId: a, publicOn: o, autofocus:
|
|
|
1436
1433
|
]
|
|
1437
1434
|
})] });
|
|
1438
1435
|
}
|
|
1439
|
-
var
|
|
1440
|
-
export {
|
|
1436
|
+
var Qt = Et(() => {});
|
|
1437
|
+
export { Ft as component };
|