@parallelworks/tandem-web 0.167.0 → 0.168.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.
- package/_virtual/_virtual_i18n/en/common.js +1 -0
- package/_virtual/_virtual_i18n/es/common.js +1 -0
- package/_virtual/_virtual_i18n/ja/common.js +1 -0
- package/_virtual/_virtual_i18n/ko/common.js +1 -0
- package/_virtual/_virtual_i18n/zh/common.js +1 -0
- package/components/status.js +12 -2
- package/package.json +1 -1
- package/routes/__root.js +3 -3
- package/routes/_workspace/agents/_slug2.js +146 -148
- package/routes/_workspace/people/_username2.js +74 -77
- package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +39 -38
- package/routes/_workspace/teams/_key/cycles/_number2.js +92 -94
- package/routes/_workspace/teams/_key2.js +2 -5
|
@@ -1,145 +1,142 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { NotFound as e } from "../../../components/status.js";
|
|
2
|
+
import { usePageTitle as t } from "../../../lib/pageTitle.js";
|
|
3
|
+
import { Link as n } from "../../../lib/router.js";
|
|
4
|
+
import { membersQuery as r, projectsQuery as i, teamMembersQuery as a, teamsQuery as o } from "../../../api/queries.js";
|
|
5
|
+
import { MailIcon as s } from "../../../components/icons.js";
|
|
5
6
|
import { projectRef as c } from "../../../lib/projects.js";
|
|
6
7
|
import { EntityIcon as l } from "../../../components/EntityIcon.js";
|
|
7
8
|
import { useRoleName as u } from "../../../lib/roles.js";
|
|
8
9
|
import { Route as d } from "./_username.js";
|
|
9
10
|
import { IssueList as f } from "../../../pages/issues.js";
|
|
10
11
|
import { PersonActivity as p } from "../../../components/PersonActivity.js";
|
|
11
|
-
import { Avatar as m,
|
|
12
|
-
import { useTranslations as
|
|
13
|
-
import { jsx as
|
|
14
|
-
import { useQueries as
|
|
12
|
+
import { Avatar as m, StatusBadge as h, Tabs as g } from "@parallelworks/ui";
|
|
13
|
+
import { useTranslations as _ } from "use-intl";
|
|
14
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
15
|
+
import { useQueries as b, useQuery as x, useSuspenseQuery as S } from "@tanstack/react-query";
|
|
15
16
|
// src/routes/$workspace/people/$username.tsx?tsr-split=component
|
|
16
|
-
function
|
|
17
|
-
let { workspace:
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
icon: /* @__PURE__ */ y(s, {}),
|
|
22
|
-
title: a("notFound"),
|
|
23
|
-
description: a("notFoundDetail")
|
|
24
|
-
})
|
|
17
|
+
function C() {
|
|
18
|
+
let { workspace: n, username: i } = d.useParams(), { tab: a } = d.useSearch(), o = _("person"), c = u(n), { data: l } = S(r(n)), b = l.find((e) => e.user.username === i);
|
|
19
|
+
if (t(b?.user.name ?? i), !b) return /* @__PURE__ */ v(e, {
|
|
20
|
+
title: o("notFound"),
|
|
21
|
+
description: o("notFoundDetail")
|
|
25
22
|
});
|
|
26
|
-
let { user:
|
|
27
|
-
return /* @__PURE__ */
|
|
23
|
+
let { user: x } = b;
|
|
24
|
+
return /* @__PURE__ */ y("div", {
|
|
28
25
|
className: "flex h-full min-h-0 flex-col",
|
|
29
|
-
children: [/* @__PURE__ */
|
|
30
|
-
"aria-label":
|
|
26
|
+
children: [/* @__PURE__ */ y("section", {
|
|
27
|
+
"aria-label": o("profile"),
|
|
31
28
|
className: "flex shrink-0 flex-wrap items-start gap-4 border-b border-border px-4 py-5 md:px-6",
|
|
32
|
-
children: [/* @__PURE__ */
|
|
33
|
-
name:
|
|
34
|
-
src:
|
|
29
|
+
children: [/* @__PURE__ */ v(m, {
|
|
30
|
+
name: x.name,
|
|
31
|
+
src: x.avatarUrl,
|
|
35
32
|
size: "xl"
|
|
36
|
-
}), /* @__PURE__ */
|
|
33
|
+
}), /* @__PURE__ */ y("div", {
|
|
37
34
|
className: "min-w-0 flex-1 space-y-2",
|
|
38
35
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ y("div", {
|
|
40
37
|
className: "flex flex-wrap items-center gap-2",
|
|
41
|
-
children: [/* @__PURE__ */
|
|
38
|
+
children: [/* @__PURE__ */ v("h1", {
|
|
42
39
|
className: "truncate text-lg font-semibold tracking-tight",
|
|
43
|
-
children:
|
|
44
|
-
}), /* @__PURE__ */
|
|
40
|
+
children: x.name
|
|
41
|
+
}), /* @__PURE__ */ v(h, {
|
|
45
42
|
emphasis: "outline",
|
|
46
|
-
children: c(
|
|
43
|
+
children: c(b.role)
|
|
47
44
|
})]
|
|
48
45
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ y("p", {
|
|
50
47
|
className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-muted-foreground",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
52
|
-
href: `mailto:${
|
|
48
|
+
children: [/* @__PURE__ */ v("span", { children: `@${x.username}` }), x.email && /* @__PURE__ */ y("a", {
|
|
49
|
+
href: `mailto:${x.email}`,
|
|
53
50
|
className: "inline-flex items-center gap-1.5 hover:text-foreground",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
51
|
+
children: [/* @__PURE__ */ v(s, { className: "size-3.5" }), x.email]
|
|
55
52
|
})]
|
|
56
53
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
workspace:
|
|
59
|
-
username:
|
|
54
|
+
/* @__PURE__ */ v(w, {
|
|
55
|
+
workspace: n,
|
|
56
|
+
username: i
|
|
60
57
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ v(g, {
|
|
62
59
|
variant: "segmented",
|
|
63
60
|
size: "sm",
|
|
64
|
-
label:
|
|
61
|
+
label: o("sections"),
|
|
65
62
|
items: ["issues", "activity"].map((e) => ({
|
|
66
63
|
value: e,
|
|
67
|
-
label:
|
|
68
|
-
href: `/${
|
|
64
|
+
label: o(`section.${e}`),
|
|
65
|
+
href: `/${n}/people/${encodeURIComponent(i)}${e === "activity" ? "?tab=activity" : ""}`
|
|
69
66
|
})),
|
|
70
|
-
value:
|
|
67
|
+
value: a === "activity" ? "activity" : "issues"
|
|
71
68
|
})
|
|
72
69
|
]
|
|
73
70
|
})]
|
|
74
|
-
}), /* @__PURE__ */
|
|
71
|
+
}), /* @__PURE__ */ v("div", {
|
|
75
72
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
76
|
-
children:
|
|
77
|
-
workspace:
|
|
78
|
-
username:
|
|
79
|
-
}) : /* @__PURE__ */
|
|
73
|
+
children: a === "activity" ? /* @__PURE__ */ v(p, {
|
|
74
|
+
workspace: n,
|
|
75
|
+
username: i
|
|
76
|
+
}) : /* @__PURE__ */ v(f, { person: i })
|
|
80
77
|
})]
|
|
81
78
|
});
|
|
82
79
|
}
|
|
83
|
-
function
|
|
84
|
-
let
|
|
85
|
-
return /* @__PURE__ */
|
|
80
|
+
function w({ workspace: e, username: t }) {
|
|
81
|
+
let r = _("person"), { data: s = [] } = x(o(e)), { data: u = [] } = x(i(e)), d = s.filter((e) => !e.archivedAt), f = b({ queries: d.map((t) => a(e, t.key)) }), p = d.filter((e, n) => f[n]?.data?.includes(t)), m = (e) => e !== "completed" && e !== "canceled", h = u.filter((e) => m(e.status) && (e.lead === t || e.members.includes(t))), g = "inline-flex max-w-56 items-center gap-1.5 rounded-md border border-border px-2 py-0.5 text-xs hover:bg-muted";
|
|
82
|
+
return /* @__PURE__ */ y("dl", {
|
|
86
83
|
className: "space-y-1.5 text-xs",
|
|
87
|
-
children: [p.length > 0 && /* @__PURE__ */
|
|
88
|
-
label:
|
|
89
|
-
children: p.map((
|
|
84
|
+
children: [p.length > 0 && /* @__PURE__ */ v(T, {
|
|
85
|
+
label: r("teams"),
|
|
86
|
+
children: p.map((t) => /* @__PURE__ */ y(n, {
|
|
90
87
|
to: "/$workspace/teams/$key/issues",
|
|
91
88
|
params: {
|
|
92
89
|
workspace: e,
|
|
93
|
-
key:
|
|
90
|
+
key: t.key
|
|
94
91
|
},
|
|
95
92
|
className: g,
|
|
96
|
-
children: [/* @__PURE__ */
|
|
97
|
-
icon:
|
|
98
|
-
name:
|
|
93
|
+
children: [/* @__PURE__ */ v(l, {
|
|
94
|
+
icon: t.icon ?? "",
|
|
95
|
+
name: t.name,
|
|
99
96
|
className: "size-3.5"
|
|
100
|
-
}), /* @__PURE__ */
|
|
97
|
+
}), /* @__PURE__ */ v("span", {
|
|
101
98
|
className: "truncate",
|
|
102
|
-
children:
|
|
99
|
+
children: t.name
|
|
103
100
|
})]
|
|
104
|
-
},
|
|
105
|
-
}), h.length > 0 && /* @__PURE__ */
|
|
106
|
-
label:
|
|
107
|
-
children: h.map((
|
|
101
|
+
}, t.id))
|
|
102
|
+
}), h.length > 0 && /* @__PURE__ */ v(T, {
|
|
103
|
+
label: r("projects"),
|
|
104
|
+
children: h.map((i) => /* @__PURE__ */ y(n, {
|
|
108
105
|
to: "/$workspace/projects/$projectId",
|
|
109
106
|
params: {
|
|
110
107
|
workspace: e,
|
|
111
|
-
projectId: c(
|
|
108
|
+
projectId: c(i)
|
|
112
109
|
},
|
|
113
110
|
className: g,
|
|
114
111
|
children: [
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
icon:
|
|
117
|
-
name:
|
|
112
|
+
/* @__PURE__ */ v(l, {
|
|
113
|
+
icon: i.icon ?? "",
|
|
114
|
+
name: i.name,
|
|
118
115
|
className: "size-3.5"
|
|
119
116
|
}),
|
|
120
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ v("span", {
|
|
121
118
|
className: "truncate",
|
|
122
|
-
children:
|
|
119
|
+
children: i.name
|
|
123
120
|
}),
|
|
124
|
-
|
|
121
|
+
i.lead === t && /* @__PURE__ */ v("span", {
|
|
125
122
|
className: "text-muted-foreground",
|
|
126
|
-
children:
|
|
123
|
+
children: r("lead")
|
|
127
124
|
})
|
|
128
125
|
]
|
|
129
|
-
},
|
|
126
|
+
}, i.id))
|
|
130
127
|
})]
|
|
131
128
|
});
|
|
132
129
|
}
|
|
133
|
-
function
|
|
134
|
-
return /* @__PURE__ */
|
|
130
|
+
function T({ label: e, children: t }) {
|
|
131
|
+
return /* @__PURE__ */ y("div", {
|
|
135
132
|
className: "flex flex-wrap items-center gap-1.5",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ v("dt", {
|
|
137
134
|
className: "w-20 shrink-0 text-muted-foreground",
|
|
138
135
|
children: e
|
|
139
|
-
}), /* @__PURE__ */
|
|
136
|
+
}), /* @__PURE__ */ v("dd", {
|
|
140
137
|
className: "flex min-w-0 flex-1 flex-wrap gap-1.5",
|
|
141
138
|
children: t
|
|
142
139
|
})]
|
|
143
140
|
});
|
|
144
141
|
}
|
|
145
|
-
export {
|
|
142
|
+
export { C as component };
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
2
|
+
import { NotFound as n } from "../../../components/status.js";
|
|
3
|
+
import { usePageTitle as r } from "../../../lib/pageTitle.js";
|
|
4
|
+
import { useNavigate as i } from "../../../lib/router.js";
|
|
5
|
+
import { issuesQuery as a, projectQuery as o } from "../../../api/queries.js";
|
|
6
|
+
import { invalidateIssueViews as s } from "../../../api/mutations.js";
|
|
7
|
+
import { copyItem as c } from "../../../lib/menus.js";
|
|
8
|
+
import { useTime as l } from "../../../lib/time.js";
|
|
9
|
+
import { ProgressBar as u } from "../../../components/Planning.js";
|
|
10
|
+
import { projectRef as d } from "../../../lib/projects.js";
|
|
11
|
+
import { useCan as f } from "../../../lib/roles.js";
|
|
12
|
+
import { useConfirm as p } from "../../../lib/confirm.js";
|
|
13
|
+
import { Editor as m } from "../../../components/Editor.js";
|
|
14
|
+
import { Route as h } from "./_projectId_.milestones._milestoneId.js";
|
|
15
|
+
import { StatusGroups as g } from "../../../components/IssueGroup.js";
|
|
16
|
+
import { projectIssues as _ } from "./_projectId_2.milestones._milestoneId.js";
|
|
17
|
+
import { Card as v, DatePicker as y, EmptyState as b, ErrorText as ee, Input as x, PageHeader as S, menuDivider as te } from "@parallelworks/ui";
|
|
18
|
+
import { useState as ne } from "react";
|
|
19
|
+
import { useErrorMessage as re } from "@parallelworks/problem/react";
|
|
19
20
|
import { useTranslations as C } from "use-intl";
|
|
20
21
|
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
21
22
|
import { useMutation as E, useQueryClient as D, useSuspenseQuery as O } from "@tanstack/react-query";
|
|
22
23
|
import { MoreButton as k } from "@parallelworks/ui/list";
|
|
23
24
|
// src/routes/$workspace/projects/$projectId_.milestones.$milestoneId.tsx?tsr-split=component
|
|
24
25
|
function A() {
|
|
25
|
-
let { workspace: A, projectId: j, milestoneId: M } =
|
|
26
|
-
|
|
27
|
-
let W =
|
|
26
|
+
let { workspace: A, projectId: j, milestoneId: M } = h.useParams(), N = C("planning"), P = C("common"), F = re(), I = l(), L = i(), R = D(), { confirm: z, dialog: B } = p(), { data: V } = O(o(A, j)), { data: H } = O(a(A, _(V.id))), U = V.milestones.find((e) => e.id === M);
|
|
27
|
+
r(U?.name, V.name);
|
|
28
|
+
let W = f(A, "manage_projects", { project: V.id }), [G, K] = ne(!1), q = `/${A}/projects/${d(V)}`, J = {
|
|
28
29
|
workspace: A,
|
|
29
30
|
projectId: V.id,
|
|
30
31
|
milestoneId: M
|
|
@@ -33,7 +34,7 @@ function A() {
|
|
|
33
34
|
"workspace",
|
|
34
35
|
A,
|
|
35
36
|
"projects"
|
|
36
|
-
] }),
|
|
37
|
+
] }), s(R, A);
|
|
37
38
|
}, X = E({
|
|
38
39
|
mutationFn: async (n) => t(await e.PATCH("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones/{milestoneId}", {
|
|
39
40
|
params: { path: J },
|
|
@@ -47,7 +48,7 @@ function A() {
|
|
|
47
48
|
});
|
|
48
49
|
if (!U) return /* @__PURE__ */ T("div", {
|
|
49
50
|
className: "flex h-full min-h-0 flex-col",
|
|
50
|
-
children: [/* @__PURE__ */ w(
|
|
51
|
+
children: [/* @__PURE__ */ w(S, {
|
|
51
52
|
heading: !1,
|
|
52
53
|
breadcrumbs: [{
|
|
53
54
|
label: N("projects"),
|
|
@@ -56,17 +57,17 @@ function A() {
|
|
|
56
57
|
label: V.name,
|
|
57
58
|
href: q
|
|
58
59
|
}]
|
|
59
|
-
}), /* @__PURE__ */ w(
|
|
60
|
-
title: N("
|
|
61
|
-
|
|
60
|
+
}), /* @__PURE__ */ w(n, {
|
|
61
|
+
title: N("noSuchMilestone"),
|
|
62
|
+
description: N("milestoneGone")
|
|
62
63
|
})]
|
|
63
64
|
});
|
|
64
|
-
let Q = H.issues.filter((e) => e.milestone?.id === U.id),
|
|
65
|
+
let Q = H.issues.filter((e) => e.milestone?.id === U.id), ie = W ? [
|
|
65
66
|
{
|
|
66
67
|
label: N("rename"),
|
|
67
68
|
onClick: () => K(!0)
|
|
68
69
|
},
|
|
69
|
-
|
|
70
|
+
te,
|
|
70
71
|
{
|
|
71
72
|
label: N("deleteMilestone"),
|
|
72
73
|
destructive: !0,
|
|
@@ -77,11 +78,11 @@ function A() {
|
|
|
77
78
|
onConfirm: () => Z.mutateAsync()
|
|
78
79
|
})
|
|
79
80
|
}
|
|
80
|
-
] : [
|
|
81
|
+
] : [c(P("copyName"), U.name)], $ = X.error ?? Z.error;
|
|
81
82
|
return /* @__PURE__ */ T("div", {
|
|
82
83
|
className: "flex h-full min-h-0 flex-col",
|
|
83
84
|
children: [
|
|
84
|
-
/* @__PURE__ */ w(
|
|
85
|
+
/* @__PURE__ */ w(S, {
|
|
85
86
|
heading: !1,
|
|
86
87
|
breadcrumbs: [
|
|
87
88
|
{
|
|
@@ -95,7 +96,7 @@ function A() {
|
|
|
95
96
|
{ label: U.name }
|
|
96
97
|
],
|
|
97
98
|
titleActions: /* @__PURE__ */ w(k, {
|
|
98
|
-
items: () =>
|
|
99
|
+
items: () => ie,
|
|
99
100
|
label: P("moreActionsFor", { name: U.name }),
|
|
100
101
|
visible: !0
|
|
101
102
|
})
|
|
@@ -105,7 +106,7 @@ function A() {
|
|
|
105
106
|
children: /* @__PURE__ */ T("div", {
|
|
106
107
|
className: "mx-auto max-w-4xl",
|
|
107
108
|
children: [
|
|
108
|
-
G ? /* @__PURE__ */ w(
|
|
109
|
+
G ? /* @__PURE__ */ w(x, {
|
|
109
110
|
autoFocus: !0,
|
|
110
111
|
defaultValue: U.name,
|
|
111
112
|
"aria-label": N("milestoneName"),
|
|
@@ -123,7 +124,7 @@ function A() {
|
|
|
123
124
|
}),
|
|
124
125
|
/* @__PURE__ */ T("div", {
|
|
125
126
|
className: "mt-3 flex flex-wrap items-center gap-x-6 gap-y-3",
|
|
126
|
-
children: [W ? /* @__PURE__ */ w(
|
|
127
|
+
children: [W ? /* @__PURE__ */ w(y, {
|
|
127
128
|
value: U.targetDate ?? "",
|
|
128
129
|
onValueChange: (e) => X.mutate({ targetDate: e }),
|
|
129
130
|
"aria-label": N("targetDate"),
|
|
@@ -134,10 +135,10 @@ function A() {
|
|
|
134
135
|
children: U.targetDate ? I.day(U.targetDate) : N("noTargetDate")
|
|
135
136
|
}), /* @__PURE__ */ w("span", {
|
|
136
137
|
className: "w-56 max-w-full",
|
|
137
|
-
children: /* @__PURE__ */ w(
|
|
138
|
+
children: /* @__PURE__ */ w(u, { progress: U.progress })
|
|
138
139
|
})]
|
|
139
140
|
}),
|
|
140
|
-
$ && /* @__PURE__ */ w(
|
|
141
|
+
$ && /* @__PURE__ */ w(ee, {
|
|
141
142
|
size: "md",
|
|
142
143
|
className: "mt-2",
|
|
143
144
|
children: F($)
|
|
@@ -147,11 +148,11 @@ function A() {
|
|
|
147
148
|
children: [/* @__PURE__ */ w("h2", {
|
|
148
149
|
className: "text-base font-semibold",
|
|
149
150
|
children: P("description")
|
|
150
|
-
}), /* @__PURE__ */ w(
|
|
151
|
+
}), /* @__PURE__ */ w(v, {
|
|
151
152
|
size: "fill",
|
|
152
153
|
padding: "sm",
|
|
153
154
|
className: "mt-2 min-h-16",
|
|
154
|
-
children: /* @__PURE__ */ w(
|
|
155
|
+
children: /* @__PURE__ */ w(m, {
|
|
155
156
|
value: U.description,
|
|
156
157
|
editable: W,
|
|
157
158
|
placeholder: N("addDescription"),
|
|
@@ -169,10 +170,10 @@ function A() {
|
|
|
169
170
|
children: N("issues")
|
|
170
171
|
}), /* @__PURE__ */ w("div", {
|
|
171
172
|
className: "mt-2",
|
|
172
|
-
children: Q.length === 0 ? /* @__PURE__ */ w(
|
|
173
|
+
children: Q.length === 0 ? /* @__PURE__ */ w(b, {
|
|
173
174
|
variant: "bare",
|
|
174
175
|
title: N("noIssuesInMilestone")
|
|
175
|
-
}) : /* @__PURE__ */ w(
|
|
176
|
+
}) : /* @__PURE__ */ w(g, {
|
|
176
177
|
workspace: A,
|
|
177
178
|
issues: Q
|
|
178
179
|
})
|