@parallelworks/tandem-web 0.183.0 → 0.185.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.
@@ -230,12 +230,12 @@ function f(e) {
230
230
  });
231
231
  };
232
232
  }
233
- var p = f(i.AddIcon), m = f(i.ColumnsIcon), h = f(i.AttachmentIcon), g = f(i.BranchIcon), _ = f(i.CalendarIcon), v = f(i.ClockIcon), y = f(i.CheckIcon), b = f(i.ChevronDownIcon), x = f(i.ChevronRightIcon), S = f(i.CloseIcon), C = f(i.CommentIcon), w = f(i.DownloadIcon), T = f(i.UploadIcon), E = f(i.ExpandIcon), D = f(i.FileTextIcon), O = f(i.FolderIcon), k = f(i.ChartIcon), A = f(i.BucketIcon), j = f(i.CloudIcon), M = f(i.GridIcon), N = f(i.HistoryIcon), P = f(i.InboxIcon), F = f(i.KeyIcon), I = f(i.MinimizeIcon), L = f(i.LibraryIcon), R = f(i.ListViewIcon), z = f(i.MailIcon), B = f(i.MigrationIcon);
233
+ var p = f(i.AddIcon), m = f(i.ColumnsIcon), h = f(i.AttachmentIcon), g = f(i.BranchIcon), _ = f(i.CalendarIcon), v = f(i.ClockIcon), y = f(i.CheckIcon), b = f(i.ChevronDownIcon), x = f(i.ChevronRightIcon), S = f(i.CloseIcon), C = f(i.CommentIcon), w = f(i.DownloadIcon), T = f(i.UploadIcon), E = f(i.ExpandIcon), D = f(i.FileTextIcon), O = f(i.FolderIcon), k = f(i.ChartIcon), A = f(i.BucketIcon), j = f(i.CloudIcon), M = f(i.GridIcon), N = f(i.SpreadsheetIcon), P = f(i.ArticleIcon), F = f(i.HistoryIcon), I = f(i.InboxIcon), L = f(i.KeyIcon), R = f(i.MinimizeIcon), z = f(i.LibraryIcon), B = f(i.ListViewIcon), V = f(i.MailIcon), H = f(i.MigrationIcon);
234
234
  i.NavigationIcon;
235
- var V = f(i.NotificationIcon), H = f(i.QueueIcon), U = f(i.ProjectIcon), W = f(i.PullRequestIcon), G = f(i.RepositoryIcon), K = f(i.SearchIcon), q = f(i.SettingsIcon), J = f(i.ShieldIcon), te = f(i.WarningIcon), Y = f(i.ShrinkIcon);
235
+ var U = f(i.NotificationIcon), W = f(i.QueueIcon), G = f(i.ProjectIcon), K = f(i.PullRequestIcon), q = f(i.RepositoryIcon), J = f(i.SearchIcon), te = f(i.SettingsIcon), Y = f(i.ShieldIcon), X = f(i.WarningIcon), Z = f(i.ShrinkIcon);
236
236
  i.SignOutIcon;
