@parallelworks/tandem-web 0.142.0 → 0.144.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.
Files changed (58) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +156 -6
  2. package/_virtual/_virtual_i18n/es/common.js +156 -6
  3. package/_virtual/_virtual_i18n/ja/common.js +156 -6
  4. package/_virtual/_virtual_i18n/ko/common.js +156 -6
  5. package/_virtual/_virtual_i18n/zh/common.js +156 -6
  6. package/api/queries.js +85 -74
  7. package/components/AccessGrants.js +6 -6
  8. package/components/ActivityTimeline.js +2 -0
  9. package/components/CodeHostSettings.js +25 -25
  10. package/components/CustomFields.js +349 -0
  11. package/components/DocProperties.js +8 -2
  12. package/components/GitHub.js +22 -22
  13. package/components/IssueBoard.js +48 -43
  14. package/components/IssueEvent.js +2 -0
  15. package/components/IssueFilters.js +210 -122
  16. package/components/IssueImport.js +1 -1
  17. package/components/IssueRow.js +96 -79
  18. package/components/IssueTemplates.js +216 -156
  19. package/components/IssueTypes.js +318 -0
  20. package/components/NewIssueDialog.js +254 -216
  21. package/components/SettingsNav.js +45 -35
  22. package/components/TeamForm.js +49 -35
  23. package/components/TeamRepositories.js +51 -51
  24. package/components/TeamWorkflow.js +8 -8
  25. package/components/Updates.js +8 -8
  26. package/components/icons.js +8 -8
  27. package/lib/boardMove.js +69 -47
  28. package/lib/customFields.js +113 -0
  29. package/lib/issueDisplay.js +27 -12
  30. package/lib/issueList.js +166 -62
  31. package/lib/issueTypes.js +50 -0
  32. package/lib/teamTree.js +24 -0
  33. package/lib/views.js +13 -11
  34. package/package.json +1 -1
  35. package/pages/issues.js +331 -291
  36. package/routeTree.gen.js +186 -174
  37. package/routes/_workspace/agents/index2.js +9 -9
  38. package/routes/_workspace/issues/_identifier2.js +433 -370
  39. package/routes/_workspace/projects/_projectId3.js +213 -201
  40. package/routes/_workspace/settings/audit-log3.js +2 -0
  41. package/routes/_workspace/settings/fields.js +6 -0
  42. package/routes/_workspace/settings/fields2.js +30 -0
  43. package/routes/_workspace/settings/fields3.js +5 -0
  44. package/routes/_workspace/settings/groups2.js +74 -74
  45. package/routes/_workspace/settings/import.js +6 -0
  46. package/routes/_workspace/settings/import2.js +330 -0
  47. package/routes/_workspace/settings/import3.js +4 -0
  48. package/routes/_workspace/settings/labels2.js +33 -33
  49. package/routes/_workspace/settings/members2.js +35 -35
  50. package/routes/_workspace/settings/roles2.js +24 -24
  51. package/routes/_workspace/settings/runners2.js +18 -18
  52. package/routes/_workspace/settings/sessions2.js +9 -9
  53. package/routes/_workspace/settings/slack2.js +8 -8
  54. package/routes/_workspace/settings/sso2.js +50 -50
  55. package/routes/_workspace/settings/tokens2.js +15 -15
  56. package/routes/_workspace/settings/webhooks2.js +42 -42
  57. package/routes/_workspace/teams/_key/settings2.js +138 -76
  58. package/routes/_workspace2.js +320 -318
@@ -1,135 +1,152 @@
1
1
  import { Link as e } from "../lib/router.js";
