@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
|
@@ -1,234 +1,265 @@
|
|
|
1
1
|
import { useWorkspacesStore as e } from "../store/workspacesStore.js";
|
|
2
2
|
import { nativeConfirm as t, nativeImpact as n } from "../utils/nativeBridge.js";
|
|
3
3
|
import { useMyProjects as r } from "../hooks/useProjects.js";
|
|
4
|
-
import { useArchiveProject as i, useDeleteProject as
|
|
5
|
-
import { ProjectCard as
|
|
6
|
-
import { CreateProjectDialog as
|
|
7
|
-
import { useWorkspacePermissions as
|
|
8
|
-
import { useWorkspacesPageView as
|
|
9
|
-
import { tWithFallback as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
4
|
+
import { useArchiveProject as i, useDeleteProject as ee, useUnarchiveProject as te } from "../hooks/useProjectMutations.js";
|
|
5
|
+
import { ProjectCard as ne } from "../components/ProjectCard.js";
|
|
6
|
+
import { CreateProjectDialog as re } from "../components/CreateProjectDialog.js";
|
|
7
|
+
import { useWorkspacePermissions as a } from "../hooks/useWorkspacePermissions.js";
|
|
8
|
+
import { useWorkspacesPageView as o } from "../hooks/useWorkspacesPageView.js";
|
|
9
|
+
import { tWithFallback as s } from "../utils/i18n.js";
|
|
10
|
+
import { useTr as ie } from "../hooks/useTr.js";
|
|
11
|
+
import { useIsFluidGridsVariant as ae } from "../providers/WorkspacesProvider.js";
|
|
12
|
+
import { getProjectDisplayTags as oe } from "../utils/projectTags.js";
|
|
13
|
+
import { useEffect as c, useMemo as l, useState as u } from "react";
|
|
14
|
+
import { Grid3x3 as se, List as ce, ListChecks as le, Plus as d, Search as ue, SlidersHorizontal as de } from "lucide-react";
|
|
15
|
+
import { Button as f, Card as fe, CardContent as p, GlassCard as m, IllustratedEmptyState as pe, Input as me, PageContainer as he, PagePurpose as ge, Select as h, SelectContent as g, SelectItem as _, SelectTrigger as v, SelectValue as y, Skeleton as b } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
import { Fragment as _e, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
17
|
+
import { useI18n as ve } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
18
|
+
import { useParams as ye } from "react-router";
|
|
19
|
+
import { useDebounce as be } from "@burdenoff/fe-libs/shared/hooks";
|
|
20
|
+
import { TagBadge as xe } from "@burdenoff/fe-libs/tag";
|
|
19
21
|
// src/pages/ProjectsListPage.tsx
|
|
20
|
-
function
|
|
21
|
-
let { t:
|
|
22
|
-
|
|
23
|
-
workspaceId:
|
|
22
|
+
function C() {
|
|
23
|
+
let { t: C } = ve(), w = ie(), T = ae(), { workspaceId: E } = ye();
|
|
24
|
+
o("workspaces.projects", {
|
|
25
|
+
workspaceId: E,
|
|
24
26
|
requireParams: !0
|
|
25
27
|
});
|
|
26
|
-
let { viewMode:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
-
|
|
28
|
+
let { viewMode: D, setViewMode: O, projectFilters: k, setProjectFilters: A, clearProjectFilters: Se, selectedProjectIds: j, toggleProjectSelection: M, clearProjectSelection: N, openCreateProjectDialog: Ce, isCreateProjectDialogOpen: we } = e(), [P, F] = u(k.search || ""), [I, L] = u([]), [R, z] = u(!0), [B, Te] = u(() => !!k.status || k.archived !== void 0), [V, Ee] = u(!1), De = !T || B, Oe = !T || V, ke = be(P, 500);
|
|
29
|
+
c(() => {
|
|
30
|
+
A({ search: ke });
|
|
31
|
+
}, [ke, A]), c(() => {
|
|
32
|
+
I.length === 0 ? A({
|
|
31
33
|
tagIds: void 0,
|
|
32
34
|
tagHierarchyPaths: void 0,
|
|
33
35
|
matchAllTags: void 0,
|
|
34
36
|
includeDescendants: void 0
|
|
35
|
-
}) :
|
|
36
|
-
tagIds:
|
|
37
|
-
tagHierarchyPaths:
|
|
38
|
-
matchAllTags:
|
|
37
|
+
}) : A({
|
|
38
|
+
tagIds: I.map((e) => e.tagId),
|
|
39
|
+
tagHierarchyPaths: I.map((e) => e.hierarchyPath).filter((e) => typeof e == "string" && e.length > 0),
|
|
40
|
+
matchAllTags: R,
|
|
39
41
|
includeDescendants: !0
|
|
40
42
|
});
|
|
41
43
|
}, [
|
|
44
|
+
I,
|
|
42
45
|
R,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
let { data: U, isLoading: W, error: G } = r({
|
|
46
|
+
A
|
|
47
|
+
]), c(() => () => N(), [N]);
|
|
48
|
+
let { data: H, isLoading: U, error: W } = r({
|
|
47
49
|
limit: 500,
|
|
48
50
|
offset: 0
|
|
49
|
-
}),
|
|
50
|
-
let e =
|
|
51
|
+
}), G = l(() => {
|
|
52
|
+
let e = H?.items ?? [], t = (k.search ?? "").trim().toLowerCase(), n = k.tagIds ?? [], r = k.matchAllTags ?? !0, i = (e) => !E || e.workspaceId === E, ee = (e) => !t || e.name.toLowerCase().includes(t) || e.key.toLowerCase().includes(t), te = (e) => !k.status || e.status === k.status, ne = (e) => k.archived === void 0 || e.archived === k.archived, re = (e) => {
|
|
51
53
|
if (n.length === 0) return !0;
|
|
52
|
-
let t = new Set(
|
|
54
|
+
let t = new Set(oe(e).map((e) => e.tagId));
|
|
53
55
|
return r ? n.every((e) => t.has(e)) : n.some((e) => t.has(e));
|
|
54
|
-
},
|
|
56
|
+
}, a = e.filter((e) => i(e) && ee(e) && te(e) && ne(e) && re(e)), o = H?.total ?? a.length, s = H?.hasMore ?? !1;
|
|
55
57
|
return {
|
|
56
|
-
items:
|
|
57
|
-
total:
|
|
58
|
-
hasMore:
|
|
58
|
+
items: a,
|
|
59
|
+
total: E || n.length > 0 ? a.length : o,
|
|
60
|
+
hasMore: s
|
|
59
61
|
};
|
|
60
62
|
}, [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
]), { mutateAsync:
|
|
67
|
-
if (
|
|
63
|
+
H?.items,
|
|
64
|
+
H?.total,
|
|
65
|
+
H?.hasMore,
|
|
66
|
+
k,
|
|
67
|
+
E
|
|
68
|
+
]), { mutateAsync: Ae } = i(E), { mutateAsync: je } = te(E), { mutateAsync: Me } = ee(E), K = l(() => G?.items.filter((e) => j.has(e.id)) ?? [], [G?.items, j]), q = l(() => K.filter((e) => !e.archived), [K]), J = l(() => K.filter((e) => e.archived), [K]), Y = (G?.items.length ?? 0) > 0 && (G?.items ?? []).every((e) => j.has(e.id)), Ne = (G?.items ?? []).some((e) => j.has(e.id)) && !Y, { canCreateProject: X, canUpdateProject: Pe, canDeleteProject: Z, canArchiveProject: Q, isLoading: Fe } = a();
|
|
69
|
+
if (Fe) return /* @__PURE__ */ S("div", {
|
|
68
70
|
className: "space-y-4 p-6",
|
|
69
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ x(b, { className: "h-10 w-1/3" }), /* @__PURE__ */ S("div", {
|
|
70
72
|
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
71
73
|
children: [
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ x(b, { className: "h-32" }),
|
|
75
|
+
/* @__PURE__ */ x(b, { className: "h-32" }),
|
|
76
|
+
/* @__PURE__ */ x(b, { className: "h-32" })
|
|
75
77
|
]
|
|
76
78
|
})]
|
|
77
79
|
});
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
},
|
|
80
|
+
let Ie = () => {
|
|
81
|
+
Ce({});
|
|
82
|
+
}, Le = (e) => {
|
|
81
83
|
if (e === "all") {
|
|
82
|
-
let e = { ...
|
|
83
|
-
delete e.status,
|
|
84
|
-
} else
|
|
85
|
-
},
|
|
84
|
+
let e = { ...k };
|
|
85
|
+
delete e.status, A(e);
|
|
86
|
+
} else A({ status: e });
|
|
87
|
+
}, Re = (e) => {
|
|
86
88
|
if (e === "all") {
|
|
87
|
-
let e = { ...
|
|
88
|
-
delete e.archived,
|
|
89
|
-
} else
|
|
89
|
+
let e = { ...k };
|
|
90
|
+
delete e.archived, A(e);
|
|
91
|
+
} else A({ archived: e === "true" });
|
|
90
92
|
}, $ = (e) => {
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
(
|
|
96
|
-
e !==
|
|
93
|
+
L((t) => t.some((t) => t.tagId === e.tagId) ? t.filter((t) => t.tagId !== e.tagId) : [...t, e]);
|
|
94
|
+
}, ze = () => {
|
|
95
|
+
F(""), L([]), z(!0), Se();
|
|
96
|
+
}, Be = (e) => {
|
|
97
|
+
(G?.items ?? []).forEach((t) => {
|
|
98
|
+
e !== j.has(t.id) && M(t.id);
|
|
97
99
|
});
|
|
98
100
|
};
|
|
99
|
-
return /* @__PURE__ */
|
|
101
|
+
return /* @__PURE__ */ x(he, {
|
|
100
102
|
padded: !1,
|
|
101
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ S("div", {
|
|
102
104
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
|
|
103
105
|
children: [
|
|
104
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ S("div", {
|
|
105
107
|
className: "flex flex-col sm:flex-row sm:items-center justify-between gap-4",
|
|
106
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h1", {
|
|
107
109
|
className: "text-2xl sm:text-3xl font-bold",
|
|
108
|
-
children:
|
|
109
|
-
}), /* @__PURE__ */
|
|
110
|
+
children: s(C, "projectsList.pageTitle", "Projects")
|
|
111
|
+
}), /* @__PURE__ */ x("p", {
|
|
110
112
|
className: "text-text-secondary",
|
|
111
|
-
children:
|
|
112
|
-
})] }), /* @__PURE__ */
|
|
113
|
+
children: s(C, "projectsList.pageSubtitle", "Manage and organize your projects")
|
|
114
|
+
})] }), /* @__PURE__ */ S("div", {
|
|
113
115
|
className: "flex items-center gap-2",
|
|
114
|
-
children: [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
variant: k === "grid" ? "secondary" : "ghost",
|
|
118
|
-
size: "sm",
|
|
119
|
-
onClick: () => A("grid"),
|
|
120
|
-
className: "size-8 p-0",
|
|
121
|
-
"aria-label": d(D, "projectsList.gridViewAriaLabel", "Show projects in grid view"),
|
|
122
|
-
children: /* @__PURE__ */ g(te, { size: 16 })
|
|
123
|
-
}), /* @__PURE__ */ g(v, {
|
|
124
|
-
variant: k === "list" ? "secondary" : "ghost",
|
|
116
|
+
children: [
|
|
117
|
+
T && E && (Q || Z) && (G?.items.length ?? 0) > 0 ? /* @__PURE__ */ S(f, {
|
|
118
|
+
variant: V ? "secondary" : "outline",
|
|
125
119
|
size: "sm",
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
120
|
+
"aria-pressed": V,
|
|
121
|
+
onClick: () => {
|
|
122
|
+
V && N(), Ee(!V);
|
|
123
|
+
},
|
|
124
|
+
children: [/* @__PURE__ */ x(le, {
|
|
125
|
+
className: "size-4 sm:mr-2",
|
|
126
|
+
"aria-hidden": "true"
|
|
127
|
+
}), /* @__PURE__ */ x("span", {
|
|
128
|
+
className: "sr-only sm:not-sr-only",
|
|
129
|
+
children: w("projectsList.select", "Select")
|
|
130
|
+
})]
|
|
131
|
+
}) : null,
|
|
132
|
+
/* @__PURE__ */ S("div", {
|
|
133
|
+
className: "flex items-center gap-1 border rounded-lg p-1",
|
|
134
|
+
children: [/* @__PURE__ */ x(f, {
|
|
135
|
+
variant: D === "grid" ? "secondary" : "ghost",
|
|
136
|
+
size: "sm",
|
|
137
|
+
onClick: () => O("grid"),
|
|
138
|
+
className: "size-8 p-0",
|
|
139
|
+
"aria-label": s(C, "projectsList.gridViewAriaLabel", "Show projects in grid view"),
|
|
140
|
+
children: /* @__PURE__ */ x(se, { size: 16 })
|
|
141
|
+
}), /* @__PURE__ */ x(f, {
|
|
142
|
+
variant: D === "list" ? "secondary" : "ghost",
|
|
143
|
+
size: "sm",
|
|
144
|
+
onClick: () => O("list"),
|
|
145
|
+
className: "size-8 p-0",
|
|
146
|
+
"aria-label": s(C, "projectsList.listViewAriaLabel", "Show projects in list view"),
|
|
147
|
+
children: /* @__PURE__ */ x(ce, { size: 16 })
|
|
148
|
+
})]
|
|
149
|
+
}),
|
|
150
|
+
X && /* @__PURE__ */ S(f, {
|
|
151
|
+
onClick: Ie,
|
|
152
|
+
children: [/* @__PURE__ */ x(d, { className: "size-4 sm:mr-2" }), /* @__PURE__ */ x("span", {
|
|
153
|
+
className: "hidden sm:inline",
|
|
154
|
+
children: s(C, "projectsList.createProject", "Create Project")
|
|
155
|
+
})]
|
|
156
|
+
})
|
|
157
|
+
]
|
|
138
158
|
})]
|
|
139
159
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ x(ge, { children: s(C, "projectsList.purpose", "Projects are the individual streams of work inside your workspaces — a launch, a client engagement, a feature. Each carries its own members, tags and activity. Use search, status and tag filters to find the one you need, or create a new project to start tracking work.") }),
|
|
161
|
+
/* @__PURE__ */ S("div", {
|
|
142
162
|
className: "flex flex-col sm:flex-row gap-3",
|
|
143
163
|
children: [
|
|
144
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ S("div", {
|
|
145
165
|
className: "relative flex-1",
|
|
146
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ x(ue, {
|
|
147
167
|
className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-text-secondary",
|
|
148
168
|
size: 18
|
|
149
|
-
}), /* @__PURE__ */
|
|
150
|
-
placeholder:
|
|
151
|
-
value:
|
|
152
|
-
onChange: (e) =>
|
|
169
|
+
}), /* @__PURE__ */ x(me, {
|
|
170
|
+
placeholder: s(C, "projectsList.searchPlaceholder", "Search projects..."),
|
|
171
|
+
value: P,
|
|
172
|
+
onChange: (e) => F(e.target.value),
|
|
153
173
|
className: "pl-[3.25rem]"
|
|
154
174
|
})]
|
|
155
175
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
176
|
+
T ? /* @__PURE__ */ S(f, {
|
|
177
|
+
variant: B ? "secondary" : "outline",
|
|
178
|
+
"aria-expanded": B,
|
|
179
|
+
onClick: () => Te(!B),
|
|
180
|
+
children: [/* @__PURE__ */ x(de, {
|
|
181
|
+
className: "size-4 mr-2",
|
|
182
|
+
"aria-hidden": "true"
|
|
183
|
+
}), w("projectsList.filters", "Filters")]
|
|
184
|
+
}) : null,
|
|
185
|
+
De ? /* @__PURE__ */ S(_e, { children: [
|
|
186
|
+
/* @__PURE__ */ S(h, {
|
|
187
|
+
value: k.status || "all",
|
|
188
|
+
onValueChange: Le,
|
|
189
|
+
children: [/* @__PURE__ */ x(v, {
|
|
190
|
+
className: "w-full sm:w-[180px]",
|
|
191
|
+
children: /* @__PURE__ */ x(y, { placeholder: s(C, "projectsList.filterByStatus", "Filter by status") })
|
|
192
|
+
}), /* @__PURE__ */ S(g, { children: [
|
|
193
|
+
/* @__PURE__ */ x(_, {
|
|
194
|
+
value: "all",
|
|
195
|
+
children: s(C, "projectsList.statusAll", "All Statuses")
|
|
196
|
+
}),
|
|
197
|
+
/* @__PURE__ */ x(_, {
|
|
198
|
+
value: "ACTIVE",
|
|
199
|
+
children: s(C, "projectsList.statusActive", "Active")
|
|
200
|
+
}),
|
|
201
|
+
/* @__PURE__ */ x(_, {
|
|
202
|
+
value: "INACTIVE",
|
|
203
|
+
children: s(C, "projectsList.statusInactive", "Inactive")
|
|
204
|
+
})
|
|
205
|
+
] })]
|
|
206
|
+
}),
|
|
207
|
+
/* @__PURE__ */ S(h, {
|
|
208
|
+
value: k.archived === void 0 ? "all" : k.archived ? "true" : "false",
|
|
209
|
+
onValueChange: Re,
|
|
210
|
+
children: [/* @__PURE__ */ x(v, {
|
|
211
|
+
className: "w-full sm:w-[180px]",
|
|
212
|
+
children: /* @__PURE__ */ x(y, { placeholder: s(C, "projectsList.filterByArchive", "Filter by archive") })
|
|
213
|
+
}), /* @__PURE__ */ S(g, { children: [
|
|
214
|
+
/* @__PURE__ */ x(_, {
|
|
215
|
+
value: "all",
|
|
216
|
+
children: s(C, "projectsList.archiveAll", "All Projects")
|
|
217
|
+
}),
|
|
218
|
+
/* @__PURE__ */ x(_, {
|
|
219
|
+
value: "false",
|
|
220
|
+
children: T ? w("projectsList.archiveNotArchived", "Not archived") : s(C, "projectsList.archiveActiveProjects", "Active Projects")
|
|
221
|
+
}),
|
|
222
|
+
/* @__PURE__ */ x(_, {
|
|
223
|
+
value: "true",
|
|
224
|
+
children: s(C, "projectsList.archiveArchived", "Archived")
|
|
225
|
+
})
|
|
226
|
+
] })]
|
|
227
|
+
}),
|
|
228
|
+
(k.search || k.status || k.archived !== void 0 || I.length > 0) && /* @__PURE__ */ x(f, {
|
|
229
|
+
variant: "outline",
|
|
230
|
+
onClick: ze,
|
|
231
|
+
children: s(C, "projectsList.clearFilters", "Clear Filters")
|
|
232
|
+
})
|
|
233
|
+
] }) : null
|
|
203
234
|
]
|
|
204
235
|
}),
|
|
205
|
-
|
|
236
|
+
I.length > 0 && /* @__PURE__ */ S("div", {
|
|
206
237
|
className: "flex flex-col gap-3 rounded-lg border border-border-seam bg-bg-surface px-4 py-3",
|
|
207
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ S("div", {
|
|
208
239
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
209
|
-
children: [/* @__PURE__ */
|
|
240
|
+
children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
210
241
|
className: "text-sm font-medium",
|
|
211
|
-
children:
|
|
212
|
-
}), /* @__PURE__ */
|
|
242
|
+
children: s(C, "projectsList.activeTagFilters", "Active tag filters")
|
|
243
|
+
}), /* @__PURE__ */ x("p", {
|
|
213
244
|
className: "text-xs text-text-secondary",
|
|
214
|
-
children:
|
|
215
|
-
})] }), /* @__PURE__ */
|
|
216
|
-
value:
|
|
217
|
-
onValueChange: (e) =>
|
|
218
|
-
children: [/* @__PURE__ */
|
|
245
|
+
children: s(C, "projectsList.activeTagFiltersDescription", "Click a project tag to add or remove it from the current filter set.")
|
|
246
|
+
})] }), /* @__PURE__ */ S(h, {
|
|
247
|
+
value: R ? "all" : "any",
|
|
248
|
+
onValueChange: (e) => z(e === "all"),
|
|
249
|
+
children: [/* @__PURE__ */ x(v, {
|
|
219
250
|
className: "w-full sm:w-[180px]",
|
|
220
|
-
children: /* @__PURE__ */
|
|
221
|
-
}), /* @__PURE__ */
|
|
251
|
+
children: /* @__PURE__ */ x(y, { placeholder: s(C, "projectsList.tagMatchMode", "Tag match mode") })
|
|
252
|
+
}), /* @__PURE__ */ S(g, { children: [/* @__PURE__ */ x(_, {
|
|
222
253
|
value: "all",
|
|
223
|
-
children:
|
|
224
|
-
}), /* @__PURE__ */
|
|
254
|
+
children: s(C, "projectsList.tagMatchAll", "Match all tags")
|
|
255
|
+
}), /* @__PURE__ */ x(_, {
|
|
225
256
|
value: "any",
|
|
226
|
-
children:
|
|
257
|
+
children: s(C, "projectsList.tagMatchAny", "Match any tag")
|
|
227
258
|
})] })]
|
|
228
259
|
})]
|
|
229
|
-
}), /* @__PURE__ */
|
|
260
|
+
}), /* @__PURE__ */ x("div", {
|
|
230
261
|
className: "flex flex-wrap gap-2",
|
|
231
|
-
children:
|
|
262
|
+
children: I.map((e) => /* @__PURE__ */ x(xe, {
|
|
232
263
|
id: e.tagId,
|
|
233
264
|
label: e.label,
|
|
234
265
|
color: e.color ?? void 0,
|
|
@@ -240,162 +271,162 @@ function D() {
|
|
|
240
271
|
}, e.tagId))
|
|
241
272
|
})]
|
|
242
273
|
}),
|
|
243
|
-
|
|
274
|
+
W && /* @__PURE__ */ x(m, {
|
|
244
275
|
treatment: "plain",
|
|
245
276
|
className: "border-status-error-border",
|
|
246
|
-
children: /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ x(p, {
|
|
247
278
|
className: "pt-6",
|
|
248
|
-
children: /* @__PURE__ */
|
|
279
|
+
children: /* @__PURE__ */ S("div", {
|
|
249
280
|
className: "flex flex-col items-center justify-center py-8 text-center",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
281
|
+
children: [/* @__PURE__ */ x("p", {
|
|
251
282
|
className: "text-status-error-text font-semibold mb-2",
|
|
252
|
-
children:
|
|
253
|
-
}), /* @__PURE__ */
|
|
283
|
+
children: s(C, "projectsList.errorLoading", "Error loading projects")
|
|
284
|
+
}), /* @__PURE__ */ x("p", {
|
|
254
285
|
className: "text-sm text-text-secondary",
|
|
255
|
-
children:
|
|
286
|
+
children: W instanceof Error ? W.message : s(C, "projectsList.unknownError", "An unknown error occurred")
|
|
256
287
|
})]
|
|
257
288
|
})
|
|
258
289
|
})
|
|
259
290
|
}),
|
|
260
|
-
|
|
291
|
+
U && /* @__PURE__ */ x("div", {
|
|
261
292
|
className: "grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",
|
|
262
|
-
children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */
|
|
293
|
+
children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ x(fe, {
|
|
263
294
|
className: "border-border-seam",
|
|
264
|
-
children: /* @__PURE__ */
|
|
295
|
+
children: /* @__PURE__ */ x(p, {
|
|
265
296
|
className: "pt-6",
|
|
266
|
-
children: /* @__PURE__ */
|
|
297
|
+
children: /* @__PURE__ */ S("div", {
|
|
267
298
|
className: "space-y-3",
|
|
268
299
|
children: [
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ x(b, { className: "size-12 rounded-lg" }),
|
|
301
|
+
/* @__PURE__ */ x(b, { className: "h-4 w-3/4" }),
|
|
302
|
+
/* @__PURE__ */ x(b, { className: "h-4 w-1/2" })
|
|
272
303
|
]
|
|
273
304
|
})
|
|
274
305
|
})
|
|
275
306
|
}, t))
|
|
276
307
|
}),
|
|
277
|
-
!
|
|
308
|
+
!U && !W && G?.items.length === 0 && /* @__PURE__ */ x(m, {
|
|
278
309
|
treatment: "plain",
|
|
279
310
|
className: "border-border-seam",
|
|
280
|
-
children: /* @__PURE__ */
|
|
311
|
+
children: /* @__PURE__ */ x(p, {
|
|
281
312
|
className: "pt-6",
|
|
282
|
-
children: /* @__PURE__ */
|
|
283
|
-
illustration:
|
|
284
|
-
title:
|
|
285
|
-
description:
|
|
286
|
-
action: !
|
|
287
|
-
onClick:
|
|
288
|
-
children: [/* @__PURE__ */
|
|
313
|
+
children: /* @__PURE__ */ x(pe, {
|
|
314
|
+
illustration: k.search ? "empty-search" : "empty-data",
|
|
315
|
+
title: s(C, "projectsList.noProjectsFound", "No projects found"),
|
|
316
|
+
description: k.search ? s(C, "projectsList.adjustSearchOrFilters", "Try adjusting your search or filters") : s(C, "projectsList.createFirstProject", "Create your first project to get started organizing your work"),
|
|
317
|
+
action: !k.search && X ? /* @__PURE__ */ S(f, {
|
|
318
|
+
onClick: Ie,
|
|
319
|
+
children: [/* @__PURE__ */ x(d, {
|
|
289
320
|
size: 16,
|
|
290
321
|
className: "mr-2"
|
|
291
|
-
}),
|
|
322
|
+
}), s(C, "projectsList.createProject", "Create Project")]
|
|
292
323
|
}) : void 0
|
|
293
324
|
})
|
|
294
325
|
})
|
|
295
326
|
}),
|
|
296
|
-
!
|
|
297
|
-
/* @__PURE__ */
|
|
327
|
+
!U && !W && G && G.items.length > 0 && /* @__PURE__ */ S(_e, { children: [
|
|
328
|
+
Oe ? /* @__PURE__ */ S("div", {
|
|
298
329
|
className: "flex flex-col gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 sm:flex-row sm:items-center sm:justify-between",
|
|
299
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ S("label", {
|
|
300
331
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
332
|
+
children: [/* @__PURE__ */ x("input", {
|
|
302
333
|
type: "checkbox",
|
|
303
|
-
checked:
|
|
334
|
+
checked: Y,
|
|
304
335
|
ref: (e) => {
|
|
305
|
-
e && (e.indeterminate =
|
|
336
|
+
e && (e.indeterminate = Ne && !Y);
|
|
306
337
|
},
|
|
307
|
-
onChange: (e) =>
|
|
308
|
-
"aria-label":
|
|
338
|
+
onChange: (e) => Be(e.target.checked),
|
|
339
|
+
"aria-label": s(C, "projectsList.selectAllAriaLabel", "Select all projects"),
|
|
309
340
|
className: "size-4 rounded border-border-subtle text-primary"
|
|
310
|
-
}), /* @__PURE__ */
|
|
311
|
-
}), /* @__PURE__ */
|
|
341
|
+
}), /* @__PURE__ */ x("span", { children: s(C, "projectsList.selectAllVisible", "Select all visible") })]
|
|
342
|
+
}), /* @__PURE__ */ S("div", {
|
|
312
343
|
className: "flex flex-wrap items-center gap-2",
|
|
313
344
|
children: [
|
|
314
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ S("span", {
|
|
315
346
|
className: "text-sm text-text-secondary",
|
|
316
347
|
children: [
|
|
317
|
-
|
|
348
|
+
j.size,
|
|
318
349
|
" ",
|
|
319
|
-
|
|
350
|
+
s(C, "projectsList.selected", "selected")
|
|
320
351
|
]
|
|
321
352
|
}),
|
|
322
|
-
|
|
353
|
+
j.size > 0 && /* @__PURE__ */ x(f, {
|
|
323
354
|
variant: "ghost",
|
|
324
355
|
size: "sm",
|
|
325
|
-
onClick:
|
|
326
|
-
children:
|
|
356
|
+
onClick: N,
|
|
357
|
+
children: s(C, "projectsList.clearSelection", "Clear selection")
|
|
327
358
|
}),
|
|
328
|
-
|
|
359
|
+
E && Q && /* @__PURE__ */ S(f, {
|
|
329
360
|
variant: "outline",
|
|
330
361
|
size: "sm",
|
|
331
362
|
onClick: async () => {
|
|
332
|
-
|
|
363
|
+
q.length !== 0 && (await Promise.allSettled(q.map((e) => Ae(e.id))), N());
|
|
333
364
|
},
|
|
334
|
-
disabled:
|
|
335
|
-
children: [
|
|
365
|
+
disabled: q.length === 0,
|
|
366
|
+
children: [s(C, "projectsList.archiveSelected", "Archive Selected"), q.length > 0 ? ` (${q.length})` : ""]
|
|
336
367
|
}),
|
|
337
|
-
|
|
368
|
+
E && Q && /* @__PURE__ */ S(f, {
|
|
338
369
|
variant: "outline",
|
|
339
370
|
size: "sm",
|
|
340
371
|
onClick: async () => {
|
|
341
|
-
|
|
372
|
+
J.length !== 0 && (await Promise.allSettled(J.map((e) => je(e.id))), N());
|
|
342
373
|
},
|
|
343
|
-
disabled:
|
|
344
|
-
children: [
|
|
374
|
+
disabled: J.length === 0,
|
|
375
|
+
children: [s(C, "projectsList.unarchiveSelected", "Unarchive Selected"), J.length > 0 ? ` (${J.length})` : ""]
|
|
345
376
|
}),
|
|
346
|
-
|
|
377
|
+
E && Z && /* @__PURE__ */ S(f, {
|
|
347
378
|
variant: "outline",
|
|
348
379
|
size: "sm",
|
|
349
380
|
onClick: async () => {
|
|
350
|
-
if (
|
|
381
|
+
if (K.length === 0) return;
|
|
351
382
|
n("medium");
|
|
352
|
-
let e =
|
|
353
|
-
title:
|
|
383
|
+
let e = T ? w("projectsList.bulkDeleteConfirmNamed", "Delete {{names}}? All of their data is removed for good. This cannot be undone.", { names: K.map((e) => `"${e.name}"`).join(", ") }) : s(C, "projectsList.bulkDeleteConfirmPrefix", "Delete ") + K.length + " " + s(C, "projectsList.bulkDeleteConfirmProject", "selected project") + (K.length === 1 ? "" : s(C, "projectsList.bulkDeleteConfirmPluralSuffix", "s")) + s(C, "projectsList.bulkDeleteConfirmSuffix", "? This cannot be undone."), r = await t({
|
|
384
|
+
title: s(C, "projectsList.deleteProjectsTitle", "Delete projects"),
|
|
354
385
|
message: e,
|
|
355
|
-
okButtonTitle:
|
|
356
|
-
cancelButtonTitle:
|
|
386
|
+
okButtonTitle: s(C, "common.delete", "Delete"),
|
|
387
|
+
cancelButtonTitle: s(C, "common.cancel", "Cancel")
|
|
357
388
|
});
|
|
358
|
-
(r === null ? window.confirm(e) : r) && (await Promise.allSettled(
|
|
389
|
+
(r === null ? window.confirm(e) : r) && (await Promise.allSettled(K.map((e) => Me(e.id))), N());
|
|
359
390
|
},
|
|
360
|
-
disabled:
|
|
391
|
+
disabled: K.length === 0,
|
|
361
392
|
className: "text-status-error-text",
|
|
362
|
-
children: [
|
|
393
|
+
children: [s(C, "projectsList.deleteSelected", "Delete Selected"), K.length > 0 ? ` (${K.length})` : ""]
|
|
363
394
|
})
|
|
364
395
|
]
|
|
365
396
|
})]
|
|
366
|
-
}),
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
-
className:
|
|
369
|
-
children:
|
|
397
|
+
}) : null,
|
|
398
|
+
/* @__PURE__ */ x("div", {
|
|
399
|
+
className: D === "list" ? "space-y-3" : "grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",
|
|
400
|
+
children: G.items.map((e) => /* @__PURE__ */ x(ne, {
|
|
370
401
|
project: e,
|
|
371
|
-
selected:
|
|
402
|
+
selected: j.has(e.id),
|
|
372
403
|
canArchive: Q,
|
|
373
|
-
canDelete:
|
|
374
|
-
canRename:
|
|
404
|
+
canDelete: Z,
|
|
405
|
+
canRename: Pe,
|
|
375
406
|
onTagClick: $,
|
|
376
|
-
onToggleSelect: (t) => {
|
|
377
|
-
t !==
|
|
378
|
-
}
|
|
407
|
+
onToggleSelect: Oe ? (t) => {
|
|
408
|
+
t !== j.has(e.id) && M(e.id);
|
|
409
|
+
} : void 0
|
|
379
410
|
}, e.id))
|
|
380
411
|
}),
|
|
381
|
-
|
|
412
|
+
G.total > G.items.length && /* @__PURE__ */ S("div", {
|
|
382
413
|
className: "text-center text-sm text-text-secondary",
|
|
383
414
|
children: [
|
|
384
|
-
|
|
415
|
+
s(C, "projectsList.showingPrefix", "Showing"),
|
|
385
416
|
" ",
|
|
386
|
-
|
|
417
|
+
G.items.length,
|
|
387
418
|
" ",
|
|
388
|
-
|
|
419
|
+
s(C, "projectsList.showingOf", "of"),
|
|
389
420
|
" ",
|
|
390
|
-
|
|
421
|
+
G.total,
|
|
391
422
|
" ",
|
|
392
|
-
|
|
423
|
+
s(C, "projectsList.showingProjects", "projects")
|
|
393
424
|
]
|
|
394
425
|
})
|
|
395
426
|
] }),
|
|
396
|
-
|
|
427
|
+
we && /* @__PURE__ */ x(re, { workspaceId: E })
|
|
397
428
|
]
|
|
398
429
|
})
|
|
399
430
|
});
|
|
400
431
|
}
|
|
401
|
-
export {
|
|
432
|
+
export { C as ProjectsListPage };
|