@burdenoff/microfe-workspaces 2026.1109.1 → 2026.1110.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 (102) hide show
  1. package/dist/WorkspacesRoot.js +10 -9
  2. package/dist/WorkspacesRoutes.js +1 -2
  3. package/dist/components/CreateProjectDialog.js +22 -22
  4. package/dist/components/CreateWorkspaceDialog.js +8 -9
  5. package/dist/components/InviteMemberDialog.js +18 -23
  6. package/dist/components/MemberListItem.js +16 -17
  7. package/dist/components/ProjectCard.js +14 -15
  8. package/dist/components/ProjectMemberPickerDialog.js +92 -93
  9. package/dist/components/RenameProjectDialog.js +12 -17
  10. package/dist/components/WorkspaceCard.js +6 -7
  11. package/dist/components/WorkspaceContextPathSync.js +4 -5
  12. package/dist/components/WorkspacesErrorBoundary.js +6 -11
  13. package/dist/components/index.js +8 -7
  14. package/dist/components/tags/ProjectTagsWidget.js +56 -57
  15. package/dist/components/tags/WorkspaceTagsEditor.js +2 -3
  16. package/dist/constants/permissions.js +1 -2
  17. package/dist/generated/global-operations.js +1 -2
  18. package/dist/generated/wspace-operations.js +1 -2
  19. package/dist/hooks/index.js +9 -8
  20. package/dist/hooks/useMemberMutations.js +165 -166
  21. package/dist/hooks/useOpenWorkspace.js +1 -2
  22. package/dist/hooks/useOrgsWithPermission.js +2 -3
  23. package/dist/hooks/usePendingInvitations.d.ts +1 -1
  24. package/dist/hooks/usePendingInvitations.js +2 -3
  25. package/dist/hooks/useProjectMemberMutations.js +23 -24
  26. package/dist/hooks/useProjectMembers.d.ts +2 -2
  27. package/dist/hooks/useProjectMembers.js +2 -3
  28. package/dist/hooks/useProjectMutations.js +68 -69
  29. package/dist/hooks/useProjects.d.ts +3 -3
  30. package/dist/hooks/useProjects.js +5 -6
  31. package/dist/hooks/useScopedNavigation.js +1 -2
  32. package/dist/hooks/useTenants.d.ts +2 -2
  33. package/dist/hooks/useTenants.js +3 -4
  34. package/dist/hooks/useTr.js +1 -2
  35. package/dist/hooks/useWorkspaceActivity.d.ts +1 -1
  36. package/dist/hooks/useWorkspaceActivity.js +2 -3
  37. package/dist/hooks/useWorkspaceMembers.d.ts +5 -5
  38. package/dist/hooks/useWorkspaceMembers.js +7 -8
  39. package/dist/hooks/useWorkspaceMutations.js +70 -71
  40. package/dist/hooks/useWorkspacePermissions.js +1 -2
  41. package/dist/hooks/useWorkspaceRoles.d.ts +1 -1
  42. package/dist/hooks/useWorkspaceRoles.js +3 -4
  43. package/dist/hooks/useWorkspaces.d.ts +3 -3
  44. package/dist/hooks/useWorkspaces.js +4 -5
  45. package/dist/hooks/useWorkspacesEventEmitter.js +1 -2
  46. package/dist/hooks/useWorkspacesPageView.js +1 -2
  47. package/dist/index.js +15 -15
  48. package/dist/pages/ActivityListPage.js +28 -29
  49. package/dist/pages/CreateWorkspacePage.js +137 -138
  50. package/dist/pages/InviteAcceptancePage.js +65 -66
  51. package/dist/pages/MembersListPage.js +203 -204
  52. package/dist/pages/PendingInvitesPage.js +63 -64
  53. package/dist/pages/ProjectDetailPage.js +71 -72
  54. package/dist/pages/ProjectMembersPage.js +116 -117
  55. package/dist/pages/ProjectsListPage.js +62 -67
  56. package/dist/pages/WorkspaceDetailPage.js +153 -154
  57. package/dist/pages/WorkspaceInvitePage.js +88 -92
  58. package/dist/pages/WorkspaceSettingsPage.js +32 -33
  59. package/dist/pages/WorkspacesListPage.js +40 -41
  60. package/dist/pages/dashboard/DashboardCustomizer.js +98 -94
  61. package/dist/pages/dashboard/DashboardGrid.js +1 -2
  62. package/dist/pages/dashboard/DashboardPage.js +12 -13
  63. package/dist/pages/dashboard/WidgetWrapper.js +3 -3
  64. package/dist/pages/dashboard/config.js +3 -4
  65. package/dist/pages/dashboard/hooks/useDashboardData.d.ts +5 -5
  66. package/dist/pages/dashboard/hooks/useDashboardData.js +9 -10
  67. package/dist/pages/dashboard/hooks/useDashboardPreferences.js +7 -8
  68. package/dist/pages/dashboard/reorder.js +11 -14
  69. package/dist/pages/dashboard/widgets/AgentsWidget.js +13 -14
  70. package/dist/pages/dashboard/widgets/GroupsWidget.js +9 -10
  71. package/dist/pages/dashboard/widgets/MembersWidget.js +10 -11
  72. package/dist/pages/dashboard/widgets/ProjectsWidget.js +11 -12
  73. package/dist/pages/dashboard/widgets/QuickActionsWidget.js +28 -29
  74. package/dist/pages/dashboard/widgets/RecentActivityWidget.js +22 -23
  75. package/dist/pages/dashboard/widgets/SessionsWidget.js +28 -29
  76. package/dist/pages/dashboard/widgets/StorageWidget.js +19 -20
  77. package/dist/pages/dashboard/widgets/TagCloudWidget.js +9 -10
  78. package/dist/pages/dashboard/widgets/TipsWidget.js +5 -6
  79. package/dist/pages/dashboard/widgets/UpcomingEventsWidget.js +17 -18
  80. package/dist/pages/dashboard/widgets/VibesWidget.js +13 -14
  81. package/dist/pages/dashboard/widgets/WelcomeWidget.js +11 -12
  82. package/dist/pages/dashboard/widgets/WorkflowRunsWidget.js +16 -17
  83. package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js +11 -12
  84. package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.js +17 -18
  85. package/dist/pages/dashboard/widgets/WorkspacesWidget.js +7 -8
  86. package/dist/pages/dashboard/widgets/tipsCatalog.js +1 -2
  87. package/dist/providers/WorkspacesProvider.js +1 -2
  88. package/dist/store/workspacesStore.d.ts +1 -1
  89. package/dist/store/workspacesStore.js +1 -2
  90. package/dist/test/happydom.d.ts +1 -0
  91. package/dist/translations/en.js +1 -2
  92. package/dist/utils/formatters.js +1 -2
  93. package/dist/utils/i18n.js +1 -2
  94. package/dist/utils/invitationDisplay.js +1 -2
  95. package/dist/utils/nativeBridge.js +1 -2
  96. package/dist/utils/pinnedRequest.js +2 -3
  97. package/dist/utils/projectTags.js +2 -3
  98. package/dist/utils/slug.js +1 -2
  99. package/dist/utils/telemetryError.js +13 -16
  100. package/dist/utils/tokenHelpers.js +1 -2
  101. package/dist/utils/workspaceBulkInviteCsv.js +3 -8
  102. package/package.json +72 -55