2
- import { PriorityIcon as t, ProjectIcon as n, StatusIcon as r, UsersIcon as i } from "./icons.js";
3
- import { useTime as a } from "../lib/time.js";
4
- import { DueDate as o, SlaBadge as s, estimateShort as c } from "./Planning.js";
5
- import { usePeople as l } from "../lib/people.js";
6
- import { PersonHoverCard as u } from "./PersonHoverCard.js";
7
- import { actorAvatar as d } from "../lib/avatar.js";
8
- import { Avatar as f, AvatarGroup as p, Checkbox as m, Tooltip as h, useRelativeTime as g } from "@parallelworks/ui";
9
- import { useFormatter as _, useTranslations as v } from "use-intl";
10
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
2
+ import { hasValue as t } from "../lib/customFields.js";
3
+ import { PriorityIcon as n, ProjectIcon as r, StatusIcon as i, UsersIcon as a } from "./icons.js";
4
+ import { TypeIcon as o } from "./IssueTypes.js";
5
+ import { useTime as s } from "../lib/time.js";
6
+ import { DueDate as c, SlaBadge as l, estimateShort as u } from "./Planning.js";
7
+ import { usePeople as d } from "../lib/people.js";
8
+ import { PersonHoverCard as f } from "./PersonHoverCard.js";
9
+ import { useFieldText as p } from "./CustomFields.js";
10
+ import { actorAvatar as m } from "../lib/avatar.js";
11
+ import { Avatar as h, AvatarGroup as g, Checkbox as _, Tooltip as v, useRelativeTime as y } from "@parallelworks/ui";
12
+ import { useFormatter as b, useTranslations as x } from "use-intl";
13
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
11
14
  // src/components/IssueRow.tsx
