@burdenoff/microfe-workspaces 2026.1110.2 → 2026.1114.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/WorkspacesRoot.js +31 -25
- package/dist/components/CreateProjectDialog.js +81 -78
- package/dist/components/CreateWorkspaceDialog.js +41 -41
- package/dist/components/InviteMemberDialog.js +54 -54
- package/dist/components/MemberListItem.js +53 -53
- package/dist/components/ProjectCard.js +82 -82
- package/dist/components/ProjectMemberPickerDialog.js +46 -46
- package/dist/components/RenameProjectDialog.js +16 -16
- package/dist/components/WorkspaceCard.js +18 -18
- package/dist/components/WorkspacesErrorBoundary.js +25 -25
- package/dist/components/tags/ProjectTagsWidget.js +50 -50
- package/dist/components/tags/WorkspaceTagsEditor.js +9 -9
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -14
- package/dist/pages/ActivityListPage.js +30 -30
- package/dist/pages/CreateWorkspacePage.js +205 -173
- package/dist/pages/InviteAcceptancePage.js +201 -201
- package/dist/pages/MembersListPage.js +165 -164
- package/dist/pages/PendingInvitesPage.js +67 -67
- package/dist/pages/ProjectDetailPage.js +297 -272
- package/dist/pages/ProjectMembersPage.js +59 -59
- package/dist/pages/ProjectsListPage.js +275 -244
- package/dist/pages/WorkspaceDetailPage.js +175 -172
- package/dist/pages/WorkspaceInvitePage.js +298 -298
- package/dist/pages/WorkspaceSettingsPage.js +48 -48
- package/dist/pages/WorkspacesListPage.js +55 -55
- package/dist/pages/dashboard/DashboardCustomizer.js +27 -27
- package/dist/pages/dashboard/DashboardPage.js +35 -35
- package/dist/pages/dashboard/WidgetWrapper.js +21 -21
- package/dist/pages/dashboard/widgets/AgentsWidget.js +25 -25
- package/dist/pages/dashboard/widgets/GroupsWidget.js +14 -14
- package/dist/pages/dashboard/widgets/MembersWidget.js +15 -15
- package/dist/pages/dashboard/widgets/ProjectsWidget.js +20 -20
- package/dist/pages/dashboard/widgets/QuickActionsWidget.js +7 -7
- package/dist/pages/dashboard/widgets/RecentActivityWidget.js +16 -16
- package/dist/pages/dashboard/widgets/SessionsWidget.js +15 -15
- package/dist/pages/dashboard/widgets/TagCloudWidget.js +11 -11
- package/dist/pages/dashboard/widgets/UpcomingEventsWidget.js +16 -16
- package/dist/pages/dashboard/widgets/VibesWidget.js +13 -13
- package/dist/pages/dashboard/widgets/WelcomeWidget.js +23 -23
- package/dist/pages/dashboard/widgets/WorkflowRunsWidget.js +26 -26
- package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js +21 -21
- package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.js +22 -22
- package/dist/pages/dashboard/widgets/WorkspacesWidget.js +16 -16
- package/dist/providers/WorkspacesProvider.d.ts +5 -0
- package/dist/providers/WorkspacesProvider.js +2 -2
- package/dist/types/index.d.ts +11 -1
- package/dist/utils/createForms.d.ts +21 -0
- package/dist/utils/createForms.js +20 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +4 -4
|
@@ -5,150 +5,151 @@ import { useWorkspacePermissions as i } from "../hooks/useWorkspacePermissions.j
|
|
|
5
5
|
import { useWorkspacesStore as a } from "../store/workspacesStore.js";
|
|
6
6
|
import { useWorkspaceInvitations as ee, useWorkspaceMembers as te } from "../hooks/useWorkspaceMembers.js";
|
|
7
7
|
import { useRemoveUserFromWorkspace as ne, useResendInvitation as re } from "../hooks/useMemberMutations.js";
|
|
8
|
-
import { useWorkspacesContext as o } from "../providers/WorkspacesProvider.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { useIsFluidGridsVariant as ie, useWorkspacesContext as o } from "../providers/WorkspacesProvider.js";
|
|
9
|
+
import { useTr as ae } from "../hooks/useTr.js";
|
|
10
|
+
import { useWorkspacesPageView as oe } from "../hooks/useWorkspacesPageView.js";
|
|
11
|
+
import { MemberListItem as se } from "../components/MemberListItem.js";
|
|
12
|
+
import { useScopedNavigation as ce } from "../hooks/useScopedNavigation.js";
|
|
12
13
|
import { useEffect as s, useMemo as c, useState as l } from "react";
|
|
13
|
-
import { AlertCircle as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { useI18n as
|
|
17
|
-
import { useNavigate as
|
|
18
|
-
import { useDebounce as
|
|
14
|
+
import { AlertCircle as le, RefreshCw as ue, Search as de, UserPlus as u, Users as fe } from "lucide-react";
|
|
15
|
+
import { Badge as d, Button as f, IllustratedEmptyState as p, Input as pe, PageContainer as me, PagePurpose as he, Skeleton as m } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
17
|
+
import { useI18n as ge } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
18
|
+
import { useNavigate as _e, useParams as ve, useSearchParams as ye } from "react-router";
|
|
19
|
+
import { useDebounce as be } from "@burdenoff/fe-libs/shared/hooks";
|
|
19
20
|
import { PermissionButton as _ } from "@burdenoff/fe-libs/shared/components";
|
|
20
|
-
import { useActorProfiles as
|
|
21
|
+
import { useActorProfiles as xe } from "@burdenoff/fe-libs/shared";
|
|
21
22
|
// src/pages/MembersListPage.tsx
|
|
22
23
|
function v() {
|
|
23
|
-
let { t: v } =
|
|
24
|
-
|
|
25
|
-
workspaceId:
|
|
24
|
+
let { t: v } = ge(), y = ae(), Se = ie(), { memberFilters: Ce, setMemberFilters: b, selectedMemberIds: x, toggleMemberSelection: S, clearMemberSelection: C } = a(), w = _e(), { workspaceId: we } = o(), { basePath: T = "/workspaces" } = o(), { withCurrentSearch: E } = ce(), { workspaceId: Te } = ve(), D = Te || we;
|
|
25
|
+
oe("workspaces.members", {
|
|
26
|
+
workspaceId: D,
|
|
26
27
|
requireParams: !0
|
|
27
28
|
});
|
|
28
|
-
let [
|
|
29
|
+
let [O, Ee] = l(Ce.search || ""), k = be(O, 500);
|
|
29
30
|
s(() => {
|
|
30
|
-
|
|
31
|
-
}, [
|
|
32
|
-
let { data:
|
|
33
|
-
|
|
31
|
+
b({ search: k });
|
|
32
|
+
}, [k, b]);
|
|
33
|
+
let { data: A, isLoading: De, error: j } = te(D || ""), { data: M, isLoading: Oe } = ee(D || "", "PENDING"), { mutate: N, isPending: P } = re(), { mutate: ke, isPending: Ae } = ne(), [F, I] = l(null), [L, R] = l(/* @__PURE__ */ new Set()), je = (e) => {
|
|
34
|
+
I(e), N(e, {
|
|
34
35
|
onSuccess: () => {
|
|
35
|
-
|
|
36
|
+
I(null);
|
|
36
37
|
},
|
|
37
38
|
onError: (e) => {
|
|
38
|
-
console.error("Failed to resend invitation:", e),
|
|
39
|
+
console.error("Failed to resend invitation:", e), I(null);
|
|
39
40
|
}
|
|
40
41
|
});
|
|
41
|
-
},
|
|
42
|
+
}, z = c(() => A?.items || [], [A?.items]), B = c(() => M?.items || [], [M?.items]), V = De || Oe, H = z.length > 0, U = B.length > 0, { apiGatewayUrl: Me, authToken: Ne, organizationId: Pe } = o(), Fe = c(() => z.map((e) => ({
|
|
42
43
|
actorId: e.userId,
|
|
43
44
|
actorType: "user"
|
|
44
|
-
})), [
|
|
45
|
-
apiGatewayUrl:
|
|
46
|
-
authToken:
|
|
47
|
-
orgId:
|
|
48
|
-
workspaceId:
|
|
49
|
-
}),
|
|
50
|
-
if (!
|
|
51
|
-
let t =
|
|
45
|
+
})), [z]), W = xe(Fe, {
|
|
46
|
+
apiGatewayUrl: Me,
|
|
47
|
+
authToken: Ne,
|
|
48
|
+
orgId: Pe,
|
|
49
|
+
workspaceId: D
|
|
50
|
+
}), G = z.filter((e) => {
|
|
51
|
+
if (!k) return !0;
|
|
52
|
+
let t = k.toLowerCase(), n = W[e.userId];
|
|
52
53
|
if (n && (n.displayName.toLowerCase().includes(t) || n.email?.toLowerCase().includes(t))) return !0;
|
|
53
54
|
let r = e.context?.metadata, i = typeof r?.email == "string" ? r.email : "", a = typeof r?.displayName == "string" ? r.displayName : typeof r?.name == "string" ? r.name : "";
|
|
54
55
|
return i.toLowerCase().includes(t) || a.toLowerCase().includes(t) ? !0 : e.userId.toLowerCase().includes(t);
|
|
55
|
-
}),
|
|
56
|
-
s(() => () =>
|
|
57
|
-
let [
|
|
56
|
+
}), K = c(() => G.filter((e) => x.has(e.id)), [G, x]), q = c(() => B.filter((e) => L.has(e.id)), [B, L]), J = G.length > 0 && G.every((e) => x.has(e.id)), Ie = G.some((e) => x.has(e.id)) && !J, Y = B.length > 0 && B.every((e) => L.has(e.id)), Le = B.some((e) => L.has(e.id)) && !Y;
|
|
57
|
+
s(() => () => C(), [C]);
|
|
58
|
+
let [X, Z] = ye();
|
|
58
59
|
s(() => {
|
|
59
|
-
if (
|
|
60
|
-
let e = new URLSearchParams(
|
|
61
|
-
e.delete("invite"),
|
|
60
|
+
if (X.get("invite") === "true" && D) {
|
|
61
|
+
let e = new URLSearchParams(X);
|
|
62
|
+
e.delete("invite"), Z(e, { replace: !0 }), w(E(`${T}/${D}/invite`), { replace: !0 });
|
|
62
63
|
}
|
|
63
64
|
}, [
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
X,
|
|
66
|
+
Z,
|
|
67
|
+
D,
|
|
68
|
+
w,
|
|
66
69
|
E,
|
|
67
|
-
|
|
68
|
-
T,
|
|
69
|
-
w
|
|
70
|
+
T
|
|
70
71
|
]);
|
|
71
|
-
let { canListMembers:
|
|
72
|
-
if (
|
|
72
|
+
let { canListMembers: Re, canInviteMember: Q, canRemoveMember: $, isLoading: ze } = i();
|
|
73
|
+
if (ze) return /* @__PURE__ */ g("div", {
|
|
73
74
|
className: "space-y-4 p-6",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ h(m, { className: "h-10 w-1/3" }), /* @__PURE__ */ h(m, { className: "h-64" })]
|
|
75
76
|
});
|
|
76
|
-
if (!
|
|
77
|
+
if (!Re && !Q) return /* @__PURE__ */ h("div", {
|
|
77
78
|
className: "flex items-center justify-center min-h-[400px]",
|
|
78
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ g("div", {
|
|
79
80
|
className: "text-center space-y-2",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ h("h2", {
|
|
81
82
|
className: "text-lg font-semibold",
|
|
82
83
|
children: n(v, "membersList.accessDenied", "Access Denied")
|
|
83
|
-
}), /* @__PURE__ */
|
|
84
|
+
}), /* @__PURE__ */ h("p", {
|
|
84
85
|
className: "text-sm text-text-secondary",
|
|
85
86
|
children: n(v, "membersList.noPermissionToViewMembers", "You don't have permission to view workspace members.")
|
|
86
87
|
})]
|
|
87
88
|
})
|
|
88
89
|
});
|
|
89
|
-
let
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
e !==
|
|
90
|
+
let Be = () => {
|
|
91
|
+
D && w(E(`${T}/${D}/invite`));
|
|
92
|
+
}, Ve = (e) => {
|
|
93
|
+
G.forEach((t) => {
|
|
94
|
+
e !== x.has(t.id) && S(t.id);
|
|
94
95
|
});
|
|
95
|
-
},
|
|
96
|
-
|
|
96
|
+
}, He = (e, t) => {
|
|
97
|
+
R((n) => {
|
|
97
98
|
let r = new Set(n);
|
|
98
99
|
return t ? r.add(e) : r.delete(e), r;
|
|
99
100
|
});
|
|
100
|
-
},
|
|
101
|
-
|
|
101
|
+
}, Ue = (e) => {
|
|
102
|
+
R((t) => {
|
|
102
103
|
let n = new Set(t);
|
|
103
|
-
return
|
|
104
|
+
return B.forEach((t) => {
|
|
104
105
|
e ? n.add(t.id) : n.delete(t.id);
|
|
105
106
|
}), n;
|
|
106
107
|
});
|
|
107
|
-
},
|
|
108
|
-
if (
|
|
108
|
+
}, We = async () => {
|
|
109
|
+
if (K.length === 0) return;
|
|
109
110
|
t("medium");
|
|
110
|
-
let r = `${n(v, "membersList.bulkRemoveConfirmPrefix", "Remove")} ${
|
|
111
|
+
let r = Se ? y("membersList.bulkRemoveConfirmNamed", "Remove {{names}} from this workspace? They lose access to its projects and data straight away. They stay in the organization, and you can invite them again later.", { names: K.map((e) => W[e.userId]?.displayName ?? W[e.userId]?.email ?? y("memberListItem.thisMemberFallback", "this member")).join(", ") }) : `${n(v, "membersList.bulkRemoveConfirmPrefix", "Remove")} ${K.length} ${K.length === 1 ? n(v, "membersList.bulkRemoveConfirmSingular", "selected member") : n(v, "membersList.bulkRemoveConfirmPlural", "selected members")} ${n(v, "membersList.bulkRemoveConfirmSuffix", "from this workspace?")}`, i = await e({
|
|
111
112
|
title: n(v, "membersList.removeMembersTitle", "Remove members"),
|
|
112
113
|
message: r,
|
|
113
114
|
okButtonTitle: n(v, "membersList.removeButton", "Remove"),
|
|
114
115
|
cancelButtonTitle: n(v, "common.cancel", "Cancel")
|
|
115
116
|
});
|
|
116
|
-
(i === null ? window.confirm(r) : i) && (
|
|
117
|
-
|
|
118
|
-
}),
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
(i === null ? window.confirm(r) : i) && (K.forEach((e) => {
|
|
118
|
+
ke(e.userId);
|
|
119
|
+
}), C());
|
|
120
|
+
}, Ge = () => {
|
|
121
|
+
q.length !== 0 && q.forEach((e) => {
|
|
122
|
+
N(e.id, { onSuccess: () => {
|
|
123
|
+
R((t) => {
|
|
123
124
|
let n = new Set(t);
|
|
124
125
|
return n.delete(e.id), n;
|
|
125
126
|
});
|
|
126
127
|
} });
|
|
127
128
|
});
|
|
128
129
|
};
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
+
return /* @__PURE__ */ h(me, {
|
|
130
131
|
padded: !1,
|
|
131
|
-
children: /* @__PURE__ */
|
|
132
|
+
children: /* @__PURE__ */ g("div", {
|
|
132
133
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
|
|
133
134
|
children: [
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ g("div", {
|
|
135
136
|
className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
|
|
137
138
|
className: "text-2xl sm:text-3xl font-bold",
|
|
138
139
|
children: n(v, "membersList.pageTitle", "Members")
|
|
139
|
-
}), /* @__PURE__ */
|
|
140
|
+
}), /* @__PURE__ */ h("p", {
|
|
140
141
|
className: "text-text-secondary text-sm sm:text-base",
|
|
141
142
|
children: n(v, "membersList.pageSubtitle", "Manage workspace members and invitations")
|
|
142
|
-
})] }), /* @__PURE__ */
|
|
143
|
+
})] }), /* @__PURE__ */ h("div", {
|
|
143
144
|
className: "flex gap-2",
|
|
144
|
-
children: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ h(_, {
|
|
145
146
|
permission: r.MEMBER_CREATE,
|
|
146
147
|
deniedBehavior: "disable",
|
|
147
148
|
deniedTooltip: n(v, "membersList.noPermissionToInvite", "You don't have permission to invite members"),
|
|
148
|
-
children: /* @__PURE__ */ f
|
|
149
|
-
onClick:
|
|
150
|
-
disabled: !
|
|
151
|
-
children: [/* @__PURE__ */
|
|
149
|
+
children: /* @__PURE__ */ g(f, {
|
|
150
|
+
onClick: Be,
|
|
151
|
+
disabled: !D,
|
|
152
|
+
children: [/* @__PURE__ */ h(u, { className: "size-4 sm:mr-2" }), /* @__PURE__ */ h("span", {
|
|
152
153
|
className: "hidden sm:inline",
|
|
153
154
|
children: n(v, "membersList.inviteMember", "Invite Member")
|
|
154
155
|
})]
|
|
@@ -156,73 +157,73 @@ function v() {
|
|
|
156
157
|
})
|
|
157
158
|
})]
|
|
158
159
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ h(he, { children: n(v, "membersList.purpose", "Members are the people who belong to this workspace. From here you invite teammates, see who has accepted, resend or track invitations that are still pending, and remove people who no longer need access. Search by name or email to find someone quickly.") }),
|
|
161
|
+
/* @__PURE__ */ g("div", {
|
|
161
162
|
className: "flex flex-col sm:flex-row gap-3 sm:gap-4",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ g("div", {
|
|
163
164
|
className: "relative flex-1",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ h(de, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-secondary" }), /* @__PURE__ */ h(pe, {
|
|
165
166
|
placeholder: n(v, "membersList.searchPlaceholder", "Search members..."),
|
|
166
|
-
value:
|
|
167
|
-
onChange: (e) =>
|
|
167
|
+
value: O,
|
|
168
|
+
onChange: (e) => Ee(e.target.value),
|
|
168
169
|
className: "pl-9"
|
|
169
170
|
})]
|
|
170
|
-
}),
|
|
171
|
+
}), U && /* @__PURE__ */ h("div", {
|
|
171
172
|
className: "flex items-center gap-2",
|
|
172
|
-
children: /* @__PURE__ */
|
|
173
|
+
children: /* @__PURE__ */ g(d, {
|
|
173
174
|
variant: "secondary",
|
|
174
175
|
className: "text-sm",
|
|
175
176
|
children: [
|
|
176
|
-
|
|
177
|
+
B.length,
|
|
177
178
|
" ",
|
|
178
|
-
|
|
179
|
+
B.length === 1 ? n(v, "membersList.pendingInvitation", "Pending Invitation") : n(v, "membersList.pendingInvitations", "Pending Invitations")
|
|
179
180
|
]
|
|
180
181
|
})
|
|
181
182
|
})]
|
|
182
183
|
}),
|
|
183
|
-
|
|
184
|
+
G.length > 0 && /* @__PURE__ */ g("div", {
|
|
184
185
|
className: "flex flex-col gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 sm:flex-row sm:items-center sm:justify-between",
|
|
185
|
-
children: [/* @__PURE__ */
|
|
186
|
+
children: [/* @__PURE__ */ g("label", {
|
|
186
187
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
187
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ h("input", {
|
|
188
189
|
type: "checkbox",
|
|
189
|
-
checked:
|
|
190
|
+
checked: J,
|
|
190
191
|
ref: (e) => {
|
|
191
|
-
e && (e.indeterminate =
|
|
192
|
+
e && (e.indeterminate = Ie && !J);
|
|
192
193
|
},
|
|
193
|
-
onChange: (e) =>
|
|
194
|
+
onChange: (e) => Ve(e.target.checked),
|
|
194
195
|
"aria-label": n(v, "membersList.selectAllMembersAriaLabel", "Select all workspace members"),
|
|
195
196
|
className: "size-4 rounded border-border-subtle text-primary"
|
|
196
|
-
}), /* @__PURE__ */
|
|
197
|
-
}), /* @__PURE__ */
|
|
197
|
+
}), /* @__PURE__ */ h("span", { children: n(v, "membersList.selectAllVisibleMembers", "Select all visible members") })]
|
|
198
|
+
}), /* @__PURE__ */ g("div", {
|
|
198
199
|
className: "flex flex-wrap items-center gap-2",
|
|
199
200
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ g("span", {
|
|
201
202
|
className: "text-sm text-text-secondary",
|
|
202
203
|
children: [
|
|
203
|
-
|
|
204
|
+
x.size,
|
|
204
205
|
" ",
|
|
205
206
|
n(v, "membersList.selected", "selected")
|
|
206
207
|
]
|
|
207
208
|
}),
|
|
208
|
-
|
|
209
|
+
x.size > 0 && /* @__PURE__ */ h(f, {
|
|
209
210
|
variant: "ghost",
|
|
210
211
|
size: "sm",
|
|
211
|
-
onClick:
|
|
212
|
+
onClick: C,
|
|
212
213
|
children: n(v, "membersList.clearSelection", "Clear selection")
|
|
213
214
|
}),
|
|
214
|
-
|
|
215
|
+
$ && /* @__PURE__ */ g(f, {
|
|
215
216
|
variant: "outline",
|
|
216
217
|
size: "sm",
|
|
217
|
-
onClick:
|
|
218
|
-
disabled:
|
|
218
|
+
onClick: We,
|
|
219
|
+
disabled: K.length === 0 || Ae,
|
|
219
220
|
className: "text-status-error-text",
|
|
220
|
-
children: [n(v, "membersList.removeSelected", "Remove Selected"),
|
|
221
|
+
children: [n(v, "membersList.removeSelected", "Remove Selected"), K.length > 0 ? ` (${K.length})` : ""]
|
|
221
222
|
})
|
|
222
223
|
]
|
|
223
224
|
})]
|
|
224
225
|
}),
|
|
225
|
-
|
|
226
|
+
V && /* @__PURE__ */ h("div", {
|
|
226
227
|
className: "space-y-3",
|
|
227
228
|
children: [...[
|
|
228
229
|
,
|
|
@@ -230,147 +231,147 @@ function v() {
|
|
|
230
231
|
,
|
|
231
232
|
,
|
|
232
233
|
,
|
|
233
|
-
]].map((e, t) => /* @__PURE__ */
|
|
234
|
+
]].map((e, t) => /* @__PURE__ */ h(m, { className: "h-20 w-full" }, t))
|
|
234
235
|
}),
|
|
235
|
-
!
|
|
236
|
+
!V && j && /* @__PURE__ */ g("div", {
|
|
236
237
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
237
238
|
children: [
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ h("div", {
|
|
239
240
|
className: "rounded-full bg-status-error-bg/10 p-6 mb-4",
|
|
240
|
-
children: /* @__PURE__ */
|
|
241
|
+
children: /* @__PURE__ */ h(le, {
|
|
241
242
|
size: 48,
|
|
242
243
|
className: "text-status-error-text"
|
|
243
244
|
})
|
|
244
245
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ h("h3", {
|
|
246
247
|
className: "text-lg font-semibold mb-2",
|
|
247
248
|
children: n(v, "membersList.failedToLoad", "Failed to Load Members")
|
|
248
249
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ h("p", {
|
|
250
251
|
className: "text-text-secondary max-w-sm",
|
|
251
|
-
children:
|
|
252
|
+
children: j instanceof Error ? j.message : n(v, "membersList.errorLoadingMembers", "An error occurred while loading members")
|
|
252
253
|
})
|
|
253
254
|
]
|
|
254
255
|
}),
|
|
255
|
-
!
|
|
256
|
+
!V && !j && !D && /* @__PURE__ */ h(p, {
|
|
256
257
|
illustration: "empty-people",
|
|
257
258
|
title: n(v, "membersList.noWorkspaceSelected", "No Workspace Selected"),
|
|
258
259
|
description: n(v, "membersList.selectWorkspacePrompt", "Select a workspace to view and manage its members")
|
|
259
260
|
}),
|
|
260
|
-
!
|
|
261
|
+
!V && !j && D && !H && /* @__PURE__ */ h(p, {
|
|
261
262
|
illustration: "empty-people",
|
|
262
263
|
title: n(v, "membersList.noMembersYet", "No Members Yet"),
|
|
263
264
|
description: n(v, "membersList.noMembersPrompt", "Start building your team by inviting members to this workspace"),
|
|
264
|
-
action: /* @__PURE__ */
|
|
265
|
+
action: /* @__PURE__ */ h(_, {
|
|
265
266
|
permission: r.MEMBER_CREATE,
|
|
266
267
|
deniedBehavior: "disable",
|
|
267
268
|
deniedTooltip: n(v, "membersList.noPermissionToInvite", "You don't have permission to invite members"),
|
|
268
|
-
children: /* @__PURE__ */ f
|
|
269
|
-
onClick:
|
|
270
|
-
children: [/* @__PURE__ */
|
|
269
|
+
children: /* @__PURE__ */ g(f, {
|
|
270
|
+
onClick: Be,
|
|
271
|
+
children: [/* @__PURE__ */ h(u, { className: "mr-2 size-4" }), n(v, "membersList.inviteFirstMember", "Invite Your First Member")]
|
|
271
272
|
})
|
|
272
273
|
})
|
|
273
274
|
}),
|
|
274
|
-
!
|
|
275
|
+
!V && !j && D && H && G.length === 0 && /* @__PURE__ */ h(p, {
|
|
275
276
|
illustration: "empty-search",
|
|
276
277
|
title: n(v, "membersList.noMembersFound", "No Members Found"),
|
|
277
278
|
description: n(v, "membersList.noMembersFoundPrompt", "No members match your search criteria. Try adjusting your search.")
|
|
278
279
|
}),
|
|
279
|
-
!
|
|
280
|
+
!V && G.length > 0 && /* @__PURE__ */ g("div", {
|
|
280
281
|
className: "space-y-3",
|
|
281
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ h("div", {
|
|
282
283
|
className: "flex items-center justify-between",
|
|
283
|
-
children: /* @__PURE__ */
|
|
284
|
+
children: /* @__PURE__ */ g("h2", {
|
|
284
285
|
className: "text-lg font-semibold",
|
|
285
286
|
children: [
|
|
286
287
|
n(v, "membersList.activeMembers", "Active Members"),
|
|
287
288
|
" (",
|
|
288
|
-
|
|
289
|
+
G.length,
|
|
289
290
|
")"
|
|
290
291
|
]
|
|
291
292
|
})
|
|
292
|
-
}), /* @__PURE__ */
|
|
293
|
+
}), /* @__PURE__ */ h("div", {
|
|
293
294
|
className: "space-y-2",
|
|
294
|
-
children:
|
|
295
|
+
children: G.map((e) => /* @__PURE__ */ h(se, {
|
|
295
296
|
member: e,
|
|
296
|
-
selected:
|
|
297
|
+
selected: x.has(e.id),
|
|
297
298
|
onToggleSelect: (t) => {
|
|
298
|
-
t !==
|
|
299
|
+
t !== x.has(e.id) && S(e.id);
|
|
299
300
|
},
|
|
300
|
-
canRemove:
|
|
301
|
+
canRemove: $
|
|
301
302
|
}, e.id))
|
|
302
303
|
})]
|
|
303
304
|
}),
|
|
304
|
-
!
|
|
305
|
+
!V && U && /* @__PURE__ */ g("div", {
|
|
305
306
|
className: "space-y-3",
|
|
306
307
|
children: [
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ h("h2", {
|
|
308
309
|
className: "text-lg font-semibold",
|
|
309
310
|
children: n(v, "membersList.pendingInvitationsHeader", "Pending Invitations")
|
|
310
311
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ g("div", {
|
|
312
313
|
className: "flex flex-col gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 sm:flex-row sm:items-center sm:justify-between",
|
|
313
|
-
children: [/* @__PURE__ */
|
|
314
|
+
children: [/* @__PURE__ */ g("label", {
|
|
314
315
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
315
|
-
children: [/* @__PURE__ */
|
|
316
|
+
children: [/* @__PURE__ */ h("input", {
|
|
316
317
|
type: "checkbox",
|
|
317
|
-
checked:
|
|
318
|
+
checked: Y,
|
|
318
319
|
ref: (e) => {
|
|
319
|
-
e && (e.indeterminate =
|
|
320
|
+
e && (e.indeterminate = Le && !Y);
|
|
320
321
|
},
|
|
321
|
-
onChange: (e) =>
|
|
322
|
+
onChange: (e) => Ue(e.target.checked),
|
|
322
323
|
"aria-label": n(v, "membersList.selectAllInvitationsAriaLabel", "Select all pending invitations"),
|
|
323
324
|
className: "size-4 rounded border-border-subtle text-primary"
|
|
324
|
-
}), /* @__PURE__ */
|
|
325
|
-
}), /* @__PURE__ */
|
|
325
|
+
}), /* @__PURE__ */ h("span", { children: n(v, "membersList.selectAllInvitations", "Select all invitations") })]
|
|
326
|
+
}), /* @__PURE__ */ g("div", {
|
|
326
327
|
className: "flex flex-wrap items-center gap-2",
|
|
327
328
|
children: [
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ g("span", {
|
|
329
330
|
className: "text-sm text-text-secondary",
|
|
330
331
|
children: [
|
|
331
|
-
|
|
332
|
+
L.size,
|
|
332
333
|
" ",
|
|
333
334
|
n(v, "membersList.selected", "selected")
|
|
334
335
|
]
|
|
335
336
|
}),
|
|
336
|
-
|
|
337
|
+
L.size > 0 && /* @__PURE__ */ h(f, {
|
|
337
338
|
variant: "ghost",
|
|
338
339
|
size: "sm",
|
|
339
|
-
onClick: () =>
|
|
340
|
+
onClick: () => R(/* @__PURE__ */ new Set()),
|
|
340
341
|
children: n(v, "membersList.clearSelection", "Clear selection")
|
|
341
342
|
}),
|
|
342
|
-
|
|
343
|
+
Q && /* @__PURE__ */ g(f, {
|
|
343
344
|
variant: "outline",
|
|
344
345
|
size: "sm",
|
|
345
|
-
onClick:
|
|
346
|
-
disabled:
|
|
347
|
-
children: [n(v, "membersList.resendSelected", "Resend Selected"),
|
|
346
|
+
onClick: Ge,
|
|
347
|
+
disabled: q.length === 0 || P,
|
|
348
|
+
children: [n(v, "membersList.resendSelected", "Resend Selected"), q.length > 0 ? ` (${q.length})` : ""]
|
|
348
349
|
})
|
|
349
350
|
]
|
|
350
351
|
})]
|
|
351
352
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ h("div", {
|
|
353
354
|
className: "space-y-2",
|
|
354
|
-
children:
|
|
355
|
+
children: B.map((e) => /* @__PURE__ */ g("div", {
|
|
355
356
|
className: "flex items-center justify-between p-4 border rounded-lg bg-bg-surface",
|
|
356
|
-
children: [/* @__PURE__ */
|
|
357
|
+
children: [/* @__PURE__ */ g("div", {
|
|
357
358
|
className: "flex items-center gap-3",
|
|
358
359
|
children: [
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ h("input", {
|
|
360
361
|
type: "checkbox",
|
|
361
|
-
checked:
|
|
362
|
-
onChange: (t) =>
|
|
362
|
+
checked: L.has(e.id),
|
|
363
|
+
onChange: (t) => He(e.id, t.target.checked),
|
|
363
364
|
"aria-label": `${n(v, "membersList.selectInvitationAriaLabel", "Select invitation")} ${e.email}`,
|
|
364
365
|
className: "size-4 rounded border-border-subtle text-primary"
|
|
365
366
|
}),
|
|
366
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ h("div", {
|
|
367
368
|
className: "size-10 rounded-full bg-status-warning/10 flex items-center justify-center transition-colors",
|
|
368
|
-
children: /* @__PURE__ */
|
|
369
|
+
children: /* @__PURE__ */ h(fe, { className: "size-5 text-status-warning" })
|
|
369
370
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
371
372
|
className: "font-medium text-sm",
|
|
372
373
|
children: e.email
|
|
373
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ g("p", {
|
|
374
375
|
className: "text-xs text-text-secondary",
|
|
375
376
|
children: [
|
|
376
377
|
n(v, "membersList.invited", "Invited"),
|
|
@@ -379,20 +380,20 @@ function v() {
|
|
|
379
380
|
]
|
|
380
381
|
})] })
|
|
381
382
|
]
|
|
382
|
-
}), /* @__PURE__ */
|
|
383
|
+
}), /* @__PURE__ */ g("div", {
|
|
383
384
|
className: "flex items-center gap-2",
|
|
384
|
-
children: [/* @__PURE__ */
|
|
385
|
+
children: [/* @__PURE__ */ h(_, {
|
|
385
386
|
permission: r.MEMBER_CREATE,
|
|
386
387
|
deniedBehavior: "disable",
|
|
387
388
|
deniedTooltip: n(v, "membersList.noPermissionToResend", "You don't have permission to resend invitations"),
|
|
388
|
-
children: /* @__PURE__ */ f
|
|
389
|
+
children: /* @__PURE__ */ g(f, {
|
|
389
390
|
variant: "outline",
|
|
390
391
|
size: "sm",
|
|
391
|
-
onClick: () =>
|
|
392
|
-
disabled:
|
|
393
|
-
children: [/* @__PURE__ */
|
|
392
|
+
onClick: () => je(e.id),
|
|
393
|
+
disabled: P && F === e.id,
|
|
394
|
+
children: [/* @__PURE__ */ h(ue, { className: `size-4 mr-1 ${P && F === e.id ? "animate-spin" : ""}` }), P && F === e.id ? n(v, "membersList.sending", "Sending...") : n(v, "membersList.resend", "Resend")]
|
|
394
395
|
})
|
|
395
|
-
}), /* @__PURE__ */ d
|
|
396
|
+
}), /* @__PURE__ */ h(d, {
|
|
396
397
|
variant: "outline",
|
|
397
398
|
className: "bg-status-warning/10 text-status-warning border-status-warning/30 transition-colors",
|
|
398
399
|
children: n(v, "membersList.pending", "Pending")
|