@burdenoff/microfe-admin 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/admin/AdminRoot.d.ts.map +1 -1
- package/dist/admin/AdminRoot.js +54 -46
- package/dist/admin/AdminRoot.js.map +1 -1
- package/dist/admin/AdminRoutes.d.ts.map +1 -1
- package/dist/admin/AdminRoutes.js +22 -18
- package/dist/admin/AdminRoutes.js.map +1 -1
- package/dist/admin/components/ConfirmDialog.js +81 -4
- package/dist/admin/components/ConfirmDialog.js.map +1 -0
- package/dist/admin/components/TenantSsoPanel.d.ts +7 -0
- package/dist/admin/components/TenantSsoPanel.d.ts.map +1 -0
- package/dist/admin/components/TenantSsoPanel.js +286 -0
- package/dist/admin/components/TenantSsoPanel.js.map +1 -0
- package/dist/admin/constants/permissions.d.ts +2 -0
- package/dist/admin/constants/permissions.d.ts.map +1 -1
- package/dist/admin/constants/permissions.js +2 -0
- package/dist/admin/constants/permissions.js.map +1 -1
- package/dist/admin/hooks/useAdminPermissions.d.ts +2 -0
- package/dist/admin/hooks/useAdminPermissions.d.ts.map +1 -1
- package/dist/admin/hooks/useAdminPermissions.js +2 -0
- package/dist/admin/hooks/useAdminPermissions.js.map +1 -1
- package/dist/admin/pages/SyncFailuresPage.d.ts +14 -0
- package/dist/admin/pages/SyncFailuresPage.d.ts.map +1 -0
- package/dist/admin/pages/SyncFailuresPage.js +297 -0
- package/dist/admin/pages/SyncFailuresPage.js.map +1 -0
- package/dist/admin/pages/TenantDetailPage.d.ts.map +1 -1
- package/dist/admin/pages/TenantDetailPage.js +28 -23
- package/dist/admin/pages/TenantDetailPage.js.map +1 -1
- package/dist/admin/pages/index.d.ts +1 -0
- package/dist/admin/pages/index.d.ts.map +1 -1
- package/dist/admin/pages/index.js +1 -0
- package/dist/generated/global-operations.d.ts +252 -0
- package/dist/generated/global-operations.d.ts.map +1 -1
- package/dist/generated/global-operations.js +156 -34
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +566 -1393
- package/dist/generated/global-types.d.ts.map +1 -1
- package/dist/generated/global-types.js +4 -2
- package/dist/generated/global-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminRoot.d.ts","sourceRoot":"","sources":["../../src/admin/AdminRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AdminRoot.d.ts","sourceRoot":"","sources":["../../src/admin/AdminRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAsBhC,OAAO,KAAK,EAAW,cAAc,EAAE,MAAM,SAAS,CAAC;AAIvD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA8LxC,CAAC"}
|
package/dist/admin/AdminRoot.js
CHANGED
|
@@ -2,86 +2,86 @@ import { AdminProvider as e } from "./providers/AdminProvider.js";
|
|
|
2
2
|
import { joinPath as t } from "./utils/navigation.js";
|
|
3
3
|
import { AdminRoutes as n } from "./AdminRoutes.js";
|
|
4
4
|
import { useEffect as r } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import { jsx as
|
|
7
|
-
import { FeatureFlagProvider as
|
|
5
|
+
import { AlertOctagon as i, Box as a, Building as o, Building2 as s, CreditCard as c, FileText as l, GitBranch as u, Layout as d, LayoutDashboard as f, Link2 as p, Mail as m, Server as h, Settings as g, ShieldCheck as _, ToggleLeft as v, Users as y } from "lucide-react";
|
|
6
|
+
import { jsx as b } from "react/jsx-runtime";
|
|
7
|
+
import { FeatureFlagProvider as x } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
8
8
|
//#region src/admin/AdminRoot.tsx
|
|
9
|
-
var
|
|
10
|
-
let { registerNavItems:
|
|
9
|
+
var S = (S) => {
|
|
10
|
+
let { registerNavItems: C, registerFooterItems: w, basePath: T = "" } = S;
|
|
11
11
|
return r(() => {
|
|
12
|
-
if (
|
|
12
|
+
if (C) return C([
|
|
13
13
|
{
|
|
14
14
|
id: "admin-dashboard",
|
|
15
15
|
label: "Dashboard",
|
|
16
|
-
path: t(
|
|
17
|
-
icon: /* @__PURE__ */
|
|
16
|
+
path: t(T, "dashboard"),
|
|
17
|
+
icon: /* @__PURE__ */ b(f, { size: 20 }),
|
|
18
18
|
order: 10,
|
|
19
19
|
group: "admin"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
id: "admin-tenants",
|
|
23
23
|
label: "Tenants",
|
|
24
|
-
path: t(
|
|
25
|
-
icon: /* @__PURE__ */
|
|
24
|
+
path: t(T, "tenants"),
|
|
25
|
+
icon: /* @__PURE__ */ b(s, { size: 20 }),
|
|
26
26
|
order: 20,
|
|
27
27
|
group: "admin"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
id: "admin-organizations",
|
|
31
31
|
label: "Organizations",
|
|
32
|
-
path: t(
|
|
33
|
-
icon: /* @__PURE__ */
|
|
32
|
+
path: t(T, "organizations"),
|
|
33
|
+
icon: /* @__PURE__ */ b(o, { size: 20 }),
|
|
34
34
|
order: 25,
|
|
35
35
|
group: "admin"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
id: "admin-workspaces",
|
|
39
39
|
label: "Workspaces",
|
|
40
|
-
path: t(
|
|
41
|
-
icon: /* @__PURE__ */
|
|
40
|
+
path: t(T, "workspaces"),
|
|
41
|
+
icon: /* @__PURE__ */ b(d, { size: 20 }),
|
|
42
42
|
order: 26,
|
|
43
43
|
group: "admin"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
id: "admin-users",
|
|
47
47
|
label: "Users",
|
|
48
|
-
path: t(
|
|
49
|
-
icon: /* @__PURE__ */ y
|
|
48
|
+
path: t(T, "users"),
|
|
49
|
+
icon: /* @__PURE__ */ b(y, { size: 20 }),
|
|
50
50
|
order: 30,
|
|
51
51
|
group: "admin"
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
id: "admin-roles",
|
|
55
55
|
label: "Roles & Permissions",
|
|
56
|
-
path: t(
|
|
57
|
-
icon: /* @__PURE__ */
|
|
56
|
+
path: t(T, "roles"),
|
|
57
|
+
icon: /* @__PURE__ */ b(_, { size: 20 }),
|
|
58
58
|
order: 35,
|
|
59
59
|
group: "admin"
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
id: "admin-billing",
|
|
63
63
|
label: "Billing",
|
|
64
|
-
path: t(
|
|
65
|
-
icon: /* @__PURE__ */
|
|
64
|
+
path: t(T, "billing"),
|
|
65
|
+
icon: /* @__PURE__ */ b(c, { size: 20 }),
|
|
66
66
|
order: 40,
|
|
67
67
|
group: "admin",
|
|
68
68
|
children: [
|
|
69
69
|
{
|
|
70
70
|
id: "admin-billing-subscriptions",
|
|
71
71
|
label: "Subscriptions",
|
|
72
|
-
path: t(
|
|
72
|
+
path: t(T, "billing/subscriptions"),
|
|
73
73
|
order: 1
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
id: "admin-billing-invoices",
|
|
77
77
|
label: "Invoices",
|
|
78
|
-
path: t(
|
|
78
|
+
path: t(T, "billing/invoices"),
|
|
79
79
|
order: 2
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
id: "admin-billing-plans",
|
|
83
83
|
label: "Plans",
|
|
84
|
-
path: t(
|
|
84
|
+
path: t(T, "billing/plans"),
|
|
85
85
|
order: 3
|
|
86
86
|
}
|
|
87
87
|
]
|
|
@@ -89,87 +89,95 @@ var x = (x) => {
|
|
|
89
89
|
{
|
|
90
90
|
id: "admin-communications",
|
|
91
91
|
label: "Communications",
|
|
92
|
-
path: t(
|
|
93
|
-
icon: /* @__PURE__ */
|
|
92
|
+
path: t(T, "communications"),
|
|
93
|
+
icon: /* @__PURE__ */ b(m, { size: 20 }),
|
|
94
94
|
order: 50,
|
|
95
95
|
group: "admin"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
id: "admin-feature-flags",
|
|
99
99
|
label: "Feature Flags",
|
|
100
|
-
path: t(
|
|
101
|
-
icon: /* @__PURE__ */
|
|
100
|
+
path: t(T, "feature-flags"),
|
|
101
|
+
icon: /* @__PURE__ */ b(v, { size: 20 }),
|
|
102
102
|
order: 60,
|
|
103
103
|
group: "admin"
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
id: "admin-workflows",
|
|
107
107
|
label: "Workflows",
|
|
108
|
-
path: t(
|
|
109
|
-
icon: /* @__PURE__ */
|
|
108
|
+
path: t(T, "workflows"),
|
|
109
|
+
icon: /* @__PURE__ */ b(u, { size: 20 }),
|
|
110
110
|
order: 70,
|
|
111
111
|
group: "admin"
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
id: "admin-sre",
|
|
115
115
|
label: "SRE",
|
|
116
|
-
path: t(
|
|
117
|
-
icon: /* @__PURE__ */
|
|
116
|
+
path: t(T, "sre"),
|
|
117
|
+
icon: /* @__PURE__ */ b(h, { size: 20 }),
|
|
118
118
|
order: 80,
|
|
119
119
|
group: "admin"
|
|
120
120
|
},
|
|
121
|
+
{
|
|
122
|
+
id: "admin-sync-failures",
|
|
123
|
+
label: "Sync Failures",
|
|
124
|
+
path: t(T, "sync-failures"),
|
|
125
|
+
icon: /* @__PURE__ */ b(i, { size: 20 }),
|
|
126
|
+
order: 82,
|
|
127
|
+
group: "admin"
|
|
128
|
+
},
|
|
121
129
|
{
|
|
122
130
|
id: "admin-audit",
|
|
123
131
|
label: "Audit Logs",
|
|
124
|
-
path: t(
|
|
125
|
-
icon: /* @__PURE__ */
|
|
132
|
+
path: t(T, "audit"),
|
|
133
|
+
icon: /* @__PURE__ */ b(l, { size: 20 }),
|
|
126
134
|
order: 85,
|
|
127
135
|
group: "admin"
|
|
128
136
|
},
|
|
129
137
|
{
|
|
130
138
|
id: "admin-referrals",
|
|
131
139
|
label: "Referrals",
|
|
132
|
-
path: t(
|
|
133
|
-
icon: /* @__PURE__ */
|
|
140
|
+
path: t(T, "referrals"),
|
|
141
|
+
icon: /* @__PURE__ */ b(p, { size: 20 }),
|
|
134
142
|
order: 86,
|
|
135
143
|
group: "admin"
|
|
136
144
|
},
|
|
137
145
|
{
|
|
138
146
|
id: "admin-sandbox",
|
|
139
147
|
label: "Sandbox",
|
|
140
|
-
path: t(
|
|
141
|
-
icon: /* @__PURE__ */
|
|
148
|
+
path: t(T, "sandbox"),
|
|
149
|
+
icon: /* @__PURE__ */ b(a, { size: 20 }),
|
|
142
150
|
order: 87,
|
|
143
151
|
group: "admin"
|
|
144
152
|
},
|
|
145
153
|
{
|
|
146
154
|
id: "admin-settings",
|
|
147
155
|
label: "Settings",
|
|
148
|
-
path: t(
|
|
149
|
-
icon: /* @__PURE__ */
|
|
156
|
+
path: t(T, "settings"),
|
|
157
|
+
icon: /* @__PURE__ */ b(g, { size: 20 }),
|
|
150
158
|
order: 90,
|
|
151
159
|
group: "admin"
|
|
152
160
|
}
|
|
153
161
|
]);
|
|
154
|
-
}, [
|
|
155
|
-
if (
|
|
162
|
+
}, [C, T]), r(() => {
|
|
163
|
+
if (w) return w([{
|
|
156
164
|
id: "admin-status",
|
|
157
165
|
label: "Admin Console Ready",
|
|
158
166
|
type: "status",
|
|
159
167
|
order: 10,
|
|
160
168
|
section: "left"
|
|
161
169
|
}]);
|
|
162
|
-
}, [
|
|
170
|
+
}, [w]), /* @__PURE__ */ b(x, {
|
|
163
171
|
workspaceId: null,
|
|
164
172
|
gateway: "global",
|
|
165
173
|
defaultEnabled: !0,
|
|
166
|
-
children: /* @__PURE__ */
|
|
167
|
-
...
|
|
168
|
-
children: /* @__PURE__ */
|
|
174
|
+
children: /* @__PURE__ */ b(e, {
|
|
175
|
+
...S,
|
|
176
|
+
children: /* @__PURE__ */ b(n, {})
|
|
169
177
|
})
|
|
170
178
|
});
|
|
171
179
|
};
|
|
172
180
|
//#endregion
|
|
173
|
-
export {
|
|
181
|
+
export { S as AdminRoot };
|
|
174
182
|
|
|
175
183
|
//# sourceMappingURL=AdminRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminRoot.js","names":[],"sources":["../../src/admin/AdminRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport {\n LayoutDashboard,\n Building2,\n Users,\n CreditCard,\n Settings,\n Server,\n Mail,\n FileText,\n Box,\n Building,\n Layout,\n ToggleLeft,\n ShieldCheck,\n GitBranch,\n Link2,\n} from 'lucide-react';\nimport { AdminProvider } from './providers/AdminProvider';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport type { NavItem, AdminRootProps } from './types';\nimport { AdminRoutes } from './AdminRoutes';\nimport { joinPath } from './utils/navigation';\n\n/**\n * Root component for the Admin microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { AdminRoot, type AdminRootProps } from '@burdenoff/microfe-admin';\n *\n * function App() {\n * const props: AdminRootProps = {\n * basePath: '/admin',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'admin@example.com', role: 'PLATFORM_SUPERADMIN' },\n * tenantId: 'tenant-123',\n * apiGatewayUrl: 'https://api.example.com',\n * authToken: 'token',\n * registerNavItems: (items) => { return () => {}; },\n * };\n *\n * return <AdminRoot {...props} />;\n * }\n * ```\n */\nexport const AdminRoot: FC<AdminRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '' } = props;\n\n // Register navigation items with the shell\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'admin-dashboard',\n label: 'Dashboard',\n path: joinPath(basePath, 'dashboard'),\n icon: <LayoutDashboard size={20} />,\n order: 10,\n group: 'admin',\n },\n {\n id: 'admin-tenants',\n label: 'Tenants',\n path: joinPath(basePath, 'tenants'),\n icon: <Building2 size={20} />,\n order: 20,\n group: 'admin',\n },\n {\n id: 'admin-organizations',\n label: 'Organizations',\n path: joinPath(basePath, 'organizations'),\n icon: <Building size={20} />,\n order: 25,\n group: 'admin',\n },\n {\n id: 'admin-workspaces',\n label: 'Workspaces',\n path: joinPath(basePath, 'workspaces'),\n icon: <Layout size={20} />,\n order: 26,\n group: 'admin',\n },\n {\n id: 'admin-users',\n label: 'Users',\n path: joinPath(basePath, 'users'),\n icon: <Users size={20} />,\n order: 30,\n group: 'admin',\n },\n {\n id: 'admin-roles',\n label: 'Roles & Permissions',\n path: joinPath(basePath, 'roles'),\n icon: <ShieldCheck size={20} />,\n order: 35,\n group: 'admin',\n },\n {\n id: 'admin-billing',\n label: 'Billing',\n path: joinPath(basePath, 'billing'),\n icon: <CreditCard size={20} />,\n order: 40,\n group: 'admin',\n children: [\n {\n id: 'admin-billing-subscriptions',\n label: 'Subscriptions',\n path: joinPath(basePath, 'billing/subscriptions'),\n order: 1,\n },\n {\n id: 'admin-billing-invoices',\n label: 'Invoices',\n path: joinPath(basePath, 'billing/invoices'),\n order: 2,\n },\n {\n id: 'admin-billing-plans',\n label: 'Plans',\n path: joinPath(basePath, 'billing/plans'),\n order: 3,\n },\n ],\n },\n {\n id: 'admin-communications',\n label: 'Communications',\n path: joinPath(basePath, 'communications'),\n icon: <Mail size={20} />,\n order: 50,\n group: 'admin',\n },\n {\n id: 'admin-feature-flags',\n label: 'Feature Flags',\n path: joinPath(basePath, 'feature-flags'),\n icon: <ToggleLeft size={20} />,\n order: 60,\n group: 'admin',\n },\n {\n id: 'admin-workflows',\n label: 'Workflows',\n path: joinPath(basePath, 'workflows'),\n icon: <GitBranch size={20} />,\n order: 70,\n group: 'admin',\n },\n {\n id: 'admin-sre',\n label: 'SRE',\n path: joinPath(basePath, 'sre'),\n icon: <Server size={20} />,\n order: 80,\n group: 'admin',\n },\n {\n id: 'admin-audit',\n label: 'Audit Logs',\n path: joinPath(basePath, 'audit'),\n icon: <FileText size={20} />,\n order: 85,\n group: 'admin',\n },\n {\n id: 'admin-referrals',\n label: 'Referrals',\n path: joinPath(basePath, 'referrals'),\n icon: <Link2 size={20} />,\n order: 86,\n group: 'admin',\n },\n {\n id: 'admin-sandbox',\n label: 'Sandbox',\n path: joinPath(basePath, 'sandbox'),\n icon: <Box size={20} />,\n order: 87,\n group: 'admin',\n },\n {\n id: 'admin-settings',\n label: 'Settings',\n path: joinPath(basePath, 'settings'),\n icon: <Settings size={20} />,\n order: 90,\n group: 'admin',\n },\n ];\n\n // Register and get cleanup function\n const cleanup = registerNavItems(navItems);\n\n // Return cleanup function to unregister on unmount\n return cleanup;\n }, [registerNavItems, basePath]);\n\n // Register footer items\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'admin-status',\n label: 'Admin Console Ready',\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems]);\n\n return (\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <AdminProvider {...props}>\n <AdminRoutes />\n </AdminProvider>\n </FeatureFlagProvider>\n );\n};\n"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"AdminRoot.js","names":[],"sources":["../../src/admin/AdminRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport {\n LayoutDashboard,\n Building2,\n Users,\n CreditCard,\n Settings,\n Server,\n Mail,\n FileText,\n Box,\n Building,\n Layout,\n ToggleLeft,\n ShieldCheck,\n GitBranch,\n Link2,\n AlertOctagon,\n} from 'lucide-react';\nimport { AdminProvider } from './providers/AdminProvider';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport type { NavItem, AdminRootProps } from './types';\nimport { AdminRoutes } from './AdminRoutes';\nimport { joinPath } from './utils/navigation';\n\n/**\n * Root component for the Admin microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { AdminRoot, type AdminRootProps } from '@burdenoff/microfe-admin';\n *\n * function App() {\n * const props: AdminRootProps = {\n * basePath: '/admin',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'admin@example.com', role: 'PLATFORM_SUPERADMIN' },\n * tenantId: 'tenant-123',\n * apiGatewayUrl: 'https://api.example.com',\n * authToken: 'token',\n * registerNavItems: (items) => { return () => {}; },\n * };\n *\n * return <AdminRoot {...props} />;\n * }\n * ```\n */\nexport const AdminRoot: FC<AdminRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '' } = props;\n\n // Register navigation items with the shell\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'admin-dashboard',\n label: 'Dashboard',\n path: joinPath(basePath, 'dashboard'),\n icon: <LayoutDashboard size={20} />,\n order: 10,\n group: 'admin',\n },\n {\n id: 'admin-tenants',\n label: 'Tenants',\n path: joinPath(basePath, 'tenants'),\n icon: <Building2 size={20} />,\n order: 20,\n group: 'admin',\n },\n {\n id: 'admin-organizations',\n label: 'Organizations',\n path: joinPath(basePath, 'organizations'),\n icon: <Building size={20} />,\n order: 25,\n group: 'admin',\n },\n {\n id: 'admin-workspaces',\n label: 'Workspaces',\n path: joinPath(basePath, 'workspaces'),\n icon: <Layout size={20} />,\n order: 26,\n group: 'admin',\n },\n {\n id: 'admin-users',\n label: 'Users',\n path: joinPath(basePath, 'users'),\n icon: <Users size={20} />,\n order: 30,\n group: 'admin',\n },\n {\n id: 'admin-roles',\n label: 'Roles & Permissions',\n path: joinPath(basePath, 'roles'),\n icon: <ShieldCheck size={20} />,\n order: 35,\n group: 'admin',\n },\n {\n id: 'admin-billing',\n label: 'Billing',\n path: joinPath(basePath, 'billing'),\n icon: <CreditCard size={20} />,\n order: 40,\n group: 'admin',\n children: [\n {\n id: 'admin-billing-subscriptions',\n label: 'Subscriptions',\n path: joinPath(basePath, 'billing/subscriptions'),\n order: 1,\n },\n {\n id: 'admin-billing-invoices',\n label: 'Invoices',\n path: joinPath(basePath, 'billing/invoices'),\n order: 2,\n },\n {\n id: 'admin-billing-plans',\n label: 'Plans',\n path: joinPath(basePath, 'billing/plans'),\n order: 3,\n },\n ],\n },\n {\n id: 'admin-communications',\n label: 'Communications',\n path: joinPath(basePath, 'communications'),\n icon: <Mail size={20} />,\n order: 50,\n group: 'admin',\n },\n {\n id: 'admin-feature-flags',\n label: 'Feature Flags',\n path: joinPath(basePath, 'feature-flags'),\n icon: <ToggleLeft size={20} />,\n order: 60,\n group: 'admin',\n },\n {\n id: 'admin-workflows',\n label: 'Workflows',\n path: joinPath(basePath, 'workflows'),\n icon: <GitBranch size={20} />,\n order: 70,\n group: 'admin',\n },\n {\n id: 'admin-sre',\n label: 'SRE',\n path: joinPath(basePath, 'sre'),\n icon: <Server size={20} />,\n order: 80,\n group: 'admin',\n },\n {\n id: 'admin-sync-failures',\n label: 'Sync Failures',\n path: joinPath(basePath, 'sync-failures'),\n icon: <AlertOctagon size={20} />,\n order: 82,\n group: 'admin',\n },\n {\n id: 'admin-audit',\n label: 'Audit Logs',\n path: joinPath(basePath, 'audit'),\n icon: <FileText size={20} />,\n order: 85,\n group: 'admin',\n },\n {\n id: 'admin-referrals',\n label: 'Referrals',\n path: joinPath(basePath, 'referrals'),\n icon: <Link2 size={20} />,\n order: 86,\n group: 'admin',\n },\n {\n id: 'admin-sandbox',\n label: 'Sandbox',\n path: joinPath(basePath, 'sandbox'),\n icon: <Box size={20} />,\n order: 87,\n group: 'admin',\n },\n {\n id: 'admin-settings',\n label: 'Settings',\n path: joinPath(basePath, 'settings'),\n icon: <Settings size={20} />,\n order: 90,\n group: 'admin',\n },\n ];\n\n // Register and get cleanup function\n const cleanup = registerNavItems(navItems);\n\n // Return cleanup function to unregister on unmount\n return cleanup;\n }, [registerNavItems, basePath]);\n\n // Register footer items\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'admin-status',\n label: 'Admin Console Ready',\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems]);\n\n return (\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <AdminProvider {...props}>\n <AdminRoutes />\n </AdminProvider>\n </FeatureFlagProvider>\n );\n};\n"],"mappings":";;;;;;;;AAoDA,IAAa,KAAiC,MAAU;CACtD,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,OAAO;AAsLjE,QAnLA,QAAgB;AACT,QA6JL,QAHgB,EAxJY;GAC1B;IACE,IAAI;IACJ,OAAO;IACP,MAAM,EAAS,GAAU,YAAY;IACrC,MAAM,kBAAC,GAAD,EAAiB,MAAM,IAAM,CAAA;IACnC,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO;IACP,MAAM,EAAS,GAAU,UAAU;IACnC,MAAM,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;IAC7B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO;IACP,MAAM,EAAS,GAAU,gBAAgB;IACzC,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;IAC5B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO;IACP,MAAM,EAAS,GAAU,aAAa;IACtC,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;IAC1B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO;IACP,MAAM,EAAS,GAAU,QAAQ;IACjC,MAAM,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;IACzB,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO;IACP,MAAM,EAAS,GAAU,QAAQ;IACjC,MAAM,kBAAC,GAAD,EAAa,MAAM,IAAM,CAAA;IAC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IAAI;IACJ,OAAO;IACP,MAAM,EAAS,GAAU,YAAY;IACrC,MAAM,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;IACzB,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO;IACP,MAAM,EAAS,GAAU,UAAU;IACnC,MAAM,kBAAC,GAAD,EAAK,MAAM,IAAM,CAAA;IACvB,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO;IACP,MAAM,EAAS,GAAU,WAAW;IACpC,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;IAC5B,OAAO;IACP,OAAO;IACR;GACF,CAGyC;IAIzC,CAAC,GAAkB,EAAS,CAAC,EAGhC,QAAgB;AACT,QAaL,QADgB,EAVI,CAClB;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAE+C;IAE/C,CAAC,EAAoB,CAAC,EAGvB,kBAAC,GAAD;EAAqB,aAAa;EAAM,SAAQ;EAAS,gBAAgB;YACvE,kBAAC,GAAD;GAAe,GAAI;aACjB,kBAAC,GAAD,EAAe,CAAA;GACD,CAAA;EACI,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminRoutes.d.ts","sourceRoot":"","sources":["../../src/admin/AdminRoutes.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AdminRoutes.d.ts","sourceRoot":"","sources":["../../src/admin/AdminRoutes.tsx"],"names":[],"mappings":"AAuEA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,WAAW,4CA+E1B"}
|
|
@@ -5,22 +5,22 @@ import { Suspense as n, lazy as r } from "react";
|
|
|
5
5
|
import { Navigate as i, Route as a, Routes as o } from "react-router-dom";
|
|
6
6
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
7
|
//#region src/admin/AdminRoutes.tsx
|
|
8
|
-
var l = r(() => import("./pages/TenantsListPage.js").then((e) => ({ default: e.TenantsListPage }))), u = r(() => import("./pages/TenantDetailPage.js").then((e) => ({ default: e.TenantDetailPage }))), d = r(() => import("./pages/TenantFormRoutePage.js").then((e) => ({ default: e.TenantFormRoutePage }))), f = r(() => import("./pages/UsersListPage.js").then((e) => ({ default: e.UsersListPage }))), p = r(() => import("./pages/BillingPage.js").then((e) => ({ default: e.BillingPage }))), m = r(() => import("./pages/SettingsPage.js").then((e) => ({ default: e.SettingsPage }))), h = r(() => import("./pages/CommunicationsPage.js").then((e) => ({ default: e.CommunicationsPage }))), g = r(() => import("./pages/SREPage.js").then((e) => ({ default: e.SREPage }))), _ = r(() => import("./pages/AuditLogsPage.js").then((e) => ({ default: e.AuditLogsPage }))),
|
|
9
|
-
function
|
|
8
|
+
var l = r(() => import("./pages/TenantsListPage.js").then((e) => ({ default: e.TenantsListPage }))), u = r(() => import("./pages/TenantDetailPage.js").then((e) => ({ default: e.TenantDetailPage }))), d = r(() => import("./pages/TenantFormRoutePage.js").then((e) => ({ default: e.TenantFormRoutePage }))), f = r(() => import("./pages/UsersListPage.js").then((e) => ({ default: e.UsersListPage }))), p = r(() => import("./pages/BillingPage.js").then((e) => ({ default: e.BillingPage }))), m = r(() => import("./pages/SettingsPage.js").then((e) => ({ default: e.SettingsPage }))), h = r(() => import("./pages/CommunicationsPage.js").then((e) => ({ default: e.CommunicationsPage }))), g = r(() => import("./pages/SREPage.js").then((e) => ({ default: e.SREPage }))), _ = r(() => import("./pages/SyncFailuresPage.js").then((e) => ({ default: e.SyncFailuresPage }))), v = r(() => import("./pages/AuditLogsPage.js").then((e) => ({ default: e.AuditLogsPage }))), y = r(() => import("./pages/SandboxSettingsPage.js").then((e) => ({ default: e.SandboxSettingsPage }))), b = r(() => import("./pages/OrganizationsListPage.js").then((e) => ({ default: e.OrganizationsListPage }))), x = r(() => import("./pages/WorkspacesListPage.js").then((e) => ({ default: e.WorkspacesListPage }))), S = r(() => import("./pages/FeatureFlagsPage.js").then((e) => ({ default: e.FeatureFlagsPage }))), C = r(() => import("./pages/RolesPermissionsPage.js").then((e) => ({ default: e.RolesPermissionsPage }))), w = r(() => import("./pages/WorkflowsPage.js").then((e) => ({ default: e.WorkflowsPage }))), T = r(() => import("./pages/ProductsPage.js").then((e) => ({ default: e.ProductsPage }))), E = r(() => import("./pages/WaitlistPage.js").then((e) => ({ default: e.WaitlistPage }))), D = r(() => import("./pages/ReferralsPage.js").then((e) => ({ default: e.ReferralsPage })));
|
|
9
|
+
function O() {
|
|
10
10
|
return /* @__PURE__ */ s("div", {
|
|
11
11
|
className: "flex h-64 items-center justify-center",
|
|
12
12
|
children: /* @__PURE__ */ s("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
let { basePath: r } = e(),
|
|
15
|
+
function k() {
|
|
16
|
+
let { basePath: r } = e(), k = r || "/admin";
|
|
17
17
|
return /* @__PURE__ */ s(n, {
|
|
18
|
-
fallback: /* @__PURE__ */ s(
|
|
18
|
+
fallback: /* @__PURE__ */ s(O, {}),
|
|
19
19
|
children: /* @__PURE__ */ c(o, { children: [
|
|
20
20
|
/* @__PURE__ */ s(a, {
|
|
21
21
|
index: !0,
|
|
22
22
|
element: /* @__PURE__ */ s(i, {
|
|
23
|
-
to: `${
|
|
23
|
+
to: `${k}/dashboard`,
|
|
24
24
|
replace: !0
|
|
25
25
|
})
|
|
26
26
|
}),
|
|
@@ -46,11 +46,11 @@ function O() {
|
|
|
46
46
|
}),
|
|
47
47
|
/* @__PURE__ */ s(a, {
|
|
48
48
|
path: "organizations",
|
|
49
|
-
element: /* @__PURE__ */ s(
|
|
49
|
+
element: /* @__PURE__ */ s(b, {})
|
|
50
50
|
}),
|
|
51
51
|
/* @__PURE__ */ s(a, {
|
|
52
52
|
path: "workspaces",
|
|
53
|
-
element: /* @__PURE__ */ s(
|
|
53
|
+
element: /* @__PURE__ */ s(x, {})
|
|
54
54
|
}),
|
|
55
55
|
/* @__PURE__ */ s(a, {
|
|
56
56
|
path: "users",
|
|
@@ -62,15 +62,15 @@ function O() {
|
|
|
62
62
|
}),
|
|
63
63
|
/* @__PURE__ */ s(a, {
|
|
64
64
|
path: "roles",
|
|
65
|
-
element: /* @__PURE__ */ s(
|
|
65
|
+
element: /* @__PURE__ */ s(C, {})
|
|
66
66
|
}),
|
|
67
67
|
/* @__PURE__ */ s(a, {
|
|
68
68
|
path: "feature-flags",
|
|
69
|
-
element: /* @__PURE__ */ s(
|
|
69
|
+
element: /* @__PURE__ */ s(S, {})
|
|
70
70
|
}),
|
|
71
71
|
/* @__PURE__ */ s(a, {
|
|
72
72
|
path: "workflows",
|
|
73
|
-
element: /* @__PURE__ */ s(
|
|
73
|
+
element: /* @__PURE__ */ s(w, {})
|
|
74
74
|
}),
|
|
75
75
|
/* @__PURE__ */ s(a, {
|
|
76
76
|
path: "billing",
|
|
@@ -104,24 +104,28 @@ function O() {
|
|
|
104
104
|
element: /* @__PURE__ */ s(g, {})
|
|
105
105
|
}),
|
|
106
106
|
/* @__PURE__ */ s(a, {
|
|
107
|
-
path: "
|
|
107
|
+
path: "sync-failures",
|
|
108
108
|
element: /* @__PURE__ */ s(_, {})
|
|
109
109
|
}),
|
|
110
|
+
/* @__PURE__ */ s(a, {
|
|
111
|
+
path: "audit",
|
|
112
|
+
element: /* @__PURE__ */ s(v, {})
|
|
113
|
+
}),
|
|
110
114
|
/* @__PURE__ */ s(a, {
|
|
111
115
|
path: "referrals",
|
|
112
|
-
element: /* @__PURE__ */ s(
|
|
116
|
+
element: /* @__PURE__ */ s(D, {})
|
|
113
117
|
}),
|
|
114
118
|
/* @__PURE__ */ s(a, {
|
|
115
119
|
path: "sandbox",
|
|
116
|
-
element: /* @__PURE__ */ s(
|
|
120
|
+
element: /* @__PURE__ */ s(y, {})
|
|
117
121
|
}),
|
|
118
122
|
/* @__PURE__ */ s(a, {
|
|
119
123
|
path: "products",
|
|
120
|
-
element: /* @__PURE__ */ s(
|
|
124
|
+
element: /* @__PURE__ */ s(T, {})
|
|
121
125
|
}),
|
|
122
126
|
/* @__PURE__ */ s(a, {
|
|
123
127
|
path: "waitlist",
|
|
124
|
-
element: /* @__PURE__ */ s(
|
|
128
|
+
element: /* @__PURE__ */ s(E, {})
|
|
125
129
|
}),
|
|
126
130
|
/* @__PURE__ */ s(a, {
|
|
127
131
|
path: "settings",
|
|
@@ -130,7 +134,7 @@ function O() {
|
|
|
130
134
|
/* @__PURE__ */ s(a, {
|
|
131
135
|
path: "*",
|
|
132
136
|
element: /* @__PURE__ */ s(i, {
|
|
133
|
-
to: `${
|
|
137
|
+
to: `${k}/dashboard`,
|
|
134
138
|
replace: !0
|
|
135
139
|
})
|
|
136
140
|
})
|
|
@@ -138,6 +142,6 @@ function O() {
|
|
|
138
142
|
});
|
|
139
143
|
}
|
|
140
144
|
//#endregion
|
|
141
|
-
export {
|
|
145
|
+
export { k as AdminRoutes };
|
|
142
146
|
|
|
143
147
|
//# sourceMappingURL=AdminRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminRoutes.js","names":[],"sources":["../../src/admin/AdminRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Navigate, Route, Routes } from 'react-router-dom';\nimport { DashboardPage } from './pages';\nimport { useAdmin } from './providers/AdminProvider';\n\n// Lazy loaded pages\nconst TenantsListPage = lazy(() =>\n import('./pages/TenantsListPage').then((m) => ({ default: m.TenantsListPage }))\n);\nconst TenantDetailPage = lazy(() =>\n import('./pages/TenantDetailPage').then((m) => ({ default: m.TenantDetailPage }))\n);\nconst TenantFormRoutePage = lazy(() =>\n import('./pages/TenantFormRoutePage').then((m) => ({ default: m.TenantFormRoutePage }))\n);\nconst UsersListPage = lazy(() =>\n import('./pages/UsersListPage').then((m) => ({ default: m.UsersListPage }))\n);\nconst BillingPage = lazy(() =>\n import('./pages/BillingPage').then((m) => ({ default: m.BillingPage }))\n);\nconst SettingsPage = lazy(() =>\n import('./pages/SettingsPage').then((m) => ({ default: m.SettingsPage }))\n);\nconst CommunicationsPage = lazy(() =>\n import('./pages/CommunicationsPage').then((m) => ({ default: m.CommunicationsPage }))\n);\nconst SREPage = lazy(() => import('./pages/SREPage').then((m) => ({ default: m.SREPage })));\nconst AuditLogsPage = lazy(() =>\n import('./pages/AuditLogsPage').then((m) => ({ default: m.AuditLogsPage }))\n);\nconst SandboxSettingsPage = lazy(() =>\n import('./pages/SandboxSettingsPage').then((m) => ({ default: m.SandboxSettingsPage }))\n);\nconst OrganizationsListPage = lazy(() =>\n import('./pages/OrganizationsListPage').then((m) => ({ default: m.OrganizationsListPage }))\n);\nconst WorkspacesListPage = lazy(() =>\n import('./pages/WorkspacesListPage').then((m) => ({ default: m.WorkspacesListPage }))\n);\nconst FeatureFlagsPage = lazy(() =>\n import('./pages/FeatureFlagsPage').then((m) => ({ default: m.FeatureFlagsPage }))\n);\nconst RolesPermissionsPage = lazy(() =>\n import('./pages/RolesPermissionsPage').then((m) => ({ default: m.RolesPermissionsPage }))\n);\nconst WorkflowsPage = lazy(() =>\n import('./pages/WorkflowsPage').then((m) => ({ default: m.WorkflowsPage }))\n);\nconst ProductsPage = lazy(() =>\n import('./pages/ProductsPage').then((m) => ({ default: m.ProductsPage }))\n);\nconst WaitlistPage = lazy(() =>\n import('./pages/WaitlistPage').then((m) => ({ default: m.WaitlistPage }))\n);\nconst ReferralsPage = lazy(() =>\n import('./pages/ReferralsPage').then((m) => ({ default: m.ReferralsPage }))\n);\n\n// Loading fallback component\nfunction PageLoader() {\n return (\n <div className=\"flex h-64 items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent\" />\n </div>\n );\n}\n\n/**\n * Internal router for the Admin microfrontend.\n * This component handles routing within the microfrontend using React Router v7.\n *\n * Routes:\n * - / → Dashboard (redirect)\n * - /dashboard → Dashboard\n * - /tenants → Tenants list\n * - /tenants/new → Create new tenant\n * - /tenants/:tenantId → Tenant detail\n * - /tenants/:tenantId/edit → Edit tenant\n * - /users → Users list\n * - /users/:userId → User detail\n * - /billing → Billing overview\n * - /billing/subscriptions → Subscriptions list\n * - /billing/invoices → Invoices list\n * - /billing/plans → Plans management\n * - /support → Support overview\n * - /support/tickets → Tickets list\n * - /support/tickets/:ticketId → Ticket detail\n * - /products → Products management\n * - /communications → Communications center\n * - /sre → SRE Monitoring\n * - /audit → Audit logs\n * - /sandbox → Sandbox settings\n * - /settings → Settings\n */\nexport function AdminRoutes() {\n const { basePath } = useAdmin();\n const base = basePath || '/admin';\n\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Default redirect to dashboard */}\n <Route index element={<Navigate to={`${base}/dashboard`} replace />} />\n\n {/* Dashboard - eager loaded for fast initial render */}\n <Route path=\"dashboard\" element={<DashboardPage />} />\n\n {/* Tenants */}\n <Route path=\"tenants\" element={<TenantsListPage />} />\n <Route path=\"tenants/new\" element={<TenantFormRoutePage mode=\"create\" />} />\n <Route path=\"tenants/:tenantId\" element={<TenantDetailPage />} />\n <Route path=\"tenants/:tenantId/edit\" element={<TenantFormRoutePage mode=\"edit\" />} />\n\n {/* Organizations */}\n <Route path=\"organizations\" element={<OrganizationsListPage />} />\n\n {/* Workspaces */}\n <Route path=\"workspaces\" element={<WorkspacesListPage />} />\n\n {/* Users */}\n <Route path=\"users\" element={<UsersListPage />} />\n <Route path=\"users/:userId\" element={<UsersListPage />} />\n\n {/* Roles & Permissions */}\n <Route path=\"roles\" element={<RolesPermissionsPage />} />\n\n {/* Feature Flags */}\n <Route path=\"feature-flags\" element={<FeatureFlagsPage />} />\n\n {/* Workflows */}\n <Route path=\"workflows\" element={<WorkflowsPage />} />\n\n {/* Billing */}\n <Route path=\"billing\" element={<BillingPage />} />\n <Route path=\"billing/subscriptions\" element={<BillingPage />} />\n <Route path=\"billing/invoices\" element={<BillingPage />} />\n <Route path=\"billing/plans\" element={<BillingPage />} />\n\n {/* Support — redirects to shell-level /support/* route (microfe-support MFE) */}\n <Route path=\"support/*\" element={<Navigate to=\"/support\" replace />} />\n\n {/* Communications */}\n <Route path=\"communications\" element={<CommunicationsPage />} />\n\n {/* SRE Monitoring */}\n <Route path=\"sre\" element={<SREPage />} />\n\n {/* Audit Logs */}\n <Route path=\"audit\" element={<AuditLogsPage />} />\n\n {/* Referrals */}\n <Route path=\"referrals\" element={<ReferralsPage />} />\n\n {/* Sandbox */}\n <Route path=\"sandbox\" element={<SandboxSettingsPage />} />\n\n {/* Products */}\n <Route path=\"products\" element={<ProductsPage />} />\n\n {/* Waitlist */}\n <Route path=\"waitlist\" element={<WaitlistPage />} />\n\n {/* Settings */}\n <Route path=\"settings\" element={<SettingsPage />} />\n\n {/* Catch-all route - redirect to dashboard (absolute path to prevent infinite loops) */}\n <Route path=\"*\" element={<Navigate to={`${base}/dashboard`} replace />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;AAMA,IAAM,IAAkB,QACtB,OAAO,8BAA2B,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAChF,EACK,IAAmB,QACvB,OAAO,+BAA4B,MAAM,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAClF,EACK,IAAsB,QAC1B,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,CACxF,EACK,IAAgB,QACpB,OAAO,4BAAyB,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAC5E,EACK,IAAc,QAClB,OAAO,0BAAuB,MAAM,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CACxE,EACK,IAAe,QACnB,OAAO,2BAAwB,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAC1E,EACK,IAAqB,QACzB,OAAO,iCAA8B,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CACtF,EACK,IAAU,QAAW,OAAO,sBAAmB,MAAM,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EACrF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,EAAe,CAAA;IAAI,CAAA;GAC3D,kBAAC,GAAD;IAAO,MAAK;IAAgB,SAAS,kBAAC,GAAD,EAAe,CAAA;IAAI,CAAA;GAGxD,kBAAC,GAAD;IAAO,MAAK;IAAY,SAAS,kBAAC,GAAD;KAAU,IAAG;KAAW,SAAA;KAAU,CAAA;IAAI,CAAA;GAGvE,kBAAC,GAAD;IAAO,MAAK;IAAiB,SAAS,kBAAC,GAAD,EAAsB,CAAA;IAAI,CAAA;GAGhE,kBAAC,GAAD;IAAO,MAAK;IAAM,SAAS,kBAAC,GAAD,EAAW,CAAA;IAAI,CAAA;GAG1C,kBAAC,GAAD;IAAO,MAAK;IAAQ,SAAS,kBAAC,GAAD,EAAiB,CAAA;IAAI,CAAA;GAGlD,kBAAC,GAAD;IAAO,MAAK;IAAY,SAAS,kBAAC,GAAD,EAAiB,CAAA;IAAI,CAAA;GAGtD,kBAAC,GAAD;IAAO,MAAK;IAAU,SAAS,kBAAC,GAAD,EAAuB,CAAA;IAAI,CAAA;GAG1D,kBAAC,GAAD;IAAO,MAAK;IAAW,SAAS,kBAAC,GAAD,EAAgB,CAAA;IAAI,CAAA;GAGpD,kBAAC,GAAD;IAAO,MAAK;IAAW,SAAS,kBAAC,GAAD,EAAgB,CAAA;IAAI,CAAA;GAGpD,kBAAC,GAAD;IAAO,MAAK;IAAW,SAAS,kBAAC,GAAD,EAAgB,CAAA;IAAI,CAAA;GAGpD,kBAAC,GAAD;IAAO,MAAK;IAAI,SAAS,kBAAC,GAAD;KAAU,IAAI,GAAG,EAAK;KAAa,SAAA;KAAU,CAAA;IAAI,CAAA;GACnE,EAAA,CAAA;EACA,CAAA"}
|
|
1
|
+
{"version":3,"file":"AdminRoutes.js","names":[],"sources":["../../src/admin/AdminRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Navigate, Route, Routes } from 'react-router-dom';\nimport { DashboardPage } from './pages';\nimport { useAdmin } from './providers/AdminProvider';\n\n// Lazy loaded pages\nconst TenantsListPage = lazy(() =>\n import('./pages/TenantsListPage').then((m) => ({ default: m.TenantsListPage }))\n);\nconst TenantDetailPage = lazy(() =>\n import('./pages/TenantDetailPage').then((m) => ({ default: m.TenantDetailPage }))\n);\nconst TenantFormRoutePage = lazy(() =>\n import('./pages/TenantFormRoutePage').then((m) => ({ default: m.TenantFormRoutePage }))\n);\nconst UsersListPage = lazy(() =>\n import('./pages/UsersListPage').then((m) => ({ default: m.UsersListPage }))\n);\nconst BillingPage = lazy(() =>\n import('./pages/BillingPage').then((m) => ({ default: m.BillingPage }))\n);\nconst SettingsPage = lazy(() =>\n import('./pages/SettingsPage').then((m) => ({ default: m.SettingsPage }))\n);\nconst CommunicationsPage = lazy(() =>\n import('./pages/CommunicationsPage').then((m) => ({ default: m.CommunicationsPage }))\n);\nconst SREPage = lazy(() => import('./pages/SREPage').then((m) => ({ default: m.SREPage })));\nconst SyncFailuresPage = lazy(() =>\n import('./pages/SyncFailuresPage').then((m) => ({ default: m.SyncFailuresPage }))\n);\nconst AuditLogsPage = lazy(() =>\n import('./pages/AuditLogsPage').then((m) => ({ default: m.AuditLogsPage }))\n);\nconst SandboxSettingsPage = lazy(() =>\n import('./pages/SandboxSettingsPage').then((m) => ({ default: m.SandboxSettingsPage }))\n);\nconst OrganizationsListPage = lazy(() =>\n import('./pages/OrganizationsListPage').then((m) => ({ default: m.OrganizationsListPage }))\n);\nconst WorkspacesListPage = lazy(() =>\n import('./pages/WorkspacesListPage').then((m) => ({ default: m.WorkspacesListPage }))\n);\nconst FeatureFlagsPage = lazy(() =>\n import('./pages/FeatureFlagsPage').then((m) => ({ default: m.FeatureFlagsPage }))\n);\nconst RolesPermissionsPage = lazy(() =>\n import('./pages/RolesPermissionsPage').then((m) => ({ default: m.RolesPermissionsPage }))\n);\nconst WorkflowsPage = lazy(() =>\n import('./pages/WorkflowsPage').then((m) => ({ default: m.WorkflowsPage }))\n);\nconst ProductsPage = lazy(() =>\n import('./pages/ProductsPage').then((m) => ({ default: m.ProductsPage }))\n);\nconst WaitlistPage = lazy(() =>\n import('./pages/WaitlistPage').then((m) => ({ default: m.WaitlistPage }))\n);\nconst ReferralsPage = lazy(() =>\n import('./pages/ReferralsPage').then((m) => ({ default: m.ReferralsPage }))\n);\n\n// Loading fallback component\nfunction PageLoader() {\n return (\n <div className=\"flex h-64 items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent\" />\n </div>\n );\n}\n\n/**\n * Internal router for the Admin microfrontend.\n * This component handles routing within the microfrontend using React Router v7.\n *\n * Routes:\n * - / → Dashboard (redirect)\n * - /dashboard → Dashboard\n * - /tenants → Tenants list\n * - /tenants/new → Create new tenant\n * - /tenants/:tenantId → Tenant detail\n * - /tenants/:tenantId/edit → Edit tenant\n * - /users → Users list\n * - /users/:userId → User detail\n * - /billing → Billing overview\n * - /billing/subscriptions → Subscriptions list\n * - /billing/invoices → Invoices list\n * - /billing/plans → Plans management\n * - /support → Support overview\n * - /support/tickets → Tickets list\n * - /support/tickets/:ticketId → Ticket detail\n * - /products → Products management\n * - /communications → Communications center\n * - /sre → SRE Monitoring\n * - /audit → Audit logs\n * - /sandbox → Sandbox settings\n * - /settings → Settings\n */\nexport function AdminRoutes() {\n const { basePath } = useAdmin();\n const base = basePath || '/admin';\n\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Default redirect to dashboard */}\n <Route index element={<Navigate to={`${base}/dashboard`} replace />} />\n\n {/* Dashboard - eager loaded for fast initial render */}\n <Route path=\"dashboard\" element={<DashboardPage />} />\n\n {/* Tenants */}\n <Route path=\"tenants\" element={<TenantsListPage />} />\n <Route path=\"tenants/new\" element={<TenantFormRoutePage mode=\"create\" />} />\n <Route path=\"tenants/:tenantId\" element={<TenantDetailPage />} />\n <Route path=\"tenants/:tenantId/edit\" element={<TenantFormRoutePage mode=\"edit\" />} />\n\n {/* Organizations */}\n <Route path=\"organizations\" element={<OrganizationsListPage />} />\n\n {/* Workspaces */}\n <Route path=\"workspaces\" element={<WorkspacesListPage />} />\n\n {/* Users */}\n <Route path=\"users\" element={<UsersListPage />} />\n <Route path=\"users/:userId\" element={<UsersListPage />} />\n\n {/* Roles & Permissions */}\n <Route path=\"roles\" element={<RolesPermissionsPage />} />\n\n {/* Feature Flags */}\n <Route path=\"feature-flags\" element={<FeatureFlagsPage />} />\n\n {/* Workflows */}\n <Route path=\"workflows\" element={<WorkflowsPage />} />\n\n {/* Billing */}\n <Route path=\"billing\" element={<BillingPage />} />\n <Route path=\"billing/subscriptions\" element={<BillingPage />} />\n <Route path=\"billing/invoices\" element={<BillingPage />} />\n <Route path=\"billing/plans\" element={<BillingPage />} />\n\n {/* Support — redirects to shell-level /support/* route (microfe-support MFE) */}\n <Route path=\"support/*\" element={<Navigate to=\"/support\" replace />} />\n\n {/* Communications */}\n <Route path=\"communications\" element={<CommunicationsPage />} />\n\n {/* SRE Monitoring */}\n <Route path=\"sre\" element={<SREPage />} />\n\n {/* Sync Failures (cross-layer sync outbox) */}\n <Route path=\"sync-failures\" element={<SyncFailuresPage />} />\n\n {/* Audit Logs */}\n <Route path=\"audit\" element={<AuditLogsPage />} />\n\n {/* Referrals */}\n <Route path=\"referrals\" element={<ReferralsPage />} />\n\n {/* Sandbox */}\n <Route path=\"sandbox\" element={<SandboxSettingsPage />} />\n\n {/* Products */}\n <Route path=\"products\" element={<ProductsPage />} />\n\n {/* Waitlist */}\n <Route path=\"waitlist\" element={<WaitlistPage />} />\n\n {/* Settings */}\n <Route path=\"settings\" element={<SettingsPage />} />\n\n {/* Catch-all route - redirect to dashboard (absolute path to prevent infinite loops) */}\n <Route path=\"*\" element={<Navigate to={`${base}/dashboard`} replace />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;AAMA,IAAM,IAAkB,QACtB,OAAO,8BAA2B,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAChF,EACK,IAAmB,QACvB,OAAO,+BAA4B,MAAM,OAAO,EAAE,SAAS,EA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GAGtD,kBAAC,GAAD;IAAO,MAAK;IAAU,SAAS,kBAAC,GAAD,EAAuB,CAAA;IAAI,CAAA;GAG1D,kBAAC,GAAD;IAAO,MAAK;IAAW,SAAS,kBAAC,GAAD,EAAgB,CAAA;IAAI,CAAA;GAGpD,kBAAC,GAAD;IAAO,MAAK;IAAW,SAAS,kBAAC,GAAD,EAAgB,CAAA;IAAI,CAAA;GAGpD,kBAAC,GAAD;IAAO,MAAK;IAAW,SAAS,kBAAC,GAAD,EAAgB,CAAA;IAAI,CAAA;GAGpD,kBAAC,GAAD;IAAO,MAAK;IAAI,SAAS,kBAAC,GAAD;KAAU,IAAI,GAAG,EAAK;KAAa,SAAA;KAAU,CAAA;IAAI,CAAA;GACnE,EAAA,CAAA;EACA,CAAA"}
|
|
@@ -1,4 +1,81 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "react
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { Button as t } from "./ui.js";
|
|
3
|
+
import { useEffect as n, useRef as r } from "react";
|
|
4
|
+
import { AlertTriangle as i, Loader2 as a } from "lucide-react";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
//#region src/admin/components/ConfirmDialog.tsx
|
|
7
|
+
function c({ open: c, onClose: l, onConfirm: u, title: d, description: f, confirmLabel: p = "Confirm", cancelLabel: m = "Cancel", variant: h = "default", loading: g = !1, icon: _ }) {
|
|
8
|
+
let v = r(null);
|
|
9
|
+
if (n(() => {
|
|
10
|
+
let e = (e) => {
|
|
11
|
+
e.key === "Escape" && c && !g && l();
|
|
12
|
+
};
|
|
13
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
14
|
+
}, [
|
|
15
|
+
c,
|
|
16
|
+
l,
|
|
17
|
+
g
|
|
18
|
+
]), n(() => {
|
|
19
|
+
if (c) {
|
|
20
|
+
let e = setTimeout(() => {
|
|
21
|
+
v.current?.focus();
|
|
22
|
+
}, 50);
|
|
23
|
+
return () => clearTimeout(e);
|
|
24
|
+
}
|
|
25
|
+
}, [c]), n(() => (c ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
26
|
+
document.body.style.overflow = "";
|
|
27
|
+
}), [c]), !c) return null;
|
|
28
|
+
let y = async () => {
|
|
29
|
+
await u();
|
|
30
|
+
}, b = h === "destructive", x = b ? /* @__PURE__ */ o(i, { className: "h-6 w-6 text-destructive" }) : null;
|
|
31
|
+
return /* @__PURE__ */ s("div", {
|
|
32
|
+
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
33
|
+
children: [/* @__PURE__ */ o("div", {
|
|
34
|
+
className: "fixed inset-0 bg-black/50 transition-opacity",
|
|
35
|
+
onClick: g ? void 0 : l,
|
|
36
|
+
"aria-hidden": "true"
|
|
37
|
+
}), /* @__PURE__ */ s("div", {
|
|
38
|
+
className: e("relative z-10 w-full max-w-md rounded-lg bg-background p-6 shadow-xl", "animate-in zoom-in-95 fade-in duration-200"),
|
|
39
|
+
role: "alertdialog",
|
|
40
|
+
"aria-modal": "true",
|
|
41
|
+
"aria-labelledby": "confirm-dialog-title",
|
|
42
|
+
"aria-describedby": "confirm-dialog-description",
|
|
43
|
+
children: [/* @__PURE__ */ s("div", {
|
|
44
|
+
className: "flex gap-4",
|
|
45
|
+
children: [(_ || x) && /* @__PURE__ */ o("div", {
|
|
46
|
+
className: e("flex h-12 w-12 shrink-0 items-center justify-center rounded-full", b ? "bg-destructive/10" : "bg-primary/10"),
|
|
47
|
+
children: _ || x
|
|
48
|
+
}), /* @__PURE__ */ s("div", {
|
|
49
|
+
className: "flex-1",
|
|
50
|
+
children: [/* @__PURE__ */ o("h3", {
|
|
51
|
+
id: "confirm-dialog-title",
|
|
52
|
+
className: "text-lg font-semibold text-foreground",
|
|
53
|
+
children: d
|
|
54
|
+
}), /* @__PURE__ */ o("div", {
|
|
55
|
+
id: "confirm-dialog-description",
|
|
56
|
+
className: "mt-2 text-sm text-muted-foreground",
|
|
57
|
+
children: f
|
|
58
|
+
})]
|
|
59
|
+
})]
|
|
60
|
+
}), /* @__PURE__ */ s("div", {
|
|
61
|
+
className: "mt-6 flex justify-end gap-3",
|
|
62
|
+
children: [/* @__PURE__ */ o(t, {
|
|
63
|
+
variant: "outline",
|
|
64
|
+
onClick: l,
|
|
65
|
+
disabled: g,
|
|
66
|
+
children: m
|
|
67
|
+
}), /* @__PURE__ */ s(t, {
|
|
68
|
+
ref: v,
|
|
69
|
+
variant: b ? "destructive" : "default",
|
|
70
|
+
onClick: y,
|
|
71
|
+
disabled: g,
|
|
72
|
+
children: [g && /* @__PURE__ */ o(a, { className: "mr-2 h-4 w-4 animate-spin" }), p]
|
|
73
|
+
})]
|
|
74
|
+
})]
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
export { c as ConfirmDialog };
|
|
80
|
+
|
|
81
|
+
//# sourceMappingURL=ConfirmDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.js","names":[],"sources":["../../../src/admin/components/ConfirmDialog.tsx"],"sourcesContent":["import { useEffect, useRef, type ReactNode } from 'react';\nimport { AlertTriangle, Loader2 } from 'lucide-react';\nimport { Button } from './ui';\nimport { cn } from '../utils/cn';\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport interface ConfirmDialogProps {\n /** Whether the dialog is open */\n open: boolean;\n /** Callback when the dialog should close */\n onClose: () => void;\n /** Callback when confirmed */\n onConfirm: () => void | Promise<void>;\n /** Dialog title */\n title: string;\n /** Dialog description */\n description: ReactNode;\n /** Confirm button text */\n confirmLabel?: string;\n /** Cancel button text */\n cancelLabel?: string;\n /** Variant for styling */\n variant?: 'default' | 'destructive';\n /** Loading state */\n loading?: boolean;\n /** Icon to display */\n icon?: ReactNode;\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\n/**\n * ConfirmDialog - Modal dialog for confirming actions\n *\n * Use for destructive actions like deleting, or important state changes.\n */\nexport function ConfirmDialog({\n open,\n onClose,\n onConfirm,\n title,\n description,\n confirmLabel = 'Confirm',\n cancelLabel = 'Cancel',\n variant = 'default',\n loading = false,\n icon,\n}: ConfirmDialogProps) {\n const confirmRef = useRef<HTMLButtonElement>(null);\n\n // Handle escape key\n useEffect(() => {\n const handleEscape = (e: KeyboardEvent) => {\n if (e.key === 'Escape' && open && !loading) {\n onClose();\n }\n };\n document.addEventListener('keydown', handleEscape);\n return () => document.removeEventListener('keydown', handleEscape);\n }, [open, onClose, loading]);\n\n // Focus confirm button when opened\n useEffect(() => {\n if (open) {\n // Small delay to ensure dialog is rendered\n const timer = setTimeout(() => {\n confirmRef.current?.focus();\n }, 50);\n return () => clearTimeout(timer);\n }\n }, [open]);\n\n // Prevent body scroll when open\n useEffect(() => {\n if (open) {\n document.body.style.overflow = 'hidden';\n } else {\n document.body.style.overflow = '';\n }\n return () => {\n document.body.style.overflow = '';\n };\n }, [open]);\n\n if (!open) return null;\n\n const handleConfirm = async () => {\n await onConfirm();\n };\n\n const isDestructive = variant === 'destructive';\n const defaultIcon = isDestructive ? <AlertTriangle className=\"h-6 w-6 text-destructive\" /> : null;\n\n return (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center\">\n {/* Backdrop */}\n <div\n className=\"fixed inset-0 bg-black/50 transition-opacity\"\n onClick={loading ? undefined : onClose}\n aria-hidden=\"true\"\n />\n\n {/* Dialog */}\n <div\n className={cn(\n 'relative z-10 w-full max-w-md rounded-lg bg-background p-6 shadow-xl',\n 'animate-in zoom-in-95 fade-in duration-200'\n )}\n role=\"alertdialog\"\n aria-modal=\"true\"\n aria-labelledby=\"confirm-dialog-title\"\n aria-describedby=\"confirm-dialog-description\"\n >\n {/* Icon & Content */}\n <div className=\"flex gap-4\">\n {(icon || defaultIcon) && (\n <div\n className={cn(\n 'flex h-12 w-12 shrink-0 items-center justify-center rounded-full',\n isDestructive ? 'bg-destructive/10' : 'bg-primary/10'\n )}\n >\n {icon || defaultIcon}\n </div>\n )}\n <div className=\"flex-1\">\n <h3 id=\"confirm-dialog-title\" className=\"text-lg font-semibold text-foreground\">\n {title}\n </h3>\n <div id=\"confirm-dialog-description\" className=\"mt-2 text-sm text-muted-foreground\">\n {description}\n </div>\n </div>\n </div>\n\n {/* Actions */}\n <div className=\"mt-6 flex justify-end gap-3\">\n <Button variant=\"outline\" onClick={onClose} disabled={loading}>\n {cancelLabel}\n </Button>\n <Button\n ref={confirmRef}\n variant={isDestructive ? 'destructive' : 'default'}\n onClick={handleConfirm}\n disabled={loading}\n >\n {loading && <Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />}\n {confirmLabel}\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n// ============================================================================\n// Delete Confirmation Helper\n// ============================================================================\n\nexport interface DeleteConfirmDialogProps {\n open: boolean;\n onClose: () => void;\n onConfirm: () => void | Promise<void>;\n /** Name of item being deleted */\n itemName: string;\n /** Type of item (e.g., \"tenant\", \"user\") */\n itemType: string;\n loading?: boolean;\n}\n\n/**\n * DeleteConfirmDialog - Pre-configured dialog for delete confirmations\n */\nexport function DeleteConfirmDialog({\n open,\n onClose,\n onConfirm,\n itemName,\n itemType,\n loading,\n}: DeleteConfirmDialogProps) {\n return (\n <ConfirmDialog\n open={open}\n onClose={onClose}\n onConfirm={onConfirm}\n title={`Delete ${itemType}?`}\n description={\n <>\n Are you sure you want to delete <strong className=\"text-foreground\">{itemName}</strong>?\n This action cannot be undone.\n </>\n }\n confirmLabel=\"Delete\"\n variant=\"destructive\"\n loading={loading}\n />\n );\n}\n"],"mappings":";;;;;;AAyCA,SAAgB,EAAc,EAC5B,SACA,YACA,cACA,UACA,gBACA,kBAAe,WACf,iBAAc,UACd,aAAU,WACV,aAAU,IACV,WACqB;CACrB,IAAM,IAAa,EAA0B,KAAK;AAoClD,KAjCA,QAAgB;EACd,IAAM,KAAgB,MAAqB;AACzC,GAAI,EAAE,QAAQ,YAAY,KA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KAAK;KACL,SAAS,IAAgB,gBAAgB;KACzC,SAAS;KACT,UAAU;eAJZ,CAMG,KAAW,kBAAC,GAAD,EAAS,WAAU,6BAA8B,CAAA,EAC5D,EACM;OACL;MACF;KACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TenantSsoPanel.d.ts","sourceRoot":"","sources":["../../../src/admin/components/TenantSsoPanel.tsx"],"names":[],"mappings":"AAaA,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;CACpB;AAkBD,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,mBAAmB,2CAsU1E"}
|