12
- function x({ issue: x, team: S, workspace: C, selected: w = !1, picked: T = !1, viewers: E = [], onPick: D, onHover: O, onClick: k, onContextMenu: A }) {
13
- let j = v("issues"), M = _(), N = a(), P = g(x.updatedAt, "compact"), { person: F, nameOf: I, avatarOf: L } = l(C);
14
- return /* @__PURE__ */ b("li", {
15
- id: `row-${x.id}`,
16
- onMouseEnter: O,
17
- className: `group/row relative flex items-center border-b border-border/60 ${T ? "bg-human-soft" : w ? "bg-muted/70" : ""}`,
15
+ function w({ issue: w, team: T, workspace: E, selected: D = !1, picked: O = !1, viewers: k = [], onPick: A, onHover: j, onClick: M, onContextMenu: N, fields: P = [] }) {
16
+ let F = x("issues"), I = b(), L = s(), R = y(w.updatedAt, "compact"), { person: z, nameOf: B, avatarOf: V } = d(E), H = p(E);
17
+ return /* @__PURE__ */ C("li", {
18
+ id: `row-${w.id}`,
19
+ onMouseEnter: j,
20
+ className: `group/row relative flex items-center border-b border-border/60 ${O ? "bg-human-soft" : D ? "bg-muted/70" : ""}`,
18
21
  children: [
19
- T && /* @__PURE__ */ y("span", {
22
+ O && /* @__PURE__ */ S("span", {
20
23
  className: "absolute inset-y-0 left-0 w-0.5 bg-human",
21
24
  "aria-hidden": "true"
22
25
  }),
23
- D && /* @__PURE__ */ y("span", {
24
- className: `flex shrink-0 pl-4 transition-opacity duration-150 md:pl-5 ${T ? "" : "opacity-0 group-hover/row:opacity-100 has-[:focus-visible]:opacity-100 max-md:opacity-100"}`,
25
- children: /* @__PURE__ */ y(h, {
26
- content: j("selectIssue"),
26
+ A && /* @__PURE__ */ S("span", {
27
+ className: `flex shrink-0 pl-4 transition-opacity duration-150 md:pl-5 ${O ? "" : "opacity-0 group-hover/row:opacity-100 has-[:focus-visible]:opacity-100 max-md:opacity-100"}`,
28
+ children: /* @__PURE__ */ S(v, {
29
+ content: F("selectIssue"),
27
30
  shortcut: "X",
28
- children: /* @__PURE__ */ y(m, {
29
- "aria-label": j("select", { identifier: x.identifier }),
30
- checked: T,
31
+ children: /* @__PURE__ */ S(_, {
32
+ "aria-label": F("select", { identifier: w.identifier }),
33
+ checked: O,
31
34
  onClick: (e) => {
32
- e.preventDefault(), D(e.shiftKey);
35
+ e.preventDefault(), A(e.shiftKey);
33
36
  }
34
37
  })
35
38
  })
36
39
  }),
37
- /* @__PURE__ */ b(e, {
40
+ /* @__PURE__ */ C(e, {
38
41
  to: "/$workspace/issues/$identifier",
39
42
  params: {
40
- workspace: C,
41
- identifier: x.identifier
43
+ workspace: E,
44
+ identifier: w.identifier
42
45
  },
43
- onClick: k,
44
- onContextMenu: A,
45
- className: `flex h-10 min-w-0 flex-1 items-center gap-3 pr-5 text-sm ${D ? "pl-3" : "pl-5"}`,
46
+ onClick: M,
47
+ onContextMenu: N,
48
+ className: `flex h-10 min-w-0 flex-1 items-center gap-3 pr-5 text-sm ${A ? "pl-3" : "pl-5"}`,
46
49
  children: [
47
- /* @__PURE__ */ y(t, { priority: x.priority }),
48
- /* @__PURE__ */ y("span", {
49
- className: "w-16 shrink-0 text-xs text-muted-foreground",
50
- children: x.identifier
50
+ /* @__PURE__ */ S(n, { priority: w.priority }),
51
+ /* @__PURE__ */ C("span", {
52
+ className: `flex shrink-0 items-center gap-1 text-xs text-muted-foreground ${w.type ? "w-20" : "w-16"}`,
53
+ children: [w.type && /* @__PURE__ */ S(v, {
54
+ content: w.type.name,
55
+ describesAnchor: !0,
56
+ children: /* @__PURE__ */ S(o, {
57
+ type: w.type,
58
+ className: "size-3.5"
59
+ })
60
+ }), w.identifier]
51
61
  }),
52
- /* @__PURE__ */ y(r, { category: x.status.category }),
53
- /* @__PURE__ */ y("span", {
62
+ /* @__PURE__ */ S(i, { category: w.status.category }),
63
+ /* @__PURE__ */ S("span", {
54
64
  className: "min-w-0 flex-1 truncate",
55
- children: x.title
65
+ children: w.title
56
66
  }),
57
- !!x.requests && /* @__PURE__ */ y(h, {
58
- content: j("requestCount", { count: x.requests }),
59
- children: /* @__PURE__ */ b("span", {
67
+ !!w.requests && /* @__PURE__ */ S(v, {
68
+ content: F("requestCount", { count: w.requests }),
69
+ children: /* @__PURE__ */ C("span", {
60
70
  className: "inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground tabular-nums",
61
- children: [/* @__PURE__ */ y(i, { className: "size-3" }), x.requests]
71
+ children: [/* @__PURE__ */ S(a, { className: "size-3" }), w.requests]
62
72
  })
63
73
  }),
64
- x.project && /* @__PURE__ */ b("span", {
74
+ w.project && /* @__PURE__ */ C("span", {
65
75
  className: "hidden max-w-40 shrink-0 items-center gap-1 truncate text-xs text-muted-foreground lg:inline-flex",
66
- children: [/* @__PURE__ */ y(n, { className: "size-3 shrink-0" }), /* @__PURE__ */ y("span", {
76
+ children: [/* @__PURE__ */ S(r, { className: "size-3 shrink-0" }), /* @__PURE__ */ S("span", {
67
77
  className: "truncate",
68
- children: x.project.name
78
+ children: w.project.name
69
79
  })]
70
80
  }),
71
- x.dueDate && /* @__PURE__ */ y(o, {
72
- date: x.dueDate,
73
- closed: x.status.category === "completed" || x.status.category === "canceled"
81
+ w.dueDate && /* @__PURE__ */ S(c, {
82
+ date: w.dueDate,
83
+ closed: w.status.category === "completed" || w.status.category === "canceled"
74
84
  }),
75
- /* @__PURE__ */ y(s, {
76
- issue: x,
77
- team: S
85
+ /* @__PURE__ */ S(l, {
86
+ issue: w,
87
+ team: T
78
88
  }),
79
- !!x.estimate && /* @__PURE__ */ y(h, {
80
- content: j("estimate", { points: x.estimate }),
89
+ !!w.estimate && /* @__PURE__ */ S(v, {
90
+ content: F("estimate", { points: w.estimate }),
81
91
  describesAnchor: !0,
82
- children: /* @__PURE__ */ y("span", {
92
+ children: /* @__PURE__ */ S("span", {
83
93
  className: "hidden h-5 min-w-5 shrink-0 items-center justify-center rounded border border-border px-1 text-[11px] text-muted-foreground tabular-nums sm:inline-flex",
84
- children: c(x.estimate, S?.estimateScale)
94
+ children: u(w.estimate, T?.estimateScale)
85
95
  })
86
96
  }),
87
- /* @__PURE__ */ y("span", {
97
+ /* @__PURE__ */ C("span", {
88
98
  className: "hidden shrink-0 gap-1 md:flex",
89
- children: x.labels.map((e) => /* @__PURE__ */ b("span", {
99
+ children: [P.filter((e) => t(w.fields[e.id])).map((e) => /* @__PURE__ */ S(v, {
100
+ content: e.name,
101
+ describesAnchor: !0,
102
+ children: /* @__PURE__ */ S("span", {
103
+ className: "inline-flex max-w-40 items-center truncate rounded-full border border-border px-2 py-0.5 text-[11px] text-muted-foreground",
104
+ children: H(e, w.fields[e.id])
105
+ })
106
+ }, e.id)), w.labels.map((e) => /* @__PURE__ */ C("span", {
90
107
  className: "inline-flex items-center gap-1 rounded-full border border-border px-2 py-0.5 text-[11px]",
91
- children: [/* @__PURE__ */ y("span", {
108
+ children: [/* @__PURE__ */ S("span", {
92
109
  className: "size-2 rounded-full",
93
110
  style: { background: e.color }
94
111
  }), e.name]
95
- }, e.id))
112
+ }, e.id))]
96
113
  }),
97
- E.length > 0 && /* @__PURE__ */ y(h, {
98
- content: j("viewing", { names: M.list(E.map((e) => F(e).name)) }),
99
- children: /* @__PURE__ */ y(p, {
114
+ k.length > 0 && /* @__PURE__ */ S(v, {
115
+ content: F("viewing", { names: I.list(k.map((e) => z(e).name)) }),
116
+ children: /* @__PURE__ */ S(g, {
100
117
  size: "xs",
101
118
  ringColor: "var(--avatar-person-text)",
102
119
  className: "shrink-0",
103
- children: E.map((e) => /* @__PURE__ */ y(u, {
104
- workspace: C,
120
+ children: k.map((e) => /* @__PURE__ */ S(f, {
121
+ workspace: E,
105
122
  handle: e,
106
- children: /* @__PURE__ */ y(f, {
107
- name: F(e).name,
108
- src: F(e).avatarUrl
123
+ children: /* @__PURE__ */ S(h, {
124
+ name: z(e).name,
125
+ src: z(e).avatarUrl
109
126
  })
110
127
  }, e))
111
128
  })
112
129
  }),
113
- /* @__PURE__ */ y(p, {
130
+ /* @__PURE__ */ S(g, {
114
131
  size: "sm",
115
- children: x.assignees.map((e) => /* @__PURE__ */ y(u, {
116
- workspace: C,
132
+ children: w.assignees.map((e) => /* @__PURE__ */ S(f, {
133
+ workspace: E,
117
134
  kind: e.kind,
118
135
  handle: e.handle,
119
- children: /* @__PURE__ */ y(f, {
120
- ...d(e.kind),
121
- name: I(e.kind, e.handle),
122
- src: L(e.kind, e.handle),
136
+ children: /* @__PURE__ */ S(h, {
137
+ ...m(e.kind),
138
+ name: B(e.kind, e.handle),
139
+ src: V(e.kind, e.handle),
123
140
  tooltip: e.kind !== "user"
124
141
  })
125
142
  }, `${e.kind}:${e.handle}`))
126
143
  }),
127
- /* @__PURE__ */ y(h, {
128
- content: j("updated", { time: N.full(x.updatedAt) }),
129
- children: /* @__PURE__ */ y("time", {
130
- dateTime: x.updatedAt,
144
+ /* @__PURE__ */ S(v, {
145
+ content: F("updated", { time: L.full(w.updatedAt) }),
146
+ children: /* @__PURE__ */ S("time", {
147
+ dateTime: w.updatedAt,
131
148
  className: "min-w-10 shrink-0 whitespace-nowrap text-right text-xs text-muted-foreground",
132
- children: P
149
+ children: R
133
150
  })
134
151
  })
135
152
  ]
@@ -137,4 +154,4 @@ function x({ issue: x, team: S, workspace: C, selected: w = !1, picked: T = !1,
137
154
  ]
138
155
  });
139
156
  }
140
- export { x as IssueRow };
157
+ export { w as IssueRow };