@parallelworks/tandem-web 0.138.2 → 0.139.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/components/AgentWork.js +35 -35
- package/components/AppRoot.js +8 -7
- package/components/AreaWork.js +1 -1
- package/components/BlockHandle.js +3 -3
- package/components/CommandPalette.js +27 -27
- package/components/DateChip.js +27 -27
- package/components/DocLinkPicker.js +17 -17
- package/components/Graph.js +6 -6
- package/components/HoverCards.js +30 -29
- package/components/IssueListBlock.js +83 -83
- package/components/LinkCard.js +20 -20
- package/components/MentionPicker.js +12 -12
- package/components/NewIssueDialog.js +116 -116
- package/components/NewProjectDialog.js +5 -4
- package/components/Planning.js +31 -43
- package/components/RouterLink.js +4 -4
- package/components/ShareDialog.js +12 -12
- package/components/SharedUI.js +19 -19
- package/components/SlashMenu.js +11 -11
- package/components/SubPages.js +10 -10
- package/components/UnlinkedMentions.js +10 -10
- package/components/WorkCounts.js +8 -8
- package/components/settings.js +31 -31
- package/hostedApp.js +41 -39
- package/hosting.d.ts +24 -11
- package/index.js +58 -27
- package/lib/base.js +1 -14
- package/lib/docs.js +6 -6
- package/lib/issueMenu.js +33 -33
- package/lib/knowledge.js +90 -101
- package/lib/knowledgeKinds.js +14 -0
- package/lib/pageTitle.js +22 -10
- package/lib/projectList.js +1 -1
- package/lib/projectStates.js +15 -0
- package/lib/router.js +20 -34
- package/package.json +2 -2
- package/pages/areas.js +223 -223
- package/pages/decisions.js +69 -69
- package/pages/issues.js +38 -38
- package/pages/projects.js +268 -267
- package/pages/triage.js +133 -133
- package/pages.js +21 -0
- package/routes/__root.js +6 -6
- package/routes/_workspace/agents/_slug2.js +21 -21
- package/routes/_workspace/agents/index2.js +16 -16
- package/routes/_workspace/areas/_area2.js +105 -105
- package/routes/_workspace/docs/_doc2.js +189 -189
- package/routes/_workspace/docs2.js +8 -8
- package/routes/_workspace/graph2.js +9 -9
- package/routes/_workspace/graph3.js +8 -8
- package/routes/_workspace/issues/_identifier2.js +249 -249
- package/routes/_workspace/issues/index.js +6 -6
- package/routes/_workspace/knowledge/_term2.js +119 -118
- package/routes/_workspace/knowledge/index.js +8 -8
- package/routes/_workspace/knowledge/index2.js +41 -40
- package/routes/_workspace/measures2.js +4 -4
- package/routes/_workspace/measures3.js +18 -18
- package/routes/_workspace/notifications2.js +112 -112
- package/routes/_workspace/people/_username.js +4 -4
- package/routes/_workspace/people/_username2.js +36 -36
- package/routes/_workspace/projects/_projectId3.js +369 -368
- package/routes/_workspace/projects/index.js +7 -7
- package/routes/_workspace/settings/account2.js +3 -3
- package/routes/_workspace/settings/audit-log2.js +4 -4
- package/routes/_workspace/settings/audit-log3.js +51 -51
- package/routes/_workspace/settings/labels2.js +14 -14
- package/routes/_workspace/settings/members2.js +9 -9
- package/routes/_workspace/settings/runners2.js +11 -11
- package/routes/_workspace/settings/teams2.js +15 -15
- package/routes/_workspace/settings/tokens2.js +5 -5
- package/routes/_workspace/settings/webhooks2.js +7 -7
- package/routes/_workspace/settings2.js +3 -3
- package/routes/_workspace/teams/_key/cycles/_number2.js +16 -16
- package/routes/_workspace/teams/_key/cycles/index2.js +40 -40
- package/routes/_workspace/teams/_key/issues.js +4 -4
- package/routes/_workspace/teams/_key/projects.js +4 -4
- package/routes/_workspace/teams/_key/settings2.js +133 -133
- package/routes/_workspace2.js +319 -319
- package/routes/docs/route2.js +19 -19
- package/routes/new2.js +8 -8
- package/routes/request2._token.js +4 -4
package/pages/projects.js
CHANGED
|
@@ -1,257 +1,258 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { usePageTitle as e } from "../lib/pageTitle.js";
|
|
2
|
+
import { Link as t, useNavigate as n } from "../lib/router.js";
|
|
3
|
+
import { projectsQuery as r, teamsQuery as i } from "../api/queries.js";
|
|
4
|
+
import { ChevronDownIcon as a, ListViewIcon as o, PriorityIcon as s, ProjectIcon as c, TimelineIcon as l, usePriorityNames as u } from "../components/icons.js";
|
|
5
|
+
import { healthStates as d, projectStatuses as f } from "../lib/projectStates.js";
|
|
6
|
+
import { storeLayout as p, storedLayout as m } from "../lib/projectList.js";
|
|
7
|
+
import { useFavorites as h } from "../lib/favorites.js";
|
|
8
|
+
import { copyItem as g, useLinkItems as _ } from "../lib/menus.js";
|
|
9
|
+
import { useTime as v } from "../lib/time.js";
|
|
10
|
+
import { HealthIcon as y, ProgressBar as b, ProjectStatusIcon as x, healthOf as S } from "../components/Planning.js";
|
|
11
|
+
import { usePeople as C } from "../lib/people.js";
|
|
11
12
|
import { useCan as w } from "../lib/roles.js";
|
|
12
13
|
import { EntityIcon as T } from "../components/EntityIcon.js";
|
|
13
14
|
import { projectRef as E, projectTree as D, projectsUnder as O } from "../lib/projects.js";
|
|
14
15
|
import { FavoriteStar as ee } from "../components/FavoriteStar.js";
|
|
15
|
-
import { DisplayMenu as
|
|
16
|
-
import { NewProjectDialog as
|
|
17
|
-
import { Avatar as
|
|
18
|
-
import { useEffect as P, useId as le, useRef as F, useState as I } from "react";
|
|
19
|
-
import { useFormatter as L, useTranslations as R } from "use-intl";
|
|
20
|
-
import { jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
16
|
+
import { DisplayMenu as te } from "../components/DisplayMenu.js";
|
|
17
|
+
import { NewProjectDialog as ne } from "../components/NewProjectDialog.js";
|
|
18
|
+
import { Avatar as k, Button as A, Combobox as re, EmptyState as ie, PageHeaderAddButton as ae, Switch as oe, Tabs as j, ToggleGroup as se, Tooltip as M, menuDivider as ce, useOpenMenu as le } from "@parallelworks/ui";
|
|
21
19
|
import { useParams as ue, useSearch as de } from "@tanstack/react-router";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
20
|
+
import { useEffect as N, useId as fe, useRef as P, useState as F } from "react";
|
|
21
|
+
import { useFormatter as I, useTranslations as L } from "use-intl";
|
|
22
|
+
import { jsx as R, jsxs as z } from "react/jsx-runtime";
|
|
23
|
+
import { useSuspenseQuery as B } from "@tanstack/react-query";
|
|
24
|
+
import { MoreButton as V } from "@parallelworks/ui/list";
|
|
24
25
|
// src/pages/projects.tsx
|
|
25
|
-
function
|
|
26
|
-
let { workspace:
|
|
27
|
-
...
|
|
28
|
-
team:
|
|
29
|
-
} :
|
|
30
|
-
|
|
31
|
-
let
|
|
26
|
+
function H() {
|
|
27
|
+
let { workspace: t, key: a } = ue({ strict: !1 }), s = de({ strict: !1 }), u = a ? {
|
|
28
|
+
...s,
|
|
29
|
+
team: a
|
|
30
|
+
} : s, d = L("planning"), v = L("common"), { data: y } = B(r(t)), { data: b } = B(i(t)), x = b.find((e) => e.key === u.team);
|
|
31
|
+
e(x ? d("teamProjects", { team: x.name }) : d("projects"));
|
|
32
|
+
let C = a ? "list" : "timeline", T = u.view ?? m(!!a) ?? C, D = y.filter((e) => (!x || e.teamIds.includes(x.id)) && !!e.template == (T === "templates")), k = w(t, "manage_projects"), [j, M] = F(!1), N = fe(), P = n(), I = le(), V = _(), H = u.parent ? y.find((e) => e.id === u.parent) : void 0, U = H && new Set(O(y, H.id).map((e) => e.id)), W = D.filter((e) => (!u.status || e.status === u.status) && (!u.health || S(e) === u.health) && (!U || U.has(e.id))), G = (e) => {
|
|
32
33
|
let { team: n, ...r } = Object.fromEntries(Object.entries({
|
|
33
|
-
...
|
|
34
|
-
...
|
|
34
|
+
...u,
|
|
35
|
+
...e
|
|
35
36
|
}).filter(([, e]) => e !== void 0));
|
|
36
|
-
return
|
|
37
|
+
return P(a ? {
|
|
37
38
|
to: "/$workspace/teams/$key/projects",
|
|
38
39
|
params: {
|
|
39
|
-
workspace:
|
|
40
|
-
key:
|
|
40
|
+
workspace: t,
|
|
41
|
+
key: a
|
|
41
42
|
},
|
|
42
43
|
search: r,
|
|
43
44
|
replace: !0
|
|
44
45
|
} : {
|
|
45
46
|
to: "/$workspace/projects",
|
|
46
|
-
params: { workspace:
|
|
47
|
+
params: { workspace: t },
|
|
47
48
|
search: r,
|
|
48
49
|
replace: !0
|
|
49
50
|
});
|
|
50
|
-
},
|
|
51
|
+
}, K = h(t), q = L("favorites"), J = (e) => [
|
|
51
52
|
{
|
|
52
|
-
label:
|
|
53
|
-
onClick: () =>
|
|
53
|
+
label: v("open"),
|
|
54
|
+
onClick: () => P({
|
|
54
55
|
to: "/$workspace/projects/$projectId",
|
|
55
56
|
params: {
|
|
56
|
-
workspace:
|
|
57
|
-
projectId: E(
|
|
57
|
+
workspace: t,
|
|
58
|
+
projectId: E(e)
|
|
58
59
|
}
|
|
59
60
|
})
|
|
60
61
|
},
|
|
61
62
|
{
|
|
62
|
-
label:
|
|
63
|
-
onClick: () =>
|
|
63
|
+
label: d("viewIssues"),
|
|
64
|
+
onClick: () => P({
|
|
64
65
|
to: "/$workspace/projects/$projectId",
|
|
65
66
|
params: {
|
|
66
|
-
workspace:
|
|
67
|
-
projectId: E(
|
|
67
|
+
workspace: t,
|
|
68
|
+
projectId: E(e)
|
|
68
69
|
},
|
|
69
70
|
search: { tab: "issues" }
|
|
70
71
|
})
|
|
71
72
|
},
|
|
72
73
|
{
|
|
73
|
-
label:
|
|
74
|
-
onClick: () =>
|
|
74
|
+
label: K.find("project", e.id) ? q("remove") : q("add"),
|
|
75
|
+
onClick: () => K.toggle("project", e.id)
|
|
75
76
|
},
|
|
76
|
-
|
|
77
|
-
...
|
|
78
|
-
|
|
79
|
-
],
|
|
80
|
-
workspace:
|
|
81
|
-
project:
|
|
82
|
-
onContextMenu: (
|
|
83
|
-
menu: () =>
|
|
77
|
+
ce,
|
|
78
|
+
...V(`/${t}/projects/${E(e)}`),
|
|
79
|
+
g(v("copyName"), e.name)
|
|
80
|
+
], Y = (e) => ({
|
|
81
|
+
workspace: t,
|
|
82
|
+
project: e,
|
|
83
|
+
onContextMenu: (t) => I(t, J(e)),
|
|
84
|
+
menu: () => J(e)
|
|
84
85
|
});
|
|
85
|
-
return /* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ z("div", {
|
|
86
87
|
className: "flex h-full min-h-0 flex-col",
|
|
87
88
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ z("header", {
|
|
89
90
|
className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-4 md:px-5",
|
|
90
91
|
children: [
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ R("h1", {
|
|
92
93
|
className: "min-w-0 truncate text-sm font-semibold",
|
|
93
|
-
children:
|
|
94
|
+
children: x ? d("teamProjects", { team: x.name }) : d("projects")
|
|
94
95
|
}),
|
|
95
|
-
!
|
|
96
|
-
workspace:
|
|
96
|
+
!x && /* @__PURE__ */ R(ee, {
|
|
97
|
+
workspace: t,
|
|
97
98
|
kind: "page",
|
|
98
99
|
target: "projects"
|
|
99
100
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ R("span", {
|
|
101
102
|
className: "ml-auto flex items-center gap-1",
|
|
102
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ R(te, {
|
|
103
104
|
...T !== "templates" && {
|
|
104
105
|
layouts: [{
|
|
105
106
|
value: "list",
|
|
106
|
-
label:
|
|
107
|
-
icon: /* @__PURE__ */
|
|
107
|
+
label: d("views.list"),
|
|
108
|
+
icon: /* @__PURE__ */ R(o, {})
|
|
108
109
|
}, {
|
|
109
110
|
value: "timeline",
|
|
110
|
-
label:
|
|
111
|
-
icon: /* @__PURE__ */
|
|
111
|
+
label: d("views.timeline"),
|
|
112
|
+
icon: /* @__PURE__ */ R(l, {})
|
|
112
113
|
}],
|
|
113
114
|
layout: T,
|
|
114
115
|
onLayoutChange: (e) => {
|
|
115
|
-
|
|
116
|
+
p(!!a, e), G({ view: e });
|
|
116
117
|
}
|
|
117
118
|
},
|
|
118
|
-
changed: T !==
|
|
119
|
-
children: /* @__PURE__ */
|
|
119
|
+
changed: T !== C,
|
|
120
|
+
children: /* @__PURE__ */ z("div", {
|
|
120
121
|
className: "flex items-center justify-between gap-3",
|
|
121
|
-
children: [/* @__PURE__ */
|
|
122
|
-
id:
|
|
122
|
+
children: [/* @__PURE__ */ R("span", {
|
|
123
|
+
id: N,
|
|
123
124
|
className: "text-sm",
|
|
124
|
-
children:
|
|
125
|
-
}), /* @__PURE__ */
|
|
125
|
+
children: d("showTemplates")
|
|
126
|
+
}), /* @__PURE__ */ R(oe, {
|
|
126
127
|
size: "sm",
|
|
127
128
|
checked: T === "templates",
|
|
128
|
-
onCheckedChange: (e) =>
|
|
129
|
-
"aria-labelledby":
|
|
129
|
+
onCheckedChange: (e) => G({ view: e ? "templates" : void 0 }),
|
|
130
|
+
"aria-labelledby": N
|
|
130
131
|
})]
|
|
131
132
|
})
|
|
132
133
|
})
|
|
133
134
|
}),
|
|
134
|
-
|
|
135
|
-
label:
|
|
136
|
-
onClick: () =>
|
|
135
|
+
k && /* @__PURE__ */ R(ae, {
|
|
136
|
+
label: d("newProject"),
|
|
137
|
+
onClick: () => M(!0)
|
|
137
138
|
})
|
|
138
139
|
]
|
|
139
140
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ z("div", {
|
|
141
142
|
className: "flex shrink-0 flex-wrap items-center gap-1 border-b border-border px-4 py-2 md:px-5",
|
|
142
143
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
label:
|
|
144
|
+
/* @__PURE__ */ R(se, {
|
|
145
|
+
label: d("filterStatus"),
|
|
145
146
|
multiple: !1,
|
|
146
147
|
all: { count: D.length },
|
|
147
|
-
options:
|
|
148
|
+
options: f.map((e) => ({
|
|
148
149
|
value: e,
|
|
149
|
-
label:
|
|
150
|
+
label: d(`status.${e}`),
|
|
150
151
|
count: D.filter((t) => t.status === e).length
|
|
151
152
|
})),
|
|
152
|
-
value:
|
|
153
|
-
onValueChange: ([e]) =>
|
|
153
|
+
value: u.status ? [u.status] : [],
|
|
154
|
+
onValueChange: ([e]) => G({ status: e })
|
|
154
155
|
}),
|
|
155
|
-
|
|
156
|
+
u.health && /* @__PURE__ */ R(A, {
|
|
156
157
|
variant: "outline",
|
|
157
158
|
size: "sm",
|
|
158
159
|
"aria-pressed": !0,
|
|
159
|
-
onClick: () =>
|
|
160
|
-
children:
|
|
160
|
+
onClick: () => G({ health: void 0 }),
|
|
161
|
+
children: d("healthFilter", { health: d(`health.${u.health}`) })
|
|
161
162
|
}),
|
|
162
|
-
D.some((e) => e.parentId) && /* @__PURE__ */
|
|
163
|
+
D.some((e) => e.parentId) && /* @__PURE__ */ R(re, {
|
|
163
164
|
items: [{
|
|
164
165
|
value: "",
|
|
165
|
-
label:
|
|
166
|
-
}, ...
|
|
166
|
+
label: d("anyParent")
|
|
167
|
+
}, ...y.filter((e) => y.some((t) => t.parentId === e.id)).map((e) => ({
|
|
167
168
|
value: e.id,
|
|
168
169
|
label: e.name
|
|
169
170
|
}))],
|
|
170
|
-
value:
|
|
171
|
-
onValueChange: (e) =>
|
|
172
|
-
placeholder:
|
|
173
|
-
"aria-label":
|
|
174
|
-
trigger: /* @__PURE__ */
|
|
171
|
+
value: u.parent ?? "",
|
|
172
|
+
onValueChange: (e) => G({ parent: e || void 0 }),
|
|
173
|
+
placeholder: d("parentProject"),
|
|
174
|
+
"aria-label": d("parentProject"),
|
|
175
|
+
trigger: /* @__PURE__ */ R(A, {
|
|
175
176
|
variant: "outline",
|
|
176
177
|
size: "sm",
|
|
177
|
-
className:
|
|
178
|
-
children:
|
|
178
|
+
className: H ? "border-(--theme-link) text-(--theme-app)" : void 0,
|
|
179
|
+
children: H ? d("underProject", { name: H.name }) : d("parentProject")
|
|
179
180
|
})
|
|
180
181
|
})
|
|
181
182
|
]
|
|
182
183
|
}),
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ z("div", {
|
|
184
185
|
className: "flex min-h-0 flex-1",
|
|
185
|
-
children: [/* @__PURE__ */
|
|
186
|
+
children: [/* @__PURE__ */ R("div", {
|
|
186
187
|
className: "min-h-0 min-w-0 flex-1 overflow-auto",
|
|
187
|
-
children:
|
|
188
|
+
children: W.length === 0 ? /* @__PURE__ */ R("div", {
|
|
188
189
|
className: "p-6",
|
|
189
|
-
children: /* @__PURE__ */
|
|
190
|
-
icon: /* @__PURE__ */
|
|
191
|
-
title:
|
|
192
|
-
...!
|
|
193
|
-
...
|
|
190
|
+
children: /* @__PURE__ */ R(ie, {
|
|
191
|
+
icon: /* @__PURE__ */ R(c, {}),
|
|
192
|
+
title: u.status || u.health ? d("noProjectsWithStatus") : d(T === "templates" ? "noTemplates" : "noProjects"),
|
|
193
|
+
...!u.status && !u.health && { description: d(T === "templates" ? "noTemplatesDescription" : "noProjectsDescription") },
|
|
194
|
+
...k && !u.status && !u.health && T !== "templates" && { action: /* @__PURE__ */ R(A, {
|
|
194
195
|
type: "button",
|
|
195
196
|
variant: "primary",
|
|
196
|
-
onClick: () =>
|
|
197
|
-
children:
|
|
197
|
+
onClick: () => M(!0),
|
|
198
|
+
children: d("newProject")
|
|
198
199
|
}) }
|
|
199
200
|
})
|
|
200
|
-
}) : T === "timeline" ? /* @__PURE__ */
|
|
201
|
-
workspace:
|
|
202
|
-
projects:
|
|
203
|
-
rowProps:
|
|
204
|
-
}) : /* @__PURE__ */
|
|
205
|
-
projects:
|
|
206
|
-
rowProps:
|
|
201
|
+
}) : T === "timeline" ? /* @__PURE__ */ R(ge, {
|
|
202
|
+
workspace: t,
|
|
203
|
+
projects: W,
|
|
204
|
+
rowProps: Y
|
|
205
|
+
}) : /* @__PURE__ */ R(pe, {
|
|
206
|
+
projects: W,
|
|
207
|
+
rowProps: Y
|
|
207
208
|
})
|
|
208
|
-
}), /* @__PURE__ */
|
|
209
|
-
workspace:
|
|
209
|
+
}), /* @__PURE__ */ R(_e, {
|
|
210
|
+
workspace: t,
|
|
210
211
|
projects: D,
|
|
211
|
-
health:
|
|
212
|
-
onHealth: (e) =>
|
|
212
|
+
health: u.health,
|
|
213
|
+
onHealth: (e) => G({ health: e === u.health ? void 0 : e })
|
|
213
214
|
})]
|
|
214
215
|
}),
|
|
215
|
-
|
|
216
|
-
workspace:
|
|
217
|
-
teamId:
|
|
218
|
-
onClose: () =>
|
|
216
|
+
j && /* @__PURE__ */ R(ne, {
|
|
217
|
+
workspace: t,
|
|
218
|
+
teamId: x?.id,
|
|
219
|
+
onClose: () => M(!1)
|
|
219
220
|
})
|
|
220
221
|
]
|
|
221
222
|
});
|
|
222
223
|
}
|
|
223
|
-
var
|
|
224
|
-
function
|
|
225
|
-
let n =
|
|
224
|
+
var U = "@4xl:grid @4xl:grid-cols-[minmax(0,1fr)_10rem_2rem_2rem_6rem_8rem_2rem]";
|
|
225
|
+
function pe({ projects: e, rowProps: t }) {
|
|
226
|
+
let n = L("planning"), [r, i] = F(/* @__PURE__ */ new Set()), a = new Set([...r].flatMap((t) => O(e, t).map((e) => e.id))), o = (e) => i((t) => {
|
|
226
227
|
let n = new Set(t);
|
|
227
228
|
return n.delete(e) || n.add(e), n;
|
|
228
229
|
});
|
|
229
|
-
return /* @__PURE__ */
|
|
230
|
+
return /* @__PURE__ */ z("div", {
|
|
230
231
|
className: "@container",
|
|
231
|
-
children: [/* @__PURE__ */
|
|
232
|
-
className: `hidden h-8 items-center gap-3 border-b border-border px-4 text-xs text-muted-foreground md:px-5 ${
|
|
232
|
+
children: [/* @__PURE__ */ z("div", {
|
|
233
|
+
className: `hidden h-8 items-center gap-3 border-b border-border px-4 text-xs text-muted-foreground md:px-5 ${U}`,
|
|
233
234
|
children: [
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
-
/* @__PURE__ */
|
|
236
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ R("span", { children: n("name") }),
|
|
236
|
+
/* @__PURE__ */ R("span", { children: n("healthLabel") }),
|
|
237
|
+
/* @__PURE__ */ R(M, {
|
|
237
238
|
content: n("priority"),
|
|
238
|
-
children: /* @__PURE__ */
|
|
239
|
+
children: /* @__PURE__ */ R("span", { children: /* @__PURE__ */ R("span", {
|
|
239
240
|
className: "sr-only",
|
|
240
241
|
children: n("priority")
|
|
241
242
|
}) })
|
|
242
243
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ R(M, {
|
|
244
245
|
content: n("lead"),
|
|
245
|
-
children: /* @__PURE__ */
|
|
246
|
+
children: /* @__PURE__ */ R("span", { children: /* @__PURE__ */ R("span", {
|
|
246
247
|
className: "sr-only",
|
|
247
248
|
children: n("lead")
|
|
248
249
|
}) })
|
|
249
250
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ R("span", { children: n("targetDate") }),
|
|
252
|
+
/* @__PURE__ */ R("span", { children: n("progressTitle") }),
|
|
253
|
+
/* @__PURE__ */ R("span", {})
|
|
253
254
|
]
|
|
254
|
-
}), /* @__PURE__ */
|
|
255
|
+
}), /* @__PURE__ */ R("ul", { children: D(e).filter((e) => !a.has(e.project.id)).map((e) => /* @__PURE__ */ R(G, {
|
|
255
256
|
...t(e.project),
|
|
256
257
|
depth: e.depth,
|
|
257
258
|
childCount: e.children,
|
|
@@ -260,124 +261,124 @@ function fe({ projects: e, rowProps: t }) {
|
|
|
260
261
|
}, e.project.id)) })]
|
|
261
262
|
});
|
|
262
263
|
}
|
|
263
|
-
function
|
|
264
|
-
return e.icon || e.color ? /* @__PURE__ */
|
|
264
|
+
function W({ project: e }) {
|
|
265
|
+
return e.icon || e.color ? /* @__PURE__ */ R(T, {
|
|
265
266
|
icon: e.icon ?? "",
|
|
266
267
|
color: e.color ?? "",
|
|
267
268
|
name: e.name
|
|
268
|
-
}) : /* @__PURE__ */
|
|
269
|
+
}) : /* @__PURE__ */ R(c, { className: "size-4 text-muted-foreground" });
|
|
269
270
|
}
|
|
270
|
-
function
|
|
271
|
-
let
|
|
272
|
-
return /* @__PURE__ */
|
|
271
|
+
function G({ workspace: e, project: n, onContextMenu: r, menu: i, depth: o = 0, childCount: c = 0, folded: l = !1, onFold: d }) {
|
|
272
|
+
let f = L("planning"), p = L("common"), m = v(), h = u(), { person: g } = C(e), _ = n.lead ? g(n.lead) : void 0, w = S(n);
|
|
273
|
+
return /* @__PURE__ */ z("li", {
|
|
273
274
|
className: "group flex items-center border-b border-border pr-2 hover:bg-muted/60",
|
|
274
275
|
children: [
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ R("span", {
|
|
276
277
|
className: "flex shrink-0 justify-end pl-2 md:pl-3",
|
|
277
|
-
style: { width: `${
|
|
278
|
-
children: c > 0 && /* @__PURE__ */
|
|
278
|
+
style: { width: `${o * 1.25 + 2}rem` },
|
|
279
|
+
children: c > 0 && /* @__PURE__ */ R("button", {
|
|
279
280
|
type: "button",
|
|
280
281
|
onClick: d,
|
|
281
|
-
"aria-expanded": !
|
|
282
|
-
"aria-label":
|
|
282
|
+
"aria-expanded": !l,
|
|
283
|
+
"aria-label": f(l ? "showSubProjects" : "hideSubProjects", { name: n.name }),
|
|
283
284
|
className: "rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
284
|
-
children: /* @__PURE__ */
|
|
285
|
+
children: /* @__PURE__ */ R(a, { className: `size-3.5 transition-transform ${l ? "-rotate-90" : ""}` })
|
|
285
286
|
})
|
|
286
287
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ z(t, {
|
|
288
289
|
to: "/$workspace/projects/$projectId",
|
|
289
290
|
params: {
|
|
290
|
-
workspace:
|
|
291
|
+
workspace: e,
|
|
291
292
|
projectId: E(n)
|
|
292
293
|
},
|
|
293
294
|
onContextMenu: r,
|
|
294
|
-
className: `flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1 py-2.5 pl-1 ${
|
|
295
|
+
className: `flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1 py-2.5 pl-1 ${U}`,
|
|
295
296
|
children: [
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ z("span", {
|
|
297
298
|
className: "flex min-w-0 basis-full items-center gap-2.5 @4xl:basis-auto",
|
|
298
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ R(W, { project: n }), /* @__PURE__ */ z("span", {
|
|
299
300
|
className: "min-w-0",
|
|
300
|
-
children: [/* @__PURE__ */
|
|
301
|
+
children: [/* @__PURE__ */ R("span", {
|
|
301
302
|
className: "block truncate text-sm font-medium",
|
|
302
303
|
children: n.name
|
|
303
|
-
}), n.summary && /* @__PURE__ */
|
|
304
|
+
}), n.summary && /* @__PURE__ */ R("span", {
|
|
304
305
|
className: "block truncate text-xs text-muted-foreground",
|
|
305
306
|
children: n.summary
|
|
306
307
|
})]
|
|
307
308
|
})]
|
|
308
309
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ z("span", {
|
|
310
311
|
className: "flex items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
312
|
+
children: [/* @__PURE__ */ R(y, { state: w }), f(`health.${w}`)]
|
|
312
313
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
content:
|
|
315
|
-
children: /* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ R(M, {
|
|
315
|
+
content: h[n.priority],
|
|
316
|
+
children: /* @__PURE__ */ R("span", {
|
|
316
317
|
role: "img",
|
|
317
|
-
"aria-label":
|
|
318
|
+
"aria-label": h[n.priority],
|
|
318
319
|
className: "flex",
|
|
319
|
-
children: /* @__PURE__ */
|
|
320
|
+
children: /* @__PURE__ */ R(s, { priority: n.priority })
|
|
320
321
|
})
|
|
321
322
|
}),
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ R("span", {
|
|
323
324
|
className: "flex",
|
|
324
|
-
children:
|
|
325
|
-
content:
|
|
326
|
-
children: /* @__PURE__ */
|
|
327
|
-
name:
|
|
328
|
-
src:
|
|
325
|
+
children: _ && /* @__PURE__ */ R(M, {
|
|
326
|
+
content: f("leadIs", { name: _.name }),
|
|
327
|
+
children: /* @__PURE__ */ R("span", { children: /* @__PURE__ */ R(k, {
|
|
328
|
+
name: _.name,
|
|
329
|
+
src: _.avatarUrl,
|
|
329
330
|
size: "sm"
|
|
330
331
|
}) })
|
|
331
332
|
})
|
|
332
333
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ R("span", {
|
|
334
335
|
className: "text-xs text-muted-foreground tabular-nums",
|
|
335
|
-
children: n.targetDate ?
|
|
336
|
+
children: n.targetDate ? m.day(n.targetDate) : ""
|
|
336
337
|
}),
|
|
337
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ R("span", { children: /* @__PURE__ */ R(b, {
|
|
338
339
|
progress: c > 0 ? n.treeProgress : n.progress,
|
|
339
340
|
compact: !0
|
|
340
341
|
}) }),
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
content:
|
|
343
|
-
children: /* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ R(M, {
|
|
343
|
+
content: f(`status.${n.status}`),
|
|
344
|
+
children: /* @__PURE__ */ R("span", {
|
|
344
345
|
role: "img",
|
|
345
|
-
"aria-label":
|
|
346
|
+
"aria-label": f(`status.${n.status}`),
|
|
346
347
|
className: "flex",
|
|
347
|
-
children: /* @__PURE__ */
|
|
348
|
+
children: /* @__PURE__ */ R(x, { status: n.status })
|
|
348
349
|
})
|
|
349
350
|
})
|
|
350
351
|
]
|
|
351
352
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
items:
|
|
354
|
-
label:
|
|
353
|
+
/* @__PURE__ */ R(V, {
|
|
354
|
+
items: i,
|
|
355
|
+
label: p("moreActionsFor", { name: n.name })
|
|
355
356
|
})
|
|
356
357
|
]
|
|
357
358
|
});
|
|
358
359
|
}
|
|
359
|
-
var
|
|
360
|
+
var K = 864e5, q = 5, J = 64, Y = 256, X = 56, Z = (e) => Date.parse(`${e}T00:00:00Z`), Q = (e) => {
|
|
360
361
|
let t = new Date(e);
|
|
361
362
|
return Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), 1);
|
|
362
|
-
},
|
|
363
|
+
}, me = () => {
|
|
363
364
|
let e = /* @__PURE__ */ new Date();
|
|
364
365
|
return Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
|
|
365
|
-
},
|
|
366
|
-
function
|
|
367
|
-
let i =
|
|
366
|
+
}, he = (e) => e - (new Date(e).getUTCDay() + 6) % 7 * K;
|
|
367
|
+
function ge({ workspace: e, projects: n, rowProps: r }) {
|
|
368
|
+
let i = L("planning"), a = I(), o = P(null), [s, c] = F({
|
|
368
369
|
left: 0,
|
|
369
370
|
width: 0
|
|
370
|
-
}), l =
|
|
371
|
-
let t = e.targetDate ?
|
|
371
|
+
}), l = me(), u = n.map((e) => {
|
|
372
|
+
let t = e.targetDate ? Z(e.targetDate) : void 0;
|
|
372
373
|
return {
|
|
373
374
|
p: e,
|
|
374
|
-
start: e.startDate ?
|
|
375
|
+
start: e.startDate ? Z(e.startDate) : t === void 0 ? void 0 : Math.min(Date.parse(e.createdAt), t),
|
|
375
376
|
end: t
|
|
376
377
|
};
|
|
377
|
-
}), d = u.flatMap((e) => [e.start, e.end].filter((e) => e !== void 0)), f =
|
|
378
|
-
for (let e = f; e < p; e =
|
|
378
|
+
}), d = u.flatMap((e) => [e.start, e.end].filter((e) => e !== void 0)), f = Q(Math.min(l - 90 * K, ...d)), p = Q(Math.max(l + 300 * K, ...d) + 40 * K), m = (e) => (e - f) / K * q, h = m(p), g = [];
|
|
379
|
+
for (let e = f; e < p; e = Q(e + 32 * K)) g.push(e);
|
|
379
380
|
let _ = [];
|
|
380
|
-
for (let e =
|
|
381
|
+
for (let e = he(f) + 7 * K; e < p; e += 7 * K) _.push(e);
|
|
381
382
|
let v = (e, t) => a.dateTime(new Date(e), {
|
|
382
383
|
...t,
|
|
383
384
|
timeZone: "UTC"
|
|
@@ -391,48 +392,48 @@ function he({ workspace: t, projects: n, rowProps: r }) {
|
|
|
391
392
|
let e = o.current;
|
|
392
393
|
e && c({
|
|
393
394
|
left: e.scrollLeft,
|
|
394
|
-
width: e.clientWidth -
|
|
395
|
+
width: e.clientWidth - Y
|
|
395
396
|
});
|
|
396
397
|
}, x = (e = "smooth") => {
|
|
397
398
|
let t = o.current;
|
|
398
399
|
t && t.scrollTo({
|
|
399
|
-
left: m(l) - (t.clientWidth -
|
|
400
|
+
left: m(l) - (t.clientWidth - Y) / 2,
|
|
400
401
|
behavior: e
|
|
401
402
|
});
|
|
402
403
|
};
|
|
403
|
-
return
|
|
404
|
+
return N(() => (x("instant"), b(), window.addEventListener("resize", b), () => window.removeEventListener("resize", b)), []), /* @__PURE__ */ R("div", {
|
|
404
405
|
ref: o,
|
|
405
406
|
onScroll: b,
|
|
406
407
|
className: "relative h-full min-h-0 overflow-auto",
|
|
407
|
-
children: /* @__PURE__ */
|
|
408
|
+
children: /* @__PURE__ */ z("div", {
|
|
408
409
|
className: "relative",
|
|
409
410
|
style: {
|
|
410
|
-
width: h +
|
|
411
|
+
width: h + Y,
|
|
411
412
|
minHeight: "100%"
|
|
412
413
|
},
|
|
413
414
|
children: [
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ R("div", {
|
|
415
416
|
"aria-hidden": "true",
|
|
416
417
|
className: "pointer-events-none sticky left-0 z-[2] float-left -mb-[100vh] h-full min-h-[100vh] border-r border-border bg-background",
|
|
417
|
-
style: { width:
|
|
418
|
+
style: { width: Y }
|
|
418
419
|
}),
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ z("div", {
|
|
420
421
|
className: "sticky top-0 z-[3] flex border-b border-border bg-background",
|
|
421
|
-
style: { height:
|
|
422
|
-
children: [/* @__PURE__ */
|
|
422
|
+
style: { height: X },
|
|
423
|
+
children: [/* @__PURE__ */ R("div", {
|
|
423
424
|
className: "sticky left-0 z-[3] flex shrink-0 items-end border-r border-border bg-background px-4 pb-2",
|
|
424
|
-
style: { width:
|
|
425
|
-
children: /* @__PURE__ */
|
|
425
|
+
style: { width: Y },
|
|
426
|
+
children: /* @__PURE__ */ R(A, {
|
|
426
427
|
type: "button",
|
|
427
428
|
size: "xs",
|
|
428
429
|
onClick: () => x(),
|
|
429
430
|
children: i("today")
|
|
430
431
|
})
|
|
431
|
-
}), /* @__PURE__ */
|
|
432
|
+
}), /* @__PURE__ */ z("div", {
|
|
432
433
|
className: "relative",
|
|
433
434
|
style: { width: h },
|
|
434
435
|
children: [
|
|
435
|
-
g.map((e) => /* @__PURE__ */
|
|
436
|
+
g.map((e) => /* @__PURE__ */ R("span", {
|
|
436
437
|
className: "absolute top-2 pl-1.5 text-[11px] font-medium text-muted-foreground uppercase",
|
|
437
438
|
style: { left: m(e) },
|
|
438
439
|
children: v(e, {
|
|
@@ -440,12 +441,12 @@ function he({ workspace: t, projects: n, rowProps: r }) {
|
|
|
440
441
|
...new Date(e).getUTCMonth() === 0 && { year: "numeric" }
|
|
441
442
|
})
|
|
442
443
|
}, e)),
|
|
443
|
-
_.filter((e) => Math.abs(m(e) - m(l)) > 36).map((e) => /* @__PURE__ */
|
|
444
|
+
_.filter((e) => Math.abs(m(e) - m(l)) > 36).map((e) => /* @__PURE__ */ R("span", {
|
|
444
445
|
className: "absolute bottom-2 -translate-x-1/2 text-[11px] text-muted-foreground tabular-nums",
|
|
445
446
|
style: { left: m(e) },
|
|
446
447
|
children: v(e, { day: "numeric" })
|
|
447
448
|
}, e)),
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ R("span", {
|
|
449
450
|
className: "absolute bottom-1.5 z-[1] -translate-x-1/2 rounded-full bg-primary px-2 py-px text-[11px] font-medium text-primary-foreground uppercase tabular-nums",
|
|
450
451
|
style: { left: m(l) },
|
|
451
452
|
children: v(l, {
|
|
@@ -456,46 +457,46 @@ function he({ workspace: t, projects: n, rowProps: r }) {
|
|
|
456
457
|
]
|
|
457
458
|
})]
|
|
458
459
|
}),
|
|
459
|
-
_.map((e) => /* @__PURE__ */
|
|
460
|
+
_.map((e) => /* @__PURE__ */ R("div", {
|
|
460
461
|
"aria-hidden": "true",
|
|
461
462
|
className: "pointer-events-none absolute bottom-0 border-l border-dashed border-border/40",
|
|
462
463
|
style: {
|
|
463
|
-
left:
|
|
464
|
-
top:
|
|
464
|
+
left: Y + m(e),
|
|
465
|
+
top: X
|
|
465
466
|
}
|
|
466
467
|
}, e)),
|
|
467
|
-
g.map((e) => /* @__PURE__ */
|
|
468
|
+
g.map((e) => /* @__PURE__ */ R("div", {
|
|
468
469
|
"aria-hidden": "true",
|
|
469
470
|
className: "pointer-events-none absolute bottom-0 w-px bg-border/70",
|
|
470
471
|
style: {
|
|
471
|
-
left:
|
|
472
|
-
top:
|
|
472
|
+
left: Y + m(e),
|
|
473
|
+
top: X
|
|
473
474
|
}
|
|
474
475
|
}, e)),
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ R("div", {
|
|
476
477
|
"aria-hidden": "true",
|
|
477
478
|
className: "pointer-events-none absolute bottom-0 z-[1] w-px bg-primary",
|
|
478
479
|
style: {
|
|
479
|
-
left:
|
|
480
|
-
top:
|
|
480
|
+
left: Y + m(l),
|
|
481
|
+
top: X
|
|
481
482
|
}
|
|
482
483
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ R("ul", {
|
|
484
485
|
className: "relative",
|
|
485
486
|
children: u.map(({ p: n, start: i, end: a }) => {
|
|
486
|
-
let o = i !== void 0 && a !== void 0, c = o ? m(i) : 0, u = o ? Math.max(m(a +
|
|
487
|
-
return /* @__PURE__ */
|
|
487
|
+
let o = i !== void 0 && a !== void 0, c = o ? m(i) : 0, u = o ? Math.max(m(a + K), c + 24) : 0, d = o && u < s.left, f = o && c > s.left + s.width, p = o ? Math.min(Math.max(m(l) - c, 0), u - c) : 0;
|
|
488
|
+
return /* @__PURE__ */ z("li", {
|
|
488
489
|
className: "group flex hover:bg-muted/40",
|
|
489
|
-
style: { height:
|
|
490
|
-
children: [/* @__PURE__ */
|
|
490
|
+
style: { height: J },
|
|
491
|
+
children: [/* @__PURE__ */ R($, { ...r(n) }), /* @__PURE__ */ z("div", {
|
|
491
492
|
className: "relative",
|
|
492
493
|
style: { width: h },
|
|
493
|
-
children: [o && !d && !f && /* @__PURE__ */
|
|
494
|
+
children: [o && !d && !f && /* @__PURE__ */ R(M, {
|
|
494
495
|
content: `${n.name}, ${y(i, a)}`,
|
|
495
|
-
children: /* @__PURE__ */
|
|
496
|
+
children: /* @__PURE__ */ z(t, {
|
|
496
497
|
to: "/$workspace/projects/$projectId",
|
|
497
498
|
params: {
|
|
498
|
-
workspace:
|
|
499
|
+
workspace: e,
|
|
499
500
|
projectId: E(n)
|
|
500
501
|
},
|
|
501
502
|
className: "absolute top-2 bottom-2 flex flex-col justify-end gap-1",
|
|
@@ -503,25 +504,25 @@ function he({ workspace: t, projects: n, rowProps: r }) {
|
|
|
503
504
|
left: c,
|
|
504
505
|
width: u - c
|
|
505
506
|
},
|
|
506
|
-
children: [/* @__PURE__ */
|
|
507
|
+
children: [/* @__PURE__ */ R("span", {
|
|
507
508
|
className: "block truncate px-0.5 text-xs font-medium",
|
|
508
509
|
style: { marginLeft: Math.min(Math.max(s.left + 8 - c, 0), Math.max(u - c - 80, 0)) },
|
|
509
510
|
children: n.name
|
|
510
|
-
}), /* @__PURE__ */
|
|
511
|
+
}), /* @__PURE__ */ z("span", {
|
|
511
512
|
className: "relative block h-6 overflow-hidden rounded-md border border-border",
|
|
512
|
-
children: [/* @__PURE__ */
|
|
513
|
+
children: [/* @__PURE__ */ R("span", {
|
|
513
514
|
className: "absolute inset-y-0 left-0 bg-muted-foreground/20",
|
|
514
515
|
style: { width: p }
|
|
515
|
-
}), /* @__PURE__ */
|
|
516
|
+
}), /* @__PURE__ */ R("span", {
|
|
516
517
|
className: "absolute inset-y-0 right-0 border-l border-dashed border-primary/50 bg-primary/10",
|
|
517
518
|
style: { left: p }
|
|
518
519
|
})]
|
|
519
520
|
})]
|
|
520
521
|
})
|
|
521
|
-
}), (d || f) && /* @__PURE__ */
|
|
522
|
+
}), (d || f) && /* @__PURE__ */ z(t, {
|
|
522
523
|
to: "/$workspace/projects/$projectId",
|
|
523
524
|
params: {
|
|
524
|
-
workspace:
|
|
525
|
+
workspace: e,
|
|
525
526
|
projectId: E(n)
|
|
526
527
|
},
|
|
527
528
|
className: "absolute top-1/2 flex -translate-y-1/2 items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground hover:text-foreground",
|
|
@@ -530,12 +531,12 @@ function he({ workspace: t, projects: n, rowProps: r }) {
|
|
|
530
531
|
transform: "translate(-100%, -50%)"
|
|
531
532
|
},
|
|
532
533
|
children: [
|
|
533
|
-
d && /* @__PURE__ */
|
|
534
|
+
d && /* @__PURE__ */ R("span", {
|
|
534
535
|
"aria-hidden": "true",
|
|
535
536
|
children: "←"
|
|
536
537
|
}),
|
|
537
538
|
y(i, a),
|
|
538
|
-
f && /* @__PURE__ */
|
|
539
|
+
f && /* @__PURE__ */ R("span", {
|
|
539
540
|
"aria-hidden": "true",
|
|
540
541
|
children: "→"
|
|
541
542
|
})
|
|
@@ -549,32 +550,32 @@ function he({ workspace: t, projects: n, rowProps: r }) {
|
|
|
549
550
|
})
|
|
550
551
|
});
|
|
551
552
|
}
|
|
552
|
-
function
|
|
553
|
-
let i =
|
|
554
|
-
return /* @__PURE__ */
|
|
553
|
+
function $({ workspace: e, project: n, onContextMenu: r }) {
|
|
554
|
+
let i = L("planning"), { person: a } = C(e), o = n.lead ? a(n.lead) : void 0, s = S(n);
|
|
555
|
+
return /* @__PURE__ */ z(t, {
|
|
555
556
|
to: "/$workspace/projects/$projectId",
|
|
556
557
|
params: {
|
|
557
|
-
workspace:
|
|
558
|
+
workspace: e,
|
|
558
559
|
projectId: E(n)
|
|
559
560
|
},
|
|
560
561
|
onContextMenu: r,
|
|
561
562
|
className: "sticky left-0 z-[2] flex shrink-0 items-center gap-2 border-r border-border bg-background px-4 group-hover:bg-muted",
|
|
562
|
-
style: { width:
|
|
563
|
+
style: { width: Y },
|
|
563
564
|
children: [
|
|
564
|
-
/* @__PURE__ */
|
|
565
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ R(W, { project: n }),
|
|
566
|
+
/* @__PURE__ */ R("span", {
|
|
566
567
|
className: "min-w-0 flex-1 truncate text-sm",
|
|
567
568
|
children: n.name
|
|
568
569
|
}),
|
|
569
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ R(M, {
|
|
570
571
|
content: i(`health.${s}`),
|
|
571
|
-
children: /* @__PURE__ */
|
|
572
|
+
children: /* @__PURE__ */ R("span", {
|
|
572
573
|
role: "img",
|
|
573
574
|
"aria-label": i(`health.${s}`),
|
|
574
|
-
children: /* @__PURE__ */
|
|
575
|
+
children: /* @__PURE__ */ R(y, { state: s })
|
|
575
576
|
})
|
|
576
577
|
}),
|
|
577
|
-
o && /* @__PURE__ */
|
|
578
|
+
o && /* @__PURE__ */ R(k, {
|
|
578
579
|
name: o.name,
|
|
579
580
|
src: o.avatarUrl,
|
|
580
581
|
size: "xs",
|
|
@@ -583,12 +584,12 @@ function ge({ workspace: t, project: n, onContextMenu: r }) {
|
|
|
583
584
|
]
|
|
584
585
|
});
|
|
585
586
|
}
|
|
586
|
-
function _e({ workspace: e, projects: t, health: n, onHealth:
|
|
587
|
-
let a =
|
|
588
|
-
return /* @__PURE__ */
|
|
587
|
+
function _e({ workspace: e, projects: t, health: n, onHealth: r }) {
|
|
588
|
+
let a = L("planning"), { data: o } = B(i(e)), { person: s } = C(e), [c, l] = F("health"), u = (e) => t.filter(e).length, f = "flex h-9 w-full items-center gap-2.5 rounded-md px-2 text-sm", p = [...new Set(t.map((e) => e.lead ?? ""))];
|
|
589
|
+
return /* @__PURE__ */ z("aside", {
|
|
589
590
|
"aria-label": a("breakdown"),
|
|
590
591
|
className: "hidden w-72 shrink-0 overflow-y-auto border-l border-border p-3 xl:block",
|
|
591
|
-
children: [/* @__PURE__ */
|
|
592
|
+
children: [/* @__PURE__ */ R(j, {
|
|
592
593
|
variant: "segmented",
|
|
593
594
|
size: "sm",
|
|
594
595
|
label: a("breakdown"),
|
|
@@ -602,24 +603,24 @@ function _e({ workspace: e, projects: t, health: n, onHealth: i }) {
|
|
|
602
603
|
})),
|
|
603
604
|
value: c,
|
|
604
605
|
onValueChange: l
|
|
605
|
-
}), /* @__PURE__ */
|
|
606
|
+
}), /* @__PURE__ */ z("ul", {
|
|
606
607
|
className: "mt-2",
|
|
607
608
|
children: [
|
|
608
|
-
c === "health" &&
|
|
609
|
+
c === "health" && d.map((e) => ({
|
|
609
610
|
h: e,
|
|
610
|
-
n: u((t) =>
|
|
611
|
-
})).filter(({ n: e }) => e > 0).map(({ h: e, n: t }) => /* @__PURE__ */
|
|
611
|
+
n: u((t) => S(t) === e)
|
|
612
|
+
})).filter(({ n: e }) => e > 0).map(({ h: e, n: t }) => /* @__PURE__ */ R("li", { children: /* @__PURE__ */ z("button", {
|
|
612
613
|
type: "button",
|
|
613
614
|
"aria-pressed": n === e,
|
|
614
|
-
onClick: () =>
|
|
615
|
-
className: `${
|
|
615
|
+
onClick: () => r(e),
|
|
616
|
+
className: `${f} hover:bg-muted aria-pressed:bg-muted`,
|
|
616
617
|
children: [
|
|
617
|
-
/* @__PURE__ */
|
|
618
|
-
/* @__PURE__ */
|
|
618
|
+
/* @__PURE__ */ R(y, { state: e }),
|
|
619
|
+
/* @__PURE__ */ R("span", {
|
|
619
620
|
className: "flex-1 text-left",
|
|
620
621
|
children: a(`health.${e}`)
|
|
621
622
|
}),
|
|
622
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ R("span", {
|
|
623
624
|
className: "text-muted-foreground tabular-nums",
|
|
624
625
|
children: t
|
|
625
626
|
})
|
|
@@ -628,40 +629,40 @@ function _e({ workspace: e, projects: t, health: n, onHealth: i }) {
|
|
|
628
629
|
c === "teams" && o.filter((e) => !e.archivedAt).map((e) => ({
|
|
629
630
|
team: e,
|
|
630
631
|
n: u((t) => t.teamIds.includes(e.id))
|
|
631
|
-
})).filter(({ n: e }) => e > 0).map(({ team: e, n: t }) => /* @__PURE__ */
|
|
632
|
-
className:
|
|
632
|
+
})).filter(({ n: e }) => e > 0).map(({ team: e, n: t }) => /* @__PURE__ */ z("li", {
|
|
633
|
+
className: f,
|
|
633
634
|
children: [
|
|
634
|
-
/* @__PURE__ */
|
|
635
|
+
/* @__PURE__ */ R(T, {
|
|
635
636
|
icon: e.icon,
|
|
636
637
|
color: e.color,
|
|
637
638
|
name: e.name
|
|
638
639
|
}),
|
|
639
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ R("span", {
|
|
640
641
|
className: "flex-1 truncate",
|
|
641
642
|
children: e.name
|
|
642
643
|
}),
|
|
643
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ R("span", {
|
|
644
645
|
className: "text-muted-foreground tabular-nums",
|
|
645
646
|
children: t
|
|
646
647
|
})
|
|
647
648
|
]
|
|
648
649
|
}, e.id)),
|
|
649
|
-
c === "leads" &&
|
|
650
|
+
c === "leads" && p.map((e) => {
|
|
650
651
|
let t = e ? s(e) : void 0;
|
|
651
|
-
return /* @__PURE__ */
|
|
652
|
-
className:
|
|
652
|
+
return /* @__PURE__ */ z("li", {
|
|
653
|
+
className: f,
|
|
653
654
|
children: [
|
|
654
|
-
t ? /* @__PURE__ */
|
|
655
|
+
t ? /* @__PURE__ */ R(k, {
|
|
655
656
|
name: t.name,
|
|
656
657
|
src: t.avatarUrl,
|
|
657
658
|
size: "xs",
|
|
658
659
|
decorative: !0
|
|
659
|
-
}) : /* @__PURE__ */
|
|
660
|
-
/* @__PURE__ */
|
|
660
|
+
}) : /* @__PURE__ */ R("span", { className: "size-4" }),
|
|
661
|
+
/* @__PURE__ */ R("span", {
|
|
661
662
|
className: "flex-1 truncate",
|
|
662
663
|
children: t ? t.name : a("noLead")
|
|
663
664
|
}),
|
|
664
|
-
/* @__PURE__ */
|
|
665
|
+
/* @__PURE__ */ R("span", {
|
|
665
666
|
className: "text-muted-foreground tabular-nums",
|
|
666
667
|
children: u((t) => (t.lead ?? "") === e)
|
|
667
668
|
})
|
|
@@ -672,4 +673,4 @@ function _e({ workspace: e, projects: t, health: n, onHealth: i }) {
|
|
|
672
673
|
})]
|
|
673
674
|
});
|
|
674
675
|
}
|
|
675
|
-
export {
|
|
676
|
+
export { H as Projects };
|