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