@burdenoff/fe-libs 2026.1114.1 → 2026.1114.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,44 @@
1
+ import { OrganizationSummary, TenantSummary, WorkspaceSummary } from './operations';
2
+ /** Every in-app destination the overview links to. One place, so the graph and the list agree. */
3
+ export declare const adminOverviewLinks: {
4
+ readonly organizations: () => string;
5
+ readonly organization: (organizationId: string) => string;
6
+ readonly organizationMembers: (organizationId: string) => string;
7
+ /** The Organizations list narrowed to one tenant (the list reads `tenantId`). */
8
+ readonly tenantOrganizations: (tenantId: string) => string;
9
+ readonly workspaces: () => string;
10
+ readonly workspace: (workspaceId: string) => string;
11
+ readonly projects: () => string;
12
+ /** The project itself, not the workspace's project list. */
13
+ readonly project: (workspaceId: string, projectId: string) => string;
14
+ readonly activity: () => string;
15
+ readonly invitePeople: () => string;
16
+ readonly myInvites: () => string;
17
+ };
18
+ /** An organization as the overview list shows it. `memberCount` is null when the gateway did not send it. */
19
+ export interface OverviewOrganization {
20
+ id: string;
21
+ name: string;
22
+ tenantId: string | null;
23
+ memberCount: number | null;
24
+ workspaces: WorkspaceSummary[];
25
+ }
26
+ export interface OverviewSummary {
27
+ organizations: OverviewOrganization[];
28
+ /** Workspaces whose organization is not in the caller's list (shown on their own). */
29
+ otherWorkspaces: WorkspaceSummary[];
30
+ workspaceCount: number;
31
+ /** Sum of the organizations' member counts, or null when no count is known. */
32
+ peopleCount: number | null;
33
+ }
34
+ /**
35
+ * Groups workspaces under their organization, in the order the gateway sent
36
+ * them. People are counted per organization (an organization member is counted
37
+ * once even when they belong to several of its workspaces).
38
+ */
39
+ export declare function summarizeOverview(organizations: readonly OrganizationSummary[], workspaces: readonly WorkspaceSummary[]): OverviewSummary;
40
+ /**
41
+ * The raw identifiers behind "Show technical details": tenants, organizations
42
+ * and workspaces with their IDs, one per line. Never translated.
43
+ */
44
+ export declare function technicalDetailsText(tenants: readonly TenantSummary[], organizations: readonly OrganizationSummary[], workspaces: readonly WorkspaceSummary[]): string;
@@ -0,0 +1,48 @@
1
+ // src/admin-overview/adminOverviewModel.ts
2
+ var e = {
3
+ organizations: () => "/organizations",
4
+ organization: (e) => `/organizations/${encodeURIComponent(e)}`,
5
+ organizationMembers: (e) => `/organizations/${encodeURIComponent(e)}/members`,
6
+ tenantOrganizations: (e) => `/organizations?tenantId=${encodeURIComponent(e)}`,
7
+ workspaces: () => "/workspaces/list",
8
+ workspace: (e) => `/workspaces/${encodeURIComponent(e)}`,
9
+ projects: () => "/workspaces/projects",
10
+ project: (e, t) => `/workspaces/${encodeURIComponent(e)}/projects/${encodeURIComponent(t)}`,
11
+ activity: () => "/workspaces/activity",
12
+ invitePeople: () => "/organizations/invite",
13
+ myInvites: () => "/organizations/invites"
14
+ };
15
+ function t(e, t) {
16
+ let n = /* @__PURE__ */ new Map(), r = new Set(e.map((e) => e.id)), i = [];
17
+ for (let e of t) {
18
+ let t = e.organizationId;
19
+ if (t && r.has(t)) {
20
+ let r = n.get(t) ?? [];
21
+ r.push(e), n.set(t, r);
22
+ } else i.push(e);
23
+ }
24
+ let a = null;
25
+ return {
26
+ organizations: e.map((e) => {
27
+ let t = typeof e.memberCount == "number" ? e.memberCount : null;
28
+ return t !== null && (a = (a ?? 0) + t), {
29
+ id: e.id,
30
+ name: e.name,
31
+ tenantId: e.tenantId,
32
+ memberCount: t,
33
+ workspaces: n.get(e.id) ?? []
34
+ };
35
+ }),
36
+ otherWorkspaces: i,
37
+ workspaceCount: t.length,
38
+ peopleCount: a
39
+ };
40
+ }
41
+ function n(e, t, n) {
42
+ let r = [];
43
+ for (let t of e) r.push(`Tenant ${t.name}: ${t.id}`);
44
+ for (let e of t) r.push(`Organization ${e.name}: ${e.id}`), e.tenantId && r.push(` Tenant ID: ${e.tenantId}`);
45
+ for (let e of n) r.push(`Workspace ${e.name}: ${e.id}`);
46
+ return r.join("\n");
47
+ }
48
+ export { e as adminOverviewLinks, t as summarizeOverview, n as technicalDetailsText };
@@ -1,68 +1,69 @@
1
1
  import { useShellNavigate as e } from "../../shared/utils/appHelpers.js";
