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