@burdenoff/fe-libs 2026.1114.1 → 2026.1114.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.
@@ -0,0 +1,8 @@
1
+ import { OverviewSummary } from './adminOverviewModel';
2
+ export type OverviewTr = (key: string, fallback: string) => string;
3
+ export interface AdminOverviewListProps {
4
+ summary: OverviewSummary;
5
+ technicalDetails: string;
6
+ tr: OverviewTr;
7
+ }
8
+ export declare function AdminOverviewList({ summary, technicalDetails, tr }: AdminOverviewListProps): import('react').JSX.Element;
@@ -0,0 +1,217 @@
1
+ import { cn as e } from "../lib/utils.js";
2
+ import { ShowTechnicalDetails as t } from "../ui/show-technical-details.js";
3
+ import { useShellNavigate as n } from "../shared/utils/appHelpers.js";
4
+ import "../shared-utils.js";
5
+ import { adminOverviewLinks as r } from "./adminOverviewModel.js";
6
+ import { Activity as i, Building as a, ChevronRight as o, LayoutGrid as s, Mail as c, Package as l, UserPlus as u, Users as d } from "lucide-react";
7
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
8
+ // src/admin-overview/AdminOverviewList.tsx
9
+ function m(e, t) {
10
+ return Object.entries(t).reduce((e, [t, n]) => e.replaceAll(`{{${t}}}`, String(n)), e);
11
+ }
12
+ function h(e, t, n, r) {
13
+ let [i, a] = t === 1 ? n : r;
14
+ return m(e(i, a), { count: t });
15
+ }
16
+ function g({ summary: e, technicalDetails: n, tr: o }) {
17
+ let m = e.peopleCount === null ? "—" : String(e.peopleCount);
18
+ return /* @__PURE__ */ p("div", {
19
+ className: "flex flex-col gap-6",
20
+ "data-testid": "admin-overview-list",
21
+ children: [
22
+ /* @__PURE__ */ p("dl", {
23
+ className: "grid grid-cols-1 gap-3 sm:grid-cols-3",
24
+ children: [
25
+ /* @__PURE__ */ f(v, {
26
+ label: o("adminOverviewPage.list.statOrganizations", "Organizations"),
27
+ value: String(e.organizations.length)
28
+ }),
29
+ /* @__PURE__ */ f(v, {
30
+ label: o("adminOverviewPage.list.statWorkspaces", "Workspaces"),
31
+ value: String(e.workspaceCount)
32
+ }),
33
+ /* @__PURE__ */ f(v, {
34
+ label: o("adminOverviewPage.list.statPeople", "People"),
35
+ value: m
36
+ })
37
+ ]
38
+ }),
39
+ e.organizations.map((e) => /* @__PURE__ */ p("section", {
40
+ "aria-labelledby": `admin-overview-org-${e.id}`,
41
+ className: "overflow-hidden rounded-card border border-border-subtle bg-bg-surface",
42
+ children: [/* @__PURE__ */ f("h2", {
43
+ id: `admin-overview-org-${e.id}`,
44
+ className: "border-b border-border-subtle px-4 py-3 text-base font-semibold text-text-primary",
45
+ children: e.name
46
+ }), /* @__PURE__ */ p("ul", {
47
+ className: "divide-y divide-border-subtle",
48
+ children: [
49
+ /* @__PURE__ */ f(y, {
50
+ to: r.organization(e.id),
51
+ icon: /* @__PURE__ */ f(a, {
52
+ className: "size-4",
53
+ "aria-hidden": "true"
54
+ }),
55
+ title: o("adminOverviewPage.list.organizationRow", "Organization"),
56
+ detail: o("adminOverviewPage.list.organizationDetail", "Name, description, website and its workspaces")
57
+ }),
58
+ /* @__PURE__ */ f(y, {
59
+ to: r.organizationMembers(e.id),
60
+ icon: /* @__PURE__ */ f(d, {
61
+ className: "size-4",
62
+ "aria-hidden": "true"
63
+ }),
64
+ title: o("adminOverviewPage.list.membersRow", "Members"),
65
+ detail: e.memberCount === null ? o("adminOverviewPage.list.membersDetail", "Who belongs to this organization") : h(o, e.memberCount, ["adminOverviewPage.list.peopleOne", "{{count}} person"], ["adminOverviewPage.list.peopleMany", "{{count}} people"])
66
+ }),
67
+ e.workspaces.map((e) => /* @__PURE__ */ f(y, {
68
+ to: r.workspace(e.id),
69
+ icon: /* @__PURE__ */ f(s, {
70
+ className: "size-4",
71
+ "aria-hidden": "true"
72
+ }),
73
+ title: e.name,
74
+ detail: _(o, e.memberCount),
75
+ indent: !0
76
+ }, e.id)),
77
+ e.workspaces.length === 0 ? /* @__PURE__ */ f("li", {
78
+ className: "px-4 py-3 ps-11 text-sm text-text-secondary",
79
+ children: o("adminOverviewPage.list.noWorkspaces", "No workspaces in this organization yet.")
80
+ }) : null
81
+ ]
82
+ })]
83
+ }, e.id)),
84
+ e.otherWorkspaces.length > 0 ? /* @__PURE__ */ p("section", {
85
+ "aria-labelledby": "admin-overview-other-workspaces",
86
+ className: "overflow-hidden rounded-card border border-border-subtle bg-bg-surface",
87
+ children: [/* @__PURE__ */ f("h2", {
88
+ id: "admin-overview-other-workspaces",
89
+ className: "border-b border-border-subtle px-4 py-3 text-base font-semibold text-text-primary",
90
+ children: o("adminOverviewPage.list.otherWorkspaces", "Other workspaces you belong to")
91
+ }), /* @__PURE__ */ f("ul", {
92
+ className: "divide-y divide-border-subtle",
93
+ children: e.otherWorkspaces.map((e) => /* @__PURE__ */ f(y, {
94
+ to: r.workspace(e.id),
95
+ icon: /* @__PURE__ */ f(s, {
96
+ className: "size-4",
97
+ "aria-hidden": "true"
98
+ }),
99
+ title: e.name,
100
+ detail: _(o, e.memberCount)
101
+ }, e.id))
102
+ })]
103
+ }) : null,
104
+ /* @__PURE__ */ p("section", {
105
+ "aria-labelledby": "admin-overview-more",
106
+ className: "overflow-hidden rounded-card border border-border-subtle bg-bg-surface",
107
+ children: [/* @__PURE__ */ f("h2", {
108
+ id: "admin-overview-more",
109
+ className: "border-b border-border-subtle px-4 py-3 text-base font-semibold text-text-primary",
110
+ children: o("adminOverviewPage.list.moreTitle", "Everything in Administration")
111
+ }), /* @__PURE__ */ p("ul", {
112
+ className: "divide-y divide-border-subtle",
113
+ children: [
114
+ /* @__PURE__ */ f(y, {
115
+ to: r.organizations(),
116
+ icon: /* @__PURE__ */ f(a, {
117
+ className: "size-4",
118
+ "aria-hidden": "true"
119
+ }),
120
+ title: o("adminOverviewPage.list.allOrganizations", "Organizations")
121
+ }),
122
+ /* @__PURE__ */ f(y, {
123
+ to: r.workspaces(),
124
+ icon: /* @__PURE__ */ f(s, {
125
+ className: "size-4",
126
+ "aria-hidden": "true"
127
+ }),
128
+ title: o("adminOverviewPage.list.allWorkspaces", "Workspaces")
129
+ }),
130
+ /* @__PURE__ */ f(y, {
131
+ to: r.projects(),
132
+ icon: /* @__PURE__ */ f(l, {
133
+ className: "size-4",
134
+ "aria-hidden": "true"
135
+ }),
136
+ title: o("adminOverviewPage.list.allProjects", "Projects")
137
+ }),
138
+ /* @__PURE__ */ f(y, {
139
+ to: r.invitePeople(),
140
+ icon: /* @__PURE__ */ f(u, {
141
+ className: "size-4",
142
+ "aria-hidden": "true"
143
+ }),
144
+ title: o("adminOverviewPage.list.invitePeople", "Invite people")
145
+ }),
146
+ /* @__PURE__ */ f(y, {
147
+ to: r.myInvites(),
148
+ icon: /* @__PURE__ */ f(c, {
149
+ className: "size-4",
150
+ "aria-hidden": "true"
151
+ }),
152
+ title: o("adminOverviewPage.list.myInvites", "My invites")
153
+ }),
154
+ /* @__PURE__ */ f(y, {
155
+ to: r.activity(),
156
+ icon: /* @__PURE__ */ f(i, {
157
+ className: "size-4",
158
+ "aria-hidden": "true"
159
+ }),
160
+ title: o("adminOverviewPage.list.activity", "Activity")
161
+ })
162
+ ]
163
+ })]
164
+ }),
165
+ n ? /* @__PURE__ */ f(t, {
166
+ copyable: !0,
167
+ children: n
168
+ }) : null
169
+ ]
170
+ });
171
+ }
172
+ function _(e, t) {
173
+ return typeof t == "number" ? h(e, t, ["adminOverviewPage.list.workspacePeopleOne", "Workspace · {{count}} person"], ["adminOverviewPage.list.workspacePeopleMany", "Workspace · {{count}} people"]) : e("adminOverviewPage.list.workspace", "Workspace");
174
+ }
175
+ function v({ label: e, value: t }) {
176
+ return /* @__PURE__ */ p("div", {
177
+ className: "rounded-card border border-border-subtle bg-bg-surface px-4 py-3",
178
+ children: [/* @__PURE__ */ f("dt", {
179
+ className: "text-sm text-text-secondary",
180
+ children: e
181
+ }), /* @__PURE__ */ f("dd", {
182
+ className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
183
+ children: t
184
+ })]
185
+ });
186
+ }
187
+ function y({ to: t, icon: r, title: i, detail: a, indent: s = !1 }) {
188
+ let c = n();
189
+ return /* @__PURE__ */ f("li", { children: /* @__PURE__ */ p("a", {
190
+ href: t,
191
+ onClick: (e) => {
192
+ e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0 || (e.preventDefault(), c(t));
193
+ },
194
+ className: e("flex min-h-11 items-center gap-3 px-4 py-3 text-start transition-colors hover:bg-bg-sunken", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]", s && "ps-8"),
195
+ children: [
196
+ /* @__PURE__ */ f("span", {
197
+ className: "flex size-8 shrink-0 items-center justify-center rounded-button bg-bg-sunken text-text-secondary",
198
+ children: r
199
+ }),
200
+ /* @__PURE__ */ p("span", {
201
+ className: "min-w-0 flex-1",
202
+ children: [/* @__PURE__ */ f("span", {
203
+ className: "block truncate text-sm font-medium text-text-primary",
204
+ children: i
205
+ }), a ? /* @__PURE__ */ f("span", {
206
+ className: "block truncate text-xs text-text-secondary",
207
+ children: a
208
+ }) : null]
209
+ }),
210
+ /* @__PURE__ */ f(o, {
211
+ className: "size-4 shrink-0 text-text-secondary",
212
+ "aria-hidden": "true"
213
+ })
214
+ ]
215
+ }) });
216
+ }
217
+ export { g as AdminOverviewList };
@@ -1,4 +1,11 @@
1
1
  export interface AdminOverviewPageProps {
2
2
  authToken: string;
3
+ /**
4
+ * `'fluidgrids'` (BOFF-11854): the page opens on a plain list of your
5
+ * organizations, their workspaces and their people, with one-line help, and
6
+ * the graph moves one tab away (`?view=graph`). Left out, the page is the
7
+ * graph exactly as before, for every other app.
8
+ */
9
+ variant?: 'default' | 'fluidgrids';
3
10
  }
4
11
  export declare function AdminOverviewPage(props: AdminOverviewPageProps): import('react').JSX.Element;