2
2
  import "../../shared-utils.js";
3
- import { MANAGE_BUTTON_CLASS as t, NODE_CARD_CLASS_BASE as n, nodeBorderColor as r, nodeBoxShadow as i } from "./nodeStyles.js";
4
- import { Package as a, Settings as o } from "lucide-react";
5
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
- import { Handle as l, Position as u } from "@xyflow/react";
3
+ import { adminOverviewLinks as t } from "../adminOverviewModel.js";
4
+ import { MANAGE_BUTTON_CLASS as n, NODE_CARD_CLASS_BASE as r, nodeBorderColor as i, nodeBoxShadow as a } from "./nodeStyles.js";
5
+ import { Package as o, Settings as s } from "lucide-react";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
+ import { Handle as u, Position as d } from "@xyflow/react";
7
8
  // src/admin-overview/nodes/ProjectNode.tsx
8
- function d({ data: d }) {
9
- let f = e(), { entity: p, isHighlighted: m } = d;
10
- return /* @__PURE__ */ c("div", {
11
- className: `${n} min-w-[200px]`,
9
+ function f({ data: f }) {
10
+ let p = e(), { entity: m, isHighlighted: h } = f;
11
+ return /* @__PURE__ */ l("div", {
12
+ className: `${r} min-w-[200px]`,
12
13
  style: {
13
14
  background: "var(--color-bg-surface)",
14
- borderColor: r(m),
15
+ borderColor: i(h),
15
16
  color: "var(--color-text-primary)",
16
- boxShadow: i(m)
17
+ boxShadow: a(h)
17
18
  },
18
- "data-testid": `admin-overview-project-${p.id}`,
19
- children: [/* @__PURE__ */ s(l, {
19
+ "data-testid": `admin-overview-project-${m.id}`,
20
+ children: [/* @__PURE__ */ c(u, {
20
21
  type: "target",
21
- position: u.Top,
22
+ position: d.Top,
22
23
  style: {
23
24
  background: "var(--color-action-primary-bg)",
24
25
  width: 8,
25
26
  height: 8
26
27
  }
27
- }), /* @__PURE__ */ c("div", {
28
+ }), /* @__PURE__ */ l("div", {
28
29
  className: "flex items-center justify-between px-3 py-2",
29
- children: [/* @__PURE__ */ c("div", {
30
+ children: [/* @__PURE__ */ l("div", {
30
31
  className: "flex items-center gap-2 min-w-0",
31
- children: [/* @__PURE__ */ s(a, {
32
+ children: [/* @__PURE__ */ c(o, {
32
33
  size: 14,
33
34
  style: { color: "var(--color-action-primary-bg)" }
34
- }), /* @__PURE__ */ c("div", {
35
+ }), /* @__PURE__ */ l("div", {
35
36
  className: "min-w-0",
36
37
  children: [
37
- /* @__PURE__ */ s("div", {
38
+ /* @__PURE__ */ c("div", {
38
39
  className: "text-[10px] font-semibold uppercase tracking-wide",
39
40
  style: { color: "var(--color-text-secondary)" },
40
41
  children: "Project"
41
42
  }),
42
- /* @__PURE__ */ s("div", {
43
+ /* @__PURE__ */ c("div", {
43
44
  className: "text-sm font-medium truncate",
44
- title: p.name,
45
- children: p.name
45
+ title: m.name,
46
+ children: m.name
46
47
  }),
47
- p.key ? /* @__PURE__ */ c("div", {
48
+ m.key ? /* @__PURE__ */ l("div", {
48
49
  className: "text-[11px] truncate",
49
50
  style: { color: "var(--color-text-secondary)" },
50
- children: [p.key, p.archived ? " · archived" : ""]
51
+ children: [m.key, m.archived ? " · archived" : ""]
51
52
  }) : null
52
53
  ]
53
54
  })]
54
- }), /* @__PURE__ */ s("button", {
55
+ }), /* @__PURE__ */ c("button", {
55
56
  type: "button",
56
57
  onClick: (e) => {
57
- e.stopPropagation(), f(`/workspaces/${p.workspaceId}/projects`);
58
+ e.stopPropagation(), p(t.project(m.workspaceId, m.id));
58
59
  },
59
- className: t,
60
+ className: n,
60
61
  style: { color: "var(--color-action-primary-bg)" },
61
62
  title: "Manage project",
62
- "aria-label": `Manage project ${p.name}`,
63
- children: /* @__PURE__ */ s(o, { size: 12 })
63
+ "aria-label": `Manage project ${m.name}`,
64
+ children: /* @__PURE__ */ c(s, { size: 12 })
64
65
  })]
65
66
  })]
66
67
  });
67
68
  }
68
- export { d as ProjectNode };
69
+ export { f as ProjectNode };
@@ -1,77 +1,78 @@
1
1
  import { useShellNavigate as e } from "../../shared/utils/appHelpers.js";
2
2
  import "../../shared-utils.js";
3
- import { MANAGE_BUTTON_CLASS as t, NODE_CARD_CLASS_BASE as n, nodeBorderColor as r, nodeBoxShadow as i } from "./nodeStyles.js";
4
- import { Building2 as a, Settings as o } from "lucide-react";
5
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
- import { Handle as l, Position as u } from "@xyflow/react";
3
+ import { adminOverviewLinks as t } from "../adminOverviewModel.js";
4
+ import { MANAGE_BUTTON_CLASS as n, NODE_CARD_CLASS_BASE as r, nodeBorderColor as i, nodeBoxShadow as a } from "./nodeStyles.js";
5
+ import { Building2 as o, Settings as s } from "lucide-react";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
+ import { Handle as u, Position as d } from "@xyflow/react";
7
8
  // src/admin-overview/nodes/TenantNode.tsx
8
- function d({ data: d }) {
9
- let f = e(), { entity: p, workspaceCount: m, isHighlighted: h } = d;
10
- return /* @__PURE__ */ c("div", {
11
- className: `${n} min-w-[220px]`,
9
+ function f({ data: f }) {
10
+ let p = e(), { entity: m, workspaceCount: h, isHighlighted: g } = f;
11
+ return /* @__PURE__ */ l("div", {
12
+ className: `${r} min-w-[220px]`,
12
13
  style: {
13
14
  background: "var(--color-bg-subtle, var(--color-bg-surface))",
14
- borderColor: r(h),
15
+ borderColor: i(g),
15
16
  borderStyle: "dashed",
16
17
  color: "var(--color-text-primary)",
17
- boxShadow: i(h)
18
+ boxShadow: a(g)
18
19
  },
19
- "data-testid": `admin-overview-tenant-${p.id}`,
20
- children: [/* @__PURE__ */ s(l, {
20
+ "data-testid": `admin-overview-tenant-${m.id}`,
21
+ children: [/* @__PURE__ */ c(u, {
21
22
  type: "source",
22
- position: u.Bottom,
23
+ position: d.Bottom,
23
24
  style: {
24
25
  background: "var(--color-action-primary-bg)",
25
26
  width: 8,
26
27
  height: 8
27
28
  }
28
- }), /* @__PURE__ */ c("div", {
29
+ }), /* @__PURE__ */ l("div", {
29
30
  className: "flex items-center justify-between px-3 py-2",
30
- children: [/* @__PURE__ */ c("div", {
31
+ children: [/* @__PURE__ */ l("div", {
31
32
  className: "flex items-center gap-2 min-w-0",
32
- children: [/* @__PURE__ */ s(a, {
33
+ children: [/* @__PURE__ */ c(o, {
33
34
  size: 14,
34
35
  style: { color: "var(--color-action-primary-bg)" }
35
- }), /* @__PURE__ */ c("div", {
36
+ }), /* @__PURE__ */ l("div", {
36
37
  className: "min-w-0",
37
38
  children: [
38
- /* @__PURE__ */ s("div", {
39
+ /* @__PURE__ */ c("div", {
39
40
  className: "text-[10px] font-semibold uppercase tracking-wide",
40
41
  style: { color: "var(--color-text-secondary)" },
41
42
  children: "Tenant"
42
43
  }),
43
- /* @__PURE__ */ s("div", {
44
+ /* @__PURE__ */ c("div", {
44
45
  className: "text-sm font-medium truncate",
45
- title: p.name,
46
- children: p.name
46
+ title: m.name,
47
+ children: m.name
47
48
  }),
48
- /* @__PURE__ */ c("div", {
49
+ /* @__PURE__ */ l("div", {
49
50
  className: "text-[11px] mt-0.5 flex items-center gap-1.5",
50
51
  style: { color: "var(--color-text-secondary)" },
51
52
  children: [
52
- /* @__PURE__ */ s("span", {
53
+ /* @__PURE__ */ c("span", {
53
54
  className: "px-1 py-0.5 rounded text-[9px] font-medium uppercase tracking-wide",
54
55
  style: { border: "1px solid var(--color-border-default)" },
55
- children: p.type ?? "shared"
56
+ children: m.type ?? "shared"
56
57
  }),
57
- /* @__PURE__ */ s("span", { children: "·" }),
58
- /* @__PURE__ */ c("span", { children: [m, " ws"] })
58
+ /* @__PURE__ */ c("span", { children: "·" }),
59
+ /* @__PURE__ */ l("span", { children: [h, " ws"] })
59
60
  ]
60
61
  })
61
62
  ]
62
63
  })]
63
- }), /* @__PURE__ */ s("button", {
64
+ }), /* @__PURE__ */ c("button", {
64
65
  type: "button",
65
66
  onClick: (e) => {
66
- e.stopPropagation(), f(`/organizations?tenantId=${p.id}`);
67
+ e.stopPropagation(), p(t.tenantOrganizations(m.id));
67
68
  },
68
- className: t,
69
+ className: n,
69
70
  style: { color: "var(--color-action-primary-bg)" },
70
71
  title: "View tenant organizations",
71
- "aria-label": `View organizations for tenant ${p.name}`,
72
- children: /* @__PURE__ */ s(o, { size: 14 })
72
+ "aria-label": `View organizations for tenant ${m.name}`,
73
+ children: /* @__PURE__ */ c(s, { size: 14 })
73
74
  })]
74
75
  })]
75
76
  });
76
77
  }
77
- export { d as TenantNode };
78
+ export { f as TenantNode };
@@ -8,6 +8,12 @@
8
8
  * fetch (workspace-scoped token is issued on demand) — see AdminOverviewPage.
9
9
  */
10
10
  export declare const GET_ADMIN_OVERVIEW_CONTEXT: import('graphql').DocumentNode;
11
+ /**
12
+ * The same context query with the organizations' member and workspace counts,
13
+ * for the plain list the FluidGrids variant opens on (BOFF-11854). Same
14
+ * `myOrganizations` / `myWorkspaces` / `myTenants` call, two more fields.
15
+ */
16
+ export declare const GET_ADMIN_OVERVIEW_CONTEXT_WITH_COUNTS: import('graphql').DocumentNode;
11
17
  /**
12
18
  * Raw GraphQL document string for the workspace-gateway project fetch.
13
19
  * Kept as a string (not gql) because we execute it via `fetch`, not Apollo.
@@ -18,6 +24,10 @@ export interface OrganizationSummary {
18
24
  name: string;
19
25
  slug: string | null;
20
26
  tenantId: string | null;
27
+ /** Only in GET_ADMIN_OVERVIEW_CONTEXT_WITH_COUNTS. */
28
+ memberCount?: number | null;
29
+ /** Only in GET_ADMIN_OVERVIEW_CONTEXT_WITH_COUNTS. */
30
+ workspaceCount?: number | null;
21
31
  }
22
32
  export interface WorkspaceSummary {
23
33
  id: string;
@@ -37,5 +37,44 @@ var t = e`
37
37
  hasMore
38
38
  }
39
39
  }
40
- `, n = "\n query AdminOverviewGetMyProjects($pagination: PaginationInput) {\n myProjects(pagination: $pagination) {\n items {\n id\n name\n key\n workspaceId\n status\n archived\n }\n total\n hasMore\n }\n }\n";
41
- export { t as GET_ADMIN_OVERVIEW_CONTEXT, n as GET_MY_PROJECTS_DOC };
40
+ `, n = e`
41
+ query AdminOverviewGetContextWithCounts($limit: Int, $offset: Int) {
42
+ myOrganizations(limit: $limit, offset: $offset) {
43
+ items {
44
+ id
45
+ name
46
+ slug
47
+ tenantId
48
+ memberCount
49
+ workspaceCount
50
+ }
51
+ total
52
+ hasMore
53
+ }
54
+ myWorkspaces(limit: $limit, offset: $offset) {
55
+ items {
56
+ id
57
+ name
58
+ type
59
+ status
60
+ tenantId
61
+ organizationId
62
+ memberCount
63
+ }
64
+ total
65
+ hasMore
66
+ }
67
+ myTenants(limit: $limit, offset: $offset) {
68
+ items {
69
+ id
70
+ name
71
+ slug
72
+ status
73
+ type
74
+ }
75
+ total
76
+ hasMore
77
+ }
78
+ }
79
+ `, r = "\n query AdminOverviewGetMyProjects($pagination: PaginationInput) {\n myProjects(pagination: $pagination) {\n items {\n id\n name\n key\n workspaceId\n status\n archived\n }\n total\n hasMore\n }\n }\n";
80
+ export { t as GET_ADMIN_OVERVIEW_CONTEXT, n as GET_ADMIN_OVERVIEW_CONTEXT_WITH_COUNTS, r as GET_MY_PROJECTS_DOC };