@burdenoff/microfe-workspaces 2026.625.5 → 2026.626.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/pages/ActivityListPage.js +94 -90
  2. package/dist/pages/ActivityListPage.js.map +1 -1
  3. package/dist/pages/CreateWorkspacePage.js +68 -63
  4. package/dist/pages/CreateWorkspacePage.js.map +1 -1
  5. package/dist/pages/InviteAcceptancePage.js +101 -96
  6. package/dist/pages/InviteAcceptancePage.js.map +1 -1
  7. package/dist/pages/MembersListPage.js +185 -184
  8. package/dist/pages/MembersListPage.js.map +1 -1
  9. package/dist/pages/PendingInvitesPage.js +70 -68
  10. package/dist/pages/PendingInvitesPage.js.map +1 -1
  11. package/dist/pages/ProjectDetailPage.js +119 -78
  12. package/dist/pages/ProjectDetailPage.js.map +1 -1
  13. package/dist/pages/ProjectMembersPage.js +105 -104
  14. package/dist/pages/ProjectMembersPage.js.map +1 -1
  15. package/dist/pages/ProjectsListPage.js +158 -157
  16. package/dist/pages/ProjectsListPage.js.map +1 -1
  17. package/dist/pages/WorkspaceDetailPage.js +236 -198
  18. package/dist/pages/WorkspaceDetailPage.js.map +1 -1
  19. package/dist/pages/WorkspaceInvitePage.js +341 -300
  20. package/dist/pages/WorkspaceInvitePage.js.map +1 -1
  21. package/dist/pages/WorkspaceSettingsPage.js +87 -85
  22. package/dist/pages/WorkspaceSettingsPage.js.map +1 -1
  23. package/dist/pages/WorkspacesListPage.js +122 -121
  24. package/dist/pages/WorkspacesListPage.js.map +1 -1
  25. package/dist/pages/dashboard/DashboardPage.js +55 -51
  26. package/dist/pages/dashboard/DashboardPage.js.map +1 -1
  27. package/dist/pages/dashboard/widgets/GroupsWidget.js +16 -17
  28. package/dist/pages/dashboard/widgets/GroupsWidget.js.map +1 -1
  29. package/dist/pages/dashboard/widgets/TagCloudWidget.js +18 -19
  30. package/dist/pages/dashboard/widgets/TagCloudWidget.js.map +1 -1
  31. package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js +10 -11
  32. package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js.map +1 -1
  33. package/package.json +2 -2
@@ -11,14 +11,14 @@ import { useWorkspaceRoles as oe } from "../hooks/useWorkspaceRoles.js";
11
11
  import { useProjects as se } from "../hooks/useProjects.js";
12
12
  import { downloadWorkspaceBulkInviteTemplate as ce, parseWorkspaceBulkInviteCsv as le } from "../utils/workspaceBulkInviteCsv.js";
13
13
  import { useMemo as s, useRef as ue, useState as c } from "react";
14
- import { AlertCircle as l, ArrowLeft as de, CheckCircle2 as u, Download as fe, Loader2 as d, Mail as pe, RefreshCw as me, Send as he, Upload as ge, UserPlus as _e, XCircle as f } from "lucide-react";
15
- import { PermissionProvider as ve } from "@burdenoff/fe-libs/shared/providers/shell";
16
- import { Fragment as ye, jsx as p, jsxs as m } from "react/jsx-runtime";
17
- import { AlertDialog as be, AlertDialogAction as xe, AlertDialogCancel as Se, AlertDialogContent as Ce, AlertDialogDescription as we, AlertDialogFooter as Te, AlertDialogHeader as Ee, AlertDialogTitle as De, Badge as h, Button as g, CardContent as _, CardHeader as v, CardTitle as y, Checkbox as b, GlassCard as x, Input as Oe, ResponsiveTable as ke, Skeleton as S, Tabs as Ae, TabsContent as je, TabsList as Me, TabsTrigger as Ne, Tooltip as C, TooltipContent as w, TooltipProvider as Pe, TooltipTrigger as T } from "@burdenoff/fe-libs/ui";
18
- import { useNavigate as Fe, useParams as Ie } from "react-router-dom";
19
- import { useI18n as Le } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
+ import { AlertCircle as l, ArrowLeft as de, CheckCircle2 as u, Download as fe, Loader2 as d, Mail as pe, RefreshCw as me, Send as f, Upload as he, UserPlus as ge, XCircle as p } from "lucide-react";
15
+ import { PermissionProvider as _e } from "@burdenoff/fe-libs/shared/providers/shell";
16
+ import { Fragment as ve, jsx as m, jsxs as h } from "react/jsx-runtime";
17
+ import { AlertDialog as ye, AlertDialogAction as be, AlertDialogCancel as xe, AlertDialogContent as Se, AlertDialogDescription as Ce, AlertDialogFooter as we, AlertDialogHeader as Te, AlertDialogTitle as Ee, Badge as g, Button as _, CardContent as v, CardHeader as y, CardTitle as b, Checkbox as x, GlassCard as S, IllustratedEmptyState as De, Input as Oe, NextSteps as ke, PagePurpose as Ae, ResponsiveTable as je, Skeleton as C, Tabs as Me, TabsContent as Ne, TabsList as Pe, TabsTrigger as Fe, Tooltip as w, TooltipContent as T, TooltipProvider as Ie, TooltipTrigger as E } from "@burdenoff/fe-libs/ui";
18
+ import { useNavigate as Le, useParams as Re } from "react-router-dom";
19
+ import { useI18n as ze } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
20
20
  //#region src/pages/WorkspaceInvitePage.tsx
