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