@burdenoff/microfe-organization 2026.519.1 → 2026.520.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/generated/global-operations.d.ts +41 -0
- package/dist/generated/global-operations.d.ts.map +1 -1
- package/dist/generated/global-operations.js +39 -30
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js +3 -1
- package/dist/generated/global-types.js.map +1 -1
- package/dist/organization-management/AdminOrganizationRoutes.d.ts.map +1 -1
- package/dist/organization-management/AdminOrganizationRoutes.js +62 -45
- package/dist/organization-management/AdminOrganizationRoutes.js.map +1 -1
- package/dist/organization-management/UserOrganizationRoutes.d.ts.map +1 -1
- package/dist/organization-management/UserOrganizationRoutes.js +60 -43
- package/dist/organization-management/UserOrganizationRoutes.js.map +1 -1
- package/dist/organization-management/modules/members/components/PendingInvitesList.d.ts.map +1 -1
- package/dist/organization-management/modules/members/components/PendingInvitesList.js +70 -67
- package/dist/organization-management/modules/members/components/PendingInvitesList.js.map +1 -1
- package/dist/organization-management/modules/members/hooks/useInvites.d.ts +7 -2
- package/dist/organization-management/modules/members/hooks/useInvites.d.ts.map +1 -1
- package/dist/organization-management/modules/members/hooks/useInvites.js +9 -8
- package/dist/organization-management/modules/members/hooks/useInvites.js.map +1 -1
- package/dist/organization-management/modules/members/pages/InviteMemberPage.d.ts.map +1 -1
- package/dist/organization-management/modules/members/pages/InviteMemberPage.js +48 -47
- package/dist/organization-management/modules/members/pages/InviteMemberPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MyInvitesPage.js +8 -8
- package/dist/organization-management/modules/organizations/hooks/useOrgsWithPermission.d.ts +26 -0
- package/dist/organization-management/modules/organizations/hooks/useOrgsWithPermission.d.ts.map +1 -0
- package/dist/organization-management/modules/organizations/hooks/useOrgsWithPermission.js +63 -0
- package/dist/organization-management/modules/organizations/hooks/useOrgsWithPermission.js.map +1 -0
- package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.d.ts.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js +5 -5
- package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.d.ts.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js +226 -202
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/components/WorkspaceForm.d.ts.map +1 -1
- package/dist/organization-management/modules/workspaces/components/WorkspaceForm.js +152 -147
- package/dist/organization-management/modules/workspaces/components/WorkspaceForm.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.d.ts.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.js +39 -46
- package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.d.ts.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js +3 -3
- package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js.map +1 -1
- package/dist/organization-management/providers/OrgScopedPermissions.d.ts +22 -0
- package/dist/organization-management/providers/OrgScopedPermissions.d.ts.map +1 -0
- package/dist/organization-management/providers/OrgScopedPermissions.js +14 -0
- package/dist/organization-management/providers/OrgScopedPermissions.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminOrganizationRoutes.d.ts","sourceRoot":"","sources":["../../src/organization-management/AdminOrganizationRoutes.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AdminOrganizationRoutes.d.ts","sourceRoot":"","sources":["../../src/organization-management/AdminOrganizationRoutes.tsx"],"names":[],"mappings":"AA2FA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,4CAoDtC"}
|
|
@@ -1,73 +1,90 @@
|
|
|
1
1
|
import { OrganizationsListPage as e } from "./modules/organizations/pages/OrganizationsListPage.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { OrgScopedPermissions as t } from "./providers/OrgScopedPermissions.js";
|
|
3
|
+
import { Suspense as n, lazy as r } from "react";
|
|
4
|
+
import { useFeatureFlagDetails as i } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { Outlet as s, Route as c, Routes as l, useParams as u } from "react-router-dom";
|
|
6
7
|
//#region src/organization-management/AdminOrganizationRoutes.tsx
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
|
|
8
|
+
var d = r(() => import("./modules/organizations/pages/OrganizationCreatePage.js").then((e) => ({ default: e.OrganizationCreatePage }))), f = r(() => import("./modules/organizations/pages/OrganizationDetailPage.js").then((e) => ({ default: e.OrganizationDetailPage }))), p = r(() => import("./modules/organizations/pages/OrganizationEditPage.js").then((e) => ({ default: e.OrganizationEditPage }))), m = r(() => import("./modules/workspaces/pages/WorkspacesListPage.js").then((e) => ({ default: e.WorkspacesListPage }))), h = r(() => import("./modules/workspaces/pages/WorkspaceCreatePage.js").then((e) => ({ default: e.WorkspaceCreatePage }))), g = r(() => import("./modules/workspaces/pages/WorkspaceDetailPage.js").then((e) => ({ default: e.WorkspaceDetailPage }))), _ = r(() => import("./modules/workspaces/pages/WorkspaceEditPage.js").then((e) => ({ default: e.WorkspaceEditPage }))), v = r(() => import("./modules/members/pages/MembersListPage.js").then((e) => ({ default: e.MembersListPage }))), y = r(() => import("./modules/members/pages/MemberDetailPage.js").then((e) => ({ default: e.MemberDetailPage }))), b = r(() => import("./modules/members/pages/InviteMemberPage.js").then((e) => ({ default: e.InviteMemberPage }))), x = r(() => import("./modules/members/pages/MyInvitesPage.js").then((e) => ({ default: e.MyInvitesPage })));
|
|
9
|
+
function S({ paramName: e }) {
|
|
10
|
+
let n = u()[e];
|
|
11
|
+
return n ? /* @__PURE__ */ a(t, {
|
|
12
|
+
organizationId: n,
|
|
13
|
+
children: /* @__PURE__ */ a(s, {})
|
|
14
|
+
}) : /* @__PURE__ */ a(s, {});
|
|
15
|
+
}
|
|
16
|
+
function C() {
|
|
17
|
+
return /* @__PURE__ */ a("div", {
|
|
10
18
|
className: "flex items-center justify-center min-h-[200px]",
|
|
11
|
-
children: /* @__PURE__ */
|
|
19
|
+
children: /* @__PURE__ */ a("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-[var(--color-border-default)] border-t-[var(--color-action-primary-bg)]" })
|
|
12
20
|
});
|
|
13
21
|
}
|
|
14
|
-
function
|
|
15
|
-
let
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
fallback: /* @__PURE__ */
|
|
18
|
-
children: /* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
22
|
+
function w() {
|
|
23
|
+
let t = i("organization.create"), r = i("organization.workspaces"), s = i("organization.members"), u = i("organization.invite"), w = t ? !!t.value : !0, T = r ? !!r.value : !0, E = s ? !!s.value : !0, D = u ? !!u.value : !0;
|
|
24
|
+
return /* @__PURE__ */ a(n, {
|
|
25
|
+
fallback: /* @__PURE__ */ a(C, {}),
|
|
26
|
+
children: /* @__PURE__ */ o(l, { children: [
|
|
27
|
+
/* @__PURE__ */ a(c, {
|
|
20
28
|
index: !0,
|
|
21
|
-
element: /* @__PURE__ */
|
|
29
|
+
element: /* @__PURE__ */ a(e, { mode: "admin" })
|
|
22
30
|
}),
|
|
23
|
-
|
|
31
|
+
w && /* @__PURE__ */ a(c, {
|
|
24
32
|
path: "new",
|
|
25
|
-
element: /* @__PURE__ */
|
|
33
|
+
element: /* @__PURE__ */ a(d, {})
|
|
26
34
|
}),
|
|
27
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ o(c, {
|
|
28
36
|
path: ":id",
|
|
29
|
-
element: /* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
element: /* @__PURE__ */ a(S, { paramName: "id" }),
|
|
38
|
+
children: [/* @__PURE__ */ a(c, {
|
|
39
|
+
index: !0,
|
|
40
|
+
element: /* @__PURE__ */ a(f, {})
|
|
41
|
+
}), /* @__PURE__ */ a(c, {
|
|
42
|
+
path: "edit",
|
|
43
|
+
element: /* @__PURE__ */ a(p, {})
|
|
44
|
+
})]
|
|
34
45
|
}),
|
|
35
|
-
|
|
46
|
+
T && /* @__PURE__ */ a(c, {
|
|
36
47
|
path: "workspaces",
|
|
37
|
-
element: /* @__PURE__ */
|
|
48
|
+
element: /* @__PURE__ */ a(m, {})
|
|
38
49
|
}),
|
|
39
|
-
|
|
50
|
+
T && /* @__PURE__ */ a(c, {
|
|
40
51
|
path: "workspaces/new",
|
|
41
|
-
element: /* @__PURE__ */
|
|
52
|
+
element: /* @__PURE__ */ a(h, {})
|
|
42
53
|
}),
|
|
43
|
-
|
|
54
|
+
T && /* @__PURE__ */ a(c, {
|
|
44
55
|
path: "workspaces/:id",
|
|
45
|
-
element: /* @__PURE__ */
|
|
56
|
+
element: /* @__PURE__ */ a(g, {})
|
|
46
57
|
}),
|
|
47
|
-
|
|
58
|
+
T && /* @__PURE__ */ a(c, {
|
|
48
59
|
path: "workspaces/:id/edit",
|
|
49
|
-
element: /* @__PURE__ */
|
|
60
|
+
element: /* @__PURE__ */ a(_, {})
|
|
50
61
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ a(c, {
|
|
52
63
|
path: "invites",
|
|
53
|
-
element: /* @__PURE__ */
|
|
54
|
-
}),
|
|
55
|
-
E && /* @__PURE__ */ i(o, {
|
|
56
|
-
path: ":organizationId/members/invite",
|
|
57
|
-
element: /* @__PURE__ */ i(_, {})
|
|
58
|
-
}),
|
|
59
|
-
T && /* @__PURE__ */ i(o, {
|
|
60
|
-
path: ":organizationId/members",
|
|
61
|
-
element: /* @__PURE__ */ i(h, {})
|
|
64
|
+
element: /* @__PURE__ */ a(x, {})
|
|
62
65
|
}),
|
|
63
|
-
|
|
64
|
-
path: ":organizationId
|
|
65
|
-
element: /* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ o(c, {
|
|
67
|
+
path: ":organizationId",
|
|
68
|
+
element: /* @__PURE__ */ a(S, { paramName: "organizationId" }),
|
|
69
|
+
children: [
|
|
70
|
+
D && /* @__PURE__ */ a(c, {
|
|
71
|
+
path: "members/invite",
|
|
72
|
+
element: /* @__PURE__ */ a(b, {})
|
|
73
|
+
}),
|
|
74
|
+
E && /* @__PURE__ */ a(c, {
|
|
75
|
+
path: "members",
|
|
76
|
+
element: /* @__PURE__ */ a(v, {})
|
|
77
|
+
}),
|
|
78
|
+
E && /* @__PURE__ */ a(c, {
|
|
79
|
+
path: "members/:userId",
|
|
80
|
+
element: /* @__PURE__ */ a(y, {})
|
|
81
|
+
})
|
|
82
|
+
]
|
|
66
83
|
})
|
|
67
84
|
] })
|
|
68
85
|
});
|
|
69
86
|
}
|
|
70
87
|
//#endregion
|
|
71
|
-
export {
|
|
88
|
+
export { w as AdminOrganizationRoutes };
|
|
72
89
|
|
|
73
90
|
//# sourceMappingURL=AdminOrganizationRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminOrganizationRoutes.js","names":[],"sources":["../../src/organization-management/AdminOrganizationRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Route, Routes } from 'react-router-dom';\nimport { useFeatureFlagDetails } from '@burdenoff/fe-libs/shared/feature-flags';\n\n// Eager load - main entry point page\nimport { OrganizationsListPage } from './modules/organizations/pages/OrganizationsListPage';\n\n// Lazy load - secondary pages\nconst OrganizationCreatePage = lazy(() =>\n import('./modules/organizations/pages/OrganizationCreatePage').then((m) => ({\n default: m.OrganizationCreatePage,\n }))\n);\nconst OrganizationDetailPage = lazy(() =>\n import('./modules/organizations/pages/OrganizationDetailPage').then((m) => ({\n default: m.OrganizationDetailPage,\n }))\n);\nconst OrganizationEditPage = lazy(() =>\n import('./modules/organizations/pages/OrganizationEditPage').then((m) => ({\n default: m.OrganizationEditPage,\n }))\n);\n\n// Workspaces - lazy load all\nconst WorkspacesListPage = lazy(() =>\n import('./modules/workspaces/pages/WorkspacesListPage').then((m) => ({\n default: m.WorkspacesListPage,\n }))\n);\nconst WorkspaceCreatePage = lazy(() =>\n import('./modules/workspaces/pages/WorkspaceCreatePage').then((m) => ({\n default: m.WorkspaceCreatePage,\n }))\n);\nconst WorkspaceDetailPage = lazy(() =>\n import('./modules/workspaces/pages/WorkspaceDetailPage').then((m) => ({\n default: m.WorkspaceDetailPage,\n }))\n);\nconst WorkspaceEditPage = lazy(() =>\n import('./modules/workspaces/pages/WorkspaceEditPage').then((m) => ({\n default: m.WorkspaceEditPage,\n }))\n);\n\n// Members - lazy load all\nconst MembersListPage = lazy(() =>\n import('./modules/members/pages/MembersListPage').then((m) => ({ default: m.MembersListPage }))\n);\nconst MemberDetailPage = lazy(() =>\n import('./modules/members/pages/MemberDetailPage').then((m) => ({ default: m.MemberDetailPage }))\n);\nconst InviteMemberPage = lazy(() =>\n import('./modules/members/pages/InviteMemberPage').then((m) => ({ default: m.InviteMemberPage }))\n);\nconst MyInvitesPage = lazy(() =>\n import('./modules/members/pages/MyInvitesPage').then((m) => ({ default: m.MyInvitesPage }))\n);\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nfunction PageLoadingFallback() {\n return (\n <div className=\"flex items-center justify-center min-h-[200px]\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-2 border-[var(--color-border-default)] border-t-[var(--color-action-primary-bg)]\" />\n </div>\n );\n}\n\n/**\n * AdminOrganizationRoutes\n *\n * Full admin routing surface for the organization management MFE,\n * mounted by the admin application. Exposes all pages:\n * organizations CRUD, workspaces CRUD, members management, and\n * user-level invites.\n *\n * Routes start from root (/) since parent route is /organizations/*\n *\n * Lazy loading strategy:\n * - OrganizationsListPage: Eager loaded (main entry point)\n * - All other pages: Lazy loaded for better initial bundle size\n */\nexport function AdminOrganizationRoutes() {\n // Keep aligned with the platform feature-flag default-allow policy: an\n // unseeded flag must not disable shipped CRUDL. Explicit false still gates a\n // surface off when admins configure the flag.\n const createDetails = useFeatureFlagDetails('organization.create');\n const workspacesDetails = useFeatureFlagDetails('organization.workspaces');\n const membersDetails = useFeatureFlagDetails('organization.members');\n const inviteDetails = useFeatureFlagDetails('organization.invite');\n const createEnabled = createDetails ? Boolean(createDetails.value) : true;\n const workspacesEnabled = workspacesDetails ? Boolean(workspacesDetails.value) : true;\n const membersEnabled = membersDetails ? Boolean(membersDetails.value) : true;\n const inviteEnabled = inviteDetails ? Boolean(inviteDetails.value) : true;\n\n return (\n <Suspense fallback={<PageLoadingFallback />}>\n <Routes>\n {/* Organizations - index is the list (eager loaded). Admin app\n renders the platform-wide list (organizations query); product-app\n shells mounting this page should leave the default `mode=\"my\"`. */}\n <Route index element={<OrganizationsListPage mode=\"admin\" />} />\n {createEnabled && <Route path=\"new\" element={<OrganizationCreatePage />} />}\n <Route path=\":id\" element={<OrganizationDetailPage />} />\n
|
|
1
|
+
{"version":3,"file":"AdminOrganizationRoutes.js","names":[],"sources":["../../src/organization-management/AdminOrganizationRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Outlet, Route, Routes, useParams } from 'react-router-dom';\nimport { useFeatureFlagDetails } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { OrgScopedPermissions } from './providers/OrgScopedPermissions';\n\n// Eager load - main entry point page\nimport { OrganizationsListPage } from './modules/organizations/pages/OrganizationsListPage';\n\n// Lazy load - secondary pages\nconst OrganizationCreatePage = lazy(() =>\n import('./modules/organizations/pages/OrganizationCreatePage').then((m) => ({\n default: m.OrganizationCreatePage,\n }))\n);\nconst OrganizationDetailPage = lazy(() =>\n import('./modules/organizations/pages/OrganizationDetailPage').then((m) => ({\n default: m.OrganizationDetailPage,\n }))\n);\nconst OrganizationEditPage = lazy(() =>\n import('./modules/organizations/pages/OrganizationEditPage').then((m) => ({\n default: m.OrganizationEditPage,\n }))\n);\n\n// Workspaces - lazy load all\nconst WorkspacesListPage = lazy(() =>\n import('./modules/workspaces/pages/WorkspacesListPage').then((m) => ({\n default: m.WorkspacesListPage,\n }))\n);\nconst WorkspaceCreatePage = lazy(() =>\n import('./modules/workspaces/pages/WorkspaceCreatePage').then((m) => ({\n default: m.WorkspaceCreatePage,\n }))\n);\nconst WorkspaceDetailPage = lazy(() =>\n import('./modules/workspaces/pages/WorkspaceDetailPage').then((m) => ({\n default: m.WorkspaceDetailPage,\n }))\n);\nconst WorkspaceEditPage = lazy(() =>\n import('./modules/workspaces/pages/WorkspaceEditPage').then((m) => ({\n default: m.WorkspaceEditPage,\n }))\n);\n\n// Members - lazy load all\nconst MembersListPage = lazy(() =>\n import('./modules/members/pages/MembersListPage').then((m) => ({ default: m.MembersListPage }))\n);\nconst MemberDetailPage = lazy(() =>\n import('./modules/members/pages/MemberDetailPage').then((m) => ({ default: m.MemberDetailPage }))\n);\nconst InviteMemberPage = lazy(() =>\n import('./modules/members/pages/InviteMemberPage').then((m) => ({ default: m.InviteMemberPage }))\n);\nconst MyInvitesPage = lazy(() =>\n import('./modules/members/pages/MyInvitesPage').then((m) => ({ default: m.MyInvitesPage }))\n);\n\n/**\n * Layout wrapper that scopes the PermissionProvider to the current\n * organization's id. This layout owns the `:id` or `:organizationId` URL\n * segment directly (see route declarations below) so\n * `useParams()[paramName]` is guaranteed to be populated and the\n * `OrgScopedPermissions` provider always wraps its descendants. Mirrors\n * the helper in UserOrganizationRoutes — keep them aligned.\n */\nfunction OrgScopedRouteLayout({ paramName }: { paramName: 'id' | 'organizationId' }) {\n const params = useParams<Record<string, string | undefined>>();\n const orgId = params[paramName];\n if (!orgId) return <Outlet />;\n return (\n <OrgScopedPermissions organizationId={orgId}>\n <Outlet />\n </OrgScopedPermissions>\n );\n}\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nfunction PageLoadingFallback() {\n return (\n <div className=\"flex items-center justify-center min-h-[200px]\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-2 border-[var(--color-border-default)] border-t-[var(--color-action-primary-bg)]\" />\n </div>\n );\n}\n\n/**\n * AdminOrganizationRoutes\n *\n * Full admin routing surface for the organization management MFE,\n * mounted by the admin application. Exposes all pages:\n * organizations CRUD, workspaces CRUD, members management, and\n * user-level invites.\n *\n * Routes start from root (/) since parent route is /organizations/*\n *\n * Lazy loading strategy:\n * - OrganizationsListPage: Eager loaded (main entry point)\n * - All other pages: Lazy loaded for better initial bundle size\n */\nexport function AdminOrganizationRoutes() {\n // Keep aligned with the platform feature-flag default-allow policy: an\n // unseeded flag must not disable shipped CRUDL. Explicit false still gates a\n // surface off when admins configure the flag.\n const createDetails = useFeatureFlagDetails('organization.create');\n const workspacesDetails = useFeatureFlagDetails('organization.workspaces');\n const membersDetails = useFeatureFlagDetails('organization.members');\n const inviteDetails = useFeatureFlagDetails('organization.invite');\n const createEnabled = createDetails ? Boolean(createDetails.value) : true;\n const workspacesEnabled = workspacesDetails ? Boolean(workspacesDetails.value) : true;\n const membersEnabled = membersDetails ? Boolean(membersDetails.value) : true;\n const inviteEnabled = inviteDetails ? Boolean(inviteDetails.value) : true;\n\n return (\n <Suspense fallback={<PageLoadingFallback />}>\n <Routes>\n {/* Organizations - index is the list (eager loaded). Admin app\n renders the platform-wide list (organizations query); product-app\n shells mounting this page should leave the default `mode=\"my\"`. */}\n <Route index element={<OrganizationsListPage mode=\"admin\" />} />\n {createEnabled && <Route path=\"new\" element={<OrganizationCreatePage />} />}\n\n {/* Per-org routes — the layout OWNS the `:id` segment so\n useParams().id is guaranteed to be set inside\n OrgScopedPermissions. */}\n <Route path=\":id\" element={<OrgScopedRouteLayout paramName=\"id\" />}>\n <Route index element={<OrganizationDetailPage />} />\n <Route path=\"edit\" element={<OrganizationEditPage />} />\n </Route>\n\n {/* Workspaces — literal \"workspaces\" prefix ranks above the bare\n dynamic `:id` / `:organizationId` segments. */}\n {workspacesEnabled && <Route path=\"workspaces\" element={<WorkspacesListPage />} />}\n {workspacesEnabled && <Route path=\"workspaces/new\" element={<WorkspaceCreatePage />} />}\n {workspacesEnabled && <Route path=\"workspaces/:id\" element={<WorkspaceDetailPage />} />}\n {workspacesEnabled && <Route path=\"workspaces/:id/edit\" element={<WorkspaceEditPage />} />}\n\n {/* My Invites - user-level, not org-scoped. Declared before the\n `:organizationId` block so the literal \"invites\" wins the rank\n match. */}\n <Route path=\"invites\" element={<MyInvitesPage />} />\n\n {/* Member routes — layout OWNS the `:organizationId` segment for\n the same reason as the detail block above. */}\n <Route path=\":organizationId\" element={<OrgScopedRouteLayout paramName=\"organizationId\" />}>\n {inviteEnabled && <Route path=\"members/invite\" element={<InviteMemberPage />} />}\n {membersEnabled && <Route path=\"members\" element={<MembersListPage />} />}\n {membersEnabled && <Route path=\"members/:userId\" element={<MemberDetailPage />} />}\n </Route>\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;AASA,IAAM,IAAyB,QAC7B,OAAO,2DAAwD,MAAM,OAAO,EAC1E,SAAS,EAAE,wBACZ,EAAE,CACJ,EACK,IAAyB,QAC7B,OAAO,2DAAwD,MAAM,OAAO,EAC1E,SAAS,EAAE,wBACZ,EAAE,CACJ,EACK,IAAuB,QAC3B,OAAO,yDAAsD,MAAM,OAAO,EACxE,SAAS,EAAE,sBACZ,EAAE,CACJ,EAGK,IAAqB,QACzB,OAAO,oDAAiD,MAAM,OAAO,EACnE,SAAS,EAAE,oBACZ,EAAE,CACJ,EACK,IAAsB,QAC1B,OAAO,qDAAkD,MAAM,OAAO,EACpE,SAAS,EAAE,qBACZ,EAAE,CACJ,EACK,IAAsB,QAC1B,OAAO,qDAAkD,MAAM,OAAO,EACpE,SAAS,EAAE,qBACZ,EAAE,CACJ,EACK,IAAoB,QACxB,OAAO,mDAAgD,MAAM,OAAO,EAClE,SAAS,EAAE,mBACZ,EAAE,CACJ,EAGK,IAAkB,QACtB,OAAO,8CAA2C,MAAM,OAAO,EAAE,SAAS,E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,MAAO,CAAA;cAAlE,CACE,kBAAC,GAAD;KAAO,OAAA;KAAM,SAAS,kBAAC,GAAD,EAA0B,CAAA;KAAI,CAAA,EACpD,kBAAC,GAAD;KAAO,MAAK;KAAO,SAAS,kBAAC,GAAD,EAAwB,CAAA;KAAI,CAAA,CAClD;;GAIP,KAAqB,kBAAC,GAAD;IAAO,MAAK;IAAa,SAAS,kBAAC,GAAD,EAAsB,CAAA;IAAI,CAAA;GACjF,KAAqB,kBAAC,GAAD;IAAO,MAAK;IAAiB,SAAS,kBAAC,GAAD,EAAuB,CAAA;IAAI,CAAA;GACtF,KAAqB,kBAAC,GAAD;IAAO,MAAK;IAAiB,SAAS,kBAAC,GAAD,EAAuB,CAAA;IAAI,CAAA;GACtF,KAAqB,kBAAC,GAAD;IAAO,MAAK;IAAsB,SAAS,kBAAC,GAAD,EAAqB,CAAA;IAAI,CAAA;GAK1F,kBAAC,GAAD;IAAO,MAAK;IAAU,SAAS,kBAAC,GAAD,EAAiB,CAAA;IAAI,CAAA;GAIpD,kBAAC,GAAD;IAAO,MAAK;IAAkB,SAAS,kBAAC,GAAD,EAAsB,WAAU,kBAAmB,CAAA;cAA1F;KACG,KAAiB,kBAAC,GAAD;MAAO,MAAK;MAAiB,SAAS,kBAAC,GAAD,EAAoB,CAAA;MAAI,CAAA;KAC/E,KAAkB,kBAAC,GAAD;MAAO,MAAK;MAAU,SAAS,kBAAC,GAAD,EAAmB,CAAA;MAAI,CAAA;KACxE,KAAkB,kBAAC,GAAD;MAAO,MAAK;MAAkB,SAAS,kBAAC,GAAD,EAAoB,CAAA;MAAI,CAAA;KAC5E;;GACD,EAAA,CAAA;EACA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserOrganizationRoutes.d.ts","sourceRoot":"","sources":["../../src/organization-management/UserOrganizationRoutes.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UserOrganizationRoutes.d.ts","sourceRoot":"","sources":["../../src/organization-management/UserOrganizationRoutes.tsx"],"names":[],"mappings":"AA4FA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,sBAAsB,4CA2CrC"}
|
|
@@ -1,71 +1,88 @@
|
|
|
1
1
|
import { OrganizationsListPage as e } from "./modules/organizations/pages/OrganizationsListPage.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { OrgScopedPermissions as t } from "./providers/OrgScopedPermissions.js";
|
|
3
|
+
import { Suspense as n, lazy as r } from "react";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import { Outlet as o, Route as s, Routes as c, useParams as l } from "react-router-dom";
|
|
5
6
|
//#region src/organization-management/UserOrganizationRoutes.tsx
|
|
6
|
-
var
|
|
7
|
-
function
|
|
8
|
-
|
|
7
|
+
var u = r(() => import("./modules/organizations/pages/OrganizationCreatePage.js").then((e) => ({ default: e.OrganizationCreatePage }))), d = r(() => import("./modules/organizations/pages/OrganizationDetailPage.js").then((e) => ({ default: e.OrganizationDetailPage }))), f = r(() => import("./modules/organizations/pages/OrganizationEditPage.js").then((e) => ({ default: e.OrganizationEditPage }))), p = r(() => import("./modules/workspaces/pages/WorkspacesListPage.js").then((e) => ({ default: e.WorkspacesListPage }))), m = r(() => import("./modules/workspaces/pages/WorkspaceCreatePage.js").then((e) => ({ default: e.WorkspaceCreatePage }))), h = r(() => import("./modules/workspaces/pages/WorkspaceDetailPage.js").then((e) => ({ default: e.WorkspaceDetailPage }))), g = r(() => import("./modules/workspaces/pages/WorkspaceEditPage.js").then((e) => ({ default: e.WorkspaceEditPage }))), _ = r(() => import("./modules/members/pages/MembersListPage.js").then((e) => ({ default: e.MembersListPage }))), v = r(() => import("./modules/members/pages/MemberDetailPage.js").then((e) => ({ default: e.MemberDetailPage }))), y = r(() => import("./modules/members/pages/InviteMemberPage.js").then((e) => ({ default: e.InviteMemberPage }))), b = r(() => import("./modules/members/pages/MyInvitesPage.js").then((e) => ({ default: e.MyInvitesPage })));
|
|
8
|
+
function x({ paramName: e }) {
|
|
9
|
+
let n = l()[e];
|
|
10
|
+
return n ? /* @__PURE__ */ i(t, {
|
|
11
|
+
organizationId: n,
|
|
12
|
+
children: /* @__PURE__ */ i(o, {})
|
|
13
|
+
}) : /* @__PURE__ */ i(o, {});
|
|
14
|
+
}
|
|
15
|
+
function S() {
|
|
16
|
+
return /* @__PURE__ */ i("div", {
|
|
9
17
|
className: "flex items-center justify-center min-h-[200px]",
|
|
10
|
-
children: /* @__PURE__ */
|
|
18
|
+
children: /* @__PURE__ */ i("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-[var(--color-border-default)] border-t-[var(--color-action-primary-bg)]" })
|
|
11
19
|
});
|
|
12
20
|
}
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
fallback: /* @__PURE__ */
|
|
16
|
-
children: /* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
21
|
+
function C() {
|
|
22
|
+
return /* @__PURE__ */ i(n, {
|
|
23
|
+
fallback: /* @__PURE__ */ i(S, {}),
|
|
24
|
+
children: /* @__PURE__ */ a(c, { children: [
|
|
25
|
+
/* @__PURE__ */ i(s, {
|
|
18
26
|
index: !0,
|
|
19
|
-
element: /* @__PURE__ */
|
|
27
|
+
element: /* @__PURE__ */ i(e, { mode: "my" })
|
|
20
28
|
}),
|
|
21
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ i(s, {
|
|
22
30
|
path: "new",
|
|
23
|
-
element: /* @__PURE__ */
|
|
31
|
+
element: /* @__PURE__ */ i(u, {})
|
|
24
32
|
}),
|
|
25
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ a(s, {
|
|
26
34
|
path: ":id",
|
|
27
|
-
element: /* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
element: /* @__PURE__ */ i(x, { paramName: "id" }),
|
|
36
|
+
children: [/* @__PURE__ */ i(s, {
|
|
37
|
+
index: !0,
|
|
38
|
+
element: /* @__PURE__ */ i(d, {})
|
|
39
|
+
}), /* @__PURE__ */ i(s, {
|
|
40
|
+
path: "edit",
|
|
41
|
+
element: /* @__PURE__ */ i(f, {})
|
|
42
|
+
})]
|
|
32
43
|
}),
|
|
33
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ i(s, {
|
|
34
45
|
path: "invites",
|
|
35
|
-
element: /* @__PURE__ */
|
|
46
|
+
element: /* @__PURE__ */ i(b, {})
|
|
36
47
|
}),
|
|
37
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ i(s, {
|
|
38
49
|
path: "workspaces",
|
|
39
|
-
element: /* @__PURE__ */
|
|
50
|
+
element: /* @__PURE__ */ i(p, {})
|
|
40
51
|
}),
|
|
41
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ i(s, {
|
|
42
53
|
path: "workspaces/new",
|
|
43
|
-
element: /* @__PURE__ */
|
|
54
|
+
element: /* @__PURE__ */ i(m, {})
|
|
44
55
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ i(s, {
|
|
46
57
|
path: "workspaces/:id",
|
|
47
|
-
element: /* @__PURE__ */
|
|
58
|
+
element: /* @__PURE__ */ i(h, {})
|
|
48
59
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ i(s, {
|
|
50
61
|
path: "workspaces/:id/edit",
|
|
51
|
-
element: /* @__PURE__ */
|
|
52
|
-
}),
|
|
53
|
-
/* @__PURE__ */ r(a, {
|
|
54
|
-
path: ":organizationId/members/invite",
|
|
55
|
-
element: /* @__PURE__ */ r(g, {})
|
|
56
|
-
}),
|
|
57
|
-
/* @__PURE__ */ r(a, {
|
|
58
|
-
path: ":organizationId/members",
|
|
59
|
-
element: /* @__PURE__ */ r(m, {})
|
|
62
|
+
element: /* @__PURE__ */ i(g, {})
|
|
60
63
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
path: ":organizationId
|
|
63
|
-
element: /* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ a(s, {
|
|
65
|
+
path: ":organizationId",
|
|
66
|
+
element: /* @__PURE__ */ i(x, { paramName: "organizationId" }),
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ i(s, {
|
|
69
|
+
path: "members/invite",
|
|
70
|
+
element: /* @__PURE__ */ i(y, {})
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ i(s, {
|
|
73
|
+
path: "members",
|
|
74
|
+
element: /* @__PURE__ */ i(_, {})
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ i(s, {
|
|
77
|
+
path: "members/:userId",
|
|
78
|
+
element: /* @__PURE__ */ i(v, {})
|
|
79
|
+
})
|
|
80
|
+
]
|
|
64
81
|
})
|
|
65
82
|
] })
|
|
66
83
|
});
|
|
67
84
|
}
|
|
68
85
|
//#endregion
|
|
69
|
-
export {
|
|
86
|
+
export { C as UserOrganizationRoutes };
|
|
70
87
|
|
|
71
88
|
//# sourceMappingURL=UserOrganizationRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserOrganizationRoutes.js","names":[],"sources":["../../src/organization-management/UserOrganizationRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Route, Routes } from 'react-router-dom';\n\n// Eager load — main entry point page\nimport { OrganizationsListPage } from './modules/organizations/pages/OrganizationsListPage';\n\n// Lazy load — secondary pages. Same set as the admin surface but the list\n// page below renders in `mode=\"my\"` (membership-scoped), and per-action\n// permission gates inside each page (hasPermission(PERMISSIONS.ORG_*))\n// already hide buttons the user can't use.\nconst OrganizationCreatePage = lazy(() =>\n import('./modules/organizations/pages/OrganizationCreatePage').then((m) => ({\n default: m.OrganizationCreatePage,\n }))\n);\nconst OrganizationDetailPage = lazy(() =>\n import('./modules/organizations/pages/OrganizationDetailPage').then((m) => ({\n default: m.OrganizationDetailPage,\n }))\n);\nconst OrganizationEditPage = lazy(() =>\n import('./modules/organizations/pages/OrganizationEditPage').then((m) => ({\n default: m.OrganizationEditPage,\n }))\n);\nconst WorkspacesListPage = lazy(() =>\n import('./modules/workspaces/pages/WorkspacesListPage').then((m) => ({\n default: m.WorkspacesListPage,\n }))\n);\nconst WorkspaceCreatePage = lazy(() =>\n import('./modules/workspaces/pages/WorkspaceCreatePage').then((m) => ({\n default: m.WorkspaceCreatePage,\n }))\n);\nconst WorkspaceDetailPage = lazy(() =>\n import('./modules/workspaces/pages/WorkspaceDetailPage').then((m) => ({\n default: m.WorkspaceDetailPage,\n }))\n);\nconst WorkspaceEditPage = lazy(() =>\n import('./modules/workspaces/pages/WorkspaceEditPage').then((m) => ({\n default: m.WorkspaceEditPage,\n }))\n);\nconst MembersListPage = lazy(() =>\n import('./modules/members/pages/MembersListPage').then((m) => ({ default: m.MembersListPage }))\n);\nconst MemberDetailPage = lazy(() =>\n import('./modules/members/pages/MemberDetailPage').then((m) => ({ default: m.MemberDetailPage }))\n);\nconst InviteMemberPage = lazy(() =>\n import('./modules/members/pages/InviteMemberPage').then((m) => ({ default: m.InviteMemberPage }))\n);\nconst MyInvitesPage = lazy(() =>\n import('./modules/members/pages/MyInvitesPage').then((m) => ({ default: m.MyInvitesPage }))\n);\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nfunction PageLoadingFallback() {\n return (\n <div className=\"flex items-center justify-center min-h-[200px]\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-2 border-[var(--color-border-default)] border-t-[var(--color-action-primary-bg)]\" />\n </div>\n );\n}\n\n/**\n * UserOrganizationRoutes\n *\n * User-facing routing surface for the organization MFE, mounted by product\n * application shells (vibecontrols, etc.). Exposes the same shape as the\n * admin routing surface but the list page renders membership-scoped via\n * `mode=\"my\"` (calls `myOrganizations` with `@rbac(scopeType: \"self\")`).\n *\n * Per-action authorisation lives inside each page (`hasPermission` checks\n * for create / update / delete), so users with elevated permissions on an\n * org still see those controls; users without them only see view actions.\n *\n * All routes are unconditionally mounted. Feature flags\n * (`organization.create`, `organization.workspaces`, `organization.members`,\n * `organization.invite`) are applied at the call site — buttons, nav\n * items, section headers inside the pages — not on the route graph. This\n * avoids a class of route/nav mismatches where a page unconditionally\n * navigates to a URL that has been gated off (the previous flag-gated\n * routes produced dead URLs from `OrganizationDetailPage`'s workspace\n * cards, \"Create Workspace\" CTA, \"Manage Members\" button, etc.).\n *\n * Access control:\n * - Per-action `hasPermission` checks inside each page hide controls the\n * user can't use.\n * - Backend resolvers (`organization`, `organizationMembers`, etc.)\n * enforce membership server-side via `userHasAccessToOrganization`, so\n * deep-linking to a URL the user has no access to 403s at the resolver.\n *\n * Lazy loading strategy:\n * - OrganizationsListPage: Eager loaded (main entry point)\n * - All other pages: Lazy loaded for better initial bundle size\n */\nexport function UserOrganizationRoutes() {\n return (\n <Suspense fallback={<PageLoadingFallback />}>\n <Routes>\n {/* Organizations — index is the membership-scoped list (eager loaded) */}\n <Route index element={<OrganizationsListPage mode=\"my\" />} />\n <Route path=\"new\" element={<OrganizationCreatePage />} />\n <Route path=\":id\" element={<OrganizationDetailPage />} />\n <Route path=\":id/edit\" element={<OrganizationEditPage />} />\n\n {/* My Invites — user-level, not org-scoped */}\n <Route path=\"invites\" element={<MyInvitesPage />} />\n\n {/* Workspaces — `OrganizationDetailPage` navigates here on workspace\n card click and the \"Create Workspace\" CTA. */}\n <Route path=\"workspaces\" element={<WorkspacesListPage />} />\n <Route path=\"workspaces/new\" element={<WorkspaceCreatePage />} />\n <Route path=\"workspaces/:id\" element={<WorkspaceDetailPage />} />\n <Route path=\"workspaces/:id/edit\" element={<WorkspaceEditPage />} />\n\n {/* Members — scoped under organization ID. `OrganizationDetailPage`\n unconditionally renders the \"Manage Members\" button. */}\n <Route path=\":organizationId/members/invite\" element={<InviteMemberPage />} />\n <Route path=\":organizationId/members\" element={<MembersListPage />} />\n <Route path=\":organizationId/members/:userId\"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,OAAA;IAAM,SAAS,kBAAC,GAAD,EAAuB,MAAK,MAAO,CAAA;IAAI,CAAA;GAC7D,kBAAC,GAAD;IAAO,MAAK;IAAM,SAAS,kBAAC,GAAD,EAA0B,CAAA;IAAI,CAAA;GACzD,kBAAC,GAAD;IAAO,MAAK;IAAM,SAAS,kBAAC,GAAD,EAA0B,CAAA;IAAI,CAAA;GACzD,kBAAC,GAAD;IAAO,MAAK;IAAW,SAAS,kBAAC,GAAD,EAAwB,CAAA;IAAI,CAAA;GAG5D,kBAAC,GAAD;IAAO,MAAK;IAAU,SAAS,kBAAC,GAAD,EAAiB,CAAA;IAAI,CAAA;GAIpD,kBAAC,GAAD;IAAO,MAAK;IAAa,SAAS,kBAAC,GAAD,EAAsB,CAAA;IAAI,CAAA;GAC5D,kBAAC,GAAD;IAAO,MAAK;IAAiB,SAAS,kBAAC,GAAD,EAAuB,CAAA;IAAI,CAAA;GACjE,kBAAC,GAAD;IAAO,MAAK;IAAiB,SAAS,kBAAC,GAAD,EAAuB,CAAA;IAAI,CAAA;GACjE,kBAAC,GAAD;IAAO,MAAK;IAAsB,SAAS,kBAAC,GAAD,EAAqB,CAAA;IAAI,CAAA;GAIpE,kBAAC,GAAD;IAAO,MAAK;IAAiC,SAAS,kBAAC,GAAD,EAAoB,CAAA;IAAI,CAAA;GAC9E,kBAAC,GAAD;IAAO,MAAK;IAA0B,SAAS,kBAAC,GAAD,EAAmB,CAAA;IAAI,CAAA;GACtE,kBAAC,GAAD;IAAO,MAAK;IAAkC,SAAS,kBAAC,GAAD,EAAoB,CAAA;IAAI,CAAA;GACxE,EAAA,CAAA;EACA,CAAA"}
|
|
1
|
+
{"version":3,"file":"UserOrganizationRoutes.js","names":[],"sources":["../../src/organization-management/UserOrganizationRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Outlet, Route, Routes, useParams } from 'react-router-dom';\n\n// Eager load — main entry point page\nimport { OrganizationsListPage } from './modules/organizations/pages/OrganizationsListPage';\nimport { OrgScopedPermissions } from './providers/OrgScopedPermissions';\n\n// Lazy load — secondary pages. Same set as the admin surface but the list\n// page below renders in `mode=\"my\"` (membership-scoped), and per-action\n// permission gates inside each page (hasPermission(PERMISSIONS.ORG_*))\n// already hide buttons the user can't use.\nconst OrganizationCreatePage = lazy(() =>\n import('./modules/organizations/pages/OrganizationCreatePage').then((m) => ({\n default: m.OrganizationCreatePage,\n }))\n);\nconst OrganizationDetailPage = lazy(() =>\n import('./modules/organizations/pages/OrganizationDetailPage').then((m) => ({\n default: m.OrganizationDetailPage,\n }))\n);\nconst OrganizationEditPage = lazy(() =>\n import('./modules/organizations/pages/OrganizationEditPage').then((m) => ({\n default: m.OrganizationEditPage,\n }))\n);\nconst WorkspacesListPage = lazy(() =>\n import('./modules/workspaces/pages/WorkspacesListPage').then((m) => ({\n default: m.WorkspacesListPage,\n }))\n);\nconst WorkspaceCreatePage = lazy(() =>\n import('./modules/workspaces/pages/WorkspaceCreatePage').then((m) => ({\n default: m.WorkspaceCreatePage,\n }))\n);\nconst WorkspaceDetailPage = lazy(() =>\n import('./modules/workspaces/pages/WorkspaceDetailPage').then((m) => ({\n default: m.WorkspaceDetailPage,\n }))\n);\nconst WorkspaceEditPage = lazy(() =>\n import('./modules/workspaces/pages/WorkspaceEditPage').then((m) => ({\n default: m.WorkspaceEditPage,\n }))\n);\nconst MembersListPage = lazy(() =>\n import('./modules/members/pages/MembersListPage').then((m) => ({ default: m.MembersListPage }))\n);\nconst MemberDetailPage = lazy(() =>\n import('./modules/members/pages/MemberDetailPage').then((m) => ({ default: m.MemberDetailPage }))\n);\nconst InviteMemberPage = lazy(() =>\n import('./modules/members/pages/InviteMemberPage').then((m) => ({ default: m.InviteMemberPage }))\n);\nconst MyInvitesPage = lazy(() =>\n import('./modules/members/pages/MyInvitesPage').then((m) => ({ default: m.MyInvitesPage }))\n);\n\n/**\n * Layout wrapper that scopes the PermissionProvider to the current\n * organization's id (read from the URL). This layout owns the `:id` or\n * `:organizationId` URL segment directly (see route declarations below),\n * so `useParams()[paramName]` is guaranteed to be populated and the\n * `OrgScopedPermissions` provider always wraps its descendants. The\n * previous shape mounted this on a pathless parent and relied on child\n * routes to declare the param, which could silently fall through to\n * tenant-scoped permissions if a future refactor moved the layout above\n * a tree that doesn't own the segment.\n */\nfunction OrgScopedRouteLayout({ paramName }: { paramName: 'id' | 'organizationId' }) {\n const params = useParams<Record<string, string | undefined>>();\n const orgId = params[paramName];\n if (!orgId) return <Outlet />;\n return (\n <OrgScopedPermissions organizationId={orgId}>\n <Outlet />\n </OrgScopedPermissions>\n );\n}\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nfunction PageLoadingFallback() {\n return (\n <div className=\"flex items-center justify-center min-h-[200px]\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-2 border-[var(--color-border-default)] border-t-[var(--color-action-primary-bg)]\" />\n </div>\n );\n}\n\n/**\n * UserOrganizationRoutes\n *\n * User-facing routing surface for the organization MFE, mounted by product\n * application shells (vibecontrols, etc.). Exposes the same shape as the\n * admin routing surface but the list page renders membership-scoped via\n * `mode=\"my\"` (calls `myOrganizations` with `@rbac(scopeType: \"self\")`).\n *\n * Per-action authorisation lives inside each page (`hasPermission` checks\n * for create / update / delete), so users with elevated permissions on an\n * org still see those controls; users without them only see view actions.\n *\n * All routes are unconditionally mounted. Feature flags\n * (`organization.create`, `organization.workspaces`, `organization.members`,\n * `organization.invite`) are applied at the call site — buttons, nav\n * items, section headers inside the pages — not on the route graph. This\n * avoids a class of route/nav mismatches where a page unconditionally\n * navigates to a URL that has been gated off (the previous flag-gated\n * routes produced dead URLs from `OrganizationDetailPage`'s workspace\n * cards, \"Create Workspace\" CTA, \"Manage Members\" button, etc.).\n *\n * Access control:\n * - Per-action `hasPermission` checks inside each page hide controls the\n * user can't use.\n * - Backend resolvers (`organization`, `organizationMembers`, etc.)\n * enforce membership server-side via `userHasAccessToOrganization`, so\n * deep-linking to a URL the user has no access to 403s at the resolver.\n *\n * Lazy loading strategy:\n * - OrganizationsListPage: Eager loaded (main entry point)\n * - All other pages: Lazy loaded for better initial bundle size\n */\nexport function UserOrganizationRoutes() {\n return (\n <Suspense fallback={<PageLoadingFallback />}>\n <Routes>\n {/* Organizations — index is the membership-scoped list (eager loaded) */}\n <Route index element={<OrganizationsListPage mode=\"my\" />} />\n <Route path=\"new\" element={<OrganizationCreatePage />} />\n\n {/* Per-org routes — the layout OWNS the `:id` segment so\n `useParams().id` is guaranteed to be set inside\n OrgScopedPermissions and per-page hasPermission() resolves at\n the org's scope, not the outer tenant scope. */}\n <Route path=\":id\" element={<OrgScopedRouteLayout paramName=\"id\" />}>\n <Route index element={<OrganizationDetailPage />} />\n <Route path=\"edit\" element={<OrganizationEditPage />} />\n </Route>\n\n {/* My Invites — user-level, not org-scoped. Declared before the\n `:organizationId` block so the literal \"invites\" wins the rank\n match against the dynamic segment. */}\n <Route path=\"invites\" element={<MyInvitesPage />} />\n\n {/* Workspaces — `OrganizationDetailPage` navigates here on workspace\n card click and the \"Create Workspace\" CTA. Declared with literal\n \"workspaces\" prefix so it ranks above the bare `:organizationId`\n dynamic-segment routes below. */}\n <Route path=\"workspaces\" element={<WorkspacesListPage />} />\n <Route path=\"workspaces/new\" element={<WorkspaceCreatePage />} />\n <Route path=\"workspaces/:id\" element={<WorkspaceDetailPage />} />\n <Route path=\"workspaces/:id/edit\" element={<WorkspaceEditPage />} />\n\n {/* Members — layout OWNS the `:organizationId` segment for the\n same reason as the detail block above. The inner pages already\n read `useParams().organizationId`, so we keep the segment name\n distinct from `:id` even though both resolve to an org id. */}\n <Route path=\":organizationId\" element={<OrgScopedRouteLayout paramName=\"organizationId\" />}>\n <Route path=\"members/invite\" element={<InviteMemberPage />} />\n <Route path=\"members\" element={<MembersListPage />} />\n <Route path=\"members/:userId\" element={<MemberDetailPage />} />\n </Route>\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;AAWA,IAAM,IAAyB,QAC7B,OAAO,2DAAwD,MAAM,OAAO,EAC1E,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AAA;KACzD;;GACD,EAAA,CAAA;EACA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PendingInvitesList.d.ts","sourceRoot":"","sources":["../../../../../src/organization-management/modules/members/components/PendingInvitesList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PendingInvitesList.d.ts","sourceRoot":"","sources":["../../../../../src/organization-management/modules/members/components/PendingInvitesList.tsx"],"names":[],"mappings":"AASA,UAAU,uBAAuB;IAC/B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,cAAc,EAAE,EAAE,uBAAuB,2CAgJ7E"}
|
|
@@ -1,131 +1,134 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { toast as e } from "../../../../node_modules/sonner/dist/index.js";
|
|
2
2
|
import { useCancelInvite as t, useOrganizationInvites as n, useResendInvite as r } from "../hooks/useInvites.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { InviteStatus as i } from "../../../../generated/global-types.js";
|
|
4
|
+
import { useTr as a } from "../../../shared/hooks/useTr.js";
|
|
5
|
+
import { InviteStatusBadge as o } from "./InviteStatusBadge.js";
|
|
6
|
+
import { MemberRoleBadge as s } from "./MemberRoleBadge.js";
|
|
7
|
+
import { useState as c } from "react";
|
|
8
|
+
import { AlertCircle as l, Loader2 as u, RotateCw as d, X as f } from "lucide-react";
|
|
9
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
9
10
|
//#region src/organization-management/modules/members/components/PendingInvitesList.tsx
|
|
10
|
-
function
|
|
11
|
-
let
|
|
12
|
-
if (
|
|
11
|
+
function h({ organizationId: h }) {
|
|
12
|
+
let g = a(), { invites: _, loading: v, error: y, total: b } = n(h, { status: i.Pending }, 50), { cancelInvite: x, loading: S } = t(), { resendInvite: C, loading: w } = r(), [T, E] = c(null);
|
|
13
|
+
if (v && _.length === 0) return /* @__PURE__ */ p("div", {
|
|
13
14
|
className: "flex items-center justify-center py-8",
|
|
14
|
-
children: /* @__PURE__ */
|
|
15
|
+
children: /* @__PURE__ */ p(u, {
|
|
15
16
|
size: 20,
|
|
16
17
|
className: "animate-spin text-[var(--color-text-muted)]"
|
|
17
18
|
})
|
|
18
19
|
});
|
|
19
|
-
if (
|
|
20
|
+
if (y) return /* @__PURE__ */ m("p", {
|
|
20
21
|
className: "py-6 text-center text-sm text-[var(--color-status-error-text)]",
|
|
21
22
|
children: [
|
|
22
|
-
|
|
23
|
+
g("members.myInvites.loadFailed", "Failed to load invites"),
|
|
23
24
|
": ",
|
|
24
|
-
|
|
25
|
+
y.message
|
|
25
26
|
]
|
|
26
27
|
});
|
|
27
|
-
if (
|
|
28
|
+
if (_.length === 0) return /* @__PURE__ */ p("p", {
|
|
28
29
|
className: "text-sm text-[var(--color-text-muted)] text-center py-6",
|
|
29
|
-
children:
|
|
30
|
+
children: g("members.myInvites.emptyTitle", "No pending invites")
|
|
30
31
|
});
|
|
31
|
-
let
|
|
32
|
+
let D = async (t, n) => {
|
|
32
33
|
try {
|
|
33
|
-
|
|
34
|
-
} catch (
|
|
35
|
-
|
|
34
|
+
E(null), await x(t), e.success(`${g("members.invite.cancelSuccess", "Invite cancelled for")} ${n}`);
|
|
35
|
+
} catch (t) {
|
|
36
|
+
let n = t instanceof Error ? t.message : g("members.invite.cancelFailed", "Failed to cancel invite");
|
|
37
|
+
E(n), e.error(n);
|
|
36
38
|
}
|
|
37
|
-
},
|
|
39
|
+
}, O = async (t, n) => {
|
|
38
40
|
try {
|
|
39
|
-
|
|
40
|
-
} catch (
|
|
41
|
-
|
|
41
|
+
E(null), await C(t), e.success(`${g("members.invite.resendSuccess", "Invite re-sent to")} ${n}`);
|
|
42
|
+
} catch (t) {
|
|
43
|
+
let n = t instanceof Error ? t.message : g("members.invite.resendFailed", "Failed to resend invite");
|
|
44
|
+
E(n), e.error(n);
|
|
42
45
|
}
|
|
43
46
|
};
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ m("div", { children: [
|
|
48
|
+
/* @__PURE__ */ m("h3", {
|
|
46
49
|
className: "text-sm font-semibold text-[var(--color-text-secondary)] uppercase tracking-wider mb-3",
|
|
47
50
|
children: [
|
|
48
|
-
|
|
51
|
+
g("members.invite.pendingTitle", "Pending Invites"),
|
|
49
52
|
" (",
|
|
50
|
-
|
|
53
|
+
b,
|
|
51
54
|
")"
|
|
52
55
|
]
|
|
53
56
|
}),
|
|
54
|
-
|
|
57
|
+
T && /* @__PURE__ */ m("div", {
|
|
55
58
|
className: "mb-3 flex items-center gap-2 rounded-lg border border-[var(--color-status-error-border)] bg-[var(--color-status-error-bgSubtle)] p-2.5",
|
|
56
|
-
children: [/* @__PURE__ */
|
|
59
|
+
children: [/* @__PURE__ */ p(l, {
|
|
57
60
|
size: 14,
|
|
58
61
|
className: "shrink-0 text-[var(--color-status-error-text)]"
|
|
59
|
-
}), /* @__PURE__ */
|
|
62
|
+
}), /* @__PURE__ */ p("p", {
|
|
60
63
|
className: "text-sm text-[var(--color-status-error-text)]",
|
|
61
|
-
children:
|
|
64
|
+
children: T
|
|
62
65
|
})]
|
|
63
66
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ p("div", {
|
|
65
68
|
className: "overflow-x-auto rounded-lg border border-[var(--color-border-default)]",
|
|
66
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ m("table", {
|
|
67
70
|
className: "w-full text-sm",
|
|
68
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ p("thead", { children: /* @__PURE__ */ m("tr", {
|
|
69
72
|
className: "bg-[var(--color-bg-subtle)] border-b border-[var(--color-border-default)]",
|
|
70
73
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ p("th", {
|
|
72
75
|
className: "text-left px-4 py-2.5 font-medium text-[var(--color-text-secondary)]",
|
|
73
|
-
children:
|
|
76
|
+
children: g("members.invite.emailLabel", "Email Address")
|
|
74
77
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ p("th", {
|
|
76
79
|
className: "text-left px-4 py-2.5 font-medium text-[var(--color-text-secondary)]",
|
|
77
|
-
children:
|
|
80
|
+
children: g("members.list.column.role", "Role")
|
|
78
81
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ p("th", {
|
|
80
83
|
className: "text-left px-4 py-2.5 font-medium text-[var(--color-text-secondary)]",
|
|
81
|
-
children:
|
|
84
|
+
children: g("common.status", "Status")
|
|
82
85
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ p("th", {
|
|
84
87
|
className: "text-left px-4 py-2.5 font-medium text-[var(--color-text-secondary)]",
|
|
85
|
-
children:
|
|
88
|
+
children: g("members.invite.expires", "Expires")
|
|
86
89
|
}),
|
|
87
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ p("th", {
|
|
88
91
|
className: "text-right px-4 py-2.5 font-medium text-[var(--color-text-secondary)]",
|
|
89
|
-
children:
|
|
92
|
+
children: g("common.actions", "Actions")
|
|
90
93
|
})
|
|
91
94
|
]
|
|
92
|
-
}) }), /* @__PURE__ */
|
|
95
|
+
}) }), /* @__PURE__ */ p("tbody", { children: _.map((e) => /* @__PURE__ */ m("tr", {
|
|
93
96
|
className: "border-b border-[var(--color-border-default)] last:border-b-0 hover:bg-[var(--color-bg-subtle)] transition-colors",
|
|
94
97
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ p("td", {
|
|
96
99
|
className: "px-4 py-3 text-[var(--color-text-primary)]",
|
|
97
100
|
children: e.email
|
|
98
101
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ p("td", {
|
|
100
103
|
className: "px-4 py-3",
|
|
101
|
-
children: /* @__PURE__ */
|
|
104
|
+
children: /* @__PURE__ */ p(s, { role: e.role })
|
|
102
105
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ p("td", {
|
|
104
107
|
className: "px-4 py-3",
|
|
105
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ p(o, { status: e.status })
|
|
106
109
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ p("td", {
|
|
108
111
|
className: "px-4 py-3 text-[var(--color-text-muted)]",
|
|
109
112
|
children: new Date(e.expiresAt).toLocaleDateString()
|
|
110
113
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ p("td", {
|
|
112
115
|
className: "px-4 py-3 text-right",
|
|
113
|
-
children: /* @__PURE__ */
|
|
116
|
+
children: /* @__PURE__ */ m("div", {
|
|
114
117
|
className: "flex items-center justify-end gap-1",
|
|
115
|
-
children: [/* @__PURE__ */
|
|
116
|
-
onClick: () =>
|
|
117
|
-
disabled:
|
|
118
|
+
children: [/* @__PURE__ */ p("button", {
|
|
119
|
+
onClick: () => O(e.id, e.email),
|
|
120
|
+
disabled: w,
|
|
118
121
|
className: "p-1.5 rounded-md hover:bg-[var(--color-bg-subtle)] text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors",
|
|
119
|
-
title:
|
|
120
|
-
"aria-label": `${
|
|
121
|
-
children: /* @__PURE__ */
|
|
122
|
-
}), /* @__PURE__ */
|
|
123
|
-
onClick: () =>
|
|
124
|
-
disabled:
|
|
122
|
+
title: g("members.invite.resend", "Resend invite"),
|
|
123
|
+
"aria-label": `${g("members.invite.resendFor", "Resend invite for")} ${e.email}`,
|
|
124
|
+
children: /* @__PURE__ */ p(d, { size: 14 })
|
|
125
|
+
}), /* @__PURE__ */ p("button", {
|
|
126
|
+
onClick: () => D(e.id, e.email),
|
|
127
|
+
disabled: S,
|
|
125
128
|
className: "p-1.5 rounded-md text-[var(--color-text-muted)] transition-colors hover:bg-[var(--color-status-error-bgSubtle)] hover:text-[var(--color-status-error-text)]",
|
|
126
|
-
title:
|
|
127
|
-
"aria-label": `${
|
|
128
|
-
children: /* @__PURE__ */ f
|
|
129
|
+
title: g("members.invite.cancel", "Cancel invite"),
|
|
130
|
+
"aria-label": `${g("members.invite.cancelFor", "Cancel invite for")} ${e.email}`,
|
|
131
|
+
children: /* @__PURE__ */ p(f, { size: 14 })
|
|
129
132
|
})]
|
|
130
133
|
})
|
|
131
134
|
})
|
|
@@ -136,6 +139,6 @@ function m({ organizationId: m }) {
|
|
|
136
139
|
] });
|
|
137
140
|
}
|
|
138
141
|
//#endregion
|
|
139
|
-
export {
|
|
142
|
+
export { h as PendingInvitesList };
|
|
140
143
|
|
|
141
144
|
//# sourceMappingURL=PendingInvitesList.js.map
|