@burdenoff/microfe-workspaces 2026.1014.1 → 2026.1016.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/WorkspacesRoot.d.ts +33 -0
- package/dist/WorkspacesRoutes.d.ts +9 -0
- package/dist/components/CreateProjectDialog.d.ts +5 -0
- package/dist/components/CreateWorkspaceDialog.d.ts +1 -0
- package/dist/components/InviteMemberDialog.d.ts +6 -0
- package/dist/components/MemberListItem.d.ts +9 -0
- package/dist/components/ProjectCard.d.ts +13 -0
- package/dist/components/ProjectMemberPickerDialog.d.ts +8 -0
- package/dist/components/RenameProjectDialog.d.ts +11 -0
- package/dist/components/WorkspaceCard.d.ts +6 -0
- package/dist/components/WorkspaceContextPathSync.d.ts +23 -0
- package/dist/components/WorkspacesErrorBoundary.d.ts +28 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/tags/ProjectTagsWidget.d.ts +21 -0
- package/dist/components/tags/ProjectTagsWidget.js +38 -38
- package/dist/constants/permissions.d.ts +32 -0
- package/dist/generated/global-operations.d.ts +257 -0
- package/dist/generated/global-operations.js +844 -152
- package/dist/generated/global-types.d.ts +23507 -0
- package/dist/generated/wspace-operations.d.ts +1457 -0
- package/dist/generated/wspace-operations.js +4277 -626
- package/dist/generated/wspace-types.d.ts +57824 -0
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/useMemberMutations.d.ts +59 -0
- package/dist/hooks/useOrgsWithPermission.d.ts +6 -0
- package/dist/hooks/usePendingInvitations.d.ts +7 -0
- package/dist/hooks/useProjectMemberMutations.d.ts +3 -0
- package/dist/hooks/useProjectMembers.d.ts +4 -0
- package/dist/hooks/useProjectMutations.d.ts +39 -0
- package/dist/hooks/useProjects.d.ts +14 -0
- package/dist/hooks/useScopedNavigation.d.ts +3 -0
- package/dist/hooks/useTenants.d.ts +11 -0
- package/dist/hooks/useTr.d.ts +26 -0
- package/dist/hooks/useWorkspaceActivity.d.ts +11 -0
- package/dist/hooks/useWorkspaceMembers.d.ts +25 -0
- package/dist/hooks/useWorkspaceMutations.d.ts +34 -0
- package/dist/hooks/useWorkspacePermissions.d.ts +32 -0
- package/dist/hooks/useWorkspaceRoles.d.ts +12 -0
- package/dist/hooks/useWorkspaces.d.ts +19 -0
- package/dist/hooks/useWorkspacesEventEmitter.d.ts +16 -0
- package/dist/hooks/useWorkspacesPageView.d.ts +26 -0
- package/dist/index.d.ts +35 -0
- package/dist/pages/ActivityListPage.d.ts +1 -0
- package/dist/pages/CreateWorkspacePage.d.ts +1 -0
- package/dist/pages/InviteAcceptancePage.d.ts +5 -0
- package/dist/pages/MembersListPage.d.ts +1 -0
- package/dist/pages/PendingInvitesPage.d.ts +1 -0
- package/dist/pages/ProjectDetailPage.d.ts +1 -0
- package/dist/pages/ProjectMembersPage.d.ts +1 -0
- package/dist/pages/ProjectsListPage.d.ts +1 -0
- package/dist/pages/WorkspaceDetailPage.d.ts +1 -0
- package/dist/pages/WorkspaceInvitePage.d.ts +1 -0
- package/dist/pages/WorkspaceSettingsPage.d.ts +1 -0
- package/dist/pages/WorkspaceSettingsPage.js +38 -37
- package/dist/pages/WorkspacesListPage.d.ts +1 -0
- package/dist/pages/dashboard/DashboardCustomizer.d.ts +11 -0
- package/dist/pages/dashboard/DashboardGrid.d.ts +6 -0
- package/dist/pages/dashboard/DashboardPage.d.ts +19 -0
- package/dist/pages/dashboard/WidgetWrapper.d.ts +16 -0
- package/dist/pages/dashboard/config.d.ts +27 -0
- package/dist/pages/dashboard/hooks/useDashboardData.d.ts +13 -0
- package/dist/pages/dashboard/hooks/useDashboardPreferences.d.ts +2 -0
- package/dist/pages/dashboard/reorder.d.ts +26 -0
- package/dist/pages/dashboard/types.d.ts +197 -0
- package/dist/pages/dashboard/widgets/AgentsWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/GroupsWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/MembersWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/ProjectsWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/QuickActionsWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/RecentActivityWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/SessionsWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/StorageWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/StorageWidget.js +2 -2
- package/dist/pages/dashboard/widgets/TagCloudWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/TipsWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/UpcomingEventsWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/VibesWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/WelcomeWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/WorkflowRunsWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/WorkflowStatsWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.d.ts +2 -0
- package/dist/pages/dashboard/widgets/WorkspacesWidget.d.ts +2 -0
- package/dist/providers/WorkspacesProvider.d.ts +11 -0
- package/dist/store/workspacesStore.d.ts +80 -0
- package/dist/translations/en.d.ts +921 -0
- package/dist/types/index.d.ts +336 -0
- package/dist/utils/formatters.d.ts +53 -0
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/i18n.d.ts +11 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/invitationDisplay.d.ts +6 -0
- package/dist/utils/nativeBridge.d.ts +2 -0
- package/dist/utils/projectTags.d.ts +6 -0
- package/dist/utils/slug.d.ts +12 -0
- package/dist/utils/telemetryError.d.ts +1 -0
- package/dist/utils/tokenHelpers.d.ts +112 -0
- package/dist/utils/workspaceBulkInviteCsv.d.ts +9 -0
- package/package.json +38 -24
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WidgetConfig } from './types';
|
|
2
|
+
interface DashboardCustomizerProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
widgets: WidgetConfig[];
|
|
6
|
+
onSave: (widgets: WidgetConfig[]) => Promise<void>;
|
|
7
|
+
isSaving: boolean;
|
|
8
|
+
productId?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function DashboardCustomizer({ open, onOpenChange, widgets, onSave, isSaving, productId, }: DashboardCustomizerProps): import('react').JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { WidgetConfig, WidgetProps } from './types';
|
|
2
|
+
interface DashboardGridProps extends WidgetProps {
|
|
3
|
+
widgets: WidgetConfig[];
|
|
4
|
+
}
|
|
5
|
+
export declare function DashboardGrid({ widgets, productId, ...widgetProps }: DashboardGridProps): import('react').JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface DashboardPageProps {
|
|
2
|
+
navigate: (path: string) => void;
|
|
3
|
+
authToken?: string | null;
|
|
4
|
+
currentUser?: {
|
|
5
|
+
id: string;
|
|
6
|
+
email: string;
|
|
7
|
+
firstName?: string;
|
|
8
|
+
lastName?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
} | null;
|
|
11
|
+
/**
|
|
12
|
+
* Host product identifier ('workspaces', 'vibecontrols', etc.). Drives
|
|
13
|
+
* which widgets appear in the registry + default layout. Defaults to
|
|
14
|
+
* 'workspaces' for legacy callers.
|
|
15
|
+
*/
|
|
16
|
+
productId?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function DashboardPage({ navigate, authToken, currentUser: _currentUser, productId, }: DashboardPageProps): import('react').JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WidgetSize } from './types';
|
|
3
|
+
interface WidgetWrapperProps {
|
|
4
|
+
title: string;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
size: WidgetSize;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
error?: string | null;
|
|
9
|
+
unavailable?: boolean;
|
|
10
|
+
headerAction?: ReactNode;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function getColSpan(size: WidgetSize): string;
|
|
15
|
+
export declare function WidgetWrapper({ title, icon, size, isLoading, error, unavailable, headerAction, children, className, }: WidgetWrapperProps): import('react').JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { WidgetConfig, WidgetDefinition } from './types';
|
|
2
|
+
export declare const DEFAULT_PRODUCT_ID = "workspaces";
|
|
3
|
+
export declare const WIDGET_DEFINITIONS: Record<string, WidgetDefinition>;
|
|
4
|
+
export declare const DEFAULT_DASHBOARD_WIDGETS_BY_PRODUCT: Record<string, WidgetConfig[]>;
|
|
5
|
+
/** Backwards-compatible export — kept for callers that don't pass productId. */
|
|
6
|
+
export declare const DEFAULT_DASHBOARD_WIDGETS: WidgetConfig[];
|
|
7
|
+
export declare function isWidgetAvailable(widget: WidgetDefinition, productId?: string): boolean;
|
|
8
|
+
export declare function getDefinitionsForProduct(productId?: string): Record<string, WidgetDefinition>;
|
|
9
|
+
/**
|
|
10
|
+
* Get the effective widget configuration, merging user prefs with defaults.
|
|
11
|
+
* Filters out widgets that are not available for the given product.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getEffectiveWidgets(userPrefs: WidgetConfig[] | null | undefined, productId?: string): WidgetConfig[];
|
|
14
|
+
/**
|
|
15
|
+
* Translate a widget definition's title/description with **literal** keys.
|
|
16
|
+
*
|
|
17
|
+
* `WIDGET_DEFINITIONS` is module scope, so it cannot call a hook, and the key
|
|
18
|
+
* extractor (fluidgrids-app/scripts/extract-i18n-keys.ts) only collects string
|
|
19
|
+
* literals — so neither a computed key nor a lookup table would ever be
|
|
20
|
+
* extracted or seeded. Every widget is therefore spelled out. The English text
|
|
21
|
+
* here stays in sync with `WIDGET_DEFINITIONS` above by being passed in as the
|
|
22
|
+
* fallback, so it is impossible for the two to silently diverge. [BOFF-5997]
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveWidgetCopy(tr: (key: string, fallback: string) => string, def: WidgetDefinition): {
|
|
25
|
+
title: string;
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WorkspaceDashboardData, GlobalDashboardData, VibeSummary, SessionSummary, AgentFleetSummary } from '../types';
|
|
2
|
+
export declare function useProjectsDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<NoInfer<{
|
|
3
|
+
items: import('../types').ProjectSummary[];
|
|
4
|
+
total: number;
|
|
5
|
+
}>, Error>;
|
|
6
|
+
export declare function useWorkspaceDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<NoInfer<WorkspaceDashboardData>, Error>;
|
|
7
|
+
export interface VibecontrolsDashboardData {
|
|
8
|
+
recentVibes: VibeSummary[];
|
|
9
|
+
activeSessions: SessionSummary[];
|
|
10
|
+
agentFleet: AgentFleetSummary | null;
|
|
11
|
+
}
|
|
12
|
+
export declare function useVibecontrolsDashboardData(authToken?: string | null, enabled?: boolean): import('@tanstack/react-query').UseQueryResult<NoInfer<VibecontrolsDashboardData>, Error>;
|
|
13
|
+
export declare function useGlobalDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<NoInfer<GlobalDashboardData>, Error>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { WidgetConfig } from './types';
|
|
2
|
+
/** Side of the target row the pointer is on, relative to the row midpoint. */
|
|
3
|
+
export type DropPosition = 'above' | 'below';
|
|
4
|
+
/**
|
|
5
|
+
* Re-number `order` so it is strictly increasing by `ORDER_STEP` from the
|
|
6
|
+
* given array's order. Returns a fresh array; input is not mutated.
|
|
7
|
+
*/
|
|
8
|
+
export declare function renumberOrders(widgets: WidgetConfig[]): WidgetConfig[];
|
|
9
|
+
/**
|
|
10
|
+
* Move `fromId` to a position adjacent to `toId`.
|
|
11
|
+
*
|
|
12
|
+
* - `position === 'above'` — `fromId` ends up immediately before `toId`.
|
|
13
|
+
* - `position === 'below'` — `fromId` ends up immediately after `toId`.
|
|
14
|
+
*
|
|
15
|
+
* If either id is missing, or `fromId === toId`, the input is returned
|
|
16
|
+
* unchanged (referential equality preserved). Adjacent swaps are valid
|
|
17
|
+
* moves — flicker prevention is the caller's responsibility (see
|
|
18
|
+
* `DashboardCustomizer.handleDragOver`, which tracks the last-applied
|
|
19
|
+
* move via a ref). [BOFF-7219]
|
|
20
|
+
*/
|
|
21
|
+
export declare function reorderByDropIndex(widgets: WidgetConfig[], fromId: string, toId: string, position: DropPosition): WidgetConfig[];
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the drop position from a pointer event and a target row's bounding
|
|
24
|
+
* rect. `clientY` above the midpoint yields 'above', otherwise 'below'.
|
|
25
|
+
*/
|
|
26
|
+
export declare function dropPositionFromPointer(clientY: number, rect: DOMRect): DropPosition;
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dashboard Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the comprehensive workspace dashboard.
|
|
5
|
+
*/
|
|
6
|
+
export type WidgetSize = 'small' | 'medium' | 'large';
|
|
7
|
+
export interface WidgetConfig {
|
|
8
|
+
widgetId: string;
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
order: number;
|
|
11
|
+
size: WidgetSize;
|
|
12
|
+
}
|
|
13
|
+
export interface WidgetDefinition {
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
description: string;
|
|
17
|
+
icon: string;
|
|
18
|
+
defaultSize: WidgetSize;
|
|
19
|
+
/** Whether this widget can be removed from the dashboard */
|
|
20
|
+
removable: boolean;
|
|
21
|
+
/** Minimum data source needed: 'workspace' | 'global' | 'static' */
|
|
22
|
+
dataSource: 'workspace' | 'global' | 'static';
|
|
23
|
+
/**
|
|
24
|
+
* When set, the widget is only available to hosts that pass a matching
|
|
25
|
+
* productId. Omitted = universal (legacy default; treats as 'workspaces').
|
|
26
|
+
*/
|
|
27
|
+
availableInProducts?: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface WorkspaceSummary {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
status: string;
|
|
33
|
+
type: string;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ProjectSummary {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
key: string;
|
|
40
|
+
status: string;
|
|
41
|
+
workspaceId: string;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
}
|
|
44
|
+
export interface ActivityItem {
|
|
45
|
+
id: string;
|
|
46
|
+
action: string;
|
|
47
|
+
resourceType: string;
|
|
48
|
+
resourceId: string;
|
|
49
|
+
userId: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
details?: Record<string, unknown>;
|
|
52
|
+
timestamp: string;
|
|
53
|
+
}
|
|
54
|
+
export interface CalendarEventSummary {
|
|
55
|
+
id: string;
|
|
56
|
+
title: string;
|
|
57
|
+
startTime: string;
|
|
58
|
+
endTime: string;
|
|
59
|
+
calendarId: string;
|
|
60
|
+
allDay?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface TagSummary {
|
|
63
|
+
id: string;
|
|
64
|
+
label: string;
|
|
65
|
+
key: string;
|
|
66
|
+
vocabularyId?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface GroupSummary {
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
description?: string;
|
|
72
|
+
memberCount?: number;
|
|
73
|
+
}
|
|
74
|
+
export interface WorkflowStatsSummary {
|
|
75
|
+
activeWorkflowsCount: number;
|
|
76
|
+
archivedWorkflowsCount: number;
|
|
77
|
+
/**
|
|
78
|
+
* FluidGrids dashboard fields — selected alongside the counts above since
|
|
79
|
+
* both come from the same `dashboardSummary` query. The generic
|
|
80
|
+
* 'workflows' widget (products other than fluidgrids) only reads
|
|
81
|
+
* activeWorkflowsCount/archivedWorkflowsCount/recentRuns.
|
|
82
|
+
*/
|
|
83
|
+
workflowsCount?: number;
|
|
84
|
+
runsCountTotal?: number;
|
|
85
|
+
runsRunningCount?: number;
|
|
86
|
+
runsFailedLast24h?: number;
|
|
87
|
+
workflowSuccessRate?: number | null;
|
|
88
|
+
recentWorkflows?: Array<{
|
|
89
|
+
workflowKey: string;
|
|
90
|
+
name: string;
|
|
91
|
+
version: string;
|
|
92
|
+
updatedAt: string;
|
|
93
|
+
}>;
|
|
94
|
+
recentRuns: Array<{
|
|
95
|
+
id: string;
|
|
96
|
+
status: string;
|
|
97
|
+
workflowKey: string;
|
|
98
|
+
startedAt: string;
|
|
99
|
+
}>;
|
|
100
|
+
}
|
|
101
|
+
export interface StorageInfo {
|
|
102
|
+
usedBytes: number;
|
|
103
|
+
totalBytes: number;
|
|
104
|
+
fileCount?: number | null;
|
|
105
|
+
}
|
|
106
|
+
export interface VibeSummary {
|
|
107
|
+
id: string;
|
|
108
|
+
name: string;
|
|
109
|
+
status?: string | null;
|
|
110
|
+
workspaceId?: string | null;
|
|
111
|
+
updatedAt: string;
|
|
112
|
+
}
|
|
113
|
+
export interface SessionSummary {
|
|
114
|
+
id: string;
|
|
115
|
+
name?: string | null;
|
|
116
|
+
status: string;
|
|
117
|
+
agent?: {
|
|
118
|
+
id: string;
|
|
119
|
+
name?: string | null;
|
|
120
|
+
} | null;
|
|
121
|
+
startedAt?: string | null;
|
|
122
|
+
vibeId?: string | null;
|
|
123
|
+
}
|
|
124
|
+
export interface AgentFleetSummary {
|
|
125
|
+
total: number;
|
|
126
|
+
online: number;
|
|
127
|
+
offline: number;
|
|
128
|
+
degraded: number;
|
|
129
|
+
lastSeenAt?: string | null;
|
|
130
|
+
}
|
|
131
|
+
export interface WorkspaceDashboardData {
|
|
132
|
+
workspaces: {
|
|
133
|
+
items: WorkspaceSummary[];
|
|
134
|
+
total: number;
|
|
135
|
+
};
|
|
136
|
+
projects: {
|
|
137
|
+
items: ProjectSummary[];
|
|
138
|
+
total: number;
|
|
139
|
+
};
|
|
140
|
+
recentActivities: ActivityItem[];
|
|
141
|
+
upcomingEvents: CalendarEventSummary[];
|
|
142
|
+
tags: {
|
|
143
|
+
items: TagSummary[];
|
|
144
|
+
total: number;
|
|
145
|
+
};
|
|
146
|
+
groups: {
|
|
147
|
+
items: GroupSummary[];
|
|
148
|
+
totalCount: number;
|
|
149
|
+
};
|
|
150
|
+
workflowStats: WorkflowStatsSummary | null;
|
|
151
|
+
storageUsage: StorageInfo | null;
|
|
152
|
+
/** VibeControls-only surfaces. Only populated when productId === 'vibecontrols'. */
|
|
153
|
+
recentVibes?: VibeSummary[];
|
|
154
|
+
activeSessions?: SessionSummary[];
|
|
155
|
+
agentFleet?: AgentFleetSummary | null;
|
|
156
|
+
}
|
|
157
|
+
export interface CurrentUserInfo {
|
|
158
|
+
id: string;
|
|
159
|
+
email: string;
|
|
160
|
+
firstName?: string;
|
|
161
|
+
lastName?: string;
|
|
162
|
+
name?: string;
|
|
163
|
+
role?: string;
|
|
164
|
+
createdAt?: string;
|
|
165
|
+
}
|
|
166
|
+
export interface GlobalDashboardData {
|
|
167
|
+
currentUser: CurrentUserInfo | null;
|
|
168
|
+
dashboardPreferences: DashboardPreferences | null;
|
|
169
|
+
/** Workspaces from the global tenant service (where data actually lives) */
|
|
170
|
+
workspaces: {
|
|
171
|
+
items: WorkspaceSummary[];
|
|
172
|
+
total: number;
|
|
173
|
+
};
|
|
174
|
+
/** Organizations from the global tenant service */
|
|
175
|
+
organizations: {
|
|
176
|
+
items: Array<{
|
|
177
|
+
id: string;
|
|
178
|
+
name: string;
|
|
179
|
+
status: string;
|
|
180
|
+
type: string;
|
|
181
|
+
createdAt: string;
|
|
182
|
+
}>;
|
|
183
|
+
total: number;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
export interface DashboardPreferences {
|
|
187
|
+
widgets: WidgetConfig[];
|
|
188
|
+
updatedAt?: string;
|
|
189
|
+
}
|
|
190
|
+
export interface WidgetProps {
|
|
191
|
+
workspaceData: WorkspaceDashboardData | null;
|
|
192
|
+
globalData: GlobalDashboardData | null;
|
|
193
|
+
isLoading: boolean;
|
|
194
|
+
navigate: (path: string) => void;
|
|
195
|
+
/** Host product identifier ('workspaces', 'vibecontrols', etc.). */
|
|
196
|
+
productId?: string;
|
|
197
|
+
}
|
|
@@ -18,12 +18,12 @@ function l(t) {
|
|
|
18
18
|
function u(t, n) {
|
|
19
19
|
if (n === 0) return `0 ${e(t, "dashboard.storage.unitBytes", "B")}`;
|
|
20
20
|
let r = 1024, i = l(t), a = Math.floor(Math.log(n) / Math.log(r));
|
|
21
|
-
return `${parseFloat((n / r **
|
|
21
|
+
return `${parseFloat((n / r ** a).toFixed(1))} ${i[a]}`;
|
|
22
22
|
}
|
|
23
23
|
function d(e, t, n) {
|
|
24
24
|
let r = 1024, i = l(e);
|
|
25
25
|
if (n <= 0) return u(e, t);
|
|
26
|
-
let a = Math.min(Math.floor(Math.log(n) / Math.log(r)), i.length - 1), o = t / r **
|
|
26
|
+
let a = Math.min(Math.floor(Math.log(n) / Math.log(r)), i.length - 1), o = t / r ** a;
|
|
27
27
|
return `${Number.isInteger(o) ? o.toString() : o.toFixed(1)} ${i[a]}`;
|
|
28
28
|
}
|
|
29
29
|
function f({ workspaceData: l, isLoading: f }) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import { WorkspacesRootProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Hook to access Workspaces context
|
|
5
|
+
*/
|
|
6
|
+
export declare const useWorkspacesContext: () => WorkspacesRootProps;
|
|
7
|
+
/**
|
|
8
|
+
* Provider component for Workspaces microfrontend
|
|
9
|
+
* Sets up context and dependencies including permission management
|
|
10
|
+
*/
|
|
11
|
+
export declare const WorkspacesProvider: FC<PropsWithChildren<WorkspacesRootProps>>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ViewMode, SortBy, SortDirection, WorkspaceFilters, ProjectFilters, MemberFilters, Workspace } from '../types';
|
|
2
|
+
interface WorkspacesState {
|
|
3
|
+
viewMode: ViewMode;
|
|
4
|
+
sortBy: SortBy;
|
|
5
|
+
sortDirection: SortDirection;
|
|
6
|
+
workspaceFilters: WorkspaceFilters;
|
|
7
|
+
projectFilters: ProjectFilters;
|
|
8
|
+
memberFilters: MemberFilters;
|
|
9
|
+
selectedWorkspaceIds: Set<string>;
|
|
10
|
+
selectedProjectIds: Set<string>;
|
|
11
|
+
selectedMemberIds: Set<string>;
|
|
12
|
+
isCreateWorkspaceDialogOpen: boolean;
|
|
13
|
+
isCreateProjectDialogOpen: boolean;
|
|
14
|
+
isInviteMemberDialogOpen: boolean;
|
|
15
|
+
currentWorkspace: Workspace | null;
|
|
16
|
+
currentWorkspaceId: string | null;
|
|
17
|
+
setViewMode: (mode: ViewMode) => void;
|
|
18
|
+
setSortBy: (sortBy: SortBy) => void;
|
|
19
|
+
toggleSortDirection: () => void;
|
|
20
|
+
setWorkspaceFilters: (filters: Partial<WorkspaceFilters>) => void;
|
|
21
|
+
clearWorkspaceFilters: () => void;
|
|
22
|
+
setProjectFilters: (filters: Partial<ProjectFilters>) => void;
|
|
23
|
+
clearProjectFilters: () => void;
|
|
24
|
+
setMemberFilters: (filters: Partial<MemberFilters>) => void;
|
|
25
|
+
clearMemberFilters: () => void;
|
|
26
|
+
toggleWorkspaceSelection: (id: string) => void;
|
|
27
|
+
clearWorkspaceSelection: () => void;
|
|
28
|
+
toggleProjectSelection: (id: string) => void;
|
|
29
|
+
clearProjectSelection: () => void;
|
|
30
|
+
toggleMemberSelection: (id: string) => void;
|
|
31
|
+
clearMemberSelection: () => void;
|
|
32
|
+
openCreateWorkspaceDialog: () => void;
|
|
33
|
+
closeCreateWorkspaceDialog: () => void;
|
|
34
|
+
openCreateProjectDialog: (workspace: Workspace) => void;
|
|
35
|
+
closeCreateProjectDialog: () => void;
|
|
36
|
+
openInviteMemberDialog: (workspace: Workspace) => void;
|
|
37
|
+
closeInviteMemberDialog: () => void;
|
|
38
|
+
setCurrentWorkspace: (workspace: Workspace | null) => void;
|
|
39
|
+
reset: () => void;
|
|
40
|
+
}
|
|
41
|
+
export declare const useWorkspacesStore: import('zustand').UseBoundStore<Omit<Omit<import('zustand').StoreApi<WorkspacesState>, "setState" | "devtools"> & {
|
|
42
|
+
setState(partial: WorkspacesState | Partial<WorkspacesState> | ((state: WorkspacesState) => WorkspacesState | Partial<WorkspacesState>), replace?: false | undefined, action?: (string | {
|
|
43
|
+
[x: string]: unknown;
|
|
44
|
+
[x: number]: unknown;
|
|
45
|
+
[x: symbol]: unknown;
|
|
46
|
+
type: string;
|
|
47
|
+
}) | undefined): void;
|
|
48
|
+
setState(state: WorkspacesState | ((state: WorkspacesState) => WorkspacesState), replace: true, action?: (string | {
|
|
49
|
+
[x: string]: unknown;
|
|
50
|
+
[x: number]: unknown;
|
|
51
|
+
[x: symbol]: unknown;
|
|
52
|
+
type: string;
|
|
53
|
+
}) | undefined): void;
|
|
54
|
+
devtools: {
|
|
55
|
+
cleanup: () => void;
|
|
56
|
+
};
|
|
57
|
+
}, "setState" | "persist"> & {
|
|
58
|
+
setState(partial: WorkspacesState | Partial<WorkspacesState> | ((state: WorkspacesState) => WorkspacesState | Partial<WorkspacesState>), replace?: false | undefined, action?: (string | {
|
|
59
|
+
[x: string]: unknown;
|
|
60
|
+
[x: number]: unknown;
|
|
61
|
+
[x: symbol]: unknown;
|
|
62
|
+
type: string;
|
|
63
|
+
}) | undefined): unknown;
|
|
64
|
+
setState(state: WorkspacesState | ((state: WorkspacesState) => WorkspacesState), replace: true, action?: (string | {
|
|
65
|
+
[x: string]: unknown;
|
|
66
|
+
[x: number]: unknown;
|
|
67
|
+
[x: symbol]: unknown;
|
|
68
|
+
type: string;
|
|
69
|
+
}) | undefined): unknown;
|
|
70
|
+
persist: {
|
|
71
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<WorkspacesState, unknown, unknown>>) => void;
|
|
72
|
+
clearStorage: () => void;
|
|
73
|
+
rehydrate: () => Promise<void> | void;
|
|
74
|
+
hasHydrated: () => boolean;
|
|
75
|
+
onHydrate: (fn: (state: WorkspacesState) => void) => () => void;
|
|
76
|
+
onFinishHydration: (fn: (state: WorkspacesState) => void) => () => void;
|
|
77
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<WorkspacesState, unknown, unknown>>;
|
|
78
|
+
};
|
|
79
|
+
}>;
|
|
80
|
+
export {};
|