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