@parallelworks/tandem-web 0.139.0 → 0.139.2

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/pages/projects.js CHANGED
@@ -1,14 +1,14 @@
1
- import { Link as e, useNavigate as t } from "../lib/router.js";
2
- import { projectsQuery as n, teamsQuery as r } from "../api/queries.js";
3
- import { ChevronDownIcon as i, ListViewIcon as a, PriorityIcon as o, ProjectIcon as s, TimelineIcon as c, usePriorityNames as l } from "../components/icons.js";
4
- import { healthStates as u, projectStatuses as d } from "../lib/projectStates.js";
5
- import { storeLayout as f, storedLayout as p } from "../lib/projectList.js";
6
- import { useFavorites as m } from "../lib/favorites.js";
7
- import { copyItem as h, useLinkItems as g } from "../lib/menus.js";
8
- import { useTime as _ } from "../lib/time.js";
9
- import { HealthIcon as v, ProgressBar as y, ProjectStatusIcon as b, healthOf as x } from "../components/Planning.js";
10
- import { usePeople as S } from "../lib/people.js";
11
- import { usePageTitle as C } from "../lib/pageTitle.js";
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";
12
12
  import { useCan as w } from "../lib/roles.js";
13
13
  import { EntityIcon as T } from "../components/EntityIcon.js";
14
14
  import { projectRef as E, projectTree as D, projectsUnder as O } from "../lib/projects.js";
@@ -24,64 +24,64 @@ import { useSuspenseQuery as B } from "@tanstack/react-query";
24
24
  import { MoreButton as V } from "@parallelworks/ui/list";
25
25
  // src/pages/projects.tsx
