@burdenoff/microfe-workspaces 2026.1109.1 → 2026.1110.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.
- package/dist/WorkspacesRoot.js +10 -9
- package/dist/WorkspacesRoutes.js +1 -2
- package/dist/components/CreateProjectDialog.js +22 -22
- package/dist/components/CreateWorkspaceDialog.js +8 -9
- package/dist/components/InviteMemberDialog.js +18 -23
- package/dist/components/MemberListItem.js +16 -17
- package/dist/components/ProjectCard.js +14 -15
- package/dist/components/ProjectMemberPickerDialog.js +92 -93
- package/dist/components/RenameProjectDialog.js +12 -17
- package/dist/components/WorkspaceCard.js +6 -7
- package/dist/components/WorkspaceContextPathSync.js +4 -5
- package/dist/components/WorkspacesErrorBoundary.js +6 -11
- package/dist/components/index.js +8 -7
- package/dist/components/tags/ProjectTagsWidget.js +56 -57
- package/dist/components/tags/WorkspaceTagsEditor.js +2 -3
- package/dist/constants/permissions.js +1 -2
- package/dist/generated/global-operations.js +1 -2
- package/dist/generated/wspace-operations.js +1 -2
- package/dist/hooks/index.js +9 -8
- package/dist/hooks/useMemberMutations.js +165 -166
- package/dist/hooks/useOpenWorkspace.js +1 -2
- package/dist/hooks/useOrgsWithPermission.js +2 -3
- package/dist/hooks/usePendingInvitations.d.ts +1 -1
- package/dist/hooks/usePendingInvitations.js +2 -3
- package/dist/hooks/useProjectMemberMutations.js +23 -24
- package/dist/hooks/useProjectMembers.d.ts +2 -2
- package/dist/hooks/useProjectMembers.js +2 -3
- package/dist/hooks/useProjectMutations.js +68 -69
- package/dist/hooks/useProjects.d.ts +3 -3
- package/dist/hooks/useProjects.js +5 -6
- package/dist/hooks/useScopedNavigation.js +1 -2
- package/dist/hooks/useTenants.d.ts +2 -2
- package/dist/hooks/useTenants.js +3 -4
- package/dist/hooks/useTr.js +1 -2
- package/dist/hooks/useWorkspaceActivity.d.ts +1 -1
- package/dist/hooks/useWorkspaceActivity.js +2 -3
- package/dist/hooks/useWorkspaceMembers.d.ts +5 -5
- package/dist/hooks/useWorkspaceMembers.js +7 -8
- package/dist/hooks/useWorkspaceMutations.js +70 -71
- package/dist/hooks/useWorkspacePermissions.js +1 -2
- package/dist/hooks/useWorkspaceRoles.d.ts +1 -1
- package/dist/hooks/useWorkspaceRoles.js +3 -4
- package/dist/hooks/useWorkspaces.d.ts +3 -3
- package/dist/hooks/useWorkspaces.js +4 -5
- package/dist/hooks/useWorkspacesEventEmitter.js +1 -2
- package/dist/hooks/useWorkspacesPageView.js +1 -2
- package/dist/index.js +15 -15
- package/dist/pages/ActivityListPage.js +28 -29
- package/dist/pages/CreateWorkspacePage.js +137 -138
- package/dist/pages/InviteAcceptancePage.js +65 -66
- package/dist/pages/MembersListPage.js +203 -204
- package/dist/pages/PendingInvitesPage.js +63 -64
- package/dist/pages/ProjectDetailPage.js +71 -72
- package/dist/pages/ProjectMembersPage.js +116 -117
- package/dist/pages/ProjectsListPage.js +62 -67
- package/dist/pages/WorkspaceDetailPage.js +153 -154
- package/dist/pages/WorkspaceInvitePage.js +88 -92
- package/dist/pages/WorkspaceSettingsPage.js +32 -33
- package/dist/pages/WorkspacesListPage.js +40 -41
- package/dist/pages/dashboard/DashboardCustomizer.js +98 -94
- package/dist/pages/dashboard/DashboardGrid.js +1 -2
- package/dist/pages/dashboard/DashboardPage.js +12 -13
- package/dist/pages/dashboard/WidgetWrapper.js +3 -3
- package/dist/pages/dashboard/config.js +3 -4
- package/dist/pages/dashboard/hooks/useDashboardData.d.ts +5 -5
- package/dist/pages/dashboard/hooks/useDashboardData.js +9 -10
- package/dist/pages/dashboard/hooks/useDashboardPreferences.js +7 -8
- package/dist/pages/dashboard/reorder.js +11 -14
- package/dist/pages/dashboard/widgets/AgentsWidget.js +13 -14
- package/dist/pages/dashboard/widgets/GroupsWidget.js +9 -10
- package/dist/pages/dashboard/widgets/MembersWidget.js +10 -11
- package/dist/pages/dashboard/widgets/ProjectsWidget.js +11 -12
- package/dist/pages/dashboard/widgets/QuickActionsWidget.js +28 -29
- package/dist/pages/dashboard/widgets/RecentActivityWidget.js +22 -23
- package/dist/pages/dashboard/widgets/SessionsWidget.js +28 -29
- package/dist/pages/dashboard/widgets/StorageWidget.js +19 -20
- package/dist/pages/dashboard/widgets/TagCloudWidget.js +9 -10
- package/dist/pages/dashboard/widgets/TipsWidget.js +5 -6
- package/dist/pages/dashboard/widgets/UpcomingEventsWidget.js +17 -18
- package/dist/pages/dashboard/widgets/VibesWidget.js +13 -14
- package/dist/pages/dashboard/widgets/WelcomeWidget.js +11 -12
- package/dist/pages/dashboard/widgets/WorkflowRunsWidget.js +16 -17
- package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js +11 -12
- package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.js +17 -18
- package/dist/pages/dashboard/widgets/WorkspacesWidget.js +7 -8
- package/dist/pages/dashboard/widgets/tipsCatalog.js +1 -2
- package/dist/providers/WorkspacesProvider.js +1 -2
- package/dist/store/workspacesStore.d.ts +1 -1
- package/dist/store/workspacesStore.js +1 -2
- package/dist/test/happydom.d.ts +1 -0
- package/dist/translations/en.js +1 -2
- package/dist/utils/formatters.js +1 -2
- package/dist/utils/i18n.js +1 -2
- package/dist/utils/invitationDisplay.js +1 -2
- package/dist/utils/nativeBridge.js +1 -2
- package/dist/utils/pinnedRequest.js +2 -3
- package/dist/utils/projectTags.js +2 -3
- package/dist/utils/slug.js +1 -2
- package/dist/utils/telemetryError.js +13 -16
- package/dist/utils/tokenHelpers.js +1 -2
- package/dist/utils/workspaceBulkInviteCsv.js +3 -8
- package/package.json +72 -55
|
@@ -2,24 +2,28 @@ import { tWithFallback as e } from "../../utils/i18n.js";
|
|
|
2
2
|
import { DEFAULT_DASHBOARD_WIDGETS as t, DEFAULT_DASHBOARD_WIDGETS_BY_PRODUCT as n, WIDGET_DEFINITIONS as r, isWidgetAvailable as i, resolveWidgetCopy as a } from "./config.js";
|
|
3
3
|
import { nativeImpact as o } from "../../utils/nativeBridge.js";
|
|
4
4
|
import { dropPositionFromPointer as s, reorderByDropIndex as c } from "./reorder.js";
|
|
5
|
-
import { useCallback as l,
|
|
6
|
-
import { ArrowDown as
|
|
7
|
-
import { jsx as
|
|
8
|
-
import { Badge as
|
|
9
|
-
import { useI18n as
|
|
10
|
-
|
|
11
|
-
function
|
|
12
|
-
let { t:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
import { useCallback as l, useRef as u, useState as d } from "react";
|
|
6
|
+
import { ArrowDown as f, ArrowUp as p, GripVertical as m, Loader2 as ee, RotateCcw as te, Save as h } from "lucide-react";
|
|
7
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
8
|
+
import { Badge as v, Button as y, Separator as b, Sheet as x, SheetContent as S, SheetDescription as ne, SheetFooter as C, SheetHeader as w, SheetTitle as T, Switch as E } from "@burdenoff/fe-libs/ui";
|
|
9
|
+
import { useI18n as D } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
|
+
// src/pages/dashboard/DashboardCustomizer.tsx
|
|
11
|
+
function O({ open: O, onOpenChange: k, widgets: A, onSave: j, isSaving: M, productId: N = "workspaces" }) {
|
|
12
|
+
let { t: P } = D(), F = l((t, n) => e(P, t, n), [P]), [I, L] = d(A), [R, z] = d(!1), [B, V] = d(null), [H, U] = d(null), [W, G] = d(""), K = u(/* @__PURE__ */ new Map()), q = u(null), J = u(0), [Y, X] = d({
|
|
13
|
+
open: !1,
|
|
14
|
+
widgets: A
|
|
15
|
+
});
|
|
16
|
+
(Y.open !== O || Y.widgets !== A) && (X({
|
|
17
|
+
open: O,
|
|
18
|
+
widgets: A
|
|
19
|
+
}), O && (L([...A]), z(!1)));
|
|
20
|
+
let re = l((e) => {
|
|
21
|
+
L((t) => t.map((t) => t.widgetId === e ? {
|
|
18
22
|
...t,
|
|
19
23
|
enabled: !t.enabled
|
|
20
|
-
} : t)),
|
|
24
|
+
} : t)), z(!0);
|
|
21
25
|
}, []), Z = l((e, t) => {
|
|
22
|
-
|
|
26
|
+
L((n) => {
|
|
23
27
|
let r = [...n].sort((e, t) => e.order - t.order), i = r.findIndex((t) => t.widgetId === e);
|
|
24
28
|
if (i < 0) return n;
|
|
25
29
|
let a = t === "up" ? i - 1 : i + 1;
|
|
@@ -32,131 +36,132 @@ function k({ open: k, onOpenChange: A, widgets: j, onSave: M, isSaving: N, produ
|
|
|
32
36
|
...r[a],
|
|
33
37
|
order: o
|
|
34
38
|
}, r;
|
|
35
|
-
}),
|
|
36
|
-
}, []),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
H(e), J.current = null, cancelAnimationFrame(Y.current), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e);
|
|
39
|
+
}), z(!0);
|
|
40
|
+
}, []), ie = l(() => {
|
|
41
|
+
let e = n[N] ?? t;
|
|
42
|
+
L([...e]), z(!0);
|
|
43
|
+
}, [N]), ae = l((e) => (t) => {
|
|
44
|
+
t ? K.current.set(e, t) : K.current.delete(e);
|
|
42
45
|
}, []), oe = l((e, t) => {
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
V(e), q.current = null, cancelAnimationFrame(J.current), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e);
|
|
47
|
+
}, []), se = l((e, t) => {
|
|
48
|
+
B && B !== e && (t.preventDefault(), t.dataTransfer.dropEffect = "move", U(e), cancelAnimationFrame(J.current), J.current = requestAnimationFrame(() => {
|
|
49
|
+
let n = K.current.get(e);
|
|
45
50
|
if (!n) return;
|
|
46
|
-
let r = s(t.clientY, n.getBoundingClientRect()), i =
|
|
47
|
-
i && i.fromId ===
|
|
48
|
-
fromId:
|
|
51
|
+
let r = s(t.clientY, n.getBoundingClientRect()), i = q.current;
|
|
52
|
+
i && i.fromId === B && i.toId === e && i.position === r || (q.current = {
|
|
53
|
+
fromId: B,
|
|
49
54
|
toId: e,
|
|
50
55
|
position: r
|
|
51
|
-
},
|
|
56
|
+
}, L((t) => c(t, B, e, r)), z(!0));
|
|
52
57
|
}));
|
|
53
|
-
}, [
|
|
54
|
-
t.currentTarget.contains(t.relatedTarget) ||
|
|
55
|
-
}, [
|
|
56
|
-
t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = "move"), cancelAnimationFrame(
|
|
57
|
-
}, []),
|
|
58
|
-
if (cancelAnimationFrame(
|
|
59
|
-
let t = [...
|
|
60
|
-
n >= 0 &&
|
|
58
|
+
}, [B]), Q = l((e, t) => {
|
|
59
|
+
t.currentTarget.contains(t.relatedTarget) || H === e && U(null);
|
|
60
|
+
}, [H]), ce = l((e, t) => {
|
|
61
|
+
t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = "move"), cancelAnimationFrame(J.current), V(null), U(null);
|
|
62
|
+
}, []), le = l(() => {
|
|
63
|
+
if (cancelAnimationFrame(J.current), B) {
|
|
64
|
+
let t = [...I].sort((e, t) => e.order - t.order), n = t.findIndex((e) => e.widgetId === B), i = r[B], o = i ? a(F, i).title : B;
|
|
65
|
+
n >= 0 && G(e(P, "dashboardCustomizer.reorderAnnouncement", `${o} moved to position ${n + 1} of ${t.length}`));
|
|
61
66
|
}
|
|
62
|
-
|
|
67
|
+
V(null), U(null), q.current = null;
|
|
63
68
|
}, [
|
|
64
|
-
|
|
65
|
-
L,
|
|
69
|
+
B,
|
|
66
70
|
I,
|
|
67
|
-
F
|
|
68
|
-
|
|
69
|
-
|
|
71
|
+
F,
|
|
72
|
+
P
|
|
73
|
+
]), ue = l(async () => {
|
|
74
|
+
await j(I), z(!1), k(!1);
|
|
70
75
|
}, [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
]), $ = [...
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
open:
|
|
77
|
-
onOpenChange:
|
|
78
|
-
children: /* @__PURE__ */
|
|
76
|
+
I,
|
|
77
|
+
j,
|
|
78
|
+
k
|
|
79
|
+
]), $ = [...I].sort((e, t) => e.order - t.order);
|
|
80
|
+
return /* @__PURE__ */ g(x, {
|
|
81
|
+
open: O,
|
|
82
|
+
onOpenChange: k,
|
|
83
|
+
children: /* @__PURE__ */ _(S, {
|
|
79
84
|
className: "w-full sm:max-w-md overflow-y-auto",
|
|
80
85
|
side: "right",
|
|
81
86
|
children: [
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ _(w, { children: [/* @__PURE__ */ g(T, { children: e(P, "dashboardCustomizer.title", "Customize Dashboard") }), /* @__PURE__ */ g(ne, { children: e(P, "dashboardCustomizer.description", "Toggle widgets on or off and reorder them to personalize your dashboard.") })] }),
|
|
88
|
+
/* @__PURE__ */ _("div", {
|
|
84
89
|
role: "listbox",
|
|
85
|
-
"aria-label": e(
|
|
90
|
+
"aria-label": e(P, "dashboardCustomizer.listLabel", "Dashboard widgets"),
|
|
86
91
|
className: "py-4 space-y-1",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ g("div", {
|
|
88
93
|
"aria-live": "assertive",
|
|
89
94
|
className: "sr-only",
|
|
90
|
-
children:
|
|
95
|
+
children: W
|
|
91
96
|
}), $.map((t, n) => {
|
|
92
97
|
let s = r[t.widgetId];
|
|
93
|
-
if (!s || !i(s,
|
|
94
|
-
let c =
|
|
95
|
-
return /* @__PURE__ */
|
|
96
|
-
ref:
|
|
98
|
+
if (!s || !i(s, N)) return null;
|
|
99
|
+
let c = B === t.widgetId, l = H === t.widgetId && B !== null, u = a(F, s).title;
|
|
100
|
+
return /* @__PURE__ */ _("div", {
|
|
101
|
+
ref: ae(t.widgetId),
|
|
97
102
|
role: "option",
|
|
98
|
-
"aria-roledescription": e(
|
|
103
|
+
"aria-roledescription": e(P, "dashboardCustomizer.sortableItem", "sortable item"),
|
|
99
104
|
"aria-selected": c,
|
|
100
|
-
"aria-label": e(
|
|
101
|
-
onDragOver: (e) =>
|
|
105
|
+
"aria-label": e(P, "dashboardCustomizer.widgetRow", `Widget: ${u}. Use the arrow buttons to reorder.`),
|
|
106
|
+
onDragOver: (e) => se(t.widgetId, e),
|
|
102
107
|
onDragLeave: (e) => Q(t.widgetId, e),
|
|
103
|
-
onDrop: (e) =>
|
|
108
|
+
onDrop: (e) => ce(t.widgetId, e),
|
|
104
109
|
"data-widget-id": t.widgetId,
|
|
105
110
|
className: `flex items-center gap-3 p-3 rounded-lg border transition-colors ${t.enabled ? "border-border-default bg-bg-surface" : "border-transparent bg-bg-sunken/30 opacity-60"} ${c ? "opacity-50" : ""} ${l ? "ring-2 ring-border-strong border-transparent" : ""}`,
|
|
106
111
|
children: [
|
|
107
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ g("span", {
|
|
108
113
|
draggable: !0,
|
|
109
|
-
onDragStart: (e) =>
|
|
110
|
-
onDragEnd:
|
|
111
|
-
"aria-label": e(
|
|
114
|
+
onDragStart: (e) => oe(t.widgetId, e),
|
|
115
|
+
onDragEnd: le,
|
|
116
|
+
"aria-label": e(P, "dashboardCustomizer.dragHandle", `Drag handle for ${u}`),
|
|
112
117
|
className: "cursor-grab active:cursor-grabbing touch-none select-none",
|
|
113
|
-
children: /* @__PURE__ */
|
|
118
|
+
children: /* @__PURE__ */ g(m, {
|
|
114
119
|
"aria-hidden": !0,
|
|
115
120
|
className: "size-4 text-text-secondary shrink-0"
|
|
116
121
|
})
|
|
117
122
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ _("div", {
|
|
119
124
|
className: "flex-1 min-w-0",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
125
|
+
children: [/* @__PURE__ */ _("div", {
|
|
121
126
|
className: "flex items-center gap-2",
|
|
122
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ g("span", {
|
|
123
128
|
className: "text-sm font-medium text-text-primary",
|
|
124
129
|
children: u
|
|
125
|
-
}), /* @__PURE__ */
|
|
130
|
+
}), /* @__PURE__ */ g(v, {
|
|
126
131
|
variant: "outline",
|
|
127
132
|
className: "text-[10px]",
|
|
128
133
|
children: s.defaultSize
|
|
129
134
|
})]
|
|
130
|
-
}), /* @__PURE__ */
|
|
135
|
+
}), /* @__PURE__ */ g("p", {
|
|
131
136
|
className: "text-xs text-text-secondary truncate",
|
|
132
|
-
children: a(
|
|
137
|
+
children: a(F, s).description
|
|
133
138
|
})]
|
|
134
139
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ _("div", {
|
|
136
141
|
className: "flex items-center gap-1 shrink-0",
|
|
137
142
|
children: [
|
|
138
|
-
/* @__PURE__ */ y
|
|
143
|
+
/* @__PURE__ */ g(y, {
|
|
139
144
|
variant: "ghost",
|
|
140
145
|
size: "sm",
|
|
141
146
|
className: "size-7 p-0",
|
|
142
147
|
disabled: n === 0,
|
|
143
148
|
onClick: () => Z(t.widgetId, "up"),
|
|
144
|
-
"aria-label": e(
|
|
145
|
-
children: /* @__PURE__ */
|
|
149
|
+
"aria-label": e(P, "dashboardCustomizer.moveUp", `Move ${u} up`),
|
|
150
|
+
children: /* @__PURE__ */ g(p, { className: "size-3" })
|
|
146
151
|
}),
|
|
147
|
-
/* @__PURE__ */ y
|
|
152
|
+
/* @__PURE__ */ g(y, {
|
|
148
153
|
variant: "ghost",
|
|
149
154
|
size: "sm",
|
|
150
155
|
className: "size-7 p-0",
|
|
151
156
|
disabled: n === $.length - 1,
|
|
152
157
|
onClick: () => Z(t.widgetId, "down"),
|
|
153
|
-
"aria-label": e(
|
|
154
|
-
children: /* @__PURE__ */
|
|
158
|
+
"aria-label": e(P, "dashboardCustomizer.moveDown", `Move ${u} down`),
|
|
159
|
+
children: /* @__PURE__ */ g(f, { className: "size-3" })
|
|
155
160
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ g(E, {
|
|
157
162
|
checked: t.enabled,
|
|
158
163
|
onCheckedChange: () => {
|
|
159
|
-
o("medium"),
|
|
164
|
+
o("medium"), re(t.widgetId);
|
|
160
165
|
},
|
|
161
166
|
disabled: !s.removable,
|
|
162
167
|
className: "ml-1"
|
|
@@ -167,26 +172,25 @@ function k({ open: k, onOpenChange: A, widgets: j, onSave: M, isSaving: N, produ
|
|
|
167
172
|
}, t.widgetId);
|
|
168
173
|
})]
|
|
169
174
|
}),
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ g(b, {}),
|
|
176
|
+
/* @__PURE__ */ _(C, {
|
|
172
177
|
className: "flex-row gap-2 pt-4",
|
|
173
|
-
children: [/* @__PURE__ */
|
|
178
|
+
children: [/* @__PURE__ */ _(y, {
|
|
174
179
|
variant: "outline",
|
|
175
180
|
size: "sm",
|
|
176
|
-
onClick:
|
|
181
|
+
onClick: ie,
|
|
177
182
|
className: "flex-1",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
179
|
-
}), /* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ g(te, { className: "size-3 mr-1.5" }), e(P, "dashboardCustomizer.resetToDefaults", "Reset to defaults")]
|
|
184
|
+
}), /* @__PURE__ */ _(y, {
|
|
180
185
|
size: "sm",
|
|
181
|
-
onClick:
|
|
182
|
-
disabled: !
|
|
186
|
+
onClick: ue,
|
|
187
|
+
disabled: !R || M,
|
|
183
188
|
className: "flex-1",
|
|
184
|
-
children: [
|
|
189
|
+
children: [M ? /* @__PURE__ */ g(ee, { className: "size-3 mr-1.5 animate-spin" }) : /* @__PURE__ */ g(h, { className: "size-3 mr-1.5" }), e(P, "dashboardCustomizer.saveLayout", "Save layout")]
|
|
185
190
|
})]
|
|
186
191
|
})
|
|
187
192
|
]
|
|
188
193
|
})
|
|
189
194
|
});
|
|
190
195
|
}
|
|
191
|
-
|
|
192
|
-
export { k as DashboardCustomizer };
|
|
196
|
+
export { O as DashboardCustomizer };
|
|
@@ -21,7 +21,7 @@ import { WorkflowRunsWidget as b } from "./widgets/WorkflowRunsWidget.js";
|
|
|
21
21
|
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
22
22
|
import { useI18n as C } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
23
23
|
import { MotionItem as w, MotionList as T } from "@burdenoff/fe-libs/shared/motion";
|
|
24
|
-
|
|
24
|
+
// src/pages/dashboard/DashboardGrid.tsx
|
|
25
25
|
var E = {
|
|
26
26
|
welcome: i,
|
|
27
27
|
quickActions: a,
|
|
@@ -72,5 +72,4 @@ function D({ widgets: i, productId: a, ...o }) {
|
|
|
72
72
|
})
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
//#endregion
|
|
76
75
|
export { D as DashboardGrid };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { useGlobalDashboardData as e, useProjectsDashboardData as t, useVibecontrolsDashboardData as n, useWorkspaceDashboardData as r } from "./hooks/useDashboardData.js";
|
|
2
|
+
import { useUpdateDashboardPreferences as i } from "./hooks/useDashboardPreferences.js";
|
|
3
|
+
import { DashboardGrid as ee } from "./DashboardGrid.js";
|
|
4
|
+
import { DashboardCustomizer as a } from "./DashboardCustomizer.js";
|
|
5
|
+
import { getEffectiveWidgets as te } from "./config.js";
|
|
6
|
+
import { useWorkspacesPageView as o } from "../../hooks/useWorkspacesPageView.js";
|
|
7
7
|
import { useCallback as s, useMemo as c, useState as l } from "react";
|
|
8
8
|
import { AlertCircle as u, Building2 as d, GitBranch as f, Loader2 as p, RefreshCw as m, Settings2 as ne, Sparkles as h } from "lucide-react";
|
|
9
9
|
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
10
10
|
import { AuroraBackground as y, Button as b, GradientText as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
|
|
11
11
|
import { useI18n as C } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
12
|
import { PageHeader as w } from "@burdenoff/fe-libs/chrome";
|
|
13
|
-
|
|
13
|
+
// src/pages/dashboard/DashboardPage.tsx
|
|
14
14
|
var T = {
|
|
15
15
|
workspaces: {
|
|
16
16
|
noun: "Workspaces",
|
|
@@ -51,11 +51,11 @@ function E(e, t, n) {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
function D({ navigate: d, authToken: f, currentUser: h, productId: D = "workspaces" }) {
|
|
54
|
-
|
|
54
|
+
o("workspaces.dashboard");
|
|
55
55
|
let { t: O } = C(), k = (e, t) => {
|
|
56
56
|
let n = O(e);
|
|
57
57
|
return n === e ? t : n;
|
|
58
|
-
}, [re, A] = l(!1), j = T[D] ?? T.workspaces, M = E(k, D, j), N = j.Icon, { data: P, isLoading: F, error: I, refetch: L } =
|
|
58
|
+
}, [re, A] = l(!1), j = T[D] ?? T.workspaces, M = E(k, D, j), N = j.Icon, { data: P, isLoading: F, error: I, refetch: L } = r(f), { data: R, isLoading: z, error: B, refetch: V } = e(f), { data: H, isLoading: U, refetch: W } = t(f), G = D === "vibecontrols", { data: K, isLoading: q, refetch: J } = n(f, G), Y = i(f), X = F || z || U || q, ie = c(() => !P && !R && !H && !K ? null : {
|
|
59
59
|
...P ?? {
|
|
60
60
|
workspaces: {
|
|
61
61
|
items: [],
|
|
@@ -94,7 +94,7 @@ function D({ navigate: d, authToken: f, currentUser: h, productId: D = "workspac
|
|
|
94
94
|
R,
|
|
95
95
|
H,
|
|
96
96
|
K
|
|
97
|
-
]), Z = R?.dashboardPreferences, Q = c(() =>
|
|
97
|
+
]), Z = R?.dashboardPreferences, Q = c(() => te(Z?.widgets ?? null, D), [Z, D]), $ = s(() => {
|
|
98
98
|
L(), V(), W(), G && J();
|
|
99
99
|
}, [
|
|
100
100
|
L,
|
|
@@ -172,7 +172,7 @@ function D({ navigate: d, authToken: f, currentUser: h, productId: D = "workspac
|
|
|
172
172
|
]
|
|
173
173
|
})]
|
|
174
174
|
}),
|
|
175
|
-
/* @__PURE__ */ _(
|
|
175
|
+
/* @__PURE__ */ _(ee, {
|
|
176
176
|
widgets: Q,
|
|
177
177
|
workspaceData: ie,
|
|
178
178
|
globalData: R ?? null,
|
|
@@ -180,7 +180,7 @@ function D({ navigate: d, authToken: f, currentUser: h, productId: D = "workspac
|
|
|
180
180
|
navigate: d,
|
|
181
181
|
productId: D
|
|
182
182
|
}),
|
|
183
|
-
/* @__PURE__ */ _(
|
|
183
|
+
/* @__PURE__ */ _(a, {
|
|
184
184
|
open: re,
|
|
185
185
|
onOpenChange: A,
|
|
186
186
|
widgets: Q,
|
|
@@ -191,5 +191,4 @@ function D({ navigate: d, authToken: f, currentUser: h, productId: D = "workspac
|
|
|
191
191
|
]
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
|
-
//#endregion
|
|
195
194
|
export { D as DashboardPage };
|
|
@@ -3,7 +3,7 @@ import { AlertCircle as t, WifiOff as n } from "lucide-react";
|
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
import { CardContent as a, CardHeader as o, GlassCard as s, Skeleton as c } from "@burdenoff/fe-libs/ui";
|
|
5
5
|
import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
6
|
-
|
|
6
|
+
// src/pages/dashboard/WidgetWrapper.tsx
|
|
7
7
|
function u(e) {
|
|
8
8
|
switch (e) {
|
|
9
9
|
case "large": return "col-span-1 sm:col-span-2 lg:col-span-3";
|
|
@@ -49,9 +49,10 @@ function p() {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
function m({ title: e, icon: t, size: n, isLoading: c, error: l, unavailable: m, headerAction: h, children: g, className: _ = "" }) {
|
|
52
|
+
let v = u(n);
|
|
52
53
|
return /* @__PURE__ */ i(s, {
|
|
53
54
|
treatment: "insight",
|
|
54
|
-
className: `h-full ${
|
|
55
|
+
className: `h-full ${v} border-border-seam bg-bg-surface ${_}`,
|
|
55
56
|
children: [/* @__PURE__ */ i(o, {
|
|
56
57
|
className: "flex flex-row items-center justify-between pb-2 gap-y-0",
|
|
57
58
|
children: [/* @__PURE__ */ i("h2", {
|
|
@@ -64,5 +65,4 @@ function m({ title: e, icon: t, size: n, isLoading: c, error: l, unavailable: m,
|
|
|
64
65
|
})]
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
|
-
//#endregion
|
|
68
68
|
export { m as WidgetWrapper, u as getColSpan };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/pages/dashboard/config.ts
|
|
2
2
|
var e = "workspaces", t = {
|
|
3
3
|
welcome: {
|
|
4
4
|
id: "welcome",
|
|
@@ -367,7 +367,7 @@ var e = "workspaces", t = {
|
|
|
367
367
|
]
|
|
368
368
|
}, i = n;
|
|
369
369
|
function a(t, n = e) {
|
|
370
|
-
return !t.availableInProducts || t.availableInProducts.length === 0
|
|
370
|
+
return !t.availableInProducts || t.availableInProducts.length === 0 || t.availableInProducts.includes(n);
|
|
371
371
|
}
|
|
372
372
|
function o(n = e) {
|
|
373
373
|
let r = {};
|
|
@@ -462,5 +462,4 @@ function c(e, t) {
|
|
|
462
462
|
};
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
|
|
466
|
-
export { i as DEFAULT_DASHBOARD_WIDGETS, r as DEFAULT_DASHBOARD_WIDGETS_BY_PRODUCT, t as WIDGET_DEFINITIONS, s as getEffectiveWidgets, a as isWidgetAvailable, c as resolveWidgetCopy };
|
|
465
|
+
export { i as DEFAULT_DASHBOARD_WIDGETS, r as DEFAULT_DASHBOARD_WIDGETS_BY_PRODUCT, e as DEFAULT_PRODUCT_ID, t as WIDGET_DEFINITIONS, o as getDefinitionsForProduct, s as getEffectiveWidgets, a as isWidgetAvailable, c as resolveWidgetCopy };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { WorkspaceDashboardData, GlobalDashboardData, VibeSummary, SessionSummary, AgentFleetSummary } from '../types';
|
|
2
|
-
export declare function useProjectsDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<
|
|
2
|
+
export declare function useProjectsDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<{
|
|
3
3
|
items: import('../types').ProjectSummary[];
|
|
4
4
|
total: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function useWorkspaceDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<
|
|
5
|
+
}, Error>;
|
|
6
|
+
export declare function useWorkspaceDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<WorkspaceDashboardData, Error>;
|
|
7
7
|
export interface VibecontrolsDashboardData {
|
|
8
8
|
recentVibes: VibeSummary[];
|
|
9
9
|
activeSessions: SessionSummary[];
|
|
10
10
|
agentFleet: AgentFleetSummary | null;
|
|
11
11
|
}
|
|
12
|
-
export declare function useVibecontrolsDashboardData(authToken?: string | null, enabled?: boolean): import('@tanstack/react-query').UseQueryResult<
|
|
13
|
-
export declare function useGlobalDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<
|
|
12
|
+
export declare function useVibecontrolsDashboardData(authToken?: string | null, enabled?: boolean): import('@tanstack/react-query').UseQueryResult<VibecontrolsDashboardData, Error>;
|
|
13
|
+
export declare function useGlobalDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<GlobalDashboardData, Error>;
|
|
@@ -4,7 +4,7 @@ import { useActiveContext as r } from "@burdenoff/fe-libs/shared/providers/shell
|
|
|
4
4
|
import { useQuery as i } from "@tanstack/react-query";
|
|
5
5
|
import { print as a } from "graphql";
|
|
6
6
|
import { graphqlFetch as o } from "@burdenoff/fe-libs/shared/graphql";
|
|
7
|
-
|
|
7
|
+
// src/pages/dashboard/hooks/useDashboardData.ts
|
|
8
8
|
var s = 1024 ** 3;
|
|
9
9
|
function c(t) {
|
|
10
10
|
let { workspaceId: n } = r();
|
|
@@ -26,8 +26,8 @@ function c(t) {
|
|
|
26
26
|
items: [],
|
|
27
27
|
total: 0
|
|
28
28
|
},
|
|
29
|
-
staleTime:
|
|
30
|
-
gcTime:
|
|
29
|
+
staleTime: 12e4,
|
|
30
|
+
gcTime: 3e5,
|
|
31
31
|
retry: 1,
|
|
32
32
|
refetchOnWindowFocus: !0
|
|
33
33
|
});
|
|
@@ -86,8 +86,8 @@ function l(e) {
|
|
|
86
86
|
storageUsage: c
|
|
87
87
|
};
|
|
88
88
|
},
|
|
89
|
-
staleTime:
|
|
90
|
-
gcTime:
|
|
89
|
+
staleTime: 12e4,
|
|
90
|
+
gcTime: 3e5,
|
|
91
91
|
retry: 1,
|
|
92
92
|
refetchOnWindowFocus: !0
|
|
93
93
|
});
|
|
@@ -124,8 +124,8 @@ function d(e, t = !1) {
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
|
-
staleTime:
|
|
128
|
-
gcTime:
|
|
127
|
+
staleTime: 6e4,
|
|
128
|
+
gcTime: 3e5,
|
|
129
129
|
retry: 0,
|
|
130
130
|
refetchOnWindowFocus: !0
|
|
131
131
|
});
|
|
@@ -154,10 +154,9 @@ function f(e) {
|
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
156
|
},
|
|
157
|
-
staleTime:
|
|
158
|
-
gcTime:
|
|
157
|
+
staleTime: 3e5,
|
|
158
|
+
gcTime: 6e5,
|
|
159
159
|
retry: 1
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
-
//#endregion
|
|
163
162
|
export { f as useGlobalDashboardData, c as useProjectsDashboardData, d as useVibecontrolsDashboardData, l as useWorkspaceDashboardData };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { captureRequestActor as e, pinnedFetch as t } from "../../../utils/pinnedRequest.js";
|
|
2
|
+
import { UpdateDashboardPreferencesDocument as n } from "../../../generated/global-operations.js";
|
|
3
3
|
import { useMutation as r, useQueryClient as i } from "@tanstack/react-query";
|
|
4
4
|
import { print as a } from "graphql";
|
|
5
|
-
|
|
5
|
+
// src/pages/dashboard/hooks/useDashboardPreferences.ts
|
|
6
6
|
function o(o) {
|
|
7
7
|
let s = i();
|
|
8
8
|
return r({
|
|
9
9
|
mutationFn: async (r) => {
|
|
10
|
-
let i =
|
|
10
|
+
let i = e({ authToken: o }), s = await t(i, {
|
|
11
11
|
gateway: "global",
|
|
12
|
-
query: a(
|
|
12
|
+
query: a(n),
|
|
13
13
|
variables: { input: { widgets: r.map((e) => ({
|
|
14
14
|
widgetId: e.widgetId,
|
|
15
15
|
enabled: e.enabled,
|
|
@@ -17,13 +17,12 @@ function o(o) {
|
|
|
17
17
|
size: e.size
|
|
18
18
|
})) } }
|
|
19
19
|
});
|
|
20
|
-
if (
|
|
21
|
-
return
|
|
20
|
+
if (s.errors?.length) throw Error(s.errors[0]?.message || "Failed to save preferences");
|
|
21
|
+
return s.data.updateMyDashboardPreferences;
|
|
22
22
|
},
|
|
23
23
|
onSuccess: () => {
|
|
24
24
|
s.invalidateQueries({ queryKey: ["dashboard", "global"] });
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
export { o as useUpdateDashboardPreferences };
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
...t,
|
|
6
|
-
order: (n + 1) * e
|
|
1
|
+
function e(e) {
|
|
2
|
+
return e.map((e, t) => ({
|
|
3
|
+
...e,
|
|
4
|
+
order: (t + 1) * 10
|
|
7
5
|
}));
|
|
8
6
|
}
|
|
9
|
-
function
|
|
10
|
-
if (n === r) return
|
|
11
|
-
let a = [...
|
|
12
|
-
if (o < 0 || s < 0) return
|
|
7
|
+
function t(t, n, r, i) {
|
|
8
|
+
if (n === r) return t;
|
|
9
|
+
let a = [...t].sort((e, t) => e.order - t.order), o = a.findIndex((e) => e.widgetId === n), s = a.findIndex((e) => e.widgetId === r);
|
|
10
|
+
if (o < 0 || s < 0) return t;
|
|
13
11
|
let c = a[o], l = a.filter((e, t) => t !== o), u = i === "above" ? l.findIndex((e) => e.widgetId === r) : l.findIndex((e) => e.widgetId === r) + 1;
|
|
14
|
-
return
|
|
12
|
+
return e([
|
|
15
13
|
...l.slice(0, u),
|
|
16
14
|
c,
|
|
17
15
|
...l.slice(u)
|
|
18
16
|
]);
|
|
19
17
|
}
|
|
20
|
-
function
|
|
18
|
+
function n(e, t) {
|
|
21
19
|
return e < t.top + t.height / 2 ? "above" : "below";
|
|
22
20
|
}
|
|
23
|
-
|
|
24
|
-
export { r as dropPositionFromPointer, n as reorderByDropIndex };
|
|
21
|
+
export { n as dropPositionFromPointer, e as renumberOrders, t as reorderByDropIndex };
|