@burdenoff/microfe-organization 2026.625.3 → 2026.731.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/organization-management/modules/members/pages/InviteMemberPage.js +58 -53
- package/dist/organization-management/modules/members/pages/InviteMemberPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/InvitePeoplePage.js +47 -40
- package/dist/organization-management/modules/members/pages/InvitePeoplePage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MemberDetailPage.js +72 -68
- package/dist/organization-management/modules/members/pages/MemberDetailPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MembersListPage.js +216 -208
- package/dist/organization-management/modules/members/pages/MembersListPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MyInvitesPage.js +164 -158
- package/dist/organization-management/modules/members/pages/MyInvitesPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/OrganizationInviteAcceptancePage.js +132 -128
- package/dist/organization-management/modules/members/pages/OrganizationInviteAcceptancePage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationCreatePage.js +42 -37
- package/dist/organization-management/modules/organizations/pages/OrganizationCreatePage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js +310 -258
- package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationEditPage.js +52 -47
- package/dist/organization-management/modules/organizations/pages/OrganizationEditPage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js +66 -59
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.js +43 -38
- package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceDetailPage.js +315 -258
- package/dist/organization-management/modules/workspaces/pages/WorkspaceDetailPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceEditPage.js +50 -45
- package/dist/organization-management/modules/workspaces/pages/WorkspaceEditPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js +246 -238
- package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js.map +1 -1
- package/package.json +7 -7
|
@@ -9,224 +9,232 @@ import { useDebouncedValue as s } from "../../../shared/hooks/useDebouncedValue.
|
|
|
9
9
|
import { useConfirmDialog as ee } from "../../../shared/components/dialog/ConfirmDialog.js";
|
|
10
10
|
import { PERMISSIONS as c } from "../../../constants/permissions.js";
|
|
11
11
|
import { MemberRoleBadge as l } from "../components/MemberRoleBadge.js";
|
|
12
|
-
import { useMembers as
|
|
13
|
-
import { useEffect as
|
|
14
|
-
import { Eye as
|
|
15
|
-
import { GlassCard as
|
|
12
|
+
import { useMembers as u, useRemoveMember as d } from "../hooks/useMembers.js";
|
|
13
|
+
import { useEffect as f, useMemo as p, useState as m } from "react";
|
|
14
|
+
import { Eye as h, Mail as g, RefreshCw as _, Shield as v, Trash2 as y } from "lucide-react";
|
|
15
|
+
import { GlassCard as b, IllustratedEmptyState as te, PagePurpose as ne } from "@burdenoff/fe-libs/ui";
|
|
16
16
|
import { useFeatureFlagDetails as re } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
17
17
|
import { usePermissions as ie } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
18
|
-
import { Fragment as ae, jsx as
|
|
19
|
-
import { useParams as
|
|
20
|
-
import { ActorIdentity as
|
|
18
|
+
import { Fragment as ae, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
19
|
+
import { useParams as C } from "react-router-dom";
|
|
20
|
+
import { ActorIdentity as w, buildActorFallback as oe, useActorProfiles as se } from "@burdenoff/fe-libs/shared";
|
|
21
21
|
//#region src/organization-management/modules/members/pages/MembersListPage.tsx
|
|
22
22
|
function ce() {
|
|
23
23
|
let e = n();
|
|
24
24
|
return (t) => t ? new Date(t).toLocaleDateString() : e("common.status.pending", "Pending");
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
let
|
|
26
|
+
function T() {
|
|
27
|
+
let T = n(), E = ce(), { navigate: D, basePath: O = "/organizations" } = e(), { hasPermission: k, isLoading: le } = ie(), A = re("organization.invite"), j = A ? !!A.value : !0, { organizationId: M } = C(), [N, P] = m(""), F = s(N, 250), [I, L] = m(/* @__PURE__ */ new Set()), { openConfirmDialog: R, ConfirmDialog: z } = ee(), { members: B, loading: V, error: H, refetch: U } = u(M ?? "", 50, 0), { removeMember: ue, loading: W } = d(), { apiGatewayUrl: de, authToken: fe } = e(), G = se(p(() => B.map((e) => ({
|
|
28
28
|
actorId: e.userId,
|
|
29
29
|
actorType: "user"
|
|
30
|
-
})), [
|
|
31
|
-
apiGatewayUrl:
|
|
32
|
-
authToken:
|
|
30
|
+
})), [B]), {
|
|
31
|
+
apiGatewayUrl: de,
|
|
32
|
+
authToken: fe,
|
|
33
33
|
orgId: M
|
|
34
|
-
}), K =
|
|
35
|
-
if (!
|
|
36
|
-
let e =
|
|
37
|
-
return
|
|
34
|
+
}), K = p(() => {
|
|
35
|
+
if (!F) return B;
|
|
36
|
+
let e = F.toLowerCase();
|
|
37
|
+
return B.filter((t) => {
|
|
38
38
|
let n = G[t.userId];
|
|
39
39
|
return n?.displayName.toLowerCase().includes(e) || n?.email?.toLowerCase().includes(e) ? !0 : t.userId.toLowerCase().includes(e) || t.role.toLowerCase().includes(e);
|
|
40
40
|
});
|
|
41
41
|
}, [
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
F,
|
|
43
|
+
B,
|
|
44
44
|
G
|
|
45
45
|
]);
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
f(() => {
|
|
47
|
+
L((e) => {
|
|
48
48
|
let t = new Set(K.map((e) => e.id)), n = new Set([...e].filter((e) => t.has(e)));
|
|
49
49
|
return n.size === e.size ? e : n;
|
|
50
50
|
});
|
|
51
51
|
}, [K]);
|
|
52
|
-
let q =
|
|
52
|
+
let q = p(() => K.filter((e) => I.has(e.id)), [K, I]), J = K.length > 0 && K.every((e) => I.has(e.id)), Y = K.some((e) => I.has(e.id)) && !J, X = async (e) => {
|
|
53
53
|
if (M) try {
|
|
54
54
|
let n = (await Promise.allSettled(e.map(async (e) => {
|
|
55
|
-
let t = await
|
|
55
|
+
let t = await ue(M, e);
|
|
56
56
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to remove member");
|
|
57
57
|
}))).find((e) => e.status === "rejected");
|
|
58
58
|
if (n?.status === "rejected") throw n.reason;
|
|
59
|
-
|
|
59
|
+
L(/* @__PURE__ */ new Set()), await U(), t.success(e.length === 1 ? T("members.remove.successSingle", "Member removed successfully") : `${e.length} ${T("members.remove.successMany", "members removed successfully")}`);
|
|
60
60
|
} catch (e) {
|
|
61
|
-
t.error(e instanceof Error ? e.message :
|
|
61
|
+
t.error(e instanceof Error ? e.message : T("members.remove.failed", "Failed to remove member"));
|
|
62
62
|
}
|
|
63
63
|
}, Z = (e) => {
|
|
64
|
-
|
|
65
|
-
title:
|
|
66
|
-
description: `${
|
|
67
|
-
confirmText:
|
|
64
|
+
R({
|
|
65
|
+
title: T("members.remove.title", "Remove member"),
|
|
66
|
+
description: `${T("members.remove.descriptionPrefix", "Remove")} ${e} ${T("members.remove.descriptionSuffix", "from this organization? Workspace access inherited from this membership will be impacted.")}`,
|
|
67
|
+
confirmText: T("members.remove.confirm", "Remove"),
|
|
68
68
|
variant: "danger",
|
|
69
69
|
onConfirm: () => {
|
|
70
70
|
X([e]);
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
|
-
},
|
|
74
|
-
q.length !== 0 &&
|
|
75
|
-
title:
|
|
76
|
-
description: `${
|
|
77
|
-
confirmText: `${
|
|
73
|
+
}, pe = () => {
|
|
74
|
+
q.length !== 0 && R({
|
|
75
|
+
title: T("members.remove.bulkTitle", "Remove selected members"),
|
|
76
|
+
description: `${T("members.remove.bulkPrefix", "Remove")} ${q.length} ${T(q.length === 1 ? "members.remove.bulkSuffixSingle" : "members.remove.bulkSuffixMany", q.length === 1 ? "selected member from this organization?" : "selected members from this organization?")}`,
|
|
77
|
+
confirmText: `${T("members.remove.confirm", "Remove")} ${q.length}`,
|
|
78
78
|
variant: "danger",
|
|
79
79
|
onConfirm: () => {
|
|
80
80
|
X(q.map((e) => e.userId));
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
}, Q = (e, t) => {
|
|
84
|
-
|
|
84
|
+
L((n) => {
|
|
85
85
|
let r = new Set(n);
|
|
86
86
|
return t ? r.add(e) : r.delete(e), r;
|
|
87
87
|
});
|
|
88
88
|
}, $ = (e) => {
|
|
89
|
-
|
|
89
|
+
L((t) => {
|
|
90
90
|
let n = new Set(t);
|
|
91
91
|
return K.forEach((t) => {
|
|
92
92
|
e ? n.add(t.id) : n.delete(t.id);
|
|
93
93
|
}), n;
|
|
94
94
|
});
|
|
95
95
|
};
|
|
96
|
-
return M ?
|
|
96
|
+
return M ? le ? /* @__PURE__ */ x("div", {
|
|
97
97
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
98
|
-
children: /* @__PURE__ */
|
|
99
|
-
}) :
|
|
98
|
+
children: /* @__PURE__ */ x(a, { message: T("common.loadingPermissions", "Loading permissions...") })
|
|
99
|
+
}) : k(c.MEMBER_LIST) ? V ? /* @__PURE__ */ x("div", {
|
|
100
100
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
|
|
101
|
-
children: /* @__PURE__ */
|
|
102
|
-
}) :
|
|
101
|
+
children: /* @__PURE__ */ x(a, { message: T("members.list.loading", "Loading members...") })
|
|
102
|
+
}) : H ? /* @__PURE__ */ x("div", {
|
|
103
103
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
|
|
104
|
-
children: /* @__PURE__ */
|
|
105
|
-
message:
|
|
104
|
+
children: /* @__PURE__ */ x(o, {
|
|
105
|
+
message: H.message,
|
|
106
106
|
action: {
|
|
107
|
-
label:
|
|
107
|
+
label: T("common.retry", "Retry"),
|
|
108
108
|
onClick: () => {
|
|
109
|
-
|
|
109
|
+
U();
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
})
|
|
113
|
-
}) : /* @__PURE__ */
|
|
113
|
+
}) : /* @__PURE__ */ S("div", {
|
|
114
114
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6 animate-in fade-in duration-200",
|
|
115
|
-
children: [/* @__PURE__ */
|
|
115
|
+
children: [/* @__PURE__ */ S("div", {
|
|
116
116
|
className: "mx-auto flex w-full max-w-7xl flex-col gap-6",
|
|
117
117
|
children: [
|
|
118
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ S("div", {
|
|
119
119
|
className: "flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ S("div", {
|
|
121
121
|
className: "space-y-2",
|
|
122
|
-
children: [
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ x("h1", {
|
|
124
|
+
className: "text-3xl font-bold text-[var(--color-text-primary)]",
|
|
125
|
+
children: T("members.list.title", "Members")
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ x("p", {
|
|
128
|
+
className: "max-w-2xl text-[var(--color-text-secondary)]",
|
|
129
|
+
children: T("members.list.subtitle", "Manage organization members, inspect their roles, and invite more people into this organization.")
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ x(ne, {
|
|
132
|
+
className: "max-w-2xl",
|
|
133
|
+
children: T("members.list.purpose", "Members are the people who belong to this organization and inherit access to its workspaces. Use this page to see who has access, check their roles, invite new people, or remove anyone who should no longer be here.")
|
|
134
|
+
})
|
|
135
|
+
]
|
|
136
|
+
}), j && k(c.MEMBER_INVITE) && /* @__PURE__ */ S("button", {
|
|
130
137
|
type: "button",
|
|
131
|
-
onClick: () =>
|
|
138
|
+
onClick: () => D(`${O}/${M}/members/invite`),
|
|
132
139
|
className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg bg-[var(--color-action-primary-bg)] px-4 py-2.5 text-[var(--color-action-primary-text)] transition-all duration-200 hover:opacity-90",
|
|
133
|
-
children: [/* @__PURE__ */
|
|
140
|
+
children: [/* @__PURE__ */ x(g, {
|
|
134
141
|
size: 18,
|
|
135
142
|
"aria-hidden": "true"
|
|
136
|
-
}), /* @__PURE__ */
|
|
143
|
+
}), /* @__PURE__ */ x("span", {
|
|
137
144
|
className: "font-medium",
|
|
138
|
-
children:
|
|
145
|
+
children: T("members.invite.button", "Invite Member")
|
|
139
146
|
})]
|
|
140
147
|
})]
|
|
141
148
|
}),
|
|
142
|
-
|
|
149
|
+
B.length > 0 ? /* @__PURE__ */ S("div", {
|
|
143
150
|
className: "grid grid-cols-2 gap-4",
|
|
144
|
-
children: [/* @__PURE__ */
|
|
145
|
-
treatment: "
|
|
151
|
+
children: [/* @__PURE__ */ S(b, {
|
|
152
|
+
treatment: "glass",
|
|
153
|
+
glow: !0,
|
|
146
154
|
className: "p-4",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ x("p", {
|
|
148
156
|
className: "text-sm text-text-secondary",
|
|
149
|
-
children:
|
|
150
|
-
}), /* @__PURE__ */
|
|
157
|
+
children: T("members.list.title", "Members")
|
|
158
|
+
}), /* @__PURE__ */ x("p", {
|
|
151
159
|
className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
|
|
152
|
-
children:
|
|
160
|
+
children: B.length
|
|
153
161
|
})]
|
|
154
|
-
}), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ S(b, {
|
|
155
163
|
treatment: "metric",
|
|
156
164
|
className: "p-4",
|
|
157
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ x("p", {
|
|
158
166
|
className: "text-sm text-text-secondary",
|
|
159
|
-
children:
|
|
160
|
-
}), /* @__PURE__ */
|
|
167
|
+
children: T("members.list.column.role", "Role")
|
|
168
|
+
}), /* @__PURE__ */ x("p", {
|
|
161
169
|
className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
|
|
162
|
-
children: new Set(
|
|
170
|
+
children: new Set(B.map((e) => e.role)).size
|
|
163
171
|
})]
|
|
164
172
|
})]
|
|
165
173
|
}) : null,
|
|
166
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ S(b, {
|
|
167
175
|
treatment: "plain",
|
|
168
176
|
className: "border-border-seam p-4",
|
|
169
|
-
children: [/* @__PURE__ */
|
|
177
|
+
children: [/* @__PURE__ */ S("div", {
|
|
170
178
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ x(r, {
|
|
172
180
|
value: N,
|
|
173
|
-
onChange:
|
|
174
|
-
placeholder:
|
|
175
|
-
label:
|
|
181
|
+
onChange: P,
|
|
182
|
+
placeholder: T("members.list.searchPlaceholder", "Search by member ID or role..."),
|
|
183
|
+
label: T("members.list.searchLabel", "Search organization members"),
|
|
176
184
|
inputId: "organization-members-search",
|
|
177
185
|
className: "flex-1"
|
|
178
|
-
}), /* @__PURE__ */
|
|
186
|
+
}), /* @__PURE__ */ x("button", {
|
|
179
187
|
type: "button",
|
|
180
188
|
onClick: () => {
|
|
181
|
-
|
|
189
|
+
U();
|
|
182
190
|
},
|
|
183
191
|
className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] px-4 py-2 text-[var(--color-text-primary)] transition-all duration-200 hover:bg-[var(--color-bg-subtle)]",
|
|
184
|
-
"aria-label":
|
|
185
|
-
title:
|
|
186
|
-
children: /* @__PURE__ */
|
|
192
|
+
"aria-label": T("members.list.refresh", "Refresh members"),
|
|
193
|
+
title: T("members.list.refresh", "Refresh members"),
|
|
194
|
+
children: /* @__PURE__ */ x(_, {
|
|
187
195
|
size: 18,
|
|
188
196
|
"aria-hidden": "true"
|
|
189
197
|
})
|
|
190
198
|
})]
|
|
191
|
-
}), K.length > 0 ? /* @__PURE__ */
|
|
199
|
+
}), K.length > 0 ? /* @__PURE__ */ S("div", {
|
|
192
200
|
className: "mt-4 flex flex-col gap-3 rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-canvas)] p-4 sm:flex-row sm:items-center sm:justify-between",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ S("div", {
|
|
194
202
|
className: "flex flex-wrap items-center gap-3",
|
|
195
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ S("label", {
|
|
196
204
|
className: "flex items-center gap-2 text-sm text-[var(--color-text-primary)]",
|
|
197
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ x(i, {
|
|
198
206
|
checked: J,
|
|
199
207
|
indeterminate: Y,
|
|
200
208
|
onChange: $,
|
|
201
|
-
ariaLabel:
|
|
202
|
-
}), /* @__PURE__ */
|
|
203
|
-
}),
|
|
209
|
+
ariaLabel: T("members.list.selectAll", "Select all members")
|
|
210
|
+
}), /* @__PURE__ */ x("span", { children: T("common.selectAllVisible", "Select all visible") })]
|
|
211
|
+
}), I.size > 0 ? /* @__PURE__ */ x("button", {
|
|
204
212
|
type: "button",
|
|
205
|
-
onClick: () =>
|
|
213
|
+
onClick: () => L(/* @__PURE__ */ new Set()),
|
|
206
214
|
className: "text-sm text-[var(--color-text-secondary)] transition-colors hover:text-[var(--color-text-primary)]",
|
|
207
|
-
children:
|
|
215
|
+
children: T("common.clearSelection", "Clear selection")
|
|
208
216
|
}) : null]
|
|
209
|
-
}), /* @__PURE__ */
|
|
217
|
+
}), /* @__PURE__ */ S("div", {
|
|
210
218
|
className: "flex flex-col gap-2 sm:flex-row sm:items-center",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
219
|
+
children: [/* @__PURE__ */ S("span", {
|
|
212
220
|
className: "text-sm text-[var(--color-text-secondary)]",
|
|
213
221
|
children: [
|
|
214
|
-
|
|
222
|
+
I.size,
|
|
215
223
|
" ",
|
|
216
|
-
|
|
224
|
+
T("common.selected", "selected")
|
|
217
225
|
]
|
|
218
|
-
}),
|
|
226
|
+
}), k(c.MEMBER_REMOVE) && /* @__PURE__ */ S("button", {
|
|
219
227
|
type: "button",
|
|
220
|
-
onClick:
|
|
228
|
+
onClick: pe,
|
|
221
229
|
disabled: q.length === 0 || W,
|
|
222
230
|
className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg border border-[var(--color-status-error-border)] px-3 py-2 text-[var(--color-status-error-text)] transition-all duration-200 hover:bg-[var(--color-status-error-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
223
231
|
children: [
|
|
224
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ x(y, {
|
|
225
233
|
size: 16,
|
|
226
234
|
"aria-hidden": "true"
|
|
227
235
|
}),
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
q.length > 0 ? /* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ x("span", { children: T("common.removeSelected", "Remove Selected") }),
|
|
237
|
+
q.length > 0 ? /* @__PURE__ */ S("span", { children: [
|
|
230
238
|
"(",
|
|
231
239
|
q.length,
|
|
232
240
|
")"
|
|
@@ -236,194 +244,194 @@ function w() {
|
|
|
236
244
|
})]
|
|
237
245
|
}) : null]
|
|
238
246
|
}),
|
|
239
|
-
K.length === 0 ? /* @__PURE__ */ b
|
|
247
|
+
K.length === 0 ? /* @__PURE__ */ x(b, {
|
|
240
248
|
treatment: "glass",
|
|
241
|
-
glow:
|
|
249
|
+
glow: B.length === 0,
|
|
242
250
|
className: "border-border-seam p-6",
|
|
243
|
-
children: /* @__PURE__ */
|
|
251
|
+
children: /* @__PURE__ */ x(te, {
|
|
244
252
|
illustration: "empty-people",
|
|
245
|
-
title:
|
|
246
|
-
description:
|
|
247
|
-
action: j &&
|
|
253
|
+
title: T("members.list.emptyTitle", "No members found"),
|
|
254
|
+
description: T("members.list.emptyDescription", "Invite someone to this organization to grant them access and assign their role."),
|
|
255
|
+
action: j && k(c.MEMBER_INVITE) ? /* @__PURE__ */ x("button", {
|
|
248
256
|
type: "button",
|
|
249
|
-
onClick: () =>
|
|
257
|
+
onClick: () => D(`${O}/${M}/members/invite`),
|
|
250
258
|
className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg bg-[var(--color-action-primary-bg)] px-4 py-2 font-medium text-[var(--color-action-primary-text)] transition-all duration-200 hover:bg-[var(--color-action-primary-bgHover)]",
|
|
251
|
-
children:
|
|
259
|
+
children: T("members.invite.button", "Invite Member")
|
|
252
260
|
}) : void 0
|
|
253
261
|
})
|
|
254
|
-
}) : /* @__PURE__ */
|
|
262
|
+
}) : /* @__PURE__ */ S(ae, { children: [/* @__PURE__ */ x("div", {
|
|
255
263
|
className: "grid gap-4 md:hidden",
|
|
256
|
-
children: K.map((e) => /* @__PURE__ */
|
|
264
|
+
children: K.map((e) => /* @__PURE__ */ S(b, {
|
|
257
265
|
treatment: "insight",
|
|
258
266
|
className: "border-border-seam p-4",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ S("div", {
|
|
260
268
|
className: "flex items-start gap-3",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
262
|
-
checked:
|
|
269
|
+
children: [/* @__PURE__ */ x(i, {
|
|
270
|
+
checked: I.has(e.id),
|
|
263
271
|
onChange: (t) => Q(e.id, t),
|
|
264
|
-
ariaLabel: `${
|
|
265
|
-
}), /* @__PURE__ */
|
|
272
|
+
ariaLabel: `${T("members.list.selectMember", "Select member")} ${e.userId}`
|
|
273
|
+
}), /* @__PURE__ */ S("div", {
|
|
266
274
|
className: "flex min-w-0 flex-1 gap-3",
|
|
267
|
-
children: [/* @__PURE__ */
|
|
275
|
+
children: [/* @__PURE__ */ x("div", {
|
|
268
276
|
className: "flex size-10 items-center justify-center rounded-full bg-[var(--color-status-info-bgSubtle)] text-[var(--color-status-info-text)]",
|
|
269
|
-
children: /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ x(v, {
|
|
270
278
|
size: 18,
|
|
271
279
|
"aria-hidden": "true"
|
|
272
280
|
})
|
|
273
|
-
}), /* @__PURE__ */
|
|
281
|
+
}), /* @__PURE__ */ S("div", {
|
|
274
282
|
className: "min-w-0 flex-1 space-y-3",
|
|
275
|
-
children: [/* @__PURE__ */
|
|
276
|
-
/* @__PURE__ */
|
|
283
|
+
children: [/* @__PURE__ */ S("div", { children: [
|
|
284
|
+
/* @__PURE__ */ S("div", {
|
|
277
285
|
className: "flex flex-wrap items-start gap-2",
|
|
278
|
-
children: [/* @__PURE__ */
|
|
286
|
+
children: [/* @__PURE__ */ x("h2", {
|
|
279
287
|
className: "break-all text-base font-semibold text-[var(--color-text-primary)]",
|
|
280
288
|
children: G[e.userId]?.displayName ?? `User ${e.userId.slice(0, 8)}…`
|
|
281
|
-
}), /* @__PURE__ */
|
|
289
|
+
}), /* @__PURE__ */ x(l, { role: e.role })]
|
|
282
290
|
}),
|
|
283
|
-
G[e.userId]?.email ? /* @__PURE__ */
|
|
291
|
+
G[e.userId]?.email ? /* @__PURE__ */ x("p", {
|
|
284
292
|
className: "mt-0.5 break-all text-xs text-[var(--color-text-secondary)]",
|
|
285
293
|
children: G[e.userId]?.email
|
|
286
294
|
}) : null,
|
|
287
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ S("details", {
|
|
288
296
|
className: "mt-1 text-xs text-[var(--color-text-muted)]",
|
|
289
297
|
children: [
|
|
290
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ x("summary", {
|
|
291
299
|
className: "cursor-pointer",
|
|
292
|
-
children:
|
|
300
|
+
children: T("members.list.showIds", "Show IDs")
|
|
293
301
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ S("p", {
|
|
295
303
|
className: "mt-1 break-all font-mono",
|
|
296
304
|
children: [
|
|
297
|
-
|
|
305
|
+
T("members.detail.userId", "User ID"),
|
|
298
306
|
": ",
|
|
299
307
|
e.userId
|
|
300
308
|
]
|
|
301
309
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ S("p", {
|
|
303
311
|
className: "mt-0.5 break-all font-mono",
|
|
304
312
|
children: [
|
|
305
|
-
|
|
313
|
+
T("members.list.memberId", "Member ID"),
|
|
306
314
|
": ",
|
|
307
315
|
e.id
|
|
308
316
|
]
|
|
309
317
|
})
|
|
310
318
|
]
|
|
311
319
|
})
|
|
312
|
-
] }), /* @__PURE__ */
|
|
320
|
+
] }), /* @__PURE__ */ S("dl", {
|
|
313
321
|
className: "grid grid-cols-1 gap-3 text-sm",
|
|
314
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", {
|
|
315
323
|
className: "text-[var(--color-text-secondary)]",
|
|
316
|
-
children:
|
|
317
|
-
}), /* @__PURE__ */
|
|
324
|
+
children: T("members.list.invitedBy", "Invited by")
|
|
325
|
+
}), /* @__PURE__ */ x("dd", {
|
|
318
326
|
className: "mt-1 break-all font-mono text-[var(--color-text-primary)]",
|
|
319
|
-
children: e.invitedBy ||
|
|
320
|
-
})] }), /* @__PURE__ */
|
|
327
|
+
children: e.invitedBy || T("common.notAvailable", "N/A")
|
|
328
|
+
})] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", {
|
|
321
329
|
className: "text-[var(--color-text-secondary)]",
|
|
322
|
-
children:
|
|
323
|
-
}), /* @__PURE__ */
|
|
330
|
+
children: T("members.list.joined", "Joined")
|
|
331
|
+
}), /* @__PURE__ */ x("dd", {
|
|
324
332
|
className: "mt-1 text-[var(--color-text-primary)]",
|
|
325
|
-
children:
|
|
333
|
+
children: E(e.joinedAt)
|
|
326
334
|
})] })]
|
|
327
335
|
})]
|
|
328
336
|
})]
|
|
329
337
|
})]
|
|
330
|
-
}), /* @__PURE__ */
|
|
338
|
+
}), /* @__PURE__ */ S("div", {
|
|
331
339
|
className: "mt-4 flex flex-wrap gap-2 border-t border-[var(--color-border-default)] pt-4",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
340
|
+
children: [/* @__PURE__ */ S("button", {
|
|
333
341
|
type: "button",
|
|
334
|
-
onClick: () =>
|
|
342
|
+
onClick: () => D(`${O}/${M}/members/${e.userId}`),
|
|
335
343
|
className: "inline-flex min-h-10 items-center gap-2 rounded-lg border border-[var(--color-border-default)] px-3 py-2 text-sm text-[var(--color-text-primary)] transition-all duration-200 hover:bg-[var(--color-bg-subtle)]",
|
|
336
|
-
children: [/* @__PURE__ */
|
|
344
|
+
children: [/* @__PURE__ */ x(h, {
|
|
337
345
|
size: 16,
|
|
338
346
|
"aria-hidden": "true"
|
|
339
|
-
}),
|
|
340
|
-
}),
|
|
347
|
+
}), T("common.view", "View")]
|
|
348
|
+
}), k(c.MEMBER_REMOVE) && /* @__PURE__ */ S("button", {
|
|
341
349
|
type: "button",
|
|
342
350
|
onClick: () => Z(e.userId),
|
|
343
351
|
disabled: W,
|
|
344
352
|
className: "inline-flex min-h-10 items-center gap-2 rounded-lg border border-[var(--color-status-error-border)] px-3 py-2 text-sm text-[var(--color-status-error-text)] transition-all duration-200 hover:bg-[var(--color-status-error-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
345
|
-
children: [/* @__PURE__ */
|
|
353
|
+
children: [/* @__PURE__ */ x(y, {
|
|
346
354
|
size: 16,
|
|
347
355
|
"aria-hidden": "true"
|
|
348
|
-
}),
|
|
356
|
+
}), T("members.remove.confirm", "Remove")]
|
|
349
357
|
})]
|
|
350
358
|
})]
|
|
351
359
|
}, e.id))
|
|
352
|
-
}), /* @__PURE__ */ b
|
|
360
|
+
}), /* @__PURE__ */ x(b, {
|
|
353
361
|
treatment: "plain",
|
|
354
362
|
className: "hidden overflow-hidden border-border-seam p-0 md:block",
|
|
355
|
-
children: /* @__PURE__ */
|
|
363
|
+
children: /* @__PURE__ */ x("div", {
|
|
356
364
|
className: "overflow-x-auto",
|
|
357
|
-
children: /* @__PURE__ */
|
|
365
|
+
children: /* @__PURE__ */ S("table", {
|
|
358
366
|
className: "min-w-full",
|
|
359
|
-
children: [/* @__PURE__ */
|
|
367
|
+
children: [/* @__PURE__ */ x("thead", {
|
|
360
368
|
className: "bg-[var(--color-bg-subtle)]",
|
|
361
|
-
children: /* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */
|
|
369
|
+
children: /* @__PURE__ */ S("tr", { children: [
|
|
370
|
+
/* @__PURE__ */ x("th", {
|
|
363
371
|
className: "w-12 px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
364
|
-
children: /* @__PURE__ */
|
|
372
|
+
children: /* @__PURE__ */ x(i, {
|
|
365
373
|
checked: J,
|
|
366
374
|
indeterminate: Y,
|
|
367
375
|
onChange: $,
|
|
368
|
-
ariaLabel:
|
|
376
|
+
ariaLabel: T("members.list.selectAll", "Select all members")
|
|
369
377
|
})
|
|
370
378
|
}),
|
|
371
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ x("th", {
|
|
372
380
|
className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
373
|
-
children:
|
|
381
|
+
children: T("members.list.column.user", "User")
|
|
374
382
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ x("th", {
|
|
376
384
|
className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
377
|
-
children:
|
|
385
|
+
children: T("members.list.column.role", "Role")
|
|
378
386
|
}),
|
|
379
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ x("th", {
|
|
380
388
|
className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
381
|
-
children:
|
|
389
|
+
children: T("members.list.invitedBy", "Invited by")
|
|
382
390
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ x("th", {
|
|
384
392
|
className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
385
|
-
children:
|
|
393
|
+
children: T("members.list.joined", "Joined")
|
|
386
394
|
}),
|
|
387
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ x("th", {
|
|
388
396
|
className: "px-6 py-3 text-right text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
389
|
-
children:
|
|
397
|
+
children: T("common.actions", "Actions")
|
|
390
398
|
})
|
|
391
399
|
] })
|
|
392
|
-
}), /* @__PURE__ */
|
|
400
|
+
}), /* @__PURE__ */ x("tbody", {
|
|
393
401
|
className: "divide-y divide-[var(--color-border-seam)]",
|
|
394
|
-
children: K.map((e) => /* @__PURE__ */
|
|
402
|
+
children: K.map((e) => /* @__PURE__ */ S("tr", {
|
|
395
403
|
className: "transition-colors hover:bg-[var(--color-bg-subtle)]",
|
|
396
404
|
children: [
|
|
397
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ x("td", {
|
|
398
406
|
className: "px-6 py-4 align-top",
|
|
399
|
-
children: /* @__PURE__ */
|
|
400
|
-
checked:
|
|
407
|
+
children: /* @__PURE__ */ x(i, {
|
|
408
|
+
checked: I.has(e.id),
|
|
401
409
|
onChange: (t) => Q(e.id, t),
|
|
402
|
-
ariaLabel: `${
|
|
410
|
+
ariaLabel: `${T("members.list.selectMember", "Select member")} ${e.userId}`
|
|
403
411
|
})
|
|
404
412
|
}),
|
|
405
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ x("td", {
|
|
406
414
|
className: "px-6 py-4",
|
|
407
|
-
children: /* @__PURE__ */
|
|
415
|
+
children: /* @__PURE__ */ S("div", {
|
|
408
416
|
className: "flex items-start gap-3",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
417
|
+
children: [/* @__PURE__ */ x("div", {
|
|
410
418
|
className: "flex size-10 items-center justify-center rounded-full bg-[var(--color-status-info-bgSubtle)] text-[var(--color-status-info-text)]",
|
|
411
|
-
children: /* @__PURE__ */
|
|
419
|
+
children: /* @__PURE__ */ x(v, {
|
|
412
420
|
size: 18,
|
|
413
421
|
"aria-hidden": "true"
|
|
414
422
|
})
|
|
415
|
-
}), /* @__PURE__ */
|
|
423
|
+
}), /* @__PURE__ */ S("div", {
|
|
416
424
|
className: "min-w-0",
|
|
417
|
-
children: [/* @__PURE__ */
|
|
418
|
-
profile: G[e.userId] ??
|
|
425
|
+
children: [/* @__PURE__ */ x(w, {
|
|
426
|
+
profile: G[e.userId] ?? oe({
|
|
419
427
|
actorId: e.userId,
|
|
420
428
|
actorType: "user"
|
|
421
429
|
}),
|
|
422
430
|
variant: "cell"
|
|
423
|
-
}), /* @__PURE__ */
|
|
431
|
+
}), /* @__PURE__ */ S("p", {
|
|
424
432
|
className: "break-all font-mono text-xs text-[var(--color-text-muted)]",
|
|
425
433
|
children: [
|
|
426
|
-
|
|
434
|
+
T("common.idLabel", "ID"),
|
|
427
435
|
": ",
|
|
428
436
|
e.id
|
|
429
437
|
]
|
|
@@ -431,40 +439,40 @@ function w() {
|
|
|
431
439
|
})]
|
|
432
440
|
})
|
|
433
441
|
}),
|
|
434
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ x("td", {
|
|
435
443
|
className: "px-6 py-4 align-top",
|
|
436
|
-
children: /* @__PURE__ */
|
|
444
|
+
children: /* @__PURE__ */ x(l, { role: e.role })
|
|
437
445
|
}),
|
|
438
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ x("td", {
|
|
439
447
|
className: "px-6 py-4 align-top text-sm text-[var(--color-text-secondary)]",
|
|
440
|
-
children: e.invitedBy ||
|
|
448
|
+
children: e.invitedBy || T("common.notAvailable", "N/A")
|
|
441
449
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ x("td", {
|
|
443
451
|
className: "px-6 py-4 align-top text-sm text-[var(--color-text-secondary)]",
|
|
444
|
-
children:
|
|
452
|
+
children: E(e.joinedAt)
|
|
445
453
|
}),
|
|
446
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ x("td", {
|
|
447
455
|
className: "px-6 py-4 align-top",
|
|
448
|
-
children: /* @__PURE__ */
|
|
456
|
+
children: /* @__PURE__ */ S("div", {
|
|
449
457
|
className: "flex items-center justify-end gap-2",
|
|
450
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ x("button", {
|
|
451
459
|
type: "button",
|
|
452
|
-
onClick: () =>
|
|
460
|
+
onClick: () => D(`${O}/${M}/members/${e.userId}`),
|
|
453
461
|
className: "rounded-lg p-2 text-[var(--color-text-secondary)] transition-all duration-200 hover:bg-[var(--color-bg-muted)] hover:text-[var(--color-text-primary)]",
|
|
454
|
-
"aria-label": `${
|
|
455
|
-
title: `${
|
|
456
|
-
children: /* @__PURE__ */
|
|
462
|
+
"aria-label": `${T("members.list.viewMember", "View member")} ${e.userId}`,
|
|
463
|
+
title: `${T("members.list.viewMember", "View member")} ${e.userId}`,
|
|
464
|
+
children: /* @__PURE__ */ x(h, {
|
|
457
465
|
size: 18,
|
|
458
466
|
"aria-hidden": "true"
|
|
459
467
|
})
|
|
460
|
-
}),
|
|
468
|
+
}), k(c.MEMBER_REMOVE) && /* @__PURE__ */ x("button", {
|
|
461
469
|
type: "button",
|
|
462
470
|
onClick: () => Z(e.userId),
|
|
463
471
|
disabled: W,
|
|
464
472
|
className: "rounded-lg p-2 text-[var(--color-status-error-text)] transition-all duration-200 hover:bg-[var(--color-status-error-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
465
|
-
"aria-label": `${
|
|
466
|
-
title: `${
|
|
467
|
-
children: /* @__PURE__ */
|
|
473
|
+
"aria-label": `${T("members.list.removeMember", "Remove member")} ${e.userId}`,
|
|
474
|
+
title: `${T("members.list.removeMember", "Remove member")} ${e.userId}`,
|
|
475
|
+
children: /* @__PURE__ */ x(y, {
|
|
468
476
|
size: 18,
|
|
469
477
|
"aria-hidden": "true"
|
|
470
478
|
})
|
|
@@ -478,25 +486,25 @@ function w() {
|
|
|
478
486
|
})
|
|
479
487
|
})] })
|
|
480
488
|
]
|
|
481
|
-
}),
|
|
482
|
-
}) : /* @__PURE__ */
|
|
489
|
+
}), z]
|
|
490
|
+
}) : /* @__PURE__ */ x("div", {
|
|
483
491
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
484
|
-
children: /* @__PURE__ */
|
|
492
|
+
children: /* @__PURE__ */ x("div", {
|
|
485
493
|
className: "p-8 text-center text-[var(--color-text-secondary)]",
|
|
486
|
-
children:
|
|
494
|
+
children: T("members.list.noPermission", "You don't have permission to view members.")
|
|
487
495
|
})
|
|
488
|
-
}) : /* @__PURE__ */
|
|
496
|
+
}) : /* @__PURE__ */ x("div", {
|
|
489
497
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
|
|
490
|
-
children: /* @__PURE__ */
|
|
491
|
-
message:
|
|
498
|
+
children: /* @__PURE__ */ x(o, {
|
|
499
|
+
message: T("members.list.missingOrg", "Organization ID is required to view members"),
|
|
492
500
|
action: {
|
|
493
|
-
label:
|
|
494
|
-
onClick: () =>
|
|
501
|
+
label: T("members.list.goToOrganizations", "Go to Organizations"),
|
|
502
|
+
onClick: () => D(O)
|
|
495
503
|
}
|
|
496
504
|
})
|
|
497
505
|
});
|
|
498
506
|
}
|
|
499
507
|
//#endregion
|
|
500
|
-
export {
|
|
508
|
+
export { T as MembersListPage };
|
|
501
509
|
|
|
502
510
|
//# sourceMappingURL=MembersListPage.js.map
|