@burdenoff/microfe-workspaces 2026.1108.1 → 2026.1110.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 +10 -9
- package/dist/WorkspacesRoutes.js +1 -2
- package/dist/components/CreateProjectDialog.js +22 -22
- package/dist/components/CreateWorkspaceDialog.js +8 -9
- package/dist/components/InviteMemberDialog.js +18 -23
- package/dist/components/MemberListItem.js +16 -17
- package/dist/components/ProjectCard.js +14 -15
- package/dist/components/ProjectMemberPickerDialog.js +92 -93
- package/dist/components/RenameProjectDialog.js +12 -17
- package/dist/components/WorkspaceCard.js +6 -7
- package/dist/components/WorkspaceContextPathSync.js +4 -5
- package/dist/components/WorkspacesErrorBoundary.js +6 -11
- package/dist/components/index.js +8 -7
- package/dist/components/tags/ProjectTagsWidget.js +56 -57
- package/dist/components/tags/WorkspaceTagsEditor.js +2 -3
- package/dist/constants/permissions.js +1 -2
- package/dist/generated/global-operations.js +1 -2
- package/dist/generated/wspace-operations.js +1 -2
- package/dist/hooks/index.js +9 -8
- package/dist/hooks/useMemberMutations.js +165 -166
- package/dist/hooks/useOpenWorkspace.js +1 -2
- package/dist/hooks/useOrgsWithPermission.js +2 -3
- package/dist/hooks/usePendingInvitations.d.ts +1 -1
- package/dist/hooks/usePendingInvitations.js +2 -3
- package/dist/hooks/useProjectMemberMutations.js +23 -24
- package/dist/hooks/useProjectMembers.d.ts +2 -2
- package/dist/hooks/useProjectMembers.js +2 -3
- package/dist/hooks/useProjectMutations.js +68 -69
- package/dist/hooks/useProjects.d.ts +3 -3
- package/dist/hooks/useProjects.js +5 -6
- package/dist/hooks/useScopedNavigation.js +1 -2
- package/dist/hooks/useTenants.d.ts +2 -2
- package/dist/hooks/useTenants.js +3 -4
- package/dist/hooks/useTr.js +1 -2
- package/dist/hooks/useWorkspaceActivity.d.ts +1 -1
- package/dist/hooks/useWorkspaceActivity.js +2 -3
- package/dist/hooks/useWorkspaceMembers.d.ts +5 -5
- package/dist/hooks/useWorkspaceMembers.js +7 -8
- package/dist/hooks/useWorkspaceMutations.js +70 -71
- package/dist/hooks/useWorkspacePermissions.js +1 -2
- package/dist/hooks/useWorkspaceRoles.d.ts +1 -1
- package/dist/hooks/useWorkspaceRoles.js +3 -4
- package/dist/hooks/useWorkspaces.d.ts +3 -3
- package/dist/hooks/useWorkspaces.js +4 -5
- package/dist/hooks/useWorkspacesEventEmitter.js +1 -2
- package/dist/hooks/useWorkspacesPageView.js +1 -2
- package/dist/index.js +15 -15
- package/dist/pages/ActivityListPage.js +28 -29
- package/dist/pages/CreateWorkspacePage.js +137 -138
- package/dist/pages/InviteAcceptancePage.js +65 -66
- package/dist/pages/MembersListPage.js +203 -204
- package/dist/pages/PendingInvitesPage.js +63 -64
- package/dist/pages/ProjectDetailPage.js +71 -72
- package/dist/pages/ProjectMembersPage.js +116 -117
- package/dist/pages/ProjectsListPage.js +62 -67
- package/dist/pages/WorkspaceDetailPage.js +153 -154
- package/dist/pages/WorkspaceInvitePage.js +88 -92
- package/dist/pages/WorkspaceSettingsPage.js +32 -33
- package/dist/pages/WorkspacesListPage.js +40 -41
- package/dist/pages/dashboard/DashboardCustomizer.js +98 -94
- package/dist/pages/dashboard/DashboardGrid.js +1 -2
- package/dist/pages/dashboard/DashboardPage.js +12 -13
- package/dist/pages/dashboard/WidgetWrapper.js +21 -21
- package/dist/pages/dashboard/config.js +3 -4
- package/dist/pages/dashboard/hooks/useDashboardData.d.ts +5 -5
- package/dist/pages/dashboard/hooks/useDashboardData.js +9 -10
- package/dist/pages/dashboard/hooks/useDashboardPreferences.js +7 -8
- package/dist/pages/dashboard/reorder.js +11 -14
- package/dist/pages/dashboard/widgets/AgentsWidget.js +13 -14
- package/dist/pages/dashboard/widgets/GroupsWidget.js +9 -10
- package/dist/pages/dashboard/widgets/MembersWidget.js +10 -11
- package/dist/pages/dashboard/widgets/ProjectsWidget.js +11 -12
- package/dist/pages/dashboard/widgets/QuickActionsWidget.js +28 -29
- package/dist/pages/dashboard/widgets/RecentActivityWidget.js +22 -23
- package/dist/pages/dashboard/widgets/SessionsWidget.js +28 -29
- package/dist/pages/dashboard/widgets/StorageWidget.js +19 -20
- package/dist/pages/dashboard/widgets/TagCloudWidget.js +9 -10
- package/dist/pages/dashboard/widgets/TipsWidget.js +5 -6
- package/dist/pages/dashboard/widgets/UpcomingEventsWidget.js +17 -18
- package/dist/pages/dashboard/widgets/VibesWidget.js +13 -14
- package/dist/pages/dashboard/widgets/WelcomeWidget.js +12 -13
- package/dist/pages/dashboard/widgets/WorkflowRunsWidget.js +16 -17
- package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js +11 -12
- package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.js +17 -18
- package/dist/pages/dashboard/widgets/WorkspacesWidget.js +7 -8
- package/dist/pages/dashboard/widgets/tipsCatalog.js +1 -2
- package/dist/providers/WorkspacesProvider.js +1 -2
- package/dist/store/workspacesStore.d.ts +1 -1
- package/dist/store/workspacesStore.js +1 -2
- package/dist/test/happydom.d.ts +1 -0
- package/dist/translations/en.js +1 -2
- package/dist/utils/formatters.js +1 -2
- package/dist/utils/i18n.js +1 -2
- package/dist/utils/invitationDisplay.js +1 -2
- package/dist/utils/nativeBridge.js +1 -2
- package/dist/utils/pinnedRequest.js +2 -3
- package/dist/utils/projectTags.js +2 -3
- package/dist/utils/slug.js +1 -2
- package/dist/utils/telemetryError.js +13 -16
- package/dist/utils/tokenHelpers.js +1 -2
- package/dist/utils/workspaceBulkInviteCsv.js +3 -8
- package/package.json +72 -55
|
@@ -1,187 +1,187 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useEffect as
|
|
8
|
-
import { AlertCircle as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { Badge as
|
|
11
|
-
import { ActorIdentity as
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
function
|
|
1
|
+
import { useAddProjectMember as e } from "../hooks/useProjectMemberMutations.js";
|
|
2
|
+
import { useInfiniteProjectMembers as t } from "../hooks/useProjectMembers.js";
|
|
3
|
+
import { useInfiniteWorkspaceMembers as n } from "../hooks/useWorkspaceMembers.js";
|
|
4
|
+
import { useWorkspacesContext as r } from "../providers/WorkspacesProvider.js";
|
|
5
|
+
import { useTr as i } from "../hooks/useTr.js";
|
|
6
|
+
import { nativeImpact as a, nativeNotify as o } from "../utils/nativeBridge.js";
|
|
7
|
+
import { useEffect as s, useMemo as c, useState as l } from "react";
|
|
8
|
+
import { AlertCircle as u, Search as d, UserPlus as f } from "lucide-react";
|
|
9
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
10
|
+
import { Badge as g, Button as _, Input as ee, ResponsiveDialog as te, ResponsiveDialogContent as ne, ResponsiveDialogDescription as re, ResponsiveDialogHeader as ie, ResponsiveDialogTitle as ae, Skeleton as v } from "@burdenoff/fe-libs/ui";
|
|
11
|
+
import { ActorIdentity as y, useActorProfiles as b } from "@burdenoff/fe-libs/shared";
|
|
12
|
+
// src/components/ProjectMemberPickerDialog.tsx
|
|
13
|
+
var x = 100, S = 10;
|
|
14
|
+
function C(e) {
|
|
15
15
|
let t = e.context?.metadata;
|
|
16
16
|
return {
|
|
17
17
|
name: typeof t?.displayName == "string" ? t.displayName : typeof t?.name == "string" ? t.name : e.userId,
|
|
18
18
|
email: typeof t?.email == "string" ? t.email : void 0
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
!
|
|
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] = l(""), [M, N] = l(null), [P, F] = l(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
|
+
s(() => {
|
|
24
|
+
!w || !K || J || W || (U?.pages.length ?? 0) >= S || q();
|
|
25
25
|
}, [
|
|
26
26
|
q,
|
|
27
27
|
K,
|
|
28
28
|
W,
|
|
29
29
|
J,
|
|
30
|
-
|
|
30
|
+
w,
|
|
31
31
|
U?.pages.length
|
|
32
32
|
]);
|
|
33
|
-
let Y =
|
|
33
|
+
let Y = c(() => I?.pages.flatMap((e) => e.items) ?? [], [I?.pages]), X = c(() => 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 = c(() => Y.map((e) => ({
|
|
34
34
|
actorId: e.userId,
|
|
35
35
|
actorType: "user"
|
|
36
|
-
})), [Y]), {
|
|
37
|
-
apiGatewayUrl:
|
|
38
|
-
authToken:
|
|
39
|
-
orgId:
|
|
40
|
-
workspaceId:
|
|
41
|
-
}), $ =
|
|
42
|
-
let e =
|
|
36
|
+
})), [Y]), Q = b(he, {
|
|
37
|
+
apiGatewayUrl: se,
|
|
38
|
+
authToken: ce,
|
|
39
|
+
orgId: le,
|
|
40
|
+
workspaceId: E
|
|
41
|
+
}), $ = c(() => {
|
|
42
|
+
let e = j.trim().toLowerCase();
|
|
43
43
|
return Y.filter((t) => {
|
|
44
44
|
if (X.has(t.userId)) return !1;
|
|
45
45
|
if (!e) return !0;
|
|
46
46
|
let n = Q[t.userId];
|
|
47
47
|
if (n && (n.displayName.toLowerCase().includes(e) || n.email?.toLowerCase().includes(e))) return !0;
|
|
48
|
-
let r =
|
|
48
|
+
let r = C(t);
|
|
49
49
|
return r.name.toLowerCase().includes(e) || r.email?.toLowerCase().includes(e) || t.userId.toLowerCase().includes(e);
|
|
50
50
|
});
|
|
51
51
|
}, [
|
|
52
52
|
X,
|
|
53
53
|
Q,
|
|
54
|
-
|
|
54
|
+
j,
|
|
55
55
|
Y
|
|
56
|
-
]),
|
|
57
|
-
|
|
58
|
-
projectId:
|
|
56
|
+
]), ge = (e) => {
|
|
57
|
+
a("medium"), N(e), F(null), k({
|
|
58
|
+
projectId: D,
|
|
59
59
|
userId: e
|
|
60
60
|
}, {
|
|
61
61
|
onSuccess: () => {
|
|
62
|
-
|
|
62
|
+
o("success"), N(null), T(!1);
|
|
63
63
|
},
|
|
64
64
|
onError: (e) => {
|
|
65
|
-
|
|
65
|
+
o("error"), N(null), F(e instanceof Error ? e.message : O("projectMemberPickerDialog.addError", "Failed to add member to project"));
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
-
open:
|
|
71
|
-
onOpenChange:
|
|
72
|
-
children: /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ m(te, {
|
|
70
|
+
open: w,
|
|
71
|
+
onOpenChange: T,
|
|
72
|
+
children: /* @__PURE__ */ h(ne, {
|
|
73
73
|
className: "z-[120] flex h-[min(85vh,760px)] flex-col overflow-hidden sm:max-w-[720px]",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ h(ie, { children: [/* @__PURE__ */ m(ae, { children: O("projectMemberPickerDialog.title", "Add member to project") }), /* @__PURE__ */ m(re, { 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__ */ h("div", {
|
|
75
75
|
className: "space-y-4 overflow-hidden",
|
|
76
76
|
children: [
|
|
77
|
-
P ? /* @__PURE__ */
|
|
77
|
+
P ? /* @__PURE__ */ h("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__ */ m(u, { className: "size-4 shrink-0" }), /* @__PURE__ */ m("span", { children: P })]
|
|
80
80
|
}) : null,
|
|
81
|
-
G instanceof Error ? /* @__PURE__ */
|
|
81
|
+
G instanceof Error ? /* @__PURE__ */ h("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__ */ m(u, { className: "size-4 shrink-0" }), /* @__PURE__ */ m("span", { children: G.message })]
|
|
84
84
|
}) : null,
|
|
85
|
-
z instanceof Error ? /* @__PURE__ */
|
|
85
|
+
z instanceof Error ? /* @__PURE__ */ h("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__ */ h("div", {
|
|
88
88
|
className: "flex items-center gap-2",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
90
|
-
}), /* @__PURE__ */
|
|
89
|
+
children: [/* @__PURE__ */ m(u, { className: "size-4 shrink-0" }), /* @__PURE__ */ m("span", { children: z.message })]
|
|
90
|
+
}), /* @__PURE__ */ m(_, {
|
|
91
91
|
variant: "outline",
|
|
92
92
|
onClick: () => void de(),
|
|
93
|
-
children:
|
|
93
|
+
children: O("projectMemberPickerDialog.retryLoadingMembers", "Retry Loading Members")
|
|
94
94
|
})]
|
|
95
95
|
}) : null,
|
|
96
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ h("div", {
|
|
97
97
|
className: "flex items-center gap-2",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
98
|
+
children: [/* @__PURE__ */ h("div", {
|
|
99
99
|
className: "relative flex-1",
|
|
100
|
-
children: [/* @__PURE__ */
|
|
101
|
-
value:
|
|
102
|
-
onChange: (e) =>
|
|
103
|
-
placeholder:
|
|
100
|
+
children: [/* @__PURE__ */ m(d, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ m(ee, {
|
|
101
|
+
value: j,
|
|
102
|
+
onChange: (e) => ue(e.target.value),
|
|
103
|
+
placeholder: O("projectMemberPickerDialog.searchPlaceholder", "Search workspace members"),
|
|
104
104
|
className: "pl-9",
|
|
105
|
-
disabled:
|
|
105
|
+
disabled: A
|
|
106
106
|
})]
|
|
107
|
-
}), /* @__PURE__ */
|
|
107
|
+
}), /* @__PURE__ */ m(g, {
|
|
108
108
|
variant: "secondary",
|
|
109
|
-
children:
|
|
109
|
+
children: O("projectMemberPickerDialog.eligibleCount", "{{count}} eligible", { count: B ? `${$.length}+` : $.length })
|
|
110
110
|
})]
|
|
111
111
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ m("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__ */ h("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__ */ m(v, { className: "h-5 w-40" }), /* @__PURE__ */ m(v, { className: "mt-2 h-4 w-56" })]
|
|
117
|
+
}, t)) : G instanceof Error ? null : $.length === 0 ? /* @__PURE__ */ h("div", {
|
|
118
118
|
className: "rounded-lg border bg-bg-surface p-8 text-center",
|
|
119
119
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ m(f, { className: "mx-auto mb-3 size-10 text-text-secondary" }),
|
|
121
|
+
/* @__PURE__ */ m("h3", {
|
|
122
122
|
className: "text-lg font-semibold",
|
|
123
|
-
children:
|
|
123
|
+
children: O("projectMemberPickerDialog.emptyTitle", "No eligible members found")
|
|
124
124
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ m("p", {
|
|
126
126
|
className: "mt-2 text-sm text-text-secondary",
|
|
127
|
-
children:
|
|
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__ */ m("p", {
|
|
130
130
|
className: "mt-3 text-xs text-text-secondary",
|
|
131
|
-
children:
|
|
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__ */ m("div", {
|
|
134
134
|
className: "mt-4",
|
|
135
|
-
children: /* @__PURE__ */
|
|
135
|
+
children: /* @__PURE__ */ m(_, {
|
|
136
136
|
variant: "outline",
|
|
137
137
|
onClick: () => void V(),
|
|
138
|
-
disabled: H ||
|
|
139
|
-
children: H ?
|
|
138
|
+
disabled: H || A,
|
|
139
|
+
children: H ? O("projectMemberPickerDialog.loadingMore", "Loading more…") : O("projectMemberPickerDialog.loadMore", "Load More Members")
|
|
140
140
|
})
|
|
141
141
|
}) : null
|
|
142
142
|
]
|
|
143
|
-
}) : /* @__PURE__ */
|
|
144
|
-
let t = Q[e.userId], n =
|
|
145
|
-
return /* @__PURE__ */
|
|
143
|
+
}) : /* @__PURE__ */ h(p, { children: [$.map((e) => {
|
|
144
|
+
let t = Q[e.userId], n = C(e), r = A && M === e.userId;
|
|
145
|
+
return /* @__PURE__ */ h("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__ */ m("div", {
|
|
148
148
|
className: "min-w-0 flex-1",
|
|
149
|
-
children: t ? /* @__PURE__ */
|
|
149
|
+
children: t ? /* @__PURE__ */ m(y, {
|
|
150
150
|
profile: t,
|
|
151
151
|
variant: "cell"
|
|
152
|
-
}) : /* @__PURE__ */
|
|
152
|
+
}) : /* @__PURE__ */ h("div", {
|
|
153
153
|
className: "min-w-0",
|
|
154
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ m("p", {
|
|
155
155
|
className: "truncate font-medium",
|
|
156
156
|
children: n.name
|
|
157
|
-
}), n.email ? /* @__PURE__ */
|
|
157
|
+
}), n.email ? /* @__PURE__ */ m("p", {
|
|
158
158
|
className: "truncate text-sm text-text-secondary",
|
|
159
159
|
children: n.email
|
|
160
|
-
}) : /* @__PURE__ */
|
|
160
|
+
}) : /* @__PURE__ */ m("p", {
|
|
161
161
|
className: "truncate text-xs text-text-secondary",
|
|
162
162
|
children: e.userId
|
|
163
163
|
})]
|
|
164
164
|
})
|
|
165
|
-
}), /* @__PURE__ */
|
|
165
|
+
}), /* @__PURE__ */ h(_, {
|
|
166
166
|
size: "sm",
|
|
167
|
-
onClick: () =>
|
|
168
|
-
disabled:
|
|
169
|
-
children: [/* @__PURE__ */
|
|
167
|
+
onClick: () => ge(e.userId),
|
|
168
|
+
disabled: A,
|
|
169
|
+
children: [/* @__PURE__ */ m(f, { 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__ */ h("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__ */ m("p", {
|
|
175
175
|
className: "text-sm text-text-secondary",
|
|
176
|
-
children:
|
|
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__ */ m(_, {
|
|
181
181
|
variant: "outline",
|
|
182
182
|
onClick: () => void V(),
|
|
183
|
-
disabled: H ||
|
|
184
|
-
children: H ?
|
|
183
|
+
disabled: H || A,
|
|
184
|
+
children: H ? O("projectMemberPickerDialog.loadingMore", "Loading more…") : O("projectMemberPickerDialog.loadMore", "Load More Members")
|
|
185
185
|
})]
|
|
186
186
|
}) : null] })
|
|
187
187
|
})
|
|
@@ -190,5 +190,4 @@ function C({ open: C, onOpenChange: w, workspaceId: T, projectId: E, projectName
|
|
|
190
190
|
})
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
|
-
|
|
194
|
-
export { C as ProjectMemberPickerDialog };
|
|
193
|
+
export { w as ProjectMemberPickerDialog };
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useUpdateProject as e } from "../hooks/useProjectMutations.js";
|
|
2
|
+
import { useTr as t } from "../hooks/useTr.js";
|
|
3
3
|
import { useMemo as n, useState as r } from "react";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
import { Button as o, ResponsiveDialog as s, ResponsiveDialogContent as c, ResponsiveDialogDescription as l, ResponsiveDialogHeader as u, ResponsiveDialogTitle as d } from "@burdenoff/fe-libs/ui";
|
|
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) {
|
|
9
9
|
return x.object({ name: x.string().trim().min(2, e("renameProjectDialog.validation.nameMin", "Name must be at least 2 characters")).max(100, e("renameProjectDialog.validation.nameMax", "Name must be less than 100 characters")) });
|
|
10
10
|
}
|
|
11
11
|
function C({ project: x, open: C, onOpenChange: w }) {
|
|
12
|
-
let T =
|
|
13
|
-
schema:
|
|
12
|
+
let T = t(), { mutate: E, isPending: D } = e(x.workspaceId), [O, k] = r(null), A = n(() => S(T), [T]), j = b({
|
|
13
|
+
schema: A,
|
|
14
14
|
defaultValues: { name: x.name }
|
|
15
|
-
}),
|
|
15
|
+
}), M = j.watch("name").trim() === x.name.trim(), N = (e) => {
|
|
16
16
|
let t = e.name.trim();
|
|
17
|
-
|
|
18
|
-
w(!1);
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
k(null), E({
|
|
17
|
+
t === x.name.trim() ? w(!1) : (k(null), E({
|
|
22
18
|
id: x.id,
|
|
23
19
|
input: { name: t }
|
|
24
20
|
}, {
|
|
@@ -28,7 +24,7 @@ function C({ project: x, open: C, onOpenChange: w }) {
|
|
|
28
24
|
onError: (e) => {
|
|
29
25
|
k(e instanceof Error ? e.message : T("renameProjectDialog.submitError", "Failed to rename project"));
|
|
30
26
|
}
|
|
31
|
-
});
|
|
27
|
+
}));
|
|
32
28
|
};
|
|
33
29
|
return /* @__PURE__ */ i(s, {
|
|
34
30
|
open: C,
|
|
@@ -36,13 +32,13 @@ function C({ project: x, open: C, onOpenChange: w }) {
|
|
|
36
32
|
children: /* @__PURE__ */ a(c, {
|
|
37
33
|
className: "sm:max-w-[500px]",
|
|
38
34
|
children: [/* @__PURE__ */ a(u, { children: [/* @__PURE__ */ i(d, { children: T("renameProjectDialog.title", "Rename Project") }), /* @__PURE__ */ i(l, { children: T("renameProjectDialog.description", "Give this project a new name. The project key stays the same.") })] }), /* @__PURE__ */ i(v, {
|
|
39
|
-
...
|
|
35
|
+
...j,
|
|
40
36
|
children: /* @__PURE__ */ a("form", {
|
|
41
|
-
onSubmit:
|
|
37
|
+
onSubmit: j.handleSubmit(N),
|
|
42
38
|
className: "space-y-4",
|
|
43
39
|
children: [
|
|
44
40
|
/* @__PURE__ */ i(m, {
|
|
45
|
-
control:
|
|
41
|
+
control: j.control,
|
|
46
42
|
name: "name",
|
|
47
43
|
render: ({ field: e }) => /* @__PURE__ */ a(h, { children: [
|
|
48
44
|
/* @__PURE__ */ i(g, { children: T("renameProjectDialog.nameLabel", "Project Name") }),
|
|
@@ -69,7 +65,7 @@ function C({ project: x, open: C, onOpenChange: w }) {
|
|
|
69
65
|
children: T("common.cancel", "Cancel")
|
|
70
66
|
}), /* @__PURE__ */ i(o, {
|
|
71
67
|
type: "submit",
|
|
72
|
-
disabled: D ||
|
|
68
|
+
disabled: D || M,
|
|
73
69
|
children: D ? T("renameProjectDialog.saving", "Saving...") : T("renameProjectDialog.save", "Save")
|
|
74
70
|
})]
|
|
75
71
|
})
|
|
@@ -79,5 +75,4 @@ function C({ project: x, open: C, onOpenChange: w }) {
|
|
|
79
75
|
})
|
|
80
76
|
});
|
|
81
77
|
}
|
|
82
|
-
//#endregion
|
|
83
78
|
export { C as RenameProjectDialog };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { getWorkspaceStatusClasses as e } from "../utils/tokenHelpers.js";
|
|
2
|
+
import { useOpenWorkspace as t } from "../hooks/useOpenWorkspace.js";
|
|
3
|
+
import { useTr as n } from "../hooks/useTr.js";
|
|
4
4
|
import { Building2 as r, FolderKanban as i, Users as a } from "lucide-react";
|
|
5
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
6
|
import { Badge as c, CardContent as l, CardHeader as u, CardTitle as d, GlassCard as f } from "@burdenoff/fe-libs/ui";
|
|
7
|
-
|
|
7
|
+
// src/components/WorkspaceCard.tsx
|
|
8
8
|
function p({ workspace: p }) {
|
|
9
|
-
let m =
|
|
9
|
+
let m = n(), h = t(), g = () => h(p);
|
|
10
10
|
return /* @__PURE__ */ s(f, {
|
|
11
11
|
treatment: "insight",
|
|
12
12
|
className: "cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg/50",
|
|
@@ -34,7 +34,7 @@ function p({ workspace: p }) {
|
|
|
34
34
|
}), /* @__PURE__ */ o("div", {
|
|
35
35
|
className: "flex items-center gap-2 mt-1",
|
|
36
36
|
children: /* @__PURE__ */ o(c, {
|
|
37
|
-
className: `text-xs border ${
|
|
37
|
+
className: `text-xs border ${e(p.status)}`,
|
|
38
38
|
children: p.status
|
|
39
39
|
})
|
|
40
40
|
})]
|
|
@@ -66,5 +66,4 @@ function p({ workspace: p }) {
|
|
|
66
66
|
})] })]
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
//#endregion
|
|
70
69
|
export { p as WorkspaceCard };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
|
|
2
2
|
import { useEffect as t, useRef as n } from "react";
|
|
3
3
|
import { useNavigate as r } from "react-router";
|
|
4
|
-
|
|
5
|
-
var i = new Set([
|
|
4
|
+
// src/components/WorkspaceContextPathSync.tsx
|
|
5
|
+
var i = /* @__PURE__ */ new Set([
|
|
6
6
|
"list",
|
|
7
7
|
"new",
|
|
8
8
|
"invites",
|
|
@@ -20,13 +20,12 @@ function a() {
|
|
|
20
20
|
if (t !== r && !t.startsWith(`${r}/`)) return;
|
|
21
21
|
let l = t.slice(r.length).split("/").filter(Boolean);
|
|
22
22
|
if (l.length === 0 || i.has(l[0]) || l[0] === a) return;
|
|
23
|
-
let u = `${r}/${[a,
|
|
24
|
-
|
|
23
|
+
let u = l[1], d = `${r}/${[a, u].filter(Boolean).join("/")}${n}`;
|
|
24
|
+
d !== `${t}${n}` && s(d, { replace: !0 });
|
|
25
25
|
}, [
|
|
26
26
|
a,
|
|
27
27
|
o,
|
|
28
28
|
s
|
|
29
29
|
]), null;
|
|
30
30
|
}
|
|
31
|
-
//#endregion
|
|
32
31
|
export { a as WorkspaceContextPathSync };
|
|
@@ -3,7 +3,7 @@ import { Component as t } from "react";
|
|
|
3
3
|
import { AlertCircle as n, Home as r, RefreshCw as i } from "lucide-react";
|
|
4
4
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
5
|
import { Button as s } from "@burdenoff/fe-libs/ui";
|
|
6
|
-
|
|
6
|
+
// src/components/WorkspacesErrorBoundary.tsx
|
|
7
7
|
var c = class extends t {
|
|
8
8
|
constructor(e) {
|
|
9
9
|
super(e), this.state = {
|
|
@@ -46,15 +46,11 @@ var c = class extends t {
|
|
|
46
46
|
window.location.reload();
|
|
47
47
|
};
|
|
48
48
|
handleGoHome = () => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
});
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
window.location.href = "/";
|
|
49
|
+
this.props.onGoHome ? (this.props.onGoHome(), this.setState({
|
|
50
|
+
hasError: !1,
|
|
51
|
+
error: null,
|
|
52
|
+
errorInfo: null
|
|
53
|
+
})) : window.location.href = "/";
|
|
58
54
|
};
|
|
59
55
|
render() {
|
|
60
56
|
let { tr: e } = this.props;
|
|
@@ -147,5 +143,4 @@ function l(t) {
|
|
|
147
143
|
tr: n
|
|
148
144
|
});
|
|
149
145
|
}
|
|
150
|
-
//#endregion
|
|
151
146
|
export { l as WorkspacesErrorBoundary };
|
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
1
|
+
import { WorkspaceCard as e } from "./WorkspaceCard.js";
|
|
2
|
+
import { CreateWorkspaceDialog as t } from "./CreateWorkspaceDialog.js";
|
|
3
|
+
import { ProjectCard as n } from "./ProjectCard.js";
|
|
4
|
+
import { CreateProjectDialog as r } from "./CreateProjectDialog.js";
|
|
5
|
+
import { MemberListItem as i } from "./MemberListItem.js";
|
|
6
|
+
import { InviteMemberDialog as a } from "./InviteMemberDialog.js";
|
|
7
|
+
import { WorkspacesErrorBoundary as o } from "./WorkspacesErrorBoundary.js";
|
|
8
|
+
export { r as CreateProjectDialog, t as CreateWorkspaceDialog, a as InviteMemberDialog, i as MemberListItem, n as ProjectCard, e as WorkspaceCard, o as WorkspacesErrorBoundary };
|