237
- var X = f(i.TagIcon), Z = f(i.UserIcon), Q = f(i.UsersIcon), ne = f(i.WebhookIcon), re = f(i.WorkerIcon), ie = d("M1.75 9a6.25 4.25 0 1 0 12.5 0 6.25 4.25 0 1 0-12.5 0ZM6.75 3 9 4.75 6.75 6.5"), ae = d("M2.5 3.5h11v9h-11ZM10 3.5v9"), oe = d("M2.5 2.5v11M4.5 4.5h5M6.5 8h7M5.5 11.5h4.5"), se = d("M3 13 13 3M3 9.5 9.5 3M6.5 13 13 6.5"), ce = d("M3.5 2.5h9a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1ZM5.5 5h2a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-2a.5.5 0 0 1 .5-.5Z");
238
- function le({ className: e = "size-4", provider: n = "github" }) {
237
+ var Q = f(i.TagIcon), ne = f(i.UserIcon), re = f(i.UsersIcon), ie = f(i.WebhookIcon), ae = f(i.WorkerIcon), oe = d("M1.75 9a6.25 4.25 0 1 0 12.5 0 6.25 4.25 0 1 0-12.5 0ZM6.75 3 9 4.75 6.75 6.5"), se = d("M2.5 3.5h11v9h-11ZM10 3.5v9"), ce = d("M2.5 2.5v11M4.5 4.5h5M6.5 8h7M5.5 11.5h4.5"), le = d("M3 13 13 3M3 9.5 9.5 3M6.5 13 13 6.5"), ue = d("M3.5 2.5h9a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1ZM5.5 5h2a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-2a.5.5 0 0 1 .5-.5Z");
238
+ function de({ className: e = "size-4", provider: n = "github" }) {
239
239
  return n === "gitlab" ? /* @__PURE__ */ t(r, {
240
240
  className: `shrink-0 ${e}`,
241
241
  "aria-hidden": "true"
@@ -247,9 +247,9 @@ function le({ className: e = "size-4", provider: n = "github" }) {
247
247
  children: /* @__PURE__ */ t("path", { d: "M8 0a8 8 0 0 0-2.53 15.59c.4.07.55-.17.55-.38v-1.33c-2.23.48-2.7-1.07-2.7-1.07-.36-.92-.89-1.17-.89-1.17-.73-.5.06-.49.06-.49.8.06 1.23.83 1.23.83.72 1.22 1.87.87 2.33.66.07-.52.28-.87.5-1.07-1.78-.2-3.65-.89-3.65-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.6 7.6 0 0 1 4 0c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.28.82 2.15 0 3.07-1.87 3.75-3.66 3.95.29.25.54.73.54 1.48v2.2c0 .21.15.46.55.38A8 8 0 0 0 8 0Z" })
248
248
  });
249
249
  }
250
- var ue = f(i.AddUserIcon), de = f(i.RemoveUserIcon), fe = f(i.ArchiveIcon), pe = f(i.RestoreIcon), $ = f(i.EditIcon), me = f(i.RenameIcon), he = f(i.LinkIcon), ge = f(i.UnlinkIcon);
250
+ var fe = f(i.AddUserIcon), pe = f(i.RemoveUserIcon), me = f(i.ArchiveIcon), he = f(i.RestoreIcon), ge = f(i.EditIcon), _e = f(i.RenameIcon), ve = f(i.LinkIcon), ye = f(i.UnlinkIcon);
251
251
  i.CommitIcon;
252
- var _e = f(i.ReleaseIcon), ve = f(i.MegaphoneIcon), ye = f(i.SwapIcon), be = f(i.TrashIcon);
252
+ var be = f(i.ReleaseIcon), $ = f(i.MegaphoneIcon), xe = f(i.SwapIcon), Se = f(i.TrashIcon);
253
253
  i.EyeIcon;
254
- var xe = f(i.SuccessIcon), Se = f(i.CancelIcon), Ce = f(i.AgentIcon), we = f(i.ArrowRightIcon);
255
- export { p as AddIcon, ue as AddUserIcon, Ce as AgentIcon, te as AlertIcon, fe as ArchiveIcon, ce as AreaIcon, we as ArrowRightIcon, h as AttachmentIcon, m as BoardIcon, g as BranchIcon, A as BucketIcon, _ as CalendarIcon, Se as CancelIcon, k as ChartIcon, y as CheckIcon, b as ChevronDownIcon, x as ChevronRightIcon, v as ClockIcon, S as CloseIcon, j as CloudIcon, le as CodeHostIcon, C as CommentIcon, ie as CycleIcon, w as DownloadIcon, $ as EditIcon, se as EstimateIcon, E as ExpandIcon, D as FileTextIcon, O as FolderIcon, M as GridIcon, N as HistoryIcon, P as InboxIcon, F as KeyIcon, L as LibraryIcon, he as LinkIcon, R as ListViewIcon, z as MailIcon, ve as MegaphoneIcon, B as MigrationIcon, I as MinimizeIcon, V as NotificationIcon, u as PriorityIcon, U as ProjectIcon, W as PullRequestIcon, _e as ReleaseIcon, de as RemoveUserIcon, me as RenameIcon, G as RepositoryIcon, pe as RestoreIcon, K as SearchIcon, q as SettingsIcon, J as ShieldIcon, Y as ShrinkIcon, ae as SidePanelIcon, s as StatusIcon, xe as SuccessIcon, ye as SwapIcon, X as TagIcon, oe as TimelineIcon, be as TrashIcon, H as TriageIcon, ge as UnlinkIcon, T as UploadIcon, Z as UserIcon, Q as UsersIcon, ne as WebhookIcon, re as WorkerIcon, l as usePriorityNames };
254
+ var Ce = f(i.SuccessIcon), we = f(i.CancelIcon), Te = f(i.AgentIcon), Ee = f(i.ArrowRightIcon);
255
+ export { p as AddIcon, fe as AddUserIcon, Te as AgentIcon, X as AlertIcon, me as ArchiveIcon, ue as AreaIcon, Ee as ArrowRightIcon, P as ArticleIcon, h as AttachmentIcon, m as BoardIcon, g as BranchIcon, A as BucketIcon, _ as CalendarIcon, we as CancelIcon, k as ChartIcon, y as CheckIcon, b as ChevronDownIcon, x as ChevronRightIcon, v as ClockIcon, S as CloseIcon, j as CloudIcon, de as CodeHostIcon, C as CommentIcon, oe as CycleIcon, w as DownloadIcon, ge as EditIcon, le as EstimateIcon, E as ExpandIcon, D as FileTextIcon, O as FolderIcon, M as GridIcon, F as HistoryIcon, I as InboxIcon, L as KeyIcon, z as LibraryIcon, ve as LinkIcon, B as ListViewIcon, V as MailIcon, $ as MegaphoneIcon, H as MigrationIcon, R as MinimizeIcon, U as NotificationIcon, u as PriorityIcon, G as ProjectIcon, K as PullRequestIcon, be as ReleaseIcon, pe as RemoveUserIcon, _e as RenameIcon, q as RepositoryIcon, he as RestoreIcon, J as SearchIcon, te as SettingsIcon, Y as ShieldIcon, Z as ShrinkIcon, se as SidePanelIcon, N as SpreadsheetIcon, s as StatusIcon, Ce as SuccessIcon, xe as SwapIcon, Q as TagIcon, ce as TimelineIcon, Se as TrashIcon, W as TriageIcon, ye as UnlinkIcon, T as UploadIcon, ne as UserIcon, re as UsersIcon, ie as WebhookIcon, ae as WorkerIcon, l as usePriorityNames };
@@ -0,0 +1,7 @@
1
+ import { isCancelledError as e } from "@tanstack/react-query";
2
+ // src/lib/cancelledLoads.ts
3
+ function t(t) {
4
+ let n = t.ensureQueryData.bind(t);
5
+ t.ensureQueryData = ((t) => n(t).catch((r) => e(r) ? n(t) : Promise.reject(r)));
6
+ }
7
+ export { t as refetchCancelledLoads };
@@ -10,7 +10,7 @@ var a = (e) => e === "workspace" ? void 0 : { team: e }, o = [
10
10
  "date",
11
11
  "checkbox",
12
12
  "issue"
13
- ], s = (r, i) => n({
13
+ ], s = (e) => e != null && e !== "" && e !== !1 && !(Array.isArray(e) && e.length === 0), c = (e, t) => e.filter((e) => t.some((t) => s(t.properties?.[e.id]))), l = (r, i) => n({
14
14
  queryKey: [
15
15
  "workspace",
16
16
  r,
@@ -25,7 +25,7 @@ var a = (e) => e === "workspace" ? void 0 : { team: e }, o = [
25
25
  },
26
26
  signal: n
27
27
  })).properties
28
- }), c = (r, i) => n({
28
+ }), u = (r, i) => n({
29
29
  queryKey: [
30
30
  "workspace",
31
31
  r,
@@ -40,7 +40,7 @@ var a = (e) => e === "workspace" ? void 0 : { team: e }, o = [
40
40
  },
41
41
  signal: n
42
42
  })).views
43
- }), l = (r, i) => n({
43
+ }), d = (r, i) => n({
44
44
  queryKey: [
45
45
  "workspace",
46
46
  r,
@@ -56,7 +56,7 @@ var a = (e) => e === "workspace" ? void 0 : { team: e }, o = [
56
56
  signal: n
57
57
  }))
58
58
  });
