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