@@ -1,12 +1,12 @@
1
- import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
2
- import { DeleteWorkspaceDocument as t, UpdateWorkspaceDocument as n } from "../generated/wspace-operations.js";
3
- import { ActivateGlobalWorkspaceDocument as r, ArchiveGlobalWorkspaceDocument as i, UpdateGlobalWorkspaceDocument as a } from "../generated/global-operations.js";
4
- import { useWorkspacesEventEmitter as o } from "./useWorkspacesEventEmitter.js";
5
- import { captureRequestActor as s, pinnedFetch as c } from "../utils/pinnedRequest.js";
1
+ import { captureRequestActor as e, pinnedFetch as t } from "../utils/pinnedRequest.js";
2
+ import { useWorkspacesContext as n } from "../providers/WorkspacesProvider.js";
3
+ import { useWorkspacesEventEmitter as r } from "./useWorkspacesEventEmitter.js";
4
+ import { DeleteWorkspaceDocument as i, UpdateWorkspaceDocument as a } from "../generated/wspace-operations.js";
5
+ import { ActivateGlobalWorkspaceDocument as o, ArchiveGlobalWorkspaceDocument as s, UpdateGlobalWorkspaceDocument as c } from "../generated/global-operations.js";
6
6
  import { safeTelemetryError as l } from "../utils/telemetryError.js";
7
7
  import { useMutation as u, useQueryClient as d } from "@tanstack/react-query";
8
8
  import { print as f } from "graphql";
9
- //#region src/hooks/useWorkspaceMutations.ts
9
+ // src/hooks/useWorkspaceMutations.ts
10
10
  var p = "\n mutation CreateGlobalWorkspace($input: CreateWorkspaceInput!) {\n createWorkspace(input: $input) {\n id\n name\n slug\n type\n status\n tenantId\n organizationId\n createdAt\n }\n }\n";
