@burdenoff/microfe-workspaces 2026.1120.1 → 2026.1121.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 (46) hide show
  1. package/dist/WorkspacesRoutes.js +83 -59
  2. package/dist/components/ProjectCard.js +48 -47
  3. package/dist/constants/navigationV2.d.ts +5 -0
  4. package/dist/constants/navigationV2.js +2 -2
  5. package/dist/generated/global-operations.d.ts +11 -1
  6. package/dist/generated/global-types.d.ts +9866 -574
  7. package/dist/generated/wspace-operations.d.ts +171 -2
  8. package/dist/generated/wspace-operations.js +1088 -52
  9. package/dist/generated/wspace-types.d.ts +193797 -41883
  10. package/dist/hooks/v2/useWorkspacePagesV2Data.d.ts +89 -0
  11. package/dist/hooks/v2/useWorkspacePagesV2Data.js +211 -0
  12. package/dist/index.d.ts +1 -1
  13. package/dist/pages/MembersListPage.js +101 -100
  14. package/dist/pages/ProjectMembersPage.js +116 -115
  15. package/dist/pages/ProjectsListPage.js +233 -232
  16. package/dist/pages/v2/ActivityPage.d.ts +1 -0
  17. package/dist/pages/v2/ActivityPage.js +150 -0
  18. package/dist/pages/v2/InvitePeopleDialog.d.ts +11 -0
  19. package/dist/pages/v2/InvitePeopleDialog.js +208 -0
  20. package/dist/pages/v2/InvitedTab.d.ts +9 -0
  21. package/dist/pages/v2/InvitedTab.js +223 -0
  22. package/dist/pages/v2/MembersPage.d.ts +1 -0
  23. package/dist/pages/v2/MembersPage.js +120 -0
  24. package/dist/pages/v2/PeopleTab.d.ts +20 -0
  25. package/dist/pages/v2/PeopleTab.js +253 -0
  26. package/dist/pages/v2/ProjectsPage.d.ts +1 -0
  27. package/dist/pages/v2/ProjectsPage.js +242 -0
  28. package/dist/pages/v2/WorkspacesPage.d.ts +3 -0
  29. package/dist/pages/v2/WorkspacesPage.js +247 -0
  30. package/dist/pages/v2/activitySentences.d.ts +50 -0
  31. package/dist/pages/v2/activitySentences.js +288 -0
  32. package/dist/pages/v2/inviteEmails.d.ts +12 -0
  33. package/dist/pages/v2/inviteEmails.js +18 -0
  34. package/dist/pages/v2/memberRows.d.ts +54 -0
  35. package/dist/pages/v2/memberRows.js +51 -0
  36. package/dist/pages/v2/projectRows.d.ts +10 -0
  37. package/dist/pages/v2/projectRows.js +10 -0
  38. package/dist/pages/v2/relativeTime.d.ts +6 -0
  39. package/dist/pages/v2/relativeTime.js +30 -0
  40. package/dist/store/workspacesStore.d.ts +2 -1
  41. package/dist/store/workspacesStore.js +1 -1
  42. package/dist/translations/en.d.ts +382 -0
  43. package/dist/translations/en.js +382 -0
  44. package/dist/types/index.d.ts +19 -0
  45. package/dist/utils/nativeBridge.js +1 -1
  46. package/package.json +3 -3
