@parallelworks/tandem-web 0.155.2 → 0.157.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.
@@ -41,29 +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 { ParentProperty as tt, SubIssuesAndRelations as nt } from "../../../components/IssueRelations.js";
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";
52
- import { useErrorMessage as Dt } from "@parallelworks/problem/react";
53
- import { useFormatter as Ot, useTranslations as G } from "use-intl";
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";
54
56
  import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
55
57
  import { useMutation as Y, useQuery as X, useQueryClient as Z, useSuspenseQuery as Q } from "@tanstack/react-query";
56
- import { MoreButton as kt } from "@parallelworks/ui/list";
57
- import { ArchiveIcon as At } from "@parallelworks/ui/icons";
58
+ import { MoreButton as jt } from "@parallelworks/ui/list";
59
+ import { ArchiveIcon as Mt } from "@parallelworks/ui/icons";
58
60
  // src/routes/$workspace/issues/$identifier.tsx?tsr-split=component
59
- function jt() {
60
- let o = G("issue"), s = ne(), c = Dt(), 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();
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();
61
63
  Ve({
62
64
  identifier: m.identifier,
63
65
  ...S && { field: S }
64
66
  }), r(`${m.identifier} ${m.title}`), He(u, m.identifier);
65
67
  let w = a(), T = n(m.identifier, m.title);
66
- Tt(() => {
68
+ Dt(() => {
67
69
  window.location.pathname.endsWith(`/issues/${T}`) || w({
68
70
  to: "/$workspace/issues/$identifier",
69
71
  params: {
@@ -94,7 +96,7 @@ function jt() {
94
96
  identifier: m.identifier
95
97
  } } })),
96
98
  onSuccess: () => {
97
- xt.success(o("deleted", { identifier: m.identifier })), b(O, u);
99
+ Ct.success(o("deleted", { identifier: m.identifier })), b(O, u);
98
100
  let e = g.find((e) => e.id === m.teamId)?.key;
99
101
  w(e ? {
100
102
  to: "/$workspace/teams/$key/issues",
@@ -107,14 +109,14 @@ function jt() {
107
109
  params: { workspace: u }
108
110
  });
109
111
  }
110
- }), N = Ct((e) => w({
112
+ }), N = Tt((e) => w({
111
113
  to: "/$workspace/issues/$identifier",
112
114
  params: {
113
115
  workspace: u,
114
116
  identifier: e
115
117
  }
116
118
  }), [w, u]);
117
- ge(u, m.body, N), Tt(() => {
119
+ ge(u, m.body, N), Dt(() => {
118
120
  ze(u, {
119
121
  kind: "issue",
120
122
  href: `/${u}/issues/${m.identifier}`,
@@ -165,11 +167,11 @@ function jt() {
165
167
  kind: "issue",
166
168
  target: m.id
167
169
  }),
168
- /* @__PURE__ */ q(ot, {
170
+ /* @__PURE__ */ q(ct, {
169
171
  workspace: u,
170
172
  identifier: m.identifier
171
173
  }),
172
- /* @__PURE__ */ q(dt, {
174
+ /* @__PURE__ */ q(pt, {
173
175
  text: n(m.identifier, m.title),
174
176
  label: o("copyBranchName"),
175
177
  icon: /* @__PURE__ */ q(E, {}),
@@ -191,7 +193,7 @@ function jt() {
191
193
  workspace: u,
192
194
  others: P
193
195
  }),
194
- /* @__PURE__ */ q(kt, {
196
+ /* @__PURE__ */ q(jt, {
195
197
  items: () => [...re([m]), ...D ? [{
196
198
  label: o("deleteIssue"),
197
199
  destructive: !0,
@@ -207,7 +209,7 @@ function jt() {
207
209
  })
208
210
  ]
209
211
  }),
210
- I.isError && /* @__PURE__ */ q(pt, {
212
+ I.isError && /* @__PURE__ */ q(ht, {
211
213
  inline: !0,
212
214
  className: "ml-auto text-xs",
213
215
  children: c(I.error)
@@ -222,16 +224,16 @@ function jt() {
222
224
  children: /* @__PURE__ */ J("article", {
223
225
  className: "w-full px-4 pt-6 pb-24 md:px-8 md:pt-8",
224
226
  children: [
225
- /* @__PURE__ */ J(Jt.Provider, {
227
+ /* @__PURE__ */ J(Xt.Provider, {
226
228
  value: C,
227
229
  children: [
228
- m.triage && /* @__PURE__ */ q(Mt, {
230
+ m.triage && /* @__PURE__ */ q(Pt, {
229
231
  workspace: u,
230
232
  issue: m
231
233
  }),
232
- m.archivedAt && /* @__PURE__ */ q(lt, {
234
+ m.archivedAt && /* @__PURE__ */ q(dt, {
233
235
  tone: "muted",
234
- icon: /* @__PURE__ */ q(At, {}),
236
+ icon: /* @__PURE__ */ q(Mt, {}),
235
237
  className: "mb-5",
236
238
  children: /* @__PURE__ */ J("span", {
237
239
  className: "flex flex-wrap items-center gap-x-3 gap-y-1",
@@ -244,7 +246,7 @@ function jt() {
244
246
  })]
245
247
  })
246
248
  }),
247
- /* @__PURE__ */ q(Nt, {
249
+ /* @__PURE__ */ q(Ft, {
248
250
  issue: m,
249
251
  onSave: (e) => I.mutate({ title: e })
250
252
  }),
@@ -253,7 +255,7 @@ function jt() {
253
255
  others: P,
254
256
  field: "title"
255
257
  }),
256
- /* @__PURE__ */ q(Pt, {
258
+ /* @__PURE__ */ q(It, {
257
259
  workspace: u,
258
260
  issue: m
259
261
  }),
@@ -262,7 +264,7 @@ function jt() {
262
264
  others: P,
263
265
  field: "body"
264
266
  }),
265
- /* @__PURE__ */ q(nt, {
267
+ /* @__PURE__ */ q(rt, {
266
268
  workspace: u,
267
269
  issue: m
268
270
  }),
@@ -271,7 +273,7 @@ function jt() {
271
273
  identifier: m.identifier,
272
274
  enabled: !!F?.customerRequestsEnabled
273
275
  }),
274
- /* @__PURE__ */ q(Ft, {
276
+ /* @__PURE__ */ q(Lt, {
275
277
  workspace: u,
276
278
  identifier: d
277
279
  }),
@@ -280,7 +282,15 @@ function jt() {
280
282
  identifier: d,
281
283
  title: m.title
282
284
  }),
283
- /* @__PURE__ */ q(rt, {
285
+ /* @__PURE__ */ q(at, {
286
+ workspace: u,
287
+ identifier: d
288
+ }),
289
+ /* @__PURE__ */ q(it, {
290
+ workspace: u,
291
+ identifier: d
292
+ }),
293
+ /* @__PURE__ */ q(tt, {
284
294
  workspace: u,
285
295
  identifier: d
286
296
  }),
@@ -288,14 +298,14 @@ function jt() {
288
298
  workspace: u,
289
299
  identifier: d
290
300
  }),
291
- /* @__PURE__ */ q(Ht, {
301
+ /* @__PURE__ */ q(Wt, {
292
302
  workspace: u,
293
303
  identifier: d,
294
304
  others: P
295
305
  })
296
306
  ]
297
307
  }),
298
- /* @__PURE__ */ q(Vt, {
308
+ /* @__PURE__ */ q(Ut, {
299
309
  workspace: u,
300
310
  identifier: d
301
311
  }),
@@ -305,7 +315,7 @@ function jt() {
305
315
  })
306
316
  ]
307
317
  })
308
- }), /* @__PURE__ */ q(It, {
318
+ }), /* @__PURE__ */ q(Rt, {
309
319
  workspace: u,
310
320
  issue: m,
311
321
  team: F,
@@ -317,8 +327,8 @@ function jt() {
317
327
  ]
318
328
  });
319
329
  }
320
- function Mt({ workspace: n, issue: r }) {
321
- let i = G("triage"), a = Dt(), o = Z(), s = ye(n, r.teamId), c = Y({
330
+ function Pt({ workspace: n, issue: r }) {
331
+ let i = G("triage"), a = kt(), o = Z(), s = ye(n, r.teamId), c = Y({
322
332
  mutationFn: async (i) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
323
333
  params: { path: {
324
334
  workspace: n,
@@ -363,12 +373,12 @@ function Mt({ workspace: n, issue: r }) {
363
373
  ]
364
374
  });
365
375
  }
366
- function Nt({ issue: e, onSave: t }) {
367
- let n = G("issue"), r = wt(Jt);
376
+ function Ft({ issue: e, onSave: t }) {
377
+ let n = G("issue"), r = Et(Xt);
368
378
  return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("h1", {
369
379
  className: "sr-only",
370
380
  children: e.title
371
- }), /* @__PURE__ */ q(_t, {
381
+ }), /* @__PURE__ */ q(yt, {
372
382
  value: e.title,
373
383
  onCommit: t,
374
384
  onFocus: () => r("title"),
@@ -376,8 +386,8 @@ function Nt({ issue: e, onSave: t }) {
376
386
  "aria-label": n("title")
377
387
  })] });
378
388
  }
379
- function Pt({ workspace: e, issue: t }) {
380
- let n = G("issue"), r = G("common"), i = wt(Jt), { data: a } = Q(h), o = U(null), s = Et(() => ({
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(() => ({
381
391
  name: a?.user.name ?? n("someone"),
382
392
  color: We(a?.user.username ?? "")
383
393
  }), [
@@ -411,7 +421,7 @@ function Pt({ workspace: e, issue: t }) {
411
421
  editable: !1,
412
422
  className: "min-h-32"
413
423
  }),
414
- /* @__PURE__ */ q(pt, {
424
+ /* @__PURE__ */ q(ht, {
415
425
  className: "mt-1",
416
426
  children: l
417
427
  }),
@@ -422,7 +432,7 @@ function Pt({ workspace: e, issue: t }) {
422
432
  error: d.error
423
433
  }), /* @__PURE__ */ q(Ae, { onFiles: (e) => d.upload(u.current, e) })]
424
434
  }),
425
- /* @__PURE__ */ q(it, {
435
+ /* @__PURE__ */ q(ot, {
426
436
  workspace: e,
427
437
  identifier: t.identifier,
428
438
  reactions: f,
@@ -432,7 +442,7 @@ function Pt({ workspace: e, issue: t }) {
432
442
  ]
433
443
  });
434
444
  }
435
- function Ft({ workspace: e, identifier: t }) {
445
+ function Lt({ workspace: e, identifier: t }) {
436
446
  let n = G("issue"), { data: r } = Q(d(e, t)), a = H(), o = w(e);
437
447
  return r.length === 0 ? null : /* @__PURE__ */ J("section", {
438
448
  className: "mt-6",
@@ -449,7 +459,7 @@ function Ft({ workspace: e, identifier: t }) {
449
459
  doc: C(t)
450
460
  },
451
461
  onContextMenu: (e) => a(e, o(t)),
452
- className: `${yt({ size: "sm" })} max-w-72`,
462
+ className: `${xt({ size: "sm" })} max-w-72`,
453
463
  children: [/* @__PURE__ */ q(j, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ q("span", {
454
464
  className: "truncate",
455
465
  children: t.title
@@ -458,7 +468,7 @@ function Ft({ workspace: e, identifier: t }) {
458
468
  })]
459
469
  });
460
470
  }
461
- function It({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c }) {
471
+ function Rt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c }) {
462
472
  let l = G("relations"), u = i?.key, d = G("issue.properties"), p = G("common"), h = ee(), { data: g = [] } = X({
463
473
  ...v(n, u ?? ""),
464
474
  enabled: !!u
@@ -467,7 +477,7 @@ function It({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
467
477
  params: { path: { workspace: n } },
468
478
  body: {
469
479
  name: r,
470
- color: Lt[_.length % Lt.length] ?? "#d73a4a"
480
+ color: zt[_.length % zt.length] ?? "#d73a4a"
471
481
  }
472
482
  })),
473
483
  onSuccess: (e) => {
@@ -503,7 +513,7 @@ function It({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
503
513
  })
504
514
  })
505
515
  }),
506
- /* @__PURE__ */ q(Bt, {
516
+ /* @__PURE__ */ q(Ht, {
507
517
  workspace: n,
508
518
  issue: r,
509
519
  update: c,
@@ -587,7 +597,7 @@ function It({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
587
597
  kind: e.kind,
588
598
  handle: e.handle,
589
599
  className: "flex items-center gap-1.5",
590
- children: [/* @__PURE__ */ q(ct, {
600
+ children: [/* @__PURE__ */ q(ut, {
591
601
  ...De(e.kind),
592
602
  name: t,
593
603
  src: S(e.kind, e.handle),
@@ -663,13 +673,13 @@ function It({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
663
673
  }),
664
674
  /* @__PURE__ */ q($, {
665
675
  label: l("parent"),
666
- children: /* @__PURE__ */ q(tt, {
676
+ children: /* @__PURE__ */ q(nt, {
667
677
  workspace: n,
668
678
  issue: r,
669
679
  row: A
670
680
  })
671
681
  }),
672
- /* @__PURE__ */ q(zt, {
682
+ /* @__PURE__ */ q(Vt, {
673
683
  workspace: n,
674
684
  issue: r,
675
685
  team: i,
@@ -684,14 +694,14 @@ function It({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
684
694
  workspace: n,
685
695
  kind: r.creator.kind,
686
696
  handle: r.creator.handle,
687
- children: /* @__PURE__ */ q(ct, {
697
+ children: /* @__PURE__ */ q(ut, {
688
698
  ...De(r.creator.kind),
689
699
  name: x(r.creator),
690
700
  src: S(r.creator.kind, r.creator.handle),
691
701
  size: "xs",
692
702
  tooltip: r.creator.kind !== "user"
693
703
  })
694
- }), /* @__PURE__ */ q(gt, {
704
+ }), /* @__PURE__ */ q(vt, {
695
705
  value: r.createdAt,
696
706
  exact: "medium"
697
707
  })]
@@ -699,7 +709,7 @@ function It({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
699
709
  }),
700
710
  /* @__PURE__ */ q($, {
701
711
  label: d("timeInStatus"),
702
- children: /* @__PURE__ */ q(at, {
712
+ children: /* @__PURE__ */ q(st, {
703
713
  workspace: n,
704
714
  identifier: r.identifier
705
715
  })
@@ -719,7 +729,7 @@ function It({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
719
729
  ]
720
730
  });
721
731
  }
722
- var Lt = [
732
+ var zt = [
723
733
  "#d73a4a",
724
734
  "#2f8a57",
725
735
  "#8250df",
@@ -728,7 +738,7 @@ var Lt = [
728
738
  "#57606a",
729
739
  "#1a7f37"
730
740
  ];
731
- function Rt({ workspace: e, origin: t, className: n }) {
741
+ function Bt({ workspace: e, origin: t, className: n }) {
732
742
  let r = "size-3.5 shrink-0 text-muted-foreground", a = t.title.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
733
743
  switch (t.kind) {
734
744
  case "decision": return /* @__PURE__ */ J(i, {
@@ -738,7 +748,7 @@ function Rt({ workspace: e, origin: t, className: n }) {
738
748
  identifier: t.key
739
749
  },
740
750
  className: n,
741
- children: [/* @__PURE__ */ q(M, { className: r }), /* @__PURE__ */ q(vt, {
751
+ children: [/* @__PURE__ */ q(M, { className: r }), /* @__PURE__ */ q(bt, {
742
752
  content: a,
743
753
  overflowOnly: !0,
744
754
  children: /* @__PURE__ */ q("span", {
@@ -770,7 +780,7 @@ function Rt({ workspace: e, origin: t, className: n }) {
770
780
  });
771
781
  }
772
782
  }
773
- function zt({ workspace: e, issue: t, team: n, update: r, row: i }) {
783
+ function Vt({ workspace: e, issue: t, team: n, update: r, row: i }) {
774
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({
775
785
  ...l(e, n?.key ?? ""),
776
786
  enabled: !!n?.cyclesEnabled
@@ -834,7 +844,7 @@ function zt({ workspace: e, issue: t, team: n, update: r, row: i }) {
834
844
  }),
835
845
  t.origin && /* @__PURE__ */ q($, {
836
846
  label: a("startedFrom"),
837
- children: /* @__PURE__ */ q(Rt, {
847
+ children: /* @__PURE__ */ q(Bt, {
838
848
  workspace: e,
839
849
  origin: t.origin,
840
850
  className: i
@@ -951,7 +961,7 @@ function zt({ workspace: e, issue: t, team: n, update: r, row: i }) {
951
961
  label: a("dueDate"),
952
962
  children: /* @__PURE__ */ J("div", {
953
963
  className: "flex items-center",
954
- children: [/* @__PURE__ */ q(ft, {
964
+ children: [/* @__PURE__ */ q(mt, {
955
965
  value: t.dueDate ?? "",
956
966
  onValueChange: (e) => r({ dueDate: e }),
957
967
  "aria-label": a("dueDate"),
@@ -967,7 +977,7 @@ function zt({ workspace: e, issue: t, team: n, update: r, row: i }) {
967
977
  children: a("noDueDate")
968
978
  })] })
969
979
  })
970
- }), t.dueDate && /* @__PURE__ */ q(mt, {
980
+ }), t.dueDate && /* @__PURE__ */ q(gt, {
971
981
  variant: "ghost",
972
982
  icon: /* @__PURE__ */ q(O, { className: "size-3.5" }),
973
983
  label: a("clearDueDate"),
@@ -987,8 +997,8 @@ function zt({ workspace: e, issue: t, team: n, update: r, row: i }) {
987
997
  })
988
998
  ] });
989
999
  }
990
- function Bt({ workspace: e, issue: t, update: n, row: r }) {
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);
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);
992
1002
  if (f.length === 0 && !t.type) return null;
993
1003
  let p = (e) => {
994
1004
  let r = f.find((t) => t.id === e), o = (s ?? []).filter((e) => xe(t.fields[e.id]) && !we(r, e.id));
@@ -1035,15 +1045,15 @@ function Bt({ workspace: e, issue: t, update: n, row: r }) {
1035
1045
  function $({ label: e, shortcut: t, children: n }) {
1036
1046
  return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("p", {
1037
1047
  className: "mb-1 flex items-center justify-between px-2 text-xs text-muted-foreground",
1038
- children: [e, t && /* @__PURE__ */ q(ht, {
1048
+ children: [e, t && /* @__PURE__ */ q(_t, {
1039
1049
  keys: t,
1040
1050
  size: "xs",
1041
1051
  className: "hidden md:inline-flex"
1042
1052
  })]
1043
1053
  }), n] });
1044
1054
  }
1045
- function Vt({ workspace: e, identifier: t }) {
1046
- let n = G("issue.activity"), { data: r } = Q(u(e, t)), [i, a] = W(!1), o = Et(() => {
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(() => {
1047
1057
  let e = [];
1048
1058
  for (let t of r) {
1049
1059
  if (t.type.startsWith("comment.") || t.type.startsWith("issue.reaction_")) continue;
@@ -1076,14 +1086,14 @@ function Vt({ workspace: e, identifier: t }) {
1076
1086
  ]
1077
1087
  });
1078
1088
  }
1079
- function Ht({ workspace: e, identifier: t, others: n }) {
1080
- let r = G("issue.comments"), { data: i } = Q(c(e, t)), { data: a = [] } = X(f(e, t)), o = Et(() => {
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(() => {
1081
1091
  let e = i.filter((e) => !e.parentId);
1082
- return e.sort((e, t) => Number(Ut(t)) - Number(Ut(e))), e.map((e) => ({
1092
+ return e.sort((e, t) => Number(Gt(t)) - Number(Gt(e))), e.map((e) => ({
1083
1093
  root: e,
1084
1094
  replies: i.filter((t) => t.parentId === e.id)
1085
1095
  }));
1086
- }, [i]), [s, l] = W(null), u = i.filter((e) => !e.deletedAt && !Ut(e)).length;
1096
+ }, [i]), [s, l] = W(null), u = i.filter((e) => !e.deletedAt && !Gt(e)).length;
1087
1097
  return /* @__PURE__ */ J("section", {
1088
1098
  className: "mt-12 border-t border-border pt-6",
1089
1099
  "aria-label": r("title"),
@@ -1102,8 +1112,8 @@ function Ht({ workspace: e, identifier: t, others: n }) {
1102
1112
  /* @__PURE__ */ q("div", {
1103
1113
  className: "mt-4 space-y-3",
1104
1114
  children: o.map(({ root: n, replies: i }) => {
1105
- let o = Ut(n) ? n.sharedWith : void 0, c = o ? L(o).source : void 0;
1106
- return /* @__PURE__ */ J(ut, {
1115
+ let o = Gt(n) ? n.sharedWith : void 0, c = o ? L(o).source : void 0;
1116
+ return /* @__PURE__ */ J(ft, {
1107
1117
  size: "fill",
1108
1118
  padding: "none",
1109
1119
  highlight: !!o,
@@ -1115,7 +1125,7 @@ function Ht({ workspace: e, identifier: t, others: n }) {
1115
1125
  o && c ? /* @__PURE__ */ q($e, {
1116
1126
  source: c,
1117
1127
  link: a.find((e) => e.connector === o)
1118
- }) : /* @__PURE__ */ q(Gt, {
1128
+ }) : /* @__PURE__ */ q(qt, {
1119
1129
  workspace: e,
1120
1130
  identifier: t,
1121
1131
  comment: n,
@@ -1126,7 +1136,7 @@ function Ht({ workspace: e, identifier: t, others: n }) {
1126
1136
  children: i.map((r) => /* @__PURE__ */ q("li", {
1127
1137
  id: `comment-${r.id}`,
1128
1138
  className: "border-b border-border/50 last:border-b-0",
1129
- children: /* @__PURE__ */ q(Gt, {
1139
+ children: /* @__PURE__ */ q(qt, {
1130
1140
  workspace: e,
1131
1141
  identifier: t,
1132
1142
  comment: r,
@@ -1136,7 +1146,7 @@ function Ht({ workspace: e, identifier: t, others: n }) {
1136
1146
  }),
1137
1147
  /* @__PURE__ */ q("div", {
1138
1148
  className: "border-t border-border/70 px-3 py-2",
1139
- children: s === n.id ? /* @__PURE__ */ q(qt, {
1149
+ children: s === n.id ? /* @__PURE__ */ q(Yt, {
1140
1150
  workspace: e,
1141
1151
  identifier: t,
1142
1152
  parentId: n.id,
@@ -1154,12 +1164,12 @@ function Ht({ workspace: e, identifier: t, others: n }) {
1154
1164
  }, n.id);
1155
1165
  })
1156
1166
  }),
1157
- /* @__PURE__ */ q(ut, {
1167
+ /* @__PURE__ */ q(ft, {
1158
1168
  size: "fill",
1159
1169
  padding: "sm",
1160
1170
  focusWithin: !0,
1161
1171
  className: "mt-4",
1162
- children: /* @__PURE__ */ q(qt, {
1172
+ children: /* @__PURE__ */ q(Yt, {
1163
1173
  workspace: e,
1164
1174
  identifier: t
1165
1175
  })
@@ -1175,15 +1185,15 @@ function Ht({ workspace: e, identifier: t, others: n }) {
1175
1185
  ]
1176
1186
  });
1177
1187
  }
1178
- var Ut = (e) => !!e.sharedWith && !e.parentId;
1179
- function Wt({ comment: e }) {
1188
+ var Gt = (e) => !!e.sharedWith && !e.parentId;
1189
+ function Kt({ comment: e }) {
1180
1190
  let t = G("issue.comments");
1181
1191
  return e.author.kind === "connector" ? /* @__PURE__ */ q("span", {
1182
1192
  className: "rounded border border-border px-1.5 py-px text-[10px] text-muted-foreground",
1183
1193
  children: t("via", { source: L(e.author.handle).source })
1184
1194
  }) : null;
1185
1195
  }
1186
- function Gt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1196
+ function qt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1187
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: {
1188
1198
  workspace: n,
1189
1199
  identifier: r,
@@ -1212,7 +1222,7 @@ function Gt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1212
1222
  S(s("copyLink"), M),
1213
1223
  S(o("copyText"), i.body),
1214
1224
  ...D ? [
1215
- bt,
1225
+ St,
1216
1226
  {
1217
1227
  label: o("edit"),
1218
1228
  onClick: () => {
@@ -1237,7 +1247,7 @@ function Gt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1237
1247
  kind: i.author.kind,
1238
1248
  handle: i.author.handle,
1239
1249
  className: "flex items-center gap-2",
1240
- children: [/* @__PURE__ */ q(ct, {
1250
+ children: [/* @__PURE__ */ q(ut, {
1241
1251
  ...De(i.author.kind),
1242
1252
  name: c(i.author),
1243
1253
  src: l(i.author.kind, i.author.handle),
@@ -1248,15 +1258,15 @@ function Gt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1248
1258
  children: c(i.author)
1249
1259
  })]
1250
1260
  }),
1251
- /* @__PURE__ */ q(Wt, { comment: i }),
1261
+ /* @__PURE__ */ q(Kt, { comment: i }),
1252
1262
  /* @__PURE__ */ J("span", {
1253
1263
  className: "text-muted-foreground",
1254
- children: [/* @__PURE__ */ q(gt, {
1264
+ children: [/* @__PURE__ */ q(vt, {
1255
1265
  value: i.createdAt,
1256
1266
  exact: "medium"
1257
1267
  }), i.updatedAt !== i.createdAt && /* @__PURE__ */ J(K, { children: [" ", o("edited")] })]
1258
1268
  }),
1259
- !C && !g && /* @__PURE__ */ q(kt, {
1269
+ !C && !g && /* @__PURE__ */ q(jt, {
1260
1270
  items: N,
1261
1271
  className: "ml-auto"
1262
1272
  }),
@@ -1319,16 +1329,16 @@ function Gt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1319
1329
  value: i.body,
1320
1330
  editable: !1
1321
1331
  }),
1322
- /* @__PURE__ */ q(st, {
1332
+ /* @__PURE__ */ q(lt, {
1323
1333
  workspace: n,
1324
1334
  widgets: i.widgets
1325
1335
  }),
1326
- /* @__PURE__ */ q(Kt, {
1336
+ /* @__PURE__ */ q(Jt, {
1327
1337
  workspace: n,
1328
1338
  identifier: r,
1329
1339
  comment: i
1330
1340
  }),
1331
- /* @__PURE__ */ q(it, {
1341
+ /* @__PURE__ */ q(ot, {
1332
1342
  workspace: n,
1333
1343
  identifier: r,
1334
1344
  commentId: i.id,
@@ -1340,7 +1350,7 @@ function Gt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1340
1350
  })]
1341
1351
  });
1342
1352
  }
1343
- function Kt({ workspace: e, identifier: t, comment: n }) {
1353
+ function Jt({ workspace: e, identifier: t, comment: n }) {
1344
1354
  let { data: r = [] } = X(s(e, t)), { actorName: i } = te(e), a = r.filter((e) => e.page && e.commentId === n.id);
1345
1355
  return a.length === 0 ? null : /* @__PURE__ */ q("div", {
1346
1356
  className: "mt-2 space-y-2",
@@ -1351,8 +1361,8 @@ function Kt({ workspace: e, identifier: t, comment: n }) {
1351
1361
  }, e.id))
1352
1362
  });
1353
1363
  }
1354
- function qt({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus: o = !1, onDone: s }) {
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({
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({
1356
1366
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/comments", {
1357
1367
  params: { path: {
1358
1368
  workspace: n,
@@ -1391,7 +1401,7 @@ function qt({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus:
1391
1401
  error: v.error
1392
1402
  })]
1393
1403
  }),
1394
- y.isError && /* @__PURE__ */ q(pt, {
1404
+ y.isError && /* @__PURE__ */ q(ht, {
1395
1405
  inline: !0,
1396
1406
  className: "text-xs",
1397
1407
  children: l(y.error)
@@ -1415,5 +1425,5 @@ function qt({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus:
1415
1425
  ]
1416
1426
  })] });
1417
1427
  }
1418
- var Jt = St(() => {});
1419
- export { jt as component };
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 };