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