@burdenoff/microfe-workspaces 2026.1123.3 → 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.
- package/dist/WorkspacesRoutes.js +86 -78
- package/dist/components/loadingSystem.d.ts +64 -0
- package/dist/components/loadingSystem.js +32 -0
- package/dist/components/tags/ProjectTagsWidget.js +45 -44
- package/dist/pages/InviteAcceptancePage.js +225 -212
- package/dist/pages/MembersListPage.js +143 -141
- package/dist/pages/PendingInvitesPage.js +118 -107
- package/dist/pages/WorkspaceInvitePage.js +381 -369
- package/dist/pages/dashboard/DashboardCustomizer.js +92 -89
- package/dist/pages/dashboard/DashboardPage.js +62 -58
- package/package.json +4 -3
|
@@ -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 {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
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
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
54
|
+
children: e.errors.map((t) => /* @__PURE__ */ w("span", {
|
|
53
55
|
className: "inline-flex items-center gap-1 pr-3",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
56
|
+
children: [/* @__PURE__ */ C(Ce, { size: 14 }), t]
|
|
55
57
|
}, `${e.rowNumber}-${t}`))
|
|
56
|
-
}) : e.status.kind === "sending" ? /* @__PURE__ */
|
|
58
|
+
}) : e.status.kind === "sending" ? /* @__PURE__ */ w("span", {
|
|
57
59
|
className: "inline-flex items-center gap-1 text-text-secondary",
|
|
58
|
-
children: [/* @__PURE__ */
|
|
60
|
+
children: [/* @__PURE__ */ C(s, {
|
|
59
61
|
size: 14,
|
|
60
62
|
className: "animate-spin"
|
|
61
63
|
}), "Sending..."]
|
|
62
|
-
}) : e.status.kind === "invited" ? /* @__PURE__ */
|
|
64
|
+
}) : e.status.kind === "invited" ? /* @__PURE__ */ w("span", {
|
|
63
65
|
className: "inline-flex items-center gap-1 text-status-success-text",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
65
|
-
}) : e.status.kind === "failed" ? /* @__PURE__ */
|
|
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__ */
|
|
68
|
-
}) : /* @__PURE__ */
|
|
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
|
|
76
|
+
function Qe(e) {
|
|
75
77
|
return e.type === "text/csv" || e.name.toLowerCase().endsWith(".csv");
|
|
76
78
|
}
|
|
77
|
-
function
|
|
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
|
|
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
|
|
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
|
|
96
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
100
|
+
children: [/* @__PURE__ */ w("div", {
|
|
99
101
|
className: "space-y-3",
|
|
100
|
-
children: [/* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ w("div", {
|
|
101
103
|
className: "flex flex-wrap items-center justify-between gap-2",
|
|
102
|
-
children: [/* @__PURE__ */
|
|
104
|
+
children: [/* @__PURE__ */ w("div", {
|
|
103
105
|
className: "space-y-1",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ C("h3", {
|
|
105
107
|
className: "text-base font-semibold",
|
|
106
108
|
children: "Roles (Optional)"
|
|
107
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
113
|
+
}), e.length > 0 ? /* @__PURE__ */ w(d, {
|
|
112
114
|
variant: "secondary",
|
|
113
115
|
children: [e.length, " selected"]
|
|
114
116
|
}) : null]
|
|
115
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
119
|
+
children: ee ? /* @__PURE__ */ C("p", {
|
|
118
120
|
className: "text-sm text-text-secondary",
|
|
119
121
|
children: "Loading roles…"
|
|
120
|
-
}) : i.length === 0 ? /* @__PURE__ */
|
|
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__ */
|
|
127
|
+
return /* @__PURE__ */ w(Ue, { children: [/* @__PURE__ */ C(x, {
|
|
126
128
|
asChild: !0,
|
|
127
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
131
|
+
children: [/* @__PURE__ */ C("span", {
|
|
130
132
|
className: "min-w-0 flex-1 truncate",
|
|
131
133
|
children: n.name
|
|
132
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
141
|
+
}), /* @__PURE__ */ w(y, {
|
|
140
142
|
className: "max-w-xs text-sm leading-6",
|
|
141
143
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ C("p", {
|
|
143
145
|
className: "font-medium",
|
|
144
146
|
children: n.name
|
|
145
147
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
160
|
+
}), /* @__PURE__ */ w("div", {
|
|
159
161
|
className: "space-y-3",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
162
|
+
children: [/* @__PURE__ */ w("div", {
|
|
161
163
|
className: "flex flex-wrap items-center justify-between gap-2",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
164
|
+
children: [/* @__PURE__ */ w("div", {
|
|
163
165
|
className: "space-y-1",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ C("h3", {
|
|
165
167
|
className: "text-base font-semibold",
|
|
166
168
|
children: "Projects to add on acceptance (Optional)"
|
|
167
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
173
|
+
}), n.length > 0 ? /* @__PURE__ */ w(d, {
|
|
172
174
|
variant: "secondary",
|
|
173
175
|
children: [n.length, " selected"]
|
|
174
176
|
}) : null]
|
|
175
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
179
|
+
children: te ? /* @__PURE__ */ C("p", {
|
|
178
180
|
className: "text-sm text-text-secondary",
|
|
179
181
|
children: "Loading projects…"
|
|
180
|
-
}) : a.length === 0 ? /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
189
|
+
children: [/* @__PURE__ */ w("div", {
|
|
188
190
|
className: "min-w-0 flex-1 space-y-1",
|
|
189
|
-
children: [/* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ C("p", {
|
|
190
192
|
className: "truncate text-sm font-semibold leading-tight",
|
|
191
193
|
children: e.name
|
|
192
|
-
}), /* @__PURE__ */
|
|
194
|
+
}), /* @__PURE__ */ w("div", {
|
|
193
195
|
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
194
|
-
children: [/* @__PURE__ */
|
|
196
|
+
children: [/* @__PURE__ */ C("span", {
|
|
195
197
|
className: "truncate font-mono",
|
|
196
198
|
children: e.key
|
|
197
|
-
}), /* @__PURE__ */
|
|
199
|
+
}), /* @__PURE__ */ C(d, {
|
|
198
200
|
variant: "outline",
|
|
199
201
|
children: e.status
|
|
200
202
|
})]
|
|
201
203
|
})]
|
|
202
|
-
}), /* @__PURE__ */
|
|
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
|
|
215
|
-
let { workspaceId:
|
|
216
|
-
se("workspaces.invite", { workspaceId:
|
|
217
|
-
let { canInviteMember:
|
|
218
|
-
if (!
|
|
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__ */
|
|
222
|
+
children: /* @__PURE__ */ w("div", {
|
|
221
223
|
className: "rounded-xl border bg-bg-surface p-8 text-center",
|
|
222
224
|
children: [
|
|
223
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ C("h1", {
|
|
224
226
|
className: "text-2xl font-bold",
|
|
225
|
-
children: e(
|
|
227
|
+
children: e(y, "workspaceInvite.noWorkspaceTitle", "Select a workspace first")
|
|
226
228
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ C("p", {
|
|
228
230
|
className: "mt-2 text-text-secondary",
|
|
229
|
-
children: e(
|
|
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__ */
|
|
233
|
+
/* @__PURE__ */ C("div", {
|
|
232
234
|
className: "mt-4",
|
|
233
|
-
children: /* @__PURE__ */
|
|
234
|
-
onClick: () =>
|
|
235
|
+
children: /* @__PURE__ */ C(f, {
|
|
236
|
+
onClick: () => b(D(`${x}/list`)),
|
|
235
237
|
variant: "outline",
|
|
236
|
-
children: e(
|
|
238
|
+
children: e(y, "workspaceInvite.backToWorkspaces", "Back to Workspaces")
|
|
237
239
|
})
|
|
238
240
|
})
|
|
239
241
|
]
|
|
240
242
|
})
|
|
241
243
|
});
|
|
242
|
-
if (
|
|
244
|
+
if (rt || at) return /* @__PURE__ */ w("div", {
|
|
243
245
|
className: "space-y-6 p-6",
|
|
244
246
|
children: [
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
-
/* @__PURE__ */
|
|
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 (!
|
|
252
|
+
if (!nt && O) return /* @__PURE__ */ w("div", {
|
|
251
253
|
className: "mx-auto max-w-3xl p-3 sm:p-6",
|
|
252
|
-
children: [/* @__PURE__ */
|
|
254
|
+
children: [/* @__PURE__ */ C("h1", {
|
|
253
255
|
className: "sr-only",
|
|
254
|
-
children: e(
|
|
255
|
-
}), /* @__PURE__ */
|
|
256
|
-
message: e(
|
|
257
|
-
granterHint: e(
|
|
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 (!
|
|
262
|
+
if (!nt) return /* @__PURE__ */ C("div", {
|
|
261
263
|
className: "flex min-h-[400px] items-center justify-center",
|
|
262
|
-
children: /* @__PURE__ */
|
|
264
|
+
children: /* @__PURE__ */ w("div", {
|
|
263
265
|
className: "space-y-2 text-center",
|
|
264
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
265
267
|
className: "text-lg font-semibold",
|
|
266
|
-
children: e(
|
|
267
|
-
}), /* @__PURE__ */
|
|
268
|
+
children: e(y, "workspaceInvite.accessDenied", "Access Denied")
|
|
269
|
+
}), /* @__PURE__ */ C("p", {
|
|
268
270
|
className: "text-sm text-text-secondary",
|
|
269
|
-
children: e(
|
|
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 (
|
|
275
|
+
if (ot || !it) return /* @__PURE__ */ w("div", {
|
|
274
276
|
className: "space-y-4 p-6",
|
|
275
|
-
children: [/* @__PURE__ */
|
|
277
|
+
children: [/* @__PURE__ */ w(f, {
|
|
276
278
|
variant: "ghost",
|
|
277
|
-
onClick: () =>
|
|
279
|
+
onClick: () => b(D(`${x}/list`)),
|
|
278
280
|
className: "gap-2",
|
|
279
|
-
children: [/* @__PURE__ */
|
|
280
|
-
}), /* @__PURE__ */
|
|
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(
|
|
284
|
+
children: e(y, "workspaceInvite.workspaceLoadError", "Unable to load workspace invite details.")
|
|
283
285
|
})]
|
|
284
286
|
});
|
|
285
|
-
let
|
|
286
|
-
|
|
287
|
-
},
|
|
288
|
-
|
|
289
|
-
},
|
|
290
|
-
if (e.preventDefault(),
|
|
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
|
|
294
|
+
await Mt(le(k, N.trim().toLowerCase(), P, F)), gt(""), St(`Invitation sent to ${N.trim().toLowerCase()}.`);
|
|
293
295
|
} catch (e) {
|
|
294
|
-
|
|
296
|
+
bt(E(e));
|
|
295
297
|
}
|
|
296
|
-
},
|
|
297
|
-
if (!
|
|
298
|
-
|
|
298
|
+
}, Vt = (e) => {
|
|
299
|
+
if (!Qe(e)) {
|
|
300
|
+
I("Please upload a .csv file.");
|
|
299
301
|
return;
|
|
300
302
|
}
|
|
301
|
-
if (e.size >
|
|
302
|
-
|
|
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,
|
|
308
|
-
|
|
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
|
-
}))),
|
|
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
|
-
|
|
315
|
+
I("Failed to read CSV file.");
|
|
314
316
|
}, t.readAsText(e);
|
|
315
|
-
},
|
|
316
|
-
if (!(Q.length === 0 ||
|
|
317
|
-
|
|
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
|
|
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)),
|
|
327
|
+
} : e)), Tt(`Sent ${Q.length} workspace invitation${Q.length === 1 ? "" : "s"}.`);
|
|
326
328
|
} catch (e) {
|
|
327
|
-
let t =
|
|
328
|
-
|
|
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)),
|
|
336
|
+
} : e)), I(t);
|
|
335
337
|
} finally {
|
|
336
|
-
|
|
338
|
+
At(!1);
|
|
337
339
|
}
|
|
338
340
|
}
|
|
339
|
-
},
|
|
340
|
-
|
|
341
|
+
}, Ut = (e) => {
|
|
342
|
+
R(null), J(e.id), Pt(e.id, {
|
|
341
343
|
onSuccess: () => {
|
|
342
|
-
|
|
344
|
+
R({
|
|
343
345
|
tone: "success",
|
|
344
346
|
message: `Invitation resent to ${e.email}.`
|
|
345
347
|
});
|
|
346
348
|
},
|
|
347
349
|
onError: (e) => {
|
|
348
|
-
|
|
350
|
+
R({
|
|
349
351
|
tone: "error",
|
|
350
|
-
message:
|
|
352
|
+
message: E(e)
|
|
351
353
|
});
|
|
352
354
|
},
|
|
353
355
|
onSettled: () => J(null)
|
|
354
356
|
});
|
|
355
|
-
},
|
|
356
|
-
|
|
357
|
+
}, Wt = () => {
|
|
358
|
+
H && (R(null), J(H.id), Ft(H.id, {
|
|
357
359
|
onSuccess: () => {
|
|
358
|
-
|
|
360
|
+
R({
|
|
359
361
|
tone: "success",
|
|
360
|
-
message: `Invitation cancelled for ${
|
|
361
|
-
}),
|
|
362
|
+
message: `Invitation cancelled for ${H.email}.`
|
|
363
|
+
}), U(null);
|
|
362
364
|
},
|
|
363
365
|
onError: (e) => {
|
|
364
|
-
|
|
366
|
+
R({
|
|
365
367
|
tone: "error",
|
|
366
|
-
message:
|
|
368
|
+
message: E(e)
|
|
367
369
|
});
|
|
368
370
|
},
|
|
369
371
|
onSettled: () => J(null)
|
|
370
372
|
}));
|
|
371
|
-
},
|
|
372
|
-
|
|
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__ */
|
|
376
|
+
children: [/* @__PURE__ */ C(he, { className: "size-4 shrink-0" }), /* @__PURE__ */ C("span", { children: yt })]
|
|
375
377
|
}) : null,
|
|
376
|
-
|
|
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__ */
|
|
380
|
+
children: [/* @__PURE__ */ C(u, { className: "size-4 shrink-0" }), /* @__PURE__ */ C("span", { children: xt })]
|
|
379
381
|
}) : null,
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
-
onSubmit:
|
|
382
|
+
/* @__PURE__ */ w("form", {
|
|
383
|
+
onSubmit: Bt,
|
|
382
384
|
className: "space-y-4",
|
|
383
|
-
children: [/* @__PURE__ */
|
|
385
|
+
children: [/* @__PURE__ */ w("div", {
|
|
384
386
|
className: "space-y-2",
|
|
385
|
-
children: [/* @__PURE__ */
|
|
387
|
+
children: [/* @__PURE__ */ C("label", {
|
|
386
388
|
htmlFor: "workspace-invite-email",
|
|
387
389
|
className: "text-sm font-medium",
|
|
388
|
-
children: e(
|
|
389
|
-
}), /* @__PURE__ */
|
|
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(
|
|
393
|
-
value:
|
|
394
|
-
onChange: (e) =>
|
|
395
|
-
disabled:
|
|
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__ */
|
|
399
|
+
}), /* @__PURE__ */ C("div", {
|
|
398
400
|
className: "flex justify-end",
|
|
399
|
-
children: /* @__PURE__ */
|
|
401
|
+
children: /* @__PURE__ */ w(f, {
|
|
402
|
+
busy: g && W,
|
|
400
403
|
type: "submit",
|
|
401
|
-
disabled:
|
|
404
|
+
disabled: !g && W,
|
|
402
405
|
className: "gap-2",
|
|
403
|
-
children: [
|
|
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
|
-
] }),
|
|
408
|
-
|
|
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__ */
|
|
413
|
+
children: [/* @__PURE__ */ C(he, { className: "size-4 shrink-0" }), /* @__PURE__ */ C("span", { children: Ct })]
|
|
411
414
|
}) : null,
|
|
412
|
-
|
|
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__ */
|
|
417
|
+
children: [/* @__PURE__ */ C(u, { className: "size-4 shrink-0" }), /* @__PURE__ */ C("span", { children: wt })]
|
|
415
418
|
}) : null,
|
|
416
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ w("div", {
|
|
417
420
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
418
|
-
children: [/* @__PURE__ */
|
|
421
|
+
children: [/* @__PURE__ */ w("div", {
|
|
419
422
|
className: "space-y-1",
|
|
420
423
|
children: [
|
|
421
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ C("p", {
|
|
422
425
|
className: "text-sm text-text-secondary",
|
|
423
|
-
children: e(
|
|
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__ */
|
|
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__ */
|
|
430
|
+
children: [/* @__PURE__ */ C("p", {
|
|
428
431
|
className: "font-medium text-text-primary",
|
|
429
432
|
children: "Sample format"
|
|
430
|
-
}), /* @__PURE__ */
|
|
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
|
-
(
|
|
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
|
-
|
|
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__ */
|
|
453
|
+
}), /* @__PURE__ */ w(f, {
|
|
451
454
|
type: "button",
|
|
452
455
|
variant: "outline",
|
|
453
456
|
onClick: de,
|
|
454
457
|
className: "gap-2",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ C(_e, { size: 16 }), e(y, "workspaceInvite.downloadTemplate", "Download template")]
|
|
456
459
|
})]
|
|
457
460
|
}),
|
|
458
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ w("div", {
|
|
459
462
|
onDragOver: (e) => {
|
|
460
|
-
e.preventDefault(),
|
|
463
|
+
e.preventDefault(), kt(!0);
|
|
461
464
|
},
|
|
462
|
-
onDragLeave: () =>
|
|
465
|
+
onDragLeave: () => kt(!1),
|
|
463
466
|
onDrop: (e) => {
|
|
464
|
-
e.preventDefault(),
|
|
467
|
+
e.preventDefault(), kt(!1);
|
|
465
468
|
let t = e.dataTransfer.files?.[0];
|
|
466
|
-
t ?
|
|
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 ${
|
|
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__ */
|
|
473
|
+
/* @__PURE__ */ C(xe, {
|
|
471
474
|
size: 28,
|
|
472
475
|
className: "text-text-secondary"
|
|
473
476
|
}),
|
|
474
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ w("div", {
|
|
475
478
|
className: "text-center",
|
|
476
|
-
children: [/* @__PURE__ */
|
|
479
|
+
children: [/* @__PURE__ */ C("p", {
|
|
477
480
|
className: "text-sm font-medium",
|
|
478
|
-
children:
|
|
479
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
485
|
-
ref:
|
|
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 &&
|
|
493
|
+
t && Vt(t), e.target.value = "";
|
|
491
494
|
},
|
|
492
495
|
className: "hidden",
|
|
493
|
-
"aria-label": e(
|
|
496
|
+
"aria-label": e(y, "workspaceInvite.chooseCsvFileAriaLabel", "Choose CSV file")
|
|
494
497
|
}),
|
|
495
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ C(f, {
|
|
496
499
|
type: "button",
|
|
497
|
-
onClick: () =>
|
|
498
|
-
children: e(
|
|
500
|
+
onClick: () => jt.current?.click(),
|
|
501
|
+
children: e(y, "workspaceInvite.chooseFile", "Choose file")
|
|
499
502
|
})
|
|
500
503
|
]
|
|
501
504
|
}),
|
|
502
|
-
|
|
503
|
-
/* @__PURE__ */
|
|
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__ */
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
-
/* @__PURE__ */
|
|
509
|
-
$.length > 0 ? /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
527
|
+
/* @__PURE__ */ C("div", {
|
|
525
528
|
className: "overflow-hidden rounded-xl border",
|
|
526
|
-
children: /* @__PURE__ */
|
|
527
|
-
columns:
|
|
528
|
-
data:
|
|
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__ */
|
|
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__ */
|
|
539
|
+
/* @__PURE__ */ C("div", {
|
|
537
540
|
className: "flex justify-end",
|
|
538
|
-
children: /* @__PURE__ */
|
|
541
|
+
children: /* @__PURE__ */ w(f, {
|
|
542
|
+
busy: g && (G || V),
|
|
539
543
|
type: "button",
|
|
540
|
-
onClick:
|
|
541
|
-
disabled: Q.length === 0 ||
|
|
544
|
+
onClick: Ht,
|
|
545
|
+
disabled: Q.length === 0 || G || V,
|
|
542
546
|
className: "gap-2",
|
|
543
|
-
children: [
|
|
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
|
-
] }),
|
|
547
|
-
className: `mb-4 flex items-center gap-2 rounded-md border p-3 text-sm ${
|
|
548
|
-
children: [
|
|
549
|
-
}) : null,
|
|
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__ */
|
|
552
|
-
}) :
|
|
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__ */
|
|
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:
|
|
564
|
+
disabled: j,
|
|
561
565
|
onClick: () => {
|
|
562
|
-
|
|
566
|
+
pt();
|
|
563
567
|
},
|
|
564
|
-
children:
|
|
568
|
+
children: j ? e(y, "workspaceInvite.retrying", "Retrying…") : e(y, "workspaceInvite.tryAgain", "Try again")
|
|
565
569
|
})]
|
|
566
|
-
}) : Y.length === 0 ? /* @__PURE__ */
|
|
570
|
+
}) : Y.length === 0 ? /* @__PURE__ */ C(Ne, {
|
|
567
571
|
illustration: "empty-notifications",
|
|
568
|
-
title: e(
|
|
569
|
-
description: e(
|
|
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__ */
|
|
576
|
+
}) : /* @__PURE__ */ w("div", {
|
|
573
577
|
className: "space-y-3",
|
|
574
|
-
children: [
|
|
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__ */
|
|
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:
|
|
586
|
+
disabled: j,
|
|
583
587
|
onClick: () => {
|
|
584
|
-
|
|
588
|
+
pt();
|
|
585
589
|
},
|
|
586
|
-
children:
|
|
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 =
|
|
590
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
598
|
+
children: [/* @__PURE__ */ w("div", {
|
|
595
599
|
className: "space-y-3",
|
|
596
600
|
children: [
|
|
597
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ w("div", {
|
|
598
602
|
className: "flex flex-wrap items-center gap-2",
|
|
599
|
-
children: [/* @__PURE__ */
|
|
603
|
+
children: [/* @__PURE__ */ C("p", {
|
|
600
604
|
className: "font-semibold",
|
|
601
605
|
children: e.email
|
|
602
|
-
}), /* @__PURE__ */
|
|
606
|
+
}), /* @__PURE__ */ C(d, {
|
|
603
607
|
variant: "outline",
|
|
604
608
|
children: e.status
|
|
605
609
|
})]
|
|
606
610
|
}),
|
|
607
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ w("div", {
|
|
608
612
|
className: "grid gap-3 text-sm text-text-secondary sm:grid-cols-2",
|
|
609
|
-
children: [/* @__PURE__ */
|
|
613
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
610
614
|
className: "font-medium text-text-primary",
|
|
611
615
|
children: "Received"
|
|
612
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
619
|
+
}), /* @__PURE__ */ C("p", { children: $e(e.expiresAt) ?? "—" })] })]
|
|
616
620
|
}),
|
|
617
|
-
/* @__PURE__ */
|
|
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__ */
|
|
624
|
+
}), /* @__PURE__ */ C("div", {
|
|
621
625
|
className: "flex flex-wrap gap-2",
|
|
622
|
-
children: r.length > 0 ? r.map((t, n) => /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
637
|
+
}), /* @__PURE__ */ C("div", {
|
|
634
638
|
className: "flex flex-wrap gap-2",
|
|
635
|
-
children: i.length > 0 ? i.map((t, n) => /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
648
|
+
}), /* @__PURE__ */ w("div", {
|
|
645
649
|
className: "flex gap-2",
|
|
646
|
-
children: [/* @__PURE__ */
|
|
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: () =>
|
|
655
|
+
onClick: () => Ut(e),
|
|
651
656
|
className: "gap-2",
|
|
652
|
-
children: [a && K ? /* @__PURE__ */
|
|
653
|
-
|
|
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: () =>
|
|
666
|
+
onClick: () => U(e),
|
|
658
667
|
className: "gap-2",
|
|
659
|
-
children: [a && q ? /* @__PURE__ */
|
|
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
|
-
})] }),
|
|
666
|
-
open: !!
|
|
667
|
-
onOpenChange: (e) => !e &&
|
|
668
|
-
children: /* @__PURE__ */
|
|
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:
|
|
671
|
-
}), /* @__PURE__ */
|
|
672
|
-
onClick:
|
|
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__ */
|
|
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 (
|
|
678
|
-
let t = [X.length > 0 ? e(
|
|
679
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
683
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ w("div", { children: [
|
|
695
|
+
/* @__PURE__ */ w(f, {
|
|
684
696
|
variant: "ghost",
|
|
685
|
-
onClick: () =>
|
|
697
|
+
onClick: () => b(D(`${x}/${k}`)),
|
|
686
698
|
className: "-ml-2 mb-2 gap-2",
|
|
687
|
-
children: [/* @__PURE__ */
|
|
699
|
+
children: [/* @__PURE__ */ C(ge, { size: 18 }), e(y, "workspaceInvite.backToWorkspace", "Back to Workspace")]
|
|
688
700
|
}),
|
|
689
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ C("h1", {
|
|
690
702
|
className: "text-2xl font-bold sm:text-3xl",
|
|
691
|
-
children: e(
|
|
703
|
+
children: e(y, "workspaceInvite.v2.title", "Invite people")
|
|
692
704
|
}),
|
|
693
|
-
/* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ C("p", {
|
|
694
706
|
className: "mt-2 text-sm text-text-secondary sm:text-base",
|
|
695
|
-
children: e(
|
|
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__ */
|
|
710
|
+
/* @__PURE__ */ C(_, {
|
|
699
711
|
treatment: "plain",
|
|
700
712
|
id: "invite-send-section",
|
|
701
713
|
className: "border-border-seam",
|
|
702
|
-
children: /* @__PURE__ */
|
|
714
|
+
children: /* @__PURE__ */ w(p, {
|
|
703
715
|
className: "space-y-4 pt-6",
|
|
704
716
|
children: [
|
|
705
|
-
|
|
706
|
-
t.length > 0 ? /* @__PURE__ */
|
|
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(
|
|
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__ */
|
|
727
|
+
/* @__PURE__ */ C(Ie, {
|
|
716
728
|
storageKey: "workspaces.invite.form",
|
|
717
|
-
children: /* @__PURE__ */
|
|
729
|
+
children: /* @__PURE__ */ w("div", {
|
|
718
730
|
className: "space-y-8",
|
|
719
|
-
children: [/* @__PURE__ */
|
|
720
|
-
selectedRoleIds:
|
|
721
|
-
onRoleToggle:
|
|
722
|
-
selectedProjectIds:
|
|
723
|
-
onProjectToggle:
|
|
724
|
-
availableRoles:
|
|
725
|
-
availableProjects:
|
|
726
|
-
isLoadingRoles:
|
|
727
|
-
isLoadingProjects:
|
|
728
|
-
disabled:
|
|
729
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
744
|
+
children: [/* @__PURE__ */ C("h3", {
|
|
733
745
|
id: "invite-bulk-heading",
|
|
734
746
|
className: "text-base font-semibold",
|
|
735
|
-
children: e(
|
|
736
|
-
}),
|
|
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__ */
|
|
755
|
+
/* @__PURE__ */ w("p", {
|
|
744
756
|
className: "text-sm text-text-secondary",
|
|
745
757
|
children: [
|
|
746
|
-
e(
|
|
758
|
+
e(y, "workspaceInvite.v2.organizationLead", "Want them in a whole organization instead?"),
|
|
747
759
|
" ",
|
|
748
|
-
/* @__PURE__ */
|
|
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(
|
|
763
|
+
children: e(y, "workspaceInvite.v2.organizationLink", "Invite to an organization")
|
|
752
764
|
})
|
|
753
765
|
]
|
|
754
766
|
}),
|
|
755
|
-
/* @__PURE__ */
|
|
767
|
+
/* @__PURE__ */ w(_, {
|
|
756
768
|
treatment: "plain",
|
|
757
769
|
id: "invite-pending-section",
|
|
758
770
|
className: "border-border-seam",
|
|
759
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
774
|
+
/* @__PURE__ */ C(ve, {
|
|
763
775
|
className: "size-5 text-primary",
|
|
764
776
|
"aria-hidden": "true"
|
|
765
777
|
}),
|
|
766
|
-
e(
|
|
767
|
-
/* @__PURE__ */
|
|
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__ */
|
|
785
|
+
}) }), /* @__PURE__ */ C(p, { children: qt })]
|
|
774
786
|
})
|
|
775
787
|
]
|
|
776
788
|
})] });
|
|
777
789
|
}
|
|
778
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
793
|
+
/* @__PURE__ */ C("div", {
|
|
782
794
|
className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",
|
|
783
|
-
children: /* @__PURE__ */
|
|
784
|
-
/* @__PURE__ */
|
|
795
|
+
children: /* @__PURE__ */ w("div", { children: [
|
|
796
|
+
/* @__PURE__ */ w(f, {
|
|
785
797
|
variant: "ghost",
|
|
786
|
-
onClick: () =>
|
|
798
|
+
onClick: () => b(D(`${x}/${k}`)),
|
|
787
799
|
className: "-ml-2 mb-2 gap-2",
|
|
788
|
-
children: [/* @__PURE__ */
|
|
800
|
+
children: [/* @__PURE__ */ C(ge, { size: 18 }), e(y, "workspaceInvite.backToWorkspace", "Back to Workspace")]
|
|
789
801
|
}),
|
|
790
|
-
/* @__PURE__ */
|
|
802
|
+
/* @__PURE__ */ w("div", {
|
|
791
803
|
className: "flex items-center gap-2",
|
|
792
|
-
children: [/* @__PURE__ */
|
|
804
|
+
children: [/* @__PURE__ */ C(Se, {
|
|
793
805
|
className: "text-primary",
|
|
794
806
|
size: 24
|
|
795
|
-
}), /* @__PURE__ */
|
|
807
|
+
}), /* @__PURE__ */ C("h1", {
|
|
796
808
|
className: "text-2xl font-bold sm:text-3xl",
|
|
797
|
-
children: e(
|
|
809
|
+
children: e(y, "workspaceInvite.title", "Invite Members")
|
|
798
810
|
})]
|
|
799
811
|
}),
|
|
800
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ w("p", {
|
|
801
813
|
className: "mt-2 text-sm text-text-secondary sm:text-base",
|
|
802
814
|
children: [
|
|
803
|
-
|
|
815
|
+
it.name,
|
|
804
816
|
" —",
|
|
805
817
|
" ",
|
|
806
|
-
e(
|
|
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__ */
|
|
812
|
-
/* @__PURE__ */
|
|
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(
|
|
818
|
-
description: e(
|
|
819
|
-
icon: /* @__PURE__ */
|
|
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(
|
|
828
|
-
description: e(
|
|
829
|
-
icon: /* @__PURE__ */
|
|
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(
|
|
838
|
-
description: e(
|
|
839
|
-
icon: /* @__PURE__ */
|
|
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__ */
|
|
859
|
+
/* @__PURE__ */ w(_, {
|
|
848
860
|
treatment: "plain",
|
|
849
861
|
id: "invite-access-section",
|
|
850
862
|
className: "border-border-seam",
|
|
851
|
-
children: [/* @__PURE__ */
|
|
852
|
-
selectedRoleIds:
|
|
853
|
-
onRoleToggle:
|
|
854
|
-
selectedProjectIds:
|
|
855
|
-
onProjectToggle:
|
|
856
|
-
availableRoles:
|
|
857
|
-
availableProjects:
|
|
858
|
-
isLoadingRoles:
|
|
859
|
-
isLoadingProjects:
|
|
860
|
-
disabled:
|
|
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__ */
|
|
875
|
+
/* @__PURE__ */ w(_, {
|
|
864
876
|
treatment: "metric",
|
|
865
877
|
glow: !0,
|
|
866
878
|
className: "border-border-seam",
|
|
867
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
883
|
+
children: [/* @__PURE__ */ w("div", {
|
|
872
884
|
className: "flex items-center justify-between gap-2",
|
|
873
|
-
children: [/* @__PURE__ */
|
|
885
|
+
children: [/* @__PURE__ */ C("p", {
|
|
874
886
|
className: "text-sm font-medium",
|
|
875
887
|
children: "Roles"
|
|
876
|
-
}), /* @__PURE__ */
|
|
888
|
+
}), /* @__PURE__ */ C(d, {
|
|
877
889
|
variant: "secondary",
|
|
878
890
|
className: "tabular-nums",
|
|
879
891
|
children: X.length
|
|
880
892
|
})]
|
|
881
|
-
}), /* @__PURE__ */
|
|
893
|
+
}), /* @__PURE__ */ C("p", {
|
|
882
894
|
className: "text-sm text-text-muted",
|
|
883
|
-
children:
|
|
895
|
+
children: et(X, "No roles selected")
|
|
884
896
|
})]
|
|
885
|
-
}), /* @__PURE__ */
|
|
897
|
+
}), /* @__PURE__ */ w("div", {
|
|
886
898
|
className: "space-y-2 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
887
|
-
children: [/* @__PURE__ */
|
|
899
|
+
children: [/* @__PURE__ */ w("div", {
|
|
888
900
|
className: "flex items-center justify-between gap-2",
|
|
889
|
-
children: [/* @__PURE__ */
|
|
901
|
+
children: [/* @__PURE__ */ C("p", {
|
|
890
902
|
className: "text-sm font-medium",
|
|
891
903
|
children: "Projects"
|
|
892
|
-
}), /* @__PURE__ */
|
|
904
|
+
}), /* @__PURE__ */ C(d, {
|
|
893
905
|
variant: "secondary",
|
|
894
906
|
className: "tabular-nums",
|
|
895
907
|
children: Z.length
|
|
896
908
|
})]
|
|
897
|
-
}), /* @__PURE__ */
|
|
909
|
+
}), /* @__PURE__ */ C("p", {
|
|
898
910
|
className: "text-sm text-text-muted",
|
|
899
|
-
children:
|
|
911
|
+
children: et(Z, "No project access will be granted automatically")
|
|
900
912
|
})]
|
|
901
913
|
})]
|
|
902
914
|
})]
|
|
903
915
|
}),
|
|
904
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ w(_, {
|
|
905
917
|
treatment: "plain",
|
|
906
918
|
id: "invite-send-section",
|
|
907
919
|
className: "border-border-seam",
|
|
908
|
-
children: [/* @__PURE__ */
|
|
909
|
-
value:
|
|
910
|
-
onValueChange: (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__ */
|
|
925
|
+
/* @__PURE__ */ w(Ve, { children: [/* @__PURE__ */ C(He, {
|
|
914
926
|
value: "single",
|
|
915
|
-
children: e(
|
|
916
|
-
}), /* @__PURE__ */
|
|
927
|
+
children: e(y, "workspaceInvite.modeSingle", "Single")
|
|
928
|
+
}), /* @__PURE__ */ C(He, {
|
|
917
929
|
value: "bulk",
|
|
918
|
-
children: e(
|
|
930
|
+
children: e(y, "workspaceInvite.modeBulk", "Bulk CSV")
|
|
919
931
|
})] }),
|
|
920
|
-
/* @__PURE__ */
|
|
932
|
+
/* @__PURE__ */ C(Be, {
|
|
921
933
|
value: "single",
|
|
922
934
|
className: "space-y-4",
|
|
923
|
-
children:
|
|
935
|
+
children: Gt
|
|
924
936
|
}),
|
|
925
|
-
/* @__PURE__ */
|
|
937
|
+
/* @__PURE__ */ C(Be, {
|
|
926
938
|
value: "bulk",
|
|
927
939
|
className: "space-y-5",
|
|
928
|
-
children:
|
|
940
|
+
children: Kt
|
|
929
941
|
})
|
|
930
942
|
]
|
|
931
943
|
}) })]
|
|
932
944
|
}),
|
|
933
|
-
/* @__PURE__ */
|
|
945
|
+
/* @__PURE__ */ w(_, {
|
|
934
946
|
treatment: "plain",
|
|
935
947
|
id: "invite-pending-section",
|
|
936
948
|
className: "border-border-seam",
|
|
937
|
-
children: [/* @__PURE__ */
|
|
949
|
+
children: [/* @__PURE__ */ C(m, { children: /* @__PURE__ */ w(h, {
|
|
938
950
|
className: "flex items-center gap-2",
|
|
939
951
|
children: [
|
|
940
|
-
/* @__PURE__ */
|
|
941
|
-
e(
|
|
942
|
-
/* @__PURE__ */
|
|
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__ */
|
|
960
|
+
}) }), /* @__PURE__ */ C(p, { children: qt })]
|
|
949
961
|
})
|
|
950
962
|
]
|
|
951
963
|
})] });
|
|
952
964
|
}
|
|
953
|
-
function
|
|
954
|
-
let { workspaceId: e } =
|
|
955
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
971
|
+
children: /* @__PURE__ */ C(D, {})
|
|
960
972
|
});
|
|
961
973
|
}
|
|
962
|
-
export {
|
|
974
|
+
export { O as WorkspaceInvitePage };
|