@@ -0,0 +1,89 @@
1
+ import { GetMyProjectsWithDetailsQuery, GetWorkspaceActivityLogQuery, GetWorkspaceInvitationsWithEmailStatusQuery, GetWorkspaceMembersWithStatusQuery } from '../../generated/wspace-operations';
2
+ import { Workspace } from '../../types';
3
+ /** Items per request when a list is read whole (the services' own ceiling). */
4
+ export declare const READ_ALL_PAGE_SIZE = 100;
5
+ /** A list longer than this many pages is cut there (10,000 items) rather than read forever. */
6
+ export declare const READ_ALL_MAX_PAGES = 100;
7
+ export interface PageOfItems<T> {
8
+ items: T[];
9
+ hasMore: boolean;
10
+ }
11
+ /** Reads every page of a list, in order, until the server says there is no more. */
12
+ export declare function readAllPages<T>(readPage: (offset: number, limit: number) => Promise<PageOfItems<T>>, pageSize?: number, maxPages?: number): Promise<T[]>;
13
+ export type MemberWithStatus = GetWorkspaceMembersWithStatusQuery['workspaceMembers']['items'][number];
14
+ /** Every member of the workspace, with their status and membership role. */
15
+ export declare function useAllWorkspaceMembers(workspaceId: string | undefined): import('@tanstack/react-query').UseQueryResult<{
16
+ role: string;
17
+ status: string;
18
+ id: string;
19
+ workspaceId: string;
20
+ userId: string;
21
+ createdAt: string;
22
+ updatedAt: string;
23
+ context: {
24
+ type: string | null;
25
+ metadata: Record<string, unknown> | null;
26
+ } | null;
27
+ }[], Error>;
28
+ export type InvitationWithEmailStatus = GetWorkspaceInvitationsWithEmailStatusQuery['workspaceInvitations']['items'][number];
29
+ /** Every invitation the workspace sent (the page keeps the waiting, expired and bounced ones). */
30
+ export declare function useAllWorkspaceInvitations(workspaceId: string | undefined, enabled?: boolean): import('@tanstack/react-query').UseQueryResult<{
31
+ emailStatus: import('../../generated/wspace-operations').InvitationEmailStatus | null;
32
+ emailErrorCode: string | null;
33
+ emailLastAttemptAt: string | null;
34
+ projectId: string | null;
35
+ invitedUserId: string | null;
36
+ updatedAt: string;
37
+ deletedAt: string | null;
38
+ id: string;
39
+ email: string;
40
+ status: import('../../generated/wspace-operations').InviteStatus;
41
+ roleIds: Array<string>;
42
+ workspaceId: string | null;
43
+ invitedById: string | null;
44
+ expiresAt: string | null;
45
+ createdAt: string;
46
+ context: {
47
+ type: string | null;
48
+ metadata: Record<string, unknown> | null;
49
+ } | null;
50
+ }[], Error>;
51
+ /**
52
+ * The roles each person holds here, by name (People & access's names), keyed by their id. It
53
+ * may be refused to people who cannot read access: the page then shows the membership role.
54
+ */
55
+ export declare function useWorkspaceActorRoles(workspaceId: string | undefined): import('@tanstack/react-query').UseQueryResult<Record<string, string[]>, Error>;
56
+ /** Every workspace the person belongs to: read only while a search narrows the list. */
57
+ export declare function useAllMyWorkspaces(enabled: boolean): import('@tanstack/react-query').UseQueryResult<Workspace[], Error>;
58
+ export type ActivityLogRow = GetWorkspaceActivityLogQuery['getWorkspaceActivities'][number];
59
+ /** The workspace's newest events (`ACTIVITY_WINDOW` of them), every actor's. */
60
+ export declare function useWorkspaceActivityLog(workspaceId: string | undefined): import('@tanstack/react-query').UseQueryResult<{
61
+ id: string;
62
+ action: string;
63
+ category: import('../../generated/wspace-operations').ActivityCategory | null;
64
+ resourceType: string | null;
65
+ resourceId: string | null;
66
+ userId: string;
67
+ targetUserId: string | null;
68
+ description: string | null;
69
+ details: Record<string, unknown> | null;
70
+ timestamp: string;
71
+ }[], Error>;
72
+ export type ProjectWithDetails = GetMyProjectsWithDetailsQuery['myProjects']['items'][number];
73
+ /**
74
+ * Every project the person is in (the membership-scoped list the old page reads), with each
75
+ * one's description and creator, in the active workspace's context.
76
+ */
77
+ export declare function useMyProjectsWithDetails(): import('@tanstack/react-query').UseQueryResult<{
78
+ description: string | null;
79
+ creatorId: string;
80
+ id: string;
81
+ name: string;
82
+ key: string;
83
+ workspaceId: string;
84
+ status: import('../../generated/wspace-operations').ProjectStatus;
85
+ tags: Record<string, unknown>;
86
+ archived: boolean;
87
+ createdAt: string;
88
+ updatedAt: string;
89
+ }[], Error>;
@@ -0,0 +1,211 @@
1
+ import { useWorkspacesContext as e } from "../../providers/WorkspacesProvider.js";
2
+ import { GetMyProjectsWithDetailsDocument as t, GetWorkspaceActivityLogDocument as n, GetWorkspaceActorRolesDocument as r, GetWorkspaceInvitationsWithEmailStatusDocument as i, GetWorkspaceMembersWithStatusDocument as a } from "../../generated/wspace-operations.js";
3
+ import { GetGlobalMyWorkspacesDocument as o } from "../../generated/global-operations.js";
4
+ import { activeRoleNames as s } from "../../pages/v2/memberRows.js";
5
+ import { useQuery as c } from "@tanstack/react-query";
6
+ import { print as l } from "graphql";
7
+ import { graphqlFetch as u } from "@burdenoff/fe-libs/shared/graphql";
8
+ async function d(e, t = 100, n = 100) {
9
+ let r = [];
10
+ for (let i = 0; i < n; i += 1) {
11
+ let n = await e(i * t, t);
12
+ if (r.push(...n.items), !n.hasMore || n.items.length === 0) break;
13
+ }
14
+ return r;
15
+ }
16
+ function f(e, t) {
17
+ if (e?.length) throw Error(e[0]?.message || t);
18
+ }
19
+ function p(t) {
20
+ let { authToken: n } = e();
21
+ return c({
22
+ queryKey: [
23
+ "workspaceMembers",
24
+ t,
25
+ "v2-all"
26
+ ],
27
+ enabled: !!t,
28
+ staleTime: 6e4,
29
+ queryFn: ({ signal: e }) => d(async (r, i) => {
30
+ let o = await u({
31
+ gateway: "workspace",
32
+ authToken: n || void 0,
33
+ query: l(a),
34
+ variables: {
35
+ workspaceId: t,
36
+ pagination: {
37
+ limit: i,
38
+ offset: r
39
+ }
40
+ },
41
+ workspaceId: t,
42
+ workspaceToken: !0,
43
+ signal: e
44
+ });
45
+ f(o.errors, "Couldn’t load the members");
46
+ let s = o.data?.workspaceMembers;
47
+ if (!s) throw Error("Couldn’t load the members");
48
+ return {
49
+ items: s.items,
50
+ hasMore: s.hasMore
51
+ };
52
+ })
53
+ });
54
+ }
55
+ function m(t, n = !0) {
56
+ let { authToken: r } = e();
57
+ return c({
58
+ queryKey: [
59
+ "workspaceInvitations",
60
+ t,
61
+ "v2-all"
62
+ ],
63
+ enabled: n && !!t,
64
+ staleTime: 6e4,
65
+ queryFn: ({ signal: e }) => d(async (n, a) => {
66
+ let o = await u({
67
+ gateway: "workspace",
68
+ authToken: r || void 0,
69
+ query: l(i),
70
+ variables: { pagination: {
71
+ limit: a,
72
+ offset: n
73
+ } },
74
+ workspaceId: t,
75
+ workspaceToken: !0,
76
+ signal: e
77
+ });
78
+ f(o.errors, "Couldn’t load the invites");
79
+ let s = o.data?.workspaceInvitations;
80
+ if (!s) throw Error("Couldn’t load the invites");
81
+ return {
82
+ items: s.items,
83
+ hasMore: s.hasMore
84
+ };
85
+ })
86
+ });
87
+ }
88
+ function h(t) {
89
+ let { authToken: n } = e();
90
+ return c({
91
+ queryKey: ["workspaceActorRoles", t],
92
+ enabled: !!t,
93
+ staleTime: 6e4,
94
+ retry: !1,
95
+ queryFn: async ({ signal: e }) => {
96
+ let i = await d(async (i, a) => {
97
+ let o = await u({
98
+ gateway: "workspace",
99
+ authToken: n || void 0,
100
+ query: l(r),
101
+ variables: {
102
+ scopeId: t,
103
+ pagination: {
104
+ limit: a,
105
+ offset: i
106
+ }
107
+ },
108
+ workspaceId: t,
109
+ workspaceToken: !0,
110
+ signal: e
111
+ });
112
+ f(o.errors, "Couldn’t load the roles");
113
+ let s = o.data?.actorsPage;
114
+ if (!s) throw Error("Couldn’t load the roles");
115
+ return {
116
+ items: s.items,
117
+ hasMore: s.pageInfo.hasNextPage
118
+ };
119
+ }), a = {};
120
+ for (let e of i) a[e.actorId] = s(e.roleAssignments);
121
+ return a;
122
+ }
123
+ });
124
+ }
125
+ function g(t) {
126
+ let { authToken: n } = e();
127
+ return c({
128
+ queryKey: ["myWorkspaces", "v2-all"],
129
+ enabled: t,
130
+ staleTime: 3e5,
131
+ queryFn: ({ signal: e }) => d(async (t, r) => {
132
+ let i = await u({
133
+ gateway: "global",
134
+ authToken: n || void 0,
135
+ query: l(o),
136
+ variables: {
137
+ limit: r,
138
+ offset: t
139
+ },
140
+ signal: e
141
+ });
142
+ f(i.errors, "Couldn’t load your workspaces");
143
+ let a = i.data?.myWorkspaces;
144
+ if (!a) throw Error("Couldn’t load your workspaces");
145
+ return {
146
+ items: a.items,
147
+ hasMore: a.hasMore
148
+ };
149
+ })
150
+ });
151
+ }
152
+ function _(t) {
153
+ let { authToken: r } = e();
154
+ return c({
155
+ queryKey: [
156
+ "workspaceActivityLog",
157
+ t,
158
+ 200
159
+ ],
160
+ enabled: !!t,
161
+ staleTime: 6e4,
162
+ queryFn: async ({ signal: e }) => {
163
+ let i = await u({
164
+ gateway: "workspace",
165
+ authToken: r || void 0,
166
+ query: l(n),
167
+ variables: {
168
+ workspaceId: t,
169
+ limit: 200
170
+ },
171
+ workspaceId: t,
172
+ workspaceToken: !0,
173
+ signal: e
174
+ });
175
+ return f(i.errors, "Couldn’t load the activity"), i.data?.getWorkspaceActivities ?? [];
176
+ }
177
+ });
178
+ }
179
+ function v() {
180
+ let { authToken: n, workspaceId: r } = e();
181
+ return c({
182
+ queryKey: [
183
+ "myProjects",
184
+ r,
185
+ "v2-details"
186
+ ],
187
+ staleTime: 6e4,
188
+ queryFn: ({ signal: e }) => d(async (i, a) => {
189
+ let o = await u({
190
+ gateway: "workspace",
191
+ authToken: n || void 0,
192
+ query: l(t),
193
+ variables: { pagination: {
194
+ limit: a,
195
+ offset: i
196
+ } },
197
+ workspaceId: r || void 0,
198
+ workspaceToken: !0,
199
+ signal: e
200
+ });
201
+ f(o.errors, "Couldn’t load the projects");
202
+ let s = o.data?.myProjects;
203
+ if (!s) throw Error("Couldn’t load the projects");
204
+ return {
205
+ items: s.items,
206
+ hasMore: s.hasMore
207
+ };
208
+ })
209
+ });
210
+ }
211
+ export { d as readAllPages, g as useAllMyWorkspaces, m as useAllWorkspaceInvitations, p as useAllWorkspaceMembers, v as useMyProjectsWithDetails, _ as useWorkspaceActivityLog, h as useWorkspaceActorRoles };
package/dist/index.d.ts CHANGED
@@ -32,4 +32,4 @@ export * from './hooks';
32
32
  export * from './components';
33
33
  export * from './utils';
34
34
  export { enTranslations } from './translations/en';
35
- export type { WorkspacesRootProps, WorkspacesVariant, Workspace, WorkspaceType, WorkspaceStatus, WorkspaceMember, WorkspaceRole, WorkspaceSettings, WorkspaceFeature, WorkspaceIntegration, Project, ProjectStatus, Activity, ActivityType, WorkspaceFilters, ProjectFilters, ViewMode, SortBy, SortDirection, CreateWorkspaceInput, UpdateWorkspaceInput, CreateProjectInput, UpdateProjectInput, NavItem, FooterItem, } from './types';
35
+ export type { WorkspacesRootProps, WorkspacesVariant, WorkspacesInvitesForYouSlot, Workspace, WorkspaceType, WorkspaceStatus, WorkspaceMember, WorkspaceRole, WorkspaceSettings, WorkspaceFeature, WorkspaceIntegration, Project, ProjectStatus, Activity, ActivityType, WorkspaceFilters, ProjectFilters, ViewMode, SortBy, SortDirection, CreateWorkspaceInput, UpdateWorkspaceInput, CreateProjectInput, UpdateProjectInput, NavItem, FooterItem, } from './types';