@burdenoff/microfe-workspaces 2026.1113.1 → 2026.1114.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 +31 -25
- package/dist/WorkspacesRoutes.js +56 -55
- 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/PendingInvitesRoute.d.ts +7 -0
- package/dist/components/PendingInvitesRoute.js +15 -0
- 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/constants/navigationV2.d.ts +12 -0
- package/dist/constants/navigationV2.js +3 -0
- package/dist/hooks/useNavigationV2.d.ts +6 -0
- package/dist/hooks/useNavigationV2.js +6 -0
- 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 +210 -200
- 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 +606 -503
- 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/dist/utils/invitationPayload.d.ts +18 -0
- package/dist/utils/invitationPayload.js +13 -0
- package/package.json +2 -2
|
@@ -2,192 +2,192 @@ import { formatDate as e } from "../utils/formatters.js";
|
|
|
2
2
|
import { getProjectDisplayTags as t } from "../utils/projectTags.js";
|
|
3
3
|
import { getProjectStatusClasses as n } from "../utils/tokenHelpers.js";
|
|
4
4
|
import { useArchiveProject as r, useDeleteProject as i, useUnarchiveProject as a } from "../hooks/useProjectMutations.js";
|
|
5
|
-
import {
|
|
5
|
+
import { useIsFluidGridsVariant as o, useWorkspacesContext as ee } from "../providers/WorkspacesProvider.js";
|
|
6
6
|
import { useScopedNavigation as s } from "../hooks/useScopedNavigation.js";
|
|
7
7
|
import { nativeConfirm as c, nativeImpact as l } from "../utils/nativeBridge.js";
|
|
8
8
|
import { RenameProjectDialog as u } from "./RenameProjectDialog.js";
|
|
9
9
|
import { useTr as d } from "../hooks/useTr.js";
|
|
10
10
|
import { useState as f } from "react";
|
|
11
11
|
import { Archive as p, Fingerprint as m, FolderKanban as h, MoreVertical as g, Pencil as _ } from "lucide-react";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { useNavigate as
|
|
15
|
-
import { TagBadge as
|
|
12
|
+
import { Badge as v, Button as te, CardContent as y, CardHeader as b, CardTitle as x, DropdownMenu as S, DropdownMenuContent as C, DropdownMenuItem as w, DropdownMenuTrigger as T, EntityIdModal as E, GlassCard as D, useEntityIdModal as O } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
14
|
+
import { useNavigate as M } from "react-router";
|
|
15
|
+
import { TagBadge as N } from "@burdenoff/fe-libs/tag";
|
|
16
16
|
// src/components/ProjectCard.tsx
|
|
17
|
-
function
|
|
18
|
-
let
|
|
19
|
-
|
|
17
|
+
function P({ project: P, selected: F = !1, onToggleSelect: I, onTagClick: L, canArchive: R = !1, canDelete: z = !1, canRename: B = !1 }) {
|
|
18
|
+
let V = M(), { basePath: H = "/workspaces" } = ee(), { withCurrentSearch: U } = s(), { mutate: W } = r(P.workspaceId), { mutate: G } = a(P.workspaceId), { mutate: K } = i(P.workspaceId), q = O(), [J, Y] = f(!1), X = t(P), Z = d(), Q = o(), $ = () => {
|
|
19
|
+
V(U(`${H}/${P.workspaceId}/projects/${P.id}`));
|
|
20
20
|
};
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ j(k, { children: [
|
|
22
|
+
/* @__PURE__ */ j(D, {
|
|
23
23
|
treatment: "insight",
|
|
24
|
-
className: `cursor-pointer relative focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg/50 ${
|
|
24
|
+
className: `cursor-pointer relative focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg/50 ${F ? "ring-2 ring-primary/25 border-primary/50" : ""}`,
|
|
25
25
|
onClick: $,
|
|
26
26
|
onKeyDown: (e) => {
|
|
27
27
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), $());
|
|
28
28
|
},
|
|
29
29
|
role: "button",
|
|
30
30
|
tabIndex: 0,
|
|
31
|
-
"aria-label":
|
|
32
|
-
children: [/* @__PURE__ */
|
|
31
|
+
"aria-label": Z("projectCard.openProjectAriaLabel", "Open project {{name}}", { name: P.name }),
|
|
32
|
+
children: [/* @__PURE__ */ A(b, { children: /* @__PURE__ */ j("div", {
|
|
33
33
|
className: "flex items-start justify-between",
|
|
34
|
-
children: [/* @__PURE__ */
|
|
34
|
+
children: [/* @__PURE__ */ j("div", {
|
|
35
35
|
className: "flex items-center gap-3 flex-1",
|
|
36
36
|
children: [
|
|
37
|
-
|
|
37
|
+
I && /* @__PURE__ */ A("input", {
|
|
38
38
|
type: "checkbox",
|
|
39
|
-
checked:
|
|
40
|
-
onChange: (e) =>
|
|
39
|
+
checked: F,
|
|
40
|
+
onChange: (e) => I(e.target.checked),
|
|
41
41
|
onClick: (e) => e.stopPropagation(),
|
|
42
|
-
"aria-label":
|
|
42
|
+
"aria-label": Z("projectCard.selectProjectAriaLabel", "Select project {{name}}", { name: P.name }),
|
|
43
43
|
className: "mt-1 size-4 rounded border-border-subtle text-primary"
|
|
44
44
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ A("div", {
|
|
46
46
|
className: "p-3 rounded-lg bg-action-primary-bg/10 transition-colors",
|
|
47
|
-
children: /* @__PURE__ */
|
|
47
|
+
children: /* @__PURE__ */ A(h, {
|
|
48
48
|
className: "text-primary",
|
|
49
49
|
size: 24
|
|
50
50
|
})
|
|
51
51
|
}),
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ j("div", {
|
|
53
53
|
className: "flex-1 min-w-0",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
54
|
+
children: [/* @__PURE__ */ A(x, {
|
|
55
55
|
className: "truncate",
|
|
56
|
-
children:
|
|
57
|
-
}), /* @__PURE__ */
|
|
56
|
+
children: P.name
|
|
57
|
+
}), Q ? null : /* @__PURE__ */ A("p", {
|
|
58
58
|
className: "truncate text-sm text-text-secondary",
|
|
59
|
-
children:
|
|
59
|
+
children: P.key
|
|
60
60
|
})]
|
|
61
61
|
})
|
|
62
62
|
]
|
|
63
|
-
}), /* @__PURE__ */
|
|
63
|
+
}), /* @__PURE__ */ j(S, { children: [/* @__PURE__ */ A(T, {
|
|
64
64
|
asChild: !0,
|
|
65
65
|
onClick: (e) => e.stopPropagation(),
|
|
66
|
-
children: /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ j(te, {
|
|
67
67
|
variant: "ghost",
|
|
68
68
|
size: "sm",
|
|
69
69
|
className: "size-8 p-0",
|
|
70
|
-
children: [/* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */ A(g, { size: 16 }), /* @__PURE__ */ A("span", {
|
|
71
71
|
className: "sr-only",
|
|
72
|
-
children:
|
|
72
|
+
children: Z("projectCard.openActions", "Open project actions")
|
|
73
73
|
})]
|
|
74
74
|
})
|
|
75
|
-
}), /* @__PURE__ */
|
|
75
|
+
}), /* @__PURE__ */ j(C, {
|
|
76
76
|
align: "end",
|
|
77
77
|
children: [
|
|
78
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ j(w, {
|
|
79
79
|
onClick: (e) => {
|
|
80
|
-
e.stopPropagation(),
|
|
81
|
-
id:
|
|
82
|
-
name:
|
|
80
|
+
e.stopPropagation(), q.show({
|
|
81
|
+
id: P.id,
|
|
82
|
+
name: P.name,
|
|
83
83
|
type: "Project",
|
|
84
84
|
details: [{
|
|
85
|
-
label:
|
|
86
|
-
value:
|
|
85
|
+
label: Z("projectCard.keyLabel", "Key"),
|
|
86
|
+
value: P.key
|
|
87
87
|
}, {
|
|
88
|
-
label:
|
|
89
|
-
value:
|
|
88
|
+
label: Z("projectCard.workspaceIdLabel", "Workspace ID"),
|
|
89
|
+
value: P.workspaceId
|
|
90
90
|
}]
|
|
91
91
|
});
|
|
92
92
|
},
|
|
93
|
-
children: [/* @__PURE__ */
|
|
93
|
+
children: [/* @__PURE__ */ A(m, {
|
|
94
94
|
size: 16,
|
|
95
95
|
className: "mr-2"
|
|
96
|
-
}),
|
|
96
|
+
}), Z("projectCard.getId", "Get ID")]
|
|
97
97
|
}),
|
|
98
|
-
|
|
98
|
+
B && /* @__PURE__ */ j(w, {
|
|
99
99
|
onClick: (e) => {
|
|
100
|
-
e.stopPropagation(),
|
|
100
|
+
e.stopPropagation(), Y(!0);
|
|
101
101
|
},
|
|
102
|
-
children: [/* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ A(_, {
|
|
103
103
|
size: 16,
|
|
104
104
|
className: "mr-2"
|
|
105
|
-
}),
|
|
105
|
+
}), Z("projectCard.rename", "Rename")]
|
|
106
106
|
}),
|
|
107
|
-
|
|
107
|
+
R && /* @__PURE__ */ j(w, {
|
|
108
108
|
onClick: (e) => {
|
|
109
|
-
e.stopPropagation(),
|
|
109
|
+
e.stopPropagation(), P.archived ? G(P.id) : W(P.id);
|
|
110
110
|
},
|
|
111
|
-
children: [/* @__PURE__ */
|
|
111
|
+
children: [/* @__PURE__ */ A(p, {
|
|
112
112
|
size: 16,
|
|
113
113
|
className: "mr-2"
|
|
114
|
-
}),
|
|
114
|
+
}), P.archived ? Z("projectCard.unarchive", "Unarchive") : Z("projectCard.archive", "Archive")]
|
|
115
115
|
}),
|
|
116
|
-
|
|
116
|
+
z && /* @__PURE__ */ A(w, {
|
|
117
117
|
onClick: async (e) => {
|
|
118
118
|
e.stopPropagation(), l("medium");
|
|
119
|
-
let t = await c({
|
|
120
|
-
title:
|
|
121
|
-
message:
|
|
122
|
-
okButtonTitle:
|
|
123
|
-
cancelButtonTitle:
|
|
119
|
+
let t = Q ? Z("projectCard.deleteMessageNamed", "Delete \"{{name}}\"? All of its data is removed for good. This cannot be undone.", { name: P.name }) : Z("projectCard.deleteMessage", "Are you sure you want to delete \"{{name}}\"?", { name: P.name }), n = await c({
|
|
120
|
+
title: Z("projectCard.deleteTitle", "Delete project"),
|
|
121
|
+
message: t,
|
|
122
|
+
okButtonTitle: Z("common.delete", "Delete"),
|
|
123
|
+
cancelButtonTitle: Z("common.cancel", "Cancel")
|
|
124
124
|
});
|
|
125
|
-
(
|
|
125
|
+
(n === null ? confirm(t) : n) && K(P.id);
|
|
126
126
|
},
|
|
127
127
|
className: "text-status-error-text",
|
|
128
|
-
children:
|
|
128
|
+
children: Z("projectCard.delete", "Delete")
|
|
129
129
|
})
|
|
130
130
|
]
|
|
131
131
|
})] })]
|
|
132
|
-
}) }), /* @__PURE__ */
|
|
132
|
+
}) }), /* @__PURE__ */ j(y, {
|
|
133
133
|
className: "space-y-3",
|
|
134
134
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ j("div", {
|
|
136
136
|
className: "flex items-center gap-2",
|
|
137
|
-
children: [/* @__PURE__ */
|
|
138
|
-
className: `border ${n(
|
|
139
|
-
children:
|
|
140
|
-
}),
|
|
137
|
+
children: [/* @__PURE__ */ A(v, {
|
|
138
|
+
className: `border ${n(P.status)}`,
|
|
139
|
+
children: P.status
|
|
140
|
+
}), P.archived && /* @__PURE__ */ j(v, {
|
|
141
141
|
variant: "outline",
|
|
142
142
|
className: "border-workspace-archived-border text-workspace-archived-text",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ A(p, {
|
|
144
144
|
size: 12,
|
|
145
145
|
className: "mr-1"
|
|
146
|
-
}),
|
|
146
|
+
}), Z("projectCard.archivedLabel", "Archived")]
|
|
147
147
|
})]
|
|
148
148
|
}),
|
|
149
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ A("div", {
|
|
150
150
|
className: "text-xs text-text-secondary",
|
|
151
|
-
children:
|
|
151
|
+
children: Z("projectCard.created", "Created {{date}}", { date: e(P.createdAt) })
|
|
152
152
|
}),
|
|
153
|
-
|
|
153
|
+
X.length > 0 && /* @__PURE__ */ j("div", {
|
|
154
154
|
className: "flex flex-wrap gap-1.5",
|
|
155
|
-
"aria-label":
|
|
156
|
-
children: [
|
|
157
|
-
...
|
|
155
|
+
"aria-label": Z("projectCard.projectTagsAriaLabel", "Project tags"),
|
|
156
|
+
children: [X.slice(0, 4).map((e) => /* @__PURE__ */ A("span", {
|
|
157
|
+
...L ? {
|
|
158
158
|
role: "button",
|
|
159
159
|
tabIndex: 0,
|
|
160
160
|
onClick: (t) => {
|
|
161
|
-
t.stopPropagation(),
|
|
161
|
+
t.stopPropagation(), L(e);
|
|
162
162
|
},
|
|
163
163
|
onKeyDown: (t) => {
|
|
164
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(),
|
|
164
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), L(e));
|
|
165
165
|
}
|
|
166
166
|
} : {},
|
|
167
|
-
children: /* @__PURE__ */
|
|
167
|
+
children: /* @__PURE__ */ A(N, {
|
|
168
168
|
id: e.tagId,
|
|
169
169
|
label: e.label,
|
|
170
170
|
color: e.color ?? void 0,
|
|
171
171
|
icon: e.icon ?? void 0,
|
|
172
172
|
description: e.description ?? void 0,
|
|
173
173
|
size: "sm",
|
|
174
|
-
className:
|
|
174
|
+
className: L ? "cursor-pointer" : void 0
|
|
175
175
|
})
|
|
176
|
-
}, e.tagId)),
|
|
176
|
+
}, e.tagId)), X.length > 4 && /* @__PURE__ */ j(v, {
|
|
177
177
|
variant: "outline",
|
|
178
178
|
className: "text-xs",
|
|
179
|
-
children: ["+",
|
|
179
|
+
children: ["+", X.length - 4]
|
|
180
180
|
})]
|
|
181
181
|
})
|
|
182
182
|
]
|
|
183
183
|
})]
|
|
184
184
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
|
|
187
|
-
project:
|
|
188
|
-
open:
|
|
189
|
-
onOpenChange:
|
|
185
|
+
/* @__PURE__ */ A(E, { control: q }),
|
|
186
|
+
J && /* @__PURE__ */ A(u, {
|
|
187
|
+
project: P,
|
|
188
|
+
open: J,
|
|
189
|
+
onOpenChange: Y
|
|
190
190
|
})
|
|
191
191
|
] });
|
|
192
192
|
}
|
|
193
|
-
export {
|
|
193
|
+
export { P as ProjectCard };
|
|
@@ -4,10 +4,10 @@ import { useInfiniteWorkspaceMembers as n } from "../hooks/useWorkspaceMembers.j
|
|
|
4
4
|
import { useWorkspacesContext as r } from "../providers/WorkspacesProvider.js";
|
|
5
5
|
import { useTr as i } from "../hooks/useTr.js";
|
|
6
6
|
import { nativeImpact as a, nativeNotify as o } from "../utils/nativeBridge.js";
|
|
7
|
-
import { useEffect as
|
|
8
|
-
import { AlertCircle as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { useEffect as ee, useMemo as s, useState as c } from "react";
|
|
8
|
+
import { AlertCircle as l, Search as te, UserPlus as u } from "lucide-react";
|
|
9
|
+
import { Badge as d, Button as f, Input as p, ResponsiveDialog as m, ResponsiveDialogContent as h, ResponsiveDialogDescription as ne, ResponsiveDialogHeader as re, ResponsiveDialogTitle as ie, Skeleton as g } from "@burdenoff/fe-libs/ui";
|
|
10
|
+
import { Fragment as ae, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
11
11
|
import { ActorIdentity as y, useActorProfiles as b } from "@burdenoff/fe-libs/shared";
|
|
12
12
|
// src/components/ProjectMemberPickerDialog.tsx
|
|
13
13
|
var x = 100, S = 10;
|
|
@@ -19,8 +19,8 @@ function C(e) {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
function w({ open: w, onOpenChange: T, workspaceId: E, projectId: D, projectName: oe }) {
|
|
22
|
-
let O = i(), { apiGatewayUrl: se, authToken: ce, organizationId: le } = r(), { mutate: k, isPending: A } = e(E), [j, ue] =
|
|
23
|
-
|
|
22
|
+
let O = i(), { apiGatewayUrl: se, authToken: ce, organizationId: le } = r(), { mutate: k, isPending: A } = e(E), [j, ue] = c(""), [M, N] = c(null), [P, F] = c(null), { data: I, isLoading: L, isError: R, error: z, hasNextPage: B, fetchNextPage: V, isFetchingNextPage: H, refetch: de } = n(E, x, w), { data: U, isLoading: fe, isError: W, error: G, hasNextPage: K, fetchNextPage: q, isFetchingNextPage: J } = t(D, E, x, w);
|
|
23
|
+
ee(() => {
|
|
24
24
|
!w || !K || J || W || (U?.pages.length ?? 0) >= S || q();
|
|
25
25
|
}, [
|
|
26
26
|
q,
|
|
@@ -30,7 +30,7 @@ function w({ open: w, onOpenChange: T, workspaceId: E, projectId: D, projectName
|
|
|
30
30
|
w,
|
|
31
31
|
U?.pages.length
|
|
32
32
|
]);
|
|
33
|
-
let Y =
|
|
33
|
+
let Y = s(() => I?.pages.flatMap((e) => e.items) ?? [], [I?.pages]), X = s(() => new Set(U?.pages.flatMap((e) => e.items.map((e) => e.userId)) ?? []), [U?.pages]), pe = I?.pages[0]?.total ?? Y.length, Z = (U?.pages.length ?? 0) >= S, me = !W && K && !Z, he = s(() => Y.map((e) => ({
|
|
34
34
|
actorId: e.userId,
|
|
35
35
|
actorType: "user"
|
|
36
36
|
})), [Y]), Q = b(he, {
|
|
@@ -38,7 +38,7 @@ function w({ open: w, onOpenChange: T, workspaceId: E, projectId: D, projectName
|
|
|
38
38
|
authToken: ce,
|
|
39
39
|
orgId: le,
|
|
40
40
|
workspaceId: E
|
|
41
|
-
}), $ =
|
|
41
|
+
}), $ = s(() => {
|
|
42
42
|
let e = j.trim().toLowerCase();
|
|
43
43
|
return Y.filter((t) => {
|
|
44
44
|
if (X.has(t.userId)) return !1;
|
|
@@ -66,73 +66,73 @@ function w({ open: w, onOpenChange: T, workspaceId: E, projectId: D, projectName
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
|
-
return /* @__PURE__ */ m
|
|
69
|
+
return /* @__PURE__ */ _(m, {
|
|
70
70
|
open: w,
|
|
71
71
|
onOpenChange: T,
|
|
72
|
-
children: /* @__PURE__ */ h
|
|
72
|
+
children: /* @__PURE__ */ v(h, {
|
|
73
73
|
className: "z-[120] flex h-[min(85vh,760px)] flex-col overflow-hidden sm:max-w-[720px]",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ v(re, { children: [/* @__PURE__ */ _(ie, { children: O("projectMemberPickerDialog.title", "Add member to project") }), /* @__PURE__ */ _(ne, { children: O("projectMemberPickerDialog.description", "Add an existing workspace member to {{projectName}}. Only current workspace members are eligible.", { projectName: oe ?? O("projectMemberPickerDialog.thisProject", "this project") }) })] }), /* @__PURE__ */ v("div", {
|
|
75
75
|
className: "space-y-4 overflow-hidden",
|
|
76
76
|
children: [
|
|
77
|
-
P ? /* @__PURE__ */
|
|
77
|
+
P ? /* @__PURE__ */ v("div", {
|
|
78
78
|
className: "flex items-center gap-2 rounded-md border border-status-error-border/20 bg-status-error-bg/10 p-3 text-sm text-status-error-text",
|
|
79
|
-
children: [/* @__PURE__ */
|
|
79
|
+
children: [/* @__PURE__ */ _(l, { className: "size-4 shrink-0" }), /* @__PURE__ */ _("span", { children: P })]
|
|
80
80
|
}) : null,
|
|
81
|
-
G instanceof Error ? /* @__PURE__ */
|
|
81
|
+
G instanceof Error ? /* @__PURE__ */ v("div", {
|
|
82
82
|
className: "flex items-center gap-2 rounded-md border border-status-error-border/20 bg-status-error-bg/10 p-3 text-sm text-status-error-text",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
83
|
+
children: [/* @__PURE__ */ _(l, { className: "size-4 shrink-0" }), /* @__PURE__ */ _("span", { children: G.message })]
|
|
84
84
|
}) : null,
|
|
85
|
-
z instanceof Error ? /* @__PURE__ */
|
|
85
|
+
z instanceof Error ? /* @__PURE__ */ v("div", {
|
|
86
86
|
className: "space-y-3 rounded-md border border-status-error-border/20 bg-status-error-bg/10 p-3 text-sm text-status-error-text",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
87
|
+
children: [/* @__PURE__ */ v("div", {
|
|
88
88
|
className: "flex items-center gap-2",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
90
|
-
}), /* @__PURE__ */
|
|
89
|
+
children: [/* @__PURE__ */ _(l, { className: "size-4 shrink-0" }), /* @__PURE__ */ _("span", { children: z.message })]
|
|
90
|
+
}), /* @__PURE__ */ _(f, {
|
|
91
91
|
variant: "outline",
|
|
92
92
|
onClick: () => void de(),
|
|
93
93
|
children: O("projectMemberPickerDialog.retryLoadingMembers", "Retry Loading Members")
|
|
94
94
|
})]
|
|
95
95
|
}) : null,
|
|
96
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ v("div", {
|
|
97
97
|
className: "flex items-center gap-2",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
98
|
+
children: [/* @__PURE__ */ v("div", {
|
|
99
99
|
className: "relative flex-1",
|
|
100
|
-
children: [/* @__PURE__ */
|
|
100
|
+
children: [/* @__PURE__ */ _(te, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ _(p, {
|
|
101
101
|
value: j,
|
|
102
102
|
onChange: (e) => ue(e.target.value),
|
|
103
103
|
placeholder: O("projectMemberPickerDialog.searchPlaceholder", "Search workspace members"),
|
|
104
104
|
className: "pl-9",
|
|
105
105
|
disabled: A
|
|
106
106
|
})]
|
|
107
|
-
}), /* @__PURE__ */
|
|
107
|
+
}), /* @__PURE__ */ _(d, {
|
|
108
108
|
variant: "secondary",
|
|
109
109
|
children: O("projectMemberPickerDialog.eligibleCount", "{{count}} eligible", { count: B ? `${$.length}+` : $.length })
|
|
110
110
|
})]
|
|
111
111
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ _("div", {
|
|
113
113
|
className: "max-h-[480px] space-y-3 overflow-y-auto pr-1",
|
|
114
|
-
children: R ? null : L || fe || me || J ? Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */
|
|
114
|
+
children: R ? null : L || fe || me || J ? Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ v("div", {
|
|
115
115
|
className: "rounded-lg border bg-bg-surface p-4",
|
|
116
|
-
children: [/* @__PURE__ */
|
|
117
|
-
}, t)) : G instanceof Error ? null : $.length === 0 ? /* @__PURE__ */
|
|
116
|
+
children: [/* @__PURE__ */ _(g, { className: "h-5 w-40" }), /* @__PURE__ */ _(g, { className: "mt-2 h-4 w-56" })]
|
|
117
|
+
}, t)) : G instanceof Error ? null : $.length === 0 ? /* @__PURE__ */ v("div", {
|
|
118
118
|
className: "rounded-lg border bg-bg-surface p-8 text-center",
|
|
119
119
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ _(u, { className: "mx-auto mb-3 size-10 text-text-secondary" }),
|
|
121
|
+
/* @__PURE__ */ _("h3", {
|
|
122
122
|
className: "text-lg font-semibold",
|
|
123
123
|
children: O("projectMemberPickerDialog.emptyTitle", "No eligible members found")
|
|
124
124
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ _("p", {
|
|
126
126
|
className: "mt-2 text-sm text-text-secondary",
|
|
127
127
|
children: O("projectMemberPickerDialog.emptyDescription", "All workspace members are already part of this project, or nothing matched your search.")
|
|
128
128
|
}),
|
|
129
|
-
Z ? /* @__PURE__ */
|
|
129
|
+
Z ? /* @__PURE__ */ _("p", {
|
|
130
130
|
className: "mt-3 text-xs text-text-secondary",
|
|
131
131
|
children: O("projectMemberPickerDialog.autoloadCapNote", "Loaded the first {{count}} project members to avoid an excessively long blocking load.", { count: 1e3 })
|
|
132
132
|
}) : null,
|
|
133
|
-
B ? /* @__PURE__ */
|
|
133
|
+
B ? /* @__PURE__ */ _("div", {
|
|
134
134
|
className: "mt-4",
|
|
135
|
-
children: /* @__PURE__ */
|
|
135
|
+
children: /* @__PURE__ */ _(f, {
|
|
136
136
|
variant: "outline",
|
|
137
137
|
onClick: () => void V(),
|
|
138
138
|
disabled: H || A,
|
|
@@ -140,44 +140,44 @@ function w({ open: w, onOpenChange: T, workspaceId: E, projectId: D, projectName
|
|
|
140
140
|
})
|
|
141
141
|
}) : null
|
|
142
142
|
]
|
|
143
|
-
}) : /* @__PURE__ */
|
|
143
|
+
}) : /* @__PURE__ */ v(ae, { children: [$.map((e) => {
|
|
144
144
|
let t = Q[e.userId], n = C(e), r = A && M === e.userId;
|
|
145
|
-
return /* @__PURE__ */
|
|
145
|
+
return /* @__PURE__ */ v("div", {
|
|
146
146
|
className: "flex items-center justify-between gap-4 rounded-lg border bg-bg-surface p-4",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ _("div", {
|
|
148
148
|
className: "min-w-0 flex-1",
|
|
149
|
-
children: t ? /* @__PURE__ */
|
|
149
|
+
children: t ? /* @__PURE__ */ _(y, {
|
|
150
150
|
profile: t,
|
|
151
151
|
variant: "cell"
|
|
152
|
-
}) : /* @__PURE__ */
|
|
152
|
+
}) : /* @__PURE__ */ v("div", {
|
|
153
153
|
className: "min-w-0",
|
|
154
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ _("p", {
|
|
155
155
|
className: "truncate font-medium",
|
|
156
156
|
children: n.name
|
|
157
|
-
}), n.email ? /* @__PURE__ */
|
|
157
|
+
}), n.email ? /* @__PURE__ */ _("p", {
|
|
158
158
|
className: "truncate text-sm text-text-secondary",
|
|
159
159
|
children: n.email
|
|
160
|
-
}) : /* @__PURE__ */
|
|
160
|
+
}) : /* @__PURE__ */ _("p", {
|
|
161
161
|
className: "truncate text-xs text-text-secondary",
|
|
162
162
|
children: e.userId
|
|
163
163
|
})]
|
|
164
164
|
})
|
|
165
|
-
}), /* @__PURE__ */
|
|
165
|
+
}), /* @__PURE__ */ v(f, {
|
|
166
166
|
size: "sm",
|
|
167
167
|
onClick: () => ge(e.userId),
|
|
168
168
|
disabled: A,
|
|
169
|
-
children: [/* @__PURE__ */
|
|
169
|
+
children: [/* @__PURE__ */ _(u, { className: "mr-2 size-4" }), r ? O("projectMemberPickerDialog.adding", "Adding...") : O("projectMemberPickerDialog.add", "Add")]
|
|
170
170
|
})]
|
|
171
171
|
}, e.id);
|
|
172
|
-
}), B ? /* @__PURE__ */
|
|
172
|
+
}), B ? /* @__PURE__ */ v("div", {
|
|
173
173
|
className: "flex flex-col items-center gap-2 rounded-lg border border-dashed bg-bg-sunken/20 p-4 text-center",
|
|
174
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ _("p", {
|
|
175
175
|
className: "text-sm text-text-secondary",
|
|
176
176
|
children: O("projectMemberPickerDialog.showingCount", "Showing {{shown}} of {{total}} workspace members.", {
|
|
177
177
|
shown: Y.length,
|
|
178
178
|
total: pe
|
|
179
179
|
})
|
|
180
|
-
}), /* @__PURE__ */
|
|
180
|
+
}), /* @__PURE__ */ _(f, {
|
|
181
181
|
variant: "outline",
|
|
182
182
|
onClick: () => void V(),
|
|
183
183
|
disabled: H || A,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useUpdateProject as e } from "../hooks/useProjectMutations.js";
|
|
2
2
|
import { useTr as t } from "../hooks/useTr.js";
|
|
3
3
|
import { useMemo as n, useState as r } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Button as i, ResponsiveDialog as a, ResponsiveDialogContent as o, ResponsiveDialogDescription as s, ResponsiveDialogHeader as c, ResponsiveDialogTitle as l } from "@burdenoff/fe-libs/ui";
|
|
5
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
6
6
|
import { FormControl as f, FormDescription as p, FormField as m, FormItem as h, FormLabel as g, FormMessage as _, FormProvider as v, Input as y, useForm as b, z as x } from "@burdenoff/fe-libs/form";
|
|
7
7
|
// src/components/RenameProjectDialog.tsx
|
|
8
8
|
function S(e) {
|
|
@@ -26,44 +26,44 @@ function C({ project: x, open: C, onOpenChange: w }) {
|
|
|
26
26
|
}
|
|
27
27
|
}));
|
|
28
28
|
};
|
|
29
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ u(a, {
|
|
30
30
|
open: C,
|
|
31
31
|
onOpenChange: w,
|
|
32
|
-
children: /* @__PURE__ */
|
|
32
|
+
children: /* @__PURE__ */ d(o, {
|
|
33
33
|
className: "sm:max-w-[500px]",
|
|
34
|
-
children: [/* @__PURE__ */
|
|
34
|
+
children: [/* @__PURE__ */ d(c, { children: [/* @__PURE__ */ u(l, { children: T("renameProjectDialog.title", "Rename Project") }), /* @__PURE__ */ u(s, { children: T("renameProjectDialog.description", "Give this project a new name. The project key stays the same.") })] }), /* @__PURE__ */ u(v, {
|
|
35
35
|
...j,
|
|
36
|
-
children: /* @__PURE__ */
|
|
36
|
+
children: /* @__PURE__ */ d("form", {
|
|
37
37
|
onSubmit: j.handleSubmit(N),
|
|
38
38
|
className: "space-y-4",
|
|
39
39
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ u(m, {
|
|
41
41
|
control: j.control,
|
|
42
42
|
name: "name",
|
|
43
|
-
render: ({ field: e }) => /* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
43
|
+
render: ({ field: e }) => /* @__PURE__ */ d(h, { children: [
|
|
44
|
+
/* @__PURE__ */ u(g, { children: T("renameProjectDialog.nameLabel", "Project Name") }),
|
|
45
|
+
/* @__PURE__ */ u(f, { children: /* @__PURE__ */ u(y, {
|
|
46
46
|
...e,
|
|
47
47
|
placeholder: T("renameProjectDialog.namePlaceholder", "My Project")
|
|
48
48
|
}) }),
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ u(p, { children: T("renameProjectDialog.nameHint", "A descriptive name for your project") }),
|
|
50
|
+
/* @__PURE__ */ u(_, {})
|
|
51
51
|
] })
|
|
52
52
|
}),
|
|
53
|
-
O && /* @__PURE__ */
|
|
53
|
+
O && /* @__PURE__ */ u("p", {
|
|
54
54
|
className: "text-sm text-status-error-text",
|
|
55
55
|
role: "alert",
|
|
56
56
|
children: O
|
|
57
57
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ d("div", {
|
|
59
59
|
className: "flex justify-end gap-3 pt-4",
|
|
60
|
-
children: [/* @__PURE__ */ i
|
|
60
|
+
children: [/* @__PURE__ */ u(i, {
|
|
61
61
|
type: "button",
|
|
62
62
|
variant: "outline",
|
|
63
63
|
onClick: () => w(!1),
|
|
64
64
|
disabled: D,
|
|
65
65
|
children: T("common.cancel", "Cancel")
|
|
66
|
-
}), /* @__PURE__ */ i
|
|
66
|
+
}), /* @__PURE__ */ u(i, {
|
|
67
67
|
type: "submit",
|
|
68
68
|
disabled: D || M,
|
|
69
69
|
children: D ? T("renameProjectDialog.saving", "Saving...") : T("renameProjectDialog.save", "Save")
|