@burdenoff/microfe-workspaces 2026.1029.1 → 2026.1031.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.
@@ -97,6 +97,8 @@ export type DashboardGlobalDataQuery = {
97
97
  name: string;
98
98
  status: WorkspaceStatus;
99
99
  type: WorkspaceType;
100
+ organizationId: string | null;
101
+ tenantId: string;
100
102
  createdAt: string;
101
103
  memberCount: number;
102
104
  }>;
@@ -124,6 +124,20 @@ var e = {
124
124
  value: "type"
125
125
  }
126
126
  },
127
+ {
128
+ kind: "Field",
129
+ name: {
130
+ kind: "Name",
131
+ value: "organizationId"
132
+ }
133
+ },
134
+ {
135
+ kind: "Field",
136
+ name: {
137
+ kind: "Name",
138
+ value: "tenantId"
139
+ }
140
+ },
127
141
  {
128
142
  kind: "Field",
129
143
  name: {
@@ -28,4 +28,4 @@ function o() {
28
28
  ]);
29
29
  }
30
30
  //#endregion
31
- export { o as useOpenWorkspace };
31
+ export { a as commitWorkspaceSelection, o as useOpenWorkspace };
@@ -128,6 +128,7 @@ function D({ navigate: d, authToken: f, currentUser: h, productId: D = "workspac
128
128
  onClick: $,
129
129
  disabled: X,
130
130
  className: "text-xs",
131
+ "aria-label": k("dashboard.refresh", "Refresh"),
131
132
  children: [X ? /* @__PURE__ */ _(p, { className: "size-3.5 sm:mr-1.5 animate-spin" }) : /* @__PURE__ */ _(m, { className: "size-3.5 sm:mr-1.5" }), /* @__PURE__ */ _("span", {
132
133
  className: "hidden sm:inline",
133
134
  children: k("dashboard.refresh", "Refresh")
@@ -137,6 +138,7 @@ function D({ navigate: d, authToken: f, currentUser: h, productId: D = "workspac
137
138
  size: "sm",
138
139
  onClick: () => A(!0),
139
140
  className: "text-xs",
141
+ "aria-label": k("dashboard.customize", "Customize"),
140
142
  children: [/* @__PURE__ */ _(ne, { className: "size-3.5 sm:mr-1.5" }), /* @__PURE__ */ _("span", {
141
143
  className: "hidden sm:inline",
142
144
  children: k("dashboard.customize", "Customize")
@@ -31,6 +31,9 @@ export interface WorkspaceSummary {
31
31
  name: string;
32
32
  status: string;
33
33
  type: string;
34
+ /** Set when the item comes from the global `myWorkspaces` query. */
35
+ organizationId?: string | null;
36
+ tenantId?: string | null;
34
37
  createdAt: string;
35
38
  }
36
39
  export interface ProjectSummary {
@@ -17,8 +17,12 @@ function l({ workspaceData: l, isLoading: u, navigate: d }) {
17
17
  variant: "ghost",
18
18
  size: "sm",
19
19
  className: "text-xs",
20
+ "aria-label": e(f, "dashboard.groups.open", "Open groups"),
20
21
  onClick: () => d("/groups"),
21
- children: /* @__PURE__ */ i(n, { className: "size-3" })
22
+ children: /* @__PURE__ */ i(n, {
23
+ className: "size-3",
24
+ "aria-hidden": "true"
25
+ })
22
26
  }),
23
27
  children: p.length === 0 ? /* @__PURE__ */ i(s, {
24
28
  illustration: "empty-people",
@@ -17,8 +17,12 @@ function l({ workspaceData: l, globalData: u, isLoading: d, navigate: f }) {
17
17
  variant: "ghost",
18
18
  size: "sm",
19
19
  className: "text-xs",
20
+ "aria-label": e(p, "dashboard.members.open", "Open members"),
20
21
  onClick: () => f("/workspaces/members"),
21
- children: /* @__PURE__ */ a(n, { className: "size-3" })
22
+ children: /* @__PURE__ */ a(n, {
23
+ className: "size-3",
24
+ "aria-hidden": "true"
25
+ })
22
26
  }),
23
27
  children: /* @__PURE__ */ o("div", {
24
28
  className: "space-y-3",
@@ -27,8 +27,12 @@ function d({ workspaceData: d, isLoading: f, navigate: p }) {
27
27
  variant: "ghost",
28
28
  size: "sm",
29
29
  className: "text-xs",
30
+ "aria-label": e(m, "dashboard.tagCloud.open", "Open tags"),
30
31
  onClick: () => p("/tags"),
31
- children: /* @__PURE__ */ i(n, { className: "size-3" })
32
+ children: /* @__PURE__ */ i(n, {
33
+ className: "size-3",
34
+ "aria-hidden": "true"
35
+ })
32
36
  }),
33
37
  children: h.length === 0 ? /* @__PURE__ */ i(c, {
34
38
  illustration: "empty-generic",
@@ -1,67 +1,76 @@
1
- import { tWithFallback as e } from "../../../utils/i18n.js";
2
- import { WidgetWrapper as t } from "../WidgetWrapper.js";
3
- import { ArrowRight as n, Building2 as r, Circle as i } from "lucide-react";
4
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
- import { Badge as s, Button as c, IllustratedEmptyState as l } from "@burdenoff/fe-libs/ui";
6
- import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
1
+ import { commitWorkspaceSelection as e } from "../../../hooks/useOpenWorkspace.js";
2
+ import { tWithFallback as t } from "../../../utils/i18n.js";
3
+ import { WidgetWrapper as n } from "../WidgetWrapper.js";
4
+ import { ArrowRight as r, Building2 as i, Circle as a } from "lucide-react";
5
+ import { useActiveContext as o } from "@burdenoff/fe-libs/shared/providers/shell";
6
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
+ import { Badge as l, Button as u, IllustratedEmptyState as d } from "@burdenoff/fe-libs/ui";
8
+ import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
9
  //#region src/pages/dashboard/widgets/WorkspacesWidget.tsx
8
- var d = {
10
+ var p = {
9
11
  ACTIVE: "bg-status-success-bg",
10
12
  SUSPENDED: "bg-status-warning-bg",
11
13
  ARCHIVED: "bg-text-tertiary"
12
14
  };
13
- function f({ workspaceData: f, isLoading: p, navigate: m }) {
14
- let { t: h } = u(), g = f?.workspaces.items ?? [], _ = f?.workspaces.total ?? 0;
15
- return /* @__PURE__ */ a(t, {
16
- title: e(h, "dashboard.workspaces.title", "Workspaces"),
17
- icon: /* @__PURE__ */ a(r, { className: "size-4" }),
15
+ function m({ workspaceData: m, isLoading: h, navigate: g }) {
16
+ let { t: _ } = f(), v = m?.workspaces.items ?? [], y = m?.workspaces.total ?? 0, { setOrganization: b, setWorkspace: x, setProject: S, setTenant: C } = o(), w = (t) => {
17
+ e({
18
+ setOrganization: b,
19
+ setWorkspace: x,
20
+ setProject: S,
21
+ setTenant: C
22
+ }, t), g(`/workspaces/${t.id}`);
23
+ };
24
+ return /* @__PURE__ */ s(n, {
25
+ title: t(_, "dashboard.workspaces.title", "Workspaces"),
26
+ icon: /* @__PURE__ */ s(i, { className: "size-4" }),
18
27
  size: "medium",
19
- isLoading: p,
20
- unavailable: !f,
21
- headerAction: /* @__PURE__ */ o(c, {
28
+ isLoading: h,
29
+ unavailable: !m,
30
+ headerAction: /* @__PURE__ */ c(u, {
22
31
  variant: "ghost",
23
32
  size: "sm",
24
33
  className: "text-xs",
25
- onClick: () => m("/workspaces/list"),
34
+ onClick: () => g("/workspaces/list"),
26
35
  children: [
27
- e(h, "dashboard.workspaces.viewAll", "View all"),
36
+ t(_, "dashboard.workspaces.viewAll", "View all"),
28
37
  " ",
29
- /* @__PURE__ */ a(n, { className: "ml-1 size-3" })
38
+ /* @__PURE__ */ s(r, { className: "ml-1 size-3" })
30
39
  ]
31
40
  }),
32
- children: g.length === 0 ? /* @__PURE__ */ a(l, {
41
+ children: v.length === 0 ? /* @__PURE__ */ s(d, {
33
42
  illustration: "empty-data",
34
- title: e(h, "dashboard.workspaces.emptyTitle", "No workspaces yet"),
43
+ title: t(_, "dashboard.workspaces.emptyTitle", "No workspaces yet"),
35
44
  className: "py-4",
36
- action: /* @__PURE__ */ a(c, {
45
+ action: /* @__PURE__ */ s(u, {
37
46
  variant: "outline",
38
47
  size: "sm",
39
- onClick: () => m("/workspaces/list"),
40
- children: e(h, "dashboard.workspaces.emptyAction", "Create your first workspace")
48
+ onClick: () => g("/workspaces/list"),
49
+ children: t(_, "dashboard.workspaces.emptyAction", "Create your first workspace")
41
50
  })
42
- }) : /* @__PURE__ */ o("div", {
51
+ }) : /* @__PURE__ */ c("div", {
43
52
  className: "space-y-2",
44
- children: [g.slice(0, 5).map((e) => /* @__PURE__ */ o("button", {
53
+ children: [v.slice(0, 5).map((e) => /* @__PURE__ */ c("button", {
45
54
  type: "button",
46
55
  className: "w-full flex items-center justify-between p-2 rounded-md hover:bg-accent/5 cursor-pointer transition-colors text-left",
47
- onClick: () => m(`/workspaces/${e.id}`),
48
- children: [/* @__PURE__ */ o("div", {
56
+ onClick: () => w(e),
57
+ children: [/* @__PURE__ */ c("div", {
49
58
  className: "flex items-center gap-2 min-w-0",
50
- children: [/* @__PURE__ */ a(i, { className: `size-2 ${d[e.status] || "bg-text-tertiary"} fill-current ${e.status === "ACTIVE" ? "motion-safe:animate-vc-glow-pulse" : ""}` }), /* @__PURE__ */ a("span", {
59
+ children: [/* @__PURE__ */ s(a, { className: `size-2 ${p[e.status] || "bg-text-tertiary"} fill-current ${e.status === "ACTIVE" ? "motion-safe:animate-vc-glow-pulse" : ""}` }), /* @__PURE__ */ s("span", {
51
60
  className: "text-sm font-medium text-text-primary truncate",
52
61
  children: e.name
53
62
  })]
54
- }), /* @__PURE__ */ a(s, {
63
+ }), /* @__PURE__ */ s(l, {
55
64
  variant: "outline",
56
65
  className: "text-[10px] shrink-0",
57
66
  children: e.type
58
67
  })]
59
- }, e.id)), _ > 5 && /* @__PURE__ */ a("p", {
68
+ }, e.id)), y > 5 && /* @__PURE__ */ s("p", {
60
69
  className: "text-xs text-text-secondary text-center pt-1",
61
- children: e(h, "dashboard.workspaces.more", "+{count} more workspaces", { count: _ - 5 })
70
+ children: t(_, "dashboard.workspaces.more", "+{count} more workspaces", { count: y - 5 })
62
71
  })]
63
72
  })
64
73
  });
65
74
  }
66
75
  //#endregion
67
- export { f as WorkspacesWidget };
76
+ export { m as WorkspacesWidget };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-workspaces",
3
- "version": "2026.1029.1",
3
+ "version": "2026.1031.1",
4
4
  "description": "Workspaces microfrontend for Burdenoff products",
5
5
  "type": "module",
6
6
  "files": [