@parallelworks/tandem-web 0.192.2 → 0.193.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/_virtual/_virtual_i18n/en/common.js +15 -3
- package/_virtual/_virtual_i18n/es/common.js +15 -3
- package/_virtual/_virtual_i18n/ja/common.js +15 -3
- package/_virtual/_virtual_i18n/ko/common.js +15 -3
- package/_virtual/_virtual_i18n/zh/common.js +15 -3
- package/components/DocIconPicker.js +17 -8
- package/components/DocLook.js +93 -68
- package/components/DocTable.js +67 -66
- package/components/DocsTree.js +182 -182
- package/components/IssueImport.js +95 -46
- package/components/IssueView.js +397 -397
- package/components/SubPages.js +60 -57
- package/components/SubpageViews.js +379 -365
- package/lib/docs.js +203 -133
- package/lib/menus.js +15 -1
- package/package.json +1 -1
- package/pages/issues.js +421 -455
- package/routes/_workspace/docs/_doc2.js +227 -227
- package/routes/_workspace/teams/_key/settings2.js +202 -196
- package/routes/_workspace2.js +157 -155
package/components/IssueView.js
CHANGED
|
@@ -4,33 +4,33 @@ import { areasQuery as i, attachmentsQuery as a, branchesQuery as o, commentsQue
|
|
|
4
4
|
import { assigneeKey as S, parseAssigneeKey as C, useAssigneeOptions as w } from "../lib/assignees.js";
|
|
5
5
|
import { actorAvatar as T } from "../lib/avatar.js";
|
|
6
6
|
import { branchName as E } from "../lib/branch.js";
|
|
7
|
-
import { caretColor as
|
|
8
|
-
import { useConfirm as
|
|
9
|
-
import { customFieldsQuery as
|
|
10
|
-
import { docRef as
|
|
11
|
-
import { issueURL as
|
|
12
|
-
import { issueTypesQuery as
|
|
13
|
-
import { useLinkedIssues as
|
|
14
|
-
import { useOthersOn as
|
|
15
|
-
import { copyItem as
|
|
7
|
+
import { caretColor as D, useCollabSession as O } from "../lib/collab.js";
|
|
8
|
+
import { useConfirm as k } from "../lib/confirm.js";
|
|
9
|
+
import { customFieldsQuery as A, hasValue as j } from "../lib/customFields.js";
|
|
10
|
+
import { docRef as M, useDocMenu as N } from "../lib/docs.js";
|
|
11
|
+
import { issueURL as P, useIssueMenu as ee } from "../lib/issueMenu.js";
|
|
12
|
+
import { issueTypesQuery as F, typeShows as te, typesFor as I } from "../lib/issueTypes.js";
|
|
13
|
+
import { useLinkedIssues as ne } from "../lib/linkedIssues.js";
|
|
14
|
+
import { useOthersOn as re, useReportLocation as ie } from "../lib/live.js";
|
|
15
|
+
import { copyItem as L, menuOpenerProps as ae } from "../lib/menus.js";
|
|
16
16
|
import { useReadIssueNotifications as oe } from "../lib/notifications.js";
|
|
17
|
-
import { connectorActor as
|
|
18
|
-
import { PickManyBox as
|
|
19
|
-
import { rememberPage as
|
|
20
|
-
import { issueScope as
|
|
21
|
-
import { Link as
|
|
22
|
-
import { useShortcuts as
|
|
23
|
-
import { useTime as
|
|
24
|
-
import { Timeline as
|
|
25
|
-
import { ActorLink as
|
|
26
|
-
import { AgentPage as
|
|
27
|
-
import { AgentWork as
|
|
28
|
-
import { AreaLink as
|
|
29
|
-
import { AttachButton as
|
|
30
|
-
import { CollabEditor as
|
|
31
|
-
import { CustomerRequests as
|
|
32
|
-
import { IssueFields as
|
|
33
|
-
import { Editor as
|
|
17
|
+
import { connectorActor as R, usePeople as z } from "../lib/people.js";
|
|
18
|
+
import { PickManyBox as se, usePickMany as ce } from "../lib/pickMany.js";
|
|
19
|
+
import { rememberPage as le } from "../lib/recent.js";
|
|
20
|
+
import { issueScope as ue, useCan as de } from "../lib/roles.js";
|
|
21
|
+
import { Link as fe, useNavigate as pe } from "../lib/router.js";
|
|
22
|
+
import { useShortcuts as me } from "../lib/shortcuts.js";
|
|
23
|
+
import { useTime as he } from "../lib/time.js";
|
|
24
|
+
import { Timeline as ge } from "./ActivityTimeline.js";
|
|
25
|
+
import { ActorLink as _e } from "./ActorLink.js";
|
|
26
|
+
import { AgentPage as ve } from "./AgentPage.js";
|
|
27
|
+
import { AgentWork as ye } from "./AgentWork.js";
|
|
28
|
+
import { AreaLink as be } from "./AreaLink.js";
|
|
29
|
+
import { AttachButton as xe, IssueAttachments as Se, UploadStatus as Ce, useAttachmentUpload as we } from "./Attachments.js";
|
|
30
|
+
import { CollabEditor as Te } from "./CollabEditor.js";
|
|
31
|
+
import { CustomerRequests as Ee } from "./CustomerRequests.js";
|
|
32
|
+
import { IssueFields as De } from "./CustomFields.js";
|
|
33
|
+
import { Editor as Oe } from "./Editor.js";
|
|
34
34
|
import { EntityIcon as ke } from "./EntityIcon.js";
|
|
35
35
|
import { FavoriteStar as Ae } from "./FavoriteStar.js";
|
|
36
36
|
import { IssueDesigns as je } from "./Figma.js";
|
|
@@ -52,16 +52,16 @@ import { SubscribeButton as ft } from "./SubscribeButton.js";
|
|
|
52
52
|
import { TriageBanner as pt } from "./TriageBanner.js";
|
|
53
53
|
import { TriageDecisions as mt } from "./TriageDecisions.js";
|
|
54
54
|
import { Widgets as ht } from "./Widgets.js";
|
|
55
|
-
import { Avatar as gt, Button as
|
|
56
|
-
import { createContext as
|
|
57
|
-
import { useErrorMessage as
|
|
58
|
-
import { useFormatter as
|
|
59
|
-
import { Fragment as
|
|
60
|
-
import { useMutation as
|
|
61
|
-
import { MoreButton as
|
|
62
|
-
import { ArchiveIcon as
|
|
55
|
+
import { Avatar as gt, Button as B, Callout as _t, Card as vt, Combobox as V, CopyButton as yt, DatePicker as bt, ErrorText as xt, IconButton as St, Kbd as Ct, RelativeTime as wt, Select as H, TitleInput as Tt, Tooltip as Et, buttonClasses as Dt, menuDivider as Ot, toast as kt, useOpenMenu as U } from "@parallelworks/ui";
|
|
56
|
+
import { createContext as At, useCallback as jt, useContext as Mt, useEffect as Nt, useMemo as Pt, useRef as W, useState as G } from "react";
|
|
57
|
+
import { useErrorMessage as Ft } from "@parallelworks/problem/react";
|
|
58
|
+
import { useFormatter as It, useTranslations as K } from "use-intl";
|
|
59
|
+
import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
60
|
+
import { useMutation as X, useQuery as Z, useQueryClient as Lt, useSuspenseQuery as Q } from "@tanstack/react-query";
|
|
61
|
+
import { MoreButton as Rt } from "@parallelworks/ui/list";
|
|
62
|
+
import { ArchiveIcon as zt } from "@parallelworks/ui/icons";
|
|
63
63
|
// src/components/IssueView.tsx
|
|
64
|
-
async function
|
|
64
|
+
async function Bt(e, t, n) {
|
|
65
65
|
let r = await e.ensureQueryData(p(t, n)), i = (await e.ensureQueryData(x(t))).find((e) => e.id === r.teamId)?.key;
|
|
66
66
|
await Promise.all([
|
|
67
67
|
e.ensureQueryData(s(t, n)),
|
|
@@ -76,14 +76,14 @@ async function Vt(e, t, n) {
|
|
|
76
76
|
i && e.ensureQueryData(b(t, i))
|
|
77
77
|
]);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
let u =
|
|
81
|
-
|
|
79
|
+
function Vt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s, onDecided: c, duplicateOf: l }) {
|
|
80
|
+
let u = K("issue"), d = he(), m = Ft(), g = K("common"), { data: _ } = Q(p(i, a)), { data: v } = Q(x(i)), { data: y } = Q(h), { data: b = [] } = Z(f(i, a)), [S, C] = G();
|
|
81
|
+
ie({
|
|
82
82
|
identifier: _.identifier,
|
|
83
83
|
...S && { field: S }
|
|
84
84
|
}), oe(i, _.identifier);
|
|
85
|
-
let w =
|
|
86
|
-
|
|
85
|
+
let w = pe(), T = E(_.identifier, _.title);
|
|
86
|
+
Nt(() => {
|
|
87
87
|
!o && !window.location.pathname.endsWith(`/issues/${T}`) && w({
|
|
88
88
|
to: "/$workspace/issues/$identifier",
|
|
89
89
|
params: {
|
|
@@ -101,21 +101,21 @@ function Ht({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s, onDecid
|
|
|
101
101
|
i,
|
|
102
102
|
_.identifier
|
|
103
103
|
]);
|
|
104
|
-
let
|
|
104
|
+
let D = de(i, "delete_issues", ue(_)), O = Lt(), { confirm: A, dialog: j } = k(), M = X({
|
|
105
105
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/restore", { params: { path: {
|
|
106
106
|
workspace: i,
|
|
107
107
|
identifier: _.identifier
|
|
108
108
|
} } })),
|
|
109
109
|
onSuccess: (e) => {
|
|
110
|
-
|
|
110
|
+
O.setQueryData(p(i, _.identifier).queryKey, e), n(O, i, _.identifier);
|
|
111
111
|
}
|
|
112
|
-
}),
|
|
112
|
+
}), N = X({
|
|
113
113
|
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}", { params: { path: {
|
|
114
114
|
workspace: i,
|
|
115
115
|
identifier: _.identifier
|
|
116
116
|
} } })),
|
|
117
117
|
onSuccess: () => {
|
|
118
|
-
kt.success(u("deleted", { identifier: _.identifier })), n(
|
|
118
|
+
kt.success(u("deleted", { identifier: _.identifier })), n(O, i);
|
|
119
119
|
let e = v.find((e) => e.id === _.teamId)?.key;
|
|
120
120
|
w(e ? {
|
|
121
121
|
to: "/$workspace/teams/$key/issues",
|
|
@@ -128,15 +128,15 @@ function Ht({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s, onDecid
|
|
|
128
128
|
params: { workspace: i }
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
}),
|
|
131
|
+
}), P = jt((e) => w({
|
|
132
132
|
to: "/$workspace/issues/$identifier",
|
|
133
133
|
params: {
|
|
134
134
|
workspace: i,
|
|
135
135
|
identifier: e
|
|
136
136
|
}
|
|
137
137
|
}), [w, i]);
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
ne(i, _.body, P), Nt(() => {
|
|
139
|
+
le(i, {
|
|
140
140
|
kind: "issue",
|
|
141
141
|
href: `/${i}/issues/${_.identifier}`,
|
|
142
142
|
label: `${_.identifier} ${_.title}`
|
|
@@ -146,59 +146,59 @@ function Ht({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s, onDecid
|
|
|
146
146
|
_.identifier,
|
|
147
147
|
_.title
|
|
148
148
|
]);
|
|
149
|
-
let
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
let F = re({ issue: _.identifier }, y?.user.username), te = W(_.triage);
|
|
150
|
+
Nt(() => {
|
|
151
|
+
te.current && !_.triage && s?.(_), te.current = _.triage;
|
|
152
152
|
}, [_, s]);
|
|
153
|
-
let
|
|
154
|
-
return
|
|
155
|
-
s: () =>
|
|
156
|
-
p: () =>
|
|
157
|
-
a: () =>
|
|
158
|
-
l: () =>
|
|
153
|
+
let I = v.find((e) => e.id === _.teamId), L = r(i, a), [ae, R] = G(null), z = U(), se = ee(i);
|
|
154
|
+
return me({
|
|
155
|
+
s: () => R("status"),
|
|
156
|
+
p: () => R("priority"),
|
|
157
|
+
a: () => R("assignees"),
|
|
158
|
+
l: () => R("labels"),
|
|
159
159
|
...!o && { Escape: () => w({
|
|
160
160
|
to: "/$workspace/issues",
|
|
161
161
|
params: { workspace: i }
|
|
162
162
|
}) }
|
|
163
|
-
},
|
|
163
|
+
}, ae === null), /* @__PURE__ */ Y("div", {
|
|
164
164
|
className: "flex h-full flex-col",
|
|
165
165
|
children: [
|
|
166
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ Y("header", {
|
|
167
167
|
className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-4 text-sm md:px-5",
|
|
168
|
-
onContextMenu: (e) =>
|
|
168
|
+
onContextMenu: (e) => z(e, se([_])),
|
|
169
169
|
children: [
|
|
170
|
-
o ? /* @__PURE__ */ q
|
|
170
|
+
o ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("span", {
|
|
171
171
|
className: "shrink-0 text-muted-foreground tabular-nums",
|
|
172
172
|
children: _.identifier
|
|
173
|
-
}), /* @__PURE__ */
|
|
173
|
+
}), /* @__PURE__ */ J("span", {
|
|
174
174
|
className: "min-w-0 truncate font-medium",
|
|
175
175
|
children: _.title
|
|
176
|
-
})] }) : /* @__PURE__ */ q
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
to:
|
|
176
|
+
})] }) : /* @__PURE__ */ Y(q, { children: [
|
|
177
|
+
/* @__PURE__ */ J(fe, {
|
|
178
|
+
to: I ? "/$workspace/teams/$key/issues" : "/$workspace/issues",
|
|
179
179
|
params: {
|
|
180
180
|
workspace: i,
|
|
181
|
-
key:
|
|
181
|
+
key: I?.key ?? ""
|
|
182
182
|
},
|
|
183
183
|
className: "text-muted-foreground hover:text-foreground",
|
|
184
|
-
children:
|
|
184
|
+
children: I?.name ?? u("issues")
|
|
185
185
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ J("span", {
|
|
187
187
|
className: "text-muted-foreground",
|
|
188
188
|
"aria-hidden": "true",
|
|
189
189
|
children: "/"
|
|
190
190
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ J("span", {
|
|
192
192
|
className: "shrink-0 font-medium whitespace-nowrap",
|
|
193
193
|
children: _.identifier
|
|
194
194
|
})
|
|
195
195
|
] }),
|
|
196
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ J(Ae, {
|
|
197
197
|
workspace: i,
|
|
198
198
|
kind: "issue",
|
|
199
199
|
target: _.id
|
|
200
200
|
}),
|
|
201
|
-
o && _.triage && /* @__PURE__ */
|
|
201
|
+
o && _.triage && /* @__PURE__ */ J(mt, {
|
|
202
202
|
workspace: i,
|
|
203
203
|
issue: _,
|
|
204
204
|
icons: !0,
|
|
@@ -206,41 +206,41 @@ function Ht({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s, onDecid
|
|
|
206
206
|
duplicateOf: l,
|
|
207
207
|
onDecided: c
|
|
208
208
|
}),
|
|
209
|
-
!o && /* @__PURE__ */
|
|
209
|
+
!o && /* @__PURE__ */ J(ft, {
|
|
210
210
|
workspace: i,
|
|
211
211
|
identifier: _.identifier
|
|
212
212
|
}),
|
|
213
|
-
!o && /* @__PURE__ */
|
|
213
|
+
!o && /* @__PURE__ */ J(yt, {
|
|
214
214
|
text: E(_.identifier, _.title),
|
|
215
215
|
label: u("branchName"),
|
|
216
|
-
icon: /* @__PURE__ */
|
|
216
|
+
icon: /* @__PURE__ */ J(Ge, {}),
|
|
217
217
|
size: "sm",
|
|
218
218
|
variant: "ghost",
|
|
219
219
|
success: u("copiedBranchName", { name: E(_.identifier, _.title) }),
|
|
220
220
|
failure: u("copyFailed"),
|
|
221
221
|
className: "max-sm:hidden"
|
|
222
222
|
}),
|
|
223
|
-
!o && /* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */
|
|
223
|
+
!o && /* @__PURE__ */ J(Me, { links: b }),
|
|
224
|
+
/* @__PURE__ */ Y("span", {
|
|
225
225
|
className: "ml-auto flex items-center gap-3",
|
|
226
226
|
children: [
|
|
227
|
-
|
|
227
|
+
L.isPending && /* @__PURE__ */ J("span", {
|
|
228
228
|
className: "text-xs text-muted-foreground",
|
|
229
229
|
children: g("saving")
|
|
230
230
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ J(lt, {
|
|
232
232
|
workspace: i,
|
|
233
|
-
others:
|
|
233
|
+
others: F
|
|
234
234
|
}),
|
|
235
|
-
/* @__PURE__ */
|
|
236
|
-
items: () => [...
|
|
235
|
+
/* @__PURE__ */ J(Rt, {
|
|
236
|
+
items: () => [...se([_]), ...D ? [{
|
|
237
237
|
label: u("deleteIssue"),
|
|
238
238
|
destructive: !0,
|
|
239
|
-
onClick: () =>
|
|
239
|
+
onClick: () => A({
|
|
240
240
|
title: u("deleteTitle", { identifier: _.identifier }),
|
|
241
241
|
description: u("deleteDescription"),
|
|
242
242
|
confirmLabel: u("deleteIssue"),
|
|
243
|
-
onConfirm: () =>
|
|
243
|
+
onConfirm: () => N.mutateAsync()
|
|
244
244
|
})
|
|
245
245
|
}] : []],
|
|
246
246
|
label: g("moreActionsFor", { name: _.identifier }),
|
|
@@ -248,136 +248,136 @@ function Ht({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s, onDecid
|
|
|
248
248
|
})
|
|
249
249
|
]
|
|
250
250
|
}),
|
|
251
|
-
|
|
251
|
+
L.isError && /* @__PURE__ */ J(xt, {
|
|
252
252
|
inline: !0,
|
|
253
253
|
className: "ml-auto text-xs",
|
|
254
|
-
children: m(
|
|
254
|
+
children: m(L.error)
|
|
255
255
|
})
|
|
256
256
|
]
|
|
257
257
|
}),
|
|
258
|
-
|
|
259
|
-
/* @__PURE__ */
|
|
258
|
+
j,
|
|
259
|
+
/* @__PURE__ */ Y("div", {
|
|
260
260
|
className: "flex min-h-0 flex-1 flex-col overflow-y-auto md:flex-row md:overflow-hidden",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
261
|
+
children: [/* @__PURE__ */ J("div", {
|
|
262
262
|
className: "min-w-0 px-4 md:flex-1 md:overflow-y-auto md:px-8",
|
|
263
|
-
children: /* @__PURE__ */
|
|
263
|
+
children: /* @__PURE__ */ Y("article", {
|
|
264
264
|
className: "mx-auto w-full max-w-reading pt-6 pb-24 md:pt-8",
|
|
265
265
|
children: [
|
|
266
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ Y(sn.Provider, {
|
|
267
267
|
value: C,
|
|
268
268
|
children: [
|
|
269
|
-
_.triage && !o && /* @__PURE__ */
|
|
269
|
+
_.triage && !o && /* @__PURE__ */ J(pt, {
|
|
270
270
|
workspace: i,
|
|
271
271
|
issue: _
|
|
272
272
|
}),
|
|
273
|
-
o && /* @__PURE__ */
|
|
274
|
-
_.archivedAt && /* @__PURE__ */
|
|
273
|
+
o && /* @__PURE__ */ J(Pe, { links: b }),
|
|
274
|
+
_.archivedAt && /* @__PURE__ */ J(_t, {
|
|
275
275
|
tone: "muted",
|
|
276
|
-
icon: /* @__PURE__ */
|
|
276
|
+
icon: /* @__PURE__ */ J(zt, {}),
|
|
277
277
|
className: "mb-5",
|
|
278
|
-
children: /* @__PURE__ */
|
|
278
|
+
children: /* @__PURE__ */ Y("span", {
|
|
279
279
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
280
|
-
children: [u("archivedNote", { when: d.day(_.archivedAt.slice(0, 10)) }), /* @__PURE__ */
|
|
280
|
+
children: [u("archivedNote", { when: d.day(_.archivedAt.slice(0, 10)) }), /* @__PURE__ */ J(B, {
|
|
281
281
|
type: "button",
|
|
282
282
|
size: "sm",
|
|
283
|
-
onClick: () =>
|
|
284
|
-
loading:
|
|
283
|
+
onClick: () => M.mutate(),
|
|
284
|
+
loading: M.isPending,
|
|
285
285
|
children: u("restore")
|
|
286
286
|
})]
|
|
287
287
|
})
|
|
288
288
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ J(Ht, {
|
|
290
290
|
issue: _,
|
|
291
|
-
onSave: (e) =>
|
|
291
|
+
onSave: (e) => L.mutate({ title: e })
|
|
292
292
|
}),
|
|
293
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ J(ct, {
|
|
294
294
|
workspace: i,
|
|
295
|
-
others:
|
|
295
|
+
others: F,
|
|
296
296
|
field: "title"
|
|
297
297
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ J(Ut, {
|
|
299
299
|
workspace: i,
|
|
300
300
|
issue: _
|
|
301
301
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ J(ct, {
|
|
303
303
|
workspace: i,
|
|
304
|
-
others:
|
|
304
|
+
others: F,
|
|
305
305
|
field: "body"
|
|
306
306
|
}),
|
|
307
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ J(Be, {
|
|
308
308
|
workspace: i,
|
|
309
309
|
issue: _
|
|
310
310
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ J(Ee, {
|
|
312
312
|
workspace: i,
|
|
313
313
|
identifier: _.identifier,
|
|
314
|
-
enabled: !!
|
|
314
|
+
enabled: !!I?.customerRequestsEnabled
|
|
315
315
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ J(Wt, {
|
|
317
317
|
workspace: i,
|
|
318
318
|
identifier: a
|
|
319
319
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ J(je, {
|
|
321
321
|
workspace: i,
|
|
322
322
|
identifier: a
|
|
323
323
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ J(Ie, {
|
|
325
325
|
workspace: i,
|
|
326
326
|
identifier: a,
|
|
327
327
|
title: _.title
|
|
328
328
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ J(Ue, {
|
|
330
330
|
workspace: i,
|
|
331
331
|
identifier: a
|
|
332
332
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ J(Ve, {
|
|
334
334
|
workspace: i,
|
|
335
335
|
identifier: a
|
|
336
336
|
}),
|
|
337
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ J(Re, {
|
|
338
338
|
workspace: i,
|
|
339
339
|
identifier: a
|
|
340
340
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ J(ye, {
|
|
342
342
|
workspace: i,
|
|
343
343
|
identifier: a
|
|
344
344
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ J(en, {
|
|
346
346
|
workspace: i,
|
|
347
347
|
identifier: a,
|
|
348
|
-
others:
|
|
348
|
+
others: F
|
|
349
349
|
})
|
|
350
350
|
]
|
|
351
351
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ J($t, {
|
|
353
353
|
workspace: i,
|
|
354
354
|
identifier: a
|
|
355
355
|
}),
|
|
356
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ J(Se, {
|
|
357
357
|
workspace: i,
|
|
358
358
|
identifier: a
|
|
359
359
|
})
|
|
360
360
|
]
|
|
361
361
|
})
|
|
362
|
-
}), /* @__PURE__ */
|
|
362
|
+
}), /* @__PURE__ */ J(Gt, {
|
|
363
363
|
workspace: i,
|
|
364
364
|
issue: _,
|
|
365
|
-
team:
|
|
366
|
-
open:
|
|
367
|
-
setOpen:
|
|
368
|
-
update: (e) =>
|
|
365
|
+
team: I,
|
|
366
|
+
open: ae,
|
|
367
|
+
setOpen: R,
|
|
368
|
+
update: (e) => L.mutate(e),
|
|
369
369
|
compact: o
|
|
370
370
|
})]
|
|
371
371
|
})
|
|
372
372
|
]
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
let n =
|
|
377
|
-
return /* @__PURE__ */ q
|
|
375
|
+
function Ht({ issue: e, onSave: t }) {
|
|
376
|
+
let n = K("issue"), r = Mt(sn);
|
|
377
|
+
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("h1", {
|
|
378
378
|
className: "sr-only",
|
|
379
379
|
children: e.title
|
|
380
|
-
}), /* @__PURE__ */
|
|
380
|
+
}), /* @__PURE__ */ J(Tt, {
|
|
381
381
|
value: e.title,
|
|
382
382
|
onCommit: t,
|
|
383
383
|
onFocus: () => r("title"),
|
|
@@ -385,24 +385,24 @@ function Ut({ issue: e, onSave: t }) {
|
|
|
385
385
|
"aria-label": n("title")
|
|
386
386
|
})] });
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
let n =
|
|
388
|
+
function Ut({ workspace: e, issue: t }) {
|
|
389
|
+
let n = K("issue"), r = K("common"), i = Mt(sn), { data: a } = Q(h), o = W(null), s = Pt(() => ({
|
|
390
390
|
name: a?.user.name ?? n("someone"),
|
|
391
|
-
color:
|
|
391
|
+
color: D(a?.user.username ?? "")
|
|
392
392
|
}), [
|
|
393
393
|
a?.user.name,
|
|
394
394
|
a?.user.username,
|
|
395
395
|
n
|
|
396
|
-
]), { session: c, error: l } =
|
|
396
|
+
]), { session: c, error: l } = O({
|
|
397
397
|
workspace: e,
|
|
398
398
|
target: { issue: t.identifier },
|
|
399
399
|
user: s,
|
|
400
400
|
getMarkdown: o
|
|
401
|
-
}), u =
|
|
402
|
-
return /* @__PURE__ */
|
|
401
|
+
}), u = W(null), d = we(e, t.identifier), { data: f = [] } = Z(v(e, t.identifier)), p = de(e, "comment", ue(t));
|
|
402
|
+
return /* @__PURE__ */ Y("div", {
|
|
403
403
|
className: "group mt-4 min-h-32",
|
|
404
404
|
children: [
|
|
405
|
-
c ? /* @__PURE__ */
|
|
405
|
+
c ? /* @__PURE__ */ J(Te, {
|
|
406
406
|
session: c,
|
|
407
407
|
user: s,
|
|
408
408
|
getMarkdown: o,
|
|
@@ -415,23 +415,23 @@ function Wt({ workspace: e, issue: t }) {
|
|
|
415
415
|
placeholder: n("addDescription"),
|
|
416
416
|
label: r("description"),
|
|
417
417
|
className: "min-h-32"
|
|
418
|
-
}, `${c.generation}:${c.doc.guid}`) : /* @__PURE__ */
|
|
418
|
+
}, `${c.generation}:${c.doc.guid}`) : /* @__PURE__ */ J(Oe, {
|
|
419
419
|
value: t.body,
|
|
420
420
|
editable: !1,
|
|
421
421
|
className: "min-h-32"
|
|
422
422
|
}),
|
|
423
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ J(xt, {
|
|
424
424
|
className: "mt-1",
|
|
425
425
|
children: l
|
|
426
426
|
}),
|
|
427
|
-
c && /* @__PURE__ */
|
|
427
|
+
c && /* @__PURE__ */ Y("div", {
|
|
428
428
|
className: "mt-1 flex items-center justify-end gap-2",
|
|
429
|
-
children: [/* @__PURE__ */
|
|
429
|
+
children: [/* @__PURE__ */ J(Ce, {
|
|
430
430
|
pending: d.pending,
|
|
431
431
|
error: d.error
|
|
432
|
-
}), /* @__PURE__ */
|
|
432
|
+
}), /* @__PURE__ */ J(xe, { onFiles: (e) => d.upload(u.current, e) })]
|
|
433
433
|
}),
|
|
434
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ J(ut, {
|
|
435
435
|
workspace: e,
|
|
436
436
|
identifier: t.identifier,
|
|
437
437
|
reactions: f,
|
|
@@ -441,25 +441,25 @@ function Wt({ workspace: e, issue: t }) {
|
|
|
441
441
|
]
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
|
-
function
|
|
445
|
-
let n =
|
|
446
|
-
return r.length === 0 ? null : /* @__PURE__ */
|
|
444
|
+
function Wt({ workspace: e, identifier: t }) {
|
|
445
|
+
let n = K("issue"), { data: r } = Q(d(e, t)), i = U(), a = N(e);
|
|
446
|
+
return r.length === 0 ? null : /* @__PURE__ */ Y("section", {
|
|
447
447
|
className: "mt-6",
|
|
448
448
|
"aria-label": n("docs"),
|
|
449
|
-
children: [/* @__PURE__ */
|
|
449
|
+
children: [/* @__PURE__ */ J("h2", {
|
|
450
450
|
className: "text-xs font-medium text-muted-foreground",
|
|
451
451
|
children: n("docs")
|
|
452
|
-
}), /* @__PURE__ */
|
|
452
|
+
}), /* @__PURE__ */ J("ul", {
|
|
453
453
|
className: "mt-1 flex flex-wrap gap-1.5",
|
|
454
|
-
children: r.map((t) => /* @__PURE__ */
|
|
454
|
+
children: r.map((t) => /* @__PURE__ */ J("li", { children: /* @__PURE__ */ Y(fe, {
|
|
455
455
|
to: "/$workspace/docs/$doc",
|
|
456
456
|
params: {
|
|
457
457
|
workspace: e,
|
|
458
|
-
doc:
|
|
458
|
+
doc: M(t)
|
|
459
459
|
},
|
|
460
|
-
|
|
460
|
+
...ae(i, () => a(t)),
|
|
461
461
|
className: `${Dt({ size: "sm" })} max-w-72`,
|
|
462
|
-
children: [/* @__PURE__ */
|
|
462
|
+
children: [/* @__PURE__ */ J(Xe, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
|
|
463
463
|
className: "truncate",
|
|
464
464
|
children: t.title
|
|
465
465
|
})]
|
|
@@ -467,58 +467,58 @@ function Gt({ workspace: e, identifier: t }) {
|
|
|
467
467
|
})]
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
let l =
|
|
470
|
+
function Gt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, compact: c = !1 }) {
|
|
471
|
+
let l = K("relations"), u = i?.key, d = K("issue.properties"), p = K("common"), h = tt(), { data: g = [] } = Z({
|
|
472
472
|
...b(n, u ?? ""),
|
|
473
473
|
enabled: !!u
|
|
474
|
-
}), { data: _ = [] } =
|
|
474
|
+
}), { data: _ = [] } = Z(m(n)), { data: v = [] } = Z(f(n, r.identifier)), { nameOf: y, actorName: x, avatarOf: E } = z(n), D = Lt(), O = X({
|
|
475
475
|
mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/labels", {
|
|
476
476
|
params: { path: { workspace: n } },
|
|
477
477
|
body: {
|
|
478
478
|
name: r,
|
|
479
|
-
color:
|
|
479
|
+
color: Kt[_.length % Kt.length] ?? "#d73a4a"
|
|
480
480
|
}
|
|
481
481
|
})),
|
|
482
482
|
onSuccess: (e) => {
|
|
483
|
-
|
|
483
|
+
D.invalidateQueries({ queryKey: m(n).queryKey }), s({ addLabels: [e.id] });
|
|
484
484
|
}
|
|
485
|
-
}),
|
|
486
|
-
e.stopPropagation(),
|
|
485
|
+
}), k = r.assignees.map(S), A = w(n, !0), j = (e) => (t) => o(t ? e : null), M = ce(a === "assignees", () => o(null)), N = ce(a === "labels", () => o(null)), P = "flex h-8 w-full items-center gap-2 rounded-md px-2 text-sm hover:bg-muted", F = U(), te = ee(n), I = pe(), ne = (e, t) => {
|
|
486
|
+
e.stopPropagation(), F(e, t);
|
|
487
487
|
};
|
|
488
|
-
return /* @__PURE__ */
|
|
488
|
+
return /* @__PURE__ */ J("aside", {
|
|
489
489
|
className: c ? "order-first flex shrink-0 flex-col gap-0.5 border-b border-border px-3 py-4 md:order-none md:w-64 md:overflow-y-auto md:border-b-0 md:border-l" : "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",
|
|
490
490
|
"aria-label": d("title"),
|
|
491
|
-
onContextMenu: (e) =>
|
|
492
|
-
children: /* @__PURE__ */
|
|
491
|
+
onContextMenu: (e) => F(e, te([r])),
|
|
492
|
+
children: /* @__PURE__ */ Y(Xt.Provider, {
|
|
493
493
|
value: c,
|
|
494
494
|
children: [
|
|
495
|
-
c && i && /* @__PURE__ */
|
|
495
|
+
c && i && /* @__PURE__ */ J($, {
|
|
496
496
|
label: d("team"),
|
|
497
497
|
slot: "team",
|
|
498
|
-
children: /* @__PURE__ */
|
|
499
|
-
className:
|
|
500
|
-
children: [/* @__PURE__ */
|
|
498
|
+
children: /* @__PURE__ */ Y("span", {
|
|
499
|
+
className: P,
|
|
500
|
+
children: [/* @__PURE__ */ J(ke, {
|
|
501
501
|
icon: i.icon,
|
|
502
502
|
name: i.name,
|
|
503
503
|
className: "size-4"
|
|
504
|
-
}), /* @__PURE__ */
|
|
504
|
+
}), /* @__PURE__ */ J("span", {
|
|
505
505
|
className: "truncate",
|
|
506
506
|
children: i.name
|
|
507
507
|
})]
|
|
508
508
|
})
|
|
509
509
|
}),
|
|
510
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ J($, {
|
|
511
511
|
label: p("status"),
|
|
512
512
|
shortcut: "S",
|
|
513
513
|
slot: "status",
|
|
514
|
-
children: /* @__PURE__ */
|
|
514
|
+
children: /* @__PURE__ */ J(V, {
|
|
515
515
|
"aria-label": p("status"),
|
|
516
516
|
open: a === "status",
|
|
517
|
-
onOpenChange:
|
|
517
|
+
onOpenChange: j("status"),
|
|
518
518
|
items: g.map((e) => ({
|
|
519
519
|
value: e.id,
|
|
520
520
|
label: e.name,
|
|
521
|
-
icon: /* @__PURE__ */
|
|
521
|
+
icon: /* @__PURE__ */ J(et, {
|
|
522
522
|
category: e.category,
|
|
523
523
|
review: e.review,
|
|
524
524
|
step: e.step
|
|
@@ -527,10 +527,10 @@ function Kt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
|
|
|
527
527
|
value: r.status.id,
|
|
528
528
|
onValueChange: (e) => e !== null && e !== r.status.id && s({ statusId: e }),
|
|
529
529
|
placeholder: d("changeStatus"),
|
|
530
|
-
trigger: /* @__PURE__ */
|
|
530
|
+
trigger: /* @__PURE__ */ Y("button", {
|
|
531
531
|
type: "button",
|
|
532
|
-
className:
|
|
533
|
-
children: [/* @__PURE__ */
|
|
532
|
+
className: P,
|
|
533
|
+
children: [/* @__PURE__ */ J(et, {
|
|
534
534
|
category: r.status.category,
|
|
535
535
|
review: r.status.review,
|
|
536
536
|
step: r.status.step
|
|
@@ -538,20 +538,20 @@ function Kt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
|
|
|
538
538
|
})
|
|
539
539
|
})
|
|
540
540
|
}),
|
|
541
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ J(Yt, {
|
|
542
542
|
workspace: n,
|
|
543
543
|
issue: r,
|
|
544
544
|
update: s,
|
|
545
|
-
row:
|
|
545
|
+
row: P
|
|
546
546
|
}),
|
|
547
|
-
/* @__PURE__ */
|
|
547
|
+
/* @__PURE__ */ J($, {
|
|
548
548
|
label: p("priority"),
|
|
549
549
|
shortcut: "P",
|
|
550
550
|
slot: "priority",
|
|
551
|
-
children: /* @__PURE__ */
|
|
551
|
+
children: /* @__PURE__ */ J(V, {
|
|
552
552
|
"aria-label": p("priority"),
|
|
553
553
|
open: a === "priority",
|
|
554
|
-
onOpenChange:
|
|
554
|
+
onOpenChange: j("priority"),
|
|
555
555
|
items: [
|
|
556
556
|
1,
|
|
557
557
|
2,
|
|
@@ -561,47 +561,47 @@ function Kt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
|
|
|
561
561
|
].map((e) => ({
|
|
562
562
|
value: String(e),
|
|
563
563
|
label: h[e] ?? "",
|
|
564
|
-
icon: /* @__PURE__ */
|
|
564
|
+
icon: /* @__PURE__ */ J(Qe, { priority: e })
|
|
565
565
|
})),
|
|
566
566
|
value: String(r.priority),
|
|
567
567
|
onValueChange: (e) => e !== null && s({ priority: Number(e) }),
|
|
568
568
|
placeholder: d("setPriority"),
|
|
569
|
-
trigger: /* @__PURE__ */
|
|
569
|
+
trigger: /* @__PURE__ */ Y("button", {
|
|
570
570
|
type: "button",
|
|
571
|
-
className:
|
|
572
|
-
children: [/* @__PURE__ */
|
|
571
|
+
className: P,
|
|
572
|
+
children: [/* @__PURE__ */ J(Qe, { priority: r.priority }), h[r.priority]]
|
|
573
573
|
})
|
|
574
574
|
})
|
|
575
575
|
}),
|
|
576
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ J($, {
|
|
577
577
|
label: d("assignees"),
|
|
578
578
|
shortcut: "A",
|
|
579
579
|
slot: "assignees",
|
|
580
|
-
children: /* @__PURE__ */
|
|
580
|
+
children: /* @__PURE__ */ J(V, {
|
|
581
581
|
"aria-label": d("assignees"),
|
|
582
582
|
multiple: !0,
|
|
583
583
|
open: a === "assignees",
|
|
584
|
-
onOpenChange:
|
|
585
|
-
items:
|
|
586
|
-
value:
|
|
584
|
+
onOpenChange: j("assignees"),
|
|
585
|
+
items: A,
|
|
586
|
+
value: k,
|
|
587
587
|
onValueChange: (e) => {
|
|
588
|
-
let t = e.filter((e) => !
|
|
588
|
+
let t = e.filter((e) => !k.includes(e)), n = k.filter((t) => !e.includes(t));
|
|
589
589
|
s({
|
|
590
590
|
...t.length > 0 && { addAssignees: t.map(C) },
|
|
591
591
|
...n.length > 0 && { removeAssignees: n.map(C) }
|
|
592
|
-
}),
|
|
592
|
+
}), M();
|
|
593
593
|
},
|
|
594
594
|
placeholder: d("assignTo"),
|
|
595
|
-
trigger: /* @__PURE__ */
|
|
595
|
+
trigger: /* @__PURE__ */ Y("button", {
|
|
596
596
|
type: "button",
|
|
597
|
-
className: `${
|
|
598
|
-
children: [r.assignees.length === 0 && /* @__PURE__ */
|
|
597
|
+
className: `${P} h-auto min-h-8 flex-wrap py-1`,
|
|
598
|
+
children: [r.assignees.length === 0 && /* @__PURE__ */ J("span", {
|
|
599
599
|
className: "text-muted-foreground",
|
|
600
600
|
children: d("unassigned")
|
|
601
601
|
}), r.assignees.map((e) => {
|
|
602
602
|
let t = y(e.kind, e.handle);
|
|
603
|
-
return /* @__PURE__ */
|
|
604
|
-
onContextMenu: (r) =>
|
|
603
|
+
return /* @__PURE__ */ J("span", {
|
|
604
|
+
onContextMenu: (r) => ne(r, [{
|
|
605
605
|
label: d("unassign", { name: t }),
|
|
606
606
|
onClick: () => s({ removeAssignees: [{
|
|
607
607
|
kind: e.kind,
|
|
@@ -609,7 +609,7 @@ function Kt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
|
|
|
609
609
|
}] })
|
|
610
610
|
}, {
|
|
611
611
|
label: d("viewTheirIssues"),
|
|
612
|
-
onClick: () =>
|
|
612
|
+
onClick: () => I({
|
|
613
613
|
to: "/$workspace/issues",
|
|
614
614
|
params: { workspace: n },
|
|
615
615
|
search: {
|
|
@@ -619,12 +619,12 @@ function Kt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
|
|
|
619
619
|
})
|
|
620
620
|
}]),
|
|
621
621
|
className: "flex items-center gap-1.5",
|
|
622
|
-
children: /* @__PURE__ */
|
|
622
|
+
children: /* @__PURE__ */ Y(nt, {
|
|
623
623
|
workspace: n,
|
|
624
624
|
kind: e.kind,
|
|
625
625
|
handle: e.handle,
|
|
626
626
|
className: "flex items-center gap-1.5",
|
|
627
|
-
children: [/* @__PURE__ */
|
|
627
|
+
children: [/* @__PURE__ */ J(gt, {
|
|
628
628
|
...T(e.kind),
|
|
629
629
|
name: t,
|
|
630
630
|
src: E(e.kind, e.handle),
|
|
@@ -637,21 +637,21 @@ function Kt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
|
|
|
637
637
|
})
|
|
638
638
|
})
|
|
639
639
|
}),
|
|
640
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ J($, {
|
|
641
641
|
label: p("labels"),
|
|
642
642
|
shortcut: "L",
|
|
643
643
|
slot: "labels",
|
|
644
|
-
children: /* @__PURE__ */
|
|
644
|
+
children: /* @__PURE__ */ J(V, {
|
|
645
645
|
"aria-label": p("labels"),
|
|
646
646
|
multiple: !0,
|
|
647
647
|
open: a === "labels",
|
|
648
|
-
onOpenChange:
|
|
648
|
+
onOpenChange: j("labels"),
|
|
649
649
|
items: _.map((e) => ({
|
|
650
650
|
value: e.id,
|
|
651
651
|
label: e.name,
|
|
652
|
-
icon: /* @__PURE__ */
|
|
652
|
+
icon: /* @__PURE__ */ Y("span", {
|
|
653
653
|
className: "flex items-center gap-2",
|
|
654
|
-
children: [/* @__PURE__ */
|
|
654
|
+
children: [/* @__PURE__ */ J(se, {}), /* @__PURE__ */ J("span", {
|
|
655
655
|
className: "size-2.5 rounded-full",
|
|
656
656
|
style: { background: e.color }
|
|
657
657
|
})]
|
|
@@ -659,28 +659,28 @@ function Kt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
|
|
|
659
659
|
})),
|
|
660
660
|
value: r.labels.map((e) => e.id),
|
|
661
661
|
onValueChange: (e) => {
|
|
662
|
-
|
|
662
|
+
N();
|
|
663
663
|
let t = r.labels.map((e) => e.id), n = e.filter((e) => !t.includes(e)), i = t.filter((t) => !e.includes(t));
|
|
664
664
|
s({
|
|
665
665
|
...n.length > 0 && { addLabels: n },
|
|
666
666
|
...i.length > 0 && { removeLabels: i }
|
|
667
667
|
});
|
|
668
668
|
},
|
|
669
|
-
onCreate: (e) =>
|
|
669
|
+
onCreate: (e) => O.mutate(e),
|
|
670
670
|
placeholder: d("addLabels"),
|
|
671
|
-
trigger: /* @__PURE__ */
|
|
671
|
+
trigger: /* @__PURE__ */ Y("button", {
|
|
672
672
|
type: "button",
|
|
673
|
-
className: `${
|
|
674
|
-
children: [r.labels.length === 0 && /* @__PURE__ */
|
|
673
|
+
className: `${P} h-auto min-h-8 flex-wrap py-1`,
|
|
674
|
+
children: [r.labels.length === 0 && /* @__PURE__ */ J("span", {
|
|
675
675
|
className: "text-muted-foreground",
|
|
676
676
|
children: d("noLabels")
|
|
677
|
-
}), r.labels.map((e) => /* @__PURE__ */
|
|
678
|
-
onContextMenu: (t) =>
|
|
677
|
+
}), r.labels.map((e) => /* @__PURE__ */ Y("span", {
|
|
678
|
+
onContextMenu: (t) => ne(t, [{
|
|
679
679
|
label: d("removeLabel", { name: e.name }),
|
|
680
680
|
onClick: () => s({ removeLabels: [e.id] })
|
|
681
681
|
}, {
|
|
682
682
|
label: d("viewLabelIssues"),
|
|
683
|
-
onClick: () =>
|
|
683
|
+
onClick: () => I({
|
|
684
684
|
to: "/$workspace/issues",
|
|
685
685
|
params: { workspace: n },
|
|
686
686
|
search: { label: e.name }
|
|
@@ -688,10 +688,10 @@ function Kt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
|
|
|
688
688
|
}]),
|
|
689
689
|
title: e.name,
|
|
690
690
|
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",
|
|
691
|
-
children: [/* @__PURE__ */
|
|
691
|
+
children: [/* @__PURE__ */ J("span", {
|
|
692
692
|
className: "size-2 shrink-0 rounded-full",
|
|
693
693
|
style: { background: e.color }
|
|
694
|
-
}), /* @__PURE__ */
|
|
694
|
+
}), /* @__PURE__ */ J("span", {
|
|
695
695
|
className: "truncate",
|
|
696
696
|
children: e.name
|
|
697
697
|
})]
|
|
@@ -699,66 +699,66 @@ function Kt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
|
|
|
699
699
|
})
|
|
700
700
|
})
|
|
701
701
|
}),
|
|
702
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ J($, {
|
|
703
703
|
label: l("parent"),
|
|
704
|
-
children: /* @__PURE__ */
|
|
704
|
+
children: /* @__PURE__ */ J(ze, {
|
|
705
705
|
workspace: n,
|
|
706
706
|
issue: r,
|
|
707
|
-
row:
|
|
707
|
+
row: P
|
|
708
708
|
})
|
|
709
709
|
}),
|
|
710
|
-
/* @__PURE__ */
|
|
710
|
+
/* @__PURE__ */ J(Jt, {
|
|
711
711
|
workspace: n,
|
|
712
712
|
issue: r,
|
|
713
713
|
team: i,
|
|
714
714
|
update: s,
|
|
715
|
-
row:
|
|
715
|
+
row: P
|
|
716
716
|
}),
|
|
717
|
-
/* @__PURE__ */
|
|
717
|
+
/* @__PURE__ */ J($, {
|
|
718
718
|
label: d("created"),
|
|
719
|
-
children: /* @__PURE__ */
|
|
719
|
+
children: /* @__PURE__ */ Y("p", {
|
|
720
720
|
className: "flex items-center gap-2 px-2 text-sm",
|
|
721
|
-
children: [/* @__PURE__ */
|
|
721
|
+
children: [/* @__PURE__ */ J(nt, {
|
|
722
722
|
workspace: n,
|
|
723
723
|
kind: r.creator.kind,
|
|
724
724
|
handle: r.creator.handle,
|
|
725
|
-
children: /* @__PURE__ */
|
|
725
|
+
children: /* @__PURE__ */ J(gt, {
|
|
726
726
|
...T(r.creator.kind),
|
|
727
727
|
name: x(r.creator),
|
|
728
728
|
src: E(r.creator.kind, r.creator.handle),
|
|
729
729
|
size: "xs",
|
|
730
730
|
tooltip: r.creator.kind !== "user"
|
|
731
731
|
})
|
|
732
|
-
}), /* @__PURE__ */
|
|
732
|
+
}), /* @__PURE__ */ J(wt, {
|
|
733
733
|
value: r.createdAt,
|
|
734
734
|
exact: "medium"
|
|
735
735
|
})]
|
|
736
736
|
})
|
|
737
737
|
}),
|
|
738
|
-
/* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ J($, {
|
|
739
739
|
label: d("timeInStatus"),
|
|
740
|
-
children: /* @__PURE__ */
|
|
740
|
+
children: /* @__PURE__ */ J(dt, {
|
|
741
741
|
workspace: n,
|
|
742
742
|
identifier: r.identifier
|
|
743
743
|
})
|
|
744
744
|
}),
|
|
745
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ J(De, {
|
|
746
746
|
workspace: n,
|
|
747
747
|
issue: r,
|
|
748
|
-
label: (e, t, n) => /* @__PURE__ */
|
|
748
|
+
label: (e, t, n) => /* @__PURE__ */ J($, {
|
|
749
749
|
label: e,
|
|
750
750
|
children: t
|
|
751
751
|
}, n)
|
|
752
752
|
}),
|
|
753
|
-
v.length > 0 && /* @__PURE__ */
|
|
753
|
+
v.length > 0 && /* @__PURE__ */ J($, {
|
|
754
754
|
label: d("syncedWith"),
|
|
755
|
-
children: /* @__PURE__ */
|
|
755
|
+
children: /* @__PURE__ */ J(Ne, { links: v })
|
|
756
756
|
})
|
|
757
757
|
]
|
|
758
758
|
})
|
|
759
759
|
});
|
|
760
760
|
}
|
|
761
|
-
var
|
|
761
|
+
var Kt = [
|
|
762
762
|
"#d73a4a",
|
|
763
763
|
"#2f8a57",
|
|
764
764
|
"#8250df",
|
|
@@ -767,60 +767,60 @@ var qt = [
|
|
|
767
767
|
"#57606a",
|
|
768
768
|
"#1a7f37"
|
|
769
769
|
];
|
|
770
|
-
function
|
|
770
|
+
function qt({ workspace: e, origin: t, className: n }) {
|
|
771
771
|
let r = "size-3.5 shrink-0 text-muted-foreground", i = t.title.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
|
|
772
772
|
switch (t.kind) {
|
|
773
|
-
case "decision": return /* @__PURE__ */
|
|
773
|
+
case "decision": return /* @__PURE__ */ Y(fe, {
|
|
774
774
|
to: "/$workspace/issues/$identifier",
|
|
775
775
|
params: {
|
|
776
776
|
workspace: e,
|
|
777
777
|
identifier: t.key
|
|
778
778
|
},
|
|
779
779
|
className: n,
|
|
780
|
-
children: [/* @__PURE__ */
|
|
780
|
+
children: [/* @__PURE__ */ J(Ze, { className: r }), /* @__PURE__ */ J(Et, {
|
|
781
781
|
content: i,
|
|
782
782
|
overflowOnly: !0,
|
|
783
|
-
children: /* @__PURE__ */
|
|
783
|
+
children: /* @__PURE__ */ J("span", {
|
|
784
784
|
className: "truncate",
|
|
785
785
|
children: i
|
|
786
786
|
})
|
|
787
787
|
})]
|
|
788
788
|
});
|
|
789
|
-
case "area": return /* @__PURE__ */
|
|
789
|
+
case "area": return /* @__PURE__ */ Y(be, {
|
|
790
790
|
workspace: e,
|
|
791
791
|
area: { key: t.key },
|
|
792
792
|
className: n,
|
|
793
|
-
children: [/* @__PURE__ */
|
|
793
|
+
children: [/* @__PURE__ */ J(We, { className: r }), /* @__PURE__ */ J("span", {
|
|
794
794
|
className: "truncate",
|
|
795
795
|
children: i
|
|
796
796
|
})]
|
|
797
797
|
});
|
|
798
|
-
default: return /* @__PURE__ */
|
|
798
|
+
default: return /* @__PURE__ */ Y(fe, {
|
|
799
799
|
to: "/$workspace/docs/$doc",
|
|
800
800
|
params: {
|
|
801
801
|
workspace: e,
|
|
802
802
|
doc: t.key
|
|
803
803
|
},
|
|
804
804
|
className: n,
|
|
805
|
-
children: [/* @__PURE__ */
|
|
805
|
+
children: [/* @__PURE__ */ J(Xe, { className: r }), /* @__PURE__ */ J("span", {
|
|
806
806
|
className: "truncate",
|
|
807
807
|
children: i
|
|
808
808
|
})]
|
|
809
809
|
});
|
|
810
810
|
}
|
|
811
811
|
}
|
|
812
|
-
function
|
|
813
|
-
let o =
|
|
812
|
+
function Jt({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
813
|
+
let o = K("planning"), s = K("flow"), l = he(), u = st(), { data: d = [] } = Z(g(e)), f = d.find((e) => e.id === t.project?.id), { data: p = [] } = Z({
|
|
814
814
|
...c(e, n?.key ?? ""),
|
|
815
815
|
enabled: !!n?.cyclesEnabled
|
|
816
816
|
}), m = n?.estimateScale ?? "none", h = t.status.category === "completed" || t.status.category === "canceled", _ = (e) => e.name ? o("cycleNamed", {
|
|
817
817
|
number: e.number,
|
|
818
818
|
name: e.name
|
|
819
|
-
}) : o("cycle", { number: e.number }), v = p.filter((e) => e.state !== "past" || e.id === t.cycle?.id), { data: y = [] } =
|
|
820
|
-
return /* @__PURE__ */ q
|
|
821
|
-
n && n.flow.length > 0 && /* @__PURE__ */
|
|
819
|
+
}) : o("cycle", { number: e.number }), v = p.filter((e) => e.state !== "past" || e.id === t.cycle?.id), { data: y = [] } = Z(i(e)), b = y.filter((e) => !e.teamId || e.teamId === t.teamId);
|
|
820
|
+
return /* @__PURE__ */ Y(q, { children: [
|
|
821
|
+
n && n.flow.length > 0 && /* @__PURE__ */ J($, {
|
|
822
822
|
label: s("stage"),
|
|
823
|
-
children: /* @__PURE__ */
|
|
823
|
+
children: /* @__PURE__ */ J(H, {
|
|
824
824
|
"aria-label": s("stage"),
|
|
825
825
|
value: t.stage ?? "",
|
|
826
826
|
onValueChange: (e) => r({ stage: e ?? "" }),
|
|
@@ -831,22 +831,22 @@ function Yt({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
831
831
|
value: e.stage,
|
|
832
832
|
label: s(`stages.${e.stage}`)
|
|
833
833
|
}))],
|
|
834
|
-
trigger: /* @__PURE__ */
|
|
834
|
+
trigger: /* @__PURE__ */ Y("button", {
|
|
835
835
|
type: "button",
|
|
836
836
|
className: a,
|
|
837
|
-
children: [/* @__PURE__ */
|
|
837
|
+
children: [/* @__PURE__ */ J(Je, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.stage ? /* @__PURE__ */ J("span", {
|
|
838
838
|
className: "truncate",
|
|
839
839
|
children: s(`stages.${t.stage}`)
|
|
840
|
-
}) : /* @__PURE__ */
|
|
840
|
+
}) : /* @__PURE__ */ J("span", {
|
|
841
841
|
className: "text-muted-foreground",
|
|
842
842
|
children: s("notInFlow")
|
|
843
843
|
})]
|
|
844
844
|
})
|
|
845
845
|
})
|
|
846
846
|
}),
|
|
847
|
-
/* @__PURE__ */
|
|
847
|
+
/* @__PURE__ */ J($, {
|
|
848
848
|
label: o("area"),
|
|
849
|
-
children: /* @__PURE__ */
|
|
849
|
+
children: /* @__PURE__ */ J(H, {
|
|
850
850
|
"aria-label": o("area"),
|
|
851
851
|
value: t.area?.key ?? "",
|
|
852
852
|
onValueChange: (e) => r({ area: e ?? "" }),
|
|
@@ -858,31 +858,31 @@ function Yt({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
858
858
|
label: e.title,
|
|
859
859
|
...e.status === "proposed" && { description: o("proposedArea") }
|
|
860
860
|
}))],
|
|
861
|
-
trigger: /* @__PURE__ */
|
|
861
|
+
trigger: /* @__PURE__ */ Y("button", {
|
|
862
862
|
type: "button",
|
|
863
863
|
className: a,
|
|
864
|
-
children: [/* @__PURE__ */
|
|
864
|
+
children: [/* @__PURE__ */ J(We, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.area ? /* @__PURE__ */ J("span", {
|
|
865
865
|
className: "truncate",
|
|
866
866
|
children: t.area.title
|
|
867
|
-
}) : /* @__PURE__ */
|
|
867
|
+
}) : /* @__PURE__ */ J("span", {
|
|
868
868
|
className: "text-muted-foreground",
|
|
869
869
|
children: o("noArea")
|
|
870
870
|
})]
|
|
871
871
|
})
|
|
872
872
|
})
|
|
873
873
|
}),
|
|
874
|
-
t.origin && /* @__PURE__ */
|
|
874
|
+
t.origin && /* @__PURE__ */ J($, {
|
|
875
875
|
label: o("startedFrom"),
|
|
876
|
-
children: /* @__PURE__ */
|
|
876
|
+
children: /* @__PURE__ */ J(qt, {
|
|
877
877
|
workspace: e,
|
|
878
878
|
origin: t.origin,
|
|
879
879
|
className: a
|
|
880
880
|
})
|
|
881
881
|
}),
|
|
882
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ J($, {
|
|
883
883
|
label: o("project"),
|
|
884
884
|
slot: "project",
|
|
885
|
-
children: /* @__PURE__ */
|
|
885
|
+
children: /* @__PURE__ */ J(H, {
|
|
886
886
|
"aria-label": o("project"),
|
|
887
887
|
value: t.project?.id ?? "",
|
|
888
888
|
onValueChange: (e) => r({ projectId: e ?? "" }),
|
|
@@ -892,24 +892,24 @@ function Yt({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
892
892
|
}, ...d.map((e) => ({
|
|
893
893
|
value: e.id,
|
|
894
894
|
label: e.name,
|
|
895
|
-
icon: /* @__PURE__ */
|
|
895
|
+
icon: /* @__PURE__ */ J(it, { status: e.status })
|
|
896
896
|
}))],
|
|
897
|
-
trigger: /* @__PURE__ */
|
|
897
|
+
trigger: /* @__PURE__ */ Y("button", {
|
|
898
898
|
type: "button",
|
|
899
899
|
className: a,
|
|
900
|
-
children: [/* @__PURE__ */
|
|
900
|
+
children: [/* @__PURE__ */ J($e, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.project ? /* @__PURE__ */ J("span", {
|
|
901
901
|
className: "truncate",
|
|
902
902
|
children: t.project.name
|
|
903
|
-
}) : /* @__PURE__ */
|
|
903
|
+
}) : /* @__PURE__ */ J("span", {
|
|
904
904
|
className: "text-muted-foreground",
|
|
905
905
|
children: o("noProject")
|
|
906
906
|
})]
|
|
907
907
|
})
|
|
908
908
|
})
|
|
909
909
|
}),
|
|
910
|
-
t.project && /* @__PURE__ */
|
|
910
|
+
t.project && /* @__PURE__ */ J($, {
|
|
911
911
|
label: o("milestone"),
|
|
912
|
-
children: /* @__PURE__ */
|
|
912
|
+
children: /* @__PURE__ */ J(H, {
|
|
913
913
|
"aria-label": o("milestone"),
|
|
914
914
|
value: t.milestone?.id ?? "",
|
|
915
915
|
onValueChange: (e) => r({ milestoneId: e ?? "" }),
|
|
@@ -921,23 +921,23 @@ function Yt({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
921
921
|
label: e.name,
|
|
922
922
|
...e.targetDate && { description: l.day(e.targetDate) }
|
|
923
923
|
}))],
|
|
924
|
-
trigger: /* @__PURE__ */
|
|
924
|
+
trigger: /* @__PURE__ */ J("button", {
|
|
925
925
|
type: "button",
|
|
926
926
|
className: a,
|
|
927
|
-
children: t.milestone ? /* @__PURE__ */
|
|
927
|
+
children: t.milestone ? /* @__PURE__ */ J("span", {
|
|
928
928
|
className: "truncate",
|
|
929
929
|
children: t.milestone.name
|
|
930
|
-
}) : /* @__PURE__ */
|
|
930
|
+
}) : /* @__PURE__ */ J("span", {
|
|
931
931
|
className: "text-muted-foreground",
|
|
932
932
|
children: o("noMilestone")
|
|
933
933
|
})
|
|
934
934
|
})
|
|
935
935
|
})
|
|
936
936
|
}),
|
|
937
|
-
n?.cyclesEnabled && /* @__PURE__ */
|
|
937
|
+
n?.cyclesEnabled && /* @__PURE__ */ J($, {
|
|
938
938
|
label: o("cycleLabel"),
|
|
939
939
|
slot: "cycle",
|
|
940
|
-
children: /* @__PURE__ */
|
|
940
|
+
children: /* @__PURE__ */ J(H, {
|
|
941
941
|
"aria-label": o("cycleLabel"),
|
|
942
942
|
value: t.cycle?.id ?? "",
|
|
943
943
|
onValueChange: (e) => r({ cycleId: e ?? "" }),
|
|
@@ -952,23 +952,23 @@ function Yt({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
952
952
|
dates: l.dayRange(e.startsOn, e.endsOn)
|
|
953
953
|
})
|
|
954
954
|
}))],
|
|
955
|
-
trigger: /* @__PURE__ */
|
|
955
|
+
trigger: /* @__PURE__ */ Y("button", {
|
|
956
956
|
type: "button",
|
|
957
957
|
className: a,
|
|
958
|
-
children: [/* @__PURE__ */
|
|
958
|
+
children: [/* @__PURE__ */ J(Je, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.cycle ? /* @__PURE__ */ J("span", {
|
|
959
959
|
className: "truncate",
|
|
960
960
|
children: _(t.cycle)
|
|
961
|
-
}) : /* @__PURE__ */
|
|
961
|
+
}) : /* @__PURE__ */ J("span", {
|
|
962
962
|
className: "text-muted-foreground",
|
|
963
963
|
children: o("noCycle")
|
|
964
964
|
})]
|
|
965
965
|
})
|
|
966
966
|
})
|
|
967
967
|
}),
|
|
968
|
-
(m !== "none" || !!t.estimate) && /* @__PURE__ */
|
|
968
|
+
(m !== "none" || !!t.estimate) && /* @__PURE__ */ J($, {
|
|
969
969
|
label: o("estimate"),
|
|
970
970
|
slot: "estimate",
|
|
971
|
-
children: /* @__PURE__ */
|
|
971
|
+
children: /* @__PURE__ */ J(H, {
|
|
972
972
|
"aria-label": o("estimate"),
|
|
973
973
|
value: t.estimate ?? 0,
|
|
974
974
|
onValueChange: (e) => r({ estimate: e ?? 0 }),
|
|
@@ -979,77 +979,77 @@ function Yt({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
979
979
|
value: e,
|
|
980
980
|
label: u(e, m)
|
|
981
981
|
}))],
|
|
982
|
-
trigger: /* @__PURE__ */
|
|
982
|
+
trigger: /* @__PURE__ */ Y("button", {
|
|
983
983
|
type: "button",
|
|
984
984
|
className: a,
|
|
985
|
-
children: [/* @__PURE__ */
|
|
985
|
+
children: [/* @__PURE__ */ J(Ye, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.estimate ? u(t.estimate, m) : /* @__PURE__ */ J("span", {
|
|
986
986
|
className: "text-muted-foreground",
|
|
987
987
|
children: o("noEstimate")
|
|
988
988
|
})]
|
|
989
989
|
})
|
|
990
990
|
})
|
|
991
991
|
}),
|
|
992
|
-
/* @__PURE__ */
|
|
992
|
+
/* @__PURE__ */ J($, {
|
|
993
993
|
label: o("startDate"),
|
|
994
|
-
children: /* @__PURE__ */
|
|
994
|
+
children: /* @__PURE__ */ Y("div", {
|
|
995
995
|
className: "flex items-center",
|
|
996
|
-
children: [/* @__PURE__ */
|
|
996
|
+
children: [/* @__PURE__ */ J(bt, {
|
|
997
997
|
value: t.startDate ?? "",
|
|
998
998
|
onValueChange: (e) => r({ startDate: e }),
|
|
999
999
|
"aria-label": o("startDate"),
|
|
1000
1000
|
required: !0,
|
|
1001
|
-
trigger: /* @__PURE__ */
|
|
1001
|
+
trigger: /* @__PURE__ */ Y("button", {
|
|
1002
1002
|
type: "button",
|
|
1003
1003
|
className: a,
|
|
1004
|
-
children: [/* @__PURE__ */
|
|
1004
|
+
children: [/* @__PURE__ */ J(Ke, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.startDate ? /* @__PURE__ */ J("span", {
|
|
1005
1005
|
className: "tabular-nums",
|
|
1006
1006
|
children: l.day(t.startDate)
|
|
1007
|
-
}) : /* @__PURE__ */
|
|
1007
|
+
}) : /* @__PURE__ */ J("span", {
|
|
1008
1008
|
className: "text-muted-foreground",
|
|
1009
1009
|
children: o("noStartDate")
|
|
1010
1010
|
})]
|
|
1011
1011
|
})
|
|
1012
|
-
}), t.startDate && /* @__PURE__ */
|
|
1012
|
+
}), t.startDate && /* @__PURE__ */ J(St, {
|
|
1013
1013
|
variant: "ghost",
|
|
1014
|
-
icon: /* @__PURE__ */
|
|
1014
|
+
icon: /* @__PURE__ */ J(qe, { className: "size-3.5" }),
|
|
1015
1015
|
label: o("clearStartDate"),
|
|
1016
1016
|
onClick: () => r({ startDate: "" })
|
|
1017
1017
|
})]
|
|
1018
1018
|
})
|
|
1019
1019
|
}),
|
|
1020
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ J($, {
|
|
1021
1021
|
label: o("dueDate"),
|
|
1022
|
-
children: /* @__PURE__ */
|
|
1022
|
+
children: /* @__PURE__ */ Y("div", {
|
|
1023
1023
|
className: "flex items-center",
|
|
1024
|
-
children: [/* @__PURE__ */
|
|
1024
|
+
children: [/* @__PURE__ */ J(bt, {
|
|
1025
1025
|
value: t.dueDate ?? "",
|
|
1026
1026
|
onValueChange: (e) => r({ dueDate: e }),
|
|
1027
1027
|
"aria-label": o("dueDate"),
|
|
1028
1028
|
required: !0,
|
|
1029
|
-
trigger: /* @__PURE__ */
|
|
1029
|
+
trigger: /* @__PURE__ */ J("button", {
|
|
1030
1030
|
type: "button",
|
|
1031
1031
|
className: a,
|
|
1032
|
-
children: t.dueDate ? /* @__PURE__ */
|
|
1032
|
+
children: t.dueDate ? /* @__PURE__ */ J(rt, {
|
|
1033
1033
|
date: t.dueDate,
|
|
1034
1034
|
closed: h
|
|
1035
|
-
}) : /* @__PURE__ */ q
|
|
1035
|
+
}) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Ke, { className: "size-3.5 shrink-0 text-muted-foreground" }), /* @__PURE__ */ J("span", {
|
|
1036
1036
|
className: "text-muted-foreground",
|
|
1037
1037
|
children: o("noDueDate")
|
|
1038
1038
|
})] })
|
|
1039
1039
|
})
|
|
1040
|
-
}), t.dueDate && /* @__PURE__ */
|
|
1040
|
+
}), t.dueDate && /* @__PURE__ */ J(St, {
|
|
1041
1041
|
variant: "ghost",
|
|
1042
|
-
icon: /* @__PURE__ */
|
|
1042
|
+
icon: /* @__PURE__ */ J(qe, { className: "size-3.5" }),
|
|
1043
1043
|
label: o("clearDueDate"),
|
|
1044
1044
|
onClick: () => r({ dueDate: "" })
|
|
1045
1045
|
})]
|
|
1046
1046
|
})
|
|
1047
1047
|
}),
|
|
1048
|
-
t.slaDueAt && !h && /* @__PURE__ */
|
|
1048
|
+
t.slaDueAt && !h && /* @__PURE__ */ J($, {
|
|
1049
1049
|
label: o("sla.label"),
|
|
1050
|
-
children: /* @__PURE__ */
|
|
1050
|
+
children: /* @__PURE__ */ J("span", {
|
|
1051
1051
|
className: "flex h-7 items-center px-2",
|
|
1052
|
-
children: /* @__PURE__ */
|
|
1052
|
+
children: /* @__PURE__ */ J(at, {
|
|
1053
1053
|
issue: t,
|
|
1054
1054
|
team: n
|
|
1055
1055
|
})
|
|
@@ -1057,11 +1057,11 @@ function Yt({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
|
1057
1057
|
})
|
|
1058
1058
|
] });
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1061
|
-
let i =
|
|
1060
|
+
function Yt({ workspace: e, issue: t, update: n, row: r }) {
|
|
1061
|
+
let i = K("issueTypes"), a = It(), { data: o } = Z(F(e)), { data: s } = Z(A(e)), { confirm: c, dialog: l } = k(), [u, d] = G(!1), f = I(o, t.teamId);
|
|
1062
1062
|
if (f.length === 0 && !t.type) return null;
|
|
1063
1063
|
let p = (e) => {
|
|
1064
|
-
let r = f.find((t) => t.id === e), o = (s ?? []).filter((e) =>
|
|
1064
|
+
let r = f.find((t) => t.id === e), o = (s ?? []).filter((e) => j(t.fields[e.id]) && !te(r, e.id));
|
|
1065
1065
|
if (!r || o.length === 0) return n({ typeId: e });
|
|
1066
1066
|
c({
|
|
1067
1067
|
title: i("hiddenTitle"),
|
|
@@ -1074,9 +1074,9 @@ function Xt({ workspace: e, issue: t, update: n, row: r }) {
|
|
|
1074
1074
|
onConfirm: async () => n({ typeId: e })
|
|
1075
1075
|
});
|
|
1076
1076
|
};
|
|
1077
|
-
return /* @__PURE__ */
|
|
1077
|
+
return /* @__PURE__ */ Y($, {
|
|
1078
1078
|
label: i("type"),
|
|
1079
|
-
children: [/* @__PURE__ */
|
|
1079
|
+
children: [/* @__PURE__ */ J(V, {
|
|
1080
1080
|
"aria-label": i("type"),
|
|
1081
1081
|
open: u,
|
|
1082
1082
|
onOpenChange: d,
|
|
@@ -1086,15 +1086,15 @@ function Xt({ workspace: e, issue: t, update: n, row: r }) {
|
|
|
1086
1086
|
}, ...f.map((e) => ({
|
|
1087
1087
|
value: e.id,
|
|
1088
1088
|
label: e.name,
|
|
1089
|
-
icon: /* @__PURE__ */
|
|
1089
|
+
icon: /* @__PURE__ */ J(He, { type: e })
|
|
1090
1090
|
}))],
|
|
1091
1091
|
value: t.type?.id ?? "",
|
|
1092
1092
|
onValueChange: (e) => e !== null && e !== (t.type?.id ?? "") && p(e),
|
|
1093
1093
|
placeholder: i("type"),
|
|
1094
|
-
trigger: /* @__PURE__ */
|
|
1094
|
+
trigger: /* @__PURE__ */ J("button", {
|
|
1095
1095
|
type: "button",
|
|
1096
1096
|
className: r,
|
|
1097
|
-
children: t.type ? /* @__PURE__ */ q
|
|
1097
|
+
children: t.type ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(He, { type: t.type }), t.type.name] }) : /* @__PURE__ */ J("span", {
|
|
1098
1098
|
className: "text-muted-foreground",
|
|
1099
1099
|
children: i("noType")
|
|
1100
1100
|
})
|
|
@@ -1102,7 +1102,7 @@ function Xt({ workspace: e, issue: t, update: n, row: r }) {
|
|
|
1102
1102
|
}), l]
|
|
1103
1103
|
});
|
|
1104
1104
|
}
|
|
1105
|
-
var
|
|
1105
|
+
var Xt = At(!1), Zt = {
|
|
1106
1106
|
status: 1,
|
|
1107
1107
|
team: 2,
|
|
1108
1108
|
priority: 3,
|
|
@@ -1111,30 +1111,30 @@ var Zt = jt(!1), Qt = {
|
|
|
1111
1111
|
cycle: 6,
|
|
1112
1112
|
labels: 7,
|
|
1113
1113
|
project: 8
|
|
1114
|
-
},
|
|
1115
|
-
function
|
|
1116
|
-
if (
|
|
1117
|
-
let t = !n ||
|
|
1118
|
-
return /* @__PURE__ */
|
|
1119
|
-
style: { order: (n &&
|
|
1114
|
+
}, Qt = /* @__PURE__ */ new Set(["labels", "project"]);
|
|
1115
|
+
function $({ label: e, shortcut: t, slot: n, children: r }) {
|
|
1116
|
+
if (Mt(Xt)) {
|
|
1117
|
+
let t = !n || Qt.has(n);
|
|
1118
|
+
return /* @__PURE__ */ Y("div", {
|
|
1119
|
+
style: { order: (n && Zt[n]) ?? 20 },
|
|
1120
1120
|
className: t ? "mt-3" : "",
|
|
1121
|
-
children: [/* @__PURE__ */
|
|
1121
|
+
children: [/* @__PURE__ */ J("p", {
|
|
1122
1122
|
className: t ? "mb-1 px-2 text-xs text-muted-foreground" : "sr-only",
|
|
1123
1123
|
children: e
|
|
1124
1124
|
}), r]
|
|
1125
1125
|
});
|
|
1126
1126
|
}
|
|
1127
|
-
return /* @__PURE__ */
|
|
1127
|
+
return /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
|
|
1128
1128
|
className: "mb-1 flex items-center justify-between px-2 text-xs text-muted-foreground",
|
|
1129
|
-
children: [e, t && /* @__PURE__ */
|
|
1129
|
+
children: [e, t && /* @__PURE__ */ J(Ct, {
|
|
1130
1130
|
keys: t,
|
|
1131
1131
|
size: "xs",
|
|
1132
1132
|
className: "hidden md:inline-flex"
|
|
1133
1133
|
})]
|
|
1134
1134
|
}), r] });
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1137
|
-
let n =
|
|
1136
|
+
function $t({ workspace: e, identifier: t }) {
|
|
1137
|
+
let n = K("issue.activity"), { data: r } = Q(l(e, t)), [i, a] = G(!1), o = Pt(() => {
|
|
1138
1138
|
let e = [];
|
|
1139
1139
|
for (let t of r) {
|
|
1140
1140
|
if (t.type.startsWith("comment.") || t.type.startsWith("issue.reaction_") || t.type === "issue.triage_accepted" && t.data.pullRequest) continue;
|
|
@@ -1143,23 +1143,23 @@ function en({ workspace: e, identifier: t }) {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
return e;
|
|
1145
1145
|
}, [r]), s = i ? 0 : Math.max(0, o.length - 5);
|
|
1146
|
-
return /* @__PURE__ */
|
|
1146
|
+
return /* @__PURE__ */ Y("section", {
|
|
1147
1147
|
className: "mt-10",
|
|
1148
1148
|
"aria-label": n("title"),
|
|
1149
1149
|
children: [
|
|
1150
|
-
/* @__PURE__ */
|
|
1150
|
+
/* @__PURE__ */ J("h2", {
|
|
1151
1151
|
className: "text-base font-semibold",
|
|
1152
1152
|
children: n("title")
|
|
1153
1153
|
}),
|
|
1154
|
-
s > 0 && /* @__PURE__ */
|
|
1154
|
+
s > 0 && /* @__PURE__ */ J("button", {
|
|
1155
1155
|
type: "button",
|
|
1156
1156
|
onClick: () => a(!0),
|
|
1157
1157
|
className: "mt-3 text-xs text-muted-foreground hover:text-foreground",
|
|
1158
1158
|
children: n("showEarlier", { count: s })
|
|
1159
1159
|
}),
|
|
1160
|
-
/* @__PURE__ */
|
|
1160
|
+
/* @__PURE__ */ J(ge, {
|
|
1161
1161
|
className: "mt-3",
|
|
1162
|
-
children: o.slice(s).map((t) => /* @__PURE__ */
|
|
1162
|
+
children: o.slice(s).map((t) => /* @__PURE__ */ J(Le, {
|
|
1163
1163
|
workspace: e,
|
|
1164
1164
|
event: t
|
|
1165
1165
|
}, t.id))
|
|
@@ -1167,57 +1167,57 @@ function en({ workspace: e, identifier: t }) {
|
|
|
1167
1167
|
]
|
|
1168
1168
|
});
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1171
|
-
let r =
|
|
1170
|
+
function en({ workspace: e, identifier: t, others: n }) {
|
|
1171
|
+
let r = K("issue.comments"), { data: i } = Q(s(e, t)), { data: a = [] } = Z(f(e, t)), o = Pt(() => {
|
|
1172
1172
|
let e = i.filter((e) => !e.parentId);
|
|
1173
|
-
return e.sort((e, t) => Number(
|
|
1173
|
+
return e.sort((e, t) => Number(tn(t)) - Number(tn(e))), e.map((e) => ({
|
|
1174
1174
|
root: e,
|
|
1175
1175
|
replies: i.filter((t) => t.parentId === e.id)
|
|
1176
1176
|
}));
|
|
1177
|
-
}, [i]), [c, l] =
|
|
1178
|
-
return /* @__PURE__ */
|
|
1177
|
+
}, [i]), [c, l] = G(null), u = i.filter((e) => !e.deletedAt && !tn(e)).length;
|
|
1178
|
+
return /* @__PURE__ */ Y("section", {
|
|
1179
1179
|
className: "mt-12 border-t border-border pt-6",
|
|
1180
1180
|
"aria-label": r("title"),
|
|
1181
1181
|
children: [
|
|
1182
|
-
/* @__PURE__ */
|
|
1182
|
+
/* @__PURE__ */ Y("h2", {
|
|
1183
1183
|
className: "text-base font-semibold",
|
|
1184
1184
|
children: [
|
|
1185
1185
|
r("title"),
|
|
1186
1186
|
" ",
|
|
1187
|
-
u > 0 && /* @__PURE__ */
|
|
1187
|
+
u > 0 && /* @__PURE__ */ J("span", {
|
|
1188
1188
|
className: "font-normal text-muted-foreground",
|
|
1189
1189
|
children: u
|
|
1190
1190
|
})
|
|
1191
1191
|
]
|
|
1192
1192
|
}),
|
|
1193
|
-
/* @__PURE__ */
|
|
1193
|
+
/* @__PURE__ */ J("div", {
|
|
1194
1194
|
className: "mt-4 space-y-3",
|
|
1195
1195
|
children: o.map(({ root: n, replies: i }) => {
|
|
1196
|
-
let o =
|
|
1197
|
-
return /* @__PURE__ */
|
|
1196
|
+
let o = tn(n) ? n.sharedWith : void 0, s = o ? R(o).source : void 0;
|
|
1197
|
+
return /* @__PURE__ */ Y(vt, {
|
|
1198
1198
|
size: "fill",
|
|
1199
1199
|
padding: "none",
|
|
1200
1200
|
highlight: !!o,
|
|
1201
|
-
render: /* @__PURE__ */
|
|
1201
|
+
render: /* @__PURE__ */ J("article", {
|
|
1202
1202
|
id: `comment-${n.id}`,
|
|
1203
1203
|
"aria-label": s && r("sharedThreadLabel", { source: s })
|
|
1204
1204
|
}),
|
|
1205
1205
|
children: [
|
|
1206
|
-
o && s ? /* @__PURE__ */
|
|
1206
|
+
o && s ? /* @__PURE__ */ J(Fe, {
|
|
1207
1207
|
source: s,
|
|
1208
1208
|
link: a.find((e) => e.connector === o)
|
|
1209
|
-
}) : /* @__PURE__ */
|
|
1209
|
+
}) : /* @__PURE__ */ J(rn, {
|
|
1210
1210
|
workspace: e,
|
|
1211
1211
|
identifier: t,
|
|
1212
1212
|
comment: n,
|
|
1213
1213
|
onReply: () => l(n.id)
|
|
1214
1214
|
}),
|
|
1215
|
-
i.length > 0 && /* @__PURE__ */
|
|
1215
|
+
i.length > 0 && /* @__PURE__ */ J("ol", {
|
|
1216
1216
|
className: o ? "" : "border-t border-border/70",
|
|
1217
|
-
children: i.map((r) => /* @__PURE__ */
|
|
1217
|
+
children: i.map((r) => /* @__PURE__ */ J("li", {
|
|
1218
1218
|
id: `comment-${r.id}`,
|
|
1219
1219
|
className: "border-b border-border/50 last:border-b-0",
|
|
1220
|
-
children: /* @__PURE__ */
|
|
1220
|
+
children: /* @__PURE__ */ J(rn, {
|
|
1221
1221
|
workspace: e,
|
|
1222
1222
|
identifier: t,
|
|
1223
1223
|
comment: r,
|
|
@@ -1225,16 +1225,16 @@ function tn({ workspace: e, identifier: t, others: n }) {
|
|
|
1225
1225
|
})
|
|
1226
1226
|
}, r.id))
|
|
1227
1227
|
}),
|
|
1228
|
-
/* @__PURE__ */
|
|
1228
|
+
/* @__PURE__ */ J("div", {
|
|
1229
1229
|
className: "border-t border-border/70 px-3 py-2",
|
|
1230
|
-
children: c === n.id ? /* @__PURE__ */
|
|
1230
|
+
children: c === n.id ? /* @__PURE__ */ J(on, {
|
|
1231
1231
|
workspace: e,
|
|
1232
1232
|
identifier: t,
|
|
1233
1233
|
parentId: n.id,
|
|
1234
1234
|
publicOn: s,
|
|
1235
1235
|
autofocus: !0,
|
|
1236
1236
|
onDone: () => l(null)
|
|
1237
|
-
}) : /* @__PURE__ */
|
|
1237
|
+
}) : /* @__PURE__ */ J("button", {
|
|
1238
1238
|
type: "button",
|
|
1239
1239
|
onClick: () => l(n.id),
|
|
1240
1240
|
className: "w-full text-left text-xs text-muted-foreground hover:text-foreground",
|
|
@@ -1245,19 +1245,19 @@ function tn({ workspace: e, identifier: t, others: n }) {
|
|
|
1245
1245
|
}, n.id);
|
|
1246
1246
|
})
|
|
1247
1247
|
}),
|
|
1248
|
-
/* @__PURE__ */
|
|
1248
|
+
/* @__PURE__ */ J(vt, {
|
|
1249
1249
|
size: "fill",
|
|
1250
1250
|
padding: "sm",
|
|
1251
1251
|
focusWithin: !0,
|
|
1252
1252
|
className: "mt-4",
|
|
1253
|
-
children: /* @__PURE__ */
|
|
1253
|
+
children: /* @__PURE__ */ J(on, {
|
|
1254
1254
|
workspace: e,
|
|
1255
1255
|
identifier: t
|
|
1256
1256
|
})
|
|
1257
1257
|
}),
|
|
1258
|
-
/* @__PURE__ */
|
|
1258
|
+
/* @__PURE__ */ J("div", {
|
|
1259
1259
|
className: "mt-2",
|
|
1260
|
-
children: /* @__PURE__ */
|
|
1260
|
+
children: /* @__PURE__ */ J(ct, {
|
|
1261
1261
|
workspace: e,
|
|
1262
1262
|
others: n,
|
|
1263
1263
|
field: "comment"
|
|
@@ -1266,43 +1266,43 @@ function tn({ workspace: e, identifier: t, others: n }) {
|
|
|
1266
1266
|
]
|
|
1267
1267
|
});
|
|
1268
1268
|
}
|
|
1269
|
-
var
|
|
1269
|
+
var tn = (e) => !!e.sharedWith && !e.parentId;
|
|
1270
1270
|
function nn({ comment: e }) {
|
|
1271
|
-
let t =
|
|
1272
|
-
return e.author.kind === "connector" ? /* @__PURE__ */
|
|
1271
|
+
let t = K("issue.comments");
|
|
1272
|
+
return e.author.kind === "connector" ? /* @__PURE__ */ J("span", {
|
|
1273
1273
|
className: "rounded border border-border px-1.5 py-px text-[10px] text-muted-foreground",
|
|
1274
|
-
children: t("via", { source:
|
|
1274
|
+
children: t("via", { source: R(e.author.handle).source })
|
|
1275
1275
|
}) : null;
|
|
1276
1276
|
}
|
|
1277
1277
|
function rn({ workspace: r, identifier: i, comment: a, onReply: o }) {
|
|
1278
|
-
let s =
|
|
1278
|
+
let s = K("issue.comments"), c = K("common"), { actorName: l, avatarOf: u } = z(r), { data: d } = Q(h), { data: f = [] } = Z(v(r, i)), p = de(r, "comment", { team: i.slice(0, i.lastIndexOf("-")) }), m = Lt(), g = U(), [_, y] = G(!1), [b, x] = G(a.body), [S, C] = G(!1), w = W(null), E = we(r, i), D = a.author.kind === "user" && a.author.handle === d?.user.username, O = { path: {
|
|
1279
1279
|
workspace: r,
|
|
1280
1280
|
identifier: i,
|
|
1281
1281
|
commentId: a.id
|
|
1282
|
-
} },
|
|
1282
|
+
} }, k = () => n(m, r, i), A = X({
|
|
1283
1283
|
mutationFn: async () => t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}/comments/{commentId}", {
|
|
1284
|
-
params:
|
|
1284
|
+
params: O,
|
|
1285
1285
|
body: { body: b }
|
|
1286
1286
|
})),
|
|
1287
1287
|
onSuccess: () => {
|
|
1288
|
-
y(!1),
|
|
1288
|
+
y(!1), k();
|
|
1289
1289
|
}
|
|
1290
|
-
}),
|
|
1291
|
-
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}/comments/{commentId}", { params:
|
|
1292
|
-
onSuccess:
|
|
1290
|
+
}), j = X({
|
|
1291
|
+
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}/comments/{commentId}", { params: O })),
|
|
1292
|
+
onSuccess: k
|
|
1293
1293
|
});
|
|
1294
|
-
if (a.deletedAt) return /* @__PURE__ */
|
|
1294
|
+
if (a.deletedAt) return /* @__PURE__ */ J("p", {
|
|
1295
1295
|
className: "px-3 py-2.5 text-xs text-muted-foreground italic",
|
|
1296
1296
|
children: s("deleted")
|
|
1297
1297
|
});
|
|
1298
|
-
let
|
|
1298
|
+
let M = `${P(r, i)}#comment-${a.id}`, N = [
|
|
1299
1299
|
{
|
|
1300
1300
|
label: s("reply"),
|
|
1301
1301
|
onClick: o
|
|
1302
1302
|
},
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
...
|
|
1303
|
+
L(c("copyLink"), M),
|
|
1304
|
+
L(s("copyText"), a.body),
|
|
1305
|
+
...D ? [
|
|
1306
1306
|
Ot,
|
|
1307
1307
|
{
|
|
1308
1308
|
label: s("edit"),
|
|
@@ -1317,17 +1317,17 @@ function rn({ workspace: r, identifier: i, comment: a, onReply: o }) {
|
|
|
1317
1317
|
}
|
|
1318
1318
|
] : []
|
|
1319
1319
|
];
|
|
1320
|
-
return /* @__PURE__ */
|
|
1320
|
+
return /* @__PURE__ */ Y("div", {
|
|
1321
1321
|
className: "group px-3 py-2.5",
|
|
1322
|
-
onContextMenu: (e) => !_ && g(e,
|
|
1323
|
-
children: [/* @__PURE__ */
|
|
1322
|
+
onContextMenu: (e) => !_ && g(e, N),
|
|
1323
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
1324
1324
|
className: "flex items-center gap-2 text-xs",
|
|
1325
1325
|
children: [
|
|
1326
|
-
/* @__PURE__ */
|
|
1326
|
+
/* @__PURE__ */ Y(_e, {
|
|
1327
1327
|
workspace: r,
|
|
1328
1328
|
actor: a.author,
|
|
1329
1329
|
className: "flex items-center gap-2 font-medium hover:underline",
|
|
1330
|
-
children: [/* @__PURE__ */
|
|
1330
|
+
children: [/* @__PURE__ */ J(gt, {
|
|
1331
1331
|
...T(a.author.kind),
|
|
1332
1332
|
name: l(a.author),
|
|
1333
1333
|
src: u(a.author.kind, a.author.handle),
|
|
@@ -1335,29 +1335,29 @@ function rn({ workspace: r, identifier: i, comment: a, onReply: o }) {
|
|
|
1335
1335
|
decorative: !0
|
|
1336
1336
|
}), l(a.author)]
|
|
1337
1337
|
}),
|
|
1338
|
-
/* @__PURE__ */
|
|
1339
|
-
/* @__PURE__ */
|
|
1338
|
+
/* @__PURE__ */ J(nn, { comment: a }),
|
|
1339
|
+
/* @__PURE__ */ Y("span", {
|
|
1340
1340
|
className: "text-muted-foreground",
|
|
1341
|
-
children: [/* @__PURE__ */
|
|
1341
|
+
children: [/* @__PURE__ */ J(wt, {
|
|
1342
1342
|
value: a.createdAt,
|
|
1343
1343
|
exact: "medium"
|
|
1344
|
-
}), a.updatedAt !== a.createdAt && /* @__PURE__ */ q
|
|
1344
|
+
}), a.updatedAt !== a.createdAt && /* @__PURE__ */ Y(q, { children: [" ", s("edited")] })]
|
|
1345
1345
|
}),
|
|
1346
|
-
!S && !_ && /* @__PURE__ */
|
|
1347
|
-
items:
|
|
1346
|
+
!S && !_ && /* @__PURE__ */ J(Rt, {
|
|
1347
|
+
items: N,
|
|
1348
1348
|
className: "ml-auto"
|
|
1349
1349
|
}),
|
|
1350
|
-
S && /* @__PURE__ */
|
|
1350
|
+
S && /* @__PURE__ */ Y("span", {
|
|
1351
1351
|
className: "ml-auto flex gap-2 text-muted-foreground",
|
|
1352
1352
|
children: [
|
|
1353
|
-
/* @__PURE__ */
|
|
1354
|
-
/* @__PURE__ */
|
|
1353
|
+
/* @__PURE__ */ J("span", { children: s("confirmDelete") }),
|
|
1354
|
+
/* @__PURE__ */ J("button", {
|
|
1355
1355
|
type: "button",
|
|
1356
1356
|
className: "text-danger hover:underline",
|
|
1357
|
-
onClick: () =>
|
|
1357
|
+
onClick: () => j.mutate(),
|
|
1358
1358
|
children: c("delete")
|
|
1359
1359
|
}),
|
|
1360
|
-
/* @__PURE__ */
|
|
1360
|
+
/* @__PURE__ */ J("button", {
|
|
1361
1361
|
type: "button",
|
|
1362
1362
|
className: "hover:underline",
|
|
1363
1363
|
onClick: () => C(!1),
|
|
@@ -1366,13 +1366,13 @@ function rn({ workspace: r, identifier: i, comment: a, onReply: o }) {
|
|
|
1366
1366
|
]
|
|
1367
1367
|
})
|
|
1368
1368
|
]
|
|
1369
|
-
}), /* @__PURE__ */
|
|
1369
|
+
}), /* @__PURE__ */ J("div", {
|
|
1370
1370
|
className: "mt-1",
|
|
1371
|
-
children: _ ? /* @__PURE__ */ q
|
|
1372
|
-
/* @__PURE__ */
|
|
1371
|
+
children: _ ? /* @__PURE__ */ Y(q, { children: [
|
|
1372
|
+
/* @__PURE__ */ J(Oe, {
|
|
1373
1373
|
value: b,
|
|
1374
1374
|
onChange: x,
|
|
1375
|
-
onSubmit: () =>
|
|
1375
|
+
onSubmit: () => A.mutate(),
|
|
1376
1376
|
autofocus: !0,
|
|
1377
1377
|
label: s("editLabel"),
|
|
1378
1378
|
onEditor: (e) => {
|
|
@@ -1380,42 +1380,42 @@ function rn({ workspace: r, identifier: i, comment: a, onReply: o }) {
|
|
|
1380
1380
|
},
|
|
1381
1381
|
onFiles: (e, t) => E.upload(w.current, e, t)
|
|
1382
1382
|
}),
|
|
1383
|
-
/* @__PURE__ */
|
|
1383
|
+
/* @__PURE__ */ J(Ce, {
|
|
1384
1384
|
pending: E.pending,
|
|
1385
1385
|
error: E.error
|
|
1386
1386
|
}),
|
|
1387
|
-
/* @__PURE__ */
|
|
1387
|
+
/* @__PURE__ */ Y("div", {
|
|
1388
1388
|
className: "mt-2 flex justify-end gap-2",
|
|
1389
|
-
children: [/* @__PURE__ */
|
|
1389
|
+
children: [/* @__PURE__ */ J(B, {
|
|
1390
1390
|
type: "button",
|
|
1391
1391
|
variant: "ghost",
|
|
1392
1392
|
size: "sm",
|
|
1393
1393
|
onClick: () => y(!1),
|
|
1394
1394
|
children: c("cancel")
|
|
1395
|
-
}), /* @__PURE__ */
|
|
1395
|
+
}), /* @__PURE__ */ J(B, {
|
|
1396
1396
|
type: "button",
|
|
1397
1397
|
variant: "primary",
|
|
1398
1398
|
size: "sm",
|
|
1399
|
-
onClick: () =>
|
|
1399
|
+
onClick: () => A.mutate(),
|
|
1400
1400
|
disabled: !b.trim() || E.pending > 0,
|
|
1401
1401
|
children: c("save")
|
|
1402
1402
|
})]
|
|
1403
1403
|
})
|
|
1404
|
-
] }) : /* @__PURE__ */ q
|
|
1405
|
-
/* @__PURE__ */
|
|
1404
|
+
] }) : /* @__PURE__ */ Y(q, { children: [
|
|
1405
|
+
/* @__PURE__ */ J(Oe, {
|
|
1406
1406
|
value: a.body,
|
|
1407
1407
|
editable: !1
|
|
1408
1408
|
}),
|
|
1409
|
-
/* @__PURE__ */
|
|
1409
|
+
/* @__PURE__ */ J(ht, {
|
|
1410
1410
|
workspace: r,
|
|
1411
1411
|
widgets: a.widgets
|
|
1412
1412
|
}),
|
|
1413
|
-
/* @__PURE__ */
|
|
1413
|
+
/* @__PURE__ */ J(an, {
|
|
1414
1414
|
workspace: r,
|
|
1415
1415
|
identifier: i,
|
|
1416
1416
|
comment: a
|
|
1417
1417
|
}),
|
|
1418
|
-
/* @__PURE__ */
|
|
1418
|
+
/* @__PURE__ */ J(ut, {
|
|
1419
1419
|
workspace: r,
|
|
1420
1420
|
identifier: i,
|
|
1421
1421
|
commentId: a.id,
|
|
@@ -1428,10 +1428,10 @@ function rn({ workspace: r, identifier: i, comment: a, onReply: o }) {
|
|
|
1428
1428
|
});
|
|
1429
1429
|
}
|
|
1430
1430
|
function an({ workspace: e, identifier: t, comment: n }) {
|
|
1431
|
-
let { data: r = [] } =
|
|
1432
|
-
return o.length === 0 ? null : /* @__PURE__ */
|
|
1431
|
+
let { data: r = [] } = Z(a(e, t)), { actorName: i } = z(e), o = r.filter((e) => e.page && e.commentId === n.id);
|
|
1432
|
+
return o.length === 0 ? null : /* @__PURE__ */ J("div", {
|
|
1433
1433
|
className: "mt-2 space-y-2",
|
|
1434
|
-
children: o.map((e) => /* @__PURE__ */
|
|
1434
|
+
children: o.map((e) => /* @__PURE__ */ J(ve, {
|
|
1435
1435
|
attachmentId: e.id,
|
|
1436
1436
|
name: e.name,
|
|
1437
1437
|
agent: i(n.author)
|
|
@@ -1439,7 +1439,7 @@ function an({ workspace: e, identifier: t, comment: n }) {
|
|
|
1439
1439
|
});
|
|
1440
1440
|
}
|
|
1441
1441
|
function on({ workspace: r, identifier: i, parentId: a, publicOn: o, autofocus: s = !1, onDone: c }) {
|
|
1442
|
-
let l =
|
|
1442
|
+
let l = K("issue.comments"), u = Ft(), d = K("common"), f = Mt(sn), p = Lt(), [m, h] = G(""), [g, _] = G(0), v = W(null), y = we(r, i), b = X({
|
|
1443
1443
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/comments", {
|
|
1444
1444
|
params: { path: {
|
|
1445
1445
|
workspace: r,
|
|
@@ -1454,7 +1454,7 @@ function on({ workspace: r, identifier: i, parentId: a, publicOn: o, autofocus:
|
|
|
1454
1454
|
h(""), _((e) => e + 1), n(p, r, i), c?.();
|
|
1455
1455
|
}
|
|
1456
1456
|
}), x = () => m.trim() && !b.isPending && y.pending === 0 && b.mutate();
|
|
1457
|
-
return /* @__PURE__ */
|
|
1457
|
+
return /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(Oe, {
|
|
1458
1458
|
value: "",
|
|
1459
1459
|
onChange: h,
|
|
1460
1460
|
onSubmit: x,
|
|
@@ -1468,29 +1468,29 @@ function on({ workspace: r, identifier: i, parentId: a, publicOn: o, autofocus:
|
|
|
1468
1468
|
placeholder: o ? l("replyPublic", { source: o }) : l(a ? "replyPlaceholder" : "placeholder"),
|
|
1469
1469
|
label: o ? l("replyPublicButton", { source: o }) : l(a ? "reply" : "newComment"),
|
|
1470
1470
|
className: a ? "min-h-8" : "min-h-12"
|
|
1471
|
-
}, g), /* @__PURE__ */
|
|
1471
|
+
}, g), /* @__PURE__ */ Y("div", {
|
|
1472
1472
|
className: "mt-1 flex items-center justify-end gap-3",
|
|
1473
1473
|
children: [
|
|
1474
|
-
/* @__PURE__ */
|
|
1474
|
+
/* @__PURE__ */ Y("span", {
|
|
1475
1475
|
className: "mr-auto flex min-w-0 items-center gap-2",
|
|
1476
|
-
children: [/* @__PURE__ */
|
|
1476
|
+
children: [/* @__PURE__ */ J(xe, { onFiles: (e) => y.upload(v.current, e) }), /* @__PURE__ */ J(Ce, {
|
|
1477
1477
|
pending: y.pending,
|
|
1478
1478
|
error: y.error
|
|
1479
1479
|
})]
|
|
1480
1480
|
}),
|
|
1481
|
-
b.isError && /* @__PURE__ */
|
|
1481
|
+
b.isError && /* @__PURE__ */ J(xt, {
|
|
1482
1482
|
inline: !0,
|
|
1483
1483
|
className: "text-xs",
|
|
1484
1484
|
children: u(b.error)
|
|
1485
1485
|
}),
|
|
1486
|
-
c && /* @__PURE__ */
|
|
1486
|
+
c && /* @__PURE__ */ J(B, {
|
|
1487
1487
|
type: "button",
|
|
1488
1488
|
variant: "ghost",
|
|
1489
1489
|
size: "sm",
|
|
1490
1490
|
onClick: c,
|
|
1491
1491
|
children: d("cancel")
|
|
1492
1492
|
}),
|
|
1493
|
-
/* @__PURE__ */
|
|
1493
|
+
/* @__PURE__ */ J(B, {
|
|
1494
1494
|
type: "button",
|
|
1495
1495
|
variant: "primary",
|
|
1496
1496
|
size: "sm",
|
|
@@ -1502,5 +1502,5 @@ function on({ workspace: r, identifier: i, parentId: a, publicOn: o, autofocus:
|
|
|
1502
1502
|
]
|
|
1503
1503
|
})] });
|
|
1504
1504
|
}
|
|
1505
|
-
var
|
|
1506
|
-
export {
|
|
1505
|
+
var sn = At(() => {});
|
|
1506
|
+
export { Vt as IssueView, Bt as loadIssue };
|