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