59
- function u(e) {
59
+ function f(e) {
60
60
  let t = e ?? {}, n = {};
61
61
  if (Array.isArray(t.columns) && (n.columns = t.columns.filter((e) => typeof e == "string")), typeof t.sort == "string" && (n.sort = t.sort), t.desc === !0 && (n.desc = !0), typeof t.groupBy == "string" && (n.groupBy = t.groupBy), typeof t.dateProperty == "string" && (n.dateProperty = t.dateProperty), t.filters && typeof t.filters == "object") {
62
62
  let e = {};
@@ -65,7 +65,7 @@ function u(e) {
65
65
  }
66
66
  return n;
67
67
  }
68
- function d(n) {
68
+ function p(n) {
69
69
  let a = i(), o = () => a.invalidateQueries({ queryKey: [
70
70
  "workspace",
71
71
  n,
@@ -132,4 +132,4 @@ function d(n) {
132
132
  })
133
133
  };
134
134
  }
135
- export { s as docPropertiesQuery, l as docViewQuery, c as docViewsQuery, o as propertyKinds, u as readConfig, a as spaceScope, d as useDocPropertyActions };
135
+ export { l as docPropertiesQuery, d as docViewQuery, u as docViewsQuery, s as hasValue, o as propertyKinds, f as readConfig, a as spaceScope, p as useDocPropertyActions, c as usedProperties };
package/lib/projects.js CHANGED
@@ -21,4 +21,12 @@ function n(e) {
21
21
  for (let n of e) n.parentId && t.has(n.parentId) || r(n, 0);
22
22
  return n;
23
23
  }
24
- export { e as projectRef, n as projectTree, t as projectsUnder };
24
+ function r(e, t) {
25
+ let n = 1, r = e.find((e) => e.id === t);
26
+ for (; r?.parentId && n <= 5;) {
27
+ let t = r.parentId;
28
+ r = e.find((e) => e.id === t), n++;
29
+ }
30
+ return n;
31
+ }
32
+ export { r as projectLevel, e as projectRef, n as projectTree, t as projectsUnder };
@@ -1,10 +1,11 @@
1
1
  import { rememberIssues as e } from "./branch.js";
2
- import { QueryClient as t } from "@tanstack/react-query";
2
+ import { refetchCancelledLoads as t } from "./cancelledLoads.js";
3
+ import { QueryClient as n } from "@tanstack/react-query";
3
4
  // src/lib/queryClient.ts
4
- function n() {
5
- let n = new t({ defaultOptions: { queries: { staleTime: 3e4 } } });
6
- return n.getQueryCache().subscribe((t) => {
5
+ function r() {
6
+ let r = new n({ defaultOptions: { queries: { staleTime: 3e4 } } });
7
+ return t(r), r.getQueryCache().subscribe((t) => {
7
8
  t.type === "updated" && t.action.type === "success" && e(t.query.state.data);
8
- }), n;
9
+ }), r;
9
10
  }
10
- export { n as createQueryClient };
11
+ export { r as createQueryClient };
@@ -6,6 +6,7 @@ function o(e) {
6
6
  let t = e ?? {};
7
7
  return {
8
8
  ...typeof t.dateProperty == "string" && { dateProperty: t.dateProperty },
9
+ ...typeof t.groupBy == "string" && { groupBy: t.groupBy },
9
10
  ...typeof t.template == "string" && { template: t.template }
10
11
  };
11
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parallelworks/tandem-web",
3
- "version": "0.183.0",
3
+ "version": "0.185.0",
4
4
  "description": "Tandem's pages, for a host app to render in its own",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
package/pages/projects.js CHANGED
@@ -11,25 +11,25 @@ import { usePageTitle as y } from "../lib/pageTitle.js";
11
11
  import { usePeople as b } from "../lib/people.js";
12
12
  import { storeLayout as x, storedLayout as S } from "../lib/projectList.js";
13
13
  import { healthStates as C, projectStatuses as ee, shownStatus as te } from "../lib/projectStates.js";
14
- import { projectRef as w, projectTree as T, projectsUnder as E } from "../lib/projects.js";
15
- import { useCan as ne } from "../lib/roles.js";
16
- import { Link as D, useNavigate as re } from "../lib/router.js";
17
- import { useTime as O } from "../lib/time.js";
18
- import { Avatar as k, Button as A, Combobox as ie, EmptyState as ae, PageHeaderAddButton as oe, Switch as se, Tabs as j, ToggleGroup as ce, Tooltip as M, menuDivider as le, useOpenMenu as ue } from "@parallelworks/ui";
19
- import { useParams as N, useSearch as de } from "@tanstack/react-router";
20
- import { useEffect as P, useId as fe, useRef as F, useState as I } from "react";
14
+ import { projectLevel as ne, projectRef as w, projectTree as T, projectsUnder as E } from "../lib/projects.js";
15
+ import { useCan as D } from "../lib/roles.js";
16
+ import { Link as O, useNavigate as re } from "../lib/router.js";
17
+ import { useTime as k } from "../lib/time.js";
18
+ import { Avatar as A, Button as j, Combobox as ie, EmptyState as ae, PageHeaderAddButton as oe, Switch as se, Tabs as M, ToggleGroup as ce, Tooltip as N, menuDivider as le, useOpenMenu as ue } from "@parallelworks/ui";
19
+ import { useParams as de, useSearch as fe } from "@tanstack/react-router";
20
+ import { useEffect as P, useId as pe, useRef as F, useState as I } from "react";
21
21
  import { useFormatter as L, useTranslations as R } from "use-intl";
22
22
  import { jsx as z, jsxs as B } from "react/jsx-runtime";
23
23
  import { useSuspenseQuery as V } from "@tanstack/react-query";
24
24
  import { MoreButton as H } from "@parallelworks/ui/list";
25
25
  // src/pages/projects.tsx
26
26
  function U() {
27
- let { workspace: r, key: a } = N({ strict: !1 }), s = de({ strict: !1 }), u = a ? {
27
+ let { workspace: r, key: a } = de({ strict: !1 }), s = fe({ strict: !1 }), u = a ? {
28
28
  ...s,
29
29
  team: a
30
30
  } : s, f = R("planning"), p = R("common"), { data: m } = V(e(r)), { data: b } = V(t(r)), C = b.find((e) => e.key === u.team);
31
31
  y(C ? f("teamProjects", { team: C.name }) : f("projects"));
32
- let T = a ? "list" : "timeline", D = u.view ?? S(!!a) ?? T, O = m.filter((e) => (!C || e.teamIds.includes(C.id)) && !!e.template == (D === "templates")), k = ne(r, "manage_projects"), [j, M] = I(!1), P = fe(), F = re(), L = ue(), H = v(), U = u.parent ? m.find((e) => e.id === u.parent) : void 0, W = U && new Set(E(m, U.id).map((e) => e.id)), G = te(u.status, D === "templates"), K = O.filter((e) => (!G || e.status === G) && (!u.health || h(e) === u.health) && (!W || W.has(e.id))), q = O.length > 0 && (!!G || !!u.health), J = (e) => {
32
+ let T = a ? "list" : "timeline", O = u.view ?? S(!!a) ?? T, k = m.filter((e) => (!C || e.teamIds.includes(C.id)) && !!e.template == (O === "templates")), A = D(r, "manage_projects"), [M, N] = I(null), P = pe(), F = re(), L = ue(), H = v(), U = u.parent ? m.find((e) => e.id === u.parent) : void 0, W = U && new Set(E(m, U.id).map((e) => e.id)), G = te(u.status, O === "templates"), K = k.filter((e) => (!G || e.status === G) && (!u.health || h(e) === u.health) && (!W || W.has(e.id))), q = k.length > 0 && (!!G || !!u.health), J = (e) => {
33
33
  let { team: t, ...n } = Object.fromEntries(Object.entries({
34
34
  ...u,
35
35
  ...e
@@ -74,6 +74,10 @@ function U() {
74
74
  label: Y.find("project", e.id) ? X("remove") : X("add"),
75
75
  onClick: () => Y.toggle("project", e.id)
76
76
  },
77
+ ...A && !e.template && ne(m, e.id) < 5 ? [{
78
+ label: f("newSubProject"),
79
+ onClick: () => N(e.id)
80
+ }] : [],
77
81
  le,
78
82
  ...H(`/${r}/projects/${w(e)}`),
79
83
  _(p("copyName"), e.name)
@@ -101,7 +105,7 @@ function U() {
101
105
  /* @__PURE__ */ z("span", {
102
106
  className: "ml-auto flex items-center gap-1",
103
107
  children: /* @__PURE__ */ z(n, {
104
- ...D !== "templates" && {
108
+ ...O !== "templates" && {
105
109
  layouts: [{
106
110
  value: "list",
107
111
  label: f("views.list"),
@@ -111,12 +115,12 @@ function U() {
111
115
  label: f("views.timeline"),
112
116
  icon: /* @__PURE__ */ z(l, {})
113
117
  }],
114
- layout: D,
118
+ layout: O,
115
119
  onLayoutChange: (e) => {
116
120
  x(!!a, e), J({ view: e });
117
121
  }
118
122
  },
119
- changed: D !== T,
123
+ changed: O !== T,
120
124
  children: /* @__PURE__ */ B("div", {
121
125
  className: "flex items-center justify-between gap-3",
122
126
  children: [/* @__PURE__ */ z("span", {
@@ -125,16 +129,16 @@ function U() {
125
129
  children: f("showTemplates")
126
130
  }), /* @__PURE__ */ z(se, {
127
131
  size: "sm",
128
- checked: D === "templates",
132
+ checked: O === "templates",
129
133
  onCheckedChange: (e) => J({ view: e ? "templates" : void 0 }),
130
134
  "aria-labelledby": P
131
135
  })]
132
136
  })
133
137
  })
134
138
  }),
135
- k && /* @__PURE__ */ z(oe, {
139
+ A && /* @__PURE__ */ z(oe, {
136
140
  label: f("newProject"),
137
- onClick: () => M(!0)
141
+ onClick: () => N("")
138
142
  })
139
143
  ]
140
144
  }),
@@ -144,23 +148,23 @@ function U() {
144
148
  /* @__PURE__ */ z(ce, {
145
149
  label: f("filterStatus"),
146
150
  multiple: !1,
147
- all: { count: O.length },
151
+ all: { count: k.length },
148
152
  options: ee.map((e) => ({
149
153
  value: e,
150
154
  label: f(`status.${e}`),
151
- count: O.filter((t) => t.status === e).length
155
+ count: k.filter((t) => t.status === e).length
152
156
  })),
153
157
  value: G ? [G] : [],
154
158
  onValueChange: ([e]) => J({ status: e ?? "all" })
155
159
  }),
156
- u.health && /* @__PURE__ */ z(A, {
160
+ u.health && /* @__PURE__ */ z(j, {
157
161
  variant: "outline",
158
162
  size: "sm",
159
163
  "aria-pressed": !0,
160
164
  onClick: () => J({ health: void 0 }),
161
165
  children: f("healthFilter", { health: f(`health.${u.health}`) })
162
166
  }),
163
- O.some((e) => e.parentId) && /* @__PURE__ */ z(ie, {
167
+ k.some((e) => e.parentId) && /* @__PURE__ */ z(ie, {
164
168
  items: [{
165
169
  value: "",
166
170
  label: f("anyParent")
@@ -172,7 +176,7 @@ function U() {
172
176
  onValueChange: (e) => J({ parent: e || void 0 }),
173
177
  placeholder: f("parentProject"),
174
178
  "aria-label": f("parentProject"),
175
- trigger: /* @__PURE__ */ z(A, {
179
+ trigger: /* @__PURE__ */ z(j, {
176
180
  variant: "outline",
177
181
  size: "sm",
178
182
  className: U ? "border-(--theme-link) text-(--theme-app)" : void 0,
@@ -189,40 +193,41 @@ function U() {
189
193
  className: "p-6",
190
194
  children: /* @__PURE__ */ z(ae, {
191
195
  icon: /* @__PURE__ */ z(c, {}),
192
- title: f(q ? "noProjectsWithStatus" : D === "templates" ? "noTemplates" : "noProjects"),
193
- ...!q && { description: f(D === "templates" ? "noTemplatesDescription" : "noProjectsDescription") },
194
- ...k && !q && D !== "templates" && { action: /* @__PURE__ */ z(A, {
196
+ title: f(q ? "noProjectsWithStatus" : O === "templates" ? "noTemplates" : "noProjects"),
197
+ ...!q && { description: f(O === "templates" ? "noTemplatesDescription" : "noProjectsDescription") },
198
+ ...A && !q && O !== "templates" && { action: /* @__PURE__ */ z(j, {
195
199
  type: "button",
196
200
  variant: "primary",
197
- onClick: () => M(!0),
201
+ onClick: () => N(""),
198
202
  children: f("newProject")
199
203
  }) }
200
204
  })
201
- }) : D === "timeline" ? /* @__PURE__ */ z(ge, {
205
+ }) : O === "timeline" ? /* @__PURE__ */ z(_e, {
202
206
  workspace: r,
203
207
  projects: K,
204
208
  rowProps: Q
205
- }) : /* @__PURE__ */ z(pe, {
209
+ }) : /* @__PURE__ */ z(me, {
206
210
  projects: K,
207
211
  rowProps: Q
208
212
  })
209
- }), /* @__PURE__ */ z(ve, {
213
+ }), /* @__PURE__ */ z(ye, {
210
214
  workspace: r,
211
- projects: O,
215
+ projects: k,
212
216
  health: u.health,
213
217
  onHealth: (e) => J({ health: e === u.health ? void 0 : e })
214
218
  })]
215
219
  }),
216
- j && /* @__PURE__ */ z(d, {
220
+ M !== null && /* @__PURE__ */ z(d, {
217
221
  workspace: r,
218
222
  teamId: C?.id,
219
- onClose: () => M(!1)
223
+ parentId: M || void 0,
224
+ onClose: () => N(null)
220
225
  })
221
226
  ]
222
227
  });
223
228
  }
224
229
  var W = "@4xl:grid @4xl:grid-cols-[minmax(0,1fr)_10rem_2rem_2rem_6rem_8rem_2rem]";
225
- function pe({ projects: e, rowProps: t }) {
230
+ function me({ projects: e, rowProps: t }) {
226
231
  let n = R("planning"), [r, i] = I(/* @__PURE__ */ new Set()), a = new Set([...r].flatMap((t) => E(e, t).map((e) => e.id))), o = (e) => i((t) => {
227
232
  let n = new Set(t);
228
233
  return n.delete(e) || n.add(e), n;
@@ -234,14 +239,14 @@ function pe({ projects: e, rowProps: t }) {
234
239
  children: [
235
240
  /* @__PURE__ */ z("span", { children: n("name") }),
236
241
  /* @__PURE__ */ z("span", { children: n("healthLabel") }),
237
- /* @__PURE__ */ z(M, {
242
+ /* @__PURE__ */ z(N, {
238
243
  content: n("priority"),
239
244
  children: /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z("span", {
240
245
  className: "sr-only",
241
246
  children: n("priority")
242
247
  }) })
243
248
  }),
244
- /* @__PURE__ */ z(M, {
249
+ /* @__PURE__ */ z(N, {
245
250
  content: n("lead"),
246
251
  children: /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z("span", {
247
252
  className: "sr-only",
@@ -269,7 +274,7 @@ function G({ project: e }) {
269
274
  }) : /* @__PURE__ */ z(c, { className: "size-4 text-muted-foreground" });
270
275
  }
271
276
  function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0, childCount: o = 0, folded: c = !1, onFold: l }) {
272
- let d = R("planning"), g = R("common"), _ = O(), v = u(), { person: y } = b(e), x = t.lead ? y(t.lead) : void 0, S = h(t);
277
+ let d = R("planning"), g = R("common"), _ = k(), v = u(), { person: y } = b(e), x = t.lead ? y(t.lead) : void 0, S = h(t);
273
278
  return /* @__PURE__ */ B("li", {
274
279
  className: "group flex items-center border-b border-border pr-2 hover:bg-muted/60",
275
280
  children: [
@@ -285,7 +290,7 @@ function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0,
285
290
  children: /* @__PURE__ */ z(a, { className: `size-3.5 transition-transform ${c ? "-rotate-90" : ""}` })
286
291
  })
287
292
  }),
288
- /* @__PURE__ */ B(D, {
293
+ /* @__PURE__ */ B(O, {
289
294
  to: "/$workspace/projects/$projectId",
290
295
  params: {
291
296
  workspace: e,
@@ -311,7 +316,7 @@ function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0,
311
316
  className: "flex items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground",
312
317
  children: [/* @__PURE__ */ z(f, { state: S }), d(`health.${S}`)]
313
318
  }),
314
- /* @__PURE__ */ z(M, {
319
+ /* @__PURE__ */ z(N, {
315
320
  content: v[t.priority],
316
321
  children: /* @__PURE__ */ z("span", {
317
322
  role: "img",
@@ -322,9 +327,9 @@ function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0,
322
327
  }),
323
328
  /* @__PURE__ */ z("span", {
324
329
  className: "flex",
325
- children: x && /* @__PURE__ */ z(M, {
330
+ children: x && /* @__PURE__ */ z(N, {
326
331
  content: d("leadIs", { name: x.name }),
327
- children: /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z(k, {
332
+ children: /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z(A, {
328
333
  name: x.name,
329
334
  src: x.avatarUrl,
330
335
  size: "sm"
@@ -339,7 +344,7 @@ function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0,
339
344
  progress: o > 0 ? t.treeProgress : t.progress,
340
345
  compact: !0
341
346
  }) }),
342
- /* @__PURE__ */ z(M, {
347
+ /* @__PURE__ */ z(N, {
343
348
  content: d(`status.${t.status}`),
344
349
  children: /* @__PURE__ */ z("span", {
345
350
  role: "img",
@@ -360,15 +365,15 @@ function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0,
360
365
  var q = 864e5, J = 5, Y = 64, X = 256, Z = 56, Q = (e) => Date.parse(`${e}T00:00:00Z`), $ = (e) => {
361
366
  let t = new Date(e);
362
367
  return Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), 1);
363
- }, me = () => {
368
+ }, he = () => {
364
369
  let e = /* @__PURE__ */ new Date();
365
370
  return Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
366
- }, he = (e) => e - (new Date(e).getUTCDay() + 6) % 7 * q;
367
- function ge({ workspace: e, projects: t, rowProps: n }) {
371
+ }, ge = (e) => e - (new Date(e).getUTCDay() + 6) % 7 * q;
372
+ function _e({ workspace: e, projects: t, rowProps: n }) {
368
373
  let r = R("planning"), i = L(), a = F(null), [o, s] = I({
369
374
  left: 0,
370
375
  width: 0
371
- }), c = me(), l = t.map((e) => {
376
+ }), c = he(), l = t.map((e) => {
372
377
  let t = e.targetDate ? Q(e.targetDate) : void 0;
373
378
  return {
374
379
  p: e,
@@ -378,7 +383,7 @@ function ge({ workspace: e, projects: t, rowProps: n }) {
378
383
  }), u = l.flatMap((e) => [e.start, e.end].filter((e) => e !== void 0)), d = $(Math.min(c - 90 * q, ...u)), f = $(Math.max(c + 300 * q, ...u) + 40 * q), p = (e) => (e - d) / q * J, m = p(f), h = [];
379
384
  for (let e = d; e < f; e = $(e + 32 * q)) h.push(e);
380
385
  let g = [];
381
- for (let e = he(d) + 7 * q; e < f; e += 7 * q) g.push(e);
386
+ for (let e = ge(d) + 7 * q; e < f; e += 7 * q) g.push(e);
382
387
  let _ = (e, t) => i.dateTime(new Date(e), {
383
388
  ...t,
384
389
  timeZone: "UTC"
@@ -423,7 +428,7 @@ function ge({ workspace: e, projects: t, rowProps: n }) {
423
428
  children: [/* @__PURE__ */ z("div", {
424
429
  className: "sticky left-0 z-[3] flex shrink-0 items-end border-r border-border bg-background px-4 pb-2",
425
430
  style: { width: X },
426
- children: /* @__PURE__ */ z(A, {
431
+ children: /* @__PURE__ */ z(j, {
427
432
  type: "button",
428
433
  size: "xs",
429
434
  onClick: () => b(),
@@ -488,12 +493,12 @@ function ge({ workspace: e, projects: t, rowProps: n }) {
488
493
  return /* @__PURE__ */ B("li", {
489
494
  className: "group flex hover:bg-muted/40",
490
495
  style: { height: Y },
491
- children: [/* @__PURE__ */ z(_e, { ...n(t) }), /* @__PURE__ */ B("div", {
496
+ children: [/* @__PURE__ */ z(ve, { ...n(t) }), /* @__PURE__ */ B("div", {
492
497
  className: "relative",
493
498
  style: { width: m },
494
- children: [a && !u && !d && /* @__PURE__ */ z(M, {
499
+ children: [a && !u && !d && /* @__PURE__ */ z(N, {
495
500
  content: `${t.name}, ${v(r, i)}`,
496
- children: /* @__PURE__ */ B(D, {
501
+ children: /* @__PURE__ */ B(O, {
497
502
  to: "/$workspace/projects/$projectId",
498
503
  params: {
499
504
  workspace: e,
@@ -522,7 +527,7 @@ function ge({ workspace: e, projects: t, rowProps: n }) {
522
527
  })]
523
528
  })]
524
529
  })
525
- }), (u || d) && /* @__PURE__ */ B(D, {
530
+ }), (u || d) && /* @__PURE__ */ B(O, {
526
531
  to: "/$workspace/projects/$projectId",
527
532
  params: {
528
533
  workspace: e,
@@ -553,9 +558,9 @@ function ge({ workspace: e, projects: t, rowProps: n }) {
553
558
  })
554
559
  });
555
560
  }
556
- function _e({ workspace: e, project: t, onContextMenu: n }) {
561
+ function ve({ workspace: e, project: t, onContextMenu: n }) {
557
562
  let r = R("planning"), { person: i } = b(e), a = t.lead ? i(t.lead) : void 0, o = h(t);
558
- return /* @__PURE__ */ B(D, {
563
+ return /* @__PURE__ */ B(O, {
559
564
  to: "/$workspace/projects/$projectId",
560
565
  params: {
561
566
  workspace: e,
@@ -570,7 +575,7 @@ function _e({ workspace: e, project: t, onContextMenu: n }) {
570
575
  className: "min-w-0 flex-1 truncate text-sm",
571
576
  children: t.name
572
577
  }),
573
- /* @__PURE__ */ z(M, {
578
+ /* @__PURE__ */ z(N, {
574
579
  content: r(`status.${t.status}`),
575
580
  children: /* @__PURE__ */ z("span", {
576
581
  role: "img",
@@ -579,7 +584,7 @@ function _e({ workspace: e, project: t, onContextMenu: n }) {
579
584
  children: /* @__PURE__ */ z(m, { status: t.status })
580
585
  })
581
586
  }),
582
- /* @__PURE__ */ z(M, {
587
+ /* @__PURE__ */ z(N, {
583
588
  content: r(`health.${o}`),
584
589
  children: /* @__PURE__ */ z("span", {
585
590
  role: "img",
@@ -587,7 +592,7 @@ function _e({ workspace: e, project: t, onContextMenu: n }) {
587
592
  children: /* @__PURE__ */ z(f, { state: o })
588
593
  })
589
594
  }),
590
- a && /* @__PURE__ */ z(k, {
595
+ a && /* @__PURE__ */ z(A, {
591
596
  name: a.name,
592
597
  src: a.avatarUrl,
593
598
  size: "xs",
@@ -596,12 +601,12 @@ function _e({ workspace: e, project: t, onContextMenu: n }) {
596
601
  ]
597
602
  });
598
603
  }
599
- function ve({ workspace: e, projects: n, health: i, onHealth: a }) {
604
+ function ye({ workspace: e, projects: n, health: i, onHealth: a }) {
600
605
  let o = R("planning"), { data: s } = V(t(e)), { person: c } = b(e), [l, u] = I("health"), d = (e) => n.filter(e).length, p = "flex h-9 w-full items-center gap-2.5 rounded-md px-2 text-sm", m = [...new Set(n.map((e) => e.lead ?? ""))];
601
606
  return /* @__PURE__ */ B("aside", {
602
607
  "aria-label": o("breakdown"),
603
608
  className: "hidden w-72 shrink-0 overflow-y-auto border-l border-border p-3 xl:block",
604
- children: [/* @__PURE__ */ z(j, {
609
+ children: [/* @__PURE__ */ z(M, {
605
610
  variant: "segmented",
606
611
  size: "sm",
607
612
  label: o("breakdown"),
@@ -664,7 +669,7 @@ function ve({ workspace: e, projects: n, health: i, onHealth: a }) {
664
669
  return /* @__PURE__ */ B("li", {
665
670
  className: p,
666
671
  children: [
667
- t ? /* @__PURE__ */ z(k, {
672
+ t ? /* @__PURE__ */ z(A, {
668
673
  name: t.name,
669
674
  src: t.avatarUrl,
670
675
  size: "xs",