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