@burdenoff/microfe-workspaces 2026.531.2 → 2026.531.4

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.
Files changed (44) hide show
  1. package/dist/WorkspacesRoutes.js +36 -17
  2. package/dist/WorkspacesRoutes.js.map +1 -1
  3. package/dist/components/InviteMemberDialog.js +204 -117
  4. package/dist/components/InviteMemberDialog.js.map +1 -1
  5. package/dist/components/MemberListItem.js +2 -1
  6. package/dist/components/MemberListItem.js.map +1 -1
  7. package/dist/components/ProjectMemberPickerDialog.js +211 -0
  8. package/dist/components/ProjectMemberPickerDialog.js.map +1 -0
  9. package/dist/hooks/index.js +1 -1
  10. package/dist/hooks/useMemberMutations.js +13 -13
  11. package/dist/hooks/useMemberMutations.js.map +1 -1
  12. package/dist/hooks/useProjectMemberMutations.js +104 -0
  13. package/dist/hooks/useProjectMemberMutations.js.map +1 -0
  14. package/dist/hooks/useProjectMembers.js +42 -0
  15. package/dist/hooks/useProjectMembers.js.map +1 -0
  16. package/dist/hooks/useWorkspaceMembers.js +60 -24
  17. package/dist/hooks/useWorkspaceMembers.js.map +1 -1
  18. package/dist/hooks/useWorkspacePermissions.js +4 -0
  19. package/dist/hooks/useWorkspacePermissions.js.map +1 -1
  20. package/dist/hooks/useWorkspacesEventEmitter.js.map +1 -1
  21. package/dist/index.js +16 -15
  22. package/dist/pages/ActivityListPage.js +5 -5
  23. package/dist/pages/InviteAcceptancePage.js +211 -207
  24. package/dist/pages/InviteAcceptancePage.js.map +1 -1
  25. package/dist/pages/MembersListPage.js +210 -208
  26. package/dist/pages/MembersListPage.js.map +1 -1
  27. package/dist/pages/PendingInvitesPage.js +124 -120
  28. package/dist/pages/PendingInvitesPage.js.map +1 -1
  29. package/dist/pages/ProjectDetailPage.js +249 -213
  30. package/dist/pages/ProjectDetailPage.js.map +1 -1
  31. package/dist/pages/ProjectMembersPage.js +265 -0
  32. package/dist/pages/ProjectMembersPage.js.map +1 -0
  33. package/dist/pages/ProjectsListPage.js +9 -9
  34. package/dist/pages/WorkspaceDetailPage.js +119 -111
  35. package/dist/pages/WorkspaceDetailPage.js.map +1 -1
  36. package/dist/pages/WorkspaceInvitePage.js +790 -0
  37. package/dist/pages/WorkspaceInvitePage.js.map +1 -0
  38. package/dist/pages/WorkspacesListPage.js +115 -100
  39. package/dist/pages/WorkspacesListPage.js.map +1 -1
  40. package/dist/utils/invitationDisplay.js +25 -0
  41. package/dist/utils/invitationDisplay.js.map +1 -0
  42. package/dist/utils/workspaceBulkInviteCsv.js +42 -0
  43. package/dist/utils/workspaceBulkInviteCsv.js.map +1 -0
  44. package/package.json +1 -1
@@ -4,388 +4,424 @@ import { useScopedNavigation as n } from "../hooks/useScopedNavigation.js";
4
4
  import { tWithFallback as r } from "../utils/i18n.js";
5
5
  import { useWorkspacesPageView as ee } from "../hooks/useWorkspacesPageView.js";
6
6
  import { nativeImpact as te, nativeNotify as i } from "../utils/nativeBridge.js";
