@burdenoff/microfe-workspaces 2026.530.2 → 2026.531.2

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