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