@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
package/dist/WorkspacesRoot.js
CHANGED
|
@@ -4,70 +4,76 @@ import { WorkspacesRoutes as n } from "./WorkspacesRoutes.js";
|
|
|
4
4
|
import { useEffect as r, useMemo as i } from "react";
|
|
5
5
|
import { Activity as a, Building2 as o, FolderKanban as s, Users as c } from "lucide-react";
|
|
6
6
|
import { FeatureFlagProvider as l, useFeatureFlags as u } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
7
|
-
import {
|
|
7
|
+
import { useHeadingDocumentTitle as d } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
8
9
|
// src/WorkspacesRoot.tsx
|
|
9
|
-
var
|
|
10
|
-
let { registerNavItems:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
var p = (p) => {
|
|
11
|
+
let { registerNavItems: m, registerFooterItems: h, basePath: g = "/" } = p, { isEnabled: _, evaluations: v } = u();
|
|
12
|
+
d({
|
|
13
|
+
enabled: p.variant === "fluidgrids",
|
|
14
|
+
suffix: "FluidGrids"
|
|
15
|
+
});
|
|
16
|
+
let y = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`), b = i(() => ({
|
|
17
|
+
isEnabled: _,
|
|
18
|
+
evaluations: v
|
|
19
|
+
}), [v, _]);
|
|
14
20
|
return r(() => {
|
|
15
|
-
if (!
|
|
21
|
+
if (!m) return;
|
|
16
22
|
let e = [
|
|
17
23
|
{
|
|
18
24
|
id: "workspaces-all",
|
|
19
25
|
label: "All Workspaces",
|
|
20
|
-
path:
|
|
21
|
-
icon: /* @__PURE__ */
|
|
26
|
+
path: y(g, "list"),
|
|
27
|
+
icon: /* @__PURE__ */ f(o, { size: 20 }),
|
|
22
28
|
order: 10,
|
|
23
29
|
group: "workspaces"
|
|
24
30
|
},
|
|
25
31
|
{
|
|
26
32
|
id: "workspaces-projects",
|
|
27
33
|
label: "Projects",
|
|
28
|
-
path:
|
|
29
|
-
icon: /* @__PURE__ */
|
|
34
|
+
path: y(g, "projects"),
|
|
35
|
+
icon: /* @__PURE__ */ f(s, { size: 20 }),
|
|
30
36
|
order: 20,
|
|
31
37
|
group: "workspaces"
|
|
32
38
|
},
|
|
33
39
|
{
|
|
34
40
|
id: "workspaces-members",
|
|
35
41
|
label: "Members",
|
|
36
|
-
path:
|
|
37
|
-
icon: /* @__PURE__ */
|
|
42
|
+
path: y(g, "members"),
|
|
43
|
+
icon: /* @__PURE__ */ f(c, { size: 20 }),
|
|
38
44
|
order: 30,
|
|
39
45
|
group: "workspaces"
|
|
40
46
|
},
|
|
41
47
|
{
|
|
42
48
|
id: "workspaces-activity",
|
|
43
49
|
label: "Activity",
|
|
44
|
-
path:
|
|
45
|
-
icon: /* @__PURE__ */
|
|
50
|
+
path: y(g, "activity"),
|
|
51
|
+
icon: /* @__PURE__ */ f(a, { size: 20 }),
|
|
46
52
|
order: 40,
|
|
47
53
|
group: "workspaces"
|
|
48
54
|
}
|
|
49
55
|
];
|
|
50
|
-
return
|
|
56
|
+
return m(e);
|
|
51
57
|
}, [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
m,
|
|
59
|
+
g,
|
|
60
|
+
b
|
|
55
61
|
]), r(() => {
|
|
56
|
-
if (
|
|
62
|
+
if (h) return h([{
|
|
57
63
|
id: "workspaces-status",
|
|
58
64
|
label: "Workspaces Ready",
|
|
59
65
|
type: "status",
|
|
60
66
|
order: 10,
|
|
61
67
|
section: "left"
|
|
62
68
|
}]);
|
|
63
|
-
}, [
|
|
69
|
+
}, [h]), /* @__PURE__ */ f(l, {
|
|
64
70
|
workspaceId: null,
|
|
65
71
|
gateway: "global",
|
|
66
72
|
defaultEnabled: !0,
|
|
67
|
-
children: /* @__PURE__ */
|
|
68
|
-
...
|
|
69
|
-
children: /* @__PURE__ */
|
|
73
|
+
children: /* @__PURE__ */ f(t, { children: /* @__PURE__ */ f(e, {
|
|
74
|
+
...p,
|
|
75
|
+
children: /* @__PURE__ */ f(n, {})
|
|
70
76
|
}) })
|
|
71
77
|
});
|
|
72
78
|
};
|
|
73
|
-
export {
|
|
79
|
+
export { p as WorkspacesRoot };
|
package/dist/WorkspacesRoutes.js
CHANGED
|
@@ -1,130 +1,131 @@
|
|
|
1
1
|
import { useWorkspacesContext as e } from "./providers/WorkspacesProvider.js";
|
|
2
2
|
import { WorkspaceContextPathSync as t } from "./components/WorkspaceContextPathSync.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { PendingInvitesRoute as n } from "./components/PendingInvitesRoute.js";
|
|
4
|
+
import { WorkspacesListPage as r } from "./pages/WorkspacesListPage.js";
|
|
5
|
+
import { Suspense as i, lazy as a } from "react";
|
|
6
|
+
import { FeatureGate as o } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import { Navigate as l, Route as u, Routes as d } from "react-router";
|
|
8
9
|
// src/WorkspacesRoutes.tsx
|
|
9
|
-
var
|
|
10
|
+
var f = a(() => import("./pages/CreateWorkspacePage.js").then((e) => ({ default: e.CreateWorkspacePage }))), p = a(() => import("./pages/WorkspaceDetailPage.js").then((e) => ({ default: e.WorkspaceDetailPage }))), m = a(() => import("./pages/WorkspaceSettingsPage.js").then((e) => ({ default: e.WorkspaceSettingsPage }))), h = a(() => import("./pages/ProjectsListPage.js").then((e) => ({ default: e.ProjectsListPage }))), g = a(() => import("./pages/ProjectDetailPage.js").then((e) => ({ default: e.ProjectDetailPage }))), _ = a(() => import("./pages/ProjectMembersPage.js").then((e) => ({ default: e.ProjectMembersPage }))), v = a(() => import("./pages/MembersListPage.js").then((e) => ({ default: e.MembersListPage }))), y = a(() => import("./pages/ActivityListPage.js").then((e) => ({ default: e.ActivityListPage }))), b = a(() => import("./pages/InviteAcceptancePage.js").then((e) => ({ default: e.InviteAcceptancePage }))), x = a(() => import("./pages/WorkspaceInvitePage.js").then((e) => ({ default: e.WorkspaceInvitePage })));
|
|
10
11
|
function S() {
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ s("div", {
|
|
12
13
|
className: "flex items-center justify-center h-64",
|
|
13
|
-
children: /* @__PURE__ */
|
|
14
|
+
children: /* @__PURE__ */ s("div", { className: "animate-spin rounded-full size-8 border-b-2 border-primary" })
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
17
|
function C() {
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ s("div", {
|
|
18
19
|
className: "flex h-full items-center justify-center p-8 text-center",
|
|
19
|
-
children: /* @__PURE__ */
|
|
20
|
+
children: /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h2", {
|
|
20
21
|
className: "text-lg font-semibold mb-2 text-text-primary",
|
|
21
22
|
children: "Feature Not Available"
|
|
22
|
-
}), /* @__PURE__ */
|
|
23
|
+
}), /* @__PURE__ */ s("p", {
|
|
23
24
|
className: "text-sm text-text-secondary",
|
|
24
25
|
children: "This feature is not currently available. Enable it under Feature Previews to access this functionality."
|
|
25
26
|
})] })
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
function w(e, t, n = !1) {
|
|
29
|
-
return /* @__PURE__ */ o
|
|
30
|
+
return /* @__PURE__ */ s(o, {
|
|
30
31
|
flag: e,
|
|
31
32
|
defaultValue: n,
|
|
32
|
-
fallback: /* @__PURE__ */
|
|
33
|
+
fallback: /* @__PURE__ */ s(C, {}),
|
|
33
34
|
children: t
|
|
34
35
|
});
|
|
35
36
|
}
|
|
36
37
|
function T() {
|
|
37
38
|
let { basePath: t = "/workspaces" } = e();
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ s(l, {
|
|
39
40
|
to: `${t}/list`,
|
|
40
41
|
replace: !0
|
|
41
42
|
});
|
|
42
43
|
}
|
|
43
44
|
function E() {
|
|
44
45
|
let { basePath: t = "/workspaces", workspaceId: n } = e();
|
|
45
|
-
return n ? /* @__PURE__ */
|
|
46
|
+
return n ? /* @__PURE__ */ s(l, {
|
|
46
47
|
to: `${t}/${n}/invite`,
|
|
47
48
|
replace: !0
|
|
48
|
-
}) : /* @__PURE__ */
|
|
49
|
+
}) : /* @__PURE__ */ s(x, {});
|
|
49
50
|
}
|
|
50
51
|
function D() {
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
fallback: /* @__PURE__ */
|
|
53
|
-
children: [/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ c(i, {
|
|
53
|
+
fallback: /* @__PURE__ */ s(S, {}),
|
|
54
|
+
children: [/* @__PURE__ */ s(t, {}), /* @__PURE__ */ c(d, { children: [
|
|
55
|
+
/* @__PURE__ */ s(u, {
|
|
55
56
|
index: !0,
|
|
56
|
-
element: /* @__PURE__ */
|
|
57
|
+
element: /* @__PURE__ */ s(l, {
|
|
57
58
|
to: "list",
|
|
58
59
|
replace: !0
|
|
59
60
|
})
|
|
60
61
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ s(u, {
|
|
62
63
|
path: "list",
|
|
63
|
-
element: /* @__PURE__ */
|
|
64
|
+
element: /* @__PURE__ */ s(r, {})
|
|
64
65
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ s(u, {
|
|
66
67
|
path: "new",
|
|
67
|
-
element: /* @__PURE__ */
|
|
68
|
+
element: /* @__PURE__ */ s(f, {})
|
|
68
69
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ s(u, {
|
|
70
71
|
path: "invites",
|
|
71
|
-
element: /* @__PURE__ */
|
|
72
|
+
element: /* @__PURE__ */ s(n, {})
|
|
72
73
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ s(u, {
|
|
74
75
|
path: "invite",
|
|
75
|
-
element: /* @__PURE__ */
|
|
76
|
+
element: /* @__PURE__ */ s(E, {})
|
|
76
77
|
}),
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ s(u, {
|
|
78
79
|
path: "invite/:invitationId",
|
|
79
|
-
element: /* @__PURE__ */
|
|
80
|
+
element: /* @__PURE__ */ s(b, {})
|
|
80
81
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ s(u, {
|
|
82
83
|
path: ":workspaceId",
|
|
83
|
-
element: /* @__PURE__ */
|
|
84
|
+
element: /* @__PURE__ */ s(p, {})
|
|
84
85
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ s(u, {
|
|
86
87
|
path: ":workspaceId/settings",
|
|
87
|
-
element: w("workspaces.settings", /* @__PURE__ */
|
|
88
|
+
element: w("workspaces.settings", /* @__PURE__ */ s(m, {}), !0)
|
|
88
89
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ s(u, {
|
|
90
91
|
path: ":workspaceId/invite",
|
|
91
|
-
element: /* @__PURE__ */
|
|
92
|
+
element: /* @__PURE__ */ s(x, {})
|
|
92
93
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ s(u, {
|
|
94
95
|
path: "projects",
|
|
95
|
-
element: /* @__PURE__ */
|
|
96
|
+
element: /* @__PURE__ */ s(h, {})
|
|
96
97
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ s(u, {
|
|
98
99
|
path: ":workspaceId/projects",
|
|
99
|
-
element: /* @__PURE__ */
|
|
100
|
+
element: /* @__PURE__ */ s(h, {})
|
|
100
101
|
}),
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ s(u, {
|
|
102
103
|
path: ":workspaceId/projects/:projectId",
|
|
103
|
-
element: /* @__PURE__ */
|
|
104
|
+
element: /* @__PURE__ */ s(g, {})
|
|
104
105
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ s(u, {
|
|
106
107
|
path: ":workspaceId/projects/:projectId/members",
|
|
107
|
-
element: /* @__PURE__ */
|
|
108
|
+
element: /* @__PURE__ */ s(_, {})
|
|
108
109
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ s(u, {
|
|
110
111
|
path: "members",
|
|
111
|
-
element: /* @__PURE__ */
|
|
112
|
+
element: /* @__PURE__ */ s(v, {})
|
|
112
113
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ s(u, {
|
|
114
115
|
path: ":workspaceId/members",
|
|
115
|
-
element: /* @__PURE__ */
|
|
116
|
+
element: /* @__PURE__ */ s(v, {})
|
|
116
117
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ s(u, {
|
|
118
119
|
path: "activity",
|
|
119
|
-
element: /* @__PURE__ */
|
|
120
|
+
element: /* @__PURE__ */ s(y, {})
|
|
120
121
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ s(u, {
|
|
122
123
|
path: ":workspaceId/activity",
|
|
123
|
-
element: /* @__PURE__ */
|
|
124
|
+
element: /* @__PURE__ */ s(y, {})
|
|
124
125
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ s(u, {
|
|
126
127
|
path: "*",
|
|
127
|
-
element: /* @__PURE__ */
|
|
128
|
+
element: /* @__PURE__ */ s(T, {})
|
|
128
129
|
})
|
|
129
130
|
] })]
|
|
130
131
|
});
|
|
@@ -1,111 +1,114 @@
|
|
|
1
1
|
import { useWorkspacesStore as e } from "../store/workspacesStore.js";
|
|
2
2
|
import { useCreateProject as t } from "../hooks/useProjectMutations.js";
|
|
3
3
|
import { useTr as n } from "../hooks/useTr.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { useIsFluidGridsVariant as r } from "../providers/WorkspacesProvider.js";
|
|
5
|
+
import { buildCreateProjectInput as i, generateProjectKey as a } from "../utils/createForms.js";
|
|
6
|
+
import { useMemo as o } from "react";
|
|
7
|
+
import { Button as s, OptionalFields as c, ResponsiveDialog as l, ResponsiveDialogContent as u, ResponsiveDialogDescription as d, ResponsiveDialogHeader as f, ResponsiveDialogTitle as p } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
9
|
+
import { FormControl as _, FormDescription as v, FormField as y, FormItem as b, FormLabel as x, FormMessage as S, FormProvider as C, Input as w, Textarea as T, useForm as E, z as D } from "@burdenoff/fe-libs/form";
|
|
8
10
|
// src/components/CreateProjectDialog.tsx
|
|
9
|
-
function
|
|
10
|
-
return
|
|
11
|
-
name:
|
|
12
|
-
key:
|
|
13
|
-
description:
|
|
11
|
+
function O(e) {
|
|
12
|
+
return D.object({
|
|
13
|
+
name: D.string().min(2, e("createProjectDialog.validation.nameMin", "Name must be at least 2 characters")).max(100, e("createProjectDialog.validation.nameMax", "Name must be less than 100 characters")),
|
|
14
|
+
key: D.string().min(2, e("createProjectDialog.validation.keyMin", "Key must be at least 2 characters")).max(10, e("createProjectDialog.validation.keyMax", "Key must be less than 10 characters")).regex(/^[A-Z0-9_-]+$/, e("createProjectDialog.validation.keyFormat", "Key must be uppercase letters, numbers, underscores, or hyphens")),
|
|
15
|
+
description: D.string().optional()
|
|
14
16
|
});
|
|
15
17
|
}
|
|
16
|
-
function
|
|
17
|
-
let
|
|
18
|
-
schema:
|
|
18
|
+
function k({ workspaceId: D }) {
|
|
19
|
+
let k = n(), A = r(), { isCreateProjectDialogOpen: j, closeCreateProjectDialog: M } = e(), { mutate: N, isPending: P } = t(D), F = o(() => O(k), [k]), I = E({
|
|
20
|
+
schema: F,
|
|
19
21
|
defaultValues: {
|
|
20
22
|
name: "",
|
|
21
23
|
key: "",
|
|
22
24
|
description: ""
|
|
23
25
|
}
|
|
24
|
-
}),
|
|
25
|
-
let t =
|
|
26
|
-
|
|
27
|
-
key: e.key,
|
|
28
|
-
config: e.description ? { description: e.description } : void 0
|
|
29
|
-
};
|
|
30
|
-
D(t, {
|
|
26
|
+
}), L = (e) => {
|
|
27
|
+
let t = i(e);
|
|
28
|
+
N(t, {
|
|
31
29
|
onSuccess: () => {
|
|
32
|
-
|
|
30
|
+
M(), I.reset();
|
|
33
31
|
},
|
|
34
32
|
onError: (e) => {
|
|
35
33
|
console.error("Failed to create project:", e);
|
|
36
34
|
}
|
|
37
35
|
});
|
|
38
|
-
},
|
|
39
|
-
e || (
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
}, R = (e) => {
|
|
37
|
+
e || (M(), I.reset());
|
|
38
|
+
}, z = !!I.formState.dirtyFields.key, B = (e) => {
|
|
39
|
+
z || I.setValue("key", a(e), { shouldValidate: I.formState.isSubmitted });
|
|
40
|
+
}, V = /* @__PURE__ */ h(y, {
|
|
41
|
+
control: I.control,
|
|
42
|
+
name: "key",
|
|
43
|
+
render: ({ field: e }) => /* @__PURE__ */ g(b, { children: [
|
|
44
|
+
/* @__PURE__ */ h(x, { children: k("createProjectDialog.keyLabel", "Project Key") }),
|
|
45
|
+
/* @__PURE__ */ h(_, { children: /* @__PURE__ */ h(w, {
|
|
46
|
+
...e,
|
|
47
|
+
placeholder: k("createProjectDialog.keyPlaceholder", "MYPROJ")
|
|
48
|
+
}) }),
|
|
49
|
+
/* @__PURE__ */ h(v, { children: k("createProjectDialog.keyHint", "Short identifier (uppercase letters, numbers, underscores)") }),
|
|
50
|
+
/* @__PURE__ */ h(S, {})
|
|
51
|
+
] })
|
|
52
|
+
}), H = /* @__PURE__ */ h(y, {
|
|
53
|
+
control: I.control,
|
|
54
|
+
name: "description",
|
|
55
|
+
render: ({ field: e }) => /* @__PURE__ */ g(b, { children: [
|
|
56
|
+
/* @__PURE__ */ h(x, { children: k("createProjectDialog.descriptionLabel", "Description (Optional)") }),
|
|
57
|
+
/* @__PURE__ */ h(_, { children: /* @__PURE__ */ h(T, {
|
|
58
|
+
...e,
|
|
59
|
+
placeholder: k("createProjectDialog.descriptionPlaceholder", "Brief description of the project"),
|
|
60
|
+
rows: 3
|
|
61
|
+
}) }),
|
|
62
|
+
/* @__PURE__ */ h(S, {})
|
|
63
|
+
] })
|
|
64
|
+
});
|
|
65
|
+
return /* @__PURE__ */ h(l, {
|
|
66
|
+
open: j,
|
|
67
|
+
onOpenChange: R,
|
|
68
|
+
children: /* @__PURE__ */ g(u, {
|
|
48
69
|
className: "sm:max-w-[500px]",
|
|
49
|
-
children: [/* @__PURE__ */
|
|
50
|
-
...
|
|
51
|
-
children: /* @__PURE__ */
|
|
52
|
-
onSubmit:
|
|
70
|
+
children: [/* @__PURE__ */ g(f, { children: [/* @__PURE__ */ h(p, { children: k("createProjectDialog.title", "Create Project") }), /* @__PURE__ */ h(d, { children: k("createProjectDialog.description", "Create a new project in your workspace. Projects help organize your work.") })] }), /* @__PURE__ */ h(C, {
|
|
71
|
+
...I,
|
|
72
|
+
children: /* @__PURE__ */ g("form", {
|
|
73
|
+
onSubmit: I.handleSubmit(L),
|
|
53
74
|
className: "space-y-4",
|
|
54
75
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
control:
|
|
76
|
+
/* @__PURE__ */ h(y, {
|
|
77
|
+
control: I.control,
|
|
57
78
|
name: "name",
|
|
58
|
-
render: ({ field: e }) => /* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
79
|
+
render: ({ field: e }) => /* @__PURE__ */ g(b, { children: [
|
|
80
|
+
/* @__PURE__ */ h(x, { children: k("createProjectDialog.nameLabel", "Project Name") }),
|
|
81
|
+
/* @__PURE__ */ h(_, { children: /* @__PURE__ */ h(w, {
|
|
61
82
|
...e,
|
|
62
|
-
placeholder:
|
|
83
|
+
placeholder: k("createProjectDialog.namePlaceholder", "My Project"),
|
|
63
84
|
onChange: (t) => {
|
|
64
|
-
e.onChange(t),
|
|
85
|
+
e.onChange(t), B(t.target.value);
|
|
65
86
|
}
|
|
66
87
|
}) }),
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
] })
|
|
70
|
-
}),
|
|
71
|
-
/* @__PURE__ */ i(m, {
|
|
72
|
-
control: A.control,
|
|
73
|
-
name: "key",
|
|
74
|
-
render: ({ field: e }) => /* @__PURE__ */ a(h, { children: [
|
|
75
|
-
/* @__PURE__ */ i(g, { children: w("createProjectDialog.keyLabel", "Project Key") }),
|
|
76
|
-
/* @__PURE__ */ i(f, { children: /* @__PURE__ */ i(y, {
|
|
77
|
-
...e,
|
|
78
|
-
placeholder: w("createProjectDialog.keyPlaceholder", "MYPROJ")
|
|
79
|
-
}) }),
|
|
80
|
-
/* @__PURE__ */ i(p, { children: w("createProjectDialog.keyHint", "Short identifier (uppercase letters, numbers, underscores)") }),
|
|
81
|
-
/* @__PURE__ */ i(_, {})
|
|
82
|
-
] })
|
|
83
|
-
}),
|
|
84
|
-
/* @__PURE__ */ i(m, {
|
|
85
|
-
control: A.control,
|
|
86
|
-
name: "description",
|
|
87
|
-
render: ({ field: e }) => /* @__PURE__ */ a(h, { children: [
|
|
88
|
-
/* @__PURE__ */ i(g, { children: w("createProjectDialog.descriptionLabel", "Description (Optional)") }),
|
|
89
|
-
/* @__PURE__ */ i(f, { children: /* @__PURE__ */ i(b, {
|
|
90
|
-
...e,
|
|
91
|
-
placeholder: w("createProjectDialog.descriptionPlaceholder", "Brief description of the project"),
|
|
92
|
-
rows: 3
|
|
93
|
-
}) }),
|
|
94
|
-
/* @__PURE__ */ i(_, {})
|
|
88
|
+
/* @__PURE__ */ h(v, { children: k("createProjectDialog.nameHint", "A descriptive name for your project") }),
|
|
89
|
+
/* @__PURE__ */ h(S, {})
|
|
95
90
|
] })
|
|
96
91
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
92
|
+
A ? /* @__PURE__ */ g(m, { children: [I.formState.errors.key?.message ? /* @__PURE__ */ h("p", {
|
|
93
|
+
role: "alert",
|
|
94
|
+
className: "text-sm text-status-error-text",
|
|
95
|
+
children: I.formState.errors.key.message
|
|
96
|
+
}) : null, /* @__PURE__ */ g(c, {
|
|
97
|
+
storageKey: "workspaces.createProject",
|
|
98
|
+
children: [V, H]
|
|
99
|
+
})] }) : /* @__PURE__ */ g(m, { children: [V, H] }),
|
|
100
|
+
/* @__PURE__ */ g("div", {
|
|
98
101
|
className: "flex justify-end gap-3 pt-4",
|
|
99
|
-
children: [/* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ h(s, {
|
|
100
103
|
type: "button",
|
|
101
104
|
variant: "outline",
|
|
102
|
-
onClick: () =>
|
|
103
|
-
disabled:
|
|
104
|
-
children:
|
|
105
|
-
}), /* @__PURE__ */
|
|
105
|
+
onClick: () => R(!1),
|
|
106
|
+
disabled: P,
|
|
107
|
+
children: k("common.cancel", "Cancel")
|
|
108
|
+
}), /* @__PURE__ */ h(s, {
|
|
106
109
|
type: "submit",
|
|
107
|
-
disabled:
|
|
108
|
-
children:
|
|
110
|
+
disabled: P,
|
|
111
|
+
children: P ? k("createProjectDialog.creating", "Creating...") : k("createProjectDialog.submit", "Create Project")
|
|
109
112
|
})]
|
|
110
113
|
})
|
|
111
114
|
]
|
|
@@ -114,4 +117,4 @@ function w({ workspaceId: S }) {
|
|
|
114
117
|
})
|
|
115
118
|
});
|
|
116
119
|
}
|
|
117
|
-
export {
|
|
120
|
+
export { k as CreateProjectDialog };
|