@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useHost as e } from "../lib/host.js";
|
|
2
2
|
import { useNavigate as t } from "../lib/router.js";
|
|
3
|
-
import { docQuery as n, docsQuery as r, issueSearchQuery as i, knowledgeQuery as a, meQuery as o,
|
|
3
|
+
import { docQuery as n, docsQuery as r, issueSearchQuery as i, knowledgeQuery as a, meQuery as o, myTeamsQuery as ee } from "../api/queries.js";
|
|
4
4
|
import { docPath as s, useDocActions as te } from "../lib/docs.js";
|
|
5
5
|
import { AddIcon as c, AreaIcon as ne, CheckIcon as re, ChevronRightIcon as ie, CloseIcon as ae, CycleIcon as oe, FileTextIcon as l, InboxIcon as u, LibraryIcon as d, ListViewIcon as f, NotificationIcon as se, ProjectIcon as p, SearchIcon as ce, SettingsIcon as le, StatusIcon as ue, TriageIcon as de, UserIcon as m, UsersIcon as h } from "./icons.js";
|
|
6
6
|
import { headingAnchor as fe, headings as pe } from "../lib/glossary.js";
|
|
@@ -120,7 +120,10 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
|
|
|
120
120
|
items: G.issues.slice(0, 8).map((e) => ({
|
|
121
121
|
id: e.id,
|
|
122
122
|
label: `${e.identifier} ${e.title}`,
|
|
123
|
-
icon: /* @__PURE__ */ S(ue, {
|
|
123
|
+
icon: /* @__PURE__ */ S(ue, {
|
|
124
|
+
category: e.status.category,
|
|
125
|
+
step: e.status.step
|
|
126
|
+
}),
|
|
124
127
|
run: X(`/${v}/issues/${e.identifier}`)
|
|
125
128
|
}))
|
|
126
129
|
}), t.push({
|
|
@@ -1,163 +1,159 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
2
|
import { customerRequestsQuery as n, customersQuery as r } from "../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { invalidateIssueLists as i } from "../api/mutations.js";
|
|
4
|
+
import { AddIcon as a, CloseIcon as o, LinkIcon as s, UsersIcon as c } from "./icons.js";
|
|
5
|
+
import { useCan as l } from "../lib/roles.js";
|
|
6
|
+
import { Button as u, Card as d, ErrorText as f, IconButton as p, Input as m, Textarea as h } from "@parallelworks/ui";
|
|
7
|
+
import { useId as g, useState as _ } from "react";
|
|
8
|
+
import { useErrorMessage as v } from "@parallelworks/problem/react";
|
|
9
|
+
import { useTranslations as y } from "use-intl";
|
|
10
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
11
|
+
import { useMutation as S, useQuery as C, useQueryClient as w } from "@tanstack/react-query";
|
|
11
12
|
// src/components/CustomerRequests.tsx
|
|
12
|
-
function
|
|
13
|
-
let
|
|
14
|
-
...r(
|
|
15
|
-
enabled:
|
|
16
|
-
}), [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
w,
|
|
20
|
-
"issues",
|
|
21
|
-
"list"
|
|
22
|
-
] });
|
|
23
|
-
}, W = x({
|
|
13
|
+
function T({ workspace: T, identifier: E, enabled: D }) {
|
|
14
|
+
let O = y("customerRequests"), k = v(), A = w(), j = l(T, "manage_customers"), M = j && D, { data: N = [] } = C(n(T, E)), { data: P = [] } = C({
|
|
15
|
+
...r(T),
|
|
16
|
+
enabled: M
|
|
17
|
+
}), [F, I] = _(!1), [L, R] = _(""), [z, B] = _(""), [V, H] = _(""), U = g(), W = () => {
|
|
18
|
+
A.invalidateQueries({ queryKey: n(T, E).queryKey }), A.invalidateQueries({ queryKey: r(T).queryKey }), i(A, T);
|
|
19
|
+
}, G = S({
|
|
24
20
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/requests", {
|
|
25
21
|
params: { path: {
|
|
26
|
-
workspace:
|
|
27
|
-
identifier:
|
|
22
|
+
workspace: T,
|
|
23
|
+
identifier: E
|
|
28
24
|
} },
|
|
29
25
|
body: {
|
|
30
|
-
customerName:
|
|
31
|
-
quote:
|
|
32
|
-
url:
|
|
26
|
+
customerName: L.trim(),
|
|
27
|
+
quote: z.trim(),
|
|
28
|
+
url: V.trim()
|
|
33
29
|
}
|
|
34
30
|
})),
|
|
35
31
|
onSuccess: () => {
|
|
36
|
-
|
|
32
|
+
I(!1), R(""), B(""), H("");
|
|
37
33
|
},
|
|
38
|
-
onSettled:
|
|
39
|
-
}),
|
|
34
|
+
onSettled: W
|
|
35
|
+
}), K = S({
|
|
40
36
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}/requests/{requestId}", { params: { path: {
|
|
41
|
-
workspace:
|
|
42
|
-
identifier:
|
|
37
|
+
workspace: T,
|
|
38
|
+
identifier: E,
|
|
43
39
|
requestId: n
|
|
44
40
|
} } })),
|
|
45
|
-
onSettled:
|
|
41
|
+
onSettled: W
|
|
46
42
|
});
|
|
47
|
-
return
|
|
43
|
+
return N.length === 0 && !M ? null : /* @__PURE__ */ x("section", {
|
|
48
44
|
className: "mt-6",
|
|
49
|
-
"aria-label":
|
|
45
|
+
"aria-label": O("label"),
|
|
50
46
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ x("h2", {
|
|
52
48
|
className: "flex items-center gap-2 text-xs font-medium text-muted-foreground",
|
|
53
|
-
children: [
|
|
49
|
+
children: [O("label"), N.length > 0 && /* @__PURE__ */ b("span", {
|
|
54
50
|
className: "tabular-nums",
|
|
55
|
-
children:
|
|
51
|
+
children: N.length
|
|
56
52
|
})]
|
|
57
53
|
}),
|
|
58
|
-
|
|
54
|
+
N.length > 0 && /* @__PURE__ */ b(d, {
|
|
59
55
|
size: "fill",
|
|
60
56
|
padding: "none",
|
|
61
57
|
divided: !0,
|
|
62
58
|
interactive: !1,
|
|
63
|
-
render: /* @__PURE__ */
|
|
59
|
+
render: /* @__PURE__ */ b("ul", {}),
|
|
64
60
|
className: "mt-1",
|
|
65
|
-
children:
|
|
61
|
+
children: N.map((e) => /* @__PURE__ */ x("li", {
|
|
66
62
|
className: "flex items-start gap-2 px-3 py-2 text-sm",
|
|
67
63
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ b(c, { className: "mt-0.5 size-3.5 shrink-0 text-muted-foreground" }),
|
|
65
|
+
/* @__PURE__ */ x("div", {
|
|
70
66
|
className: "min-w-0 flex-1",
|
|
71
|
-
children: [/* @__PURE__ */
|
|
67
|
+
children: [/* @__PURE__ */ b("span", {
|
|
72
68
|
className: "font-medium",
|
|
73
69
|
children: e.customer.name
|
|
74
|
-
}), e.quote && /* @__PURE__ */
|
|
70
|
+
}), e.quote && /* @__PURE__ */ b("p", {
|
|
75
71
|
className: "mt-0.5 whitespace-pre-wrap text-muted-foreground",
|
|
76
|
-
children:
|
|
72
|
+
children: O("quoted", { quote: e.quote })
|
|
77
73
|
})]
|
|
78
74
|
}),
|
|
79
|
-
e.url && /* @__PURE__ */
|
|
75
|
+
e.url && /* @__PURE__ */ x("a", {
|
|
80
76
|
href: e.url,
|
|
81
77
|
target: "_blank",
|
|
82
78
|
rel: "noreferrer",
|
|
83
79
|
className: "inline-flex shrink-0 items-center gap-1 text-xs text-primary hover:underline",
|
|
84
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ b(s, { className: "size-3" }), O("source")]
|
|
85
81
|
}),
|
|
86
|
-
|
|
82
|
+
j && /* @__PURE__ */ b(p, {
|
|
87
83
|
variant: "ghost",
|
|
88
84
|
size: "sm",
|
|
89
|
-
icon: /* @__PURE__ */
|
|
90
|
-
label:
|
|
91
|
-
onClick: () =>
|
|
85
|
+
icon: /* @__PURE__ */ b(o, {}),
|
|
86
|
+
label: O("remove", { name: e.customer.name }),
|
|
87
|
+
onClick: () => K.mutate(e.id),
|
|
92
88
|
className: "-my-1"
|
|
93
89
|
})
|
|
94
90
|
]
|
|
95
91
|
}, e.id))
|
|
96
92
|
}),
|
|
97
|
-
|
|
93
|
+
M && (F ? /* @__PURE__ */ x("form", {
|
|
98
94
|
className: "mt-2 grid gap-2",
|
|
99
95
|
onSubmit: (e) => {
|
|
100
|
-
e.preventDefault(),
|
|
96
|
+
e.preventDefault(), L.trim() && G.mutate();
|
|
101
97
|
},
|
|
102
98
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ b(m, {
|
|
104
100
|
autoFocus: !0,
|
|
105
101
|
required: !0,
|
|
106
|
-
list:
|
|
107
|
-
value:
|
|
108
|
-
onChange: (e) =>
|
|
109
|
-
placeholder:
|
|
110
|
-
"aria-label":
|
|
102
|
+
list: U,
|
|
103
|
+
value: L,
|
|
104
|
+
onChange: (e) => R(e.target.value),
|
|
105
|
+
placeholder: O("customer"),
|
|
106
|
+
"aria-label": O("customer"),
|
|
111
107
|
maxLength: 200
|
|
112
108
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
id:
|
|
115
|
-
children:
|
|
109
|
+
/* @__PURE__ */ b("datalist", {
|
|
110
|
+
id: U,
|
|
111
|
+
children: P.map((e) => /* @__PURE__ */ b("option", { value: e.name }, e.id))
|
|
116
112
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
value:
|
|
119
|
-
onChange: (e) =>
|
|
120
|
-
placeholder:
|
|
121
|
-
"aria-label":
|
|
113
|
+
/* @__PURE__ */ b(h, {
|
|
114
|
+
value: z,
|
|
115
|
+
onChange: (e) => B(e.target.value),
|
|
116
|
+
placeholder: O("quote"),
|
|
117
|
+
"aria-label": O("quote"),
|
|
122
118
|
maxLength: 4e3,
|
|
123
119
|
rows: 2
|
|
124
120
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ b(m, {
|
|
126
122
|
type: "url",
|
|
127
|
-
value:
|
|
128
|
-
onChange: (e) =>
|
|
129
|
-
placeholder:
|
|
130
|
-
"aria-label":
|
|
123
|
+
value: V,
|
|
124
|
+
onChange: (e) => H(e.target.value),
|
|
125
|
+
placeholder: O("url"),
|
|
126
|
+
"aria-label": O("url"),
|
|
131
127
|
maxLength: 2e3
|
|
132
128
|
}),
|
|
133
|
-
|
|
129
|
+
G.isError && /* @__PURE__ */ b(f, {
|
|
134
130
|
size: "md",
|
|
135
|
-
children:
|
|
131
|
+
children: k(G.error)
|
|
136
132
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ x("div", {
|
|
138
134
|
className: "flex justify-end gap-2",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ b(u, {
|
|
140
136
|
type: "button",
|
|
141
137
|
size: "sm",
|
|
142
|
-
onClick: () =>
|
|
143
|
-
children:
|
|
144
|
-
}), /* @__PURE__ */
|
|
138
|
+
onClick: () => I(!1),
|
|
139
|
+
children: O("cancel")
|
|
140
|
+
}), /* @__PURE__ */ b(u, {
|
|
145
141
|
type: "submit",
|
|
146
142
|
size: "sm",
|
|
147
143
|
variant: "primary",
|
|
148
|
-
loading:
|
|
149
|
-
disabled: !
|
|
150
|
-
children:
|
|
144
|
+
loading: G.isPending,
|
|
145
|
+
disabled: !L.trim(),
|
|
146
|
+
children: O("add")
|
|
151
147
|
})]
|
|
152
148
|
})
|
|
153
149
|
]
|
|
154
|
-
}) : /* @__PURE__ */
|
|
150
|
+
}) : /* @__PURE__ */ x("button", {
|
|
155
151
|
type: "button",
|
|
156
|
-
onClick: () =>
|
|
152
|
+
onClick: () => I(!0),
|
|
157
153
|
className: "mt-1.5 flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ b(a, { className: "size-3.5" }), O("addRequest")]
|
|
159
155
|
}))
|
|
160
156
|
]
|
|
161
157
|
});
|
|
162
158
|
}
|
|
163
|
-
export {
|
|
159
|
+
export { T as CustomerRequests };
|
|
@@ -141,7 +141,10 @@ function O({ editor: O }) {
|
|
|
141
141
|
hint: e.heading ? e.doc.title : void 0
|
|
142
142
|
} : e.kind === "issue" ? {
|
|
143
143
|
key: `issue:${e.issue.id}`,
|
|
144
|
-
icon: /* @__PURE__ */ C(s, {
|
|
144
|
+
icon: /* @__PURE__ */ C(s, {
|
|
145
|
+
category: e.issue.status.category,
|
|
146
|
+
step: e.issue.status.step
|
|
147
|
+
}),
|
|
145
148
|
label: e.issue.title,
|
|
146
149
|
hint: e.issue.identifier
|
|
147
150
|
} : {
|
|
@@ -18,7 +18,10 @@ function C(e, t, m, h) {
|
|
|
18
18
|
case "issue": return {
|
|
19
19
|
href: `/${t}/issues/${e.issue?.identifier ?? ""}`,
|
|
20
20
|
label: e.issue ? `${e.issue.identifier} ${e.issue.title}` : h("issue"),
|
|
21
|
-
icon: e.issue ? /* @__PURE__ */ v(l, {
|
|
21
|
+
icon: e.issue ? /* @__PURE__ */ v(l, {
|
|
22
|
+
category: e.issue.status.category,
|
|
23
|
+
step: e.issue.status.step
|
|
24
|
+
}) : null
|
|
22
25
|
};
|
|
23
26
|
case "team": return {
|
|
24
27
|
href: p(t, e.team?.key ?? "", "issues"),
|