7
- import { useProject as ne, useProjectMembersCount as re } from "../hooks/useProjects.js";
8
- import { useArchiveProject as a, useDeleteProject as o, useTagProject as s, useUnarchiveProject as c, useUntagProject as ie, useUpdateProject as ae } from "../hooks/useProjectMutations.js";
9
- import { formatDate as l } from "../utils/formatters.js";
10
- import { getProjectDisplayTags as u, toProjectTag as d } from "../utils/projectTags.js";
11
- import { useWorkspaceActivity as oe } from "../hooks/useWorkspaceActivity.js";
12
- import { useWorkspacePermissions as se } from "../hooks/useWorkspacePermissions.js";
13
- import { ProjectTagsWidget as ce } from "../components/tags/ProjectTagsWidget.js";
14
- import { useEffect as le, useMemo as f, useState as p } from "react";
15
- import { Activity as m, Archive as h, ArrowLeft as g, Clock as _, FolderKanban as v, MoreVertical as ue, Users as y } from "lucide-react";
16
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
17
- import { AlertDialog as de, AlertDialogAction as fe, AlertDialogCancel as pe, AlertDialogContent as me, AlertDialogDescription as he, AlertDialogFooter as ge, AlertDialogHeader as _e, AlertDialogTitle as ve, Badge as S, Button as C, Card as w, CardContent as T, CardHeader as E, CardTitle as D, DropdownMenu as O, DropdownMenuContent as k, DropdownMenuItem as A, DropdownMenuSeparator as j, DropdownMenuTrigger as M, Skeleton as N } from "@burdenoff/fe-libs/ui";
18
- import { useNavigate as P, useParams as F } from "react-router-dom";
19
- import { useI18n as ye } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
+ import { useWorkspacePermissions as ne } from "../hooks/useWorkspacePermissions.js";
8
+ import { useProject as re, useProjectMembersCount as ie } from "../hooks/useProjects.js";
9
+ import { useArchiveProject as ae, useDeleteProject as oe, useTagProject as se, useUnarchiveProject as ce, useUntagProject as le, useUpdateProject as ue } from "../hooks/useProjectMutations.js";
10
+ import { formatDate as a } from "../utils/formatters.js";
11
+ import { getProjectDisplayTags as de, toProjectTag as o } from "../utils/projectTags.js";
12
+ import { useWorkspaceActivity as s } from "../hooks/useWorkspaceActivity.js";
13
+ import { ProjectTagsWidget as c } from "../components/tags/ProjectTagsWidget.js";
14
+ import { ProjectMemberPickerDialog as l } from "../components/ProjectMemberPickerDialog.js";
15
+ import { useMemo as u, useState as d } from "react";
16
+ import { Activity as f, Archive as p, ArrowLeft as m, Clock as h, FolderKanban as g, MoreVertical as fe, UserPlus as pe, Users as _ } from "lucide-react";
17
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
18
+ import { AlertDialog as me, AlertDialogAction as he, AlertDialogCancel as ge, AlertDialogContent as _e, AlertDialogDescription as ve, AlertDialogFooter as ye, AlertDialogHeader as be, AlertDialogTitle as xe, Badge as b, Button as x, Card as S, CardContent as C, CardHeader as w, CardTitle as T, DropdownMenu as E, DropdownMenuContent as D, DropdownMenuItem as O, DropdownMenuSeparator as k, DropdownMenuTrigger as A, Skeleton as j } from "@burdenoff/fe-libs/ui";
19
+ import { useNavigate as M, useParams as Se } from "react-router-dom";
20
+ import { useI18n as Ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
20
21
  //#region src/pages/ProjectDetailPage.tsx
21
- function I() {
22
- let { t: I } = ye(), { workspaceId: L, projectId: R } = F();
22
+ function N() {
23
+ let { t: N } = Ce(), { workspaceId: P, projectId: F } = Se();
23
24
  ee("workspaces.project-detail", {
24
- workspaceId: L,
25
- projectId: R,
25
+ workspaceId: P,
26
+ projectId: F,
26
27
  requireParams: !0
27
28
  });
28
- let z = P(), { basePath: B = "/workspaces" } = e(), { withCurrentSearch: V } = n(), { data: H, isLoading: be, error: xe } = ne(R || "", L), [Se, U] = p(!1), [W, G] = p(() => u(H)), { mutate: Ce, isPending: K } = a(L), { mutate: we, isPending: q } = c(L), { mutate: Te, isPending: J } = o(L), { mutateAsync: Ee, isPending: De } = s(L), { mutateAsync: Oe, isPending: ke } = ie(L), { mutateAsync: Ae, isPending: je } = ae(L), { data: Me } = re(R || "", L), Y = f(() => u({
29
- tags: H?.tags ?? [],
30
- tagAssignments: H?.tagAssignments
31
- }), [H?.tags, H?.tagAssignments]), { data: Ne } = oe(L), Pe = (Ne ?? []).filter((e) => e.resourceId === R || e.resourceType?.toLowerCase() === "project").length, { canViewProject: Fe, canDeleteProject: X, canArchiveProject: Z, isLoading: Ie } = se();
32
- le(() => {
33
- G(Y);
34
- }, [Y]);
35
- let Le = f(() => W, [W]);
36
- if (Ie) return /* @__PURE__ */ x("div", {
29
+ let I = M(), { basePath: L = "/workspaces" } = e(), { withCurrentSearch: R } = n(), { data: z, isLoading: we, error: Te } = re(F || "", P), [Ee, B] = d(!1), [V, H] = d(!1), { mutate: De, isPending: U } = ae(P), { mutate: Oe, isPending: W } = ce(P), { mutate: ke, isPending: G } = oe(P), { mutateAsync: Ae, isPending: je } = se(P), { mutateAsync: Me, isPending: Ne } = le(P), { mutateAsync: Pe, isPending: Fe } = ue(P), { canViewProject: Ie, canDeleteProject: K, canArchiveProject: q, canListProjectMembers: J, canAddProjectMember: Y, isLoading: Le } = ne(), { data: Re } = ie(F || "", P), X = u(() => de({
30
+ tags: z?.tags ?? [],
31
+ tagAssignments: z?.tagAssignments
32
+ }), [z?.tags, z?.tagAssignments]), { data: ze } = s(P), Be = (ze ?? []).filter((e) => e.resourceId === F || e.resourceType?.toLowerCase() === "project").length, Ve = X;
33
+ if (Le) return /* @__PURE__ */ y("div", {
37
34
  className: "space-y-4 p-6",
38
- children: [/* @__PURE__ */ b(N, { className: "h-10 w-1/3" }), /* @__PURE__ */ b(N, { className: "h-64" })]
35
+ children: [/* @__PURE__ */ v(j, { className: "h-10 w-1/3" }), /* @__PURE__ */ v(j, { className: "h-64" })]
39
36
  });
40
- if (!Fe) return /* @__PURE__ */ b("div", {
37
+ if (!Ie) return /* @__PURE__ */ v("div", {
41
38
  className: "flex items-center justify-center min-h-[400px]",
42
- children: /* @__PURE__ */ x("div", {
39
+ children: /* @__PURE__ */ y("div", {
43
40
  className: "text-center space-y-2",
44
- children: [/* @__PURE__ */ b("h2", {
41
+ children: [/* @__PURE__ */ v("h2", {
45
42
  className: "text-lg font-semibold",
46
- children: r(I, "projectDetail.accessDenied", "Access Denied")
47
- }), /* @__PURE__ */ b("p", {
43
+ children: r(N, "projectDetail.accessDenied", "Access Denied")
44
+ }), /* @__PURE__ */ v("p", {
48
45
  className: "text-sm text-muted-foreground",
49
- children: r(I, "projectDetail.noPermissionToViewProject", "You don't have permission to view this project.")
46
+ children: r(N, "projectDetail.noPermissionToViewProject", "You don't have permission to view this project.")
50
47
  })]
51
48
  })
52
49
  });
53
- let Q = () => {
54
- z(V(`${B}/${L}/projects`));
55
- }, Re = () => {
56
- H && (H.archived ? we(H.id, { onError: (e) => {
50
+ let Z = () => {
51
+ I(R(`${L}/${P}/projects`));
52
+ }, He = () => {
53
+ z && (z.archived ? Oe(z.id, { onError: (e) => {
57
54
  console.error("Failed to unarchive project:", e);
58
- } }) : Ce(H.id, { onError: (e) => {
55
+ } }) : De(z.id, { onError: (e) => {
59
56
  console.error("Failed to archive project:", e);
60
57
  } }));
61
- }, ze = () => {
62
- H && (te("medium"), Te(H.id, {
58
+ }, Ue = () => {
59
+ z && (te("medium"), ke(z.id, {
63
60
  onSuccess: () => {
64
- i("success"), U(!1), z(V(`${B}/${L}/projects`));
61
+ i("success"), B(!1), I(R(`${L}/${P}/projects`));
65
62
  },
66
63
  onError: (e) => {
67
64
  i("error"), console.error("Failed to delete project:", e);
68
65
  }
69
66
  }));
67
+ }, Q = () => {
68
+ I(R(`${L}/${P}/projects/${F}/members`));
70
69
  }, $ = async (e) => {
71
- if (!H) return;
72
- let t = e.map((e) => d(e));
70
+ if (!z) return;
71
+ let t = e.map((e) => o(e));
73
72
  try {
74
- await Ae({
75
- id: H.id,
73
+ await Pe({
74
+ id: z.id,
76
75
  input: { tags: t }
77
76
  });
78
77
  } catch (e) {
79
78
  i("warning"), console.error("Failed to sync legacy project tag mirror after updating structured project tags:", e);
80
79
  }
81
80
  };
82
- return be ? /* @__PURE__ */ x("div", {
81
+ return we ? /* @__PURE__ */ y("div", {
83
82
  className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
84
83
  children: [
85
- /* @__PURE__ */ b(N, { className: "h-10 w-32" }),
86
- /* @__PURE__ */ b(N, { className: "h-10 w-1/3" }),
87
- /* @__PURE__ */ x("div", {
84
+ /* @__PURE__ */ v(j, { className: "h-10 w-32" }),
85
+ /* @__PURE__ */ v(j, { className: "h-10 w-1/3" }),
86
+ /* @__PURE__ */ y("div", {
88
87
  className: "grid grid-cols-1 md:grid-cols-3 gap-4",
89
88
  children: [
90
- /* @__PURE__ */ b(N, { className: "h-32" }),
91
- /* @__PURE__ */ b(N, { className: "h-32" }),
92
- /* @__PURE__ */ b(N, { className: "h-32" })
89
+ /* @__PURE__ */ v(j, { className: "h-32" }),
90
+ /* @__PURE__ */ v(j, { className: "h-32" }),
91
+ /* @__PURE__ */ v(j, { className: "h-32" })
93
92
  ]
94
93
  }),
95
- /* @__PURE__ */ b(N, { className: "h-48" })
94
+ /* @__PURE__ */ v(j, { className: "h-48" })
96
95
  ]
97
- }) : xe || !H ? /* @__PURE__ */ x("div", {
96
+ }) : Te || !z ? /* @__PURE__ */ y("div", {
98
97
  className: "space-y-4 p-6",
99
- children: [/* @__PURE__ */ x(C, {
98
+ children: [/* @__PURE__ */ y(x, {
100
99
  variant: "ghost",
101
- onClick: Q,
100
+ onClick: Z,
102
101
  className: "gap-2",
103
- children: [/* @__PURE__ */ b(g, { size: 20 }), r(I, "projectDetail.backToProjects", "Back to Projects")]
104
- }), /* @__PURE__ */ x("div", {
102
+ children: [/* @__PURE__ */ v(m, { size: 20 }), r(N, "projectDetail.backToProjects", "Back to Projects")]
103
+ }), /* @__PURE__ */ y("div", {
105
104
  className: "text-center py-12",
106
105
  children: [
107
- /* @__PURE__ */ b("div", {
106
+ /* @__PURE__ */ v("div", {
108
107
  className: "rounded-full bg-muted p-6 mb-4 inline-block",
109
- children: /* @__PURE__ */ b(v, {
108
+ children: /* @__PURE__ */ v(g, {
110
109
  size: 48,
111
110
  className: "text-muted-foreground"
112
111
  })
113
112
  }),
114
- /* @__PURE__ */ b("h3", {
113
+ /* @__PURE__ */ v("h3", {
115
114
  className: "text-lg font-semibold mb-2",
116
- children: r(I, "projectDetail.projectNotFound", "Project not found")
115
+ children: r(N, "projectDetail.projectNotFound", "Project not found")
117
116
  }),
118
- /* @__PURE__ */ b("p", {
117
+ /* @__PURE__ */ v("p", {
119
118
  className: "text-muted-foreground max-w-sm mx-auto mb-4",
120
- children: r(I, "projectDetail.projectNotFoundDescription", "The project you're looking for doesn't exist or you don't have permission to view it.")
119
+ children: r(N, "projectDetail.projectNotFoundDescription", "The project you're looking for doesn't exist or you don't have permission to view it.")
121
120
  }),
122
- /* @__PURE__ */ x(C, {
123
- onClick: Q,
124
- children: [/* @__PURE__ */ b(g, {
121
+ /* @__PURE__ */ y(x, {
122
+ onClick: Z,
123
+ children: [/* @__PURE__ */ v(m, {
125
124
  size: 16,
126
125
  className: "mr-2"
127
- }), r(I, "projectDetail.backToProjects", "Back to Projects")]
126
+ }), r(N, "projectDetail.backToProjects", "Back to Projects")]
128
127
  })
129
128
  ]
130
129
  })]
131
- }) : /* @__PURE__ */ x("div", {
130
+ }) : /* @__PURE__ */ y("div", {
132
131
  className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
133
132
  children: [
134
- /* @__PURE__ */ x("div", {
133
+ /* @__PURE__ */ y("div", {
135
134
  className: "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3",
136
- children: [/* @__PURE__ */ x("div", { children: [
137
- /* @__PURE__ */ x(C, {
135
+ children: [/* @__PURE__ */ y("div", { children: [
136
+ /* @__PURE__ */ y(x, {
138
137
  variant: "ghost",
139
- onClick: Q,
138
+ onClick: Z,
140
139
  className: "gap-2 mb-2 -ml-2",
141
- children: [/* @__PURE__ */ b(g, { size: 20 }), r(I, "projectDetail.backToProjects", "Back to Projects")]
140
+ children: [/* @__PURE__ */ v(m, { size: 20 }), r(N, "projectDetail.backToProjects", "Back to Projects")]
142
141
  }),
143
- /* @__PURE__ */ x("div", {
142
+ /* @__PURE__ */ y("div", {
144
143
  className: "flex items-center gap-3",
145
- children: [/* @__PURE__ */ b("div", {
144
+ children: [/* @__PURE__ */ v("div", {
146
145
  className: "p-3 rounded-lg bg-primary/10",
147
- children: /* @__PURE__ */ b(v, {
146
+ children: /* @__PURE__ */ v(g, {
148
147
  className: "text-primary",
149
148
  size: 28
150
149
  })
151
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h1", {
150
+ }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h1", {
152
151
  className: "text-2xl sm:text-3xl font-bold",
153
- children: H.name
154
- }), /* @__PURE__ */ b("p", {
152
+ children: z.name
153
+ }), /* @__PURE__ */ v("p", {
155
154
  className: "text-sm text-muted-foreground font-mono",
156
- children: H.key
155
+ children: z.key
157
156
  })] })]
158
157
  }),
159
- /* @__PURE__ */ x("div", {
158
+ /* @__PURE__ */ y("div", {
160
159
  className: "flex items-center gap-2 mt-3",
161
- children: [/* @__PURE__ */ b(S, {
162
- className: `border ${t(H.status)}`,
163
- children: H.status
164
- }), H.archived && /* @__PURE__ */ x(S, {
160
+ children: [/* @__PURE__ */ v(b, {
161
+ className: `border ${t(z.status)}`,
162
+ children: z.status
163
+ }), z.archived && /* @__PURE__ */ y(b, {
165
164
  variant: "outline",
166
165
  className: "border-workspace-archived-border text-workspace-archived-text",
167
- children: [/* @__PURE__ */ b(h, {
166
+ children: [/* @__PURE__ */ v(p, {
168
167
  size: 12,
169
168
  className: "mr-1"
170
- }), r(I, "projectDetail.archived", "Archived")]
169
+ }), r(N, "projectDetail.archived", "Archived")]
171
170
  })]
172
171
  })
173
- ] }), /* @__PURE__ */ b("div", {
172
+ ] }), /* @__PURE__ */ v("div", {
174
173
  className: "flex items-center gap-2",
175
- children: /* @__PURE__ */ x(O, { children: [/* @__PURE__ */ b(M, {
174
+ children: /* @__PURE__ */ y(E, { children: [/* @__PURE__ */ v(A, {
176
175
  asChild: !0,
177
- children: /* @__PURE__ */ b(C, {
176
+ children: /* @__PURE__ */ v(x, {
178
177
  variant: "outline",
179
178
  size: "icon",
180
- "aria-label": r(I, "projectDetail.openProjectActionsAriaLabel", "Open project actions"),
181
- children: /* @__PURE__ */ b(ue, { size: 20 })
179
+ "aria-label": r(N, "projectDetail.openProjectActionsAriaLabel", "Open project actions"),
180
+ children: /* @__PURE__ */ v(fe, { size: 20 })
182
181
  })
183
- }), /* @__PURE__ */ x(k, {
182
+ }), /* @__PURE__ */ y(D, {
184
183
  align: "end",
185
184
  children: [
186
- Z && /* @__PURE__ */ x(A, {
187
- onClick: Re,
188
- disabled: K || q,
189
- children: [/* @__PURE__ */ b(h, {
185
+ q && /* @__PURE__ */ y(O, {
186
+ onClick: He,
187
+ disabled: U || W,
188
+ children: [/* @__PURE__ */ v(p, {
190
189
  size: 16,
191
190
  className: "mr-2"
192
- }), K || q ? r(I, "projectDetail.processing", "Processing...") : H.archived ? r(I, "projectDetail.unarchive", "Unarchive") : r(I, "projectDetail.archive", "Archive")]
191
+ }), U || W ? r(N, "projectDetail.processing", "Processing...") : z.archived ? r(N, "projectDetail.unarchive", "Unarchive") : r(N, "projectDetail.archive", "Archive")]
193
192
  }),
194
- Z && X && /* @__PURE__ */ b(j, {}),
195
- X && /* @__PURE__ */ b(A, {
196
- onClick: () => U(!0),
193
+ q && K && /* @__PURE__ */ v(k, {}),
194
+ K && /* @__PURE__ */ v(O, {
195
+ onClick: () => B(!0),
197
196
  className: "text-destructive",
198
- children: r(I, "projectDetail.deleteProject", "Delete Project")
197
+ children: r(N, "projectDetail.deleteProject", "Delete Project")
199
198
  })
200
199
  ]
201
200
  })] })
202
201
  })]
203
202
  }),
204
- /* @__PURE__ */ x("div", {
203
+ /* @__PURE__ */ y("div", {
205
204
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
206
- children: [/* @__PURE__ */ x(w, { children: [/* @__PURE__ */ b(E, {
205
+ children: [/* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, {
207
206
  className: "flex flex-row items-center justify-between pb-2",
208
- children: /* @__PURE__ */ x(D, {
207
+ children: /* @__PURE__ */ y(T, {
209
208
  className: "flex items-center gap-2 text-base",
210
- children: [/* @__PURE__ */ b(y, {
209
+ children: [/* @__PURE__ */ v(_, {
211
210
  size: 20,
212
211
  className: "text-muted-foreground"
213
- }), r(I, "projectDetail.membersCardTitle", "Members")]
212
+ }), r(N, "projectDetail.membersCardTitle", "Members")]
214
213
  })
215
- }), /* @__PURE__ */ x(T, { children: [/* @__PURE__ */ b("p", {
216
- className: "text-3xl font-bold",
217
- children: Me ?? 0
218
- }), /* @__PURE__ */ b("p", {
219
- className: "text-sm text-muted-foreground",
220
- children: r(I, "projectDetail.projectMembers", "Project members")
221
- })] })] }), /* @__PURE__ */ x(w, { children: [/* @__PURE__ */ b(E, {
214
+ }), /* @__PURE__ */ y(C, {
215
+ className: "space-y-4",
216
+ children: [
217
+ /* @__PURE__ */ v("p", {
218
+ className: "text-3xl font-bold",
219
+ children: Re ?? 0
220
+ }),
221
+ /* @__PURE__ */ v("p", {
222
+ className: "text-sm text-muted-foreground",
223
+ children: r(N, "projectDetail.projectMembers", "Project members")
224
+ }),
225
+ Y || J ? /* @__PURE__ */ y("div", {
226
+ className: "flex flex-wrap gap-2",
227
+ children: [Y ? /* @__PURE__ */ y(x, {
228
+ size: "sm",
229
+ onClick: () => H(!0),
230
+ children: [/* @__PURE__ */ v(pe, {
231
+ size: 16,
232
+ className: "mr-2"
233
+ }), r(N, "projectDetail.addProjectMember", "Add Member")]
234
+ }) : null, J ? /* @__PURE__ */ y(x, {
235
+ variant: "outline",
236
+ size: "sm",
237
+ onClick: Q,
238
+ children: [/* @__PURE__ */ v(_, {
239
+ size: 16,
240
+ className: "mr-2"
241
+ }), r(N, "projectDetail.manageProjectMembers", "Manage Members")]
242
+ }) : null]
243
+ }) : null
244
+ ]
245
+ })] }), /* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, {
222
246
  className: "flex flex-row items-center justify-between pb-2",
223
- children: /* @__PURE__ */ x(D, {
247
+ children: /* @__PURE__ */ y(T, {
224
248
  className: "flex items-center gap-2 text-base",
225
- children: [/* @__PURE__ */ b(m, {
249
+ children: [/* @__PURE__ */ v(f, {
226
250
  size: 20,
227
251
  className: "text-muted-foreground"
228
- }), r(I, "projectDetail.activityCardTitle", "Activity")]
252
+ }), r(N, "projectDetail.activityCardTitle", "Activity")]
229
253
  })
230
- }), /* @__PURE__ */ x(T, { children: [/* @__PURE__ */ b("p", {
254
+ }), /* @__PURE__ */ y(C, { children: [/* @__PURE__ */ v("p", {
231
255
  className: "text-3xl font-bold",
232
- children: Pe
233
- }), /* @__PURE__ */ b("p", {
256
+ children: Be
257
+ }), /* @__PURE__ */ v("p", {
234
258
  className: "text-sm text-muted-foreground",
235
- children: r(I, "projectDetail.recentActivityItems", "Recent activity items")
259
+ children: r(N, "projectDetail.recentActivityItems", "Recent activity items")
236
260
  })] })] })]
237
261
  }),
238
- /* @__PURE__ */ x(w, { children: [/* @__PURE__ */ b(E, { children: /* @__PURE__ */ b(D, { children: r(I, "projectDetail.tagsTitle", "Tags") }) }), /* @__PURE__ */ x(T, {
262
+ /* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, { children: /* @__PURE__ */ v(T, { children: r(N, "projectDetail.tagsTitle", "Tags") }) }), /* @__PURE__ */ y(C, {
239
263
  className: "space-y-3",
240
- children: [/* @__PURE__ */ b("p", {
264
+ children: [/* @__PURE__ */ v("p", {
241
265
  className: "text-sm text-muted-foreground",
242
- children: r(I, "projectDetail.tagsDescription", "Use universal tags to classify and filter this project across the workspace.")
243
- }), /* @__PURE__ */ b(ce, {
266
+ children: r(N, "projectDetail.tagsDescription", "Use universal tags to classify and filter this project across the workspace.")
267
+ }), /* @__PURE__ */ v(c, {
244
268
  entityType: "Project",
245
- entityId: H.id,
246
- workspaceId: L,
247
- tags: Le,
269
+ entityId: z.id,
270
+ workspaceId: P,
271
+ tags: Ve,
248
272
  onAdd: async (e) => {
249
- if (!H) return;
250
- let t = W, n = [...W, d(e)];
251
- G(n);
252
- try {
253
- await Ee({
254
- entityId: H.id,
273
+ if (z) try {
274
+ await Ae({
275
+ entityId: z.id,
255
276
  tagId: e.id
256
- });
277
+ }), await $([...X, o(e)]);
257
278
  } catch (e) {
258
- throw G(t), e;
279
+ throw i("error"), e;
259
280
  }
260
- await $(n);
261
281
  },
262
282
  onRemove: async (e) => {
263
- if (!H) return;
264
- let t = W, n = W.filter((t) => t.tagId !== e && t.id !== e);
265
- G(n);
283
+ if (!z) return;
284
+ let t = z.tagAssignments?.find((t) => t.tagId === e)?.id;
266
285
  try {
267
- let t = H.tagAssignments?.find((t) => t.tagId === e)?.id;
268
- await Oe({
269
- entityId: H.id,
286
+ await Me({
287
+ entityId: z.id,
270
288
  tagId: e,
271
289
  assignmentId: t
272
- });
290
+ }), await $(X.filter((t) => t.tagId !== e && t.id !== e));
273
291
  } catch (e) {
274
- throw G(t), e;
292
+ throw i("error"), e;
275
293
  }
276
- await $(n);
277
294
  },
278
- className: De || ke || je ? "pointer-events-none opacity-75" : void 0
295
+ className: je || Ne || Fe ? "pointer-events-none opacity-75" : void 0
279
296
  })]
280
297
  })] }),
281
- /* @__PURE__ */ x(w, { children: [/* @__PURE__ */ b(E, { children: /* @__PURE__ */ b(D, { children: r(I, "projectDetail.projectInformation", "Project Information") }) }), /* @__PURE__ */ x(T, {
298
+ /* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, { children: /* @__PURE__ */ v(T, { children: r(N, "projectDetail.projectInformation", "Project Information") }) }), /* @__PURE__ */ y(C, {
282
299
  className: "space-y-4",
283
- children: [/* @__PURE__ */ x("div", {
300
+ children: [/* @__PURE__ */ y("div", {
284
301
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm",
285
302
  children: [
286
- /* @__PURE__ */ x("div", {
303
+ /* @__PURE__ */ y("div", {
287
304
  className: "space-y-1",
288
- children: [/* @__PURE__ */ x("span", {
305
+ children: [/* @__PURE__ */ y("span", {
289
306
  className: "text-muted-foreground flex items-center gap-2",
290
- children: [/* @__PURE__ */ b(v, { size: 14 }), r(I, "projectDetail.projectId", "Project ID")]
291
- }), /* @__PURE__ */ b("span", {
307
+ children: [/* @__PURE__ */ v(g, { size: 14 }), r(N, "projectDetail.projectId", "Project ID")]
308
+ }), /* @__PURE__ */ v("span", {
292
309
  className: "font-mono text-xs block",
293
- children: H.id
310
+ children: z.id
294
311
  })]
295
312
  }),
296
- /* @__PURE__ */ x("div", {
313
+ /* @__PURE__ */ y("div", {
297
314
  className: "space-y-1",
298
- children: [/* @__PURE__ */ x("span", {
315
+ children: [/* @__PURE__ */ y("span", {
299
316
  className: "text-muted-foreground flex items-center gap-2",
300
- children: [/* @__PURE__ */ b(v, { size: 14 }), r(I, "projectDetail.projectKey", "Project Key")]
301
- }), /* @__PURE__ */ b("span", {
317
+ children: [/* @__PURE__ */ v(g, { size: 14 }), r(N, "projectDetail.projectKey", "Project Key")]
318
+ }), /* @__PURE__ */ v("span", {
302
319
  className: "font-medium",
303
- children: H.key
320
+ children: z.key
304
321
  })]
305
322
  }),
306
- /* @__PURE__ */ x("div", {
323
+ /* @__PURE__ */ y("div", {
307
324
  className: "space-y-1",
308
- children: [/* @__PURE__ */ x("span", {
325
+ children: [/* @__PURE__ */ y("span", {
309
326
  className: "text-muted-foreground flex items-center gap-2",
310
- children: [/* @__PURE__ */ b(_, { size: 14 }), r(I, "projectDetail.created", "Created")]
311
- }), /* @__PURE__ */ b("span", { children: l(H.createdAt) })]
327
+ children: [/* @__PURE__ */ v(h, { size: 14 }), r(N, "projectDetail.created", "Created")]
328
+ }), /* @__PURE__ */ v("span", { children: a(z.createdAt) })]
312
329
  }),
313
- /* @__PURE__ */ x("div", {
330
+ /* @__PURE__ */ y("div", {
314
331
  className: "space-y-1",
315
- children: [/* @__PURE__ */ x("span", {
332
+ children: [/* @__PURE__ */ y("span", {
316
333
  className: "text-muted-foreground flex items-center gap-2",
317
- children: [/* @__PURE__ */ b(_, { size: 14 }), r(I, "projectDetail.lastUpdated", "Last Updated")]
318
- }), /* @__PURE__ */ b("span", { children: l(H.updatedAt) })]
334
+ children: [/* @__PURE__ */ v(h, { size: 14 }), r(N, "projectDetail.lastUpdated", "Last Updated")]
335
+ }), /* @__PURE__ */ v("span", { children: a(z.updatedAt) })]
319
336
  }),
320
- /* @__PURE__ */ x("div", {
337
+ /* @__PURE__ */ y("div", {
321
338
  className: "space-y-1",
322
- children: [/* @__PURE__ */ x("span", {
339
+ children: [/* @__PURE__ */ y("span", {
323
340
  className: "text-muted-foreground flex items-center gap-2",
324
- children: [/* @__PURE__ */ b(y, { size: 14 }), r(I, "projectDetail.workspaceId", "Workspace ID")]
325
- }), /* @__PURE__ */ b("span", {
341
+ children: [/* @__PURE__ */ v(_, { size: 14 }), r(N, "projectDetail.workspaceId", "Workspace ID")]
342
+ }), /* @__PURE__ */ v("span", {
326
343
  className: "font-mono text-xs block",
327
- children: H.workspaceId
344
+ children: z.workspaceId
328
345
  })]
329
346
  }),
330
- /* @__PURE__ */ x("div", {
347
+ /* @__PURE__ */ y("div", {
331
348
  className: "space-y-1",
332
- children: [/* @__PURE__ */ x("span", {
349
+ children: [/* @__PURE__ */ y("span", {
333
350
  className: "text-muted-foreground flex items-center gap-2",
334
- children: [/* @__PURE__ */ b(y, { size: 14 }), r(I, "projectDetail.creatorId", "Creator ID")]
335
- }), /* @__PURE__ */ b("span", {
351
+ children: [/* @__PURE__ */ v(_, { size: 14 }), r(N, "projectDetail.creatorId", "Creator ID")]
352
+ }), /* @__PURE__ */ v("span", {
336
353
  className: "font-mono text-xs block",
337
- children: H.creatorId
354
+ children: z.creatorId
338
355
  })]
339
356
  })
340
357
  ]
341
- }), H.config && Object.keys(H.config).length > 0 && /* @__PURE__ */ x("div", {
358
+ }), z.config && Object.keys(z.config).length > 0 && /* @__PURE__ */ y("div", {
342
359
  className: "pt-4 border-t",
343
- children: [/* @__PURE__ */ b("h4", {
360
+ children: [/* @__PURE__ */ v("h4", {
344
361
  className: "text-sm font-medium mb-2",
345
- children: r(I, "projectDetail.configuration", "Configuration")
346
- }), /* @__PURE__ */ b("pre", {
362
+ children: r(N, "projectDetail.configuration", "Configuration")
363
+ }), /* @__PURE__ */ v("pre", {
347
364
  className: "text-xs bg-muted p-3 rounded-lg overflow-auto",
348
- children: JSON.stringify(H.config, null, 2)
365
+ children: JSON.stringify(z.config, null, 2)
349
366
  })]
350
367
  })]
351
368
  })] }),
352
- /* @__PURE__ */ x(w, { children: [/* @__PURE__ */ b(E, { children: /* @__PURE__ */ b(D, { children: r(I, "projectDetail.quickActions", "Quick Actions") }) }), /* @__PURE__ */ b(T, { children: /* @__PURE__ */ x("div", {
369
+ /* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, { children: /* @__PURE__ */ v(T, { children: r(N, "projectDetail.quickActions", "Quick Actions") }) }), /* @__PURE__ */ v(C, { children: /* @__PURE__ */ y("div", {
353
370
  className: "flex flex-wrap gap-2",
354
- children: [/* @__PURE__ */ x(C, {
355
- variant: "outline",
356
- size: "sm",
357
- onClick: () => z(V(`${B}/${L}/members`)),
358
- children: [/* @__PURE__ */ b(y, {
359
- size: 16,
360
- className: "mr-2"
361
- }), r(I, "projectDetail.workspaceMembers", "Workspace Members")]
362
- }), /* @__PURE__ */ x(C, {
363
- variant: "outline",
364
- size: "sm",
365
- onClick: () => z(V(`${B}/${L}/activity`)),
366
- children: [/* @__PURE__ */ b(m, {
367
- size: 16,
368
- className: "mr-2"
369
- }), r(I, "projectDetail.workspaceActivity", "Workspace Activity")]
370
- })]
371
+ children: [
372
+ J ? /* @__PURE__ */ y(x, {
373
+ variant: "outline",
374
+ size: "sm",
375
+ onClick: Q,
376
+ children: [/* @__PURE__ */ v(_, {
377
+ size: 16,
378
+ className: "mr-2"
379
+ }), r(N, "projectDetail.projectMembersPage", "Project Members")]
380
+ }) : null,
381
+ /* @__PURE__ */ y(x, {
382
+ variant: "outline",
383
+ size: "sm",
384
+ onClick: () => I(R(`${L}/${P}/members`)),
385
+ children: [/* @__PURE__ */ v(_, {
386
+ size: 16,
387
+ className: "mr-2"
388
+ }), r(N, "projectDetail.workspaceMembers", "Workspace Members")]
389
+ }),
390
+ /* @__PURE__ */ y(x, {
391
+ variant: "outline",
392
+ size: "sm",
393
+ onClick: () => I(R(`${L}/${P}/activity`)),
394
+ children: [/* @__PURE__ */ v(f, {
395
+ size: 16,
396
+ className: "mr-2"
397
+ }), r(N, "projectDetail.workspaceActivity", "Workspace Activity")]
398
+ })
399
+ ]
371
400
  }) })] }),
372
- /* @__PURE__ */ b(de, {
373
- open: Se,
374
- onOpenChange: U,
375
- children: /* @__PURE__ */ x(me, { children: [/* @__PURE__ */ x(_e, { children: [/* @__PURE__ */ b(ve, { children: r(I, "projectDetail.deleteDialogTitle", "Delete Project") }), /* @__PURE__ */ b(he, { children: r(I, "projectDetail.deleteConfirmPrefix", "Are you sure you want to delete \"") + H.name + r(I, "projectDetail.deleteConfirmSuffix", "\"? This action cannot be undone and all project data will be permanently removed.") })] }), /* @__PURE__ */ x(ge, { children: [/* @__PURE__ */ b(pe, {
376
- disabled: J,
377
- children: r(I, "projectDetail.cancel", "Cancel")
378
- }), /* @__PURE__ */ b(fe, {
379
- onClick: ze,
380
- disabled: J,
401
+ /* @__PURE__ */ v(me, {
402
+ open: Ee,
403
+ onOpenChange: B,
404
+ children: /* @__PURE__ */ y(_e, { children: [/* @__PURE__ */ y(be, { children: [/* @__PURE__ */ v(xe, { children: r(N, "projectDetail.deleteDialogTitle", "Delete Project") }), /* @__PURE__ */ v(ve, { children: r(N, "projectDetail.deleteConfirmPrefix", "Are you sure you want to delete \"") + z.name + r(N, "projectDetail.deleteConfirmSuffix", "\"? This action cannot be undone and all project data will be permanently removed.") })] }), /* @__PURE__ */ y(ye, { children: [/* @__PURE__ */ v(ge, {
405
+ disabled: G,
406
+ children: r(N, "projectDetail.cancel", "Cancel")
407
+ }), /* @__PURE__ */ v(he, {
408
+ onClick: Ue,
409
+ disabled: G,
381
410
  className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
382
- children: J ? r(I, "projectDetail.deleting", "Deleting...") : r(I, "projectDetail.deleteProject", "Delete Project")
411
+ children: G ? r(N, "projectDetail.deleting", "Deleting...") : r(N, "projectDetail.deleteProject", "Delete Project")
383
412
  })] })] })
384
- })
413
+ }),
414
+ P && F && V ? /* @__PURE__ */ v(l, {
415
+ open: V,
416
+ onOpenChange: H,
417
+ workspaceId: P,
418
+ projectId: F,
419
+ projectName: z.name
420
+ }) : null
385
421
  ]
386
422
  });
387
423
  }
388
424
  //#endregion
389
- export { I as ProjectDetailPage };
425
+ export { N as ProjectDetailPage };
390
426
 
391
427
  //# sourceMappingURL=ProjectDetailPage.js.map