@burdenoff/microfe-workspaces 2026.1110.2 → 2026.1114.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/WorkspacesRoot.js +31 -25
- package/dist/components/CreateProjectDialog.js +81 -78
- package/dist/components/CreateWorkspaceDialog.js +41 -41
- package/dist/components/InviteMemberDialog.js +54 -54
- package/dist/components/MemberListItem.js +53 -53
- package/dist/components/ProjectCard.js +82 -82
- package/dist/components/ProjectMemberPickerDialog.js +46 -46
- package/dist/components/RenameProjectDialog.js +16 -16
- package/dist/components/WorkspaceCard.js +18 -18
- package/dist/components/WorkspacesErrorBoundary.js +25 -25
- package/dist/components/tags/ProjectTagsWidget.js +50 -50
- package/dist/components/tags/WorkspaceTagsEditor.js +9 -9
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -14
- package/dist/pages/ActivityListPage.js +30 -30
- package/dist/pages/CreateWorkspacePage.js +205 -173
- package/dist/pages/InviteAcceptancePage.js +201 -201
- package/dist/pages/MembersListPage.js +165 -164
- package/dist/pages/PendingInvitesPage.js +67 -67
- package/dist/pages/ProjectDetailPage.js +297 -272
- package/dist/pages/ProjectMembersPage.js +59 -59
- package/dist/pages/ProjectsListPage.js +275 -244
- package/dist/pages/WorkspaceDetailPage.js +175 -172
- package/dist/pages/WorkspaceInvitePage.js +298 -298
- package/dist/pages/WorkspaceSettingsPage.js +48 -48
- package/dist/pages/WorkspacesListPage.js +55 -55
- package/dist/pages/dashboard/DashboardCustomizer.js +27 -27
- package/dist/pages/dashboard/DashboardPage.js +35 -35
- package/dist/pages/dashboard/WidgetWrapper.js +21 -21
- package/dist/pages/dashboard/widgets/AgentsWidget.js +25 -25
- package/dist/pages/dashboard/widgets/GroupsWidget.js +14 -14
- package/dist/pages/dashboard/widgets/MembersWidget.js +15 -15
- package/dist/pages/dashboard/widgets/ProjectsWidget.js +20 -20
- package/dist/pages/dashboard/widgets/QuickActionsWidget.js +7 -7
- package/dist/pages/dashboard/widgets/RecentActivityWidget.js +16 -16
- package/dist/pages/dashboard/widgets/SessionsWidget.js +15 -15
- package/dist/pages/dashboard/widgets/TagCloudWidget.js +11 -11
- package/dist/pages/dashboard/widgets/UpcomingEventsWidget.js +16 -16
- package/dist/pages/dashboard/widgets/VibesWidget.js +13 -13
- package/dist/pages/dashboard/widgets/WelcomeWidget.js +23 -23
- package/dist/pages/dashboard/widgets/WorkflowRunsWidget.js +26 -26
- package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js +21 -21
- package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.js +22 -22
- package/dist/pages/dashboard/widgets/WorkspacesWidget.js +16 -16
- package/dist/providers/WorkspacesProvider.d.ts +5 -0
- package/dist/providers/WorkspacesProvider.js +2 -2
- package/dist/types/index.d.ts +11 -1
- package/dist/utils/createForms.d.ts +21 -0
- package/dist/utils/createForms.js +20 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +4 -4
|
@@ -6,8 +6,8 @@ import { useUpdateWorkspace as i } from "../hooks/useWorkspaceMutations.js";
|
|
|
6
6
|
import { useWorkspacesContext as a } from "../providers/WorkspacesProvider.js";
|
|
7
7
|
import { useWorkspacesPageView as o } from "../hooks/useWorkspacesPageView.js";
|
|
8
8
|
import { ArrowLeft as s, Save as c } from "lucide-react";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { Button as l, CardContent as u, CardHeader as d, CardTitle as f, GlassCard as p, OptionalFields as m, PagePurpose as h } from "@burdenoff/fe-libs/ui";
|
|
10
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
11
11
|
import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
12
|
import { useNavigate as y, useParams as b } from "react-router";
|
|
13
13
|
import { AccessDenied as x, PermissionGate as S } from "@burdenoff/fe-libs/shared/components";
|
|
@@ -26,19 +26,19 @@ function M() {
|
|
|
26
26
|
requireParams: !0
|
|
27
27
|
});
|
|
28
28
|
let N = y(), { basePath: P = "/" } = a(), { data: F, isLoading: I } = r(M || ""), { mutate: L, isPending: R } = i();
|
|
29
|
-
return I ? /* @__PURE__ */
|
|
29
|
+
return I ? /* @__PURE__ */ g("div", {
|
|
30
30
|
className: "p-6",
|
|
31
31
|
children: t(A, "workspaceSettings.loading", "Loading...")
|
|
32
|
-
}) : F ? /* @__PURE__ */
|
|
32
|
+
}) : F ? /* @__PURE__ */ g(S, {
|
|
33
33
|
permission: n.WORKSPACE_UPDATE,
|
|
34
|
-
fallback: /* @__PURE__ */
|
|
34
|
+
fallback: /* @__PURE__ */ _("div", {
|
|
35
35
|
className: "p-6",
|
|
36
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ _(l, {
|
|
37
37
|
variant: "ghost",
|
|
38
38
|
onClick: () => N(`${P}/${M}`),
|
|
39
39
|
className: "gap-2 mb-6 -ml-2",
|
|
40
|
-
children: [/* @__PURE__ */
|
|
41
|
-
}), /* @__PURE__ */
|
|
40
|
+
children: [/* @__PURE__ */ g(s, { size: 20 }), t(A, "workspaceSettings.backToWorkspace", "Back to Workspace")]
|
|
41
|
+
}), /* @__PURE__ */ g(x, {
|
|
42
42
|
variant: "card",
|
|
43
43
|
title: t(A, "workspaceSettings.permissionRequired", "Permission Required"),
|
|
44
44
|
description: t(A, "workspaceSettings.permissionRequiredDesc", "You don't have permission to edit workspace settings."),
|
|
@@ -49,31 +49,31 @@ function M() {
|
|
|
49
49
|
}
|
|
50
50
|
})]
|
|
51
51
|
}),
|
|
52
|
-
children: /* @__PURE__ */
|
|
52
|
+
children: /* @__PURE__ */ _("div", {
|
|
53
53
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ _("div", { children: [
|
|
56
|
+
/* @__PURE__ */ _(l, {
|
|
57
57
|
variant: "ghost",
|
|
58
58
|
onClick: () => N(`${P}/${M}`),
|
|
59
59
|
className: "gap-2 mb-2 -ml-2",
|
|
60
|
-
children: [/* @__PURE__ */
|
|
60
|
+
children: [/* @__PURE__ */ g(s, { size: 20 }), t(A, "workspaceSettings.backToWorkspace", "Back to Workspace")]
|
|
61
61
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ g("h1", {
|
|
63
63
|
className: "text-2xl sm:text-3xl font-bold",
|
|
64
64
|
children: t(A, "workspaceSettings.title", "Workspace Settings")
|
|
65
65
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ g("p", {
|
|
67
67
|
className: "text-text-secondary",
|
|
68
68
|
children: t(A, "workspaceSettings.subtitle", "Manage workspace configuration")
|
|
69
69
|
})
|
|
70
70
|
] }),
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ g(h, { children: t(A, "workspaceSettings.purpose", "This is where you control how the workspace presents itself and how it's organised — its display name, a contact email, an optional custom domain and website, and the tags used to classify and filter it. Update these to keep the workspace's identity accurate as your team grows.") }),
|
|
72
|
+
/* @__PURE__ */ _(p, {
|
|
73
73
|
treatment: "glass",
|
|
74
74
|
glow: !0,
|
|
75
75
|
className: "border-border-seam",
|
|
76
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ g(d, { children: /* @__PURE__ */ g(f, { children: t(A, "workspaceSettings.generalSettings", "General Settings") }) }), /* @__PURE__ */ g(u, { children: /* @__PURE__ */ g(C, {
|
|
77
77
|
schema: j,
|
|
78
78
|
onSubmit: (e) => {
|
|
79
79
|
M && L({
|
|
@@ -94,62 +94,62 @@ function M() {
|
|
|
94
94
|
domain: F?.domain || "",
|
|
95
95
|
website: F?.website || ""
|
|
96
96
|
} },
|
|
97
|
-
children: (e) => /* @__PURE__ */
|
|
97
|
+
children: (e) => /* @__PURE__ */ _("div", {
|
|
98
98
|
className: "space-y-4",
|
|
99
99
|
children: [
|
|
100
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ g(T, {
|
|
101
101
|
control: e.control,
|
|
102
102
|
name: "name",
|
|
103
|
-
render: ({ field: e }) => /* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */
|
|
103
|
+
render: ({ field: e }) => /* @__PURE__ */ _(E, { children: [
|
|
104
|
+
/* @__PURE__ */ g(D, { children: t(A, "workspaceSettings.workspaceName", "Workspace Name") }),
|
|
105
|
+
/* @__PURE__ */ g(w, { children: /* @__PURE__ */ g(k, { ...e }) }),
|
|
106
|
+
/* @__PURE__ */ g(O, {})
|
|
107
107
|
] })
|
|
108
108
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ g(T, {
|
|
110
110
|
control: e.control,
|
|
111
111
|
name: "contactEmail",
|
|
112
|
-
render: ({ field: e }) => /* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
/* @__PURE__ */
|
|
112
|
+
render: ({ field: e }) => /* @__PURE__ */ _(E, { children: [
|
|
113
|
+
/* @__PURE__ */ g(D, { children: t(A, "workspaceSettings.contactEmail", "Contact Email") }),
|
|
114
|
+
/* @__PURE__ */ g(w, { children: /* @__PURE__ */ g(k, {
|
|
115
115
|
type: "email",
|
|
116
116
|
...e
|
|
117
117
|
}) }),
|
|
118
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ g(O, {})
|
|
119
119
|
] })
|
|
120
120
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ _(m, {
|
|
122
122
|
title: t(A, "workspaceSettings.advancedTitle", "Advanced settings"),
|
|
123
123
|
description: t(A, "workspaceSettings.advancedDescription", "Custom domain + website. Most workspaces leave these blank."),
|
|
124
|
-
children: [/* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ g(T, {
|
|
125
125
|
control: e.control,
|
|
126
126
|
name: "domain",
|
|
127
|
-
render: ({ field: e }) => /* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
127
|
+
render: ({ field: e }) => /* @__PURE__ */ _(E, { children: [
|
|
128
|
+
/* @__PURE__ */ g(D, { children: t(A, "workspaceSettings.domain", "Domain") }),
|
|
129
|
+
/* @__PURE__ */ g(w, { children: /* @__PURE__ */ g(k, { ...e }) }),
|
|
130
|
+
/* @__PURE__ */ g(O, {})
|
|
131
131
|
] })
|
|
132
|
-
}), /* @__PURE__ */
|
|
132
|
+
}), /* @__PURE__ */ g(T, {
|
|
133
133
|
control: e.control,
|
|
134
134
|
name: "website",
|
|
135
|
-
render: ({ field: e }) => /* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
135
|
+
render: ({ field: e }) => /* @__PURE__ */ _(E, { children: [
|
|
136
|
+
/* @__PURE__ */ g(D, { children: t(A, "workspaceSettings.website", "Website") }),
|
|
137
|
+
/* @__PURE__ */ g(w, { children: /* @__PURE__ */ g(k, {
|
|
138
138
|
type: "url",
|
|
139
139
|
...e
|
|
140
140
|
}) }),
|
|
141
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ g(O, {})
|
|
142
142
|
] })
|
|
143
143
|
})]
|
|
144
144
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ _("div", {
|
|
146
146
|
className: "flex gap-2",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ _(l, {
|
|
148
148
|
type: "submit",
|
|
149
149
|
disabled: R,
|
|
150
150
|
className: "gap-2",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
152
|
-
}), /* @__PURE__ */ l
|
|
151
|
+
children: [/* @__PURE__ */ g(c, { size: 20 }), R ? t(A, "workspaceSettings.saving", "Saving...") : t(A, "workspaceSettings.saveChanges", "Save Changes")]
|
|
152
|
+
}), /* @__PURE__ */ g(l, {
|
|
153
153
|
type: "button",
|
|
154
154
|
variant: "outline",
|
|
155
155
|
onClick: () => N(`${P}/${M}`),
|
|
@@ -160,20 +160,20 @@ function M() {
|
|
|
160
160
|
})
|
|
161
161
|
}) })]
|
|
162
162
|
}),
|
|
163
|
-
M && /* @__PURE__ */
|
|
163
|
+
M && /* @__PURE__ */ _(p, {
|
|
164
164
|
treatment: "plain",
|
|
165
165
|
className: "border-border-seam",
|
|
166
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ g(d, { children: /* @__PURE__ */ g(f, { children: t(A, "workspaceSettings.tags", "Tags") }) }), /* @__PURE__ */ _(u, {
|
|
167
167
|
className: "space-y-3",
|
|
168
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ g("p", {
|
|
169
169
|
className: "text-sm text-text-muted",
|
|
170
170
|
children: t(A, "workspaceSettings.tagsDescription", "Use universal tags to classify and filter this workspace.")
|
|
171
|
-
}), /* @__PURE__ */
|
|
171
|
+
}), /* @__PURE__ */ g(e, { workspaceId: M ?? "" }, M)]
|
|
172
172
|
})]
|
|
173
173
|
})
|
|
174
174
|
]
|
|
175
175
|
})
|
|
176
|
-
}) : /* @__PURE__ */
|
|
176
|
+
}) : /* @__PURE__ */ g("div", {
|
|
177
177
|
className: "p-6",
|
|
178
178
|
children: t(A, "workspaceSettings.notFound", "Workspace not found")
|
|
179
179
|
});
|
|
@@ -9,8 +9,8 @@ import { useScopedNavigation as s } from "../hooks/useScopedNavigation.js";
|
|
|
9
9
|
import { useWorkspacesPageView as c } from "../hooks/useWorkspacesPageView.js";
|
|
10
10
|
import { useEffect as l, useState as u } from "react";
|
|
11
11
|
import { Grid3X3 as d, List as f, Mail as p, MoreHorizontal as m, Plus as h, Search as g, UserPlus as _ } from "lucide-react";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { AuroraBackground as v, Badge as y, Button as b, DropdownMenu as x, DropdownMenuContent as S, DropdownMenuItem as C, DropdownMenuTrigger as w, GradientText as T, IllustratedEmptyState as E, Input as ee, PagePurpose as te, Skeleton as D } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
14
14
|
import { useI18n as j } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
15
15
|
import { useNavigate as M } from "react-router";
|
|
16
16
|
import { useDebounce as N } from "@burdenoff/fe-libs/shared/hooks";
|
|
@@ -37,107 +37,107 @@ function F() {
|
|
|
37
37
|
items: J ? Y.items.filter((e) => e.name.toLowerCase().includes(J.toLowerCase())) : Y.items,
|
|
38
38
|
total: J ? Y.items.filter((e) => e.name.toLowerCase().includes(J.toLowerCase())).length : Y.total
|
|
39
39
|
} : void 0;
|
|
40
|
-
return Z ? /* @__PURE__ */
|
|
40
|
+
return Z ? /* @__PURE__ */ k("div", {
|
|
41
41
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
|
|
42
|
-
children: /* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ A("div", {
|
|
43
43
|
className: "flex flex-col items-center justify-center py-12",
|
|
44
|
-
children: [/* @__PURE__ */
|
|
44
|
+
children: [/* @__PURE__ */ k("p", {
|
|
45
45
|
className: "text-status-error-text text-lg font-semibold",
|
|
46
46
|
children: o(F, "workspacesList.loadError", "Error loading workspaces")
|
|
47
|
-
}), /* @__PURE__ */
|
|
47
|
+
}), /* @__PURE__ */ k("p", {
|
|
48
48
|
className: "text-text-secondary text-sm mt-2",
|
|
49
49
|
children: Z instanceof Error ? Z.message : o(F, "workspacesList.unknownError", "Unknown error")
|
|
50
50
|
})]
|
|
51
51
|
})
|
|
52
|
-
}) : /* @__PURE__ */
|
|
52
|
+
}) : /* @__PURE__ */ A("div", {
|
|
53
53
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ A("div", {
|
|
56
56
|
className: "relative overflow-hidden rounded-card flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 px-3 py-3 sm:px-4 sm:py-4",
|
|
57
57
|
"data-tour": "workspaces-list-header",
|
|
58
58
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ k(v, { intensity: "subtle" }),
|
|
60
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("h1", {
|
|
61
61
|
className: "text-2xl sm:text-3xl font-bold",
|
|
62
|
-
children: /* @__PURE__ */
|
|
63
|
-
}), /* @__PURE__ */
|
|
62
|
+
children: /* @__PURE__ */ k(T, { children: o(F, "workspacesList.title", "Workspaces") })
|
|
63
|
+
}), /* @__PURE__ */ k("p", {
|
|
64
64
|
className: "text-sm sm:text-base text-text-secondary",
|
|
65
65
|
children: o(F, "workspacesList.description", "Manage and organize your workspaces")
|
|
66
66
|
})] }),
|
|
67
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ A("div", {
|
|
68
68
|
className: "flex items-center gap-2",
|
|
69
69
|
"data-tour": "workspaces-list-actions",
|
|
70
70
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ k(b, {
|
|
72
72
|
variant: V === "grid" ? "default" : "outline",
|
|
73
73
|
size: "icon",
|
|
74
74
|
onClick: () => H("grid"),
|
|
75
75
|
className: "hidden sm:flex",
|
|
76
76
|
"aria-label": o(F, "workspacesList.gridViewAriaLabel", "Show workspaces in grid view"),
|
|
77
77
|
title: o(F, "workspacesList.gridViewTitle", "Grid view"),
|
|
78
|
-
children: /* @__PURE__ */
|
|
78
|
+
children: /* @__PURE__ */ k(d, { size: 20 })
|
|
79
79
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ k(b, {
|
|
81
81
|
variant: V === "list" ? "default" : "outline",
|
|
82
82
|
size: "icon",
|
|
83
83
|
onClick: () => H("list"),
|
|
84
84
|
className: "hidden sm:flex",
|
|
85
85
|
"aria-label": o(F, "workspacesList.listViewAriaLabel", "Show workspaces in list view"),
|
|
86
86
|
title: o(F, "workspacesList.listViewTitle", "List view"),
|
|
87
|
-
children: /* @__PURE__ */
|
|
87
|
+
children: /* @__PURE__ */ k(f, { size: 20 })
|
|
88
88
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ A(x, { children: [/* @__PURE__ */ k(w, {
|
|
90
90
|
asChild: !0,
|
|
91
|
-
children: /* @__PURE__ */ b
|
|
91
|
+
children: /* @__PURE__ */ A(b, {
|
|
92
92
|
variant: "outline",
|
|
93
93
|
size: "icon",
|
|
94
94
|
"aria-label": "More actions",
|
|
95
95
|
className: "relative",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ k(m, { size: 18 }), Q > 0 ? /* @__PURE__ */ k("span", { className: "absolute -top-1 -right-1 flex size-2 rounded-full bg-action-primary-bg" }) : null]
|
|
97
97
|
})
|
|
98
|
-
}), /* @__PURE__ */
|
|
98
|
+
}), /* @__PURE__ */ A(S, {
|
|
99
99
|
align: "end",
|
|
100
|
-
children: [/* @__PURE__ */
|
|
100
|
+
children: [/* @__PURE__ */ k(P, {
|
|
101
101
|
permission: a.MEMBER_CREATE,
|
|
102
102
|
deniedBehavior: "disable",
|
|
103
103
|
deniedTooltip: o(F, "workspacesList.inviteDeniedTooltip", "You don't have permission to invite members into the current workspace"),
|
|
104
|
-
children: /* @__PURE__ */
|
|
104
|
+
children: /* @__PURE__ */ A(C, {
|
|
105
105
|
onSelect: ie,
|
|
106
106
|
disabled: !z,
|
|
107
107
|
className: "gap-2",
|
|
108
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ k(_, { size: 16 }), o(F, "workspacesList.inviteMemberButton", "Invite Member")]
|
|
109
109
|
})
|
|
110
|
-
}), /* @__PURE__ */
|
|
110
|
+
}), /* @__PURE__ */ A(C, {
|
|
111
111
|
onSelect: re,
|
|
112
112
|
className: "gap-2",
|
|
113
113
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ k(p, { size: 16 }),
|
|
115
|
+
/* @__PURE__ */ k("span", {
|
|
116
116
|
className: "flex-1",
|
|
117
117
|
children: o(F, "workspacesList.pendingInvitesButton", "Pending Invites")
|
|
118
118
|
}),
|
|
119
|
-
Q > 0 ? /* @__PURE__ */ y
|
|
119
|
+
Q > 0 ? /* @__PURE__ */ k(y, {
|
|
120
120
|
variant: "secondary",
|
|
121
121
|
children: Q
|
|
122
122
|
}) : null
|
|
123
123
|
]
|
|
124
124
|
})]
|
|
125
125
|
})] }),
|
|
126
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ k(P, {
|
|
127
127
|
permission: a.WORKSPACE_CREATE,
|
|
128
128
|
deniedBehavior: "disable",
|
|
129
129
|
deniedTooltip: o(F, "workspacesList.createDeniedTooltip", "You don't have permission to create workspaces"),
|
|
130
|
-
children: /* @__PURE__ */ b
|
|
130
|
+
children: /* @__PURE__ */ A(b, {
|
|
131
131
|
onClick: G,
|
|
132
132
|
className: "gap-2",
|
|
133
133
|
"data-tour": "workspaces-create-button",
|
|
134
134
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ k(h, { size: 20 }),
|
|
136
|
+
/* @__PURE__ */ k("span", {
|
|
137
137
|
className: "hidden sm:inline",
|
|
138
138
|
children: o(F, "workspacesList.createButton", "Create Workspace")
|
|
139
139
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ k("span", {
|
|
141
141
|
className: "sm:hidden",
|
|
142
142
|
children: o(F, "workspacesList.createButtonShort", "Create")
|
|
143
143
|
})
|
|
@@ -148,14 +148,14 @@ function F() {
|
|
|
148
148
|
})
|
|
149
149
|
]
|
|
150
150
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ k(te, { children: o(F, "workspacesList.purpose", "Workspaces are shared homes for a team or initiative — each one groups its own projects, members, agents and activity. Create one per team, client or product line to keep work isolated, then switch between them from the sidebar.") }),
|
|
152
|
+
/* @__PURE__ */ A("div", {
|
|
153
153
|
className: "relative",
|
|
154
154
|
"data-tour": "workspaces-search-input",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ k(g, {
|
|
156
156
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",
|
|
157
157
|
size: 20
|
|
158
|
-
}), /* @__PURE__ */
|
|
158
|
+
}), /* @__PURE__ */ k(ee, {
|
|
159
159
|
placeholder: o(F, "workspacesList.searchPlaceholder", "Search workspaces..."),
|
|
160
160
|
value: K,
|
|
161
161
|
onChange: (e) => {
|
|
@@ -164,44 +164,44 @@ function F() {
|
|
|
164
164
|
className: "pl-[3.25rem]"
|
|
165
165
|
})]
|
|
166
166
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ k("div", {
|
|
168
168
|
className: "space-y-4 sm:space-y-6",
|
|
169
169
|
"data-tour": "workspaces-view-container",
|
|
170
|
-
children: X ? /* @__PURE__ */
|
|
170
|
+
children: X ? /* @__PURE__ */ k("div", {
|
|
171
171
|
className: "grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",
|
|
172
|
-
children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */
|
|
172
|
+
children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ A("div", {
|
|
173
173
|
className: "space-y-3 p-6 border border-border-seam rounded-lg",
|
|
174
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ A("div", {
|
|
175
175
|
className: "flex items-center gap-3",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ k(D, { className: "size-12 rounded-lg" }), /* @__PURE__ */ A("div", {
|
|
177
177
|
className: "space-y-2 flex-1",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
178
|
+
children: [/* @__PURE__ */ k(D, { className: "h-4 w-3/4" }), /* @__PURE__ */ k(D, { className: "h-3 w-1/2" })]
|
|
179
179
|
})]
|
|
180
|
-
}), /* @__PURE__ */
|
|
180
|
+
}), /* @__PURE__ */ k(D, { className: "h-3 w-1/3" })]
|
|
181
181
|
}, t))
|
|
182
|
-
}) : $?.items.length === 0 ? /* @__PURE__ */
|
|
182
|
+
}) : $?.items.length === 0 ? /* @__PURE__ */ k(E, {
|
|
183
183
|
illustration: U.search ? "empty-search" : "onboarding",
|
|
184
184
|
title: o(F, "workspacesList.emptyTitle", "No workspaces found"),
|
|
185
185
|
description: U.search ? o(F, "workspacesList.emptySearchHint", "Try adjusting your search criteria") : o(F, "workspacesList.emptyCreateHint", "Get started by creating your first workspace"),
|
|
186
|
-
action: U.search ? void 0 : /* @__PURE__ */
|
|
186
|
+
action: U.search ? void 0 : /* @__PURE__ */ k(P, {
|
|
187
187
|
permission: a.WORKSPACE_CREATE,
|
|
188
188
|
deniedBehavior: "disable",
|
|
189
189
|
deniedTooltip: o(F, "workspacesList.createDeniedTooltip", "You don't have permission to create workspaces"),
|
|
190
|
-
children: /* @__PURE__ */ b
|
|
190
|
+
children: /* @__PURE__ */ A(b, {
|
|
191
191
|
onClick: G,
|
|
192
192
|
className: "gap-2",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
193
|
+
children: [/* @__PURE__ */ k(h, { size: 20 }), o(F, "workspacesList.createFirstButton", "Create Your First Workspace")]
|
|
194
194
|
})
|
|
195
195
|
})
|
|
196
|
-
}) : /* @__PURE__ */
|
|
196
|
+
}) : /* @__PURE__ */ A(O, { children: [V === "list" ? /* @__PURE__ */ k("div", {
|
|
197
197
|
className: "space-y-3",
|
|
198
|
-
children: $?.items.map((e) => /* @__PURE__ */
|
|
199
|
-
}) : /* @__PURE__ */
|
|
198
|
+
children: $?.items.map((e) => /* @__PURE__ */ k(r, { workspace: e }, e.id))
|
|
199
|
+
}) : /* @__PURE__ */ k("div", {
|
|
200
200
|
className: "grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",
|
|
201
|
-
children: $?.items.map((e) => /* @__PURE__ */
|
|
202
|
-
}), $ && $.total > 0 && /* @__PURE__ */
|
|
201
|
+
children: $?.items.map((e) => /* @__PURE__ */ k(r, { workspace: e }, e.id))
|
|
202
|
+
}), $ && $.total > 0 && /* @__PURE__ */ A("div", {
|
|
203
203
|
className: "flex items-center justify-between text-sm text-text-secondary",
|
|
204
|
-
children: [/* @__PURE__ */
|
|
204
|
+
children: [/* @__PURE__ */ A("p", { children: [
|
|
205
205
|
o(F, "workspacesList.showing", "Showing"),
|
|
206
206
|
" ",
|
|
207
207
|
$.items.length,
|
|
@@ -211,7 +211,7 @@ function F() {
|
|
|
211
211
|
$.total,
|
|
212
212
|
" ",
|
|
213
213
|
$.total === 1 ? o(F, "workspacesList.workspace", "workspace") : o(F, "workspacesList.workspaces", "workspaces")
|
|
214
|
-
] }), $.hasMore && /* @__PURE__ */
|
|
214
|
+
] }), $.hasMore && /* @__PURE__ */ k("p", {
|
|
215
215
|
className: "text-xs",
|
|
216
216
|
children: o(F, "workspacesList.moreAvailable", "More workspaces available - pagination coming soon")
|
|
217
217
|
})]
|
|
@@ -4,8 +4,8 @@ import { nativeImpact as o } from "../../utils/nativeBridge.js";
|
|
|
4
4
|
import { dropPositionFromPointer as s, reorderByDropIndex as c } from "./reorder.js";
|
|
5
5
|
import { useCallback as l, useRef as u, useState as d } from "react";
|
|
6
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 {
|
|
8
|
-
import {
|
|
7
|
+
import { Badge as g, Button as _, Separator as v, Sheet as y, SheetContent as b, SheetDescription as x, SheetFooter as S, SheetHeader as ne, SheetTitle as C, Switch as w } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
9
9
|
import { useI18n as D } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
10
|
// src/pages/dashboard/DashboardCustomizer.tsx
|
|
11
11
|
function O({ open: O, onOpenChange: k, widgets: A, onSave: j, isSaving: M, productId: N = "workspaces" }) {
|
|
@@ -77,19 +77,19 @@ function O({ open: O, onOpenChange: k, widgets: A, onSave: j, isSaving: M, produ
|
|
|
77
77
|
j,
|
|
78
78
|
k
|
|
79
79
|
]), $ = [...I].sort((e, t) => e.order - t.order);
|
|
80
|
-
return /* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ T(y, {
|
|
81
81
|
open: O,
|
|
82
82
|
onOpenChange: k,
|
|
83
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ E(b, {
|
|
84
84
|
className: "w-full sm:max-w-md overflow-y-auto",
|
|
85
85
|
side: "right",
|
|
86
86
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ E(ne, { children: [/* @__PURE__ */ T(C, { children: e(P, "dashboardCustomizer.title", "Customize Dashboard") }), /* @__PURE__ */ T(x, { children: e(P, "dashboardCustomizer.description", "Toggle widgets on or off and reorder them to personalize your dashboard.") })] }),
|
|
88
|
+
/* @__PURE__ */ E("div", {
|
|
89
89
|
role: "listbox",
|
|
90
90
|
"aria-label": e(P, "dashboardCustomizer.listLabel", "Dashboard widgets"),
|
|
91
91
|
className: "py-4 space-y-1",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ T("div", {
|
|
93
93
|
"aria-live": "assertive",
|
|
94
94
|
className: "sr-only",
|
|
95
95
|
children: W
|
|
@@ -97,7 +97,7 @@ function O({ open: O, onOpenChange: k, widgets: A, onSave: j, isSaving: M, produ
|
|
|
97
97
|
let s = r[t.widgetId];
|
|
98
98
|
if (!s || !i(s, N)) return null;
|
|
99
99
|
let c = B === t.widgetId, l = H === t.widgetId && B !== null, u = a(F, s).title;
|
|
100
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ E("div", {
|
|
101
101
|
ref: ae(t.widgetId),
|
|
102
102
|
role: "option",
|
|
103
103
|
"aria-roledescription": e(P, "dashboardCustomizer.sortableItem", "sortable item"),
|
|
@@ -109,56 +109,56 @@ function O({ open: O, onOpenChange: k, widgets: A, onSave: j, isSaving: M, produ
|
|
|
109
109
|
"data-widget-id": t.widgetId,
|
|
110
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" : ""}`,
|
|
111
111
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ T("span", {
|
|
113
113
|
draggable: !0,
|
|
114
114
|
onDragStart: (e) => oe(t.widgetId, e),
|
|
115
115
|
onDragEnd: le,
|
|
116
116
|
"aria-label": e(P, "dashboardCustomizer.dragHandle", `Drag handle for ${u}`),
|
|
117
117
|
className: "cursor-grab active:cursor-grabbing touch-none select-none",
|
|
118
|
-
children: /* @__PURE__ */
|
|
118
|
+
children: /* @__PURE__ */ T(m, {
|
|
119
119
|
"aria-hidden": !0,
|
|
120
120
|
className: "size-4 text-text-secondary shrink-0"
|
|
121
121
|
})
|
|
122
122
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ E("div", {
|
|
124
124
|
className: "flex-1 min-w-0",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
125
|
+
children: [/* @__PURE__ */ E("div", {
|
|
126
126
|
className: "flex items-center gap-2",
|
|
127
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ T("span", {
|
|
128
128
|
className: "text-sm font-medium text-text-primary",
|
|
129
129
|
children: u
|
|
130
|
-
}), /* @__PURE__ */ g
|
|
130
|
+
}), /* @__PURE__ */ T(g, {
|
|
131
131
|
variant: "outline",
|
|
132
132
|
className: "text-[10px]",
|
|
133
133
|
children: s.defaultSize
|
|
134
134
|
})]
|
|
135
|
-
}), /* @__PURE__ */
|
|
135
|
+
}), /* @__PURE__ */ T("p", {
|
|
136
136
|
className: "text-xs text-text-secondary truncate",
|
|
137
137
|
children: a(F, s).description
|
|
138
138
|
})]
|
|
139
139
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ E("div", {
|
|
141
141
|
className: "flex items-center gap-1 shrink-0",
|
|
142
142
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ T(_, {
|
|
144
144
|
variant: "ghost",
|
|
145
145
|
size: "sm",
|
|
146
146
|
className: "size-7 p-0",
|
|
147
147
|
disabled: n === 0,
|
|
148
148
|
onClick: () => Z(t.widgetId, "up"),
|
|
149
149
|
"aria-label": e(P, "dashboardCustomizer.moveUp", `Move ${u} up`),
|
|
150
|
-
children: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ T(p, { className: "size-3" })
|
|
151
151
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ T(_, {
|
|
153
153
|
variant: "ghost",
|
|
154
154
|
size: "sm",
|
|
155
155
|
className: "size-7 p-0",
|
|
156
156
|
disabled: n === $.length - 1,
|
|
157
157
|
onClick: () => Z(t.widgetId, "down"),
|
|
158
158
|
"aria-label": e(P, "dashboardCustomizer.moveDown", `Move ${u} down`),
|
|
159
|
-
children: /* @__PURE__ */
|
|
159
|
+
children: /* @__PURE__ */ T(f, { className: "size-3" })
|
|
160
160
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ T(w, {
|
|
162
162
|
checked: t.enabled,
|
|
163
163
|
onCheckedChange: () => {
|
|
164
164
|
o("medium"), re(t.widgetId);
|
|
@@ -172,21 +172,21 @@ function O({ open: O, onOpenChange: k, widgets: A, onSave: j, isSaving: M, produ
|
|
|
172
172
|
}, t.widgetId);
|
|
173
173
|
})]
|
|
174
174
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ T(v, {}),
|
|
176
|
+
/* @__PURE__ */ E(S, {
|
|
177
177
|
className: "flex-row gap-2 pt-4",
|
|
178
|
-
children: [/* @__PURE__ */ _
|
|
178
|
+
children: [/* @__PURE__ */ E(_, {
|
|
179
179
|
variant: "outline",
|
|
180
180
|
size: "sm",
|
|
181
181
|
onClick: ie,
|
|
182
182
|
className: "flex-1",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
184
|
-
}), /* @__PURE__ */ _
|
|
183
|
+
children: [/* @__PURE__ */ T(te, { className: "size-3 mr-1.5" }), e(P, "dashboardCustomizer.resetToDefaults", "Reset to defaults")]
|
|
184
|
+
}), /* @__PURE__ */ E(_, {
|
|
185
185
|
size: "sm",
|
|
186
186
|
onClick: ue,
|
|
187
187
|
disabled: !R || M,
|
|
188
188
|
className: "flex-1",
|
|
189
|
-
children: [M ? /* @__PURE__ */
|
|
189
|
+
children: [M ? /* @__PURE__ */ T(ee, { className: "size-3 mr-1.5 animate-spin" }) : /* @__PURE__ */ T(h, { className: "size-3 mr-1.5" }), e(P, "dashboardCustomizer.saveLayout", "Save layout")]
|
|
190
190
|
})]
|
|
191
191
|
})
|
|
192
192
|
]
|