@burdenoff/microfe-workspaces 2026.802.1 → 2026.829.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.js +44 -1
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/wspace-operations.js +18 -18
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/hooks/useWorkspaceMutations.js +84 -61
- package/dist/hooks/useWorkspaceMutations.js.map +1 -1
- package/dist/pages/MembersListPage.js +3 -3
- package/dist/pages/MembersListPage.js.map +1 -1
- package/dist/pages/ProjectsListPage.js +3 -3
- package/dist/pages/ProjectsListPage.js.map +1 -1
- package/dist/pages/WorkspaceDetailPage.js +152 -114
- package/dist/pages/WorkspaceDetailPage.js.map +1 -1
- package/dist/pages/WorkspaceInvitePage.js +2 -2
- package/dist/pages/WorkspaceInvitePage.js.map +1 -1
- package/dist/pages/dashboard/DashboardCustomizer.js +62 -62
- package/dist/pages/dashboard/DashboardCustomizer.js.map +1 -1
- package/dist/pages/dashboard/DashboardPage.js +88 -69
- package/dist/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/pages/dashboard/config.js +77 -1
- package/dist/pages/dashboard/config.js.map +1 -1
- package/dist/pages/dashboard/widgets/AgentsWidget.js +56 -54
- package/dist/pages/dashboard/widgets/AgentsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/GroupsWidget.js +29 -31
- package/dist/pages/dashboard/widgets/GroupsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/MembersWidget.js +33 -33
- package/dist/pages/dashboard/widgets/MembersWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/ProjectsWidget.js +42 -44
- package/dist/pages/dashboard/widgets/ProjectsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/QuickActionsWidget.js +171 -161
- package/dist/pages/dashboard/widgets/QuickActionsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/RecentActivityWidget.js +54 -44
- package/dist/pages/dashboard/widgets/RecentActivityWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/SessionsWidget.js +57 -41
- package/dist/pages/dashboard/widgets/SessionsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/StorageWidget.js +52 -54
- package/dist/pages/dashboard/widgets/StorageWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/TagCloudWidget.js +28 -30
- package/dist/pages/dashboard/widgets/TagCloudWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/TipsWidget.js +141 -131
- package/dist/pages/dashboard/widgets/TipsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/UpcomingEventsWidget.js +46 -40
- package/dist/pages/dashboard/widgets/UpcomingEventsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/VibesWidget.js +44 -34
- package/dist/pages/dashboard/widgets/VibesWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/WelcomeWidget.js +43 -41
- package/dist/pages/dashboard/widgets/WelcomeWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/WorkflowRunsWidget.js +68 -62
- package/dist/pages/dashboard/widgets/WorkflowRunsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js +50 -44
- package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.js +59 -49
- package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/WorkspacesWidget.js +35 -33
- package/dist/pages/dashboard/widgets/WorkspacesWidget.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowStatsWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/WorkflowStatsWidget.tsx"],"sourcesContent":["import { GitBranch, ArrowRight, Play, Pause, CheckCircle2, XCircle } from 'lucide-react';\nimport { Badge, Button, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport type { WidgetProps } from '../types';\n\nconst runStatusIcons: Record<string, { icon: typeof Play; color: string }> = {\n RUNNING: { icon: Play, color: 'text-accent-blue' },\n COMPLETED: { icon: CheckCircle2, color: 'text-status-success-text' },\n FAILED: { icon: XCircle, color: 'text-status-error-text' },\n PAUSED: { icon: Pause, color: 'text-status-warning-text' },\n};\n\nexport function WorkflowStatsWidget({ workspaceData, isLoading, navigate }: WidgetProps) {\n const stats = workspaceData?.workflowStats;\n\n return (\n <WidgetWrapper\n title
|
|
1
|
+
{"version":3,"file":"WorkflowStatsWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/WorkflowStatsWidget.tsx"],"sourcesContent":["import { GitBranch, ArrowRight, Play, Pause, CheckCircle2, XCircle } from 'lucide-react';\nimport { Badge, Button, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport { tWithFallback } from '../../../utils/i18n';\nimport type { WidgetProps } from '../types';\n\nconst runStatusIcons: Record<string, { icon: typeof Play; color: string }> = {\n RUNNING: { icon: Play, color: 'text-accent-blue' },\n COMPLETED: { icon: CheckCircle2, color: 'text-status-success-text' },\n FAILED: { icon: XCircle, color: 'text-status-error-text' },\n PAUSED: { icon: Pause, color: 'text-status-warning-text' },\n};\n\nexport function WorkflowStatsWidget({ workspaceData, isLoading, navigate }: WidgetProps) {\n const { t } = useI18n();\n const stats = workspaceData?.workflowStats;\n\n return (\n <WidgetWrapper\n title={tWithFallback(t, 'dashboard.workflowStats.title', 'Workflows')}\n icon={<GitBranch className=\"size-4\" />}\n size=\"medium\"\n isLoading={isLoading}\n unavailable={!workspaceData}\n headerAction={\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"text-xs\"\n onClick={() => navigate('/workflows')}\n >\n {tWithFallback(t, 'dashboard.workflowStats.viewAll', 'View all')}{' '}\n <ArrowRight className=\"ml-1 size-3\" />\n </Button>\n }\n >\n {!stats ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={tWithFallback(\n t,\n 'dashboard.workflowStats.emptyTitle',\n 'No workflow data available'\n )}\n description={tWithFallback(\n t,\n 'dashboard.workflowStats.emptyDescription',\n 'Once you run automations, their status and counts will appear here.'\n )}\n className=\"py-4\"\n />\n ) : (\n <div className=\"space-y-3\">\n <div className=\"grid grid-cols-2 gap-3\">\n <div className=\"rounded-lg bg-bg-canvas p-3 border border-border-default text-center\">\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">\n {stats.activeWorkflowsCount}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {tWithFallback(t, 'dashboard.workflowStats.statActive', 'Active')}\n </p>\n </div>\n <div className=\"rounded-lg bg-bg-canvas p-3 border border-border-default text-center\">\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">\n {stats.archivedWorkflowsCount}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {tWithFallback(t, 'dashboard.workflowStats.statArchived', 'Archived')}\n </p>\n </div>\n </div>\n {stats.recentRuns.length > 0 && (\n <div className=\"space-y-1.5\">\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider\">\n {tWithFallback(t, 'dashboard.workflowStats.recentRunsHeading', 'Recent Runs')}\n </p>\n {stats.recentRuns.slice(0, 3).map((run) => {\n const statusInfo = runStatusIcons[run.status] || runStatusIcons.RUNNING;\n const StatusIcon = statusInfo.icon;\n return (\n <div\n key={run.id}\n className=\"flex items-center justify-between p-1.5 rounded hover:bg-accent/5 transition-colors\"\n >\n <div className=\"flex items-center gap-2 min-w-0\">\n <StatusIcon className={`size-3.5 ${statusInfo.color}`} />\n <span className=\"text-sm text-text-primary truncate\">{run.workflowKey}</span>\n </div>\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {run.status}\n </Badge>\n </div>\n );\n })}\n </div>\n )}\n </div>\n )}\n </WidgetWrapper>\n );\n}\n"],"mappings":";;;;;;;AAOA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;KACzC,IAAM,IAAa,EAAe,EAAI,WAAW,EAAe,SAC1D,IAAa,EAAW;AAC9B,YACE,kBAAC,OAAD;MAEE,WAAU;gBAFZ,CAIE,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,GAAD,EAAY,WAAW,YAAY,EAAW,SAAW,CAAA,EACzD,kBAAC,QAAD;QAAM,WAAU;kBAAsC,EAAI;QAAmB,CAAA,CACzE;UACN,kBAAC,GAAD;OAAO,SAAQ;OAAU,WAAU;iBAChC,EAAI;OACC,CAAA,CACJ;QAVC,EAAI,GAUL;MAER,CACE;MAEJ;OA3DN,kBAAC,GAAD;GACE,cAAa;GACb,OAAO,EACL,GACA,sCACA,6BACD;GACD,aAAa,EACX,GACA,4CACA,sEACD;GACD,WAAU;GACV,CAAA;EAgDU,CAAA"}
|
|
@@ -1,91 +1,101 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { tWithFallback as e } from "../../../utils/i18n.js";
|
|
2
|
+
import { WidgetWrapper as t } from "../WidgetWrapper.js";
|
|
3
|
+
import { ArrowRight as n, GitBranch as r, Plus as i } from "lucide-react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
import { Button as s, IllustratedEmptyState as c } from "@burdenoff/fe-libs/ui";
|
|
6
|
+
import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
5
7
|
//#region src/pages/dashboard/widgets/WorkflowsOverviewWidget.tsx
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
if (
|
|
9
|
-
if (
|
|
10
|
-
let
|
|
11
|
-
if (
|
|
12
|
-
let
|
|
13
|
-
return
|
|
8
|
+
function u(t, n) {
|
|
9
|
+
let r = Date.now() - new Date(n).getTime(), i = Math.floor(r / 6e4);
|
|
10
|
+
if (i < 1) return e(t, "dashboard.workflowsOverview.justNow", "just now");
|
|
11
|
+
if (i < 60) return e(t, "dashboard.workflowsOverview.minutesAgo", "{count}m ago", { count: i });
|
|
12
|
+
let a = Math.floor(i / 60);
|
|
13
|
+
if (a < 24) return e(t, "dashboard.workflowsOverview.hoursAgo", "{count}h ago", { count: a });
|
|
14
|
+
let o = Math.floor(a / 24);
|
|
15
|
+
return o < 7 ? e(t, "dashboard.workflowsOverview.daysAgo", "{count}d ago", { count: o }) : new Date(n).toLocaleDateString(void 0, {
|
|
14
16
|
month: "short",
|
|
15
17
|
day: "numeric"
|
|
16
18
|
});
|
|
17
19
|
}
|
|
18
|
-
function
|
|
19
|
-
let
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
title: "Workflows",
|
|
22
|
-
icon: /* @__PURE__ */
|
|
20
|
+
function d({ workspaceData: d, isLoading: f, navigate: p }) {
|
|
21
|
+
let { t: m } = l(), h = d?.workflowStats, g = h?.recentWorkflows ?? [];
|
|
22
|
+
return /* @__PURE__ */ a(t, {
|
|
23
|
+
title: e(m, "dashboard.workflowsOverview.title", "Workflows"),
|
|
24
|
+
icon: /* @__PURE__ */ a(r, { className: "size-4" }),
|
|
23
25
|
size: "medium",
|
|
24
|
-
isLoading:
|
|
25
|
-
unavailable: !
|
|
26
|
-
headerAction: /* @__PURE__ */
|
|
26
|
+
isLoading: f,
|
|
27
|
+
unavailable: !d,
|
|
28
|
+
headerAction: /* @__PURE__ */ o(s, {
|
|
27
29
|
variant: "ghost",
|
|
28
30
|
size: "sm",
|
|
29
31
|
className: "text-xs",
|
|
30
|
-
onClick: () =>
|
|
31
|
-
children: [
|
|
32
|
+
onClick: () => p("/workflows/list"),
|
|
33
|
+
children: [
|
|
34
|
+
e(m, "dashboard.workflowsOverview.viewAll", "View all"),
|
|
35
|
+
" ",
|
|
36
|
+
/* @__PURE__ */ a(n, { className: "ml-1 size-3" })
|
|
37
|
+
]
|
|
32
38
|
}),
|
|
33
|
-
children:
|
|
39
|
+
children: h ? /* @__PURE__ */ o("div", {
|
|
34
40
|
className: "space-y-3",
|
|
35
|
-
children: [/* @__PURE__ */
|
|
41
|
+
children: [/* @__PURE__ */ o("div", {
|
|
36
42
|
className: "grid grid-cols-2 gap-3",
|
|
37
|
-
children: [/* @__PURE__ */
|
|
43
|
+
children: [/* @__PURE__ */ o("div", {
|
|
38
44
|
className: "rounded-lg bg-bg-canvas p-3 border border-border-default text-center",
|
|
39
|
-
children: [/* @__PURE__ */
|
|
45
|
+
children: [/* @__PURE__ */ a("p", {
|
|
40
46
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
41
|
-
children:
|
|
42
|
-
}), /* @__PURE__ */
|
|
47
|
+
children: h.activeWorkflowsCount
|
|
48
|
+
}), /* @__PURE__ */ a("p", {
|
|
43
49
|
className: "text-xs text-text-secondary",
|
|
44
|
-
children: "Active"
|
|
50
|
+
children: e(m, "dashboard.workflowsOverview.statActive", "Active")
|
|
45
51
|
})]
|
|
46
|
-
}), /* @__PURE__ */
|
|
52
|
+
}), /* @__PURE__ */ o("div", {
|
|
47
53
|
className: "rounded-lg bg-bg-canvas p-3 border border-border-default text-center",
|
|
48
|
-
children: [/* @__PURE__ */
|
|
54
|
+
children: [/* @__PURE__ */ a("p", {
|
|
49
55
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
50
|
-
children:
|
|
51
|
-
}), /* @__PURE__ */
|
|
56
|
+
children: h.archivedWorkflowsCount
|
|
57
|
+
}), /* @__PURE__ */ a("p", {
|
|
52
58
|
className: "text-xs text-text-secondary",
|
|
53
|
-
children: "Archived"
|
|
59
|
+
children: e(m, "dashboard.workflowsOverview.statArchived", "Archived")
|
|
54
60
|
})]
|
|
55
61
|
})]
|
|
56
|
-
}),
|
|
62
|
+
}), g.length > 0 && /* @__PURE__ */ o("div", {
|
|
57
63
|
className: "space-y-1.5",
|
|
58
|
-
children: [/* @__PURE__ */
|
|
64
|
+
children: [/* @__PURE__ */ a("p", {
|
|
59
65
|
className: "text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
60
|
-
children: "Recently Updated"
|
|
61
|
-
}),
|
|
66
|
+
children: e(m, "dashboard.workflowsOverview.recentlyUpdatedHeading", "Recently Updated")
|
|
67
|
+
}), g.slice(0, 4).map((e) => /* @__PURE__ */ o("button", {
|
|
62
68
|
type: "button",
|
|
63
|
-
onClick: () =>
|
|
69
|
+
onClick: () => p(`/workflows/workflow/${e.workflowKey}/${e.version}`),
|
|
64
70
|
className: "flex w-full items-center justify-between gap-2 rounded-md p-1.5 text-left transition-colors hover:bg-accent/5",
|
|
65
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ a("span", {
|
|
66
72
|
className: "truncate text-sm text-text-primary",
|
|
67
73
|
children: e.name
|
|
68
|
-
}), /* @__PURE__ */
|
|
74
|
+
}), /* @__PURE__ */ a("span", {
|
|
69
75
|
className: "shrink-0 text-[11px] text-text-secondary",
|
|
70
|
-
children:
|
|
76
|
+
children: u(m, e.updatedAt)
|
|
71
77
|
})]
|
|
72
78
|
}, `${e.workflowKey}-${e.version}`))]
|
|
73
79
|
})]
|
|
74
|
-
}) : /* @__PURE__ */
|
|
80
|
+
}) : /* @__PURE__ */ a(c, {
|
|
75
81
|
illustration: "empty-data",
|
|
76
|
-
title: "No workflows yet",
|
|
77
|
-
description: "Build your first workflow to automate a process.",
|
|
82
|
+
title: e(m, "dashboard.workflowsOverview.emptyTitle", "No workflows yet"),
|
|
83
|
+
description: e(m, "dashboard.workflowsOverview.emptyDescription", "Build your first workflow to automate a process."),
|
|
78
84
|
className: "py-4",
|
|
79
|
-
action: /* @__PURE__ */
|
|
85
|
+
action: /* @__PURE__ */ o(s, {
|
|
80
86
|
variant: "outline",
|
|
81
87
|
size: "sm",
|
|
82
|
-
onClick: () =>
|
|
83
|
-
children: [
|
|
88
|
+
onClick: () => p("/workflows/new"),
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ a(i, { className: "mr-1.5 size-3.5" }),
|
|
91
|
+
" ",
|
|
92
|
+
e(m, "dashboard.workflowsOverview.emptyAction", "New Workflow")
|
|
93
|
+
]
|
|
84
94
|
})
|
|
85
95
|
})
|
|
86
96
|
});
|
|
87
97
|
}
|
|
88
98
|
//#endregion
|
|
89
|
-
export {
|
|
99
|
+
export { d as WorkflowsOverviewWidget };
|
|
90
100
|
|
|
91
101
|
//# sourceMappingURL=WorkflowsOverviewWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowsOverviewWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/WorkflowsOverviewWidget.tsx"],"sourcesContent":["import { GitBranch, ArrowRight, Plus } from 'lucide-react';\nimport { Button, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport type { WidgetProps } from '../types';\n\nfunction formatRelative(dateString: string): string {\n const diffMs = Date.now() - new Date(dateString).getTime();\n const diffMin = Math.floor(diffMs / 60000);\n if (diffMin < 1) return 'just now';\n if (diffMin < 60)
|
|
1
|
+
{"version":3,"file":"WorkflowsOverviewWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/WorkflowsOverviewWidget.tsx"],"sourcesContent":["import { GitBranch, ArrowRight, Plus } from 'lucide-react';\nimport { Button, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport type { I18nContextValue } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport { tWithFallback } from '../../../utils/i18n';\nimport type { WidgetProps } from '../types';\n\nfunction formatRelative(t: I18nContextValue['t'], dateString: string): string {\n const diffMs = Date.now() - new Date(dateString).getTime();\n const diffMin = Math.floor(diffMs / 60000);\n if (diffMin < 1) return tWithFallback(t, 'dashboard.workflowsOverview.justNow', 'just now');\n if (diffMin < 60)\n return tWithFallback(t, 'dashboard.workflowsOverview.minutesAgo', '{count}m ago', {\n count: diffMin,\n });\n const diffHr = Math.floor(diffMin / 60);\n if (diffHr < 24)\n return tWithFallback(t, 'dashboard.workflowsOverview.hoursAgo', '{count}h ago', {\n count: diffHr,\n });\n const diffDay = Math.floor(diffHr / 24);\n if (diffDay < 7)\n return tWithFallback(t, 'dashboard.workflowsOverview.daysAgo', '{count}d ago', {\n count: diffDay,\n });\n return new Date(dateString).toLocaleDateString(undefined, {\n month: 'short',\n day: 'numeric',\n });\n}\n\nexport function WorkflowsOverviewWidget({ workspaceData, isLoading, navigate }: WidgetProps) {\n const { t } = useI18n();\n const stats = workspaceData?.workflowStats;\n const recentWorkflows = stats?.recentWorkflows ?? [];\n\n return (\n <WidgetWrapper\n title={tWithFallback(t, 'dashboard.workflowsOverview.title', 'Workflows')}\n icon={<GitBranch className=\"size-4\" />}\n size=\"medium\"\n isLoading={isLoading}\n unavailable={!workspaceData}\n headerAction={\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"text-xs\"\n onClick={() => navigate('/workflows/list')}\n >\n {tWithFallback(t, 'dashboard.workflowsOverview.viewAll', 'View all')}{' '}\n <ArrowRight className=\"ml-1 size-3\" />\n </Button>\n }\n >\n {!stats ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={tWithFallback(t, 'dashboard.workflowsOverview.emptyTitle', 'No workflows yet')}\n description={tWithFallback(\n t,\n 'dashboard.workflowsOverview.emptyDescription',\n 'Build your first workflow to automate a process.'\n )}\n className=\"py-4\"\n action={\n <Button variant=\"outline\" size=\"sm\" onClick={() => navigate('/workflows/new')}>\n <Plus className=\"mr-1.5 size-3.5\" />{' '}\n {tWithFallback(t, 'dashboard.workflowsOverview.emptyAction', 'New Workflow')}\n </Button>\n }\n />\n ) : (\n <div className=\"space-y-3\">\n <div className=\"grid grid-cols-2 gap-3\">\n <div className=\"rounded-lg bg-bg-canvas p-3 border border-border-default text-center\">\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">\n {stats.activeWorkflowsCount}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {tWithFallback(t, 'dashboard.workflowsOverview.statActive', 'Active')}\n </p>\n </div>\n <div className=\"rounded-lg bg-bg-canvas p-3 border border-border-default text-center\">\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">\n {stats.archivedWorkflowsCount}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {tWithFallback(t, 'dashboard.workflowsOverview.statArchived', 'Archived')}\n </p>\n </div>\n </div>\n {recentWorkflows.length > 0 && (\n <div className=\"space-y-1.5\">\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider\">\n {tWithFallback(\n t,\n 'dashboard.workflowsOverview.recentlyUpdatedHeading',\n 'Recently Updated'\n )}\n </p>\n {recentWorkflows.slice(0, 4).map((wf) => (\n <button\n key={`${wf.workflowKey}-${wf.version}`}\n type=\"button\"\n onClick={() => navigate(`/workflows/workflow/${wf.workflowKey}/${wf.version}`)}\n className=\"flex w-full items-center justify-between gap-2 rounded-md p-1.5 text-left transition-colors hover:bg-accent/5\"\n >\n <span className=\"truncate text-sm text-text-primary\">{wf.name}</span>\n <span className=\"shrink-0 text-[11px] text-text-secondary\">\n {formatRelative(t, wf.updatedAt)}\n </span>\n </button>\n ))}\n </div>\n )}\n </div>\n )}\n </WidgetWrapper>\n );\n}\n"],"mappings":";;;;;;;AAQA,SAAS,EAAe,GAA0B,GAA4B;CAC5E,IAAM,IAAS,KAAK,KAAK,GAAG,IAAI,KAAK,EAAW,CAAC,SAAS,EACpD,IAAU,KAAK,MAAM,IAAS,IAAM;AAC1C,KAAI,IAAU,EAAG,QAAO,EAAc,GAAG,uCAAuC,WAAW;AAC3F,KAAI,IAAU,GACZ,QAAO,EAAc,GAAG,0CAA0C,gBAAgB,EAChF,OAAO,GACR,CAAC;CACJ,IAAM,IAAS,KAAK,MAAM,IAAU,GAAG;AACvC,KAAI,IAAS,GACX,QAAO,EAAc,GAAG,wCAAwC,gBAAgB,EAC9E,OAAO,GACR,CAAC;CACJ,IAAM,IAAU,KAAK,MAAM,IAAS,GAAG;AAKvC,QAJI,IAAU,IACL,E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,uBAAuB,EAAG,YAAY,GAAG,EAAG,UAAU;KAC9E,WAAU;eAJZ,CAME,kBAAC,QAAD;MAAM,WAAU;gBAAsC,EAAG;MAAY,CAAA,EACrE,kBAAC,QAAD;MAAM,WAAU;gBACb,EAAe,GAAG,EAAG,UAAU;MAC3B,CAAA,CACA;OATF,GAAG,EAAG,YAAY,GAAG,EAAG,UAStB,CACT,CACE;MAEJ;OA5DN,kBAAC,GAAD;GACE,cAAa;GACb,OAAO,EAAc,GAAG,0CAA0C,mBAAmB;GACrF,aAAa,EACX,GACA,gDACA,mDACD;GACD,WAAU;GACV,QACE,kBAAC,GAAD;IAAQ,SAAQ;IAAU,MAAK;IAAK,eAAe,EAAS,iBAAiB;cAA7E;KACE,kBAAC,GAAD,EAAM,WAAU,mBAAoB,CAAA;KAAC;KACpC,EAAc,GAAG,2CAA2C,eAAe;KACrE;;GAEX,CAAA;EA+CU,CAAA"}
|
|
@@ -1,67 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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";
|
|
5
7
|
//#region src/pages/dashboard/widgets/WorkspacesWidget.tsx
|
|
6
|
-
var
|
|
8
|
+
var d = {
|
|
7
9
|
ACTIVE: "bg-status-success-bg",
|
|
8
10
|
SUSPENDED: "bg-status-warning-bg",
|
|
9
11
|
ARCHIVED: "bg-text-tertiary"
|
|
10
12
|
};
|
|
11
|
-
function
|
|
12
|
-
let
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
title: "Workspaces",
|
|
15
|
-
icon: /* @__PURE__ */
|
|
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" }),
|
|
16
18
|
size: "medium",
|
|
17
|
-
isLoading:
|
|
18
|
-
unavailable: !
|
|
19
|
-
headerAction: /* @__PURE__ */
|
|
19
|
+
isLoading: p,
|
|
20
|
+
unavailable: !f,
|
|
21
|
+
headerAction: /* @__PURE__ */ o(c, {
|
|
20
22
|
variant: "ghost",
|
|
21
23
|
size: "sm",
|
|
22
24
|
className: "text-xs",
|
|
23
|
-
onClick: () =>
|
|
24
|
-
children: [
|
|
25
|
+
onClick: () => m("/workspaces/list"),
|
|
26
|
+
children: [
|
|
27
|
+
e(h, "dashboard.workspaces.viewAll", "View all"),
|
|
28
|
+
" ",
|
|
29
|
+
/* @__PURE__ */ a(n, { className: "ml-1 size-3" })
|
|
30
|
+
]
|
|
25
31
|
}),
|
|
26
|
-
children:
|
|
32
|
+
children: g.length === 0 ? /* @__PURE__ */ a(l, {
|
|
27
33
|
illustration: "empty-data",
|
|
28
|
-
title: "No workspaces yet",
|
|
34
|
+
title: e(h, "dashboard.workspaces.emptyTitle", "No workspaces yet"),
|
|
29
35
|
className: "py-4",
|
|
30
|
-
action: /* @__PURE__ */
|
|
36
|
+
action: /* @__PURE__ */ a(c, {
|
|
31
37
|
variant: "outline",
|
|
32
38
|
size: "sm",
|
|
33
|
-
onClick: () =>
|
|
34
|
-
children: "Create your first workspace"
|
|
39
|
+
onClick: () => m("/workspaces/list"),
|
|
40
|
+
children: e(h, "dashboard.workspaces.emptyAction", "Create your first workspace")
|
|
35
41
|
})
|
|
36
|
-
}) : /* @__PURE__ */
|
|
42
|
+
}) : /* @__PURE__ */ o("div", {
|
|
37
43
|
className: "space-y-2",
|
|
38
|
-
children: [
|
|
44
|
+
children: [g.slice(0, 5).map((e) => /* @__PURE__ */ o("button", {
|
|
39
45
|
type: "button",
|
|
40
46
|
className: "w-full flex items-center justify-between p-2 rounded-md hover:bg-accent/5 cursor-pointer transition-colors text-left",
|
|
41
|
-
onClick: () =>
|
|
42
|
-
children: [/* @__PURE__ */
|
|
47
|
+
onClick: () => m(`/workspaces/${e.id}`),
|
|
48
|
+
children: [/* @__PURE__ */ o("div", {
|
|
43
49
|
className: "flex items-center gap-2 min-w-0",
|
|
44
|
-
children: [/* @__PURE__ */ i
|
|
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", {
|
|
45
51
|
className: "text-sm font-medium text-text-primary truncate",
|
|
46
52
|
children: e.name
|
|
47
53
|
})]
|
|
48
|
-
}), /* @__PURE__ */
|
|
54
|
+
}), /* @__PURE__ */ a(s, {
|
|
49
55
|
variant: "outline",
|
|
50
56
|
className: "text-[10px] shrink-0",
|
|
51
57
|
children: e.type
|
|
52
58
|
})]
|
|
53
|
-
}, e.id)),
|
|
59
|
+
}, e.id)), _ > 5 && /* @__PURE__ */ a("p", {
|
|
54
60
|
className: "text-xs text-text-secondary text-center pt-1",
|
|
55
|
-
children:
|
|
56
|
-
"+",
|
|
57
|
-
m - 5,
|
|
58
|
-
" more workspaces"
|
|
59
|
-
]
|
|
61
|
+
children: e(h, "dashboard.workspaces.more", "+{count} more workspaces", { count: _ - 5 })
|
|
60
62
|
})]
|
|
61
63
|
})
|
|
62
64
|
});
|
|
63
65
|
}
|
|
64
66
|
//#endregion
|
|
65
|
-
export {
|
|
67
|
+
export { f as WorkspacesWidget };
|
|
66
68
|
|
|
67
69
|
//# sourceMappingURL=WorkspacesWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspacesWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/WorkspacesWidget.tsx"],"sourcesContent":["import { Building2, ArrowRight, Circle } from 'lucide-react';\nimport { Badge, Button, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport type { WidgetProps } from '../types';\n\nconst statusColors: Record<string, string> = {\n ACTIVE: 'bg-status-success-bg',\n SUSPENDED: 'bg-status-warning-bg',\n ARCHIVED: 'bg-text-tertiary',\n};\n\nexport function WorkspacesWidget({ workspaceData, isLoading, navigate }: WidgetProps) {\n const workspaces = workspaceData?.workspaces.items ?? [];\n const total = workspaceData?.workspaces.total ?? 0;\n\n return (\n <WidgetWrapper\n title
|
|
1
|
+
{"version":3,"file":"WorkspacesWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/WorkspacesWidget.tsx"],"sourcesContent":["import { Building2, ArrowRight, Circle } from 'lucide-react';\nimport { Badge, Button, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport { tWithFallback } from '../../../utils/i18n';\nimport type { WidgetProps } from '../types';\n\nconst statusColors: Record<string, string> = {\n ACTIVE: 'bg-status-success-bg',\n SUSPENDED: 'bg-status-warning-bg',\n ARCHIVED: 'bg-text-tertiary',\n};\n\nexport function WorkspacesWidget({ workspaceData, isLoading, navigate }: WidgetProps) {\n const { t } = useI18n();\n const workspaces = workspaceData?.workspaces.items ?? [];\n const total = workspaceData?.workspaces.total ?? 0;\n\n return (\n <WidgetWrapper\n title={tWithFallback(t, 'dashboard.workspaces.title', 'Workspaces')}\n icon={<Building2 className=\"size-4\" />}\n size=\"medium\"\n isLoading={isLoading}\n unavailable={!workspaceData}\n headerAction={\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"text-xs\"\n onClick={() => navigate('/workspaces/list')}\n >\n {tWithFallback(t, 'dashboard.workspaces.viewAll', 'View all')}{' '}\n <ArrowRight className=\"ml-1 size-3\" />\n </Button>\n }\n >\n {workspaces.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={tWithFallback(t, 'dashboard.workspaces.emptyTitle', 'No workspaces yet')}\n className=\"py-4\"\n action={\n <Button variant=\"outline\" size=\"sm\" onClick={() => navigate('/workspaces/list')}>\n {tWithFallback(t, 'dashboard.workspaces.emptyAction', 'Create your first workspace')}\n </Button>\n }\n />\n ) : (\n <div className=\"space-y-2\">\n {workspaces.slice(0, 5).map((ws) => (\n <button\n key={ws.id}\n type=\"button\"\n className=\"w-full flex items-center justify-between p-2 rounded-md hover:bg-accent/5 cursor-pointer transition-colors text-left\"\n onClick={() => navigate(`/workspaces/${ws.id}`)}\n >\n <div className=\"flex items-center gap-2 min-w-0\">\n <Circle\n className={`size-2 ${statusColors[ws.status] || 'bg-text-tertiary'} fill-current ${\n ws.status === 'ACTIVE' ? 'motion-safe:animate-vc-glow-pulse' : ''\n }`}\n />\n <span className=\"text-sm font-medium text-text-primary truncate\">{ws.name}</span>\n </div>\n <Badge variant=\"outline\" className=\"text-[10px] shrink-0\">\n {ws.type}\n </Badge>\n </button>\n ))}\n {total > 5 && (\n <p className=\"text-xs text-text-secondary text-center pt-1\">\n {tWithFallback(t, 'dashboard.workspaces.more', '+{count} more workspaces', {\n count: total - 5,\n })}\n </p>\n )}\n </div>\n )}\n </WidgetWrapper>\n );\n}\n"],"mappings":";;;;;;;AAOA,IAAM,IAAuC;CAC3C,QAAQ;CACR,WAAW;CACX,UAAU;CACX;AAED,SAAgB,EAAiB,EAAE,kBAAe,cAAW,eAAyB;CACpF,IAAM,EAAE,SAAM,GAAS,EACjB,IAAa,GAAe,WAAW,SAAS,EAAE,EAClD,IAAQ,GAAe,WAAW,SAAS;AAEjD,QACE,kBAAC,GAAD;EACE,OAAO,EAAc,GAAG,8BAA8B,aAAa;EACn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+
"version": "2026.829.1",
|
|
4
4
|
"description": "Workspaces microfrontend for Burdenoff products",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"types": "./dist/index.d.ts",
|
|
24
24
|
"scripts": {
|
|
25
25
|
"dev": "vite",
|
|
26
|
-
"build": "
|
|
26
|
+
"build": "bash scripts/build-limits.sh bash scripts/typecheck.sh && bash scripts/build-limits.sh --gate vite build",
|
|
27
27
|
"lint": "eslint .",
|
|
28
28
|
"lint:sanity": "if [ \"${CI:-}\" = \"true\" ]; then bun run lint; else bun run lint -- --cache --cache-location .eslintcache; fi",
|
|
29
29
|
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
30
30
|
"format:check": "prettier --check \"src/**/*.{ts,tsx}\"",
|
|
31
|
-
"type:check": "bash scripts/build-limits.sh
|
|
31
|
+
"type:check": "bash scripts/build-limits.sh bash scripts/typecheck.sh",
|
|
32
32
|
"test": "bash scripts/build-limits.sh vitest run",
|
|
33
33
|
"test:watch": "vitest",
|
|
34
34
|
"test:coverage": "bash scripts/build-limits.sh vitest run --coverage",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"zustand": "^5.0.0"
|
|
96
96
|
},
|
|
97
97
|
"publishConfig": {
|
|
98
|
-
"access": "
|
|
98
|
+
"access": "public"
|
|
99
99
|
},
|
|
100
100
|
"overrides": {
|
|
101
101
|
"lodash": ">=4.17.21",
|