26
26
  function H() {
27
- let { workspace: e, key: i } = ue({ strict: !1 }), o = de({ strict: !1 }), l = i ? {
28
- ...o,
29
- team: i
30
- } : o, u = L("planning"), _ = L("common"), { data: v } = B(n(e)), { data: y } = B(r(e)), b = y.find((e) => e.key === l.team);
31
- C(b ? u("teamProjects", { team: b.name }) : u("projects"));
32
- let S = i ? "list" : "timeline", T = l.view ?? p(!!i) ?? S, D = v.filter((e) => (!b || e.teamIds.includes(b.id)) && !!e.template == (T === "templates")), k = w(e, "manage_projects"), [j, M] = F(!1), N = fe(), P = t(), I = le(), V = g(), H = l.parent ? v.find((e) => e.id === l.parent) : void 0, U = H && new Set(O(v, H.id).map((e) => e.id)), W = D.filter((e) => (!l.status || e.status === l.status) && (!l.health || x(e) === l.health) && (!U || U.has(e.id))), G = (t) => {
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) => {
33
33
  let { team: n, ...r } = Object.fromEntries(Object.entries({
34
- ...l,
35
- ...t
34
+ ...u,
35
+ ...e
36
36
  }).filter(([, e]) => e !== void 0));
37
- return P(i ? {
37
+ return P(a ? {
38
38
  to: "/$workspace/teams/$key/projects",
39
39
  params: {
40
- workspace: e,
41
- key: i
40
+ workspace: t,
41
+ key: a
42
42
  },
43
43
  search: r,
44
44
  replace: !0
45
45
  } : {
46
46
  to: "/$workspace/projects",
47
- params: { workspace: e },
47
+ params: { workspace: t },
48
48
  search: r,
49
49
  replace: !0
50
50
  });
51
- }, K = m(e), q = L("favorites"), J = (t) => [
51
+ }, K = h(t), q = L("favorites"), J = (e) => [
52
52
  {
53
- label: _("open"),
53
+ label: v("open"),
54
54
  onClick: () => P({
55
55
  to: "/$workspace/projects/$projectId",
56
56
  params: {
57
- workspace: e,
58
- projectId: E(t)
57
+ workspace: t,
58
+ projectId: E(e)
59
59
  }
60
60
  })
61
61
  },
62
62
  {
63
- label: u("viewIssues"),
63
+ label: d("viewIssues"),
64
64
  onClick: () => P({
65
65
  to: "/$workspace/projects/$projectId",
66
66
  params: {
67
- workspace: e,
68
- projectId: E(t)
67
+ workspace: t,
68
+ projectId: E(e)
69
69
  },
70
70
  search: { tab: "issues" }
71
71
  })
72
72
  },
73
73
  {
74
- label: K.find("project", t.id) ? q("remove") : q("add"),
75
- onClick: () => K.toggle("project", t.id)
74
+ label: K.find("project", e.id) ? q("remove") : q("add"),
75
+ onClick: () => K.toggle("project", e.id)
76
76
  },
77
77
  ce,
78
- ...V(`/${e}/projects/${E(t)}`),
79
- h(_("copyName"), t.name)
80
- ], Y = (t) => ({
81
- workspace: e,
82
- project: t,
83
- onContextMenu: (e) => I(e, J(t)),
84
- menu: () => J(t)
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)
85
85
  });
86
86
  return /* @__PURE__ */ z("div", {
87
87
  className: "flex h-full min-h-0 flex-col",
@@ -91,10 +91,10 @@ function H() {
91
91
  children: [
92
92
  /* @__PURE__ */ R("h1", {
93
93
  className: "min-w-0 truncate text-sm font-semibold",
94
- children: b ? u("teamProjects", { team: b.name }) : u("projects")
94
+ children: x ? d("teamProjects", { team: x.name }) : d("projects")
95
95
  }),
96
- !b && /* @__PURE__ */ R(ee, {
97
- workspace: e,
96
+ !x && /* @__PURE__ */ R(ee, {
97
+ workspace: t,
98
98
  kind: "page",
99
99
  target: "projects"
100
100
  }),
@@ -104,25 +104,25 @@ function H() {
104
104
  ...T !== "templates" && {
105
105
  layouts: [{
106
106
  value: "list",
107
- label: u("views.list"),
108
- icon: /* @__PURE__ */ R(a, {})
107
+ label: d("views.list"),
108
+ icon: /* @__PURE__ */ R(o, {})
109
109
  }, {
110
110
  value: "timeline",
111
- label: u("views.timeline"),
112
- icon: /* @__PURE__ */ R(c, {})
111
+ label: d("views.timeline"),
112
+ icon: /* @__PURE__ */ R(l, {})
113
113
  }],
114
114
  layout: T,
115
115
  onLayoutChange: (e) => {
116
- f(!!i, e), G({ view: e });
116
+ p(!!a, e), G({ view: e });
117
117
  }
118
118
  },
119
- changed: T !== S,
119
+ changed: T !== C,
120
120
  children: /* @__PURE__ */ z("div", {
121
121
  className: "flex items-center justify-between gap-3",
122
122
  children: [/* @__PURE__ */ R("span", {
123
123
  id: N,
124
124
  className: "text-sm",
125
- children: u("showTemplates")
125
+ children: d("showTemplates")
126
126
  }), /* @__PURE__ */ R(oe, {
127
127
  size: "sm",
128
128
  checked: T === "templates",
@@ -133,7 +133,7 @@ function H() {
133
133
  })
134
134
  }),
135
135
  k && /* @__PURE__ */ R(ae, {
136
- label: u("newProject"),
136
+ label: d("newProject"),
137
137
  onClick: () => M(!0)
138
138
  })
139
139
  ]
@@ -142,41 +142,41 @@ function H() {
142
142
  className: "flex shrink-0 flex-wrap items-center gap-1 border-b border-border px-4 py-2 md:px-5",
143
143
  children: [
144
144
  /* @__PURE__ */ R(se, {
145
- label: u("filterStatus"),
145
+ label: d("filterStatus"),
146
146
  multiple: !1,
147
147
  all: { count: D.length },
148
- options: d.map((e) => ({
148
+ options: f.map((e) => ({
149
149
  value: e,
150
- label: u(`status.${e}`),
150
+ label: d(`status.${e}`),
151
151
  count: D.filter((t) => t.status === e).length
152
152
  })),
153
- value: l.status ? [l.status] : [],
153
+ value: u.status ? [u.status] : [],
154
154
  onValueChange: ([e]) => G({ status: e })
155
155
  }),
156
- l.health && /* @__PURE__ */ R(A, {
156
+ u.health && /* @__PURE__ */ R(A, {
157
157
  variant: "outline",
158
158
  size: "sm",
159
159
  "aria-pressed": !0,
160
160
  onClick: () => G({ health: void 0 }),
161
- children: u("healthFilter", { health: u(`health.${l.health}`) })
161
+ children: d("healthFilter", { health: d(`health.${u.health}`) })
162
162
  }),
163
163
  D.some((e) => e.parentId) && /* @__PURE__ */ R(re, {
164
164
  items: [{
165
165
  value: "",
166
- label: u("anyParent")
167
- }, ...v.filter((e) => v.some((t) => t.parentId === e.id)).map((e) => ({
166
+ label: d("anyParent")
167
+ }, ...y.filter((e) => y.some((t) => t.parentId === e.id)).map((e) => ({
168
168
  value: e.id,
169
169
  label: e.name
170
170
  }))],
171
- value: l.parent ?? "",
171
+ value: u.parent ?? "",
172
172
  onValueChange: (e) => G({ parent: e || void 0 }),
173
- placeholder: u("parentProject"),
174
- "aria-label": u("parentProject"),
173
+ placeholder: d("parentProject"),
174
+ "aria-label": d("parentProject"),
175
175
  trigger: /* @__PURE__ */ R(A, {
176
176
  variant: "outline",
177
177
  size: "sm",
178
178
  className: H ? "border-(--theme-link) text-(--theme-app)" : void 0,
179
- children: H ? u("underProject", { name: H.name }) : u("parentProject")
179
+ children: H ? d("underProject", { name: H.name }) : d("parentProject")
180
180
  })
181
181
  })
182
182
  ]
@@ -188,18 +188,18 @@ function H() {
188
188
  children: W.length === 0 ? /* @__PURE__ */ R("div", {
189
189
  className: "p-6",
190
190
  children: /* @__PURE__ */ R(ie, {
191
- icon: /* @__PURE__ */ R(s, {}),
192
- title: l.status || l.health ? u("noProjectsWithStatus") : u(T === "templates" ? "noTemplates" : "noProjects"),
193
- ...!l.status && !l.health && { description: u(T === "templates" ? "noTemplatesDescription" : "noProjectsDescription") },
194
- ...k && !l.status && !l.health && T !== "templates" && { action: /* @__PURE__ */ R(A, {
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, {
195
195
  type: "button",
196
196
  variant: "primary",
197
197
  onClick: () => M(!0),
198
- children: u("newProject")
198
+ children: d("newProject")
199
199
  }) }
200
200
  })
201
201
  }) : T === "timeline" ? /* @__PURE__ */ R(ge, {
202
- workspace: e,
202
+ workspace: t,
203
203
  projects: W,
204
204
  rowProps: Y
205
205
  }) : /* @__PURE__ */ R(pe, {
@@ -207,15 +207,15 @@ function H() {
207
207
  rowProps: Y
208
208
  })
209
209
  }), /* @__PURE__ */ R(_e, {
210
- workspace: e,
210
+ workspace: t,
211
211
  projects: D,
212
- health: l.health,
213
- onHealth: (e) => G({ health: e === l.health ? void 0 : e })
212
+ health: u.health,
213
+ onHealth: (e) => G({ health: e === u.health ? void 0 : e })
214
214
  })]
215
215
  }),
216
216
  j && /* @__PURE__ */ R(ne, {
217
- workspace: e,
218
- teamId: b?.id,
217
+ workspace: t,
218
+ teamId: x?.id,
219
219
  onClose: () => M(!1)
220
220
  })
221
221
  ]
@@ -266,29 +266,29 @@ function W({ project: e }) {
266
266
  icon: e.icon ?? "",
267
267
  color: e.color ?? "",
268
268
  name: e.name
269
- }) : /* @__PURE__ */ R(s, { className: "size-4 text-muted-foreground" });
269
+ }) : /* @__PURE__ */ R(c, { className: "size-4 text-muted-foreground" });
270
270
  }
271
- function G({ workspace: t, project: n, onContextMenu: r, menu: a, depth: s = 0, childCount: c = 0, folded: u = !1, onFold: d }) {
272
- let f = L("planning"), p = L("common"), m = _(), h = l(), { person: g } = S(t), C = n.lead ? g(n.lead) : void 0, w = x(n);
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
273
  return /* @__PURE__ */ z("li", {
274
274
  className: "group flex items-center border-b border-border pr-2 hover:bg-muted/60",
275
275
  children: [
276
276
  /* @__PURE__ */ R("span", {
277
277
  className: "flex shrink-0 justify-end pl-2 md:pl-3",
278
- style: { width: `${s * 1.25 + 2}rem` },
278
+ style: { width: `${o * 1.25 + 2}rem` },
279
279
  children: c > 0 && /* @__PURE__ */ R("button", {
280
280
  type: "button",
281
281
  onClick: d,
282
- "aria-expanded": !u,
283
- "aria-label": f(u ? "showSubProjects" : "hideSubProjects", { name: n.name }),
282
+ "aria-expanded": !l,
283
+ "aria-label": f(l ? "showSubProjects" : "hideSubProjects", { name: n.name }),
284
284
  className: "rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
285
- children: /* @__PURE__ */ R(i, { className: `size-3.5 transition-transform ${u ? "-rotate-90" : ""}` })
285
+ children: /* @__PURE__ */ R(a, { className: `size-3.5 transition-transform ${l ? "-rotate-90" : ""}` })
286
286
  })
287
287
  }),
288
- /* @__PURE__ */ z(e, {
288
+ /* @__PURE__ */ z(t, {
289
289
  to: "/$workspace/projects/$projectId",
290
290
  params: {
291
- workspace: t,
291
+ workspace: e,
292
292
  projectId: E(n)
293
293
  },
294
294
  onContextMenu: r,
@@ -309,7 +309,7 @@ function G({ workspace: t, project: n, onContextMenu: r, menu: a, depth: s = 0,
309
309
  }),
310
310
  /* @__PURE__ */ z("span", {
311
311
  className: "flex items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground",
312
- children: [/* @__PURE__ */ R(v, { state: w }), f(`health.${w}`)]
312
+ children: [/* @__PURE__ */ R(y, { state: w }), f(`health.${w}`)]
313
313
  }),
314
314
  /* @__PURE__ */ R(M, {
315
315
  content: h[n.priority],
@@ -317,16 +317,16 @@ function G({ workspace: t, project: n, onContextMenu: r, menu: a, depth: s = 0,
317
317
  role: "img",
318
318
  "aria-label": h[n.priority],
319
319
  className: "flex",
320
- children: /* @__PURE__ */ R(o, { priority: n.priority })
320
+ children: /* @__PURE__ */ R(s, { priority: n.priority })
321
321
  })
322
322
  }),
323
323
  /* @__PURE__ */ R("span", {
324
324
  className: "flex",
325
- children: C && /* @__PURE__ */ R(M, {
326
- content: f("leadIs", { name: C.name }),
325
+ children: _ && /* @__PURE__ */ R(M, {
326
+ content: f("leadIs", { name: _.name }),
327
327
  children: /* @__PURE__ */ R("span", { children: /* @__PURE__ */ R(k, {
328
- name: C.name,
329
- src: C.avatarUrl,
328
+ name: _.name,
329
+ src: _.avatarUrl,
330
330
  size: "sm"
331
331
  }) })
332
332
  })
@@ -335,7 +335,7 @@ function G({ workspace: t, project: n, onContextMenu: r, menu: a, depth: s = 0,
335
335
  className: "text-xs text-muted-foreground tabular-nums",
336
336
  children: n.targetDate ? m.day(n.targetDate) : ""
337
337
  }),
338
- /* @__PURE__ */ R("span", { children: /* @__PURE__ */ R(y, {
338
+ /* @__PURE__ */ R("span", { children: /* @__PURE__ */ R(b, {
339
339
  progress: c > 0 ? n.treeProgress : n.progress,
340
340
  compact: !0
341
341
  }) }),
@@ -345,13 +345,13 @@ function G({ workspace: t, project: n, onContextMenu: r, menu: a, depth: s = 0,
345
345
  role: "img",
346
346
  "aria-label": f(`status.${n.status}`),
347
347
  className: "flex",
348
- children: /* @__PURE__ */ R(b, { status: n.status })
348
+ children: /* @__PURE__ */ R(x, { status: n.status })
349
349
  })
350
350
  })
351
351
  ]
352
352
  }),
353
353
  /* @__PURE__ */ R(V, {
354
- items: a,
354
+ items: i,
355
355
  label: p("moreActionsFor", { name: n.name })
356
356
  })
357
357
  ]
@@ -364,7 +364,7 @@ var K = 864e5, q = 5, J = 64, Y = 256, X = 56, Z = (e) => Date.parse(`${e}T00:00
364
364
  let e = /* @__PURE__ */ new Date();
365
365
  return Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
366
366
  }, he = (e) => e - (new Date(e).getUTCDay() + 6) % 7 * K;
367
- function ge({ workspace: t, projects: n, rowProps: r }) {
367
+ function ge({ workspace: e, projects: n, rowProps: r }) {
368
368
  let i = L("planning"), a = I(), o = P(null), [s, c] = F({
369
369
  left: 0,
370
370
  width: 0
@@ -493,10 +493,10 @@ function ge({ workspace: t, projects: n, rowProps: r }) {
493
493
  style: { width: h },
494
494
  children: [o && !d && !f && /* @__PURE__ */ R(M, {
495
495
  content: `${n.name}, ${y(i, a)}`,
496
- children: /* @__PURE__ */ z(e, {
496
+ children: /* @__PURE__ */ z(t, {
497
497
  to: "/$workspace/projects/$projectId",
498
498
  params: {
499
- workspace: t,
499
+ workspace: e,
500
500
  projectId: E(n)
501
501
  },
502
502
  className: "absolute top-2 bottom-2 flex flex-col justify-end gap-1",
@@ -519,10 +519,10 @@ function ge({ workspace: t, projects: n, rowProps: r }) {
519
519
  })]
520
520
  })]
521
521
  })
522
- }), (d || f) && /* @__PURE__ */ z(e, {
522
+ }), (d || f) && /* @__PURE__ */ z(t, {
523
523
  to: "/$workspace/projects/$projectId",
524
524
  params: {
525
- workspace: t,
525
+ workspace: e,
526
526
  projectId: E(n)
527
527
  },
528
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",
@@ -550,12 +550,12 @@ function ge({ workspace: t, projects: n, rowProps: r }) {
550
550
  })
551
551
  });
552
552
  }
553
- function $({ workspace: t, project: n, onContextMenu: r }) {
554
- let i = L("planning"), { person: a } = S(t), o = n.lead ? a(n.lead) : void 0, s = x(n);
555
- return /* @__PURE__ */ z(e, {
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, {
556
556
  to: "/$workspace/projects/$projectId",
557
557
  params: {
558
- workspace: t,
558
+ workspace: e,
559
559
  projectId: E(n)
560
560
  },
561
561
  onContextMenu: r,
@@ -572,7 +572,7 @@ function $({ workspace: t, project: n, onContextMenu: r }) {
572
572
  children: /* @__PURE__ */ R("span", {
573
573
  role: "img",
574
574
  "aria-label": i(`health.${s}`),
575
- children: /* @__PURE__ */ R(v, { state: s })
575
+ children: /* @__PURE__ */ R(y, { state: s })
576
576
  })
577
577
  }),
578
578
  o && /* @__PURE__ */ R(k, {
@@ -584,8 +584,8 @@ function $({ workspace: t, project: n, onContextMenu: r }) {
584
584
  ]
585
585
  });
586
586
  }
587
- function _e({ workspace: e, projects: t, health: n, onHealth: i }) {
588
- let a = L("planning"), { data: o } = B(r(e)), { person: s } = S(e), [c, l] = F("health"), d = (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 ?? ""))];
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
589
  return /* @__PURE__ */ z("aside", {
590
590
  "aria-label": a("breakdown"),
591
591
  className: "hidden w-72 shrink-0 overflow-y-auto border-l border-border p-3 xl:block",
@@ -606,16 +606,16 @@ function _e({ workspace: e, projects: t, health: n, onHealth: i }) {
606
606
  }), /* @__PURE__ */ z("ul", {
607
607
  className: "mt-2",
608
608
  children: [
609
- c === "health" && u.map((e) => ({
609
+ c === "health" && d.map((e) => ({
610
610
  h: e,
611
- n: d((t) => x(t) === e)
611
+ n: u((t) => S(t) === e)
612
612
  })).filter(({ n: e }) => e > 0).map(({ h: e, n: t }) => /* @__PURE__ */ R("li", { children: /* @__PURE__ */ z("button", {
613
613
  type: "button",
614
614
  "aria-pressed": n === e,
615
- onClick: () => i(e),
615
+ onClick: () => r(e),
616
616
  className: `${f} hover:bg-muted aria-pressed:bg-muted`,
617
617
  children: [
618
- /* @__PURE__ */ R(v, { state: e }),
618
+ /* @__PURE__ */ R(y, { state: e }),
619
619
  /* @__PURE__ */ R("span", {
620
620
  className: "flex-1 text-left",
621
621
  children: a(`health.${e}`)
@@ -628,7 +628,7 @@ function _e({ workspace: e, projects: t, health: n, onHealth: i }) {
628
628
  }) }, e)),
629
629
  c === "teams" && o.filter((e) => !e.archivedAt).map((e) => ({
630
630
  team: e,
631
- n: d((t) => t.teamIds.includes(e.id))
631
+ n: u((t) => t.teamIds.includes(e.id))
632
632
  })).filter(({ n: e }) => e > 0).map(({ team: e, n: t }) => /* @__PURE__ */ z("li", {
633
633
  className: f,
634
634
  children: [
@@ -664,7 +664,7 @@ function _e({ workspace: e, projects: t, health: n, onHealth: i }) {
664
664
  }),
665
665
  /* @__PURE__ */ R("span", {
666
666
  className: "text-muted-foreground tabular-nums",
667
- children: d((t) => (t.lead ?? "") === e)
667
+ children: u((t) => (t.lead ?? "") === e)
668
668
  })
669
669
  ]
670
670
  }, e || "none");