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