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