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