@burdenoff/microfe-organization 2026.625.1 → 2026.625.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/organization-management/modules/members/components/InviteStatusBadge.js +6 -2
- package/dist/organization-management/modules/members/components/InviteStatusBadge.js.map +1 -1
- package/dist/organization-management/modules/members/pages/InvitePeoplePage.js +16 -19
- package/dist/organization-management/modules/members/pages/InvitePeoplePage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MembersListPage.js +219 -220
- package/dist/organization-management/modules/members/pages/MembersListPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MyInvitesPage.js +40 -56
- package/dist/organization-management/modules/members/pages/MyInvitesPage.js.map +1 -1
- package/dist/organization-management/modules/organizations/components/OrganizationStatusBadge.js +5 -1
- package/dist/organization-management/modules/organizations/components/OrganizationStatusBadge.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js +36 -38
- package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js +118 -113
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/components/WorkspaceStatusBadge.js +5 -1
- package/dist/organization-management/modules/workspaces/components/WorkspaceStatusBadge.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceDetailPage.js +168 -170
- package/dist/organization-management/modules/workspaces/pages/WorkspaceDetailPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js +245 -243
- package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js.map +1 -1
- package/package.json +2 -2
- package/dist/organization-management/shared/components/feedback/EmptyState.js +0 -31
- package/dist/organization-management/shared/components/feedback/EmptyState.js.map +0 -1
|
@@ -2,290 +2,289 @@ import { useOrgConsole as e } from "../../../providers/OrgConsoleProvider.js";
|
|
|
2
2
|
import { toast as t } from "../../../../node_modules/sonner/dist/index.js";
|
|
3
3
|
import { WorkspaceStatus as n } from "../../../shared/types/graphql.js";
|
|
4
4
|
import { useTr as r } from "../../../shared/hooks/useTr.js";
|
|
5
|
-
import { SearchInput as
|
|
6
|
-
import { SelectionCheckbox as
|
|
7
|
-
import { LoadingState as
|
|
8
|
-
import { ErrorState as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { useConfirmDialog as ne } from "../../../shared/components/dialog/ConfirmDialog.js";
|
|
5
|
+
import { SearchInput as i } from "../../../shared/components/input/SearchInput.js";
|
|
6
|
+
import { SelectionCheckbox as a } from "../../../shared/components/input/SelectionCheckbox.js";
|
|
7
|
+
import { LoadingState as o } from "../../../shared/components/feedback/LoadingState.js";
|
|
8
|
+
import { ErrorState as ee } from "../../../shared/components/feedback/ErrorState.js";
|
|
9
|
+
import { useDebouncedValue as te } from "../../../shared/hooks/useDebouncedValue.js";
|
|
10
|
+
import { useConfirmDialog as s } from "../../../shared/components/dialog/ConfirmDialog.js";
|
|
12
11
|
import { PERMISSIONS as c } from "../../../constants/permissions.js";
|
|
13
|
-
import { isNative as l, nativeConfirm as
|
|
12
|
+
import { isNative as l, nativeConfirm as ne, nativeImpact as re, nativeNotify as u, nativeToast as d } from "../../../../utils/nativeBridge.js";
|
|
14
13
|
import { useDeleteWorkspace as f, useWorkspaces as p } from "../hooks/useWorkspaces.js";
|
|
15
14
|
import { WorkspaceStatusBadge as m } from "../components/WorkspaceStatusBadge.js";
|
|
16
|
-
import { useEffect as
|
|
17
|
-
import {
|
|
18
|
-
import { GlassCard as
|
|
19
|
-
import { usePermissions as
|
|
20
|
-
import { Fragment as
|
|
15
|
+
import { useEffect as h, useMemo as g, useState as _ } from "react";
|
|
16
|
+
import { Eye as v, Plus as y, RefreshCw as b, SquarePen as x, Trash2 as S } from "lucide-react";
|
|
17
|
+
import { GlassCard as C, IllustratedEmptyState as w } from "@burdenoff/fe-libs/ui";
|
|
18
|
+
import { usePermissions as ie } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
19
|
+
import { Fragment as ae, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
21
20
|
//#region src/organization-management/modules/workspaces/pages/WorkspacesListPage.tsx
|
|
22
|
-
function
|
|
21
|
+
function D(e) {
|
|
23
22
|
return new Date(e).toLocaleDateString();
|
|
24
23
|
}
|
|
25
|
-
function
|
|
26
|
-
let
|
|
27
|
-
...
|
|
28
|
-
search:
|
|
29
|
-
},
|
|
30
|
-
if (
|
|
31
|
-
let e =
|
|
32
|
-
return
|
|
33
|
-
let n = !e || t.name.toLowerCase().includes(e) || (t.slug?.toLowerCase().includes(e) ?? !1), r = !
|
|
24
|
+
function O({ mode: O = "my" } = {}) {
|
|
25
|
+
let k = r(), { navigate: A, basePath: j = "/organizations" } = e(), { hasPermission: M, isLoading: oe } = ie(), [N, se] = _(""), P = te(N, 300), [F, ce] = _({}), [I, L] = _(/* @__PURE__ */ new Set()), { openConfirmDialog: R, ConfirmDialog: z } = s(), B = O === "admin" ? "all" : "my", { workspaces: V, loading: H, error: U, refetch: W } = p({
|
|
26
|
+
...F,
|
|
27
|
+
search: P || void 0
|
|
28
|
+
}, B === "my" ? 100 : 20, 0, B), G = g(() => {
|
|
29
|
+
if (B !== "my") return V;
|
|
30
|
+
let e = P.trim().toLowerCase();
|
|
31
|
+
return V.filter((t) => {
|
|
32
|
+
let n = !e || t.name.toLowerCase().includes(e) || (t.slug?.toLowerCase().includes(e) ?? !1), r = !F.status || t.status === F.status;
|
|
34
33
|
return n && r;
|
|
35
34
|
});
|
|
36
35
|
}, [
|
|
36
|
+
V,
|
|
37
37
|
B,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
let t = new Set(W.map((e) => e.id)), n = new Set([...e].filter((e) => t.has(e)));
|
|
38
|
+
P,
|
|
39
|
+
F.status
|
|
40
|
+
]), { deleteWorkspace: le, loading: K } = f();
|
|
41
|
+
h(() => {
|
|
42
|
+
L((e) => {
|
|
43
|
+
let t = new Set(G.map((e) => e.id)), n = new Set([...e].filter((e) => t.has(e)));
|
|
45
44
|
return n.size === e.size ? e : n;
|
|
46
45
|
});
|
|
47
|
-
}, [
|
|
48
|
-
let
|
|
46
|
+
}, [G]);
|
|
47
|
+
let q = g(() => G.filter((e) => I.has(e.id)), [I, G]), J = G.length > 0 && G.every((e) => I.has(e.id)), Y = G.some((e) => I.has(e.id)) && !J, X = async (e) => {
|
|
49
48
|
try {
|
|
50
49
|
let n = (await Promise.allSettled(e.map(async (e) => {
|
|
51
|
-
let t = await
|
|
52
|
-
if (t.errors?.length) throw Error(t.errors[0]?.message ??
|
|
50
|
+
let t = await le(e);
|
|
51
|
+
if (t.errors?.length) throw Error(t.errors[0]?.message ?? k("workspaces.suspend.failed", "Failed to suspend workspace"));
|
|
53
52
|
}))).find((e) => e.status === "rejected");
|
|
54
53
|
if (n?.status === "rejected") throw n.reason;
|
|
55
|
-
|
|
56
|
-
let r = e.length === 1 ?
|
|
54
|
+
L(/* @__PURE__ */ new Set()), await W();
|
|
55
|
+
let r = e.length === 1 ? k("workspaces.suspend.successSingle", "Workspace suspended successfully") : `${e.length} ${k("workspaces.suspend.successMany", "workspaces suspended successfully")}`;
|
|
57
56
|
t.success(r), u("success"), l() && d(r);
|
|
58
57
|
} catch (e) {
|
|
59
|
-
let n = e instanceof Error ? e.message :
|
|
58
|
+
let n = e instanceof Error ? e.message : k("workspaces.suspend.failed", "Failed to suspend workspace");
|
|
60
59
|
t.error(n), u("error"), l() && d(n);
|
|
61
60
|
}
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
let n =
|
|
65
|
-
|
|
61
|
+
}, Z = (e, t) => {
|
|
62
|
+
re("medium");
|
|
63
|
+
let n = k("workspaces.suspend.title", "Suspend workspace"), r = `${k("workspaces.suspend.prefix", "Suspend")} ${t}? ${k("workspaces.suspend.suffix", "Workspace members will lose access until it is reactivated.")}`;
|
|
64
|
+
ne({
|
|
66
65
|
title: n,
|
|
67
66
|
message: r,
|
|
68
|
-
okButtonTitle:
|
|
67
|
+
okButtonTitle: k("workspaces.suspend.confirm", "Suspend")
|
|
69
68
|
}).then((t) => {
|
|
70
|
-
t === null ?
|
|
69
|
+
t === null ? R({
|
|
71
70
|
title: n,
|
|
72
71
|
description: r,
|
|
73
|
-
confirmText:
|
|
72
|
+
confirmText: k("workspaces.suspend.confirm", "Suspend"),
|
|
74
73
|
variant: "warning",
|
|
75
74
|
onConfirm: () => {
|
|
76
|
-
|
|
75
|
+
X([e]);
|
|
77
76
|
}
|
|
78
|
-
}) : t &&
|
|
77
|
+
}) : t && X([e]);
|
|
79
78
|
});
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
title:
|
|
83
|
-
description: `${
|
|
84
|
-
confirmText: `${
|
|
79
|
+
}, ue = () => {
|
|
80
|
+
q.length !== 0 && R({
|
|
81
|
+
title: k("workspaces.suspend.bulkTitle", "Suspend selected workspaces"),
|
|
82
|
+
description: `${k("workspaces.suspend.prefix", "Suspend")} ${q.length} ${k(q.length === 1 ? "workspaces.suspend.bulkSuffixSingle" : "workspaces.suspend.bulkSuffixMany", q.length === 1 ? "selected workspace?" : "selected workspaces?")}`,
|
|
83
|
+
confirmText: `${k("workspaces.suspend.confirm", "Suspend")} ${q.length}`,
|
|
85
84
|
variant: "warning",
|
|
86
85
|
onConfirm: () => {
|
|
87
|
-
|
|
86
|
+
X(q.map((e) => e.id));
|
|
88
87
|
}
|
|
89
88
|
});
|
|
90
89
|
}, Q = (e, t) => {
|
|
91
|
-
|
|
90
|
+
L((n) => {
|
|
92
91
|
let r = new Set(n);
|
|
93
92
|
return t ? r.add(e) : r.delete(e), r;
|
|
94
93
|
});
|
|
95
94
|
}, $ = (e) => {
|
|
96
|
-
|
|
95
|
+
L((t) => {
|
|
97
96
|
let n = new Set(t);
|
|
98
|
-
return
|
|
97
|
+
return G.forEach((t) => {
|
|
99
98
|
e ? n.add(t.id) : n.delete(t.id);
|
|
100
99
|
}), n;
|
|
101
100
|
});
|
|
102
101
|
};
|
|
103
|
-
return
|
|
102
|
+
return oe ? /* @__PURE__ */ T("div", {
|
|
104
103
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
105
|
-
children: /* @__PURE__ */
|
|
106
|
-
}) :
|
|
104
|
+
children: /* @__PURE__ */ T(o, { message: k("common.loadingPermissions", "Loading permissions...") })
|
|
105
|
+
}) : M(c.WORKSPACE_LIST) ? H ? /* @__PURE__ */ T("div", {
|
|
107
106
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
|
|
108
|
-
children: /* @__PURE__ */
|
|
109
|
-
}) :
|
|
107
|
+
children: /* @__PURE__ */ T(o, { message: k("workspaces.list.loading", "Loading workspaces...") })
|
|
108
|
+
}) : U ? /* @__PURE__ */ T("div", {
|
|
110
109
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
|
|
111
|
-
children: /* @__PURE__ */
|
|
112
|
-
message:
|
|
110
|
+
children: /* @__PURE__ */ T(ee, {
|
|
111
|
+
message: U.message,
|
|
113
112
|
action: {
|
|
114
|
-
label:
|
|
113
|
+
label: k("common.retry", "Retry"),
|
|
115
114
|
onClick: () => {
|
|
116
|
-
|
|
115
|
+
W();
|
|
117
116
|
}
|
|
118
117
|
}
|
|
119
118
|
})
|
|
120
|
-
}) : /* @__PURE__ */
|
|
119
|
+
}) : /* @__PURE__ */ E("div", {
|
|
121
120
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6 animate-in fade-in duration-200",
|
|
122
|
-
children: [/* @__PURE__ */
|
|
121
|
+
children: [/* @__PURE__ */ E("div", {
|
|
123
122
|
className: "mx-auto flex w-full max-w-7xl flex-col gap-6",
|
|
124
123
|
children: [
|
|
125
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ E("div", {
|
|
126
125
|
className: "flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",
|
|
127
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ E("div", {
|
|
128
127
|
className: "space-y-2",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
128
|
+
children: [/* @__PURE__ */ T("h1", {
|
|
130
129
|
className: "text-3xl font-bold text-[var(--color-text-primary)]",
|
|
131
|
-
children:
|
|
132
|
-
}), /* @__PURE__ */
|
|
130
|
+
children: k("workspaces.list.title", "Workspaces")
|
|
131
|
+
}), /* @__PURE__ */ T("p", {
|
|
133
132
|
className: "max-w-2xl text-[var(--color-text-secondary)]",
|
|
134
|
-
children:
|
|
133
|
+
children: k("workspaces.list.subtitle", "Manage organization workspaces, review their status, and open the workspace detail flow.")
|
|
135
134
|
})]
|
|
136
|
-
}),
|
|
135
|
+
}), M(c.WORKSPACE_CREATE) && /* @__PURE__ */ E("button", {
|
|
137
136
|
type: "button",
|
|
138
|
-
onClick: () =>
|
|
137
|
+
onClick: () => A(`${j}/workspaces/new`),
|
|
139
138
|
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",
|
|
140
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ T(y, {
|
|
141
140
|
size: 18,
|
|
142
141
|
"aria-hidden": "true"
|
|
143
|
-
}), /* @__PURE__ */
|
|
142
|
+
}), /* @__PURE__ */ T("span", {
|
|
144
143
|
className: "font-medium",
|
|
145
|
-
children:
|
|
144
|
+
children: k("workspaces.create.button", "Create Workspace")
|
|
146
145
|
})]
|
|
147
146
|
})]
|
|
148
147
|
}),
|
|
149
|
-
|
|
148
|
+
V.length > 0 ? /* @__PURE__ */ E("div", {
|
|
150
149
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-3",
|
|
151
150
|
children: [
|
|
152
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ E(C, {
|
|
153
152
|
treatment: "metric",
|
|
154
153
|
className: "p-4",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ T("p", {
|
|
156
155
|
className: "text-sm text-text-secondary",
|
|
157
|
-
children:
|
|
158
|
-
}), /* @__PURE__ */
|
|
156
|
+
children: k("workspaces.list.title", "Workspaces")
|
|
157
|
+
}), /* @__PURE__ */ T("p", {
|
|
159
158
|
className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
|
|
160
|
-
children:
|
|
159
|
+
children: V.length
|
|
161
160
|
})]
|
|
162
161
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ E(C, {
|
|
164
163
|
treatment: "metric",
|
|
165
164
|
className: "p-4",
|
|
166
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ T("p", {
|
|
167
166
|
className: "text-sm text-text-secondary",
|
|
168
|
-
children:
|
|
169
|
-
}), /* @__PURE__ */
|
|
167
|
+
children: k("workspaces.status.active", "Active")
|
|
168
|
+
}), /* @__PURE__ */ T("p", {
|
|
170
169
|
className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
|
|
171
|
-
children:
|
|
170
|
+
children: V.filter((e) => e.status === n.ACTIVE).length
|
|
172
171
|
})]
|
|
173
172
|
}),
|
|
174
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ E(C, {
|
|
175
174
|
treatment: "metric",
|
|
176
175
|
className: "col-span-2 p-4 sm:col-span-1",
|
|
177
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ T("p", {
|
|
178
177
|
className: "text-sm text-text-secondary",
|
|
179
|
-
children:
|
|
180
|
-
}), /* @__PURE__ */
|
|
178
|
+
children: k("workspaces.list.members", "Members")
|
|
179
|
+
}), /* @__PURE__ */ T("p", {
|
|
181
180
|
className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
|
|
182
|
-
children:
|
|
181
|
+
children: V.reduce((e, t) => e + (t.memberCount ?? 0), 0)
|
|
183
182
|
})]
|
|
184
183
|
})
|
|
185
184
|
]
|
|
186
185
|
}) : null,
|
|
187
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ E(C, {
|
|
188
187
|
treatment: "plain",
|
|
189
188
|
className: "border-border-seam p-4",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
189
|
+
children: [/* @__PURE__ */ E("div", {
|
|
191
190
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center",
|
|
192
191
|
children: [
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
value:
|
|
195
|
-
onChange:
|
|
196
|
-
placeholder:
|
|
197
|
-
label:
|
|
192
|
+
/* @__PURE__ */ T(i, {
|
|
193
|
+
value: N,
|
|
194
|
+
onChange: se,
|
|
195
|
+
placeholder: k("workspaces.list.searchPlaceholder", "Search workspaces..."),
|
|
196
|
+
label: k("workspaces.list.searchLabel", "Search workspaces"),
|
|
198
197
|
inputId: "workspaces-search",
|
|
199
198
|
className: "flex-1"
|
|
200
199
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ E("label", {
|
|
202
201
|
className: "flex min-h-11 min-w-[180px] flex-col justify-center rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] px-3 py-2 text-sm text-[var(--color-text-secondary)]",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ T("span", {
|
|
204
203
|
className: "sr-only",
|
|
205
|
-
children:
|
|
206
|
-
}), /* @__PURE__ */
|
|
207
|
-
value:
|
|
208
|
-
onChange: (e) =>
|
|
209
|
-
...
|
|
204
|
+
children: k("workspaces.list.filterByStatus", "Filter by workspace status")
|
|
205
|
+
}), /* @__PURE__ */ E("select", {
|
|
206
|
+
value: F.status || "",
|
|
207
|
+
onChange: (e) => ce({
|
|
208
|
+
...F,
|
|
210
209
|
status: e.target.value ? e.target.value : void 0
|
|
211
210
|
}),
|
|
212
211
|
className: "bg-transparent text-[var(--color-text-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
213
|
-
"aria-label":
|
|
212
|
+
"aria-label": k("workspaces.list.filterByStatus", "Filter by workspace status"),
|
|
214
213
|
children: [
|
|
215
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ T("option", {
|
|
216
215
|
value: "",
|
|
217
|
-
children:
|
|
216
|
+
children: k("workspaces.list.allStatuses", "All statuses")
|
|
218
217
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ T("option", {
|
|
220
219
|
value: n.ACTIVE,
|
|
221
|
-
children:
|
|
220
|
+
children: k("workspaces.status.active", "Active")
|
|
222
221
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ T("option", {
|
|
224
223
|
value: n.INACTIVE,
|
|
225
|
-
children:
|
|
224
|
+
children: k("workspaces.status.inactive", "Inactive")
|
|
226
225
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ T("option", {
|
|
228
227
|
value: n.ARCHIVED,
|
|
229
|
-
children:
|
|
228
|
+
children: k("workspaces.status.archived", "Archived")
|
|
230
229
|
})
|
|
231
230
|
]
|
|
232
231
|
})]
|
|
233
232
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ T("button", {
|
|
235
234
|
type: "button",
|
|
236
235
|
onClick: () => {
|
|
237
|
-
|
|
236
|
+
W();
|
|
238
237
|
},
|
|
239
238
|
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)]",
|
|
240
|
-
"aria-label":
|
|
241
|
-
title:
|
|
242
|
-
children: /* @__PURE__ */
|
|
239
|
+
"aria-label": k("workspaces.list.refresh", "Refresh workspaces"),
|
|
240
|
+
title: k("workspaces.list.refresh", "Refresh workspaces"),
|
|
241
|
+
children: /* @__PURE__ */ T(b, {
|
|
243
242
|
size: 18,
|
|
244
243
|
"aria-hidden": "true"
|
|
245
244
|
})
|
|
246
245
|
})
|
|
247
246
|
]
|
|
248
|
-
}),
|
|
247
|
+
}), G.length > 0 ? /* @__PURE__ */ E("div", {
|
|
249
248
|
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",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ E("div", {
|
|
251
250
|
className: "flex flex-wrap items-center gap-3",
|
|
252
|
-
children: [/* @__PURE__ */
|
|
251
|
+
children: [/* @__PURE__ */ E("label", {
|
|
253
252
|
className: "flex items-center gap-2 text-sm text-[var(--color-text-primary)]",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
255
|
-
checked:
|
|
256
|
-
indeterminate:
|
|
253
|
+
children: [/* @__PURE__ */ T(a, {
|
|
254
|
+
checked: J,
|
|
255
|
+
indeterminate: Y,
|
|
257
256
|
onChange: $,
|
|
258
|
-
ariaLabel:
|
|
259
|
-
}), /* @__PURE__ */
|
|
260
|
-
}),
|
|
257
|
+
ariaLabel: k("workspaces.list.selectAll", "Select all workspaces")
|
|
258
|
+
}), /* @__PURE__ */ T("span", { children: k("common.selectAllVisible", "Select all visible") })]
|
|
259
|
+
}), I.size > 0 ? /* @__PURE__ */ T("button", {
|
|
261
260
|
type: "button",
|
|
262
|
-
onClick: () =>
|
|
261
|
+
onClick: () => L(/* @__PURE__ */ new Set()),
|
|
263
262
|
className: "text-sm text-[var(--color-text-secondary)] transition-colors hover:text-[var(--color-text-primary)]",
|
|
264
|
-
children:
|
|
263
|
+
children: k("common.clearSelection", "Clear selection")
|
|
265
264
|
}) : null]
|
|
266
|
-
}), /* @__PURE__ */
|
|
265
|
+
}), /* @__PURE__ */ E("div", {
|
|
267
266
|
className: "flex flex-col gap-2 sm:flex-row sm:items-center",
|
|
268
|
-
children: [/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ E("span", {
|
|
269
268
|
className: "text-sm text-[var(--color-text-secondary)]",
|
|
270
269
|
children: [
|
|
271
|
-
|
|
270
|
+
I.size,
|
|
272
271
|
" ",
|
|
273
|
-
|
|
272
|
+
k("common.selected", "selected")
|
|
274
273
|
]
|
|
275
|
-
}),
|
|
274
|
+
}), M(c.WORKSPACE_DELETE) && /* @__PURE__ */ E("button", {
|
|
276
275
|
type: "button",
|
|
277
|
-
onClick:
|
|
278
|
-
disabled:
|
|
276
|
+
onClick: ue,
|
|
277
|
+
disabled: q.length === 0 || K,
|
|
279
278
|
className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg border border-[var(--color-status-warning-border)] px-3 py-2 text-[var(--color-status-warning-text)] transition-all duration-200 hover:bg-[var(--color-status-warning-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
280
279
|
children: [
|
|
281
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ T(S, {
|
|
282
281
|
size: 16,
|
|
283
282
|
"aria-hidden": "true"
|
|
284
283
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
-
|
|
284
|
+
/* @__PURE__ */ T("span", { children: k("workspaces.list.suspendSelected", "Suspend Selected") }),
|
|
285
|
+
q.length > 0 ? /* @__PURE__ */ E("span", { children: [
|
|
287
286
|
"(",
|
|
288
|
-
|
|
287
|
+
q.length,
|
|
289
288
|
")"
|
|
290
289
|
] }) : null
|
|
291
290
|
]
|
|
@@ -293,196 +292,199 @@ function E({ mode: E = "my" } = {}) {
|
|
|
293
292
|
})]
|
|
294
293
|
}) : null]
|
|
295
294
|
}),
|
|
296
|
-
|
|
297
|
-
treatment: "
|
|
295
|
+
G.length === 0 ? /* @__PURE__ */ T(C, {
|
|
296
|
+
treatment: "glass",
|
|
297
|
+
glow: !0,
|
|
298
298
|
className: "border-border-seam p-6",
|
|
299
|
-
children: /* @__PURE__ */
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
299
|
+
children: /* @__PURE__ */ T(w, {
|
|
300
|
+
illustration: "empty-data",
|
|
301
|
+
title: k("workspaces.list.emptyNoneTitle", "No workspaces found"),
|
|
302
|
+
description: M(c.WORKSPACE_CREATE) ? k("workspaces.list.emptyNoneDescription", "Create a workspace to start mapping members, organization ownership, and collaboration settings.") : k("workspaces.list.emptyNoneDescriptionViewer", "No workspaces have been created yet."),
|
|
303
|
+
action: M(c.WORKSPACE_CREATE) ? /* @__PURE__ */ E("button", {
|
|
304
|
+
type: "button",
|
|
305
|
+
onClick: () => A(`${j}/workspaces/new`),
|
|
306
|
+
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)]",
|
|
307
|
+
children: [/* @__PURE__ */ T(y, {
|
|
308
|
+
size: 18,
|
|
309
|
+
"aria-hidden": "true"
|
|
310
|
+
}), k("workspaces.create.button", "Create Workspace")]
|
|
311
|
+
}) : void 0
|
|
310
312
|
})
|
|
311
|
-
}) : /* @__PURE__ */
|
|
313
|
+
}) : /* @__PURE__ */ E(ae, { children: [/* @__PURE__ */ T("div", {
|
|
312
314
|
className: "grid gap-4 md:hidden",
|
|
313
|
-
children:
|
|
315
|
+
children: G.map((e) => /* @__PURE__ */ E(C, {
|
|
314
316
|
treatment: "insight",
|
|
315
317
|
className: "border-border-seam p-4",
|
|
316
|
-
children: [/* @__PURE__ */
|
|
318
|
+
children: [/* @__PURE__ */ E("div", {
|
|
317
319
|
className: "flex items-start gap-3",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
319
|
-
checked:
|
|
320
|
+
children: [/* @__PURE__ */ T(a, {
|
|
321
|
+
checked: I.has(e.id),
|
|
320
322
|
onChange: (t) => Q(e.id, t),
|
|
321
|
-
ariaLabel: `${
|
|
322
|
-
}), /* @__PURE__ */
|
|
323
|
+
ariaLabel: `${k("workspaces.list.selectOne", "Select workspace")} ${e.name}`
|
|
324
|
+
}), /* @__PURE__ */ E("div", {
|
|
323
325
|
className: "min-w-0 flex-1 space-y-3",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
326
|
+
children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("div", {
|
|
325
327
|
className: "flex flex-wrap items-start gap-2",
|
|
326
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ T("h2", {
|
|
327
329
|
className: "text-base font-semibold text-[var(--color-text-primary)]",
|
|
328
330
|
children: e.name
|
|
329
|
-
}), /* @__PURE__ */
|
|
330
|
-
}), /* @__PURE__ */
|
|
331
|
+
}), /* @__PURE__ */ T(m, { status: e.status })]
|
|
332
|
+
}), /* @__PURE__ */ E("p", {
|
|
331
333
|
className: "mt-1 break-all font-mono text-sm text-[var(--color-text-muted)]",
|
|
332
334
|
children: ["/", e.slug]
|
|
333
|
-
})] }), /* @__PURE__ */
|
|
335
|
+
})] }), /* @__PURE__ */ E("dl", {
|
|
334
336
|
className: "grid grid-cols-2 gap-3 text-sm",
|
|
335
|
-
children: [/* @__PURE__ */
|
|
337
|
+
children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("dt", {
|
|
336
338
|
className: "text-[var(--color-text-secondary)]",
|
|
337
|
-
children:
|
|
338
|
-
}), /* @__PURE__ */
|
|
339
|
+
children: k("workspaces.list.members", "Members")
|
|
340
|
+
}), /* @__PURE__ */ T("dd", {
|
|
339
341
|
className: "font-medium text-[var(--color-text-primary)]",
|
|
340
342
|
children: e.memberCount ?? 0
|
|
341
|
-
})] }), /* @__PURE__ */
|
|
343
|
+
})] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("dt", {
|
|
342
344
|
className: "text-[var(--color-text-secondary)]",
|
|
343
|
-
children:
|
|
344
|
-
}), /* @__PURE__ */
|
|
345
|
+
children: k("common.created", "Created")
|
|
346
|
+
}), /* @__PURE__ */ T("dd", {
|
|
345
347
|
className: "font-medium text-[var(--color-text-primary)]",
|
|
346
|
-
children:
|
|
348
|
+
children: D(e.createdAt)
|
|
347
349
|
})] })]
|
|
348
350
|
})]
|
|
349
351
|
})]
|
|
350
|
-
}), /* @__PURE__ */
|
|
352
|
+
}), /* @__PURE__ */ E("div", {
|
|
351
353
|
className: "mt-4 flex flex-wrap gap-2 border-t border-[var(--color-border-default)] pt-4",
|
|
352
354
|
children: [
|
|
353
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ E("button", {
|
|
354
356
|
type: "button",
|
|
355
|
-
onClick: () =>
|
|
357
|
+
onClick: () => A(`${j}/workspaces/${e.id}`),
|
|
356
358
|
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)]",
|
|
357
|
-
children: [/* @__PURE__ */
|
|
359
|
+
children: [/* @__PURE__ */ T(v, {
|
|
358
360
|
size: 16,
|
|
359
361
|
"aria-hidden": "true"
|
|
360
|
-
}),
|
|
362
|
+
}), k("common.view", "View")]
|
|
361
363
|
}),
|
|
362
|
-
|
|
364
|
+
M(c.WORKSPACE_UPDATE) && /* @__PURE__ */ E("button", {
|
|
363
365
|
type: "button",
|
|
364
|
-
onClick: () =>
|
|
366
|
+
onClick: () => A(`${j}/workspaces/${e.id}/edit`),
|
|
365
367
|
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)]",
|
|
366
|
-
children: [/* @__PURE__ */
|
|
368
|
+
children: [/* @__PURE__ */ T(x, {
|
|
367
369
|
size: 16,
|
|
368
370
|
"aria-hidden": "true"
|
|
369
|
-
}),
|
|
371
|
+
}), k("common.edit", "Edit")]
|
|
370
372
|
}),
|
|
371
|
-
|
|
373
|
+
M(c.WORKSPACE_DELETE) && /* @__PURE__ */ E("button", {
|
|
372
374
|
type: "button",
|
|
373
|
-
onClick: () =>
|
|
374
|
-
disabled:
|
|
375
|
+
onClick: () => Z(e.id, e.name),
|
|
376
|
+
disabled: K,
|
|
375
377
|
className: "inline-flex min-h-10 items-center gap-2 rounded-lg border border-[var(--color-status-warning-border)] px-3 py-2 text-sm text-[var(--color-status-warning-text)] transition-all duration-200 hover:bg-[var(--color-status-warning-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
376
|
-
children: [/* @__PURE__ */
|
|
378
|
+
children: [/* @__PURE__ */ T(S, {
|
|
377
379
|
size: 16,
|
|
378
380
|
"aria-hidden": "true"
|
|
379
|
-
}),
|
|
381
|
+
}), k("workspaces.suspend.confirm", "Suspend")]
|
|
380
382
|
})
|
|
381
383
|
]
|
|
382
384
|
})]
|
|
383
385
|
}, e.id))
|
|
384
|
-
}), /* @__PURE__ */ C
|
|
386
|
+
}), /* @__PURE__ */ T(C, {
|
|
385
387
|
treatment: "plain",
|
|
386
388
|
className: "hidden overflow-hidden border-border-seam p-0 md:block",
|
|
387
|
-
children: /* @__PURE__ */
|
|
389
|
+
children: /* @__PURE__ */ T("div", {
|
|
388
390
|
className: "overflow-x-auto",
|
|
389
|
-
children: /* @__PURE__ */
|
|
391
|
+
children: /* @__PURE__ */ E("table", {
|
|
390
392
|
className: "min-w-full",
|
|
391
|
-
children: [/* @__PURE__ */
|
|
393
|
+
children: [/* @__PURE__ */ T("thead", {
|
|
392
394
|
className: "bg-[var(--color-bg-subtle)]",
|
|
393
|
-
children: /* @__PURE__ */
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
+
children: /* @__PURE__ */ E("tr", { children: [
|
|
396
|
+
/* @__PURE__ */ T("th", {
|
|
395
397
|
className: "w-12 px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
396
|
-
children: /* @__PURE__ */
|
|
397
|
-
checked:
|
|
398
|
-
indeterminate:
|
|
398
|
+
children: /* @__PURE__ */ T(a, {
|
|
399
|
+
checked: J,
|
|
400
|
+
indeterminate: Y,
|
|
399
401
|
onChange: $,
|
|
400
|
-
ariaLabel:
|
|
402
|
+
ariaLabel: k("workspaces.list.selectAll", "Select all workspaces")
|
|
401
403
|
})
|
|
402
404
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ T("th", {
|
|
404
406
|
className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
405
|
-
children:
|
|
407
|
+
children: k("workspaces.list.column.workspace", "Workspace")
|
|
406
408
|
}),
|
|
407
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ T("th", {
|
|
408
410
|
className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
409
|
-
children:
|
|
411
|
+
children: k("common.status", "Status")
|
|
410
412
|
}),
|
|
411
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ T("th", {
|
|
412
414
|
className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
413
|
-
children:
|
|
415
|
+
children: k("common.created", "Created")
|
|
414
416
|
}),
|
|
415
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ T("th", {
|
|
416
418
|
className: "px-6 py-3 text-right text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
417
|
-
children:
|
|
419
|
+
children: k("common.actions", "Actions")
|
|
418
420
|
})
|
|
419
421
|
] })
|
|
420
|
-
}), /* @__PURE__ */
|
|
422
|
+
}), /* @__PURE__ */ T("tbody", {
|
|
421
423
|
className: "divide-y divide-[var(--color-border-seam)]",
|
|
422
|
-
children:
|
|
424
|
+
children: G.map((e) => /* @__PURE__ */ E("tr", {
|
|
423
425
|
className: "transition-colors hover:bg-[var(--color-bg-subtle)]",
|
|
424
426
|
children: [
|
|
425
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ T("td", {
|
|
426
428
|
className: "px-6 py-4 align-top",
|
|
427
|
-
children: /* @__PURE__ */
|
|
428
|
-
checked:
|
|
429
|
+
children: /* @__PURE__ */ T(a, {
|
|
430
|
+
checked: I.has(e.id),
|
|
429
431
|
onChange: (t) => Q(e.id, t),
|
|
430
|
-
ariaLabel: `${
|
|
432
|
+
ariaLabel: `${k("workspaces.list.selectOne", "Select workspace")} ${e.name}`
|
|
431
433
|
})
|
|
432
434
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ T("td", {
|
|
434
436
|
className: "px-6 py-4",
|
|
435
|
-
children: /* @__PURE__ */
|
|
437
|
+
children: /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
436
438
|
className: "font-medium text-[var(--color-text-primary)]",
|
|
437
439
|
children: e.name
|
|
438
|
-
}), /* @__PURE__ */
|
|
440
|
+
}), /* @__PURE__ */ E("p", {
|
|
439
441
|
className: "break-all font-mono text-sm text-[var(--color-text-muted)]",
|
|
440
442
|
children: ["/", e.slug]
|
|
441
443
|
})] })
|
|
442
444
|
}),
|
|
443
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ T("td", {
|
|
444
446
|
className: "px-6 py-4 align-top",
|
|
445
|
-
children: /* @__PURE__ */
|
|
447
|
+
children: /* @__PURE__ */ T(m, { status: e.status })
|
|
446
448
|
}),
|
|
447
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ T("td", {
|
|
448
450
|
className: "px-6 py-4 align-top text-sm text-[var(--color-text-secondary)]",
|
|
449
|
-
children:
|
|
451
|
+
children: D(e.createdAt)
|
|
450
452
|
}),
|
|
451
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ T("td", {
|
|
452
454
|
className: "px-6 py-4 align-top",
|
|
453
|
-
children: /* @__PURE__ */
|
|
455
|
+
children: /* @__PURE__ */ E("div", {
|
|
454
456
|
className: "flex items-center justify-end gap-2",
|
|
455
457
|
children: [
|
|
456
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ T("button", {
|
|
457
459
|
type: "button",
|
|
458
|
-
onClick: () =>
|
|
460
|
+
onClick: () => A(`${j}/workspaces/${e.id}`),
|
|
459
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)]",
|
|
460
|
-
title: `${
|
|
461
|
-
"aria-label": `${
|
|
462
|
-
children: /* @__PURE__ */
|
|
462
|
+
title: `${k("common.view", "View")} ${e.name}`,
|
|
463
|
+
"aria-label": `${k("common.view", "View")} ${e.name}`,
|
|
464
|
+
children: /* @__PURE__ */ T(v, {
|
|
463
465
|
size: 18,
|
|
464
466
|
"aria-hidden": "true"
|
|
465
467
|
})
|
|
466
468
|
}),
|
|
467
|
-
|
|
469
|
+
M(c.WORKSPACE_UPDATE) && /* @__PURE__ */ T("button", {
|
|
468
470
|
type: "button",
|
|
469
|
-
onClick: () =>
|
|
471
|
+
onClick: () => A(`${j}/workspaces/${e.id}/edit`),
|
|
470
472
|
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)]",
|
|
471
|
-
title: `${
|
|
472
|
-
"aria-label": `${
|
|
473
|
-
children: /* @__PURE__ */
|
|
473
|
+
title: `${k("common.edit", "Edit")} ${e.name}`,
|
|
474
|
+
"aria-label": `${k("common.edit", "Edit")} ${e.name}`,
|
|
475
|
+
children: /* @__PURE__ */ T(x, {
|
|
474
476
|
size: 18,
|
|
475
477
|
"aria-hidden": "true"
|
|
476
478
|
})
|
|
477
479
|
}),
|
|
478
|
-
|
|
480
|
+
M(c.WORKSPACE_DELETE) && /* @__PURE__ */ T("button", {
|
|
479
481
|
type: "button",
|
|
480
|
-
onClick: () =>
|
|
481
|
-
disabled:
|
|
482
|
+
onClick: () => Z(e.id, e.name),
|
|
483
|
+
disabled: K,
|
|
482
484
|
className: "rounded-lg p-2 text-[var(--color-status-warning-text)] transition-all duration-200 hover:bg-[var(--color-status-warning-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
483
|
-
title: `${
|
|
484
|
-
"aria-label": `${
|
|
485
|
-
children: /* @__PURE__ */
|
|
485
|
+
title: `${k("workspaces.suspend.confirm", "Suspend")} ${e.name}`,
|
|
486
|
+
"aria-label": `${k("workspaces.suspend.confirm", "Suspend")} ${e.name}`,
|
|
487
|
+
children: /* @__PURE__ */ T(S, {
|
|
486
488
|
size: 18,
|
|
487
489
|
"aria-hidden": "true"
|
|
488
490
|
})
|
|
@@ -497,16 +499,16 @@ function E({ mode: E = "my" } = {}) {
|
|
|
497
499
|
})
|
|
498
500
|
})] })
|
|
499
501
|
]
|
|
500
|
-
}),
|
|
501
|
-
}) : /* @__PURE__ */
|
|
502
|
+
}), z]
|
|
503
|
+
}) : /* @__PURE__ */ T("div", {
|
|
502
504
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
503
|
-
children: /* @__PURE__ */
|
|
505
|
+
children: /* @__PURE__ */ T("div", {
|
|
504
506
|
className: "p-8 text-center text-[var(--color-text-secondary)]",
|
|
505
|
-
children:
|
|
507
|
+
children: k("workspaces.list.noPermission", "You don't have permission to view workspaces.")
|
|
506
508
|
})
|
|
507
509
|
});
|
|
508
510
|
}
|
|
509
511
|
//#endregion
|
|
510
|
-
export {
|
|
512
|
+
export { O as WorkspacesListPage };
|
|
511
513
|
|
|
512
514
|
//# sourceMappingURL=WorkspacesListPage.js.map
|