@burdenoff/microfe-workspaces 2026.1123.2 → 2026.1125.1

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