11
11
  function m(e, t) {
12
12
  e.invalidateQueries({ queryKey: ["workspaces"] }), t && (e.invalidateQueries({ queryKey: ["workspace", t] }), e.invalidateQueries({ queryKey: [
@@ -16,62 +16,62 @@ function m(e, t) {
16
16
  ] })), e.invalidateQueries({ queryKey: ["myWorkspaces"] }), e.invalidateQueries({ queryKey: ["myTenants"] }), e.invalidateQueries({ queryKey: ["myOrganizations"] }), e.invalidateQueries({ queryKey: ["dashboard", "global"] });
17
17
  }
18
18
  var h = () => {
19
- let { authToken: t, currentUser: n, onWorkspaceCreate: r } = e(), i = d(), { emit: a } = o();
19
+ let { authToken: i, currentUser: a, onWorkspaceCreate: o } = n(), s = d(), { emit: c } = r();
20
20
  return u({
21
- mutationFn: async (e) => {
22
- let r = await c(s({
23
- authToken: t,
24
- currentUser: n
25
- }), {
21
+ mutationFn: async (n) => {
22
+ let r = e({
23
+ authToken: i,
24
+ currentUser: a
25
+ }), o = await t(r, {
26
26
  gateway: "global",
27
27
  query: p,
28
- variables: { input: e }
28
+ variables: { input: n }
29
29
  });
30
- if (r.errors?.length) throw Error(r.errors[0]?.message || "Failed to create workspace");
31
- return r.data.createWorkspace;
30
+ if (o.errors?.length) throw Error(o.errors[0]?.message || "Failed to create workspace");
31
+ return o.data.createWorkspace;
32
32
  },
33
33
  onSuccess: (e) => {
34
- m(i, e.id), a("workspace.created", {
34
+ m(s, e.id), c("workspace.created", {
35
35
  workspaceId: e.id,
36
36
  source: "microfe-workspaces"
37
- }), r && r(e);
37
+ }), o && o(e);
38
38
  },
39
39
  onError: (e) => {
40
- a("workspace.create_failed", {
40
+ c("workspace.create_failed", {
41
41
  source: "microfe-workspaces",
42
42
  errorMessage: l(e)
43
43
  });
44
44
  }
45
45
  });
46
46
  }, g = () => {
47
- let { authToken: t, currentUser: r } = e(), i = d(), { emit: p } = o();
47
+ let { authToken: i, currentUser: o } = n(), s = d(), { emit: p } = r();
48
48
  return u({
49
- mutationFn: async ({ id: e, input: i }) => {
50
- let o = s({
51
- authToken: t,
52
- currentUser: r
53
- }), { name: l, ...u } = i, d;
49
+ mutationFn: async ({ id: n, input: r }) => {
50
+ let s = e({
51
+ authToken: i,
52
+ currentUser: o
53
+ }), { name: l, ...u } = r, d;
54
54
  if (l !== void 0) {
55
- let t = await c(o, {
55
+ let e = await t(s, {
56
56
  gateway: "global",
57
- query: f(a),
57
+ query: f(c),
58
58
  variables: {
59
- id: e,
59
+ id: n,
60
60
  input: { name: l }
61
61
  }
62
62
  });
63
- if (t.errors?.length) throw Error(t.errors[0]?.message || "GraphQL error");
64
- d = t.data.updateWorkspace;
63
+ if (e.errors?.length) throw Error(e.errors[0]?.message || "GraphQL error");
64
+ d = e.data.updateWorkspace;
65
65
  }
66
66
  if (!Object.values(u).some((e) => e !== void 0)) {
67
67
  if (!d) throw Error("No workspace changes were provided");
68
68
  return d;
69
69
  }
70
- let p = await c(o, {
70
+ let p = await t(s, {
71
71
  gateway: "workspace",
72
- query: f(n),
72
+ query: f(a),
73
73
  variables: {
74
- id: e,
74
+ id: n,
75
75
  input: u
76
76
  }
77
77
  });
@@ -82,10 +82,10 @@ var h = () => {
82
82
  };
83
83
  },
84
84
  onSuccess: (e) => {
85
- i.setQueryData(["workspace", e.id], (t) => ({
85
+ s.setQueryData(["workspace", e.id], (t) => ({
86
86
  ...t,
87
87
  ...e
88
- })), m(i, e.id), p("workspace.updated", {
88
+ })), m(s, e.id), p("workspace.updated", {
89
89
  workspaceId: e.id,
90
90
  source: "microfe-workspaces"
91
91
  });
@@ -99,28 +99,28 @@ var h = () => {
99
99
  }
100
100
  });
101
101
  }, _ = () => {
102
- let { authToken: n, currentUser: r } = e(), i = d(), { emit: a } = o();
102
+ let { authToken: a, currentUser: o } = n(), s = d(), { emit: c } = r();
103
103
  return u({
104
- mutationFn: async (e) => {
105
- let i = await c(s({
106
- authToken: n,
107
- currentUser: r
108
- }), {
104
+ mutationFn: async (n) => {
105
+ let r = e({
106
+ authToken: a,
107
+ currentUser: o
108
+ }), s = await t(r, {
109
109
  gateway: "workspace",
110
- query: f(t),
111
- variables: { id: e }
110
+ query: f(i),
111
+ variables: { id: n }
112
112
  });
113
- if (i.errors?.length) throw Error(i.errors[0]?.message || "GraphQL error");
114
- return i.data.deleteWorkspace;
113
+ if (s.errors?.length) throw Error(s.errors[0]?.message || "GraphQL error");
114
+ return s.data.deleteWorkspace;
115
115
  },
116
116
  onSuccess: (e, t) => {
117
- m(i, t), a("workspace.deleted", {
117
+ m(s, t), c("workspace.deleted", {
118
118
  workspaceId: t,
119
119
  source: "microfe-workspaces"
120
120
  });
121
121
  },
122
122
  onError: (e, t) => {
123
- a("workspace.delete_failed", {
123
+ c("workspace.delete_failed", {
124
124
  workspaceId: t,
125
125
  source: "microfe-workspaces",
126
126
  errorMessage: l(e)
@@ -128,28 +128,28 @@ var h = () => {
128
128
  }
129
129
  });
130
130
  }, v = () => {
131
- let { authToken: t, currentUser: n } = e(), r = d(), { emit: a } = o();
131
+ let { authToken: i, currentUser: a } = n(), o = d(), { emit: c } = r();
132
132
  return u({
133
- mutationFn: async (e) => {
134
- let r = await c(s({
135
- authToken: t,
136
- currentUser: n
137
- }), {
133
+ mutationFn: async (n) => {
134
+ let r = e({
135
+ authToken: i,
136
+ currentUser: a
137
+ }), o = await t(r, {
138
138
  gateway: "global",
139
- query: f(i),
140
- variables: { id: e }
139
+ query: f(s),
140
+ variables: { id: n }
141
141
  });
142
- if (r.errors?.length) throw Error(r.errors[0]?.message || "GraphQL error");
143
- return r.data.archiveWorkspace;
142
+ if (o.errors?.length) throw Error(o.errors[0]?.message || "GraphQL error");
143
+ return o.data.archiveWorkspace;
144
144
  },
145
145
  onSuccess: (e) => {
146
- m(r, e.id), a("workspace.archived", {
146
+ m(o, e.id), c("workspace.archived", {
147
147
  workspaceId: e.id,
148
148
  source: "microfe-workspaces"
149
149
  });
150
150
  },
151
151
  onError: (e, t) => {
152
- a("workspace.archive_failed", {
152
+ c("workspace.archive_failed", {
153
153
  workspaceId: t,
154
154
  source: "microfe-workspaces",
155
155
  errorMessage: l(e)
@@ -157,28 +157,28 @@ var h = () => {
157
157
  }
158
158
  });
159
159
  }, y = () => {
160
- let { authToken: t, currentUser: n } = e(), i = d(), { emit: a } = o();
160
+ let { authToken: i, currentUser: a } = n(), s = d(), { emit: c } = r();
161
161
  return u({
162
- mutationFn: async (e) => {
163
- let i = await c(s({
164
- authToken: t,
165
- currentUser: n
166
- }), {
162
+ mutationFn: async (n) => {
163
+ let r = e({
164
+ authToken: i,
165
+ currentUser: a
166
+ }), s = await t(r, {
167
167
  gateway: "global",
168
- query: f(r),
169
- variables: { id: e }
168
+ query: f(o),
169
+ variables: { id: n }
170
170
  });
171
- if (i.errors?.length) throw Error(i.errors[0]?.message || "GraphQL error");
172
- return i.data.activateWorkspace;
171
+ if (s.errors?.length) throw Error(s.errors[0]?.message || "GraphQL error");
172
+ return s.data.activateWorkspace;
173
173
  },
174
174
  onSuccess: (e) => {
175
- m(i, e.id), a("workspace.reactivated", {
175
+ m(s, e.id), c("workspace.reactivated", {
176
176
  workspaceId: e.id,
177
177
  source: "microfe-workspaces"
178
178
  });
179
179
  },
180
180
  onError: (e, t) => {
181
- a("workspace.reactivate_failed", {
181
+ c("workspace.reactivate_failed", {
182
182
  workspaceId: t,
183
183
  source: "microfe-workspaces",
184
184
  errorMessage: l(e)
@@ -186,5 +186,4 @@ var h = () => {
186
186
  }
187
187
  });
188
188
  };
189
- //#endregion
190
189
  export { v as useArchiveWorkspace, h as useCreateWorkspace, _ as useDeleteWorkspace, y as useReactivateWorkspace, g as useUpdateWorkspace };
@@ -1,6 +1,6 @@
1
1
  import { WORKSPACE_PERMISSIONS as e } from "../constants/permissions.js";
2
2
  import { usePermissions as t } from "@burdenoff/fe-libs/shared/providers/shell";
3
- //#region src/hooks/useWorkspacePermissions.ts
3
+ // src/hooks/useWorkspacePermissions.ts
4
4
  function n() {
5
5
  let { hasPermission: n, isLoading: r } = t();
6
6
  return {
@@ -31,5 +31,4 @@ function n() {
31
31
  canViewActivity: n(e.ACTIVITY_READ)
32
32
  };
33
33
  }
34
- //#endregion
35
34
  export { n as useWorkspacePermissions };
@@ -8,5 +8,5 @@ interface GraphqlErrorLike {
8
8
  message?: string | null;
9
9
  }
10
10
  export declare function isUnsupportedProductRoleFilterError(errors: readonly GraphqlErrorLike[]): boolean;
11
- export declare const useWorkspaceRoles: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<WorkspaceRoleOption[]>, Error>;
11
+ export declare const useWorkspaceRoles: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<WorkspaceRoleOption[], Error>;
12
12
  export {};
@@ -1,7 +1,7 @@
1
1
  import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
2
2
  import { useQuery as t } from "@tanstack/react-query";
3
3
  import { graphqlFetch as n } from "@burdenoff/fe-libs/shared/graphql";
4
- //#region src/hooks/useWorkspaceRoles.ts
4
+ // src/hooks/useWorkspaceRoles.ts
5
5
  var r = "\n query GetWorkspaceRoles($scopeId: String!, $filter: RoleFilterInput, $pagination: PaginationInput) {\n roles(scopeId: $scopeId, filter: $filter, pagination: $pagination) {\n id\n name\n description\n isSystem\n }\n }\n", i = "\n query GetWorkspaceRoles($scopeId: String!, $pagination: PaginationInput) {\n roles(scopeId: $scopeId, pagination: $pagination) {\n id\n name\n description\n isSystem\n }\n }\n";
6
6
  function a(e) {
7
7
  return e.some(({ message: e }) => e?.includes("RoleFilterInput") ? (e.includes("product") || e.includes("includePlatformRoles")) && (e.includes("not defined") || e.includes("Unknown field")) : !1);
@@ -44,8 +44,7 @@ var o = (o) => {
44
44
  return e.data?.roles ?? [];
45
45
  },
46
46
  enabled: !!u,
47
- staleTime: 300 * 1e3
47
+ staleTime: 3e5
48
48
  });
49
49
  };
50
- //#endregion
51
- export { o as useWorkspaceRoles };
50
+ export { a as isUnsupportedProductRoleFilterError, o as useWorkspaceRoles };
@@ -3,12 +3,12 @@ import { WorkspaceFilters, WorkspaceList, Workspace, PaginationInput } from '../
3
3
  * Hook to fetch all workspaces with filtering and pagination
4
4
  * Uses workspace token for authorization (x-workspace-id header)
5
5
  */
6
- export declare const useWorkspaces: (filters?: WorkspaceFilters, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<WorkspaceList>, Error>;
6
+ export declare const useWorkspaces: (filters?: WorkspaceFilters, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<WorkspaceList, Error>;
7
7
  /**
8
8
  * Hook to fetch a single workspace by ID
9
9
  * Uses workspace token for authorization (x-workspace-id header)
10
10
  */
11
- export declare const useWorkspace: (id: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<Workspace>, Error>;
11
+ export declare const useWorkspace: (id: string) => import('@tanstack/react-query').UseQueryResult<Workspace, Error>;
12
12
  /**
13
13
  * Hook to fetch current user's workspaces
14
14
  * NOTE: Uses global gateway because workspace listing is managed at the global/tenant layer
@@ -16,4 +16,4 @@ export declare const useWorkspace: (id: string) => import('@tanstack/react-query
16
16
  export declare const useMyWorkspaces: (pagination?: {
17
17
  limit?: number;
18
18
  offset?: number;
19
- }) => import('@tanstack/react-query').UseQueryResult<NoInfer<WorkspaceList>, Error>;
19
+ }) => import('@tanstack/react-query').UseQueryResult<WorkspaceList, Error>;
@@ -4,7 +4,7 @@ import { GetGlobalMyWorkspacesDocument as r } from "../generated/global-operatio
4
4
  import { useQuery as i } from "@tanstack/react-query";
5
5
  import { print as a } from "graphql";
6
6
  import { graphqlFetch as o } from "@burdenoff/fe-libs/shared/graphql";
7
- //#region src/hooks/useWorkspaces.ts
7
+ // src/hooks/useWorkspaces.ts
8
8
  var s = (t, r) => {
9
9
  let { authToken: s, tenantId: c } = e();
10
10
  return i({
@@ -28,7 +28,7 @@ var s = (t, r) => {
28
28
  if (e.errors?.length) throw Error(e.errors[0]?.message || "GraphQL error");
29
29
  return e.data.workspaces;
30
30
  },
31
- staleTime: 300 * 1e3,
31
+ staleTime: 3e5,
32
32
  retry: 1
33
33
  });
34
34
  }, c = (n) => {
@@ -47,7 +47,7 @@ var s = (t, r) => {
47
47
  return e.data.workspace;
48
48
  },
49
49
  enabled: !!n,
50
- staleTime: 300 * 1e3
50
+ staleTime: 3e5
51
51
  });
52
52
  }, l = (t) => {
53
53
  let { authToken: n } = e();
@@ -66,8 +66,7 @@ var s = (t, r) => {
66
66
  if (e.errors?.length) throw Error(e.errors[0]?.message || "GraphQL error");
67
67
  return e.data.myWorkspaces;
68
68
  },
69
- staleTime: 300 * 1e3
69
+ staleTime: 3e5
70
70
  });
71
71
  };
72
- //#endregion
73
72
  export { l as useMyWorkspaces, c as useWorkspace, s as useWorkspaces };
@@ -1,6 +1,6 @@
1
1
  import { useCallback as e } from "react";
2
2
  import { useEventBus as t } from "@burdenoff/fe-libs/shared/events";
3
- //#region src/hooks/useWorkspacesEventEmitter.ts
3
+ // src/hooks/useWorkspacesEventEmitter.ts
4
4
  function n() {
5
5
  let n = t();
6
6
  return { emit: e((e, t = {}) => {
@@ -9,5 +9,4 @@ function n() {
9
9
  } catch {}
10
10
  }, [n]) };
11
11
  }
12
- //#endregion
13
12
  export { n as useWorkspacesEventEmitter };
@@ -1,6 +1,6 @@
1
1
  import { useWorkspacesEventEmitter as e } from "./useWorkspacesEventEmitter.js";
2
2
  import { useEffect as t, useRef as n } from "react";
3
- //#region src/hooks/useWorkspacesPageView.ts
3
+ // src/hooks/useWorkspacesPageView.ts
4
4
  var r = (e) => typeof e == "string" && e.length > 0;
5
5
  function i(i, a) {
6
6
  let { emit: o } = e(), s = a?.workspaceId, c = a?.projectId, l = a?.requireParams ?? !1, u = a ? "workspaceId" in a : !1, d = a ? "projectId" in a : !1, f = n(null);
@@ -25,5 +25,4 @@ function i(i, a) {
25
25
  d
26
26
  ]);
27
27
  }
28
- //#endregion
29
28
  export { i as useWorkspacesPageView };
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import { WorkspacesProvider as e, useWorkspacesContext as t } from "./providers/WorkspacesProvider.js";
2
- import { WorkspacesErrorBoundary as n } from "./components/WorkspacesErrorBoundary.js";
3
- import { useWorkspacesStore as r } from "./store/workspacesStore.js";
4
- import { useMyWorkspaces as i, useWorkspace as a, useWorkspaces as o } from "./hooks/useWorkspaces.js";
5
- import { useMyPendingInvitations as s } from "./hooks/usePendingInvitations.js";
6
- import { getMemberRoleClasses as c, getMemberRoleLabel as l, getProjectStatusClasses as u, getProjectStatusIconClass as d, getProjectStatusLabel as f, getWorkspaceStatusBgClass as p, getWorkspaceStatusClasses as m, getWorkspaceStatusIconClass as h, getWorkspaceStatusLabel as g } from "./utils/tokenHelpers.js";
7
- import { WorkspaceCard as _ } from "./components/WorkspaceCard.js";
8
- import { WorkspacesRoot as v } from "./WorkspacesRoot.js";
9
- import { DashboardPage as y } from "./pages/dashboard/DashboardPage.js";
10
- import { useInfiniteWorkspaceMembers as b, useInvitation as x, useUserWorkspaces as S, useWorkspaceInvitations as C, useWorkspaceMember as w, useWorkspaceMembers as T } from "./hooks/useWorkspaceMembers.js";
11
- import { useAcceptInvitation as E, useAddWorkspaceMember as D, useBulkCreateInvitations as O, useCancelInvitation as k, useCreateInvitation as A, useDeleteInvitation as j, useRejectInvitation as M, useRemoveUserFromWorkspace as N, useRemoveWorkspaceMember as P, useResendInvitation as F, useUpdateInvitation as I } from "./hooks/useMemberMutations.js";
12
- import { InviteAcceptancePage as L } from "./pages/InviteAcceptancePage.js";
13
- import { PendingInvitesPage as R } from "./pages/PendingInvitesPage.js";
1
+ import { WorkspacesRoot as e } from "./WorkspacesRoot.js";
2
+ import { WorkspacesErrorBoundary as t } from "./components/WorkspacesErrorBoundary.js";
3
+ import { DashboardPage as n } from "./pages/dashboard/DashboardPage.js";
4
+ import { useMyWorkspaces as r, useWorkspace as i, useWorkspaces as a } from "./hooks/useWorkspaces.js";
5
+ import { useMyPendingInvitations as o } from "./hooks/usePendingInvitations.js";
6
+ import { getMemberRoleClasses as s, getMemberRoleLabel as c, getProjectStatusClasses as l, getProjectStatusIconClass as u, getProjectStatusLabel as d, getWorkspaceStatusBgClass as f, getWorkspaceStatusClasses as p, getWorkspaceStatusIconClass as m, getWorkspaceStatusLabel as h } from "./utils/tokenHelpers.js";
7
+ import { WorkspaceCard as g } from "./components/WorkspaceCard.js";
8
+ import { InviteAcceptancePage as _ } from "./pages/InviteAcceptancePage.js";
9
+ import { PendingInvitesPage as v } from "./pages/PendingInvitesPage.js";
10
+ import { useInfiniteWorkspaceMembers as y, useInvitation as b, useUserWorkspaces as x, useWorkspaceInvitations as S, useWorkspaceMember as C, useWorkspaceMembers as w } from "./hooks/useWorkspaceMembers.js";
11
+ import { useAcceptInvitation as T, useAddWorkspaceMember as E, useBulkCreateInvitations as D, useCancelInvitation as O, useCreateInvitation as k, useDeleteInvitation as A, useRejectInvitation as j, useRemoveUserFromWorkspace as M, useRemoveWorkspaceMember as N, useResendInvitation as P, useUpdateInvitation as F } from "./hooks/useMemberMutations.js";
12
+ import { WorkspaceInvitePage as I } from "./pages/WorkspaceInvitePage.js";
13
+ import { WorkspacesProvider as L, useWorkspacesContext as R } from "./providers/WorkspacesProvider.js";
14
14
  import { useMyProjects as z, useProject as B, useProjectMembersCount as V, useProjects as H } from "./hooks/useProjects.js";
15
- import { WorkspaceInvitePage as U } from "./pages/WorkspaceInvitePage.js";
15
+ import { useWorkspacesStore as U } from "./store/workspacesStore.js";
16
16
  import { useArchiveWorkspace as W, useCreateWorkspace as G, useDeleteWorkspace as K, useReactivateWorkspace as q, useUpdateWorkspace as J } from "./hooks/useWorkspaceMutations.js";
17
17
  import { useArchiveProject as Y, useCreateProject as X, useDeleteProject as Z, useTagProject as Q, useUnarchiveProject as $, useUntagProject as ee, useUpdateProject as te } from "./hooks/useProjectMutations.js";
18
18
  import { useMyOrganizations as ne, useMyTenants as re } from "./hooks/useTenants.js";
@@ -25,4 +25,4 @@ import { MemberListItem as ge } from "./components/MemberListItem.js";
25
25
  import { InviteMemberDialog as _e } from "./components/InviteMemberDialog.js";
26
26
  import "./components/index.js";
27
27
  import { enTranslations as ve } from "./translations/en.js";
28
- export { he as CreateProjectDialog, ie as CreateWorkspaceDialog, y as DashboardPage, L as InviteAcceptancePage, _e as InviteMemberDialog, ge as MemberListItem, R as PendingInvitesPage, me as ProjectCard, _ as WorkspaceCard, U as WorkspaceInvitePage, n as WorkspacesErrorBoundary, e as WorkspacesProvider, v as WorkspacesRoot, ve as enTranslations, ae as formatDate, oe as formatDateTime, se as formatFileSize, ce as formatProjectStatus, le as formatRelativeTime, ue as formatWorkspaceStatus, de as getInitials, c as getMemberRoleClasses, l as getMemberRoleLabel, u as getProjectStatusClasses, d as getProjectStatusIconClass, f as getProjectStatusLabel, p as getWorkspaceStatusBgClass, m as getWorkspaceStatusClasses, h as getWorkspaceStatusIconClass, g as getWorkspaceStatusLabel, fe as toTitleCase, pe as truncate, E as useAcceptInvitation, D as useAddWorkspaceMember, Y as useArchiveProject, W as useArchiveWorkspace, O as useBulkCreateInvitations, k as useCancelInvitation, A as useCreateInvitation, X as useCreateProject, G as useCreateWorkspace, j as useDeleteInvitation, Z as useDeleteProject, K as useDeleteWorkspace, b as useInfiniteWorkspaceMembers, x as useInvitation, ne as useMyOrganizations, s as useMyPendingInvitations, z as useMyProjects, re as useMyTenants, i as useMyWorkspaces, B as useProject, V as useProjectMembersCount, H as useProjects, q as useReactivateWorkspace, M as useRejectInvitation, N as useRemoveUserFromWorkspace, P as useRemoveWorkspaceMember, F as useResendInvitation, Q as useTagProject, $ as useUnarchiveProject, ee as useUntagProject, I as useUpdateInvitation, te as useUpdateProject, J as useUpdateWorkspace, S as useUserWorkspaces, a as useWorkspace, C as useWorkspaceInvitations, w as useWorkspaceMember, T as useWorkspaceMembers, o as useWorkspaces, t as useWorkspacesContext, r as useWorkspacesStore };
28
+ export { he as CreateProjectDialog, ie as CreateWorkspaceDialog, n as DashboardPage, _ as InviteAcceptancePage, _e as InviteMemberDialog, ge as MemberListItem, v as PendingInvitesPage, me as ProjectCard, g as WorkspaceCard, I as WorkspaceInvitePage, t as WorkspacesErrorBoundary, L as WorkspacesProvider, e as WorkspacesRoot, ve as enTranslations, ae as formatDate, oe as formatDateTime, se as formatFileSize, ce as formatProjectStatus, le as formatRelativeTime, ue as formatWorkspaceStatus, de as getInitials, s as getMemberRoleClasses, c as getMemberRoleLabel, l as getProjectStatusClasses, u as getProjectStatusIconClass, d as getProjectStatusLabel, f as getWorkspaceStatusBgClass, p as getWorkspaceStatusClasses, m as getWorkspaceStatusIconClass, h as getWorkspaceStatusLabel, fe as toTitleCase, pe as truncate, T as useAcceptInvitation, E as useAddWorkspaceMember, Y as useArchiveProject, W as useArchiveWorkspace, D as useBulkCreateInvitations, O as useCancelInvitation, k as useCreateInvitation, X as useCreateProject, G as useCreateWorkspace, A as useDeleteInvitation, Z as useDeleteProject, K as useDeleteWorkspace, y as useInfiniteWorkspaceMembers, b as useInvitation, ne as useMyOrganizations, o as useMyPendingInvitations, z as useMyProjects, re as useMyTenants, r as useMyWorkspaces, B as useProject, V as useProjectMembersCount, H as useProjects, q as useReactivateWorkspace, j as useRejectInvitation, M as useRemoveUserFromWorkspace, N as useRemoveWorkspaceMember, P as useResendInvitation, Q as useTagProject, $ as useUnarchiveProject, ee as useUntagProject, F as useUpdateInvitation, te as useUpdateProject, J as useUpdateWorkspace, x as useUserWorkspaces, i as useWorkspace, S as useWorkspaceInvitations, C as useWorkspaceMember, w as useWorkspaceMembers, a as useWorkspaces, R as useWorkspacesContext, U as useWorkspacesStore };
@@ -1,20 +1,20 @@
1
- import { tWithFallback as e } from "../utils/i18n.js";
2
- import { useWorkspacesPageView as t } from "../hooks/useWorkspacesPageView.js";
3
- import { useWorkspacePermissions as n } from "../hooks/useWorkspacePermissions.js";
1
+ import { useWorkspaceActivity as e } from "../hooks/useWorkspaceActivity.js";
2
+ import { useWorkspacePermissions as t } from "../hooks/useWorkspacePermissions.js";
3
+ import { useWorkspacesPageView as n } from "../hooks/useWorkspacesPageView.js";
4
4
  import { formatDate as r } from "../utils/formatters.js";
5
- import { useWorkspaceActivity as i } from "../hooks/useWorkspaceActivity.js";
5
+ import { tWithFallback as i } from "../utils/i18n.js";
6
6
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
7
  import { CardContent as s, CardHeader as c, CardTitle as l, GlassCard as u, IllustratedEmptyState as d, PagePurpose as f, Skeleton as p } from "@burdenoff/fe-libs/ui";
8
8
  import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
9
  import { useParams as h } from "react-router";
10
- //#region src/pages/ActivityListPage.tsx
10
+ // src/pages/ActivityListPage.tsx
11
11
  function g() {
12
12
  let { t: g } = m(), { workspaceId: _ } = h();
13
- t("workspaces.activity", {
13
+ n("workspaces.activity", {
14
14
  workspaceId: _,
15
15
  requireParams: !0
16
16
  });
17
- let { data: v, isLoading: y, error: b } = i(_), { canViewActivity: x, isLoading: S } = n();
17
+ let { data: v, isLoading: y, error: b } = e(_), { canViewActivity: x, isLoading: S } = t();
18
18
  return S ? /* @__PURE__ */ o("div", {
19
19
  className: "space-y-4 p-6",
20
20
  children: [/* @__PURE__ */ a(p, { className: "h-10 w-1/3" }), /* @__PURE__ */ a(p, { className: "h-64" })]
@@ -23,83 +23,83 @@ function g() {
23
23
  children: [
24
24
  /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("h1", {
25
25
  className: "text-2xl sm:text-3xl font-bold",
26
- children: e(g, "activityList.title", "Activity")
26
+ children: i(g, "activityList.title", "Activity")
27
27
  }), /* @__PURE__ */ a("p", {
28
28
  className: "text-text-secondary",
29
- children: e(g, "activityList.description", "Track workspace activity")
29
+ children: i(g, "activityList.description", "Track workspace activity")
30
30
  })] }),
31
- /* @__PURE__ */ a(f, { children: e(g, "activityList.purpose", "This is the audit trail for the workspace — a running log of who did what and when. Use it to catch up after time away, confirm a change went through, or investigate when and by whom a project or member was modified.") }),
31
+ /* @__PURE__ */ a(f, { children: i(g, "activityList.purpose", "This is the audit trail for the workspace — a running log of who did what and when. Use it to catch up after time away, confirm a change went through, or investigate when and by whom a project or member was modified.") }),
32
32
  y ? /* @__PURE__ */ a(u, {
33
33
  treatment: "plain",
34
34
  className: "border-border-seam",
35
35
  children: /* @__PURE__ */ a(s, {
36
36
  className: "py-8 text-sm text-text-muted",
37
- children: e(g, "activityList.loading", "Loading activity…")
37
+ children: i(g, "activityList.loading", "Loading activity…")
38
38
  })
39
39
  }) : b ? /* @__PURE__ */ a(u, {
40
40
  treatment: "plain",
41
41
  className: "border-border-seam",
42
42
  children: /* @__PURE__ */ a(s, {
43
43
  className: "py-8 text-sm text-status-error-text",
44
- children: b instanceof Error ? b.message : e(g, "activityList.loadError", "Failed to load activity")
44
+ children: b instanceof Error ? b.message : i(g, "activityList.loadError", "Failed to load activity")
45
45
  })
46
46
  }) : (v?.length ?? 0) === 0 ? /* @__PURE__ */ a(d, {
47
47
  illustration: "empty-data",
48
- title: e(g, "activityList.emptyTitle", "No recent activity"),
49
- description: e(g, "activityList.emptyDescription", "Recent workspace actions will appear here as your team creates, updates, and manages work.")
48
+ title: i(g, "activityList.emptyTitle", "No recent activity"),
49
+ description: i(g, "activityList.emptyDescription", "Recent workspace actions will appear here as your team creates, updates, and manages work.")
50
50
  }) : /* @__PURE__ */ a("div", {
51
51
  className: "space-y-3",
52
- children: v?.map((t) => /* @__PURE__ */ o(u, {
52
+ children: v?.map((e) => /* @__PURE__ */ o(u, {
53
53
  treatment: "insight",
54
54
  className: "border-border-seam",
55
55
  children: [/* @__PURE__ */ a(c, {
56
56
  className: "pb-2",
57
57
  children: /* @__PURE__ */ a(l, {
58
58
  className: "text-base",
59
- children: t.description || t.action
59
+ children: e.description || e.action
60
60
  })
61
61
  }), /* @__PURE__ */ o(s, {
62
62
  className: "space-y-1 text-sm text-text-muted",
63
63
  children: [
64
64
  /* @__PURE__ */ o("p", { children: [
65
- e(g, "activityList.labelAction", "Action"),
65
+ i(g, "activityList.labelAction", "Action"),
66
66
  ":",
67
67
  " ",
68
68
  /* @__PURE__ */ a("span", {
69
69
  className: "text-text-primary",
70
- children: t.action
70
+ children: e.action
71
71
  })
72
72
  ] }),
73
- t.resourceType && /* @__PURE__ */ o("p", { children: [
74
- e(g, "activityList.labelResource", "Resource"),
73
+ e.resourceType && /* @__PURE__ */ o("p", { children: [
74
+ i(g, "activityList.labelResource", "Resource"),
75
75
  ":",
76
76
  " ",
77
77
  /* @__PURE__ */ a("span", {
78
78
  className: "text-text-primary",
79
- children: t.resourceType
79
+ children: e.resourceType
80
80
  })
81
81
  ] }),
82
82
  /* @__PURE__ */ o("p", { children: [
83
- e(g, "activityList.labelWhen", "When"),
83
+ i(g, "activityList.labelWhen", "When"),
84
84
  ":",
85
85
  " ",
86
86
  /* @__PURE__ */ a("span", {
87
87
  className: "text-text-primary",
88
- children: r(t.timestamp)
88
+ children: r(e.timestamp)
89
89
  })
90
90
  ] }),
91
91
  /* @__PURE__ */ o("p", { children: [
92
- e(g, "activityList.labelActor", "Actor"),
92
+ i(g, "activityList.labelActor", "Actor"),
93
93
  ":",
94
94
  " ",
95
95
  /* @__PURE__ */ a("span", {
96
96
  className: "break-all text-text-primary",
97
- children: t.userId
97
+ children: e.userId
98
98
  })
99
99
  ] })
100
100
  ]
101
101
  })]
102
- }, t.id))
102
+ }, e.id))
103
103
  })
104
104
  ]
105
105
  }) : /* @__PURE__ */ a("div", {
@@ -108,13 +108,12 @@ function g() {
108
108
  className: "text-center space-y-2",
109
109
  children: [/* @__PURE__ */ a("h2", {
110
110
  className: "text-lg font-semibold",
111
- children: e(g, "activityList.accessDenied", "Access Denied")
111
+ children: i(g, "activityList.accessDenied", "Access Denied")
112
112
  }), /* @__PURE__ */ a("p", {
113
113
  className: "text-sm text-text-secondary",
114
- children: e(g, "activityList.accessDeniedDescription", "You don't have permission to view activity.")
114
+ children: i(g, "activityList.accessDeniedDescription", "You don't have permission to view activity.")
115
115
  })]
116
116
  })
117
117
  });
118
118
  }
119
- //#endregion
120
119
  export { g as ActivityListPage };