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