21
- var Re = 1024 * 1024, E = 500, ze = [
21
+ var Be = 1024 * 1024, D = 500, Ve = [
22
22
  {
23
23
  key: "rowNumber",
24
24
  header: "#",
@@ -33,7 +33,7 @@ var Re = 1024 * 1024, E = 500, ze = [
33
33
  priority: "primary",
34
34
  headerClassName: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
35
35
  cellClassName: "text-sm",
36
- cell: (e) => e.email || /* @__PURE__ */ p("span", {
36
+ cell: (e) => e.email || /* @__PURE__ */ m("span", {
37
37
  className: "italic text-text-secondary",
38
38
  children: "(empty)"
39
39
  })
@@ -44,34 +44,34 @@ var Re = 1024 * 1024, E = 500, ze = [
44
44
  priority: "secondary",
45
45
  headerClassName: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
46
46
  cellClassName: "text-xs",
47
- cell: (e) => e.errors.length > 0 ? /* @__PURE__ */ p("div", {
47
+ cell: (e) => e.errors.length > 0 ? /* @__PURE__ */ m("div", {
48
48
  className: "space-y-1 text-status-error-text",
49
- children: e.errors.map((t) => /* @__PURE__ */ m("span", {
49
+ children: e.errors.map((t) => /* @__PURE__ */ h("span", {
50
50
  className: "inline-flex items-center gap-1 pr-3",
51
- children: [/* @__PURE__ */ p(f, { size: 14 }), t]
51
+ children: [/* @__PURE__ */ m(p, { size: 14 }), t]
52
52
  }, `${e.rowNumber}-${t}`))
53
- }) : e.status.kind === "sending" ? /* @__PURE__ */ m("span", {
53
+ }) : e.status.kind === "sending" ? /* @__PURE__ */ h("span", {
54
54
  className: "inline-flex items-center gap-1 text-text-secondary",
55
- children: [/* @__PURE__ */ p(d, {
55
+ children: [/* @__PURE__ */ m(d, {
56
56
  size: 14,
57
57
  className: "animate-spin"
58
58
  }), "Sending..."]
59
- }) : e.status.kind === "invited" ? /* @__PURE__ */ m("span", {
59
+ }) : e.status.kind === "invited" ? /* @__PURE__ */ h("span", {
60
60
  className: "inline-flex items-center gap-1 text-green-700 dark:text-green-400",
61
- children: [/* @__PURE__ */ p(u, { size: 14 }), "Invited"]
62
- }) : e.status.kind === "failed" ? /* @__PURE__ */ m("span", {
61
+ children: [/* @__PURE__ */ m(u, { size: 14 }), "Invited"]
62
+ }) : e.status.kind === "failed" ? /* @__PURE__ */ h("span", {
63
63
  className: "inline-flex items-center gap-1 text-status-error-text",
64
- children: [/* @__PURE__ */ p(f, { size: 14 }), e.status.message]
65
- }) : /* @__PURE__ */ p("span", {
64
+ children: [/* @__PURE__ */ m(p, { size: 14 }), e.status.message]
65
+ }) : /* @__PURE__ */ m("span", {
66
66
  className: "text-text-secondary",
67
67
  children: "Ready"
68
68
  })
69
69
  }
70
70
  ];
71
- function Be(e) {
71
+ function He(e) {
72
72
  return e.type === "text/csv" || e.name.toLowerCase().endsWith(".csv");
73
73
  }
74
- function Ve(e) {
74
+ function Ue(e) {
75
75
  if (!e) return null;
76
76
  let t = new Date(e);
77
77
  return Number.isNaN(t.getTime()) ? null : t.toLocaleDateString(void 0, {
@@ -82,14 +82,14 @@ function Ve(e) {
82
82
  minute: "2-digit"
83
83
  });
84
84
  }
85
- function D(e) {
85
+ function O(e) {
86
86
  let t = e instanceof Error ? e.message : String(e);
87
87
  return t.includes("CONFLICT") ? "An invite already exists for this email address." : t.includes("already a member") ? "This user is already a member of the workspace." : "Something went wrong. Please try again or contact support.";
88
88
  }
89
- function He(e, t, n) {
89
+ function We(e, t, n) {
90
90
  return e.length === 0 ? t : e.map((e) => n ? n(e) : e).join(", ");
91
91
  }
92
- function Ue(e, t, n, r) {
92
+ function Ge(e, t, n, r) {
93
93
  return {
94
94
  email: t,
95
95
  workspaceId: e,
@@ -100,62 +100,62 @@ function Ue(e, t, n, r) {
100
100
  } } : {}
101
101
  };
102
102
  }
103
- function We({ selectedRoleIds: e, onRoleToggle: t, selectedProjectIds: n, onProjectToggle: r, availableRoles: i, availableProjects: a, isLoadingRoles: ee, isLoadingProjects: te, disabled: o }) {
104
- return /* @__PURE__ */ m("div", {
103
+ function Ke({ selectedRoleIds: e, onRoleToggle: t, selectedProjectIds: n, onProjectToggle: r, availableRoles: i, availableProjects: a, isLoadingRoles: ee, isLoadingProjects: te, disabled: o }) {
104
+ return /* @__PURE__ */ h("div", {
105
105
  className: "space-y-6",
106
- children: [/* @__PURE__ */ m("div", {
106
+ children: [/* @__PURE__ */ h("div", {
107
107
  className: "space-y-3",
108
- children: [/* @__PURE__ */ m("div", {
108
+ children: [/* @__PURE__ */ h("div", {
109
109
  className: "flex flex-wrap items-center justify-between gap-2",
110
- children: [/* @__PURE__ */ m("div", {
110
+ children: [/* @__PURE__ */ h("div", {
111
111
  className: "space-y-1",
112
- children: [/* @__PURE__ */ p("h3", {
112
+ children: [/* @__PURE__ */ m("h3", {
113
113
  className: "text-base font-semibold",
114
114
  children: "Roles (Optional)"
115
- }), /* @__PURE__ */ p("p", {
115
+ }), /* @__PURE__ */ m("p", {
116
116
  className: "text-sm text-text-secondary",
117
117
  children: "Choose roles. Hover any role to preview its full description."
118
118
  })]
119
- }), e.length > 0 ? /* @__PURE__ */ m(h, {
119
+ }), e.length > 0 ? /* @__PURE__ */ h(g, {
120
120
  variant: "secondary",
121
121
  children: [e.length, " selected"]
122
122
  }) : null]
123
- }), /* @__PURE__ */ p(Pe, { children: /* @__PURE__ */ p("div", {
123
+ }), /* @__PURE__ */ m(Ie, { children: /* @__PURE__ */ m("div", {
124
124
  className: "grid grid-cols-1 gap-2 md:grid-cols-2 xl:grid-cols-3",
125
- children: ee ? /* @__PURE__ */ p("p", {
125
+ children: ee ? /* @__PURE__ */ m("p", {
126
126
  className: "text-sm text-text-secondary",
127
127
  children: "Loading roles…"
128
- }) : i.length === 0 ? /* @__PURE__ */ p("p", {
128
+ }) : i.length === 0 ? /* @__PURE__ */ m("p", {
129
129
  className: "text-sm text-text-secondary",
130
130
  children: "No assignable roles were returned for this workspace."
131
131
  }) : i.map((n) => {
132
132
  let r = e.includes(n.id);
133
- return /* @__PURE__ */ m(C, { children: [/* @__PURE__ */ p(T, {
133
+ return /* @__PURE__ */ h(w, { children: [/* @__PURE__ */ m(E, {
134
134
  asChild: !0,
135
- children: /* @__PURE__ */ m("label", {
135
+ children: /* @__PURE__ */ h("label", {
136
136
  className: `flex cursor-pointer items-center justify-between gap-3 rounded-lg border px-3 py-3 text-left text-sm font-medium transition-colors focus-within:ring-2 focus-within:ring-[var(--color-focus-ring)] focus-within:ring-offset-2 ${r ? "border-primary bg-action-primary-bg/10 text-text-primary shadow-sm" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-accent"} ${o ? "opacity-70" : ""}`,
137
- children: [/* @__PURE__ */ p("span", {
137
+ children: [/* @__PURE__ */ m("span", {
138
138
  className: "min-w-0 flex-1 truncate",
139
139
  children: n.name
140
- }), /* @__PURE__ */ p(b, {
140
+ }), /* @__PURE__ */ m(x, {
141
141
  checked: r,
142
142
  disabled: o,
143
143
  onCheckedChange: (e) => t(n.id, !!e),
144
144
  "aria-label": `Select ${n.name}`
145
145
  })]
146
146
  })
147
- }), /* @__PURE__ */ m(w, {
147
+ }), /* @__PURE__ */ h(T, {
148
148
  className: "max-w-xs text-sm leading-6",
149
149
  children: [
150
- /* @__PURE__ */ p("p", {
150
+ /* @__PURE__ */ m("p", {
151
151
  className: "font-medium",
152
152
  children: n.name
153
153
  }),
154
- /* @__PURE__ */ p("p", {
154
+ /* @__PURE__ */ m("p", {
155
155
  className: "mt-1 text-text-secondary",
156
156
  children: n.description || "No description available for this role."
157
157
  }),
158
- n.isSystem ? /* @__PURE__ */ p("p", {
158
+ n.isSystem ? /* @__PURE__ */ m("p", {
159
159
  className: "mt-2 text-xs",
160
160
  children: "System role"
161
161
  }) : null
@@ -163,51 +163,51 @@ function We({ selectedRoleIds: e, onRoleToggle: t, selectedProjectIds: n, onProj
163
163
  })] }, n.id);
164
164
  })
165
165
  }) })]
166
- }), /* @__PURE__ */ m("div", {
166
+ }), /* @__PURE__ */ h("div", {
167
167
  className: "space-y-3",
168
- children: [/* @__PURE__ */ m("div", {
168
+ children: [/* @__PURE__ */ h("div", {
169
169
  className: "flex flex-wrap items-center justify-between gap-2",
170
- children: [/* @__PURE__ */ m("div", {
170
+ children: [/* @__PURE__ */ h("div", {
171
171
  className: "space-y-1",
172
- children: [/* @__PURE__ */ p("h3", {
172
+ children: [/* @__PURE__ */ m("h3", {
173
173
  className: "text-base font-semibold",
174
174
  children: "Projects to add on acceptance (Optional)"
175
- }), /* @__PURE__ */ p("p", {
175
+ }), /* @__PURE__ */ m("p", {
176
176
  className: "text-sm text-text-secondary",
177
177
  children: "The invited user will be added to these projects automatically after they accept."
178
178
  })]
179
- }), n.length > 0 ? /* @__PURE__ */ m(h, {
179
+ }), n.length > 0 ? /* @__PURE__ */ h(g, {
180
180
  variant: "secondary",
181
181
  children: [n.length, " selected"]
182
182
  }) : null]
183
- }), /* @__PURE__ */ p("div", {
183
+ }), /* @__PURE__ */ m("div", {
184
184
  className: "grid grid-cols-1 gap-2 md:grid-cols-2 xl:grid-cols-3",
185
- children: te ? /* @__PURE__ */ p("p", {
185
+ children: te ? /* @__PURE__ */ m("p", {
186
186
  className: "text-sm text-text-secondary",
187
187
  children: "Loading projects…"
188
- }) : a.length === 0 ? /* @__PURE__ */ p("p", {
188
+ }) : a.length === 0 ? /* @__PURE__ */ m("p", {
189
189
  className: "text-sm text-text-secondary",
190
190
  children: "No active projects are available in this workspace yet."
191
191
  }) : a.map((e) => {
192
192
  let t = n.includes(e.id);
193
- return /* @__PURE__ */ m("label", {
193
+ return /* @__PURE__ */ h("label", {
194
194
  className: `flex cursor-pointer items-start justify-between gap-3 rounded-lg border px-3 py-3 transition-colors focus-within:ring-2 focus-within:ring-[var(--color-focus-ring)] focus-within:ring-offset-2 ${t ? "border-primary bg-action-primary-bg/10 text-text-primary shadow-sm" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-accent"} ${o ? "opacity-70" : ""}`,
195
- children: [/* @__PURE__ */ m("div", {
195
+ children: [/* @__PURE__ */ h("div", {
196
196
  className: "min-w-0 flex-1 space-y-1",
197
- children: [/* @__PURE__ */ p("p", {
197
+ children: [/* @__PURE__ */ m("p", {
198
198
  className: "truncate text-sm font-semibold leading-tight",
199
199
  children: e.name
200
- }), /* @__PURE__ */ m("div", {
200
+ }), /* @__PURE__ */ h("div", {
201
201
  className: "flex items-center gap-2 text-xs text-text-secondary",
202
- children: [/* @__PURE__ */ p("span", {
202
+ children: [/* @__PURE__ */ m("span", {
203
203
  className: "truncate font-mono",
204
204
  children: e.key
205
- }), /* @__PURE__ */ p(h, {
205
+ }), /* @__PURE__ */ m(g, {
206
206
  variant: "outline",
207
207
  children: e.status
208
208
  })]
209
209
  })]
210
- }), /* @__PURE__ */ p(b, {
210
+ }), /* @__PURE__ */ m(x, {
211
211
  checked: t,
212
212
  disabled: o,
213
213
  onCheckedChange: (t) => r(e.id, !!t),
@@ -219,339 +219,378 @@ function We({ selectedRoleIds: e, onRoleToggle: t, selectedProjectIds: n, onProj
219
219
  })]
220
220
  });
221
221
  }
222
- function O() {
223
- let { workspaceId: ve } = Ie(), { t: b } = Le(), C = Fe(), { basePath: w = "/workspaces", workspaceId: Pe } = e(), { withCurrentSearch: T } = n(), O = ve || Pe || "";
224
- i("workspaces.invite", { workspaceId: O || void 0 });
225
- let { canInviteMember: Ge, isLoading: Ke } = ae(), { data: qe, isLoading: Je, error: Ye } = t(O), { data: k = [], isLoading: Xe } = oe(O), { data: A, isLoading: Ze } = se({ archived: !1 }, { limit: 100 }, O), { data: Qe, isLoading: $e, isFetching: j, error: et, refetch: tt } = a(O, "PENDING", { limit: 50 }, { retry: !1 }), M = s(() => (A?.items ?? []).filter((e) => !e.archived), [A?.items]), [nt, rt] = c("single"), [N, it] = c(""), [P, at] = c([]), [F, ot] = c([]), [st, I] = c(null), [ct, lt] = c(null), [ut, L] = c(null), [dt, R] = c(null), [z, B] = c(null), [V, H] = c([]), [ft, pt] = c(null), [mt, U] = c(!1), [W, ht] = c(!1), gt = ue(null), [G, K] = c(null), { mutateAsync: _t, isPending: q } = o(O), { mutateAsync: vt, isPending: yt } = ee(), { mutate: bt, isPending: J } = ne(O), { mutate: xt, isPending: Y } = te(O), [St, X] = c(null), Z = Qe?.items ?? [], Ct = q || yt || W, wt = s(() => k.filter((e) => P.includes(e.id)).map((e) => e.name), [k, P]), Tt = s(() => M.filter((e) => F.includes(e.id)).map((e) => e.name), [M, F]), Q = s(() => V.filter((e) => e.errors.length === 0 && e.status.kind !== "invited"), [V]), $ = s(() => V.filter((e) => e.errors.length > 0), [V]);
226
- if (!O) return /* @__PURE__ */ p("div", {
222
+ function k() {
223
+ let { workspaceId: _e } = Re(), { t: x } = ze(), w = Le(), { basePath: T = "/workspaces", workspaceId: Ie } = e(), { withCurrentSearch: E } = n(), k = _e || Ie || "";
224
+ i("workspaces.invite", { workspaceId: k || void 0 });
225
+ let { canInviteMember: qe, isLoading: Je } = ae(), { data: Ye, isLoading: Xe, error: Ze } = t(k), { data: A = [], isLoading: Qe } = oe(k), { data: j, isLoading: $e } = se({ archived: !1 }, { limit: 100 }, k), { data: et, isLoading: tt, isFetching: M, error: nt, refetch: rt } = a(k, "PENDING", { limit: 50 }, { retry: !1 }), N = s(() => (j?.items ?? []).filter((e) => !e.archived), [j?.items]), [it, at] = c("single"), [P, ot] = c(""), [F, st] = c([]), [I, ct] = c([]), [lt, L] = c(null), [ut, dt] = c(null), [ft, R] = c(null), [pt, z] = c(null), [B, V] = c(null), [H, U] = c([]), [mt, ht] = c(null), [gt, W] = c(!1), [G, _t] = c(!1), vt = ue(null), [K, yt] = c(null), { mutateAsync: bt, isPending: q } = o(k), { mutateAsync: xt, isPending: St } = ee(), { mutate: Ct, isPending: J } = ne(k), { mutate: wt, isPending: Y } = te(k), [Tt, X] = c(null), Z = et?.items ?? [], Et = q || St || G, Dt = s(() => A.filter((e) => F.includes(e.id)).map((e) => e.name), [A, F]), Ot = s(() => N.filter((e) => I.includes(e.id)).map((e) => e.name), [N, I]), Q = s(() => H.filter((e) => e.errors.length === 0 && e.status.kind !== "invited"), [H]), $ = s(() => H.filter((e) => e.errors.length > 0), [H]);
226
+ if (!k) return /* @__PURE__ */ m("div", {
227
227
  className: "space-y-4 p-6",
228
- children: /* @__PURE__ */ m("div", {
228
+ children: /* @__PURE__ */ h("div", {
229
229
  className: "rounded-xl border bg-bg-surface p-8 text-center",
230
230
  children: [
231
- /* @__PURE__ */ p("h1", {
231
+ /* @__PURE__ */ m("h1", {
232
232
  className: "text-2xl font-bold",
233
- children: r(b, "workspaceInvite.noWorkspaceTitle", "Select a workspace first")
233
+ children: r(x, "workspaceInvite.noWorkspaceTitle", "Select a workspace first")
234
234
  }),
235
- /* @__PURE__ */ p("p", {
235
+ /* @__PURE__ */ m("p", {
236
236
  className: "mt-2 text-text-secondary",
237
- children: r(b, "workspaceInvite.noWorkspaceDescription", "Choose a current workspace from the header or open a workspace detail page before inviting members.")
237
+ children: r(x, "workspaceInvite.noWorkspaceDescription", "Choose a current workspace from the header or open a workspace detail page before inviting members.")
238
238
  }),
239
- /* @__PURE__ */ p("div", {
239
+ /* @__PURE__ */ m("div", {
240
240
  className: "mt-4",
241
- children: /* @__PURE__ */ p(g, {
242
- onClick: () => C(T(`${w}/list`)),
241
+ children: /* @__PURE__ */ m(_, {
242
+ onClick: () => w(E(`${T}/list`)),
243
243
  variant: "outline",
244
- children: r(b, "workspaceInvite.backToWorkspaces", "Back to Workspaces")
244
+ children: r(x, "workspaceInvite.backToWorkspaces", "Back to Workspaces")
245
245
  })
246
246
  })
247
247
  ]
248
248
  })
249
249
  });
250
- if (Ke || Je) return /* @__PURE__ */ m("div", {
250
+ if (Je || Xe) return /* @__PURE__ */ h("div", {
251
251
  className: "space-y-6 p-6",
252
252
  children: [
253
- /* @__PURE__ */ p(S, { className: "h-10 w-48" }),
254
- /* @__PURE__ */ p(S, { className: "h-40 w-full" }),
255
- /* @__PURE__ */ p(S, { className: "h-80 w-full" })
253
+ /* @__PURE__ */ m(C, { className: "h-10 w-48" }),
254
+ /* @__PURE__ */ m(C, { className: "h-40 w-full" }),
255
+ /* @__PURE__ */ m(C, { className: "h-80 w-full" })
256
256
  ]
257
257
  });
258
- if (!Ge) return /* @__PURE__ */ p("div", {
258
+ if (!qe) return /* @__PURE__ */ m("div", {
259
259
  className: "flex min-h-[400px] items-center justify-center",
260
- children: /* @__PURE__ */ m("div", {
260
+ children: /* @__PURE__ */ h("div", {
261
261
  className: "space-y-2 text-center",
262
- children: [/* @__PURE__ */ p("h2", {
262
+ children: [/* @__PURE__ */ m("h2", {
263
263
  className: "text-lg font-semibold",
264
- children: r(b, "workspaceInvite.accessDenied", "Access Denied")
265
- }), /* @__PURE__ */ p("p", {
264
+ children: r(x, "workspaceInvite.accessDenied", "Access Denied")
265
+ }), /* @__PURE__ */ m("p", {
266
266
  className: "text-sm text-text-secondary",
267
- children: r(b, "workspaceInvite.accessDeniedDescription", "You don't have permission to invite members into this workspace.")
267
+ children: r(x, "workspaceInvite.accessDeniedDescription", "You don't have permission to invite members into this workspace.")
268
268
  })]
269
269
  })
270
270
  });
271
- if (Ye || !qe) return /* @__PURE__ */ m("div", {
271
+ if (Ze || !Ye) return /* @__PURE__ */ h("div", {
272
272
  className: "space-y-4 p-6",
273
- children: [/* @__PURE__ */ m(g, {
273
+ children: [/* @__PURE__ */ h(_, {
274
274
  variant: "ghost",
275
- onClick: () => C(T(`${w}/list`)),
275
+ onClick: () => w(E(`${T}/list`)),
276
276
  className: "gap-2",
277
- children: [/* @__PURE__ */ p(de, { size: 18 }), r(b, "workspaceInvite.backToWorkspaces", "Back to Workspaces")]
278
- }), /* @__PURE__ */ p("div", {
277
+ children: [/* @__PURE__ */ m(de, { size: 18 }), r(x, "workspaceInvite.backToWorkspaces", "Back to Workspaces")]
278
+ }), /* @__PURE__ */ m("div", {
279
279
  className: "rounded-xl border bg-bg-surface p-8 text-center text-status-error-text",
280
- children: r(b, "workspaceInvite.workspaceLoadError", "Unable to load workspace invite details.")
280
+ children: r(x, "workspaceInvite.workspaceLoadError", "Unable to load workspace invite details.")
281
281
  })]
282
282
  });
283
- let Et = (e, t) => {
284
- at((n) => t ? [...n, e].filter((e, t, n) => n.indexOf(e) === t) : n.filter((t) => t !== e));
285
- }, Dt = (e, t) => {
286
- ot((n) => t ? [...n, e].filter((e, t, n) => n.indexOf(e) === t) : n.filter((t) => t !== e));
287
- }, Ot = async (e) => {
288
- if (e.preventDefault(), I(null), lt(null), B(null), !N.trim()) {
289
- I("Email is required.");
283
+ let kt = (e, t) => {
284
+ st((n) => t ? [...n, e].filter((e, t, n) => n.indexOf(e) === t) : n.filter((t) => t !== e));
285
+ }, At = (e, t) => {
286
+ ct((n) => t ? [...n, e].filter((e, t, n) => n.indexOf(e) === t) : n.filter((t) => t !== e));
287
+ }, jt = async (e) => {
288
+ if (e.preventDefault(), L(null), dt(null), V(null), !P.trim()) {
289
+ L("Email is required.");
290
290
  return;
291
291
  }
292
292
  try {
293
- await _t(Ue(O, N.trim().toLowerCase(), P, F)), it(""), lt(`Invitation sent to ${N.trim().toLowerCase()}.`);
293
+ await bt(Ge(k, P.trim().toLowerCase(), F, I)), ot(""), dt(`Invitation sent to ${P.trim().toLowerCase()}.`);
294
294
  } catch (e) {
295
- I(D(e));
295
+ L(O(e));
296
296
  }
297
- }, kt = (e) => {
298
- if (!Be(e)) {
299
- L("Please upload a .csv file.");
297
+ }, Mt = (e) => {
298
+ if (!He(e)) {
299
+ R("Please upload a .csv file.");
300
300
  return;
301
301
  }
302
- if (e.size > Re) {
303
- L("CSV file is too large (max 1 MB).");
302
+ if (e.size > Be) {
303
+ R("CSV file is too large (max 1 MB).");
304
304
  return;
305
305
  }
306
306
  let t = new FileReader();
307
307
  t.onload = () => {
308
308
  let n = le(typeof t.result == "string" ? t.result : "");
309
- H(n.slice(0, E).map((e) => ({
309
+ U(n.slice(0, D).map((e) => ({
310
310
  ...e,
311
311
  status: { kind: "idle" }
312
- }))), pt(e.name), L(n.length > E ? `Only the first ${E} rows were loaded. Split larger CSV files into smaller batches.` : null), R(null), B(null);
312
+ }))), ht(e.name), R(n.length > D ? `Only the first ${D} rows were loaded. Split larger CSV files into smaller batches.` : null), z(null), V(null);
313
313
  }, t.onerror = () => {
314
- L("Failed to read CSV file.");
314
+ R("Failed to read CSV file.");
315
315
  }, t.readAsText(e);
316
- }, At = async () => {
317
- if (!(Q.length === 0 || W)) {
318
- L(null), R(null), B(null), ht(!0), H((e) => e.map((e) => e.errors.length === 0 && e.status.kind !== "invited" ? {
316
+ }, Nt = async () => {
317
+ if (!(Q.length === 0 || G)) {
318
+ R(null), z(null), V(null), _t(!0), U((e) => e.map((e) => e.errors.length === 0 && e.status.kind !== "invited" ? {
319
319
  ...e,
320
320
  status: { kind: "sending" }
321
321
  } : e));
322
322
  try {
323
- await vt(Q.map((e) => Ue(O, e.email, P, F))), H((e) => e.map((e) => e.status.kind === "sending" ? {
323
+ await xt(Q.map((e) => Ge(k, e.email, F, I))), U((e) => e.map((e) => e.status.kind === "sending" ? {
324
324
  ...e,
325
325
  status: { kind: "invited" }
326
- } : e)), R(`Sent ${Q.length} workspace invitation${Q.length === 1 ? "" : "s"}.`);
326
+ } : e)), z(`Sent ${Q.length} workspace invitation${Q.length === 1 ? "" : "s"}.`);
327
327
  } catch (e) {
328
- let t = D(e);
329
- H((e) => e.map((e) => e.status.kind === "sending" ? {
328
+ let t = O(e);
329
+ U((e) => e.map((e) => e.status.kind === "sending" ? {
330
330
  ...e,
331
331
  status: {
332
332
  kind: "failed",
333
333
  message: t
334
334
  }
335
- } : e)), L(t);
335
+ } : e)), R(t);
336
336
  } finally {
337
- ht(!1);
337
+ _t(!1);
338
338
  }
339
339
  }
340
- }, jt = (e) => {
341
- B(null), X(e.id), bt(e.id, {
340
+ }, Pt = (e) => {
341
+ V(null), X(e.id), Ct(e.id, {
342
342
  onSuccess: () => {
343
- B({
343
+ V({
344
344
  tone: "success",
345
345
  message: `Invitation resent to ${e.email}.`
346
346
  });
347
347
  },
348
348
  onError: (e) => {
349
- B({
349
+ V({
350
350
  tone: "error",
351
- message: D(e)
351
+ message: O(e)
352
352
  });
353
353
  },
354
354
  onSettled: () => X(null)
355
355
  });
356
356
  };
357
- return /* @__PURE__ */ m(ye, { children: [/* @__PURE__ */ p(be, {
358
- open: !!G,
359
- onOpenChange: (e) => !e && K(null),
360
- children: /* @__PURE__ */ m(Ce, { children: [/* @__PURE__ */ m(Ee, { children: [/* @__PURE__ */ p(De, { children: "Cancel pending invitation?" }), /* @__PURE__ */ p(we, { children: G ? `This will revoke the pending invite for ${G.email}. They will need a new invitation to join later.` : "This will revoke the pending invitation." })] }), /* @__PURE__ */ m(Te, { children: [/* @__PURE__ */ p(Se, {
357
+ return /* @__PURE__ */ h(ve, { children: [/* @__PURE__ */ m(ye, {
358
+ open: !!K,
359
+ onOpenChange: (e) => !e && yt(null),
360
+ children: /* @__PURE__ */ h(Se, { children: [/* @__PURE__ */ h(Te, { children: [/* @__PURE__ */ m(Ee, { children: "Cancel pending invitation?" }), /* @__PURE__ */ m(Ce, { children: K ? `This will revoke the pending invite for ${K.email}. They will need a new invitation to join later.` : "This will revoke the pending invitation." })] }), /* @__PURE__ */ h(we, { children: [/* @__PURE__ */ m(xe, {
361
361
  disabled: Y,
362
362
  children: "Keep invitation"
363
- }), /* @__PURE__ */ m(xe, {
363
+ }), /* @__PURE__ */ h(be, {
364
364
  onClick: () => {
365
- G && (B(null), X(G.id), xt(G.id, {
365
+ K && (V(null), X(K.id), wt(K.id, {
366
366
  onSuccess: () => {
367
- B({
367
+ V({
368
368
  tone: "success",
369
- message: `Invitation cancelled for ${G.email}.`
370
- }), K(null);
369
+ message: `Invitation cancelled for ${K.email}.`
370
+ }), yt(null);
371
371
  },
372
372
  onError: (e) => {
373
- B({
373
+ V({
374
374
  tone: "error",
375
- message: D(e)
375
+ message: O(e)
376
376
  });
377
377
  },
378
378
  onSettled: () => X(null)
379
379
  }));
380
380
  },
381
381
  disabled: Y,
382
- children: [Y ? /* @__PURE__ */ p(d, { className: "size-4 animate-spin" }) : null, "Cancel invitation"]
382
+ children: [Y ? /* @__PURE__ */ m(d, { className: "size-4 animate-spin" }) : null, "Cancel invitation"]
383
383
  })] })] })
384
- }), /* @__PURE__ */ m("div", {
384
+ }), /* @__PURE__ */ h("div", {
385
385
  className: "space-y-6 p-3 sm:p-6",
386
386
  children: [
387
- /* @__PURE__ */ p("div", {
387
+ /* @__PURE__ */ m("div", {
388
388
  className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",
389
- children: /* @__PURE__ */ m("div", { children: [
390
- /* @__PURE__ */ m(g, {
389
+ children: /* @__PURE__ */ h("div", { children: [
390
+ /* @__PURE__ */ h(_, {
391
391
  variant: "ghost",
392
- onClick: () => C(T(`${w}/${O}`)),
392
+ onClick: () => w(E(`${T}/${k}`)),
393
393
  className: "-ml-2 mb-2 gap-2",
394
- children: [/* @__PURE__ */ p(de, { size: 18 }), r(b, "workspaceInvite.backToWorkspace", "Back to Workspace")]
394
+ children: [/* @__PURE__ */ m(de, { size: 18 }), r(x, "workspaceInvite.backToWorkspace", "Back to Workspace")]
395
395
  }),
396
- /* @__PURE__ */ m("div", {
396
+ /* @__PURE__ */ h("div", {
397
397
  className: "flex items-center gap-2",
398
- children: [/* @__PURE__ */ p(_e, {
398
+ children: [/* @__PURE__ */ m(ge, {
399
399
  className: "text-primary",
400
400
  size: 24
401
- }), /* @__PURE__ */ p("h1", {
401
+ }), /* @__PURE__ */ m("h1", {
402
402
  className: "text-2xl font-bold sm:text-3xl",
403
- children: r(b, "workspaceInvite.title", "Invite Members")
403
+ children: r(x, "workspaceInvite.title", "Invite Members")
404
404
  })]
405
405
  }),
406
- /* @__PURE__ */ m("p", {
406
+ /* @__PURE__ */ h("p", {
407
407
  className: "mt-2 text-sm text-text-secondary sm:text-base",
408
408
  children: [
409
- qe.name,
409
+ Ye.name,
410
410
  " —",
411
411
  " ",
412
- r(b, "workspaceInvite.subtitle", "Invite people into this workspace and optionally grant project access.")
412
+ r(x, "workspaceInvite.subtitle", "Invite people into this workspace and optionally grant project access.")
413
413
  ]
414
414
  })
415
415
  ] })
416
416
  }),
417
- /* @__PURE__ */ m(x, {
417
+ /* @__PURE__ */ m(Ae, { children: r(x, "workspaceInvite.purpose", "Use this page to bring new people into the workspace. First choose the roles and projects they should get the moment they accept, then send a single invitation by email or upload a CSV to invite many people at once. Invitations you have already sent appear at the bottom, where you can resend or cancel them.") }),
418
+ /* @__PURE__ */ m(ke, {
419
+ storageKey: "workspaces-workspace-invite",
420
+ steps: [
421
+ {
422
+ id: "pick-access",
423
+ label: r(x, "workspaceInvite.stepAccess", "Pick the roles and projects to grant"),
424
+ description: r(x, "workspaceInvite.stepAccessDesc", "These are applied automatically when each person accepts."),
425
+ icon: /* @__PURE__ */ m(ge, { size: 16 }),
426
+ onClick: () => document.getElementById("invite-access-section")?.scrollIntoView({
427
+ behavior: "smooth",
428
+ block: "start"
429
+ })
430
+ },
431
+ {
432
+ id: "send-invite",
433
+ label: r(x, "workspaceInvite.stepSend", "Send the invitation"),
434
+ description: r(x, "workspaceInvite.stepSendDesc", "Enter one email, or switch to the Bulk CSV tab to invite many at once."),
435
+ icon: /* @__PURE__ */ m(f, { size: 16 }),
436
+ onClick: () => document.getElementById("invite-send-section")?.scrollIntoView({
437
+ behavior: "smooth",
438
+ block: "start"
439
+ })
440
+ },
441
+ {
442
+ id: "review-pending",
443
+ label: r(x, "workspaceInvite.stepPending", "Track your pending invitations"),
444
+ description: r(x, "workspaceInvite.stepPendingDesc", "Resend or cancel invitations that have not been accepted yet."),
445
+ icon: /* @__PURE__ */ m(pe, { size: 16 }),
446
+ onClick: () => document.getElementById("invite-pending-section")?.scrollIntoView({
447
+ behavior: "smooth",
448
+ block: "start"
449
+ })
450
+ }
451
+ ]
452
+ }),
453
+ /* @__PURE__ */ h(S, {
418
454
  treatment: "plain",
455
+ id: "invite-access-section",
419
456
  className: "border-border-seam",
420
- children: [/* @__PURE__ */ p(v, { children: /* @__PURE__ */ p(y, { children: r(b, "workspaceInvite.setupTitle", "Access to grant on acceptance") }) }), /* @__PURE__ */ p(_, { children: /* @__PURE__ */ p(We, {
421
- selectedRoleIds: P,
422
- onRoleToggle: Et,
423
- selectedProjectIds: F,
424
- onProjectToggle: Dt,
425
- availableRoles: k,
426
- availableProjects: M,
427
- isLoadingRoles: Xe,
428
- isLoadingProjects: Ze,
429
- disabled: Ct
457
+ children: [/* @__PURE__ */ m(y, { children: /* @__PURE__ */ m(b, { children: r(x, "workspaceInvite.setupTitle", "Access to grant on acceptance") }) }), /* @__PURE__ */ m(v, { children: /* @__PURE__ */ m(Ke, {
458
+ selectedRoleIds: F,
459
+ onRoleToggle: kt,
460
+ selectedProjectIds: I,
461
+ onProjectToggle: At,
462
+ availableRoles: A,
463
+ availableProjects: N,
464
+ isLoadingRoles: Qe,
465
+ isLoadingProjects: $e,
466
+ disabled: Et
430
467
  }) })]
431
468
  }),
432
- /* @__PURE__ */ m(x, {
469
+ /* @__PURE__ */ h(S, {
433
470
  treatment: "metric",
471
+ glow: !0,
434
472
  className: "border-border-seam",
435
- children: [/* @__PURE__ */ p(v, { children: /* @__PURE__ */ p(y, { children: "Selection summary" }) }), /* @__PURE__ */ m(_, {
473
+ children: [/* @__PURE__ */ m(y, { children: /* @__PURE__ */ m(b, { children: "Selection summary" }) }), /* @__PURE__ */ h(v, {
436
474
  className: "grid gap-4 md:grid-cols-2",
437
- children: [/* @__PURE__ */ m("div", {
475
+ children: [/* @__PURE__ */ h("div", {
438
476
  className: "space-y-2 rounded-lg border border-border-seam bg-bg-surface p-4",
439
- children: [/* @__PURE__ */ m("div", {
477
+ children: [/* @__PURE__ */ h("div", {
440
478
  className: "flex items-center justify-between gap-2",
441
- children: [/* @__PURE__ */ p("p", {
479
+ children: [/* @__PURE__ */ m("p", {
442
480
  className: "text-sm font-medium",
443
481
  children: "Roles"
444
- }), /* @__PURE__ */ p(h, {
482
+ }), /* @__PURE__ */ m(g, {
445
483
  variant: "secondary",
446
484
  className: "tabular-nums",
447
- children: wt.length
485
+ children: Dt.length
448
486
  })]
449
- }), /* @__PURE__ */ p("p", {
487
+ }), /* @__PURE__ */ m("p", {
450
488
  className: "text-sm text-text-muted",
451
- children: He(wt, "No roles selected")
489
+ children: We(Dt, "No roles selected")
452
490
  })]
453
- }), /* @__PURE__ */ m("div", {
491
+ }), /* @__PURE__ */ h("div", {
454
492
  className: "space-y-2 rounded-lg border border-border-seam bg-bg-surface p-4",
455
- children: [/* @__PURE__ */ m("div", {
493
+ children: [/* @__PURE__ */ h("div", {
456
494
  className: "flex items-center justify-between gap-2",
457
- children: [/* @__PURE__ */ p("p", {
495
+ children: [/* @__PURE__ */ m("p", {
458
496
  className: "text-sm font-medium",
459
497
  children: "Projects"
460
- }), /* @__PURE__ */ p(h, {
498
+ }), /* @__PURE__ */ m(g, {
461
499
  variant: "secondary",
462
500
  className: "tabular-nums",
463
- children: Tt.length
501
+ children: Ot.length
464
502
  })]
465
- }), /* @__PURE__ */ p("p", {
503
+ }), /* @__PURE__ */ m("p", {
466
504
  className: "text-sm text-text-muted",
467
- children: He(Tt, "No project access will be granted automatically")
505
+ children: We(Ot, "No project access will be granted automatically")
468
506
  })]
469
507
  })]
470
508
  })]
471
509
  }),
472
- /* @__PURE__ */ m(x, {
510
+ /* @__PURE__ */ h(S, {
473
511
  treatment: "plain",
512
+ id: "invite-send-section",
474
513
  className: "border-border-seam",
475
- children: [/* @__PURE__ */ p(v, { children: /* @__PURE__ */ p(y, { children: r(b, "workspaceInvite.sendTitle", "Send invitations") }) }), /* @__PURE__ */ p(_, { children: /* @__PURE__ */ m(Ae, {
476
- value: nt,
477
- onValueChange: (e) => rt(e),
514
+ children: [/* @__PURE__ */ m(y, { children: /* @__PURE__ */ m(b, { children: r(x, "workspaceInvite.sendTitle", "Send invitations") }) }), /* @__PURE__ */ m(v, { children: /* @__PURE__ */ h(Me, {
515
+ value: it,
516
+ onValueChange: (e) => at(e),
478
517
  className: "space-y-5",
479
518
  children: [
480
- /* @__PURE__ */ m(Me, { children: [/* @__PURE__ */ p(Ne, {
519
+ /* @__PURE__ */ h(Pe, { children: [/* @__PURE__ */ m(Fe, {
481
520
  value: "single",
482
- children: r(b, "workspaceInvite.modeSingle", "Single")
483
- }), /* @__PURE__ */ p(Ne, {
521
+ children: r(x, "workspaceInvite.modeSingle", "Single")
522
+ }), /* @__PURE__ */ m(Fe, {
484
523
  value: "bulk",
485
- children: r(b, "workspaceInvite.modeBulk", "Bulk CSV")
524
+ children: r(x, "workspaceInvite.modeBulk", "Bulk CSV")
486
525
  })] }),
487
- /* @__PURE__ */ m(je, {
526
+ /* @__PURE__ */ h(Ne, {
488
527
  value: "single",
489
528
  className: "space-y-4",
490
529
  children: [
491
- st ? /* @__PURE__ */ m("div", {
530
+ lt ? /* @__PURE__ */ h("div", {
492
531
  className: "flex items-center gap-2 rounded-md border border-status-error-border/20 bg-status-error-bg/10 p-3 text-sm text-status-error-text",
493
- children: [/* @__PURE__ */ p(l, { className: "size-4 shrink-0" }), /* @__PURE__ */ p("span", { children: st })]
532
+ children: [/* @__PURE__ */ m(l, { className: "size-4 shrink-0" }), /* @__PURE__ */ m("span", { children: lt })]
494
533
  }) : null,
495
- ct ? /* @__PURE__ */ m("div", {
534
+ ut ? /* @__PURE__ */ h("div", {
496
535
  className: "flex items-center gap-2 rounded-md border border-green-500/20 bg-green-500/10 p-3 text-sm text-green-700 dark:text-green-400",
497
- children: [/* @__PURE__ */ p(u, { className: "size-4 shrink-0" }), /* @__PURE__ */ p("span", { children: ct })]
536
+ children: [/* @__PURE__ */ m(u, { className: "size-4 shrink-0" }), /* @__PURE__ */ m("span", { children: ut })]
498
537
  }) : null,
499
- /* @__PURE__ */ m("form", {
500
- onSubmit: Ot,
538
+ /* @__PURE__ */ h("form", {
539
+ onSubmit: jt,
501
540
  className: "space-y-4",
502
- children: [/* @__PURE__ */ m("div", {
541
+ children: [/* @__PURE__ */ h("div", {
503
542
  className: "space-y-2",
504
- children: [/* @__PURE__ */ p("label", {
543
+ children: [/* @__PURE__ */ m("label", {
505
544
  htmlFor: "workspace-invite-email",
506
545
  className: "text-sm font-medium",
507
- children: r(b, "workspaceInvite.emailLabel", "Email Address")
508
- }), /* @__PURE__ */ p(Oe, {
546
+ children: r(x, "workspaceInvite.emailLabel", "Email Address")
547
+ }), /* @__PURE__ */ m(Oe, {
509
548
  id: "workspace-invite-email",
510
549
  type: "email",
511
550
  placeholder: "member@example.com",
512
- value: N,
513
- onChange: (e) => it(e.target.value),
551
+ value: P,
552
+ onChange: (e) => ot(e.target.value),
514
553
  disabled: q
515
554
  })]
516
- }), /* @__PURE__ */ p("div", {
555
+ }), /* @__PURE__ */ m("div", {
517
556
  className: "flex justify-end",
518
- children: /* @__PURE__ */ m(g, {
557
+ children: /* @__PURE__ */ h(_, {
519
558
  type: "submit",
520
559
  disabled: q,
521
560
  className: "gap-2",
522
- children: [q ? /* @__PURE__ */ p(d, { className: "size-4 animate-spin" }) : /* @__PURE__ */ p(he, { className: "size-4" }), r(b, "workspaceInvite.sendSingleButton", "Send Invitation")]
561
+ children: [q ? /* @__PURE__ */ m(d, { className: "size-4 animate-spin" }) : /* @__PURE__ */ m(f, { className: "size-4" }), r(x, "workspaceInvite.sendSingleButton", "Send Invitation")]
523
562
  })
524
563
  })]
525
564
  })
526
565
  ]
527
566
  }),
528
- /* @__PURE__ */ m(je, {
567
+ /* @__PURE__ */ h(Ne, {
529
568
  value: "bulk",
530
569
  className: "space-y-5",
531
570
  children: [
532
- ut ? /* @__PURE__ */ m("div", {
571
+ ft ? /* @__PURE__ */ h("div", {
533
572
  className: "flex items-center gap-2 rounded-md border border-status-error-border/20 bg-status-error-bg/10 p-3 text-sm text-status-error-text",
534
- children: [/* @__PURE__ */ p(l, { className: "size-4 shrink-0" }), /* @__PURE__ */ p("span", { children: ut })]
573
+ children: [/* @__PURE__ */ m(l, { className: "size-4 shrink-0" }), /* @__PURE__ */ m("span", { children: ft })]
535
574
  }) : null,
536
- dt ? /* @__PURE__ */ m("div", {
575
+ pt ? /* @__PURE__ */ h("div", {
537
576
  className: "flex items-center gap-2 rounded-md border border-green-500/20 bg-green-500/10 p-3 text-sm text-green-700 dark:text-green-400",
538
- children: [/* @__PURE__ */ p(u, { className: "size-4 shrink-0" }), /* @__PURE__ */ p("span", { children: dt })]
577
+ children: [/* @__PURE__ */ m(u, { className: "size-4 shrink-0" }), /* @__PURE__ */ m("span", { children: pt })]
539
578
  }) : null,
540
- /* @__PURE__ */ m("div", {
579
+ /* @__PURE__ */ h("div", {
541
580
  className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
542
- children: [/* @__PURE__ */ m("div", {
581
+ children: [/* @__PURE__ */ h("div", {
543
582
  className: "space-y-1",
544
583
  children: [
545
- /* @__PURE__ */ p("p", {
584
+ /* @__PURE__ */ m("p", {
546
585
  className: "text-sm text-text-secondary",
547
- children: r(b, "workspaceInvite.bulkDescription", "Upload a CSV with one email column. All valid rows will receive the currently selected roles and projects.")
586
+ children: r(x, "workspaceInvite.bulkDescription", "Upload a CSV with one email column. All valid rows will receive the currently selected roles and projects.")
548
587
  }),
549
- /* @__PURE__ */ m("div", {
588
+ /* @__PURE__ */ h("div", {
550
589
  className: "rounded-md border bg-bg-sunken/30 px-3 py-2 text-xs text-text-secondary",
551
- children: [/* @__PURE__ */ p("p", {
590
+ children: [/* @__PURE__ */ m("p", {
552
591
  className: "font-medium text-text-primary",
553
592
  children: "Sample format"
554
- }), /* @__PURE__ */ m("pre", {
593
+ }), /* @__PURE__ */ h("pre", {
555
594
  className: "mt-1 whitespace-pre-wrap",
556
595
  children: [
557
596
  "email",
@@ -562,81 +601,81 @@ function O() {
562
601
  ]
563
602
  })]
564
603
  }),
565
- (A?.total ?? 0) > M.length ? /* @__PURE__ */ m("p", {
604
+ (j?.total ?? 0) > N.length ? /* @__PURE__ */ h("p", {
566
605
  className: "text-xs text-text-secondary",
567
606
  children: [
568
607
  "Showing the first ",
569
- M.length,
608
+ N.length,
570
609
  " active projects. Narrow the workspace project list if you need to invite into more."
571
610
  ]
572
611
  }) : null
573
612
  ]
574
- }), /* @__PURE__ */ m(g, {
613
+ }), /* @__PURE__ */ h(_, {
575
614
  type: "button",
576
615
  variant: "outline",
577
616
  onClick: ce,
578
617
  className: "gap-2",
579
- children: [/* @__PURE__ */ p(fe, { size: 16 }), r(b, "workspaceInvite.downloadTemplate", "Download template")]
618
+ children: [/* @__PURE__ */ m(fe, { size: 16 }), r(x, "workspaceInvite.downloadTemplate", "Download template")]
580
619
  })]
581
620
  }),
582
- /* @__PURE__ */ m("div", {
621
+ /* @__PURE__ */ h("div", {
583
622
  onDragOver: (e) => {
584
- e.preventDefault(), U(!0);
623
+ e.preventDefault(), W(!0);
585
624
  },
586
- onDragLeave: () => U(!1),
625
+ onDragLeave: () => W(!1),
587
626
  onDrop: (e) => {
588
- e.preventDefault(), U(!1);
627
+ e.preventDefault(), W(!1);
589
628
  let t = e.dataTransfer.files?.[0];
590
- t ? kt(t) : L("Please upload a .csv file.");
629
+ t ? Mt(t) : R("Please upload a .csv file.");
591
630
  },
592
- className: `flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed p-8 transition-colors ${mt ? "border-primary bg-action-primary-bg/5" : "border-border-subtle bg-bg-surface"}`,
631
+ className: `flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed p-8 transition-colors ${gt ? "border-primary bg-action-primary-bg/5" : "border-border-subtle bg-bg-surface"}`,
593
632
  children: [
594
- /* @__PURE__ */ p(ge, {
633
+ /* @__PURE__ */ m(he, {
595
634
  size: 28,
596
635
  className: "text-text-secondary"
597
636
  }),
598
- /* @__PURE__ */ m("div", {
637
+ /* @__PURE__ */ h("div", {
599
638
  className: "text-center",
600
- children: [/* @__PURE__ */ p("p", {
639
+ children: [/* @__PURE__ */ m("p", {
601
640
  className: "text-sm font-medium",
602
- children: ft || "Drop a CSV file here or click to browse"
603
- }), /* @__PURE__ */ p("p", {
641
+ children: mt || "Drop a CSV file here or click to browse"
642
+ }), /* @__PURE__ */ m("p", {
604
643
  className: "mt-1 text-xs text-text-secondary",
605
644
  children: "CSV files only. Required column: email."
606
645
  })]
607
646
  }),
608
- /* @__PURE__ */ p("input", {
609
- ref: gt,
647
+ /* @__PURE__ */ m("input", {
648
+ ref: vt,
610
649
  type: "file",
611
650
  accept: ".csv,text/csv",
612
651
  onChange: (e) => {
613
652
  let t = e.target.files?.[0];
614
- t && kt(t), e.target.value = "";
653
+ t && Mt(t), e.target.value = "";
615
654
  },
616
655
  className: "hidden",
617
656
  "aria-label": "Choose CSV file"
618
657
  }),
619
- /* @__PURE__ */ p(g, {
658
+ /* @__PURE__ */ m(_, {
620
659
  type: "button",
621
- onClick: () => gt.current?.click(),
622
- children: r(b, "workspaceInvite.chooseFile", "Choose file")
660
+ onClick: () => vt.current?.click(),
661
+ children: r(x, "workspaceInvite.chooseFile", "Choose file")
623
662
  })
624
663
  ]
625
664
  }),
626
- V.length > 0 ? /* @__PURE__ */ m(ye, { children: [
627
- /* @__PURE__ */ m("div", {
665
+ H.length > 0 ? /* @__PURE__ */ h(ve, { children: [
666
+ /* @__PURE__ */ h("div", {
628
667
  className: "flex flex-wrap gap-4 text-xs text-text-secondary",
629
668
  children: [
630
- /* @__PURE__ */ m("span", { children: ["Total rows: ", V.length] }),
631
- /* @__PURE__ */ m("span", { children: ["Ready: ", Q.length] }),
632
- /* @__PURE__ */ m("span", { children: ["With errors: ", $.length] }),
633
- $.length > 0 ? /* @__PURE__ */ p(h, {
669
+ /* @__PURE__ */ h("span", { children: ["Total rows: ", H.length] }),
670
+ /* @__PURE__ */ h("span", { children: ["Ready: ", Q.length] }),
671
+ /* @__PURE__ */ h("span", { children: ["With errors: ", $.length] }),
672
+ $.length > 0 ? /* @__PURE__ */ m(g, {
634
673
  variant: "destructive",
635
674
  children: "Invalid rows will be skipped"
636
675
  }) : null
637
676
  ]
638
677
  }),
639
- $.length > 0 ? /* @__PURE__ */ m("div", {
678
+ $.length > 0 ? /* @__PURE__ */ h("div", {
640
679
  className: "rounded-md border border-status-error-border/20 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
641
680
  children: [
642
681
  $.length,
@@ -645,26 +684,26 @@ function O() {
645
684
  " need attention. Only valid rows can be invited."
646
685
  ]
647
686
  }) : null,
648
- /* @__PURE__ */ p("div", {
687
+ /* @__PURE__ */ m("div", {
649
688
  className: "overflow-hidden rounded-xl border",
650
- children: /* @__PURE__ */ p(ke, {
651
- columns: ze,
652
- data: V,
689
+ children: /* @__PURE__ */ m(je, {
690
+ columns: Ve,
691
+ data: H,
653
692
  rowKey: (e) => `${e.rowNumber}-${e.email}`
654
693
  })
655
694
  })
656
- ] }) : /* @__PURE__ */ p("div", {
695
+ ] }) : /* @__PURE__ */ m("div", {
657
696
  className: "rounded-xl border border-dashed p-6 text-center text-sm text-text-secondary",
658
697
  children: "Upload a CSV to preview invite rows here before sending."
659
698
  }),
660
- /* @__PURE__ */ p("div", {
699
+ /* @__PURE__ */ m("div", {
661
700
  className: "flex justify-end",
662
- children: /* @__PURE__ */ m(g, {
701
+ children: /* @__PURE__ */ h(_, {
663
702
  type: "button",
664
- onClick: At,
665
- disabled: Q.length === 0 || yt || W,
703
+ onClick: Nt,
704
+ disabled: Q.length === 0 || St || G,
666
705
  className: "gap-2",
667
- children: [yt || W ? /* @__PURE__ */ p(d, { className: "size-4 animate-spin" }) : /* @__PURE__ */ p(he, { className: "size-4" }), r(b, "workspaceInvite.sendBulkButton", "Send Bulk Invites")]
706
+ children: [St || G ? /* @__PURE__ */ m(d, { className: "size-4 animate-spin" }) : /* @__PURE__ */ m(f, { className: "size-4" }), r(x, "workspaceInvite.sendBulkButton", "Send Bulk Invites")]
668
707
  })
669
708
  })
670
709
  ]
@@ -672,131 +711,133 @@ function O() {
672
711
  ]
673
712
  }) })]
674
713
  }),
675
- /* @__PURE__ */ m(x, {
714
+ /* @__PURE__ */ h(S, {
676
715
  treatment: "plain",
716
+ id: "invite-pending-section",
677
717
  className: "border-border-seam",
678
- children: [/* @__PURE__ */ p(v, { children: /* @__PURE__ */ m(y, {
718
+ children: [/* @__PURE__ */ m(y, { children: /* @__PURE__ */ h(b, {
679
719
  className: "flex items-center gap-2",
680
720
  children: [
681
- /* @__PURE__ */ p(pe, { className: "size-5 text-primary" }),
682
- r(b, "workspaceInvite.pendingTitle", "Pending Invitations"),
683
- /* @__PURE__ */ p(h, {
721
+ /* @__PURE__ */ m(pe, { className: "size-5 text-primary" }),
722
+ r(x, "workspaceInvite.pendingTitle", "Pending Invitations"),
723
+ /* @__PURE__ */ m(g, {
684
724
  variant: "secondary",
685
725
  className: "tabular-nums",
686
726
  children: Z.length
687
727
  })
688
728
  ]
689
- }) }), /* @__PURE__ */ m(_, { children: [z ? /* @__PURE__ */ m("div", {
690
- className: `mb-4 flex items-center gap-2 rounded-md border p-3 text-sm ${z.tone === "success" ? "border-green-500/20 bg-green-500/10 text-green-700 dark:text-green-400" : "border-status-error-border/20 bg-status-error-bg/10 text-status-error-text"}`,
691
- children: [z.tone === "success" ? /* @__PURE__ */ p(u, { className: "size-4 shrink-0" }) : /* @__PURE__ */ p(l, { className: "size-4 shrink-0" }), /* @__PURE__ */ p("span", { children: z.message })]
692
- }) : null, $e ? /* @__PURE__ */ m("div", {
729
+ }) }), /* @__PURE__ */ h(v, { children: [B ? /* @__PURE__ */ h("div", {
730
+ className: `mb-4 flex items-center gap-2 rounded-md border p-3 text-sm ${B.tone === "success" ? "border-green-500/20 bg-green-500/10 text-green-700 dark:text-green-400" : "border-status-error-border/20 bg-status-error-bg/10 text-status-error-text"}`,
731
+ children: [B.tone === "success" ? /* @__PURE__ */ m(u, { className: "size-4 shrink-0" }) : /* @__PURE__ */ m(l, { className: "size-4 shrink-0" }), /* @__PURE__ */ m("span", { children: B.message })]
732
+ }) : null, tt ? /* @__PURE__ */ h("div", {
693
733
  className: "space-y-3",
694
- children: [/* @__PURE__ */ p(S, { className: "h-20 w-full" }), /* @__PURE__ */ p(S, { className: "h-20 w-full" })]
695
- }) : et && Z.length === 0 ? /* @__PURE__ */ m("div", {
734
+ children: [/* @__PURE__ */ m(C, { className: "h-20 w-full" }), /* @__PURE__ */ m(C, { className: "h-20 w-full" })]
735
+ }) : nt && Z.length === 0 ? /* @__PURE__ */ h("div", {
696
736
  role: "alert",
697
737
  className: "space-y-3 rounded-md border border-status-error-border/20 bg-status-error-bg/10 p-3 text-sm text-status-error-text",
698
- children: [/* @__PURE__ */ p("p", { children: r(b, "workspaceInvite.pendingLoadFailed", "Failed to load pending invitations for this workspace.") }), /* @__PURE__ */ p(g, {
738
+ children: [/* @__PURE__ */ m("p", { children: r(x, "workspaceInvite.pendingLoadFailed", "Failed to load pending invitations for this workspace.") }), /* @__PURE__ */ m(_, {
699
739
  type: "button",
700
740
  variant: "outline",
701
741
  size: "sm",
702
742
  className: "w-fit",
703
- disabled: j,
743
+ disabled: M,
704
744
  onClick: () => {
705
- tt();
745
+ rt();
706
746
  },
707
- children: j ? r(b, "workspaceInvite.retrying", "Retrying…") : r(b, "workspaceInvite.tryAgain", "Try again")
747
+ children: M ? r(x, "workspaceInvite.retrying", "Retrying…") : r(x, "workspaceInvite.tryAgain", "Try again")
708
748
  })]
709
- }) : Z.length === 0 ? /* @__PURE__ */ p("p", {
710
- className: "text-sm text-text-secondary",
711
- children: r(b, "workspaceInvite.pendingEmpty", "No pending invitations for this workspace.")
712
- }) : /* @__PURE__ */ m("div", {
749
+ }) : Z.length === 0 ? /* @__PURE__ */ m(De, {
750
+ illustration: "empty-notifications",
751
+ title: r(x, "workspaceInvite.pendingEmptyTitle", "No pending invitations"),
752
+ description: r(x, "workspaceInvite.pendingEmpty", "Invitations you send for this workspace will show up here until they are accepted, so you can resend or cancel them.")
753
+ }) : /* @__PURE__ */ h("div", {
713
754
  className: "space-y-3",
714
- children: [et ? /* @__PURE__ */ m("div", {
755
+ children: [nt ? /* @__PURE__ */ h("div", {
715
756
  role: "alert",
716
757
  className: "flex flex-wrap items-center justify-between gap-3 rounded-md border border-status-error-border/20 bg-status-error-bg/10 p-3 text-sm text-status-error-text",
717
- children: [/* @__PURE__ */ p("span", { children: r(b, "workspaceInvite.pendingStaleWarning", "Pending invitations may be outdated. Try again to refresh this list.") }), /* @__PURE__ */ p(g, {
758
+ children: [/* @__PURE__ */ m("span", { children: r(x, "workspaceInvite.pendingStaleWarning", "Pending invitations may be outdated. Try again to refresh this list.") }), /* @__PURE__ */ m(_, {
718
759
  type: "button",
719
760
  variant: "outline",
720
761
  size: "sm",
721
762
  className: "w-fit",
722
- disabled: j,
763
+ disabled: M,
723
764
  onClick: () => {
724
- tt();
765
+ rt();
725
766
  },
726
- children: j ? r(b, "workspaceInvite.retrying", "Retrying…") : r(b, "workspaceInvite.tryAgain", "Try again")
767
+ children: M ? r(x, "workspaceInvite.retrying", "Retrying…") : r(x, "workspaceInvite.tryAgain", "Try again")
727
768
  })]
728
769
  }) : null, Z.map((e) => {
729
- let t = ie(e), n = re(e), r = St === e.id && (J || Y);
730
- return /* @__PURE__ */ p("div", {
770
+ let t = ie(e), n = re(e), r = Tt === e.id && (J || Y);
771
+ return /* @__PURE__ */ m("div", {
731
772
  className: "rounded-lg border p-4",
732
- children: /* @__PURE__ */ m("div", {
773
+ children: /* @__PURE__ */ h("div", {
733
774
  className: "flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",
734
- children: [/* @__PURE__ */ m("div", {
775
+ children: [/* @__PURE__ */ h("div", {
735
776
  className: "space-y-3",
736
777
  children: [
737
- /* @__PURE__ */ m("div", {
778
+ /* @__PURE__ */ h("div", {
738
779
  className: "flex flex-wrap items-center gap-2",
739
- children: [/* @__PURE__ */ p("p", {
780
+ children: [/* @__PURE__ */ m("p", {
740
781
  className: "font-semibold",
741
782
  children: e.email
742
- }), /* @__PURE__ */ p(h, {
783
+ }), /* @__PURE__ */ m(g, {
743
784
  variant: "outline",
744
785
  children: e.status
745
786
  })]
746
787
  }),
747
- /* @__PURE__ */ m("div", {
788
+ /* @__PURE__ */ h("div", {
748
789
  className: "grid gap-3 text-sm text-text-secondary sm:grid-cols-2",
749
- children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
790
+ children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
750
791
  className: "font-medium text-text-primary",
751
792
  children: "Received"
752
- }), /* @__PURE__ */ p("p", { children: Ve(e.createdAt) ?? "—" })] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
793
+ }), /* @__PURE__ */ m("p", { children: Ue(e.createdAt) ?? "—" })] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
753
794
  className: "font-medium text-text-primary",
754
795
  children: "Expires"
755
- }), /* @__PURE__ */ p("p", { children: Ve(e.expiresAt) ?? "—" })] })]
796
+ }), /* @__PURE__ */ m("p", { children: Ue(e.expiresAt) ?? "—" })] })]
756
797
  }),
757
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
798
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
758
799
  className: "mb-2 text-sm font-medium text-text-primary",
759
800
  children: "Roles"
760
- }), /* @__PURE__ */ p("div", {
801
+ }), /* @__PURE__ */ m("div", {
761
802
  className: "flex flex-wrap gap-2",
762
- children: t.length > 0 ? t.map((t, n) => /* @__PURE__ */ p(h, {
803
+ children: t.length > 0 ? t.map((t, n) => /* @__PURE__ */ m(g, {
763
804
  variant: "outline",
764
805
  children: t
765
- }, `${e.id}-${e.roleIds[n] ?? t}`)) : /* @__PURE__ */ p("span", {
806
+ }, `${e.id}-${e.roleIds[n] ?? t}`)) : /* @__PURE__ */ m("span", {
766
807
  className: "text-sm text-text-secondary",
767
808
  children: "No roles selected"
768
809
  })
769
810
  })] }),
770
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
811
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
771
812
  className: "mb-2 text-sm font-medium text-text-primary",
772
813
  children: "Projects"
773
- }), /* @__PURE__ */ p("div", {
814
+ }), /* @__PURE__ */ m("div", {
774
815
  className: "flex flex-wrap gap-2",
775
- children: n.length > 0 ? n.map((t, n) => /* @__PURE__ */ p(h, {
816
+ children: n.length > 0 ? n.map((t, n) => /* @__PURE__ */ m(g, {
776
817
  variant: "secondary",
777
818
  children: t
778
- }, `${e.id}-project-${t}-${n}`)) : /* @__PURE__ */ p("span", {
819
+ }, `${e.id}-project-${t}-${n}`)) : /* @__PURE__ */ m("span", {
779
820
  className: "text-sm text-text-secondary",
780
821
  children: "No project access will be granted automatically"
781
822
  })
782
823
  })] })
783
824
  ]
784
- }), /* @__PURE__ */ m("div", {
825
+ }), /* @__PURE__ */ h("div", {
785
826
  className: "flex gap-2",
786
- children: [/* @__PURE__ */ m(g, {
827
+ children: [/* @__PURE__ */ h(_, {
787
828
  type: "button",
788
829
  variant: "outline",
789
830
  disabled: J || Y,
790
- onClick: () => jt(e),
831
+ onClick: () => Pt(e),
791
832
  className: "gap-2",
792
- children: [r && J ? /* @__PURE__ */ p(me, { className: "size-4 animate-spin" }) : /* @__PURE__ */ p(me, { className: "size-4" }), "Resend"]
793
- }), /* @__PURE__ */ m(g, {
833
+ children: [r && J ? /* @__PURE__ */ m(me, { className: "size-4 animate-spin" }) : /* @__PURE__ */ m(me, { className: "size-4" }), "Resend"]
834
+ }), /* @__PURE__ */ h(_, {
794
835
  type: "button",
795
836
  variant: "outline",
796
837
  disabled: J || Y,
797
- onClick: () => K(e),
838
+ onClick: () => yt(e),
798
839
  className: "gap-2",
799
- children: [r && Y ? /* @__PURE__ */ p(d, { className: "size-4 animate-spin" }) : /* @__PURE__ */ p(f, { className: "size-4" }), "Cancel"]
840
+ children: [r && Y ? /* @__PURE__ */ m(d, { className: "size-4 animate-spin" }) : /* @__PURE__ */ m(p, { className: "size-4" }), "Cancel"]
800
841
  })]
801
842
  })]
802
843
  })
@@ -807,16 +848,16 @@ function O() {
807
848
  ]
808
849
  })] });
809
850
  }
810
- function Ge() {
811
- let { workspaceId: t } = Ie(), { workspaceId: n } = e();
812
- return /* @__PURE__ */ p(ve, {
851
+ function qe() {
852
+ let { workspaceId: t } = Re(), { workspaceId: n } = e();
853
+ return /* @__PURE__ */ m(_e, {
813
854
  scopeId: t || n || null,
814
855
  gateway: "workspace",
815
856
  debug: !1,
816
- children: /* @__PURE__ */ p(O, {})
857
+ children: /* @__PURE__ */ m(k, {})
817
858
  });
818
859
  }
819
860
  //#endregion
820
- export { Ge as WorkspaceInvitePage };
861
+ export { qe as WorkspaceInvitePage };
821
862
 
822
863
  //# sourceMappingURL=WorkspaceInvitePage.js.map