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