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