@parallelworks/tandem-web 0.156.0 → 0.157.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 +27 -1
- package/_virtual/_virtual_i18n/es/common.js +27 -1
- package/_virtual/_virtual_i18n/ja/common.js +27 -1
- package/_virtual/_virtual_i18n/ko/common.js +27 -1
- package/_virtual/_virtual_i18n/zh/common.js +27 -1
- package/api/queries.js +25 -2
- package/components/IssueIntercom.js +61 -0
- package/components/SettingsNav.js +5 -0
- package/package.json +1 -1
- package/routeTree.gen.js +161 -155
- package/routes/_workspace/issues/_identifier2.js +100 -95
- package/routes/_workspace/settings/intercom.js +6 -0
- package/routes/_workspace/settings/intercom2.js +97 -0
- package/routes/_workspace/settings/intercom3.js +4 -0
|
@@ -41,30 +41,31 @@ import { Timeline as Ye } from "../../../components/ActivityTimeline.js";
|
|
|
41
41
|
import { CustomerRequests as Xe } from "../../../components/CustomerRequests.js";
|
|
42
42
|
import { IssueLinkChips as Ze, IssueLinks as Qe, SharedThreadHeader as $e } from "../../../components/GitHub.js";
|
|
43
43
|
import { EventLine as et } from "../../../components/IssueEvent.js";
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
44
|
+
import { IssueIntercom as tt } from "../../../components/IssueIntercom.js";
|
|
45
|
+
import { ParentProperty as nt, SubIssuesAndRelations as rt } from "../../../components/IssueRelations.js";
|
|
46
|
+
import { IssueSentry as it } from "../../../components/IssueSentry.js";
|
|
47
|
+
import { IssueZendesk as at } from "../../../components/IssueZendesk.js";
|
|
48
|
+
import { Reactions as ot } from "../../../components/Reactions.js";
|
|
49
|
+
import { TimeInStatus as st } from "../../../components/Reports.js";
|
|
50
|
+
import { SubscribeButton as ct } from "../../../components/SubscribeButton.js";
|
|
51
|
+
import { Widgets as lt } from "../../../components/Widgets.js";
|
|
52
|
+
import { Avatar as ut, Button as z, Callout as dt, Card as ft, Combobox as B, CopyButton as pt, DatePicker as mt, ErrorText as ht, IconButton as gt, Kbd as _t, RelativeTime as vt, Select as V, TitleInput as yt, Tooltip as bt, buttonClasses as xt, menuDivider as St, toast as Ct, useOpenMenu as H } from "@parallelworks/ui";
|
|
53
|
+
import { createContext as wt, useCallback as Tt, useContext as Et, useEffect as Dt, useMemo as Ot, useRef as U, useState as W } from "react";
|
|
54
|
+
import { useErrorMessage as kt } from "@parallelworks/problem/react";
|
|
55
|
+
import { useFormatter as At, useTranslations as G } from "use-intl";
|
|
55
56
|
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
56
57
|
import { useMutation as Y, useQuery as X, useQueryClient as Z, useSuspenseQuery as Q } from "@tanstack/react-query";
|
|
57
|
-
import { MoreButton as
|
|
58
|
-
import { ArchiveIcon as
|
|
58
|
+
import { MoreButton as jt } from "@parallelworks/ui/list";
|
|
59
|
+
import { ArchiveIcon as Mt } from "@parallelworks/ui/icons";
|
|
59
60
|
// src/routes/$workspace/issues/$identifier.tsx?tsr-split=component
|
|
60
|
-
function
|
|
61
|
-
let o = G("issue"), s = ne(), c =
|
|
61
|
+
function Nt() {
|
|
62
|
+
let o = G("issue"), s = ne(), c = kt(), l = G("common"), { workspace: u, identifier: d } = Re.useParams(), { data: m } = Q(p(u, d)), { data: g } = Q(y(u)), { data: _ } = Q(h), { data: v = [] } = X(f(u, d)), [S, C] = W();
|
|
62
63
|
Ve({
|
|
63
64
|
identifier: m.identifier,
|
|
64
65
|
...S && { field: S }
|
|
65
66
|
}), r(`${m.identifier} ${m.title}`), He(u, m.identifier);
|
|
66
67
|
let w = a(), T = n(m.identifier, m.title);
|
|
67
|
-
|
|
68
|
+
Dt(() => {
|
|
68
69
|
window.location.pathname.endsWith(`/issues/${T}`) || w({
|
|
69
70
|
to: "/$workspace/issues/$identifier",
|
|
70
71
|
params: {
|
|
@@ -95,7 +96,7 @@ function Mt() {
|
|
|
95
96
|
identifier: m.identifier
|
|
96
97
|
} } })),
|
|
97
98
|
onSuccess: () => {
|
|
98
|
-
|
|
99
|
+
Ct.success(o("deleted", { identifier: m.identifier })), b(O, u);
|
|
99
100
|
let e = g.find((e) => e.id === m.teamId)?.key;
|
|
100
101
|
w(e ? {
|
|
101
102
|
to: "/$workspace/teams/$key/issues",
|
|
@@ -108,14 +109,14 @@ function Mt() {
|
|
|
108
109
|
params: { workspace: u }
|
|
109
110
|
});
|
|
110
111
|
}
|
|
111
|
-
}), N =
|
|
112
|
+
}), N = Tt((e) => w({
|
|
112
113
|
to: "/$workspace/issues/$identifier",
|
|
113
114
|
params: {
|
|
114
115
|
workspace: u,
|
|
115
116
|
identifier: e
|
|
116
117
|
}
|
|
117
118
|
}), [w, u]);
|
|
118
|
-
ge(u, m.body, N),
|
|
119
|
+
ge(u, m.body, N), Dt(() => {
|
|
119
120
|
ze(u, {
|
|
120
121
|
kind: "issue",
|
|
121
122
|
href: `/${u}/issues/${m.identifier}`,
|
|
@@ -166,11 +167,11 @@ function Mt() {
|
|
|
166
167
|
kind: "issue",
|
|
167
168
|
target: m.id
|
|
168
169
|
}),
|
|
169
|
-
/* @__PURE__ */ q(
|
|
170
|
+
/* @__PURE__ */ q(ct, {
|
|
170
171
|
workspace: u,
|
|
171
172
|
identifier: m.identifier
|
|
172
173
|
}),
|
|
173
|
-
/* @__PURE__ */ q(
|
|
174
|
+
/* @__PURE__ */ q(pt, {
|
|
174
175
|
text: n(m.identifier, m.title),
|
|
175
176
|
label: o("copyBranchName"),
|
|
176
177
|
icon: /* @__PURE__ */ q(E, {}),
|
|
@@ -192,7 +193,7 @@ function Mt() {
|
|
|
192
193
|
workspace: u,
|
|
193
194
|
others: P
|
|
194
195
|
}),
|
|
195
|
-
/* @__PURE__ */ q(
|
|
196
|
+
/* @__PURE__ */ q(jt, {
|
|
196
197
|
items: () => [...re([m]), ...D ? [{
|
|
197
198
|
label: o("deleteIssue"),
|
|
198
199
|
destructive: !0,
|
|
@@ -208,7 +209,7 @@ function Mt() {
|
|
|
208
209
|
})
|
|
209
210
|
]
|
|
210
211
|
}),
|
|
211
|
-
I.isError && /* @__PURE__ */ q(
|
|
212
|
+
I.isError && /* @__PURE__ */ q(ht, {
|
|
212
213
|
inline: !0,
|
|
213
214
|
className: "ml-auto text-xs",
|
|
214
215
|
children: c(I.error)
|
|
@@ -223,16 +224,16 @@ function Mt() {
|
|
|
223
224
|
children: /* @__PURE__ */ J("article", {
|
|
224
225
|
className: "w-full px-4 pt-6 pb-24 md:px-8 md:pt-8",
|
|
225
226
|
children: [
|
|
226
|
-
/* @__PURE__ */ J(
|
|
227
|
+
/* @__PURE__ */ J(Xt.Provider, {
|
|
227
228
|
value: C,
|
|
228
229
|
children: [
|
|
229
|
-
m.triage && /* @__PURE__ */ q(
|
|
230
|
+
m.triage && /* @__PURE__ */ q(Pt, {
|
|
230
231
|
workspace: u,
|
|
231
232
|
issue: m
|
|
232
233
|
}),
|
|
233
|
-
m.archivedAt && /* @__PURE__ */ q(
|
|
234
|
+
m.archivedAt && /* @__PURE__ */ q(dt, {
|
|
234
235
|
tone: "muted",
|
|
235
|
-
icon: /* @__PURE__ */ q(
|
|
236
|
+
icon: /* @__PURE__ */ q(Mt, {}),
|
|
236
237
|
className: "mb-5",
|
|
237
238
|
children: /* @__PURE__ */ J("span", {
|
|
238
239
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
@@ -245,7 +246,7 @@ function Mt() {
|
|
|
245
246
|
})]
|
|
246
247
|
})
|
|
247
248
|
}),
|
|
248
|
-
/* @__PURE__ */ q(
|
|
249
|
+
/* @__PURE__ */ q(Ft, {
|
|
249
250
|
issue: m,
|
|
250
251
|
onSave: (e) => I.mutate({ title: e })
|
|
251
252
|
}),
|
|
@@ -254,7 +255,7 @@ function Mt() {
|
|
|
254
255
|
others: P,
|
|
255
256
|
field: "title"
|
|
256
257
|
}),
|
|
257
|
-
/* @__PURE__ */ q(
|
|
258
|
+
/* @__PURE__ */ q(It, {
|
|
258
259
|
workspace: u,
|
|
259
260
|
issue: m
|
|
260
261
|
}),
|
|
@@ -263,7 +264,7 @@ function Mt() {
|
|
|
263
264
|
others: P,
|
|
264
265
|
field: "body"
|
|
265
266
|
}),
|
|
266
|
-
/* @__PURE__ */ q(
|
|
267
|
+
/* @__PURE__ */ q(rt, {
|
|
267
268
|
workspace: u,
|
|
268
269
|
issue: m
|
|
269
270
|
}),
|
|
@@ -272,7 +273,7 @@ function Mt() {
|
|
|
272
273
|
identifier: m.identifier,
|
|
273
274
|
enabled: !!F?.customerRequestsEnabled
|
|
274
275
|
}),
|
|
275
|
-
/* @__PURE__ */ q(
|
|
276
|
+
/* @__PURE__ */ q(Lt, {
|
|
276
277
|
workspace: u,
|
|
277
278
|
identifier: d
|
|
278
279
|
}),
|
|
@@ -281,11 +282,15 @@ function Mt() {
|
|
|
281
282
|
identifier: d,
|
|
282
283
|
title: m.title
|
|
283
284
|
}),
|
|
285
|
+
/* @__PURE__ */ q(at, {
|
|
286
|
+
workspace: u,
|
|
287
|
+
identifier: d
|
|
288
|
+
}),
|
|
284
289
|
/* @__PURE__ */ q(it, {
|
|
285
290
|
workspace: u,
|
|
286
291
|
identifier: d
|
|
287
292
|
}),
|
|
288
|
-
/* @__PURE__ */ q(
|
|
293
|
+
/* @__PURE__ */ q(tt, {
|
|
289
294
|
workspace: u,
|
|
290
295
|
identifier: d
|
|
291
296
|
}),
|
|
@@ -293,14 +298,14 @@ function Mt() {
|
|
|
293
298
|
workspace: u,
|
|
294
299
|
identifier: d
|
|
295
300
|
}),
|
|
296
|
-
/* @__PURE__ */ q(
|
|
301
|
+
/* @__PURE__ */ q(Wt, {
|
|
297
302
|
workspace: u,
|
|
298
303
|
identifier: d,
|
|
299
304
|
others: P
|
|
300
305
|
})
|
|
301
306
|
]
|
|
302
307
|
}),
|
|
303
|
-
/* @__PURE__ */ q(
|
|
308
|
+
/* @__PURE__ */ q(Ut, {
|
|
304
309
|
workspace: u,
|
|
305
310
|
identifier: d
|
|
306
311
|
}),
|
|
@@ -310,7 +315,7 @@ function Mt() {
|
|
|
310
315
|
})
|
|
311
316
|
]
|
|
312
317
|
})
|
|
313
|
-
}), /* @__PURE__ */ q(
|
|
318
|
+
}), /* @__PURE__ */ q(Rt, {
|
|
314
319
|
workspace: u,
|
|
315
320
|
issue: m,
|
|
316
321
|
team: F,
|
|
@@ -322,8 +327,8 @@ function Mt() {
|
|
|
322
327
|
]
|
|
323
328
|
});
|
|
324
329
|
}
|
|
325
|
-
function
|
|
326
|
-
let i = G("triage"), a =
|
|
330
|
+
function Pt({ workspace: n, issue: r }) {
|
|
331
|
+
let i = G("triage"), a = kt(), o = Z(), s = ye(n, r.teamId), c = Y({
|
|
327
332
|
mutationFn: async (i) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
|
|
328
333
|
params: { path: {
|
|
329
334
|
workspace: n,
|
|
@@ -368,12 +373,12 @@ function Nt({ workspace: n, issue: r }) {
|
|
|
368
373
|
]
|
|
369
374
|
});
|
|
370
375
|
}
|
|
371
|
-
function
|
|
372
|
-
let n = G("issue"), r =
|
|
376
|
+
function Ft({ issue: e, onSave: t }) {
|
|
377
|
+
let n = G("issue"), r = Et(Xt);
|
|
373
378
|
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("h1", {
|
|
374
379
|
className: "sr-only",
|
|
375
380
|
children: e.title
|
|
376
|
-
}), /* @__PURE__ */ q(
|
|
381
|
+
}), /* @__PURE__ */ q(yt, {
|
|
377
382
|
value: e.title,
|
|
378
383
|
onCommit: t,
|
|
379
384
|
onFocus: () => r("title"),
|
|
@@ -381,8 +386,8 @@ function Pt({ issue: e, onSave: t }) {
|
|
|
381
386
|
"aria-label": n("title")
|
|
382
387
|
})] });
|
|
383
388
|
}
|
|
384
|
-
function
|
|
385
|
-
let n = G("issue"), r = G("common"), i =
|
|
389
|
+
function It({ workspace: e, issue: t }) {
|
|
390
|
+
let n = G("issue"), r = G("common"), i = Et(Xt), { data: a } = Q(h), o = U(null), s = Ot(() => ({
|
|
386
391
|
name: a?.user.name ?? n("someone"),
|
|
387
392
|
color: We(a?.user.username ?? "")
|
|
388
393
|
}), [
|
|
@@ -416,7 +421,7 @@ function Ft({ workspace: e, issue: t }) {
|
|
|
416
421
|
editable: !1,
|
|
417
422
|
className: "min-h-32"
|
|
418
423
|
}),
|
|
419
|
-
/* @__PURE__ */ q(
|
|
424
|
+
/* @__PURE__ */ q(ht, {
|
|
420
425
|
className: "mt-1",
|
|
421
426
|
children: l
|
|
422
427
|
}),
|
|
@@ -427,7 +432,7 @@ function Ft({ workspace: e, issue: t }) {
|
|
|
427
432
|
error: d.error
|
|
428
433
|
}), /* @__PURE__ */ q(Ae, { onFiles: (e) => d.upload(u.current, e) })]
|
|
429
434
|
}),
|
|
430
|
-
/* @__PURE__ */ q(
|
|
435
|
+
/* @__PURE__ */ q(ot, {
|
|
431
436
|
workspace: e,
|
|
432
437
|
identifier: t.identifier,
|
|
433
438
|
reactions: f,
|
|
@@ -437,7 +442,7 @@ function Ft({ workspace: e, issue: t }) {
|
|
|
437
442
|
]
|
|
438
443
|
});
|
|
439
444
|
}
|
|
440
|
-
function
|
|
445
|
+
function Lt({ workspace: e, identifier: t }) {
|
|
441
446
|
let n = G("issue"), { data: r } = Q(d(e, t)), a = H(), o = w(e);
|
|
442
447
|
return r.length === 0 ? null : /* @__PURE__ */ J("section", {
|
|
443
448
|
className: "mt-6",
|
|
@@ -454,7 +459,7 @@ function It({ workspace: e, identifier: t }) {
|
|
|
454
459
|
doc: C(t)
|
|
455
460
|
},
|
|
456
461
|
onContextMenu: (e) => a(e, o(t)),
|
|
457
|
-
className: `${
|
|
462
|
+
className: `${xt({ size: "sm" })} max-w-72`,
|
|
458
463
|
children: [/* @__PURE__ */ q(j, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ q("span", {
|
|
459
464
|
className: "truncate",
|
|
460
465
|
children: t.title
|
|
@@ -463,7 +468,7 @@ function It({ workspace: e, identifier: t }) {
|
|
|
463
468
|
})]
|
|
464
469
|
});
|
|
465
470
|
}
|
|
466
|
-
function
|
|
471
|
+
function Rt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c }) {
|
|
467
472
|
let l = G("relations"), u = i?.key, d = G("issue.properties"), p = G("common"), h = ee(), { data: g = [] } = X({
|
|
468
473
|
...v(n, u ?? ""),
|
|
469
474
|
enabled: !!u
|
|
@@ -472,7 +477,7 @@ function Lt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
472
477
|
params: { path: { workspace: n } },
|
|
473
478
|
body: {
|
|
474
479
|
name: r,
|
|
475
|
-
color:
|
|
480
|
+
color: zt[_.length % zt.length] ?? "#d73a4a"
|
|
476
481
|
}
|
|
477
482
|
})),
|
|
478
483
|
onSuccess: (e) => {
|
|
@@ -508,7 +513,7 @@ function Lt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
508
513
|
})
|
|
509
514
|
})
|
|
510
515
|
}),
|
|
511
|
-
/* @__PURE__ */ q(
|
|
516
|
+
/* @__PURE__ */ q(Ht, {
|
|
512
517
|
workspace: n,
|
|
513
518
|
issue: r,
|
|
514
519
|
update: c,
|
|
@@ -592,7 +597,7 @@ function Lt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
592
597
|
kind: e.kind,
|
|
593
598
|
handle: e.handle,
|
|
594
599
|
className: "flex items-center gap-1.5",
|
|
595
|
-
children: [/* @__PURE__ */ q(
|
|
600
|
+
children: [/* @__PURE__ */ q(ut, {
|
|
596
601
|
...De(e.kind),
|
|
597
602
|
name: t,
|
|
598
603
|
src: S(e.kind, e.handle),
|
|
@@ -668,13 +673,13 @@ function Lt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
668
673
|
}),
|
|
669
674
|
/* @__PURE__ */ q($, {
|
|
670
675
|
label: l("parent"),
|
|
671
|
-
children: /* @__PURE__ */ q(
|
|
676
|
+
children: /* @__PURE__ */ q(nt, {
|
|
672
677
|
workspace: n,
|
|
673
678
|
issue: r,
|
|
674
679
|
row: A
|
|
675
680
|
})
|
|
676
681
|
}),
|
|
677
|
-
/* @__PURE__ */ q(
|
|
682
|
+
/* @__PURE__ */ q(Vt, {
|
|
678
683
|
workspace: n,
|
|
679
684
|
issue: r,
|
|
680
685
|
team: i,
|
|
@@ -689,14 +694,14 @@ function Lt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
689
694
|
workspace: n,
|
|
690
695
|
kind: r.creator.kind,
|
|
691
696
|
handle: r.creator.handle,
|
|
692
|
-
children: /* @__PURE__ */ q(
|
|
697
|
+
children: /* @__PURE__ */ q(ut, {
|
|
693
698
|
...De(r.creator.kind),
|
|
694
699
|
name: x(r.creator),
|
|
695
700
|
src: S(r.creator.kind, r.creator.handle),
|
|
696
701
|
size: "xs",
|
|
697
702
|
tooltip: r.creator.kind !== "user"
|
|
698
703
|
})
|
|
699
|
-
}), /* @__PURE__ */ q(
|
|
704
|
+
}), /* @__PURE__ */ q(vt, {
|
|
700
705
|
value: r.createdAt,
|
|
701
706
|
exact: "medium"
|
|
702
707
|
})]
|
|
@@ -704,7 +709,7 @@ function Lt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
704
709
|
}),
|
|
705
710
|
/* @__PURE__ */ q($, {
|
|
706
711
|
label: d("timeInStatus"),
|
|
707
|
-
children: /* @__PURE__ */ q(
|
|
712
|
+
children: /* @__PURE__ */ q(st, {
|
|
708
713
|
workspace: n,
|
|
709
714
|
identifier: r.identifier
|
|
710
715
|
})
|
|
@@ -724,7 +729,7 @@ function Lt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
724
729
|
]
|
|
725
730
|
});
|
|
726
731
|
}
|
|
727
|
-
var
|
|
732
|
+
var zt = [
|
|
728
733
|
"#d73a4a",
|
|
729
734
|
"#2f8a57",
|
|
730
735
|
"#8250df",
|
|
@@ -733,7 +738,7 @@ var Rt = [
|
|
|
733
738
|
"#57606a",
|
|
734
739
|
"#1a7f37"
|
|
735
740
|
];
|
|
736
|
-
function
|
|
741
|
+
function Bt({ workspace: e, origin: t, className: n }) {
|
|
737
742
|
let r = "size-3.5 shrink-0 text-muted-foreground", a = t.title.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
|
|
738
743
|
switch (t.kind) {
|
|
739
744
|
case "decision": return /* @__PURE__ */ J(i, {
|
|
@@ -743,7 +748,7 @@ function zt({ workspace: e, origin: t, className: n }) {
|
|
|
743
748
|
identifier: t.key
|
|
744
749
|
},
|
|
745
750
|
className: n,
|
|
746
|
-
children: [/* @__PURE__ */ q(M, { className: r }), /* @__PURE__ */ q(
|
|
751
|
+
children: [/* @__PURE__ */ q(M, { className: r }), /* @__PURE__ */ q(bt, {
|
|
747
752
|
content: a,
|
|
748
753
|
overflowOnly: !0,
|
|
749
754
|
children: /* @__PURE__ */ q("span", {
|
|
@@ -775,7 +780,7 @@ function zt({ workspace: e, origin: t, className: n }) {
|
|
|
775
780
|
});
|
|
776
781
|
}
|
|
777
782
|
}
|
|
778
|
-
function
|
|
783
|
+
function Vt({ workspace: e, issue: t, team: n, update: r, row: i }) {
|
|
779
784
|
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({
|
|
780
785
|
...l(e, n?.key ?? ""),
|
|
781
786
|
enabled: !!n?.cyclesEnabled
|
|
@@ -839,7 +844,7 @@ function Bt({ workspace: e, issue: t, team: n, update: r, row: i }) {
|
|
|
839
844
|
}),
|
|
840
845
|
t.origin && /* @__PURE__ */ q($, {
|
|
841
846
|
label: a("startedFrom"),
|
|
842
|
-
children: /* @__PURE__ */ q(
|
|
847
|
+
children: /* @__PURE__ */ q(Bt, {
|
|
843
848
|
workspace: e,
|
|
844
849
|
origin: t.origin,
|
|
845
850
|
className: i
|
|
@@ -956,7 +961,7 @@ function Bt({ workspace: e, issue: t, team: n, update: r, row: i }) {
|
|
|
956
961
|
label: a("dueDate"),
|
|
957
962
|
children: /* @__PURE__ */ J("div", {
|
|
958
963
|
className: "flex items-center",
|
|
959
|
-
children: [/* @__PURE__ */ q(
|
|
964
|
+
children: [/* @__PURE__ */ q(mt, {
|
|
960
965
|
value: t.dueDate ?? "",
|
|
961
966
|
onValueChange: (e) => r({ dueDate: e }),
|
|
962
967
|
"aria-label": a("dueDate"),
|
|
@@ -972,7 +977,7 @@ function Bt({ workspace: e, issue: t, team: n, update: r, row: i }) {
|
|
|
972
977
|
children: a("noDueDate")
|
|
973
978
|
})] })
|
|
974
979
|
})
|
|
975
|
-
}), t.dueDate && /* @__PURE__ */ q(
|
|
980
|
+
}), t.dueDate && /* @__PURE__ */ q(gt, {
|
|
976
981
|
variant: "ghost",
|
|
977
982
|
icon: /* @__PURE__ */ q(O, { className: "size-3.5" }),
|
|
978
983
|
label: a("clearDueDate"),
|
|
@@ -992,8 +997,8 @@ function Bt({ workspace: e, issue: t, team: n, update: r, row: i }) {
|
|
|
992
997
|
})
|
|
993
998
|
] });
|
|
994
999
|
}
|
|
995
|
-
function
|
|
996
|
-
let i = G("issueTypes"), a =
|
|
1000
|
+
function Ht({ workspace: e, issue: t, update: n, row: r }) {
|
|
1001
|
+
let i = G("issueTypes"), a = At(), { data: o } = X(Ce(e)), { data: s } = X(be(e)), { confirm: c, dialog: l } = Se(), [u, d] = W(!1), f = Te(o, t.teamId);
|
|
997
1002
|
if (f.length === 0 && !t.type) return null;
|
|
998
1003
|
let p = (e) => {
|
|
999
1004
|
let r = f.find((t) => t.id === e), o = (s ?? []).filter((e) => xe(t.fields[e.id]) && !we(r, e.id));
|
|
@@ -1040,15 +1045,15 @@ function Vt({ workspace: e, issue: t, update: n, row: r }) {
|
|
|
1040
1045
|
function $({ label: e, shortcut: t, children: n }) {
|
|
1041
1046
|
return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("p", {
|
|
1042
1047
|
className: "mb-1 flex items-center justify-between px-2 text-xs text-muted-foreground",
|
|
1043
|
-
children: [e, t && /* @__PURE__ */ q(
|
|
1048
|
+
children: [e, t && /* @__PURE__ */ q(_t, {
|
|
1044
1049
|
keys: t,
|
|
1045
1050
|
size: "xs",
|
|
1046
1051
|
className: "hidden md:inline-flex"
|
|
1047
1052
|
})]
|
|
1048
1053
|
}), n] });
|
|
1049
1054
|
}
|
|
1050
|
-
function
|
|
1051
|
-
let n = G("issue.activity"), { data: r } = Q(u(e, t)), [i, a] = W(!1), o =
|
|
1055
|
+
function Ut({ workspace: e, identifier: t }) {
|
|
1056
|
+
let n = G("issue.activity"), { data: r } = Q(u(e, t)), [i, a] = W(!1), o = Ot(() => {
|
|
1052
1057
|
let e = [];
|
|
1053
1058
|
for (let t of r) {
|
|
1054
1059
|
if (t.type.startsWith("comment.") || t.type.startsWith("issue.reaction_")) continue;
|
|
@@ -1081,14 +1086,14 @@ function Ht({ workspace: e, identifier: t }) {
|
|
|
1081
1086
|
]
|
|
1082
1087
|
});
|
|
1083
1088
|
}
|
|
1084
|
-
function
|
|
1085
|
-
let r = G("issue.comments"), { data: i } = Q(c(e, t)), { data: a = [] } = X(f(e, t)), o =
|
|
1089
|
+
function Wt({ workspace: e, identifier: t, others: n }) {
|
|
1090
|
+
let r = G("issue.comments"), { data: i } = Q(c(e, t)), { data: a = [] } = X(f(e, t)), o = Ot(() => {
|
|
1086
1091
|
let e = i.filter((e) => !e.parentId);
|
|
1087
|
-
return e.sort((e, t) => Number(
|
|
1092
|
+
return e.sort((e, t) => Number(Gt(t)) - Number(Gt(e))), e.map((e) => ({
|
|
1088
1093
|
root: e,
|
|
1089
1094
|
replies: i.filter((t) => t.parentId === e.id)
|
|
1090
1095
|
}));
|
|
1091
|
-
}, [i]), [s, l] = W(null), u = i.filter((e) => !e.deletedAt && !
|
|
1096
|
+
}, [i]), [s, l] = W(null), u = i.filter((e) => !e.deletedAt && !Gt(e)).length;
|
|
1092
1097
|
return /* @__PURE__ */ J("section", {
|
|
1093
1098
|
className: "mt-12 border-t border-border pt-6",
|
|
1094
1099
|
"aria-label": r("title"),
|
|
@@ -1107,8 +1112,8 @@ function Ut({ workspace: e, identifier: t, others: n }) {
|
|
|
1107
1112
|
/* @__PURE__ */ q("div", {
|
|
1108
1113
|
className: "mt-4 space-y-3",
|
|
1109
1114
|
children: o.map(({ root: n, replies: i }) => {
|
|
1110
|
-
let o =
|
|
1111
|
-
return /* @__PURE__ */ J(
|
|
1115
|
+
let o = Gt(n) ? n.sharedWith : void 0, c = o ? L(o).source : void 0;
|
|
1116
|
+
return /* @__PURE__ */ J(ft, {
|
|
1112
1117
|
size: "fill",
|
|
1113
1118
|
padding: "none",
|
|
1114
1119
|
highlight: !!o,
|
|
@@ -1120,7 +1125,7 @@ function Ut({ workspace: e, identifier: t, others: n }) {
|
|
|
1120
1125
|
o && c ? /* @__PURE__ */ q($e, {
|
|
1121
1126
|
source: c,
|
|
1122
1127
|
link: a.find((e) => e.connector === o)
|
|
1123
|
-
}) : /* @__PURE__ */ q(
|
|
1128
|
+
}) : /* @__PURE__ */ q(qt, {
|
|
1124
1129
|
workspace: e,
|
|
1125
1130
|
identifier: t,
|
|
1126
1131
|
comment: n,
|
|
@@ -1131,7 +1136,7 @@ function Ut({ workspace: e, identifier: t, others: n }) {
|
|
|
1131
1136
|
children: i.map((r) => /* @__PURE__ */ q("li", {
|
|
1132
1137
|
id: `comment-${r.id}`,
|
|
1133
1138
|
className: "border-b border-border/50 last:border-b-0",
|
|
1134
|
-
children: /* @__PURE__ */ q(
|
|
1139
|
+
children: /* @__PURE__ */ q(qt, {
|
|
1135
1140
|
workspace: e,
|
|
1136
1141
|
identifier: t,
|
|
1137
1142
|
comment: r,
|
|
@@ -1141,7 +1146,7 @@ function Ut({ workspace: e, identifier: t, others: n }) {
|
|
|
1141
1146
|
}),
|
|
1142
1147
|
/* @__PURE__ */ q("div", {
|
|
1143
1148
|
className: "border-t border-border/70 px-3 py-2",
|
|
1144
|
-
children: s === n.id ? /* @__PURE__ */ q(
|
|
1149
|
+
children: s === n.id ? /* @__PURE__ */ q(Yt, {
|
|
1145
1150
|
workspace: e,
|
|
1146
1151
|
identifier: t,
|
|
1147
1152
|
parentId: n.id,
|
|
@@ -1159,12 +1164,12 @@ function Ut({ workspace: e, identifier: t, others: n }) {
|
|
|
1159
1164
|
}, n.id);
|
|
1160
1165
|
})
|
|
1161
1166
|
}),
|
|
1162
|
-
/* @__PURE__ */ q(
|
|
1167
|
+
/* @__PURE__ */ q(ft, {
|
|
1163
1168
|
size: "fill",
|
|
1164
1169
|
padding: "sm",
|
|
1165
1170
|
focusWithin: !0,
|
|
1166
1171
|
className: "mt-4",
|
|
1167
|
-
children: /* @__PURE__ */ q(
|
|
1172
|
+
children: /* @__PURE__ */ q(Yt, {
|
|
1168
1173
|
workspace: e,
|
|
1169
1174
|
identifier: t
|
|
1170
1175
|
})
|
|
@@ -1180,15 +1185,15 @@ function Ut({ workspace: e, identifier: t, others: n }) {
|
|
|
1180
1185
|
]
|
|
1181
1186
|
});
|
|
1182
1187
|
}
|
|
1183
|
-
var
|
|
1184
|
-
function
|
|
1188
|
+
var Gt = (e) => !!e.sharedWith && !e.parentId;
|
|
1189
|
+
function Kt({ comment: e }) {
|
|
1185
1190
|
let t = G("issue.comments");
|
|
1186
1191
|
return e.author.kind === "connector" ? /* @__PURE__ */ q("span", {
|
|
1187
1192
|
className: "rounded border border-border px-1.5 py-px text-[10px] text-muted-foreground",
|
|
1188
1193
|
children: t("via", { source: L(e.author.handle).source })
|
|
1189
1194
|
}) : null;
|
|
1190
1195
|
}
|
|
1191
|
-
function
|
|
1196
|
+
function qt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
1192
1197
|
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: {
|
|
1193
1198
|
workspace: n,
|
|
1194
1199
|
identifier: r,
|
|
@@ -1217,7 +1222,7 @@ function Kt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
|
1217
1222
|
S(s("copyLink"), M),
|
|
1218
1223
|
S(o("copyText"), i.body),
|
|
1219
1224
|
...D ? [
|
|
1220
|
-
|
|
1225
|
+
St,
|
|
1221
1226
|
{
|
|
1222
1227
|
label: o("edit"),
|
|
1223
1228
|
onClick: () => {
|
|
@@ -1242,7 +1247,7 @@ function Kt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
|
1242
1247
|
kind: i.author.kind,
|
|
1243
1248
|
handle: i.author.handle,
|
|
1244
1249
|
className: "flex items-center gap-2",
|
|
1245
|
-
children: [/* @__PURE__ */ q(
|
|
1250
|
+
children: [/* @__PURE__ */ q(ut, {
|
|
1246
1251
|
...De(i.author.kind),
|
|
1247
1252
|
name: c(i.author),
|
|
1248
1253
|
src: l(i.author.kind, i.author.handle),
|
|
@@ -1253,15 +1258,15 @@ function Kt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
|
1253
1258
|
children: c(i.author)
|
|
1254
1259
|
})]
|
|
1255
1260
|
}),
|
|
1256
|
-
/* @__PURE__ */ q(
|
|
1261
|
+
/* @__PURE__ */ q(Kt, { comment: i }),
|
|
1257
1262
|
/* @__PURE__ */ J("span", {
|
|
1258
1263
|
className: "text-muted-foreground",
|
|
1259
|
-
children: [/* @__PURE__ */ q(
|
|
1264
|
+
children: [/* @__PURE__ */ q(vt, {
|
|
1260
1265
|
value: i.createdAt,
|
|
1261
1266
|
exact: "medium"
|
|
1262
1267
|
}), i.updatedAt !== i.createdAt && /* @__PURE__ */ J(K, { children: [" ", o("edited")] })]
|
|
1263
1268
|
}),
|
|
1264
|
-
!C && !g && /* @__PURE__ */ q(
|
|
1269
|
+
!C && !g && /* @__PURE__ */ q(jt, {
|
|
1265
1270
|
items: N,
|
|
1266
1271
|
className: "ml-auto"
|
|
1267
1272
|
}),
|
|
@@ -1324,16 +1329,16 @@ function Kt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
|
1324
1329
|
value: i.body,
|
|
1325
1330
|
editable: !1
|
|
1326
1331
|
}),
|
|
1327
|
-
/* @__PURE__ */ q(
|
|
1332
|
+
/* @__PURE__ */ q(lt, {
|
|
1328
1333
|
workspace: n,
|
|
1329
1334
|
widgets: i.widgets
|
|
1330
1335
|
}),
|
|
1331
|
-
/* @__PURE__ */ q(
|
|
1336
|
+
/* @__PURE__ */ q(Jt, {
|
|
1332
1337
|
workspace: n,
|
|
1333
1338
|
identifier: r,
|
|
1334
1339
|
comment: i
|
|
1335
1340
|
}),
|
|
1336
|
-
/* @__PURE__ */ q(
|
|
1341
|
+
/* @__PURE__ */ q(ot, {
|
|
1337
1342
|
workspace: n,
|
|
1338
1343
|
identifier: r,
|
|
1339
1344
|
commentId: i.id,
|
|
@@ -1345,7 +1350,7 @@ function Kt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
|
1345
1350
|
})]
|
|
1346
1351
|
});
|
|
1347
1352
|
}
|
|
1348
|
-
function
|
|
1353
|
+
function Jt({ workspace: e, identifier: t, comment: n }) {
|
|
1349
1354
|
let { data: r = [] } = X(s(e, t)), { actorName: i } = te(e), a = r.filter((e) => e.page && e.commentId === n.id);
|
|
1350
1355
|
return a.length === 0 ? null : /* @__PURE__ */ q("div", {
|
|
1351
1356
|
className: "mt-2 space-y-2",
|
|
@@ -1356,8 +1361,8 @@ function qt({ workspace: e, identifier: t, comment: n }) {
|
|
|
1356
1361
|
}, e.id))
|
|
1357
1362
|
});
|
|
1358
1363
|
}
|
|
1359
|
-
function
|
|
1360
|
-
let c = G("issue.comments"), l =
|
|
1364
|
+
function Yt({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus: o = !1, onDone: s }) {
|
|
1365
|
+
let c = G("issue.comments"), l = kt(), u = G("common"), d = Et(Xt), f = Z(), [p, m] = W(""), [h, g] = W(0), _ = U(null), v = Ne(n, r), y = Y({
|
|
1361
1366
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/comments", {
|
|
1362
1367
|
params: { path: {
|
|
1363
1368
|
workspace: n,
|
|
@@ -1396,7 +1401,7 @@ function Jt({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus:
|
|
|
1396
1401
|
error: v.error
|
|
1397
1402
|
})]
|
|
1398
1403
|
}),
|
|
1399
|
-
y.isError && /* @__PURE__ */ q(
|
|
1404
|
+
y.isError && /* @__PURE__ */ q(ht, {
|
|
1400
1405
|
inline: !0,
|
|
1401
1406
|
className: "text-xs",
|
|
1402
1407
|
children: l(y.error)
|
|
@@ -1420,5 +1425,5 @@ function Jt({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus:
|
|
|
1420
1425
|
]
|
|
1421
1426
|
})] });
|
|
1422
1427
|
}
|
|
1423
|
-
var
|
|
1424
|
-
export {
|
|
1428
|
+
var Xt = wt(() => {});
|
|
1429
|
+
export { Nt as component };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createFileRoute as e, lazyFn as t, lazyRouteComponent as n } from "@tanstack/react-router";
|
|
2
|
+
var r = e("/$workspace/settings/intercom")({
|
|
3
|
+
loader: t(() => import("./intercom3.js"), "loader"),
|
|
4
|
+
component: n(() => import("./intercom2.js"), "component")
|
|
5
|
+
});
|
|
6
|
+
export { r as Route };
|