@parallelworks/tandem-web 0.158.0 → 0.160.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.
@@ -4,31 +4,31 @@ import { Link as r, useNavigate as i } from "../../../lib/router.js";
4
4
  import { issuesQuery as a, meQuery as o, projectEventsQuery as s, projectOf as c, projectQuery as l, projectUpdatesQuery as u, projectsQuery as d, teamsQuery as f } from "../../../api/queries.js";
5
5
  import { invalidateIssueViews as p } from "../../../api/mutations.js";
6
6
  import { copyItem as m, useLinkItems as h } from "../../../lib/menus.js";
7
- import { AddIcon as ee, AddUserIcon as g, CalendarIcon as _, LinkIcon as v, PriorityIcon as y, ProjectIcon as b, RemoveUserIcon as x, RenameIcon as S, UsersIcon as C, usePriorityNames as w } from "../../../components/icons.js";
8
- import { usePeople as T } from "../../../lib/people.js";
9
- import { useTime as E } from "../../../lib/time.js";
10
- import { HealthIcon as D, ProgressBar as O, ProjectStatusIcon as k, healthOf as A } from "../../../components/Planning.js";
11
- import { projectRef as j, projectsUnder as te } from "../../../lib/projects.js";
12
- import { EntityIcon as ne } from "../../../components/EntityIcon.js";
13
- import { useCan as re } from "../../../lib/roles.js";
14
- import { useConfirm as ie } from "../../../lib/confirm.js";
15
- import { ProjectFields as ae } from "../../../components/CustomFields.js";
16
- import { Editor as oe } from "../../../components/Editor.js";
17
- import { projectStatuses as se } from "../../../lib/projectStates.js";
18
- import { projectIssueFilter as ce, tabs as le } from "./_projectId.js";
19
- import { Route as M } from "./_projectId2.js";
20
- import { FavoriteStar as ue } from "../../../components/FavoriteStar.js";
21
- import { Timeline as N, TimelineItem as de, activityIcon as P } from "../../../components/ActivityTimeline.js";
22
- import { useIssuePicker as F } from "../../../lib/issuePicker.js";
23
- import { IssueBreakdown as fe } from "../../../components/IssueBreakdown.js";
24
- import { FollowButton as pe } from "../../../components/FollowButton.js";
25
- import { IconUpload as me } from "../../../components/IconUpload.js";
26
- import { StatusGroups as I } from "../../../components/IssueGroup.js";
27
- import { ProjectAccessDialog as he } from "../../../components/ProjectAccess.js";
28
- import { Updates as ge } from "../../../components/Updates.js";
29
- import { Avatar as L, AvatarGroup as R, Button as z, Card as _e, Combobox as B, DatePicker as ve, EmptyState as ye, ErrorText as V, Input as be, PageHeader as xe, Select as Se, Switch as Ce, buttonClasses as H, menuDivider as U, useOpenMenu as we } from "@parallelworks/ui";
30
- import { useEffect as Te, useState as W } from "react";
31
- import { useErrorMessage as G } from "@parallelworks/problem/react";
7
+ import { AddIcon as g, AddUserIcon as _, CalendarIcon as v, LinkIcon as y, PriorityIcon as b, ProjectIcon as x, RemoveUserIcon as S, RenameIcon as C, UsersIcon as w, usePriorityNames as T } from "../../../components/icons.js";
8
+ import { usePeople as E } from "../../../lib/people.js";
9
+ import { useTime as D } from "../../../lib/time.js";
10
+ import { HealthIcon as O, ProgressBar as k, ProjectStatusIcon as A, healthOf as j } from "../../../components/Planning.js";
11
+ import { projectRef as M, projectsUnder as N } from "../../../lib/projects.js";
12
+ import { EntityIcon as ee } from "../../../components/EntityIcon.js";
13
+ import { useCan as te } from "../../../lib/roles.js";
14
+ import { useConfirm as ne } from "../../../lib/confirm.js";
15
+ import { ProjectFields as re } from "../../../components/CustomFields.js";
16
+ import { Editor as ie } from "../../../components/Editor.js";
17
+ import { projectStatuses as ae } from "../../../lib/projectStates.js";
18
+ import { projectIssueFilter as oe, tabs as se } from "./_projectId.js";
19
+ import { Route as P } from "./_projectId2.js";
20
+ import { FavoriteStar as ce } from "../../../components/FavoriteStar.js";
21
+ import { Timeline as F, TimelineItem as le, activityIcon as I } from "../../../components/ActivityTimeline.js";
22
+ import { useIssuePicker as L } from "../../../lib/issuePicker.js";
23
+ import { IssueBreakdown as ue } from "../../../components/IssueBreakdown.js";
24
+ import { FollowButton as de } from "../../../components/FollowButton.js";
25
+ import { IconUpload as fe } from "../../../components/IconUpload.js";
26
+ import { StatusGroups as R } from "../../../components/IssueGroup.js";
27
+ import { ProjectAccessDialog as pe } from "../../../components/ProjectAccess.js";
28
+ import { Updates as me } from "../../../components/Updates.js";
29
+ import { Avatar as z, AvatarGroup as B, Button as V, Card as he, Combobox as H, DatePicker as ge, EmptyState as _e, ErrorText as U, Input as ve, PageHeader as ye, Select as be, Switch as xe, buttonClasses as W, menuDivider as Se, useOpenMenu as Ce } from "@parallelworks/ui";
30
+ import { useEffect as we, useState as G } from "react";
31
+ import { useErrorMessage as Te } from "@parallelworks/problem/react";
32
32
  import { useTranslations as K } from "use-intl";
33
33
  import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
34
34
  import { useMutation as X, useQuery as Z, useQueryClient as Q, useSuspenseQuery as $ } from "@tanstack/react-query";
@@ -40,9 +40,9 @@ var De = [
40
40
  "cycles"
41
41
  ];
42
42
  function Oe() {
43
- let { workspace: s, projectId: u } = M.useParams(), f = K("planning"), p = K("common"), ee = G(), { data: g } = $(l(s, u)), _ = j(g);
44
- n(g.name);
45
- let v = re(s, "manage_projects", { project: g.id }), y = re(s, "delete_projects", { project: g.id }), x = Q(), S = i(), C = h(), { confirm: w, dialog: T } = ie(), [E, D] = W(!1), { data: k } = $(o), A = !!M.useSearch().own, { data: te } = Z(a(s, ce(g.id, A))), { data: se = [] } = Z(d(s)), N = se.filter((e) => e.parentId === g.id), de = A || N.length === 0 ? g.progress : g.treeProgress, [P, F] = W("assignees"), I = X({
43
+ let { workspace: s, projectId: u } = P.useParams(), f = K("planning"), p = K("common"), g = Te(), { data: _ } = $(l(s, u)), v = M(_);
44
+ n(_.name);
45
+ let y = te(s, "manage_projects", { project: _.id }), b = te(s, "delete_projects", { project: _.id }), S = Q(), C = i(), w = h(), { confirm: T, dialog: E } = ne(), [D, O] = G(!1), { data: A } = $(o), j = !!P.useSearch().own, { data: N } = Z(a(s, oe(_.id, j))), { data: ae = [] } = Z(d(s)), F = ae.filter((e) => e.parentId === _.id), le = j || F.length === 0 ? _.progress : _.treeProgress, [I, L] = G("assignees"), R = X({
46
46
  mutationFn: async (n) => t(await e.PATCH("/api/v1/workspaces/{workspace}/projects/{projectId}", {
47
47
  params: { path: {
48
48
  workspace: s,
@@ -50,25 +50,25 @@ function Oe() {
50
50
  } },
51
51
  body: n
52
52
  })),
53
- onSuccess: (e) => x.setQueryData(l(s, u).queryKey, c(e)),
53
+ onSuccess: (e) => S.setQueryData(l(s, u).queryKey, c(e)),
54
54
  onSettled: () => {
55
- x.invalidateQueries({ queryKey: d(s).queryKey });
55
+ S.invalidateQueries({ queryKey: d(s).queryKey });
56
56
  }
57
- }), ge = X({
57
+ }), me = X({
58
58
  mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}", { params: { path: {
59
59
  workspace: s,
60
60
  projectId: u
61
61
  } } })),
