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