@parallelworks/tandem-web 0.160.1 → 0.161.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.
Files changed (36) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +4 -0
  2. package/_virtual/_virtual_i18n/es/common.js +4 -0
  3. package/_virtual/_virtual_i18n/ja/common.js +4 -0
  4. package/_virtual/_virtual_i18n/ko/common.js +4 -0
  5. package/_virtual/_virtual_i18n/zh/common.js +4 -0
  6. package/api/mutations.js +16 -9
  7. package/api/queries.js +194 -140
  8. package/components/CommandPalette.js +5 -2
  9. package/components/CustomerRequests.js +81 -85
  10. package/components/DocLinkPicker.js +4 -1
  11. package/components/FavoritesNav.js +4 -1
  12. package/components/IssueFilters.js +90 -87
  13. package/components/IssueGroupList.js +72 -0
  14. package/components/IssueInsights.js +4 -1
  15. package/components/IssueRelations.js +8 -2
  16. package/components/IssueRow.js +73 -66
  17. package/components/IssueSection.js +30 -20
  18. package/components/NewIssueDialog.js +181 -175
  19. package/components/NewProjectDialog.js +64 -64
  20. package/components/Reports.js +4 -1
  21. package/components/TeamWorkflow.js +4 -1
  22. package/components/icons.js +61 -33
  23. package/lib/boardMove.js +13 -3
  24. package/lib/groupList.js +14 -0
  25. package/lib/issueMenu.js +8 -2
  26. package/lib/issuePicker.js +4 -1
  27. package/package.json +2 -1
  28. package/pages/issues.js +393 -340
  29. package/pages/triage.js +4 -1
  30. package/routes/_workspace/docs/_doc2.js +8 -2
  31. package/routes/_workspace/issues/_identifier2.js +8 -2
  32. package/routes/_workspace/issues/index.js +1 -1
  33. package/routes/_workspace/notifications2.js +4 -1
  34. package/routes/_workspace/teams/_key/settings2.js +180 -164
  35. package/routes/_workspace2.js +3 -3
  36. package/routes/_workspace3.js +11 -10
@@ -9,27 +9,31 @@ import { actorAvatar as f } from "../lib/avatar.js";
9
9
  import { useFieldText as p } from "./CustomFields.js";
10
10
  import { PersonHoverCard as m } from "./PersonHoverCard.js";