62
62
  onSuccess: () => {
63
- x.invalidateQueries({ queryKey: ["workspace", s] }), S({
63
+ S.invalidateQueries({ queryKey: ["workspace", s] }), C({
64
64
  to: "/$workspace/projects",
65
65
  params: { workspace: s }
66
66
  });
67
67
  }
68
- }), L = () => [
68
+ }), z = () => [
69
69
  {
70
70
  label: f("viewIssues"),
71
- onClick: () => S({
71
+ onClick: () => C({
72
72
  to: "/$workspace/projects/$projectId",
73
73
  params: {
74
74
  workspace: s,
@@ -77,76 +77,76 @@ function Oe() {
77
77
  search: { tab: "issues" }
78
78
  })
79
79
  },
80
- ...v ? [{
81
- label: g.template ? f("stopTemplate") : f("useAsTemplate"),
82
- onClick: () => I.mutate({ template: !g.template })
80
+ ...y ? [{
81
+ label: _.template ? f("stopTemplate") : f("useAsTemplate"),
82
+ onClick: () => R.mutate({ template: !_.template })
83
83
  }] : [],
84
- ...k?.mode === "platform" ? [] : [{
84
+ ...A?.mode === "platform" ? [] : [{
85
85
  label: f("manageAccess"),
86
- onClick: () => D(!0)
86
+ onClick: () => O(!0)
87
87
  }],
88
- U,
89
- ...C(`/${s}/projects/${_}`),
90
- m(p("copyName"), g.name),
91
- ...y ? [U, {
88
+ Se,
89
+ ...w(`/${s}/projects/${v}`),
90
+ m(p("copyName"), _.name),
91
+ ...b ? [Se, {
92
92
  label: f("deleteProject"),
93
93
  destructive: !0,
94
- onClick: () => w({
95
- title: f("deleteProjectTitle", { name: g.name }),
94
+ onClick: () => T({
95
+ title: f("deleteProjectTitle", { name: _.name }),
96
96
  description: f("deleteProjectDescription"),
97
97
  confirmLabel: f("deleteProject"),
98
- onConfirm: () => ge.mutateAsync()
98
+ onConfirm: () => me.mutateAsync()
99
99
  })
100
100
  }] : []
101
- ], R = M.useSearch().tab ?? "overview", z = te?.issues ?? [];
102
- return Te(() => {
103
- u !== _ && S({
101
+ ], B = P.useSearch().tab ?? "overview", V = N?.issues ?? [];
102
+ return we(() => {
103
+ u !== v && C({
104
104
  to: "/$workspace/projects/$projectId",
105
105
  params: {
106
106
  workspace: s,
107
- projectId: _
107
+ projectId: v
108
108
  },
109
109
  search: (e) => e,
110
110
  replace: !0
111
111
  });
112
112
  }, [
113
- S,
113
+ C,
114
114
  s,
115
115
  u,
116
- _
116
+ v
117
117
  ]), /* @__PURE__ */ Y("div", {
118
118
  className: "flex h-full min-h-0 flex-col",
119
119
  children: [
120
- /* @__PURE__ */ J(xe, {
120
+ /* @__PURE__ */ J(ye, {
121
121
  heading: !1,
122
122
  breadcrumbs: [{
123
123
  label: f("projects"),
124
124
  href: `/${s}/projects`
125
125
  }, {
126
- label: g.name,
127
- icon: g.icon || g.color ? /* @__PURE__ */ J(ne, {
128
- icon: g.icon ?? "",
129
- color: g.color ?? "",
130
- name: g.name
131
- }) : /* @__PURE__ */ J(b, { className: "size-4 text-muted-foreground" })
126
+ label: _.name,
127
+ icon: _.icon || _.color ? /* @__PURE__ */ J(ee, {
128
+ icon: _.icon ?? "",
129
+ color: _.color ?? "",
130
+ name: _.name
131
+ }) : /* @__PURE__ */ J(x, { className: "size-4 text-muted-foreground" })
132
132
  }],
133
133
  titleActions: /* @__PURE__ */ Y(q, { children: [
134
- /* @__PURE__ */ J(ue, {
134
+ /* @__PURE__ */ J(ce, {
135
135
  workspace: s,
136
136
  kind: "project",
137
- target: g.id
137
+ target: _.id
138
138
  }),
139
- /* @__PURE__ */ J(pe, {
139
+ /* @__PURE__ */ J(de, {
140
140
  workspace: s,
141
- project: g.id
141
+ project: _.id
142
142
  }),
143
143
  /* @__PURE__ */ J(Ee, {
144
- items: L,
145
- label: p("moreActionsFor", { name: g.name }),
144
+ items: z,
145
+ label: p("moreActionsFor", { name: _.name }),
146
146
  visible: !0
147
147
  })
148
148
  ] }),
149
- actions: I.isPending && /* @__PURE__ */ J("span", {
149
+ actions: R.isPending && /* @__PURE__ */ J("span", {
150
150
  className: "text-xs text-muted-foreground",
151
151
  children: p("saving")
152
152
  })
@@ -154,87 +154,87 @@ function Oe() {
154
154
  /* @__PURE__ */ J("nav", {
155
155
  "aria-label": f("projectSections"),
156
156
  className: "flex shrink-0 gap-1 border-b border-border px-4 py-2 md:px-5",
157
- children: le.map((e) => /* @__PURE__ */ Y(r, {
157
+ children: se.map((e) => /* @__PURE__ */ Y(r, {
158
158
  to: "/$workspace/projects/$projectId",
159
159
  params: {
160
160
  workspace: s,
161
161
  projectId: u
162
162
  },
163
163
  search: e === "overview" ? {} : { tab: e },
164
- "aria-current": R === e ? "page" : void 0,
164
+ "aria-current": B === e ? "page" : void 0,
165
165
  activeOptions: { exact: !0 },
166
166
  className: "h-7 rounded-full px-3 text-xs leading-7 text-muted-foreground hover:bg-muted hover:text-foreground aria-[current=page]:bg-muted aria-[current=page]:text-foreground",
167
- children: [f(`projectTabs.${e}`), e === "issues" && z.length > 0 && /* @__PURE__ */ J("span", {
167
+ children: [f(`projectTabs.${e}`), e === "issues" && V.length > 0 && /* @__PURE__ */ J("span", {
168
168
  className: "ml-1 tabular-nums",
169
- children: z.length
169
+ children: V.length
170
170
  })]
171
171
  }, e))
172
172
  }),
173
173
  /* @__PURE__ */ Y("div", {
174
174
  className: "flex min-h-0 flex-1 flex-col overflow-y-auto xl:flex-row xl:overflow-hidden",
175
175
  children: [/* @__PURE__ */ Y("div", {
176
- className: R === "issues" ? "w-full min-w-0 pb-16 xl:flex-1 xl:overflow-y-auto" : "w-full min-w-0 px-4 pt-6 pb-16 md:px-8 md:pt-8 xl:flex-1 xl:overflow-y-auto",
176
+ className: B === "issues" ? "w-full min-w-0 pb-16 xl:flex-1 xl:overflow-y-auto" : "w-full min-w-0 px-4 pt-6 pb-16 md:px-8 md:pt-8 xl:flex-1 xl:overflow-y-auto",
177
177
  children: [
178
- R === "overview" && /* @__PURE__ */ Y(q, { children: [
178
+ B === "overview" && /* @__PURE__ */ Y(q, { children: [
179
179
  /* @__PURE__ */ Y("div", {
180
180
  className: "flex items-center gap-3",
181
- children: [/* @__PURE__ */ J(me, {
181
+ children: [/* @__PURE__ */ J(fe, {
182
182
  workspace: s,
183
- icon: g.icon ?? "",
184
- name: g.name,
185
- onChange: (e) => I.mutateAsync({
183
+ icon: _.icon ?? "",
184
+ name: _.name,
185
+ onChange: (e) => R.mutateAsync({
186
186
  icon: e,
187
187
  color: ""
188
188
  }),
189
- disabled: !v,
189
+ disabled: !y,
190
190
  size: 40
191
191
  }), /* @__PURE__ */ J(ke, {
192
- project: g,
193
- canWrite: v,
194
- onSave: (e) => I.mutate({ name: e })
192
+ project: _,
193
+ canWrite: y,
194
+ onSave: (e) => R.mutate({ name: e })
195
195
  })]
196
196
  }),
197
197
  /* @__PURE__ */ J(Ae, {
198
- project: g,
199
- canWrite: v,
200
- onSave: (e) => I.mutate({ summary: e })
198
+ project: _,
199
+ canWrite: y,
200
+ onSave: (e) => R.mutate({ summary: e })
201
201
  }),
202
202
  /* @__PURE__ */ J(je, {
203
203
  workspace: s,
204
- project: g,
205
- canWrite: v,
206
- update: (e) => I.mutate(e)
204
+ project: _,
205
+ canWrite: y,
206
+ update: (e) => R.mutate(e)
207
207
  }),
208
208
  /* @__PURE__ */ J(Ne, {
209
209
  workspace: s,
210
- project: g
210
+ project: _
211
211
  }),
212
212
  /* @__PURE__ */ J("div", {
213
213
  className: "mt-4",
214
- children: /* @__PURE__ */ J(ae, {
214
+ children: /* @__PURE__ */ J(re, {
215
215
  workspace: s,
216
- project: g,
217
- editable: v,
216
+ project: _,
217
+ editable: y,
218
218
  onChange: (e) => {
219
- x.setQueryData(l(s, u).queryKey, c(e)), x.invalidateQueries({ queryKey: d(s).queryKey });
219
+ S.setQueryData(l(s, u).queryKey, c(e)), S.invalidateQueries({ queryKey: d(s).queryKey });
220
220
  }
221
221
  })
222
222
  }),
223
- I.isError && /* @__PURE__ */ J(V, {
223
+ R.isError && /* @__PURE__ */ J(U, {
224
224
  size: "md",
225
225
  className: "mt-2",
226
- children: ee(I.error)
226
+ children: g(R.error)
227
227
  }),
228
228
  /* @__PURE__ */ Y("section", {
229
229
  className: "mt-6",
230
230
  "aria-label": f("progressTitle"),
231
- children: [/* @__PURE__ */ J(O, { progress: de }), N.length > 0 && /* @__PURE__ */ Y("div", {
231
+ children: [/* @__PURE__ */ J(k, { progress: le }), F.length > 0 && /* @__PURE__ */ Y("div", {
232
232
  className: "mt-2 flex items-center gap-2 text-xs text-muted-foreground",
233
- children: [/* @__PURE__ */ J(Ce, {
233
+ children: [/* @__PURE__ */ J(xe, {
234
234
  "aria-label": f("onlyOwnIssues"),
235
235
  size: "sm",
236
- checked: A,
237
- onCheckedChange: (e) => S({
236
+ checked: j,
237
+ onCheckedChange: (e) => C({
238
238
  to: "/$workspace/projects/$projectId",
239
239
  params: {
240
240
  workspace: s,
@@ -254,17 +254,17 @@ function Oe() {
254
254
  }),
255
255
  /* @__PURE__ */ J(Fe, {
256
256
  workspace: s,
257
- projects: N
257
+ projects: F
258
258
  }),
259
- z.length > 0 && /* @__PURE__ */ J("section", {
259
+ V.length > 0 && /* @__PURE__ */ J("section", {
260
260
  className: "mt-8 xl:hidden",
261
261
  "aria-label": f("issueBreakdown.label"),
262
- children: /* @__PURE__ */ J(fe, {
262
+ children: /* @__PURE__ */ J(ue, {
263
263
  workspace: s,
264
- issues: z,
264
+ issues: V,
265
265
  tabs: De,
266
- tab: P,
267
- onTabChange: F
266
+ tab: I,
267
+ onTabChange: L
268
268
  })
269
269
  }),
270
270
  /* @__PURE__ */ Y("section", {
@@ -272,64 +272,64 @@ function Oe() {
272
272
  children: [/* @__PURE__ */ J("h2", {
273
273
  className: "text-base font-semibold",
274
274
  children: p("description")
275
- }), /* @__PURE__ */ J(_e, {
275
+ }), /* @__PURE__ */ J(he, {
276
276
  size: "fill",
277
277
  padding: "sm",
278
278
  className: "mt-2 min-h-16",
279
- children: /* @__PURE__ */ J(oe, {
280
- value: g.description,
281
- editable: v,
279
+ children: /* @__PURE__ */ J(ie, {
280
+ value: _.description,
281
+ editable: y,
282
282
  placeholder: f("addDescription"),
283
283
  label: p("description"),
284
- onBlur: (e) => e !== g.description && I.mutate({ description: e }),
284
+ onBlur: (e) => e !== _.description && R.mutate({ description: e }),
285
285
  className: "min-h-12"
286
- }, g.updatedAt)
286
+ }, _.updatedAt)
287
287
  })]
288
288
  }),
289
289
  /* @__PURE__ */ J(Ie, {
290
290
  workspace: s,
291
- project: g,
292
- canWrite: v
291
+ project: _,
292
+ canWrite: y
293
293
  }),
294
294
  /* @__PURE__ */ J(ze, {
295
295
  workspace: s,
296
- projectId: g.id
296
+ projectId: _.id
297
297
  })
298
298
  ] }),
299
- R === "updates" && /* @__PURE__ */ J(Re, {
299
+ B === "updates" && /* @__PURE__ */ J(Re, {
300
300
  workspace: s,
301
- project: g,
302
- canWrite: v
301
+ project: _,
302
+ canWrite: y
303
303
  }),
304
- R === "issues" && /* @__PURE__ */ J(Le, {
304
+ B === "issues" && /* @__PURE__ */ J(Le, {
305
305
  workspace: s,
306
- project: g,
307
- canWrite: v
306
+ project: _,
307
+ canWrite: y
308
308
  })
309
309
  ]
310
- }), R !== "updates" && z.length > 0 && /* @__PURE__ */ J("aside", {
310
+ }), B !== "updates" && V.length > 0 && /* @__PURE__ */ J("aside", {
311
311
  "aria-label": f("issueBreakdown.label"),
312
312
  className: "hidden w-80 shrink-0 overflow-y-auto border-l border-border px-4 py-6 xl:block",
313
- children: /* @__PURE__ */ J(fe, {
313
+ children: /* @__PURE__ */ J(ue, {
314
314
  workspace: s,
315
- issues: z,
315
+ issues: V,
316
316
  tabs: De,
317
- tab: P,
318
- onTabChange: F
317
+ tab: I,
318
+ onTabChange: L
319
319
  })
320
320
  })]
321
321
  }),
322
- T,
323
- E && /* @__PURE__ */ J(he, {
322
+ E,
323
+ D && /* @__PURE__ */ J(pe, {
324
324
  workspace: s,
325
- project: g,
326
- onClose: () => D(!1)
325
+ project: _,
326
+ onClose: () => O(!1)
327
327
  })
328
328
  ]
329
329
  });
330
330
  }
331
331
  function ke({ project: e, canWrite: t, onSave: n }) {
332
- let r = K("planning"), [i, a] = W(e.name), [o, s] = W(e.name);
332
+ let r = K("planning"), [i, a] = G(e.name), [o, s] = G(e.name);
333
333
  return o !== e.name && (s(e.name), a(e.name)), t ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("h1", {
334
334
  className: "sr-only",
335
335
  children: e.name
@@ -346,7 +346,7 @@ function ke({ project: e, canWrite: t, onSave: n }) {
346
346
  });
347
347
  }
348
348
  function Ae({ project: e, canWrite: t, onSave: n }) {
349
- let r = K("planning"), [i, a] = W(e.summary ?? ""), [o, s] = W(e.summary ?? "");
349
+ let r = K("planning"), [i, a] = G(e.summary ?? ""), [o, s] = G(e.summary ?? "");
350
350
  return o !== (e.summary ?? "") && (s(e.summary ?? ""), a(e.summary ?? "")), t ? /* @__PURE__ */ J("input", {
351
351
  value: i,
352
352
  onChange: (e) => a(e.target.value),
@@ -362,22 +362,22 @@ function Ae({ project: e, canWrite: t, onSave: n }) {
362
362
  }) : null;
363
363
  }
364
364
  function je({ workspace: e, project: t, canWrite: n, update: r }) {
365
- let i = K("planning"), a = E(), { members: o, person: s } = T(e), { data: c = [] } = Z(f(e)), l = w(), [u, d] = W(null), p = t.lead ? s(t.lead) : void 0, m = (e, t, i) => {
365
+ let i = K("planning"), a = D(), { members: o, person: s } = E(e), { data: c = [] } = Z(f(e)), l = T(), [u, d] = G(null), p = t.lead ? s(t.lead) : void 0, m = (e, t, i) => {
366
366
  let o = /* @__PURE__ */ Y(q, { children: [
367
- /* @__PURE__ */ J(_, { className: "size-3.5 text-muted-foreground" }),
367
+ /* @__PURE__ */ J(v, { className: "size-3.5 text-muted-foreground" }),
368
368
  /* @__PURE__ */ J("span", {
369
369
  className: "text-muted-foreground",
370
370
  children: e
371
371
  }),
372
372
  t && a.day(t)
373
373
  ] });
374
- return n ? /* @__PURE__ */ J(ve, {
374
+ return n ? /* @__PURE__ */ J(ge, {
375
375
  value: t ?? "",
376
376
  onValueChange: (e) => r({ [i]: e }),
377
377
  "aria-label": e,
378
378
  trigger: /* @__PURE__ */ J("button", {
379
379
  type: "button",
380
- className: H({ size: "sm" }),
380
+ className: W({ size: "sm" }),
381
381
  children: o
382
382
  })
383
383
  }) : /* @__PURE__ */ J("span", {
@@ -388,23 +388,23 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
388
388
  return /* @__PURE__ */ Y("div", {
389
389
  className: "mt-3 flex flex-wrap items-center gap-1.5",
390
390
  children: [
391
- /* @__PURE__ */ J(Se, {
391
+ /* @__PURE__ */ J(be, {
392
392
  "aria-label": i("statusLabel"),
393
393
  value: t.status,
394
394
  disabled: !n,
395
395
  onValueChange: (e) => e && r({ status: e }),
396
- items: se.map((e) => ({
396
+ items: ae.map((e) => ({
397
397
  value: e,
398
398
  label: i(`status.${e}`),
399
- icon: /* @__PURE__ */ J(k, { status: e })
399
+ icon: /* @__PURE__ */ J(A, { status: e })
400
400
  })),
401
401
  trigger: /* @__PURE__ */ Y("button", {
402
402
  type: "button",
403
- className: H({ size: "sm" }),
404
- children: [/* @__PURE__ */ J(k, { status: t.status }), i(`status.${t.status}`)]
403
+ className: W({ size: "sm" }),
404
+ children: [/* @__PURE__ */ J(A, { status: t.status }), i(`status.${t.status}`)]
405
405
  })
406
406
  }),
407
- /* @__PURE__ */ J(B, {
407
+ /* @__PURE__ */ J(H, {
408
408
  "aria-label": i("lead"),
409
409
  value: t.lead ?? "",
410
410
  disabled: !n,
@@ -415,7 +415,7 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
415
415
  }, ...o.map((e) => ({
416
416
  value: e.user.username,
417
417
  label: e.user.name,
418
- icon: /* @__PURE__ */ J(L, {
418
+ icon: /* @__PURE__ */ J(z, {
419
419
  name: e.user.name,
420
420
  src: e.user.avatarUrl,
421
421
  size: "xs",
@@ -424,8 +424,8 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
424
424
  }))],
425
425
  trigger: /* @__PURE__ */ J("button", {
426
426
  type: "button",
427
- className: H({ size: "sm" }),
428
- children: p ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(L, {
427
+ className: W({ size: "sm" }),
428
+ children: p ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(z, {
429
429
  name: p.name,
430
430
  src: p.avatarUrl,
431
431
  size: "xs",
@@ -436,7 +436,7 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
436
436
  })
437
437
  })
438
438
  }),
439
- /* @__PURE__ */ J(Se, {
439
+ /* @__PURE__ */ J(be, {
440
440
  "aria-label": i("priority"),
441
441
  value: String(t.priority),
442
442
  disabled: !n,
@@ -444,17 +444,17 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
444
444
  items: l.map((e, t) => ({
445
445
  value: String(t),
446
446
  label: e,
447
- icon: /* @__PURE__ */ J(y, { priority: t })
447
+ icon: /* @__PURE__ */ J(b, { priority: t })
448
448
  })),
449
449
  trigger: /* @__PURE__ */ Y("button", {
450
450
  type: "button",
451
- className: H({ size: "sm" }),
452
- children: [/* @__PURE__ */ J(y, { priority: t.priority }), t.priority ? l[t.priority] : i("noPriority")]
451
+ className: W({ size: "sm" }),
452
+ children: [/* @__PURE__ */ J(b, { priority: t.priority }), t.priority ? l[t.priority] : i("noPriority")]
453
453
  })
454
454
  }),
455
455
  m(i("startDate"), t.startDate, "startDate"),
456
456
  m(i("targetDate"), t.targetDate, "targetDate"),
457
- /* @__PURE__ */ J(B, {
457
+ /* @__PURE__ */ J(H, {
458
458
  "aria-label": i("members"),
459
459
  open: u === "members",
460
460
  onOpenChange: (e) => d(e ? "members" : null),
@@ -463,7 +463,7 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
463
463
  items: o.map((e) => ({
464
464
  value: e.user.username,
465
465
  label: e.user.name,
466
- icon: /* @__PURE__ */ J(L, {
466
+ icon: /* @__PURE__ */ J(z, {
467
467
  name: e.user.name,
468
468
  src: e.user.avatarUrl,
469
469
  size: "xs",
@@ -476,26 +476,26 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
476
476
  trigger: /* @__PURE__ */ Y("button", {
477
477
  type: "button",
478
478
  disabled: !n,
479
- className: H({ size: "sm" }),
480
- children: [t.members.length > 0 ? /* @__PURE__ */ J(R, {
479
+ className: W({ size: "sm" }),
480
+ children: [t.members.length > 0 ? /* @__PURE__ */ J(B, {
481
481
  size: "xs",
482
482
  max: 4,
483
483
  showOverflow: !1,
484
484
  children: t.members.map((e) => {
485
485
  let t = s(e);
486
- return /* @__PURE__ */ J(L, {
486
+ return /* @__PURE__ */ J(z, {
487
487
  name: t.name,
488
488
  src: t.avatarUrl,
489
489
  decorative: !0
490
490
  }, e);
491
491
  })
492
- }) : /* @__PURE__ */ J(C, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
492
+ }) : /* @__PURE__ */ J(w, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
493
493
  className: t.members.length ? "" : "text-muted-foreground",
494
494
  children: t.members.length ? i("memberCount", { count: t.members.length }) : i("members")
495
495
  })]
496
496
  })
497
497
  }),
498
- /* @__PURE__ */ J(B, {
498
+ /* @__PURE__ */ J(H, {
499
499
  "aria-label": i("teams"),
500
500
  open: u === "teams",
501
501
  onOpenChange: (e) => d(e ? "teams" : null),
@@ -505,7 +505,7 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
505
505
  value: e.id,
506
506
  label: e.name,
507
507
  hint: e.key,
508
- icon: /* @__PURE__ */ J(ne, {
508
+ icon: /* @__PURE__ */ J(ee, {
509
509
  icon: e.icon,
510
510
  color: e.color,
511
511
  name: e.name
@@ -517,8 +517,8 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
517
517
  trigger: /* @__PURE__ */ Y("button", {
518
518
  type: "button",
519
519
  disabled: !n,
520
- className: H({ size: "sm" }),
521
- children: [/* @__PURE__ */ J(C, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
520
+ className: W({ size: "sm" }),
521
+ children: [/* @__PURE__ */ J(w, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
522
522
  className: t.teamIds.length ? "" : "text-muted-foreground",
523
523
  children: t.teamIds.length ? c.filter((e) => t.teamIds.includes(e.id)).map((e) => e.key).join(", ") : i("teams")
524
524
  })]
@@ -543,7 +543,7 @@ function Me({ workspace: e, project: t, canWrite: n, onChange: r }) {
543
543
  let i = K("planning"), { data: a = [] } = Z(d(e)), o = /* @__PURE__ */ new Set(), s = (e) => {
544
544
  for (let t of a) t.blockedBy.includes(e) && !o.has(t.id) && (o.add(t.id), s(t.id));
545
545
  };
546
- return s(t.id), /* @__PURE__ */ J(B, {
546
+ return s(t.id), /* @__PURE__ */ J(H, {
547
547
  multiple: !0,
548
548
  disabled: !n,
549
549
  items: a.filter((e) => e.id !== t.id && !o.has(e.id) && !e.template).map((e) => ({
@@ -557,8 +557,8 @@ function Me({ workspace: e, project: t, canWrite: n, onChange: r }) {
557
557
  trigger: /* @__PURE__ */ Y("button", {
558
558
  type: "button",
559
559
  disabled: !n,
560
- className: H({ size: "sm" }),
561
- children: [/* @__PURE__ */ J(v, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
560
+ className: W({ size: "sm" }),
561
+ children: [/* @__PURE__ */ J(y, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
562
562
  className: t.blockedBy.length ? "" : "text-muted-foreground",
563
563
  children: t.blockedBy.length ? i("waitsOnCount", { count: t.blockedBy.length }) : i("waitsOn")
564
564
  })]
@@ -566,13 +566,13 @@ function Me({ workspace: e, project: t, canWrite: n, onChange: r }) {
566
566
  });
567
567
  }
568
568
  function Ne({ workspace: e, project: t }) {
569
- let n = K("planning"), i = E(), { data: a = [] } = Z(d(e)), o = (e) => a.filter((t) => e.includes(t.id)), s = o(t.blockedBy), c = o(t.blocks);
569
+ let n = K("planning"), i = D(), { data: a = [] } = Z(d(e)), o = (e) => a.filter((t) => e.includes(t.id)), s = o(t.blockedBy), c = o(t.blocks);
570
570
  if (s.length === 0 && c.length === 0) return null;
571
571
  let l = t.targetDate ? s.filter((e) => e.targetDate && e.targetDate > (t.targetDate ?? "")) : [], u = (t) => /* @__PURE__ */ J(r, {
572
572
  to: "/$workspace/projects/$projectId",
573
573
  params: {
574
574
  workspace: e,
575
- projectId: j(t)
575
+ projectId: M(t)
576
576
  },
577
577
  className: "font-medium hover:underline",
578
578
  children: t.name
@@ -603,8 +603,8 @@ function Ne({ workspace: e, project: t }) {
603
603
  });
604
604
  }
605
605
  function Pe({ workspace: e, project: t, canWrite: n, onChange: r }) {
606
- let i = K("planning"), { data: a = [] } = Z(d(e)), o = new Set(te(a, t.id).map((e) => e.id)), s = a.find((e) => e.id === t.parentId);
607
- return /* @__PURE__ */ J(B, {
606
+ let i = K("planning"), { data: a = [] } = Z(d(e)), o = new Set(N(a, t.id).map((e) => e.id)), s = a.find((e) => e.id === t.parentId);
607
+ return /* @__PURE__ */ J(H, {
608
608
  disabled: !n,
609
609
  items: [{
610
610
  value: "",
@@ -620,8 +620,8 @@ function Pe({ workspace: e, project: t, canWrite: n, onChange: r }) {
620
620
  trigger: /* @__PURE__ */ Y("button", {
621
621
  type: "button",
622
622
  disabled: !n,
623
- className: H({ size: "sm" }),
624
- children: [/* @__PURE__ */ J(b, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
623
+ className: W({ size: "sm" }),
624
+ children: [/* @__PURE__ */ J(x, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
625
625
  className: s ? "" : "text-muted-foreground",
626
626
  children: s ? i("underProject", { name: s.name }) : i("parentProject")
627
627
  })]
@@ -629,7 +629,7 @@ function Pe({ workspace: e, project: t, canWrite: n, onChange: r }) {
629
629
  });
630
630
  }
631
631
  function Fe({ workspace: e, projects: t }) {
632
- let n = K("planning"), i = E(), { person: a } = T(e);
632
+ let n = K("planning"), i = D(), { person: a } = E(e);
633
633
  return t.length === 0 ? null : /* @__PURE__ */ Y("section", {
634
634
  className: "mt-8",
635
635
  children: [/* @__PURE__ */ J("h2", {
@@ -638,25 +638,25 @@ function Fe({ workspace: e, projects: t }) {
638
638
  }), /* @__PURE__ */ J("ul", {
639
639
  className: "mt-2 divide-y divide-border rounded-lg border border-border",
640
640
  children: t.map((t) => {
641
- let o = A(t), s = t.lead ? a(t.lead) : void 0;
641
+ let o = j(t), s = t.lead ? a(t.lead) : void 0;
642
642
  return /* @__PURE__ */ J("li", { children: /* @__PURE__ */ Y(r, {
643
643
  to: "/$workspace/projects/$projectId",
644
644
  params: {
645
645
  workspace: e,
646
- projectId: j(t)
646
+ projectId: M(t)
647
647
  },
648
648
  className: "flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2.5 text-sm hover:bg-muted/60",
649
649
  children: [
650
- /* @__PURE__ */ J(k, { status: t.status }),
650
+ /* @__PURE__ */ J(A, { status: t.status }),
651
651
  /* @__PURE__ */ J("span", {
652
652
  className: "min-w-0 flex-1 truncate font-medium",
653
653
  children: t.name
654
654
  }),
655
655
  /* @__PURE__ */ Y("span", {
656
656
  className: "flex items-center gap-1.5 text-xs text-muted-foreground",
657
- children: [/* @__PURE__ */ J(D, { state: o }), n(`health.${o}`)]
657
+ children: [/* @__PURE__ */ J(O, { state: o }), n(`health.${o}`)]
658
658
  }),
659
- s && /* @__PURE__ */ J(L, {
659
+ s && /* @__PURE__ */ J(z, {
660
660
  name: s.name,
661
661
  src: s.avatarUrl,
662
662
  size: "xs"
@@ -667,7 +667,7 @@ function Fe({ workspace: e, projects: t }) {
667
667
  }),
668
668
  /* @__PURE__ */ J("span", {
669
669
  className: "w-28",
670
- children: /* @__PURE__ */ J(O, {
670
+ children: /* @__PURE__ */ J(k, {
671
671
  progress: t.treeProgress,
672
672
  compact: !0
673
673
  })
@@ -678,71 +678,71 @@ function Fe({ workspace: e, projects: t }) {
678
678
  })]
679
679
  });
680
680
  }
681
- function Ie({ workspace: n, project: r, canWrite: i }) {
682
- let a = K("planning"), o = K("common"), s = G(), c = E(), l = Q(), u = we(), [d, f] = W(!1), [h, g] = W(""), [_, v] = W(""), [y, b] = W(null), x = {
681
+ function Ie({ workspace: n, project: i, canWrite: a }) {
682
+ let o = K("planning"), s = K("common"), c = Te(), l = D(), u = Q(), d = Ce(), [f, h] = G(!1), [_, v] = G(""), [y, b] = G(""), [x, S] = G(null), C = {
683
683
  workspace: n,
684
- projectId: r.id
685
- }, S = () => {
686
- l.invalidateQueries({ queryKey: [
684
+ projectId: i.id
685
+ }, w = () => {
686
+ u.invalidateQueries({ queryKey: [
687
687
  "workspace",
688
688
  n,
689
689
  "projects"
690
- ] }), p(l, n);
691
- }, C = X({
690
+ ] }), p(u, n);
691
+ }, T = X({
692
692
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones", {
693
- params: { path: x },
693
+ params: { path: C },
694
694
  body: {
695
- name: h,
696
- ..._ && { targetDate: _ }
695
+ name: _,
696
+ ...y && { targetDate: y }
697
697
  }
698
698
  })),
699
699
  onSuccess: () => {
700
- g(""), v(""), f(!1);
700
+ v(""), b(""), h(!1);
701
701
  },
702
- onSettled: S
703
- }), w = X({
702
+ onSettled: w
703
+ }), E = X({
704
704
  mutationFn: async ({ id: n, ...r }) => t(await e.PATCH("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones/{milestoneId}", {
705
705
  params: { path: {
706
- ...x,
706
+ ...C,
707
707
  milestoneId: n
708
708
  } },
709
709
  body: r
710
710
  })),
711
- onSettled: S
712
- }), T = X({
711
+ onSettled: w
712
+ }), O = X({
713
713
  mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones/{milestoneId}", { params: { path: {
714
- ...x,
714
+ ...C,
715
715
  milestoneId: n
716
716
  } } })),
717
- onSettled: S
718
- }), D = r.milestones, k = (e, t) => i ? [
717
+ onSettled: w
718
+ }), A = i.milestones, j = (e, t) => a ? [
719
719
  {
720
- label: a("rename"),
721
- onClick: () => b(e.id)
720
+ label: o("rename"),
721
+ onClick: () => S(e.id)
722
722
  },
723
723
  {
724
- label: a("moveUp"),
724
+ label: o("moveUp"),
725
725
  disabled: t === 0,
726
- onClick: () => w.mutate({
726
+ onClick: () => E.mutate({
727
727
  id: e.id,
728
728
  position: t - 1
729
729
  })
730
730
  },
731
731
  {
732
- label: a("moveDown"),
733
- disabled: t === D.length - 1,
734
- onClick: () => w.mutate({
732
+ label: o("moveDown"),
733
+ disabled: t === A.length - 1,
734
+ onClick: () => E.mutate({
735
735
  id: e.id,
736
736
  position: t + 1
737
737
  })
738
738
  },
739
- U,
739
+ Se,
740
740
  {
741
- label: o("delete"),
741
+ label: s("delete"),
742
742
  destructive: !0,
743
- onClick: () => T.mutate(e.id)
743
+ onClick: () => O.mutate(e.id)
744
744
  }
745
- ] : [m(o("copyName"), e.name)], A = C.error ?? w.error ?? T.error;
745
+ ] : [m(s("copyName"), e.name)], N = T.error ?? E.error ?? O.error;
746
746
  return /* @__PURE__ */ Y("section", {
747
747
  className: "mt-10",
748
748
  children: [
@@ -750,16 +750,16 @@ function Ie({ workspace: n, project: r, canWrite: i }) {
750
750
  className: "flex items-center gap-2",
751
751
  children: [/* @__PURE__ */ J("h2", {
752
752
  className: "text-base font-semibold",
753
- children: a("milestones")
754
- }), i && !d && /* @__PURE__ */ Y(z, {
753
+ children: o("milestones")
754
+ }), a && !f && /* @__PURE__ */ Y(V, {
755
755
  type: "button",
756
756
  size: "sm",
757
- onClick: () => f(!0),
757
+ onClick: () => h(!0),
758
758
  className: "ml-auto",
759
- children: [/* @__PURE__ */ J(ee, { className: "size-3.5" }), a("addMilestone")]
759
+ children: [/* @__PURE__ */ J(g, { className: "size-3.5" }), o("addMilestone")]
760
760
  })]
761
761
  }),
762
- /* @__PURE__ */ Y(_e, {
762
+ /* @__PURE__ */ Y(he, {
763
763
  size: "fill",
764
764
  padding: "none",
765
765
  divided: !0,
@@ -767,98 +767,104 @@ function Ie({ workspace: n, project: r, canWrite: i }) {
767
767
  render: /* @__PURE__ */ J("ul", {}),
768
768
  className: "mt-3",
769
769
  children: [
770
- D.map((e, t) => /* @__PURE__ */ Y("li", {
771
- onContextMenu: (n) => u(n, k(e, t)),
770
+ A.map((e, t) => /* @__PURE__ */ Y("li", {
771
+ onContextMenu: (n) => d(n, j(e, t)),
772
772
  className: "flex flex-wrap items-center gap-x-4 gap-y-1 py-2 pr-2 pl-3 md:flex-nowrap",
773
773
  children: [
774
- y === e.id ? /* @__PURE__ */ J(be, {
774
+ x === e.id ? /* @__PURE__ */ J(ve, {
775
775
  autoFocus: !0,
776
776
  defaultValue: e.name,
777
- "aria-label": a("milestoneName"),
777
+ "aria-label": o("milestoneName"),
778
778
  onBlur: (t) => {
779
779
  let n = t.target.value.trim();
780
- n && n !== e.name && w.mutate({
780
+ n && n !== e.name && E.mutate({
781
781
  id: e.id,
782
782
  name: n
783
- }), b(null);
783
+ }), S(null);
784
784
  },
785
785
  onKeyDown: (e) => {
786
- e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && b(null);
786
+ e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && S(null);
787
787
  },
788
788
  size: "sm",
789
789
  className: "min-w-0 flex-1"
790
- }) : /* @__PURE__ */ J("span", {
791
- className: "min-w-0 flex-1 basis-full truncate text-sm font-medium md:basis-auto",
790
+ }) : /* @__PURE__ */ J(r, {
791
+ to: "/$workspace/projects/$projectId/milestones/$milestoneId",
792
+ params: {
793
+ workspace: n,
794
+ projectId: M(i),
795
+ milestoneId: e.id
796
+ },
797
+ className: "min-w-0 flex-1 basis-full truncate rounded-sm text-sm font-medium hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary md:basis-auto",
792
798
  children: e.name
793
799
  }),
794
800
  /* @__PURE__ */ J("span", {
795
801
  className: "w-24 shrink-0 text-xs text-muted-foreground",
796
- children: e.targetDate && c.day(e.targetDate)
802
+ children: e.targetDate && l.day(e.targetDate)
797
803
  }),
798
804
  /* @__PURE__ */ J("span", {
799
805
  className: "w-44 shrink-0",
800
- children: /* @__PURE__ */ J(O, {
806
+ children: /* @__PURE__ */ J(k, {
801
807
  progress: e.progress,
802
808
  compact: !0
803
809
  })
804
810
  }),
805
811
  /* @__PURE__ */ J(Ee, {
806
- items: () => k(e, t),
807
- label: o("moreActionsFor", { name: e.name })
812
+ items: () => j(e, t),
813
+ label: s("moreActionsFor", { name: e.name })
808
814
  })
809
815
  ]
810
816
  }, e.id)),
811
- D.length === 0 && !d && /* @__PURE__ */ J("li", { children: /* @__PURE__ */ J(ye, {
817
+ A.length === 0 && !f && /* @__PURE__ */ J("li", { children: /* @__PURE__ */ J(_e, {
812
818
  variant: "bare",
813
- title: a("noMilestones")
819
+ title: o("noMilestones")
814
820
  }) }),
815
- d && /* @__PURE__ */ J("li", { children: /* @__PURE__ */ Y("form", {
821
+ f && /* @__PURE__ */ J("li", { children: /* @__PURE__ */ Y("form", {
816
822
  className: "flex flex-wrap items-center gap-2 px-3 py-2",
817
823
  onSubmit: (e) => {
818
- e.preventDefault(), h.trim() && C.mutate();
824
+ e.preventDefault(), _.trim() && T.mutate();
819
825
  },
820
826
  children: [
821
- /* @__PURE__ */ J(be, {
827
+ /* @__PURE__ */ J(ve, {
822
828
  autoFocus: !0,
823
- value: h,
824
- onChange: (e) => g(e.target.value),
825
- placeholder: a("milestoneName"),
826
- "aria-label": a("milestoneName"),
829
+ value: _,
830
+ onChange: (e) => v(e.target.value),
831
+ placeholder: o("milestoneName"),
832
+ "aria-label": o("milestoneName"),
827
833
  className: "min-w-0 flex-1"
828
834
  }),
829
- /* @__PURE__ */ J(ve, {
830
- value: _,
831
- onValueChange: v,
832
- "aria-label": a("targetDate"),
835
+ /* @__PURE__ */ J(ge, {
836
+ value: y,
837
+ onValueChange: b,
838
+ "aria-label": o("targetDate"),
833
839
  className: "w-auto"
834
840
  }),
835
- /* @__PURE__ */ J(z, {
841
+ /* @__PURE__ */ J(V, {
836
842
  type: "submit",
837
843
  variant: "primary",
838
- disabled: !h.trim(),
839
- loading: C.isPending,
840
- children: a("addMilestone")
844
+ disabled: !_.trim(),
845
+ loading: T.isPending,
846
+ children: o("addMilestone")
841
847
  }),
842
- /* @__PURE__ */ J(z, {
848
+ /* @__PURE__ */ J(V, {
843
849
  type: "button",
844
850
  variant: "ghost",
845
- onClick: () => f(!1),
846
- children: o("cancel")
851
+ onClick: () => h(!1),
852
+ children: s("cancel")
847
853
  })
848
854
  ]
849
855
  }) })
850
856
  ]
851
857
  }),
852
- A && /* @__PURE__ */ J(V, {
858
+ N && /* @__PURE__ */ J(U, {
853
859
  size: "md",
854
860
  className: "mt-2",
855
- children: s(A)
861
+ children: c(N)
856
862
  })
857
863
  ]
858
864
  });
859
865
  }
860
866
  function Le({ workspace: n, project: r, canWrite: i }) {
861
- let o = K("planning"), s = G(), c = Q(), l = !!M.useSearch().own, { data: u } = $(a(n, ce(r.id, l))), d = F(n, (e) => e.project?.id !== r.id), f = u.issues, m = X({
867
+ let o = K("planning"), s = Te(), c = Q(), l = !!P.useSearch().own, { data: u } = $(a(n, oe(r.id, l))), d = L(n, (e) => e.project?.id !== r.id), f = u.issues, m = X({
862
868
  mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}", {
863
869
  params: { path: {
864
870
  workspace: n,
@@ -873,29 +879,29 @@ function Le({ workspace: n, project: r, canWrite: i }) {
873
879
  children: [
874
880
  i && /* @__PURE__ */ J("div", {
875
881
  className: "flex min-h-11 items-center justify-end border-b border-border px-4 py-2 md:px-5",
876
- children: /* @__PURE__ */ J(B, {
882
+ children: /* @__PURE__ */ J(H, {
877
883
  "aria-label": o("addIssues"),
878
884
  align: "end",
879
885
  ...d,
880
886
  value: null,
881
887
  onValueChange: (e) => e !== null && m.mutate(e),
882
888
  placeholder: o("findIssue"),
883
- trigger: /* @__PURE__ */ Y(z, {
889
+ trigger: /* @__PURE__ */ Y(V, {
884
890
  type: "button",
885
891
  size: "sm",
886
- children: [/* @__PURE__ */ J(ee, { className: "size-3.5" }), o("addIssues")]
892
+ children: [/* @__PURE__ */ J(g, { className: "size-3.5" }), o("addIssues")]
887
893
  })
888
894
  })
889
895
  }),
890
- m.isError && /* @__PURE__ */ J(V, {
896
+ m.isError && /* @__PURE__ */ J(U, {
891
897
  size: "md",
892
898
  className: "px-4 pt-2 md:px-5",
893
899
  children: s(m.error)
894
900
  }),
895
- f.length === 0 ? /* @__PURE__ */ J(ye, {
901
+ f.length === 0 ? /* @__PURE__ */ J(_e, {
896
902
  title: o("noIssuesInProject"),
897
903
  className: "mt-6"
898
- }) : /* @__PURE__ */ J(I, {
904
+ }) : /* @__PURE__ */ J(R, {
899
905
  workspace: n,
900
906
  issues: f
901
907
  })
@@ -931,9 +937,9 @@ function Re({ workspace: n, project: r, canWrite: i }) {
931
937
  "projects"
932
938
  ] })
933
939
  });
934
- return /* @__PURE__ */ J(ge, {
940
+ return /* @__PURE__ */ J(me, {
935
941
  workspace: n,
936
- state: A(r),
942
+ state: j(r),
937
943
  health: r.health,
938
944
  updates: s,
939
945
  canWrite: i,
@@ -943,7 +949,7 @@ function Re({ workspace: n, project: r, canWrite: i }) {
943
949
  });
944
950
  }
945
951
  function ze({ workspace: e, projectId: t }) {
946
- let n = K("planning.activity"), r = K("planning"), i = K("planning.health"), a = E(), o = w(), { data: c = [] } = Z(s(e, t)), { actorName: l, person: u } = T(e);
952
+ let n = K("planning.activity"), r = K("planning"), i = K("planning.health"), a = D(), o = T(), { data: c = [] } = Z(s(e, t)), { actorName: l, person: u } = E(e);
947
953
  if (c.length === 0) return null;
948
954
  let d = (e) => {
949
955
  let t = {
@@ -952,7 +958,7 @@ function ze({ workspace: e, projectId: t }) {
952
958
  className: "font-medium text-foreground",
953
959
  children: e
954
960
  })
955
- }, s = e.data, c = P(e.type, e.data);
961
+ }, s = e.data, c = I(e.type, e.data);
956
962
  switch (e.type) {
957
963
  case "project.created": return [{
958
964
  icon: c,
@@ -998,40 +1004,40 @@ function ze({ workspace: e, projectId: t }) {
998
1004
  }];
999
1005
  let f = [], p = (e) => e ? a.day(String(e)) : "";
1000
1006
  return d.name && f.push({
1001
- icon: /* @__PURE__ */ J(S, {}),
1007
+ icon: /* @__PURE__ */ J(C, {}),
1002
1008
  text: n.rich("renamed", {
1003
1009
  ...t,
1004
1010
  from: String(d.name.from)
1005
1011
  })
1006
1012
  }), d.status && f.push({
1007
- icon: /* @__PURE__ */ J(k, { status: d.status.to }),
1013
+ icon: /* @__PURE__ */ J(A, { status: d.status.to }),
1008
1014
  text: n.rich("status", {
1009
1015
  ...t,
1010
1016
  status: r(`status.${d.status.to}`)
1011
1017
  })
1012
1018
  }), d.priority && f.push({
1013
- icon: /* @__PURE__ */ J(y, { priority: Number(d.priority.to) }),
1019
+ icon: /* @__PURE__ */ J(b, { priority: Number(d.priority.to) }),
1014
1020
  text: n.rich("priority", {
1015
1021
  ...t,
1016
1022
  priority: o[Number(d.priority.to)] ?? ""
1017
1023
  })
1018
1024
  }), d.lead && f.push(d.lead.to ? {
1019
- icon: /* @__PURE__ */ J(g, {}),
1025
+ icon: /* @__PURE__ */ J(_, {}),
1020
1026
  text: n.rich("lead", {
1021
1027
  ...t,
1022
1028
  lead: u(String(d.lead.to)).name
1023
1029
  })
1024
1030
  } : {
1025
- icon: /* @__PURE__ */ J(x, {}),
1031
+ icon: /* @__PURE__ */ J(S, {}),
1026
1032
  text: n.rich("leadRemoved", t)
1027
1033
  }), d.startDate && f.push({
1028
- icon: /* @__PURE__ */ J(_, {}),
1034
+ icon: /* @__PURE__ */ J(v, {}),
1029
1035
  text: d.startDate.to ? n.rich("startDate", {
1030
1036
  ...t,
1031
1037
  date: p(d.startDate.to)
1032
1038
  }) : n.rich("startDateRemoved", t)
1033
1039
  }), d.targetDate && f.push({
1034
- icon: /* @__PURE__ */ J(_, {}),
1040
+ icon: /* @__PURE__ */ J(v, {}),
1035
1041
  text: d.targetDate.to ? n.rich("targetDate", {
1036
1042
  ...t,
1037
1043
  date: p(d.targetDate.to)
@@ -1047,9 +1053,9 @@ function ze({ workspace: e, projectId: t }) {
1047
1053
  children: [/* @__PURE__ */ J("h2", {
1048
1054
  className: "text-base font-semibold",
1049
1055
  children: n("title")
1050
- }), /* @__PURE__ */ J(N, {
1056
+ }), /* @__PURE__ */ J(F, {
1051
1057
  className: "mt-3",
1052
- children: [...c].reverse().flatMap((t) => d(t).map(({ icon: n, text: r }, i) => /* @__PURE__ */ J(de, {
1058
+ children: [...c].reverse().flatMap((t) => d(t).map(({ icon: n, text: r }, i) => /* @__PURE__ */ J(le, {
1053
1059
  workspace: e,
1054
1060
  icon: n,
1055
1061
  actor: t.actor,