@burdenoff/microfe-workspaces 2026.1013.2 → 2026.1016.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +37 -23
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { WorkspacesRootProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Root component for the Workspaces microfrontend.
|
|
5
|
+
*
|
|
6
|
+
* This is the main entry point that host applications import and render.
|
|
7
|
+
* It sets up the necessary providers and renders the internal routing.
|
|
8
|
+
* Automatically registers navigation items with the shell if registration functions are provided.
|
|
9
|
+
* Nav items for feature-previewed pages (projects, members, activity) are conditionally
|
|
10
|
+
* hidden based on feature flags.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* import { WorkspacesRoot } from '@burdenoff/micro-fe/workspaces';
|
|
15
|
+
*
|
|
16
|
+
* function App() {
|
|
17
|
+
* return (
|
|
18
|
+
* <Route path="/workspaces/*" element={
|
|
19
|
+
* <WorkspacesRoot
|
|
20
|
+
* basePath="/workspaces"
|
|
21
|
+
* navigate={navigate}
|
|
22
|
+
* currentUser={user}
|
|
23
|
+
* workspaceId="ws-123"
|
|
24
|
+
* tenantId="tenant-123"
|
|
25
|
+
* apiGatewayUrl="https://gw-global.local.burdenoff.com"
|
|
26
|
+
* authToken="token"
|
|
27
|
+
* />
|
|
28
|
+
* } />
|
|
29
|
+
* );
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare const WorkspacesRoot: FC<WorkspacesRootProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal routing for the Workspaces microfrontend.
|
|
3
|
+
* Defines all routes and their corresponding page components.
|
|
4
|
+
*
|
|
5
|
+
* - WorkspacesListPage: Eager loaded (main entry point)
|
|
6
|
+
* - All other pages: Lazy loaded for better performance
|
|
7
|
+
* - Projects, Members, Activity: gated by feature flags (unreleased)
|
|
8
|
+
*/
|
|
9
|
+
export declare function WorkspacesRoutes(): import('react').JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CreateWorkspaceDialog(): import('react').JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WorkspaceMember } from '../types';
|
|
2
|
+
export interface MemberListItemProps {
|
|
3
|
+
member: WorkspaceMember;
|
|
4
|
+
onUpdateRoles?: (memberId: string, roleIds: string[]) => void;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
onToggleSelect?: (checked: boolean) => void;
|
|
7
|
+
canRemove?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function MemberListItem({ member, selected, onToggleSelect, canRemove, }: MemberListItemProps): import('react').JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Project, ProjectTag } from '../types';
|
|
3
|
+
interface ProjectCardProps {
|
|
4
|
+
project: Project;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
onToggleSelect?: (checked: boolean) => void;
|
|
7
|
+
onTagClick?: (tag: ProjectTag) => void;
|
|
8
|
+
canArchive?: boolean;
|
|
9
|
+
canDelete?: boolean;
|
|
10
|
+
canRename?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function ProjectCard({ project, selected, onToggleSelect, onTagClick, canArchive, canDelete, canRename, }: ProjectCardProps): React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ProjectMemberPickerDialogProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onOpenChange: (open: boolean) => void;
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
projectId: string;
|
|
6
|
+
projectName?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function ProjectMemberPickerDialog({ open, onOpenChange, workspaceId, projectId, projectName, }: ProjectMemberPickerDialogProps): import('react').JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface RenameProjectDialogProps {
|
|
2
|
+
project: {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
workspaceId: string;
|
|
6
|
+
};
|
|
7
|
+
open: boolean;
|
|
8
|
+
onOpenChange: (open: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function RenameProjectDialog({ project, open, onOpenChange }: RenameProjectDialogProps): import('react').JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keeps the workspace-scoped URL (`/workspaces/:workspaceId/...`) in step with the
|
|
3
|
+
* active context.
|
|
4
|
+
*
|
|
5
|
+
* The route path `:workspaceId` intentionally OVERRIDES the active context for data
|
|
6
|
+
* fetching (deep-link / drill into a specific workspace). The hazard is that the
|
|
7
|
+
* chrome context switcher updates the active context (+ `?workspace=` query +
|
|
8
|
+
* storage) but cannot rewrite this MFE's route path — so after a switch the path
|
|
9
|
+
* segment goes stale and its override silently points the page at the previously
|
|
10
|
+
* viewed workspace (wrong project list, create lands in the old workspace, etc.;
|
|
11
|
+
* BOFF-2805).
|
|
12
|
+
*
|
|
13
|
+
* Fix: when (and only when) the active context workspace CHANGES, rewrite the path's
|
|
14
|
+
* workspace segment to the new context. Firing on change — not on mount — preserves
|
|
15
|
+
* deep-links and drill-in (those change the path, not the context, so they are left
|
|
16
|
+
* alone and their override stands). Nested resource ids (`/projects/:projectId/...`)
|
|
17
|
+
* are dropped because they belong to the old workspace; we land on the page-level
|
|
18
|
+
* route for the new workspace. The query string (`?workspace=…&org=…`) is preserved.
|
|
19
|
+
*
|
|
20
|
+
* One-directional (context → path); the path never writes back to context, so there
|
|
21
|
+
* is no feedback loop.
|
|
22
|
+
*/
|
|
23
|
+
export declare function WorkspaceContextPathSync(): null;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
fallback?: ReactNode;
|
|
5
|
+
onReset?: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* Optional "go home" handler. The boundary is a class component (can't
|
|
8
|
+
* call `useNavigate`), so the host shell injects a React-Router-aware
|
|
9
|
+
* handler here. Falls back to `window.location.href = '/'` when omitted
|
|
10
|
+
* so a host that hasn't wired this up still gets a working button.
|
|
11
|
+
*/
|
|
12
|
+
onGoHome?: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* Contact-support email shown in the fallback UI. Defaults to
|
|
15
|
+
* `support@burdenoff.com`; hosts can override (e.g. for a tenant-branded
|
|
16
|
+
* deployment).
|
|
17
|
+
*/
|
|
18
|
+
supportEmail?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Error Boundary component for Workspaces microfrontend.
|
|
22
|
+
* Catches and handles runtime errors gracefully.
|
|
23
|
+
*
|
|
24
|
+
* The public export is a thin functional wrapper around the class boundary
|
|
25
|
+
* so it can consume the i18n translator via `useTr()`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function WorkspacesErrorBoundary(props: Props): import('react').JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { WorkspaceCard } from './WorkspaceCard';
|
|
2
|
+
export { CreateWorkspaceDialog } from './CreateWorkspaceDialog';
|
|
3
|
+
export { ProjectCard } from './ProjectCard';
|
|
4
|
+
export { CreateProjectDialog } from './CreateProjectDialog';
|
|
5
|
+
export { MemberListItem } from './MemberListItem';
|
|
6
|
+
export { InviteMemberDialog } from './InviteMemberDialog';
|
|
7
|
+
export { WorkspacesErrorBoundary } from './WorkspacesErrorBoundary';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TagItem } from '@burdenoff/fe-libs/tag';
|
|
2
|
+
export interface ProjectTagsWidgetProps {
|
|
3
|
+
/** Entity type recorded on the assigned-tag projection (e.g. "Project"). */
|
|
4
|
+
entityType: string;
|
|
5
|
+
/** Entity id (project id). */
|
|
6
|
+
entityId: string;
|
|
7
|
+
/** Workspace scope — widget renders nothing when empty. */
|
|
8
|
+
workspaceId?: string;
|
|
9
|
+
/** Controlled tag list owned by the parent. */
|
|
10
|
+
tags: TagItem[];
|
|
11
|
+
/** Persist a newly assigned tag on the entity. */
|
|
12
|
+
onAdd: (tag: TagItem) => void | Promise<void>;
|
|
13
|
+
/** Persist a tag removal on the entity. */
|
|
14
|
+
onRemove: (tagId: string) => void | Promise<void>;
|
|
15
|
+
/** Allow creating new tags on the fly. Default: true. */
|
|
16
|
+
allowCreate?: boolean;
|
|
17
|
+
/** Cap on assigned tags. Default 20. */
|
|
18
|
+
maxTags?: number;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function ProjectTagsWidget({ entityType: _entityType, entityId, workspaceId, tags, onAdd, onRemove, allowCreate, maxTags, className, }: ProjectTagsWidgetProps): import('react').JSX.Element | null;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useTr as e } from "../../hooks/useTr.js";
|
|
2
2
|
import { useCallback as t, useEffect as n, useRef as r, useState as i } from "react";
|
|
3
|
-
import { Loader2 as a, Plus as ee, Tag as te, X as
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { Command as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { useGatewayClient as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { Loader2 as a, Plus as ee, Tag as te, X as o } from "lucide-react";
|
|
4
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
|
+
import { Command as ne, CommandEmpty as l, CommandGroup as u, CommandInput as d, CommandItem as f, CommandList as p, Popover as m, PopoverContent as re, PopoverTrigger as ie } from "@burdenoff/fe-libs/ui";
|
|
6
|
+
import { cn as h } from "@burdenoff/fe-libs/shared/utils";
|
|
7
|
+
import { useGatewayClient as ae } from "@burdenoff/fe-libs/shared/graphql";
|
|
8
|
+
import { TagBadge as oe } from "@burdenoff/fe-libs/tag";
|
|
9
|
+
import { gql as g } from "@apollo/client";
|
|
10
|
+
import { useLazyQuery as _, useMutation as v } from "@apollo/client/react";
|
|
11
11
|
//#region src/components/tags/ProjectTagsWidget.tsx
|
|
12
|
-
var y =
|
|
12
|
+
var y = g`
|
|
13
13
|
query ProjectTagsWidget_SearchTags($query: String!, $vocabularyId: ID, $limit: Int) {
|
|
14
14
|
searchTags(query: $query, vocabularyId: $vocabularyId, limit: $limit) {
|
|
15
15
|
id
|
|
@@ -27,7 +27,7 @@ var y = h`
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
`, b =
|
|
30
|
+
`, b = g`
|
|
31
31
|
query ProjectTagsWidget_GetVocabularyByKey($key: String!) {
|
|
32
32
|
getVocabularyByKey(key: $key) {
|
|
33
33
|
id
|
|
@@ -35,7 +35,7 @@ var y = h`
|
|
|
35
35
|
name
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
`, se =
|
|
38
|
+
`, se = g`
|
|
39
39
|
mutation ProjectTagsWidget_CreateVocabulary($input: CreateVocabularyInput!) {
|
|
40
40
|
createVocabulary(input: $input) {
|
|
41
41
|
id
|
|
@@ -43,7 +43,7 @@ var y = h`
|
|
|
43
43
|
name
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
`, x =
|
|
46
|
+
`, x = g`
|
|
47
47
|
mutation ProjectTagsWidget_CreateTag($input: CreateTagInput!) {
|
|
48
48
|
createTag(input: $input) {
|
|
49
49
|
id
|
|
@@ -66,8 +66,8 @@ function C(e) {
|
|
|
66
66
|
let t = e;
|
|
67
67
|
return typeof t.id == "string" && typeof t.key == "string" && typeof t.label == "string";
|
|
68
68
|
}
|
|
69
|
-
function w({ entityType:
|
|
70
|
-
let A = e(), [ue, j] = i(!1), [M, N] = i(""), [P, F] = i(null), [I, L] = i(!1), [R, z] = i(), B = r(null), V =
|
|
69
|
+
function w({ entityType: g, entityId: w, workspaceId: ce, tags: T, onAdd: E, onRemove: D, allowCreate: O = !0, maxTags: k = 20, className: le }) {
|
|
70
|
+
let A = e(), [ue, j] = i(!1), [M, N] = i(""), [P, F] = i(null), [I, L] = i(!1), [R, z] = i(), B = r(null), V = ae("workspace"), H = !ce || !w, de = new Set(T.map((e) => e.id)), U = T.length < k, [W, { data: fe, loading: G }] = _(y, { client: V }), K = (fe?.searchTags ?? []).filter((e) => C(e) && !de.has(e.id)), [q, { loading: J }] = v(x, { client: V }), [Y] = _(b, { client: V }), [X] = v(se, { client: V }), Z = t(async () => {
|
|
71
71
|
if (R) return R;
|
|
72
72
|
let e = (await Y({ variables: { key: S } })).data?.getVocabularyByKey;
|
|
73
73
|
if (e) return z(e.id), e.id;
|
|
@@ -150,9 +150,9 @@ function w({ entityType: h, entityId: w, workspaceId: ce, tags: T, onAdd: E, onR
|
|
|
150
150
|
}, [D]);
|
|
151
151
|
if (H) return null;
|
|
152
152
|
let $ = !!(O && M.trim() && !G && K.length === 0);
|
|
153
|
-
return /* @__PURE__ */
|
|
154
|
-
className:
|
|
155
|
-
children: [T.map((e) => /* @__PURE__ */
|
|
153
|
+
return /* @__PURE__ */ c("div", {
|
|
154
|
+
className: h("flex flex-wrap items-center gap-1.5", le),
|
|
155
|
+
children: [T.map((e) => /* @__PURE__ */ s(oe, {
|
|
156
156
|
id: e.id,
|
|
157
157
|
label: e.label,
|
|
158
158
|
color: e.color ?? void 0,
|
|
@@ -161,79 +161,79 @@ function w({ entityType: h, entityId: w, workspaceId: ce, tags: T, onAdd: E, onR
|
|
|
161
161
|
removable: !0,
|
|
162
162
|
onRemove: () => void he(e.id),
|
|
163
163
|
size: "sm"
|
|
164
|
-
}, e.id)), U && /* @__PURE__ */
|
|
164
|
+
}, e.id)), U && /* @__PURE__ */ c(m, {
|
|
165
165
|
open: ue,
|
|
166
166
|
onOpenChange: j,
|
|
167
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ c(ie, {
|
|
168
168
|
type: "button",
|
|
169
169
|
"aria-label": A("projectTagsWidget.addTagAriaLabel", "Add tag"),
|
|
170
|
-
className:
|
|
171
|
-
children: [/* @__PURE__ */
|
|
172
|
-
}), /* @__PURE__ */
|
|
170
|
+
className: h("inline-flex items-center gap-1 px-2 py-0.5 rounded-full border border-dashed", "border-border-subtle text-text-secondary text-xs", "hover:border-foreground hover:text-text-primary transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]"),
|
|
171
|
+
children: [/* @__PURE__ */ s(te, { className: "size-3" }), /* @__PURE__ */ s("span", { children: T.length > 0 ? A("projectTagsWidget.add", "Add") : A("projectTagsWidget.addTags", "Add tags") })]
|
|
172
|
+
}), /* @__PURE__ */ s(re, {
|
|
173
173
|
className: "z-50 w-72 max-w-[calc(100vw-2rem)] border-border-subtle/80 bg-popover p-0 shadow-xl",
|
|
174
174
|
align: "start",
|
|
175
175
|
side: "bottom",
|
|
176
176
|
sideOffset: 8,
|
|
177
|
-
children: /* @__PURE__ */
|
|
177
|
+
children: /* @__PURE__ */ c(ne, {
|
|
178
178
|
shouldFilter: !1,
|
|
179
179
|
children: [
|
|
180
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ c("div", {
|
|
181
181
|
className: "relative",
|
|
182
|
-
children: [/* @__PURE__ */
|
|
182
|
+
children: [/* @__PURE__ */ s(d, {
|
|
183
183
|
placeholder: A("projectTagsWidget.searchPlaceholder", "Search or create a tag..."),
|
|
184
184
|
value: M,
|
|
185
185
|
onValueChange: pe,
|
|
186
186
|
className: "h-10 border-0 bg-transparent pr-9 text-sm outline-none placeholder:text-text-secondary"
|
|
187
|
-
}), G && /* @__PURE__ */
|
|
187
|
+
}), G && /* @__PURE__ */ s(a, { className: "absolute right-3 top-1/2 size-3.5 -translate-y-1/2 animate-spin text-text-secondary" })]
|
|
188
188
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ c(p, {
|
|
190
190
|
className: "max-h-48 overflow-y-auto",
|
|
191
191
|
children: [
|
|
192
|
-
M.trim() === "" && /* @__PURE__ */
|
|
192
|
+
M.trim() === "" && /* @__PURE__ */ s(l, {
|
|
193
193
|
className: "py-4 text-center text-xs text-text-secondary",
|
|
194
194
|
children: A("projectTagsWidget.typeToSearch", "Type to search or create a tag")
|
|
195
195
|
}),
|
|
196
|
-
K.length > 0 && /* @__PURE__ */
|
|
196
|
+
K.length > 0 && /* @__PURE__ */ s(u, { children: K.map((e) => /* @__PURE__ */ c(f, {
|
|
197
197
|
value: e.id,
|
|
198
198
|
onSelect: () => void Q(e),
|
|
199
199
|
className: "flex items-center gap-2 px-3 py-2 cursor-pointer",
|
|
200
200
|
disabled: I,
|
|
201
201
|
children: [
|
|
202
|
-
e.icon && /* @__PURE__ */
|
|
202
|
+
e.icon && /* @__PURE__ */ s("span", {
|
|
203
203
|
className: "text-sm",
|
|
204
204
|
children: e.icon
|
|
205
205
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ s("span", {
|
|
207
207
|
className: "truncate text-sm",
|
|
208
208
|
style: e.color ? { color: e.color } : void 0,
|
|
209
209
|
children: e.label
|
|
210
210
|
}),
|
|
211
|
-
I && /* @__PURE__ */
|
|
211
|
+
I && /* @__PURE__ */ s(a, { className: "ml-auto size-3 animate-spin" })
|
|
212
212
|
]
|
|
213
213
|
}, e.id)) }),
|
|
214
|
-
$ && /* @__PURE__ */
|
|
214
|
+
$ && /* @__PURE__ */ s(u, { children: /* @__PURE__ */ c(f, {
|
|
215
215
|
value: `__create__${M}`,
|
|
216
216
|
onSelect: () => void me(),
|
|
217
217
|
className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-primary",
|
|
218
218
|
disabled: J,
|
|
219
|
-
children: [J ? /* @__PURE__ */
|
|
219
|
+
children: [J ? /* @__PURE__ */ s(a, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ s(ee, { className: "size-3.5" }), /* @__PURE__ */ s("span", {
|
|
220
220
|
className: "text-sm truncate",
|
|
221
221
|
children: J ? A("projectTagsWidget.creating", "Creating...") : A("projectTagsWidget.create", "Create \"{{label}}\"", { label: M })
|
|
222
222
|
})]
|
|
223
223
|
}) }),
|
|
224
|
-
M.trim() !== "" && !G && K.length === 0 && !$ && /* @__PURE__ */
|
|
224
|
+
M.trim() !== "" && !G && K.length === 0 && !$ && /* @__PURE__ */ s(l, {
|
|
225
225
|
className: "py-4 text-center text-xs text-text-secondary",
|
|
226
226
|
children: A("projectTagsWidget.noTagsFound", "No tags found")
|
|
227
227
|
}),
|
|
228
|
-
P && /* @__PURE__ */
|
|
228
|
+
P && /* @__PURE__ */ s("div", {
|
|
229
229
|
className: "px-3 py-2 text-xs text-status-error-text border-t border-border-subtle",
|
|
230
230
|
children: P
|
|
231
231
|
})
|
|
232
232
|
]
|
|
233
233
|
}),
|
|
234
|
-
!U && /* @__PURE__ */
|
|
234
|
+
!U && /* @__PURE__ */ c("div", {
|
|
235
235
|
className: "border-t border-border-subtle px-3 py-2 text-xs text-text-secondary flex items-center gap-1",
|
|
236
|
-
children: [/* @__PURE__ */ o
|
|
236
|
+
children: [/* @__PURE__ */ s(o, { className: "size-3" }), A("projectTagsWidget.maxTagsReached", "Maximum {{maxTags}} tags reached", { maxTags: k })]
|
|
237
237
|
})
|
|
238
238
|
]
|
|
239
239
|
})
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace MFE - Permission Constants
|
|
3
|
+
*
|
|
4
|
+
* Maps to action definitions in wspace-rbac-svc seed file.
|
|
5
|
+
* Format: {resourceType}:{action}
|
|
6
|
+
*/
|
|
7
|
+
export declare const WORKSPACE_PERMISSIONS: {
|
|
8
|
+
readonly WORKSPACE_LIST: "workspace:list";
|
|
9
|
+
readonly WORKSPACE_READ: "workspace:read";
|
|
10
|
+
readonly WORKSPACE_CREATE: "workspace:create";
|
|
11
|
+
readonly WORKSPACE_UPDATE: "workspace:update";
|
|
12
|
+
readonly WORKSPACE_DELETE: "workspace:delete";
|
|
13
|
+
readonly WORKSPACE_ARCHIVE: "workspace:archive";
|
|
14
|
+
readonly MEMBER_LIST: "workspace-member:list";
|
|
15
|
+
readonly MEMBER_READ: "workspace-member:read";
|
|
16
|
+
readonly MEMBER_CREATE: "workspace-member:create";
|
|
17
|
+
readonly MEMBER_UPDATE: "workspace-member:update";
|
|
18
|
+
readonly MEMBER_DELETE: "workspace-member:delete";
|
|
19
|
+
readonly PROJECT_LIST: "project:list";
|
|
20
|
+
readonly PROJECT_READ: "project:read";
|
|
21
|
+
readonly PROJECT_CREATE: "project:create";
|
|
22
|
+
readonly PROJECT_UPDATE: "project:update";
|
|
23
|
+
readonly PROJECT_DELETE: "project:delete";
|
|
24
|
+
readonly PROJECT_ARCHIVE: "project:archive";
|
|
25
|
+
readonly PROJECT_MEMBER_LIST: "project-member:list";
|
|
26
|
+
readonly PROJECT_MEMBER_READ: "project-member:read";
|
|
27
|
+
readonly PROJECT_MEMBER_CREATE: "project-member:create";
|
|
28
|
+
readonly PROJECT_MEMBER_DELETE: "project-member:delete";
|
|
29
|
+
readonly SETTINGS_READ: "settings:read";
|
|
30
|
+
readonly SETTINGS_WRITE: "settings:write";
|
|
31
|
+
readonly ACTIVITY_READ: "activity-log:read";
|
|
32
|
+
};
|