11
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";
12
+ import { memo as b } from "react";
13
+ import { useFormatter as x, useTranslations as S } from "use-intl";
14
+ import { jsx as C, jsxs as w } from "react/jsx-runtime";
14
15
  // src/components/IssueRow.tsx
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 = o(), R = y(w.updatedAt, "compact"), { person: z, nameOf: B, avatarOf: V } = a(E), H = p(E);
17
- return /* @__PURE__ */ C("li", {
18
- id: `row-${w.id}`,
16
+ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked: O = !1, viewers: k = [], onPick: A, onHover: j, onClick: M, onContextMenu: N, fields: P = [], ref: F, style: I, index: L }) {
17
+ let R = S("issues"), z = x(), B = o(), V = y(b.updatedAt, "compact"), { person: H, nameOf: U, avatarOf: W } = a(E), G = p(E);
18
+ return /* @__PURE__ */ w("li", {
19
+ ref: F,
20
+ style: I,
21
+ "data-index": L,
22
+ id: `row-${b.id}`,
19
23
  onMouseEnter: j,
20
24
  className: `group/row relative flex items-center border-b border-border/60 ${O ? "bg-human-soft" : D ? "bg-muted/70" : ""}`,
21
25
  children: [
22
- O && /* @__PURE__ */ S("span", {
26
+ O && /* @__PURE__ */ C("span", {
23
27
  className: "absolute inset-y-0 left-0 w-0.5 bg-human",
24
28
  "aria-hidden": "true"
25
29
  }),
26
- A && /* @__PURE__ */ S("span", {
30
+ A && /* @__PURE__ */ C("span", {
27
31
  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"),
32
+ children: /* @__PURE__ */ C(v, {
33
+ content: R("selectIssue"),
30
34
  shortcut: "X",
31
- children: /* @__PURE__ */ S(_, {
32
- "aria-label": F("select", { identifier: w.identifier }),
35
+ children: /* @__PURE__ */ C(_, {
36
+ "aria-label": R("select", { identifier: b.identifier }),
33
37
  checked: O,
34
38
  onClick: (e) => {
35
39
  e.preventDefault(), A(e.shiftKey);
@@ -37,121 +41,124 @@ function w({ issue: w, team: T, workspace: E, selected: D = !1, picked: O = !1,
37
41
  })
38
42
  })
39
43
  }),
40
- /* @__PURE__ */ C(e, {
44
+ /* @__PURE__ */ w(e, {
41
45
  to: "/$workspace/issues/$identifier",
42
46
  params: {
43
47
  workspace: E,
44
- identifier: w.identifier
48
+ identifier: b.identifier
45
49
  },
46
50
  onClick: M,
47
51
  onContextMenu: N,
48
52
  className: `flex h-10 min-w-0 flex-1 items-center gap-3 pr-5 text-sm ${A ? "pl-3" : "pl-5"}`,
49
53
  children: [
50
- /* @__PURE__ */ S(t, { 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,
54
+ /* @__PURE__ */ C(t, { priority: b.priority }),
55
+ /* @__PURE__ */ w("span", {
56
+ className: `flex shrink-0 items-center gap-1 text-xs text-muted-foreground ${b.type ? "w-20" : "w-16"}`,
57
+ children: [b.type && /* @__PURE__ */ C(v, {
58
+ content: b.type.name,
55
59
  describesAnchor: !0,
56
- children: /* @__PURE__ */ S(d, {
57
- type: w.type,
60
+ children: /* @__PURE__ */ C(d, {
61
+ type: b.type,
58
62
  className: "size-3.5"
59
63
  })
60
- }), w.identifier]
64
+ }), b.identifier]
65
+ }),
66
+ /* @__PURE__ */ C(r, {
67
+ category: b.status.category,
68
+ step: b.status.step
61
69
  }),
62
- /* @__PURE__ */ S(r, { category: w.status.category }),
63
- /* @__PURE__ */ S("span", {
70
+ /* @__PURE__ */ C("span", {
64
71
  className: "min-w-0 flex-1 truncate",
65
- children: w.title
72
+ children: b.title
66
73
  }),
67
- !!w.requests && /* @__PURE__ */ S(v, {
68
- content: F("requestCount", { count: w.requests }),
69
- children: /* @__PURE__ */ C("span", {
74
+ !!b.requests && /* @__PURE__ */ C(v, {
75
+ content: R("requestCount", { count: b.requests }),
76
+ children: /* @__PURE__ */ w("span", {
70
77
  className: "inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground tabular-nums",
71
- children: [/* @__PURE__ */ S(i, { className: "size-3" }), w.requests]
78
+ children: [/* @__PURE__ */ C(i, { className: "size-3" }), b.requests]
72
79
  })
73
80
  }),
74
- w.project && /* @__PURE__ */ C("span", {
81
+ b.project && /* @__PURE__ */ w("span", {
75
82
  className: "hidden max-w-40 shrink-0 items-center gap-1 truncate text-xs text-muted-foreground lg:inline-flex",
76
- children: [/* @__PURE__ */ S(n, { className: "size-3 shrink-0" }), /* @__PURE__ */ S("span", {
83
+ children: [/* @__PURE__ */ C(n, { className: "size-3 shrink-0" }), /* @__PURE__ */ C("span", {
77
84
  className: "truncate",
78
- children: w.project.name
85
+ children: b.project.name
79
86
  })]
80
87
  }),
81
- w.dueDate && /* @__PURE__ */ S(s, {
82
- date: w.dueDate,
83
- closed: w.status.category === "completed" || w.status.category === "canceled"
88
+ b.dueDate && /* @__PURE__ */ C(s, {
89
+ date: b.dueDate,
90
+ closed: b.status.category === "completed" || b.status.category === "canceled"
84
91
  }),
85
- /* @__PURE__ */ S(c, {
86
- issue: w,
92
+ /* @__PURE__ */ C(c, {
93
+ issue: b,
87
94
  team: T
88
95
  }),
89
- !!w.estimate && /* @__PURE__ */ S(v, {
90
- content: F("estimate", { points: w.estimate }),
96
+ !!b.estimate && /* @__PURE__ */ C(v, {
97
+ content: R("estimate", { points: b.estimate }),
91
98
  describesAnchor: !0,
92
- children: /* @__PURE__ */ S("span", {
99
+ children: /* @__PURE__ */ C("span", {
93
100
  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",
94
- children: l(w.estimate, T?.estimateScale)
101
+ children: l(b.estimate, T?.estimateScale)
95
102
  })
96
103
  }),
97
- /* @__PURE__ */ C("span", {
104
+ /* @__PURE__ */ w("span", {
98
105
  className: "hidden shrink-0 gap-1 md:flex",
99
- children: [P.filter((e) => u(w.fields[e.id])).map((e) => /* @__PURE__ */ S(v, {
106
+ children: [P.filter((e) => u(b.fields[e.id])).map((e) => /* @__PURE__ */ C(v, {
100
107
  content: e.name,
101
108
  describesAnchor: !0,
102
- children: /* @__PURE__ */ S("span", {
109
+ children: /* @__PURE__ */ C("span", {
103
110
  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])
111
+ children: G(e, b.fields[e.id])
105
112
  })
106
- }, e.id)), w.labels.map((e) => /* @__PURE__ */ C("span", {
113
+ }, e.id)), b.labels.map((e) => /* @__PURE__ */ w("span", {
107
114
  className: "inline-flex items-center gap-1 rounded-full border border-border px-2 py-0.5 text-[11px]",
108
- children: [/* @__PURE__ */ S("span", {
115
+ children: [/* @__PURE__ */ C("span", {
109
116
  className: "size-2 rounded-full",
110
117
  style: { background: e.color }
111
118
  }), e.name]
112
119
  }, e.id))]
113
120
  }),
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, {
121
+ k.length > 0 && /* @__PURE__ */ C(v, {
122
+ content: R("viewing", { names: z.list(k.map((e) => H(e).name)) }),
123
+ children: /* @__PURE__ */ C(g, {
117
124
  size: "xs",
118
125
  ringColor: "var(--avatar-person-text)",
119
126
  className: "shrink-0",
120
- children: k.map((e) => /* @__PURE__ */ S(m, {
127
+ children: k.map((e) => /* @__PURE__ */ C(m, {
121
128
  workspace: E,
122
129
  handle: e,
123
- children: /* @__PURE__ */ S(h, {
124
- name: z(e).name,
125
- src: z(e).avatarUrl
130
+ children: /* @__PURE__ */ C(h, {
131
+ name: H(e).name,
132
+ src: H(e).avatarUrl
126
133
  })
127
134
  }, e))
128
135
  })
129
136
  }),
130
- /* @__PURE__ */ S(g, {
137
+ /* @__PURE__ */ C(g, {
131
138
  size: "sm",
132
- children: w.assignees.map((e) => /* @__PURE__ */ S(m, {
139
+ children: b.assignees.map((e) => /* @__PURE__ */ C(m, {
133
140
  workspace: E,
134
141
  kind: e.kind,
135
142
  handle: e.handle,
136
- children: /* @__PURE__ */ S(h, {
143
+ children: /* @__PURE__ */ C(h, {
137
144
  ...f(e.kind),
138
- name: B(e.kind, e.handle),
139
- src: V(e.kind, e.handle),
145
+ name: U(e.kind, e.handle),
146
+ src: W(e.kind, e.handle),
140
147
  tooltip: e.kind !== "user"
141
148
  })
142
149
  }, `${e.kind}:${e.handle}`))
143
150
  }),
144
- /* @__PURE__ */ S(v, {
145
- content: F("updated", { time: L.full(w.updatedAt) }),
146
- children: /* @__PURE__ */ S("time", {
147
- dateTime: w.updatedAt,
151
+ /* @__PURE__ */ C(v, {
152
+ content: R("updated", { time: B.full(b.updatedAt) }),
153
+ children: /* @__PURE__ */ C("time", {
154
+ dateTime: b.updatedAt,
148
155
  className: "min-w-10 shrink-0 whitespace-nowrap text-right text-xs text-muted-foreground",
149
- children: R
156
+ children: V
150
157
  })
151
158
  })
152
159
  ]
153
160
  })
154
161
  ]
155
162
  });
156
- }
157
- export { w as IssueRow };
163
+ });
164
+ export { T as IssueRow };
@@ -3,29 +3,39 @@ import { useState as t } from "react";
3
3
  import { useTranslations as n } from "use-intl";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
5
  // src/components/IssueSection.tsx
6
- function a({ label: a, icon: o, count: s, defaultOpen: c = !0, children: l }) {
7
- let u = n("issues"), [d, f] = t(c);
6
+ function a({ label: e, icon: n, count: a, defaultOpen: s = !0, children: c }) {
7
+ let [l, u] = t(s);
8
8
  return /* @__PURE__ */ i("section", {
9
- "aria-label": a,
9
+ "aria-label": e,
10
10
  children: [/* @__PURE__ */ r("h2", {
11
11
  className: "sticky top-0 z-10 border-b border-border bg-background/95 text-xs font-medium backdrop-blur",
12
- children: /* @__PURE__ */ i("button", {
13
- type: "button",
14
- "aria-expanded": d,
15
- onClick: () => f((e) => !e),
16
- "aria-label": u(d ? "foldGroup" : "unfoldGroup", { group: a }),
17
- className: "flex h-8 w-full items-center gap-2 px-5 text-left hover:bg-muted/50",
18
- children: [
19
- /* @__PURE__ */ r(e, { className: `size-3 shrink-0 text-muted-foreground transition-transform motion-reduce:transition-none ${d ? "rotate-90" : ""}` }),
20
- o,
21
- a,
22
- /* @__PURE__ */ r("span", {
23
- className: "text-muted-foreground tabular-nums",
24
- children: s
25
- })
26
- ]
12
+ children: /* @__PURE__ */ r(o, {
13
+ label: e,
14
+ icon: n,
15
+ count: a,
16
+ open: l,
17
+ onToggle: () => u((e) => !e)
27
18
  })
28
- }), d && /* @__PURE__ */ r("ul", { children: l })]
19
+ }), l && /* @__PURE__ */ r("ul", { children: c })]
29
20
  });
30
21
  }
31
- export { a as IssueSection };
22
+ function o({ label: t, icon: a, count: o, open: s, onToggle: c }) {
23
+ let l = n("issues");
24
+ return /* @__PURE__ */ i("button", {
25
+ type: "button",
26
+ "aria-expanded": s,
27
+ onClick: c,
28
+ "aria-label": l(s ? "foldGroup" : "unfoldGroup", { group: t }),
29
+ className: "flex h-8 w-full items-center gap-2 px-5 text-left hover:bg-muted/50",
30
+ children: [
31
+ /* @__PURE__ */ r(e, { className: `size-3 shrink-0 text-muted-foreground transition-transform motion-reduce:transition-none ${s ? "rotate-90" : ""}` }),
32
+ a,
33
+ t,
34
+ /* @__PURE__ */ r("span", {
35
+ className: "text-muted-foreground tabular-nums",
36
+ children: o
37
+ })
38
+ ]
39
+ });
40
+ }
41
+ export { o as IssueGroupHeader, a as IssueSection };