@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.
- package/_virtual/_virtual_i18n/en/common.js +4 -0
- package/_virtual/_virtual_i18n/es/common.js +4 -0
- package/_virtual/_virtual_i18n/ja/common.js +4 -0
- package/_virtual/_virtual_i18n/ko/common.js +4 -0
- package/_virtual/_virtual_i18n/zh/common.js +4 -0
- package/api/mutations.js +16 -9
- package/api/queries.js +194 -140
- package/components/CommandPalette.js +5 -2
- package/components/CustomerRequests.js +81 -85
- package/components/DocLinkPicker.js +4 -1
- package/components/FavoritesNav.js +4 -1
- package/components/IssueFilters.js +90 -87
- package/components/IssueGroupList.js +72 -0
- package/components/IssueInsights.js +4 -1
- package/components/IssueRelations.js +8 -2
- package/components/IssueRow.js +73 -66
- package/components/IssueSection.js +30 -20
- package/components/NewIssueDialog.js +181 -175
- package/components/NewProjectDialog.js +64 -64
- package/components/Reports.js +4 -1
- package/components/TeamWorkflow.js +4 -1
- package/components/icons.js +61 -33
- package/lib/boardMove.js +13 -3
- package/lib/groupList.js +14 -0
- package/lib/issueMenu.js +8 -2
- package/lib/issuePicker.js +4 -1
- package/package.json +2 -1
- package/pages/issues.js +393 -340
- package/pages/triage.js +4 -1
- package/routes/_workspace/docs/_doc2.js +8 -2
- package/routes/_workspace/issues/_identifier2.js +8 -2
- package/routes/_workspace/issues/index.js +1 -1
- package/routes/_workspace/notifications2.js +4 -1
- package/routes/_workspace/teams/_key/settings2.js +180 -164
- package/routes/_workspace2.js +3 -3
- package/routes/_workspace3.js +11 -10
package/components/IssueRow.js
CHANGED
|
@@ -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 {
|
|
13
|
-
import {
|
|
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
|
-
|
|
16
|
-
let
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
29
|
-
content:
|
|
32
|
+
children: /* @__PURE__ */ C(v, {
|
|
33
|
+
content: R("selectIssue"),
|
|
30
34
|
shortcut: "X",
|
|
31
|
-
children: /* @__PURE__ */
|
|
32
|
-
"aria-label":
|
|
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__ */
|
|
44
|
+
/* @__PURE__ */ w(e, {
|
|
41
45
|
to: "/$workspace/issues/$identifier",
|
|
42
46
|
params: {
|
|
43
47
|
workspace: E,
|
|
44
|
-
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__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
className: `flex shrink-0 items-center gap-1 text-xs text-muted-foreground ${
|
|
53
|
-
children: [
|
|
54
|
-
content:
|
|
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__ */
|
|
57
|
-
type:
|
|
60
|
+
children: /* @__PURE__ */ C(d, {
|
|
61
|
+
type: b.type,
|
|
58
62
|
className: "size-3.5"
|
|
59
63
|
})
|
|
60
|
-
}),
|
|
64
|
+
}), b.identifier]
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ C(r, {
|
|
67
|
+
category: b.status.category,
|
|
68
|
+
step: b.status.step
|
|
61
69
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */ S("span", {
|
|
70
|
+
/* @__PURE__ */ C("span", {
|
|
64
71
|
className: "min-w-0 flex-1 truncate",
|
|
65
|
-
children:
|
|
72
|
+
children: b.title
|
|
66
73
|
}),
|
|
67
|
-
!!
|
|
68
|
-
content:
|
|
69
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
78
|
+
children: [/* @__PURE__ */ C(i, { className: "size-3" }), b.requests]
|
|
72
79
|
})
|
|
73
80
|
}),
|
|
74
|
-
|
|
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__ */
|
|
83
|
+
children: [/* @__PURE__ */ C(n, { className: "size-3 shrink-0" }), /* @__PURE__ */ C("span", {
|
|
77
84
|
className: "truncate",
|
|
78
|
-
children:
|
|
85
|
+
children: b.project.name
|
|
79
86
|
})]
|
|
80
87
|
}),
|
|
81
|
-
|
|
82
|
-
date:
|
|
83
|
-
closed:
|
|
88
|
+
b.dueDate && /* @__PURE__ */ C(s, {
|
|
89
|
+
date: b.dueDate,
|
|
90
|
+
closed: b.status.category === "completed" || b.status.category === "canceled"
|
|
84
91
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
issue:
|
|
92
|
+
/* @__PURE__ */ C(c, {
|
|
93
|
+
issue: b,
|
|
87
94
|
team: T
|
|
88
95
|
}),
|
|
89
|
-
!!
|
|
90
|
-
content:
|
|
96
|
+
!!b.estimate && /* @__PURE__ */ C(v, {
|
|
97
|
+
content: R("estimate", { points: b.estimate }),
|
|
91
98
|
describesAnchor: !0,
|
|
92
|
-
children: /* @__PURE__ */
|
|
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(
|
|
101
|
+
children: l(b.estimate, T?.estimateScale)
|
|
95
102
|
})
|
|
96
103
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ w("span", {
|
|
98
105
|
className: "hidden shrink-0 gap-1 md:flex",
|
|
99
|
-
children: [P.filter((e) => u(
|
|
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__ */
|
|
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:
|
|
111
|
+
children: G(e, b.fields[e.id])
|
|
105
112
|
})
|
|
106
|
-
}, e.id)),
|
|
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__ */
|
|
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__ */
|
|
115
|
-
content:
|
|
116
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
127
|
+
children: k.map((e) => /* @__PURE__ */ C(m, {
|
|
121
128
|
workspace: E,
|
|
122
129
|
handle: e,
|
|
123
|
-
children: /* @__PURE__ */
|
|
124
|
-
name:
|
|
125
|
-
src:
|
|
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__ */
|
|
137
|
+
/* @__PURE__ */ C(g, {
|
|
131
138
|
size: "sm",
|
|
132
|
-
children:
|
|
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__ */
|
|
143
|
+
children: /* @__PURE__ */ C(h, {
|
|
137
144
|
...f(e.kind),
|
|
138
|
-
name:
|
|
139
|
-
src:
|
|
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__ */
|
|
145
|
-
content:
|
|
146
|
-
children: /* @__PURE__ */
|
|
147
|
-
dateTime:
|
|
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:
|
|
156
|
+
children: V
|
|
150
157
|
})
|
|
151
158
|
})
|
|
152
159
|
]
|
|
153
160
|
})
|
|
154
161
|
]
|
|
155
162
|
});
|
|
156
|
-
}
|
|
157
|
-
export {
|
|
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:
|
|
7
|
-
let
|
|
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":
|
|
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__ */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
}),
|
|
19
|
+
}), l && /* @__PURE__ */ r("ul", { children: c })]
|
|
29
20
|
});
|
|
30
21
|
}
|
|
31
|
-
|
|
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 };
|