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