@burdenoff/microfe-devportal 2026.609.1 → 2026.609.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/DevportalRoutes.js +9 -5
- package/dist/devportal/DevportalRoutes.js.map +1 -1
- package/dist/devportal/pages/DashboardPage.js +152 -134
- package/dist/devportal/pages/DashboardPage.js.map +1 -1
- package/dist/devportal/pages/SetupPage.js +501 -0
- package/dist/devportal/pages/SetupPage.js.map +1 -0
- package/package.json +1 -1
|
@@ -26,8 +26,8 @@ function g(e, t) {
|
|
|
26
26
|
})
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
var _ = s(() => import("./pages/OrganizationsPage.js").then((e) => ({ default: e.OrganizationsPage }))), v = s(() => import("./pages/OrganizationDetailPage.js").then((e) => ({ default: e.OrganizationDetailPage }))), y = s(() => import("./pages/CreateOrganizationPage.js").then((e) => ({ default: e.CreateOrganizationPage }))), b = s(() => import("./pages/OrganizationMembersPage.js").then((e) => ({ default: e.OrganizationMembersPage }))), x = s(() => import("./pages/RevenueRedirectPage.js").then((e) => ({ default: e.RevenueRedirectPage }))), S = s(() => import("./pages/ApplicationsPage.js").then((e) => ({ default: e.ApplicationsPage }))), C = s(() => import("./pages/ApplicationDetailPage.js").then((e) => ({ default: e.ApplicationDetailPage }))), w = s(() => import("./pages/CreateApplicationPage.js").then((e) => ({ default: e.CreateApplicationPage }))), T = s(() => import("./pages/EditApplicationPage.js").then((e) => ({ default: e.EditApplicationPage }))), E = s(() => import("./pages/ApplicationVersionsPage.js").then((e) => ({ default: e.ApplicationVersionsPage }))), D = s(() => import("./pages/OAuthClientsPage.js").then((e) => ({ default: e.OAuthClientsPage }))), O = s(() => import("./pages/CreateOAuthClientPage.js").then((e) => ({ default: e.CreateOAuthClientPage }))), k = s(() => import("./pages/OAuthClientDetailPage.js").then((e) => ({ default: e.OAuthClientDetailPage }))), A = s(() => import("./pages/ApiKeysPage.js").then((e) => ({ default: e.ApiKeysPage }))), j = s(() => import("./pages/CreateApiKeyPage.js").then((e) => ({ default: e.CreateApiKeyPage }))), M = s(() => import("./pages/WebhooksPage.js").then((e) => ({ default: e.WebhooksPage }))), N = s(() => import("./pages/CreateWebhookPage.js").then((e) => ({ default: e.CreateWebhookPage }))), P = s(() => import("./pages/WebhookDetailPage.js").then((e) => ({ default: e.WebhookDetailPage }))), F = s(() => import("./pages/AnalyticsDashboardPage.js").then((e) => ({ default: e.AnalyticsDashboardPage }))), I = s(() => import("./pages/DocumentationPage.js").then((e) => ({ default: e.DocumentationPage }))), L = s(() => import("./pages/ResourcesPage.js").then((e) => ({ default: e.ResourcesPage }))), R = s(() => import("./pages/SettingsPage.js").then((e) => ({ default: e.SettingsPage }))), z = s(() => import("./pages/PublishPage.js").then((e) => ({ default: e.PublishPage }))), B = s(() => import("./pages/AppLogsPage.js").then((e) => ({ default: e.AppLogsPage }))), V = s(() => import("./pages/DelegationsPage.js").then((e) => ({ default: e.DelegationsPage }))), H = s(() => import("./pages/ListingPreviewPage.js").then((e) => ({ default: e.ListingPreviewPage }))), U = s(() => import("./pages/StoreSubmissionPage.js").then((e) => ({ default: e.StoreSubmissionPage }))), W = s(() => import("./pages/PublisherProfilePage.js").then((e) => ({ default: e.PublisherProfilePage })));
|
|
30
|
-
function
|
|
29
|
+
var _ = s(() => import("./pages/OrganizationsPage.js").then((e) => ({ default: e.OrganizationsPage }))), v = s(() => import("./pages/OrganizationDetailPage.js").then((e) => ({ default: e.OrganizationDetailPage }))), y = s(() => import("./pages/CreateOrganizationPage.js").then((e) => ({ default: e.CreateOrganizationPage }))), b = s(() => import("./pages/OrganizationMembersPage.js").then((e) => ({ default: e.OrganizationMembersPage }))), x = s(() => import("./pages/RevenueRedirectPage.js").then((e) => ({ default: e.RevenueRedirectPage }))), S = s(() => import("./pages/ApplicationsPage.js").then((e) => ({ default: e.ApplicationsPage }))), C = s(() => import("./pages/ApplicationDetailPage.js").then((e) => ({ default: e.ApplicationDetailPage }))), w = s(() => import("./pages/CreateApplicationPage.js").then((e) => ({ default: e.CreateApplicationPage }))), T = s(() => import("./pages/EditApplicationPage.js").then((e) => ({ default: e.EditApplicationPage }))), E = s(() => import("./pages/ApplicationVersionsPage.js").then((e) => ({ default: e.ApplicationVersionsPage }))), D = s(() => import("./pages/OAuthClientsPage.js").then((e) => ({ default: e.OAuthClientsPage }))), O = s(() => import("./pages/CreateOAuthClientPage.js").then((e) => ({ default: e.CreateOAuthClientPage }))), k = s(() => import("./pages/OAuthClientDetailPage.js").then((e) => ({ default: e.OAuthClientDetailPage }))), A = s(() => import("./pages/ApiKeysPage.js").then((e) => ({ default: e.ApiKeysPage }))), j = s(() => import("./pages/CreateApiKeyPage.js").then((e) => ({ default: e.CreateApiKeyPage }))), M = s(() => import("./pages/WebhooksPage.js").then((e) => ({ default: e.WebhooksPage }))), N = s(() => import("./pages/CreateWebhookPage.js").then((e) => ({ default: e.CreateWebhookPage }))), P = s(() => import("./pages/WebhookDetailPage.js").then((e) => ({ default: e.WebhookDetailPage }))), F = s(() => import("./pages/AnalyticsDashboardPage.js").then((e) => ({ default: e.AnalyticsDashboardPage }))), I = s(() => import("./pages/DocumentationPage.js").then((e) => ({ default: e.DocumentationPage }))), L = s(() => import("./pages/ResourcesPage.js").then((e) => ({ default: e.ResourcesPage }))), R = s(() => import("./pages/SettingsPage.js").then((e) => ({ default: e.SettingsPage }))), z = s(() => import("./pages/PublishPage.js").then((e) => ({ default: e.PublishPage }))), B = s(() => import("./pages/AppLogsPage.js").then((e) => ({ default: e.AppLogsPage }))), V = s(() => import("./pages/DelegationsPage.js").then((e) => ({ default: e.DelegationsPage }))), H = s(() => import("./pages/ListingPreviewPage.js").then((e) => ({ default: e.ListingPreviewPage }))), U = s(() => import("./pages/StoreSubmissionPage.js").then((e) => ({ default: e.StoreSubmissionPage }))), W = s(() => import("./pages/PublisherProfilePage.js").then((e) => ({ default: e.PublisherProfilePage }))), G = s(() => import("./pages/SetupPage.js").then((e) => ({ default: e.SetupPage })));
|
|
30
|
+
function K() {
|
|
31
31
|
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(i, {}), /* @__PURE__ */ m(d, { children: [
|
|
32
32
|
/* @__PURE__ */ p(u, {
|
|
33
33
|
index: !0,
|
|
@@ -161,22 +161,26 @@ function G() {
|
|
|
161
161
|
path: "settings",
|
|
162
162
|
element: g("settings", /* @__PURE__ */ p(R, {}))
|
|
163
163
|
}),
|
|
164
|
+
/* @__PURE__ */ p(u, {
|
|
165
|
+
path: "setup",
|
|
166
|
+
element: g("setup", /* @__PURE__ */ p(G, {}))
|
|
167
|
+
}),
|
|
164
168
|
/* @__PURE__ */ p(u, {
|
|
165
169
|
path: "*",
|
|
166
170
|
element: /* @__PURE__ */ p(h, {})
|
|
167
171
|
})
|
|
168
172
|
] })] });
|
|
169
173
|
}
|
|
170
|
-
function
|
|
174
|
+
function q() {
|
|
171
175
|
return /* @__PURE__ */ p(o, {
|
|
172
176
|
fallback: /* @__PURE__ */ p(t, { message: "Loading page..." }),
|
|
173
177
|
children: /* @__PURE__ */ p(d, { children: /* @__PURE__ */ p(u, {
|
|
174
178
|
path: "/*",
|
|
175
|
-
element: /* @__PURE__ */ p(
|
|
179
|
+
element: /* @__PURE__ */ p(K, {})
|
|
176
180
|
}) })
|
|
177
181
|
});
|
|
178
182
|
}
|
|
179
183
|
//#endregion
|
|
180
|
-
export {
|
|
184
|
+
export { q as DevportalRoutes };
|
|
181
185
|
|
|
182
186
|
//# sourceMappingURL=DevportalRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevportalRoutes.js","names":[],"sources":["../../src/devportal/DevportalRoutes.tsx"],"sourcesContent":["import { Suspense, lazy, useEffect, type ReactNode } from \"react\";\nimport { Routes, Route, Navigate } from \"react-router-dom\";\nimport { LoadingState } from \"./components/LoadingState\";\nimport { FeatureFlaggedRoute } from \"./components/FeatureFlaggedRoute\";\nimport { TelemetryErrorBoundary } from \"./components/TelemetryErrorBoundary\";\nimport { SectionNav } from \"./components/SectionNav\";\nimport { useDevportal } from \"./providers/DevportalProvider\";\n\n/**\n * Catch-all redirect target for the unmatched `*` route. Uses the\n * DevportalProvider's `basePath` and `navigate` so the redirect works\n * regardless of the integration mode (shell or standalone). Falls back to a\n * relative Navigate when neither is wired, which is the standalone/test path.\n */\nfunction CatchAllRedirect() {\n const { basePath, navigate } = useDevportal();\n useEffect(() => {\n if (basePath && navigate) {\n const target = basePath.endsWith(\"/\") ? basePath.slice(0, -1) : basePath;\n navigate(target || \"/\");\n }\n }, [basePath, navigate]);\n if (basePath && navigate) return null;\n return <Navigate to=\"..\" replace />;\n}\n\n/**\n * Wrap a page element with the per-route feature flag gate and a\n * telemetry-emitting error boundary. The flag name follows\n * `devportal.<page-slug>` convention; when disabled the user sees a\n * graceful fallback instead of a route-level crash.\n *\n * Per `dev/platform/context/feature-flags` and spec\n * `microfrontends/47-FRONTEND-EVENT-BUS.md` (error.boundary emission).\n */\nfunction gated(slug: string, element: ReactNode): ReactNode {\n return (\n <TelemetryErrorBoundary scope={slug}>\n <FeatureFlaggedRoute flag={`devportal.${slug}`}>\n {element}\n </FeatureFlaggedRoute>\n </TelemetryErrorBoundary>\n );\n}\n\n// Eager load the main dashboard page\nimport { DashboardPage } from \"./pages/DashboardPage\";\n\n// Lazy load all other pages\nconst OrganizationsPage = lazy(() =>\n import(\"./pages/OrganizationsPage\").then((m) => ({\n default: m.OrganizationsPage,\n })),\n);\nconst OrganizationDetailPage = lazy(() =>\n import(\"./pages/OrganizationDetailPage\").then((m) => ({\n default: m.OrganizationDetailPage,\n })),\n);\nconst CreateOrganizationPage = lazy(() =>\n import(\"./pages/CreateOrganizationPage\").then((m) => ({\n default: m.CreateOrganizationPage,\n })),\n);\nconst OrganizationMembersPage = lazy(() =>\n import(\"./pages/OrganizationMembersPage\").then((m) => ({\n default: m.OrganizationMembersPage,\n })),\n);\nconst RevenueRedirectPage = lazy(() =>\n import(\"./pages/RevenueRedirectPage\").then((m) => ({\n default: m.RevenueRedirectPage,\n })),\n);\nconst ApplicationsPage = lazy(() =>\n import(\"./pages/ApplicationsPage\").then((m) => ({\n default: m.ApplicationsPage,\n })),\n);\nconst ApplicationDetailPage = lazy(() =>\n import(\"./pages/ApplicationDetailPage\").then((m) => ({\n default: m.ApplicationDetailPage,\n })),\n);\nconst CreateApplicationPage = lazy(() =>\n import(\"./pages/CreateApplicationPage\").then((m) => ({\n default: m.CreateApplicationPage,\n })),\n);\nconst EditApplicationPage = lazy(() =>\n import(\"./pages/EditApplicationPage\").then((m) => ({\n default: m.EditApplicationPage,\n })),\n);\nconst ApplicationVersionsPage = lazy(() =>\n import(\"./pages/ApplicationVersionsPage\").then((m) => ({\n default: m.ApplicationVersionsPage,\n })),\n);\nconst OAuthClientsPage = lazy(() =>\n import(\"./pages/OAuthClientsPage\").then((m) => ({\n default: m.OAuthClientsPage,\n })),\n);\nconst CreateOAuthClientPage = lazy(() =>\n import(\"./pages/CreateOAuthClientPage\").then((m) => ({\n default: m.CreateOAuthClientPage,\n })),\n);\nconst OAuthClientDetailPage = lazy(() =>\n import(\"./pages/OAuthClientDetailPage\").then((m) => ({\n default: m.OAuthClientDetailPage,\n })),\n);\nconst ApiKeysPage = lazy(() =>\n import(\"./pages/ApiKeysPage\").then((m) => ({ default: m.ApiKeysPage })),\n);\nconst CreateApiKeyPage = lazy(() =>\n import(\"./pages/CreateApiKeyPage\").then((m) => ({\n default: m.CreateApiKeyPage,\n })),\n);\nconst WebhooksPage = lazy(() =>\n import(\"./pages/WebhooksPage\").then((m) => ({ default: m.WebhooksPage })),\n);\nconst CreateWebhookPage = lazy(() =>\n import(\"./pages/CreateWebhookPage\").then((m) => ({\n default: m.CreateWebhookPage,\n })),\n);\nconst WebhookDetailPage = lazy(() =>\n import(\"./pages/WebhookDetailPage\").then((m) => ({\n default: m.WebhookDetailPage,\n })),\n);\nconst AnalyticsDashboardPage = lazy(() =>\n import(\"./pages/AnalyticsDashboardPage\").then((m) => ({\n default: m.AnalyticsDashboardPage,\n })),\n);\nconst DocumentationPage = lazy(() =>\n import(\"./pages/DocumentationPage\").then((m) => ({\n default: m.DocumentationPage,\n })),\n);\nconst ResourcesPage = lazy(() =>\n import(\"./pages/ResourcesPage\").then((m) => ({ default: m.ResourcesPage })),\n);\nconst SettingsPage = lazy(() =>\n import(\"./pages/SettingsPage\").then((m) => ({ default: m.SettingsPage })),\n);\nconst PublishPage = lazy(() =>\n import(\"./pages/PublishPage\").then((m) => ({ default: m.PublishPage })),\n);\nconst AppLogsPage = lazy(() =>\n import(\"./pages/AppLogsPage\").then((m) => ({ default: m.AppLogsPage })),\n);\nconst DelegationsPage = lazy(() =>\n import(\"./pages/DelegationsPage\").then((m) => ({\n default: m.DelegationsPage,\n })),\n);\nconst ListingPreviewPage = lazy(() =>\n import(\"./pages/ListingPreviewPage\").then((m) => ({\n default: m.ListingPreviewPage,\n })),\n);\nconst StoreSubmissionPage = lazy(() =>\n import(\"./pages/StoreSubmissionPage\").then((m) => ({\n default: m.StoreSubmissionPage,\n })),\n);\nconst PublisherProfilePage = lazy(() =>\n import(\"./pages/PublisherProfilePage\").then((m) => ({\n default: m.PublisherProfilePage,\n })),\n);\n\n/**\n * Inner routes component - renders actual page routes\n */\nfunction InnerRoutes() {\n return (\n <>\n <SectionNav />\n <Routes>\n {/* Dashboard */}\n <Route index element={gated(\"dashboard\", <DashboardPage />)} />\n\n {/* Organizations */}\n <Route\n path=\"organizations\"\n element={gated(\"organizations\", <OrganizationsPage />)}\n />\n <Route\n path=\"organizations/new\"\n element={gated(\"organizations.create\", <CreateOrganizationPage />)}\n />\n <Route\n path=\"organizations/:orgId\"\n element={gated(\"organizations.detail\", <OrganizationDetailPage />)}\n />\n <Route\n path=\"organizations/:orgId/members\"\n element={gated(\"organizations.members\", <OrganizationMembersPage />)}\n />\n <Route\n path=\"organizations/:orgId/revenue\"\n element={gated(\"organizations.revenue\", <RevenueRedirectPage />)}\n />\n\n {/* Applications */}\n <Route path=\"apps\" element={gated(\"apps\", <ApplicationsPage />)} />\n <Route\n path=\"apps/new\"\n element={gated(\"apps.create\", <CreateApplicationPage />)}\n />\n <Route\n path=\"apps/:appId\"\n element={gated(\"apps.detail\", <ApplicationDetailPage />)}\n />\n <Route\n path=\"apps/:appId/edit\"\n element={gated(\"apps.edit\", <EditApplicationPage />)}\n />\n <Route\n path=\"apps/:appId/versions\"\n element={gated(\"apps.versions\", <ApplicationVersionsPage />)}\n />\n <Route\n path=\"apps/:appId/publish\"\n element={gated(\"apps.publish\", <PublishPage />)}\n />\n <Route\n path=\"apps/:appId/store-submission\"\n element={gated(\"apps.storeSubmission\", <StoreSubmissionPage />)}\n />\n <Route\n path=\"apps/:appId/listing\"\n element={gated(\"apps.listing\", <ListingPreviewPage />)}\n />\n <Route\n path=\"apps/:appId/logs\"\n element={gated(\"apps.logs\", <AppLogsPage />)}\n />\n\n {/* OAuth Clients — user-scoped via auth-svc (no app nesting) */}\n <Route path=\"oauth\" element={gated(\"oauth\", <OAuthClientsPage />)} />\n <Route\n path=\"oauth/new\"\n element={gated(\"oauth.create\", <CreateOAuthClientPage />)}\n />\n <Route\n path=\"oauth/:clientId\"\n element={gated(\"oauth.detail\", <OAuthClientDetailPage />)}\n />\n\n {/* API Keys — user-scoped via auth-svc (no app nesting) */}\n <Route path=\"api-keys\" element={gated(\"apiKeys\", <ApiKeysPage />)} />\n <Route\n path=\"api-keys/new\"\n element={gated(\"apiKeys.create\", <CreateApiKeyPage />)}\n />\n\n {/* Webhooks (App-specific) */}\n <Route\n path=\"apps/:appId/webhooks\"\n element={gated(\"apps.webhooks\", <WebhooksPage />)}\n />\n <Route\n path=\"apps/:appId/webhooks/new\"\n element={gated(\"apps.webhooks.create\", <CreateWebhookPage />)}\n />\n <Route\n path=\"apps/:appId/webhooks/:webhookId\"\n element={gated(\"apps.webhooks.detail\", <WebhookDetailPage />)}\n />\n\n {/* App Analytics */}\n <Route\n path=\"apps/:appId/analytics\"\n element={gated(\"apps.analytics\", <AnalyticsDashboardPage />)}\n />\n\n {/* Delegations */}\n <Route\n path=\"delegations\"\n element={gated(\"delegations\", <DelegationsPage />)}\n />\n\n {/* Global Webhooks views */}\n <Route\n path=\"webhooks/new\"\n element={gated(\"webhooks.create\", <CreateWebhookPage />)}\n />\n <Route path=\"webhooks\" element={gated(\"webhooks\", <WebhooksPage />)} />\n\n {/* Analytics & Revenue */}\n <Route\n path=\"analytics\"\n element={gated(\"analytics\", <AnalyticsDashboardPage />)}\n />\n <Route\n path=\"revenue\"\n element={gated(\"revenue\", <RevenueRedirectPage />)}\n />\n\n {/* Documentation & Resources */}\n <Route path=\"docs\" element={gated(\"docs\", <DocumentationPage />)} />\n <Route\n path=\"resources\"\n element={gated(\"resources\", <ResourcesPage />)}\n />\n\n {/* Admin surfaces (e.g. /admin/reviews) live in admin-app via\n AdminDevportalRoot — intentionally not mounted in user shells. */}\n\n {/* Publisher */}\n <Route\n path=\"publisher/profile\"\n element={gated(\"publisher.profile\", <PublisherProfilePage />)}\n />\n\n {/* Settings */}\n <Route path=\"settings\" element={gated(\"settings\", <SettingsPage />)} />\n\n {/* Catch-all redirect to dashboard */}\n <Route path=\"*\" element={<CatchAllRedirect />} />\n </Routes>\n </>\n );\n}\n\n/**\n * Developer Portal Routes\n *\n * Defines all the routes for the developer portal microfrontend.\n * Uses lazy loading for all pages except the dashboard for optimal performance.\n *\n * When integrated into a shell (basePath provided), the shell already handles\n * the basePath route (e.g., /devportal/*), so this component should render\n * routes relative to that path - NOT nest them under basePath again.\n *\n * Example:\n * - Shell route: /devportal/*\n * - User navigates to: /devportal/organizations\n * - Inside DevportalRoutes, the path is: /organizations (relative to shell route)\n * - InnerRoutes matches: organizations -> OrganizationsPage\n */\nexport function DevportalRoutes() {\n // When basePath is provided, we're in shell integration mode.\n // The shell already matched the basePath route, so we render routes\n // relative to that - using wildcard to catch all sub-paths.\n // When no basePath (standalone mode), just render InnerRoutes at root.\n return (\n <Suspense fallback={<LoadingState message=\"Loading page...\" />}>\n <Routes>\n {/* Wildcard route to let InnerRoutes handle all paths */}\n <Route path=\"/*\" element={<InnerRoutes />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;;AAcA,SAAS,IAAmB;CAC1B,IAAM,EAAE,aAAU,gBAAa,GAAc;AAQ7C,QAPA,QAAgB;AACd,EAAI,KAAY,KAEd,GADe,EAAS,SAAS,IAAI,GAAG,EAAS,MAAM,GAAG,GAAG,GAAG,MAC7C,IAAI;IAExB,CAAC,GAAU,EAAS,CAAC,EACpB,KAAY,IAAiB,OAC1B,kBAAC,GAAD;EAAU,IAAG;EAAK,SAAA;EAAU,CAAA;;AAYrC,SAAS,EAAM,GAAc,GAA+B;AAC1D,QACE,kBAAC,GAAD;EAAwB,OAAO;YAC7B,kBAAC,GAAD;GAAqB,MAAM,aAAa;aACrC;GACmB,CAAA;EACC,CAAA;;AAQ7B,IAAM,IAAoB,QACxB,OAAO,gCAA6B,MAAM,OAAO,EAC/C,SAAS,EAAE,mBACZ,EAAE,CACJ,EACK,IAAyB,QAC7B,OAAO,qCAAkC,MAAM,OAAO,EACpD,SAAS,EAAE,wBACZ,EAAE,CACJ,EACK,IAAyB,QAC7B,OAAO,qCAAkC,MAAM,OAAO,EACpD,SAAS,EAAE,wBACZ,EAAE,CACJ,EACK,IAA0B,QAC9B,OAAO,sCAAmC,MAAM,OAAO,EACrD,SAAS,EAAE,yBACZ,EAAE,CACJ,EACK,IAAsB,QAC1B,OAAO,kCAA+B,MAAM,OAAO,EACjD,SAAS,EAAE,qBACZ,EAAE,CACJ,EACK,IAAmB,QACvB,OAAO,+BAA4B,MAAM,OAAO,EAC9C,SAAS,EAAE,kBACZ,EAAE,CACJ,EACK,IAAwB,QAC5B,OAAO,oCAAiC,MAAM,OAAO,EACnD,SAAS,EAAE,uBACZ,EAAE,CACJ,EACK,IAAwB,QAC5B,OAAO,oCAAiC,MAAM,OAAO,EACnD,SAAS,EAAE,uBACZ,EAAE,CACJ,EACK,IAAsB,Q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AAD;GAAO,MAAK;GAAW,SAAS,EAAM,YAAY,kBAAC,GAAD,EAAgB,CAAA,CAAC;GAAI,CAAA;EAGvE,kBAAC,GAAD;GAAO,MAAK;GAAI,SAAS,kBAAC,GAAD,EAAoB,CAAA;GAAI,CAAA;EAC1C,EAAA,CAAA,CACR,EAAA,CAAA;;AAoBP,SAAgB,IAAkB;AAKhC,QACE,kBAAC,GAAD;EAAU,UAAU,kBAAC,GAAD,EAAc,SAAQ,mBAAoB,CAAA;YAC5D,kBAAC,GAAD,EAAA,UAEE,kBAAC,GAAD;GAAO,MAAK;GAAK,SAAS,kBAAC,GAAD,EAAe,CAAA;GAAI,CAAA,EACtC,CAAA;EACA,CAAA"}
|
|
1
|
+
{"version":3,"file":"DevportalRoutes.js","names":[],"sources":["../../src/devportal/DevportalRoutes.tsx"],"sourcesContent":["import { Suspense, lazy, useEffect, type ReactNode } from \"react\";\nimport { Routes, Route, Navigate } from \"react-router-dom\";\nimport { LoadingState } from \"./components/LoadingState\";\nimport { FeatureFlaggedRoute } from \"./components/FeatureFlaggedRoute\";\nimport { TelemetryErrorBoundary } from \"./components/TelemetryErrorBoundary\";\nimport { SectionNav } from \"./components/SectionNav\";\nimport { useDevportal } from \"./providers/DevportalProvider\";\n\n/**\n * Catch-all redirect target for the unmatched `*` route. Uses the\n * DevportalProvider's `basePath` and `navigate` so the redirect works\n * regardless of the integration mode (shell or standalone). Falls back to a\n * relative Navigate when neither is wired, which is the standalone/test path.\n */\nfunction CatchAllRedirect() {\n const { basePath, navigate } = useDevportal();\n useEffect(() => {\n if (basePath && navigate) {\n const target = basePath.endsWith(\"/\") ? basePath.slice(0, -1) : basePath;\n navigate(target || \"/\");\n }\n }, [basePath, navigate]);\n if (basePath && navigate) return null;\n return <Navigate to=\"..\" replace />;\n}\n\n/**\n * Wrap a page element with the per-route feature flag gate and a\n * telemetry-emitting error boundary. The flag name follows\n * `devportal.<page-slug>` convention; when disabled the user sees a\n * graceful fallback instead of a route-level crash.\n *\n * Per `dev/platform/context/feature-flags` and spec\n * `microfrontends/47-FRONTEND-EVENT-BUS.md` (error.boundary emission).\n */\nfunction gated(slug: string, element: ReactNode): ReactNode {\n return (\n <TelemetryErrorBoundary scope={slug}>\n <FeatureFlaggedRoute flag={`devportal.${slug}`}>\n {element}\n </FeatureFlaggedRoute>\n </TelemetryErrorBoundary>\n );\n}\n\n// Eager load the main dashboard page\nimport { DashboardPage } from \"./pages/DashboardPage\";\n\n// Lazy load all other pages\nconst OrganizationsPage = lazy(() =>\n import(\"./pages/OrganizationsPage\").then((m) => ({\n default: m.OrganizationsPage,\n })),\n);\nconst OrganizationDetailPage = lazy(() =>\n import(\"./pages/OrganizationDetailPage\").then((m) => ({\n default: m.OrganizationDetailPage,\n })),\n);\nconst CreateOrganizationPage = lazy(() =>\n import(\"./pages/CreateOrganizationPage\").then((m) => ({\n default: m.CreateOrganizationPage,\n })),\n);\nconst OrganizationMembersPage = lazy(() =>\n import(\"./pages/OrganizationMembersPage\").then((m) => ({\n default: m.OrganizationMembersPage,\n })),\n);\nconst RevenueRedirectPage = lazy(() =>\n import(\"./pages/RevenueRedirectPage\").then((m) => ({\n default: m.RevenueRedirectPage,\n })),\n);\nconst ApplicationsPage = lazy(() =>\n import(\"./pages/ApplicationsPage\").then((m) => ({\n default: m.ApplicationsPage,\n })),\n);\nconst ApplicationDetailPage = lazy(() =>\n import(\"./pages/ApplicationDetailPage\").then((m) => ({\n default: m.ApplicationDetailPage,\n })),\n);\nconst CreateApplicationPage = lazy(() =>\n import(\"./pages/CreateApplicationPage\").then((m) => ({\n default: m.CreateApplicationPage,\n })),\n);\nconst EditApplicationPage = lazy(() =>\n import(\"./pages/EditApplicationPage\").then((m) => ({\n default: m.EditApplicationPage,\n })),\n);\nconst ApplicationVersionsPage = lazy(() =>\n import(\"./pages/ApplicationVersionsPage\").then((m) => ({\n default: m.ApplicationVersionsPage,\n })),\n);\nconst OAuthClientsPage = lazy(() =>\n import(\"./pages/OAuthClientsPage\").then((m) => ({\n default: m.OAuthClientsPage,\n })),\n);\nconst CreateOAuthClientPage = lazy(() =>\n import(\"./pages/CreateOAuthClientPage\").then((m) => ({\n default: m.CreateOAuthClientPage,\n })),\n);\nconst OAuthClientDetailPage = lazy(() =>\n import(\"./pages/OAuthClientDetailPage\").then((m) => ({\n default: m.OAuthClientDetailPage,\n })),\n);\nconst ApiKeysPage = lazy(() =>\n import(\"./pages/ApiKeysPage\").then((m) => ({ default: m.ApiKeysPage })),\n);\nconst CreateApiKeyPage = lazy(() =>\n import(\"./pages/CreateApiKeyPage\").then((m) => ({\n default: m.CreateApiKeyPage,\n })),\n);\nconst WebhooksPage = lazy(() =>\n import(\"./pages/WebhooksPage\").then((m) => ({ default: m.WebhooksPage })),\n);\nconst CreateWebhookPage = lazy(() =>\n import(\"./pages/CreateWebhookPage\").then((m) => ({\n default: m.CreateWebhookPage,\n })),\n);\nconst WebhookDetailPage = lazy(() =>\n import(\"./pages/WebhookDetailPage\").then((m) => ({\n default: m.WebhookDetailPage,\n })),\n);\nconst AnalyticsDashboardPage = lazy(() =>\n import(\"./pages/AnalyticsDashboardPage\").then((m) => ({\n default: m.AnalyticsDashboardPage,\n })),\n);\nconst DocumentationPage = lazy(() =>\n import(\"./pages/DocumentationPage\").then((m) => ({\n default: m.DocumentationPage,\n })),\n);\nconst ResourcesPage = lazy(() =>\n import(\"./pages/ResourcesPage\").then((m) => ({ default: m.ResourcesPage })),\n);\nconst SettingsPage = lazy(() =>\n import(\"./pages/SettingsPage\").then((m) => ({ default: m.SettingsPage })),\n);\nconst PublishPage = lazy(() =>\n import(\"./pages/PublishPage\").then((m) => ({ default: m.PublishPage })),\n);\nconst AppLogsPage = lazy(() =>\n import(\"./pages/AppLogsPage\").then((m) => ({ default: m.AppLogsPage })),\n);\nconst DelegationsPage = lazy(() =>\n import(\"./pages/DelegationsPage\").then((m) => ({\n default: m.DelegationsPage,\n })),\n);\nconst ListingPreviewPage = lazy(() =>\n import(\"./pages/ListingPreviewPage\").then((m) => ({\n default: m.ListingPreviewPage,\n })),\n);\nconst StoreSubmissionPage = lazy(() =>\n import(\"./pages/StoreSubmissionPage\").then((m) => ({\n default: m.StoreSubmissionPage,\n })),\n);\nconst PublisherProfilePage = lazy(() =>\n import(\"./pages/PublisherProfilePage\").then((m) => ({\n default: m.PublisherProfilePage,\n })),\n);\nconst SetupPage = lazy(() =>\n import(\"./pages/SetupPage\").then((m) => ({ default: m.SetupPage })),\n);\n\n/**\n * Inner routes component - renders actual page routes\n */\nfunction InnerRoutes() {\n return (\n <>\n <SectionNav />\n <Routes>\n {/* Dashboard */}\n <Route index element={gated(\"dashboard\", <DashboardPage />)} />\n\n {/* Organizations */}\n <Route\n path=\"organizations\"\n element={gated(\"organizations\", <OrganizationsPage />)}\n />\n <Route\n path=\"organizations/new\"\n element={gated(\"organizations.create\", <CreateOrganizationPage />)}\n />\n <Route\n path=\"organizations/:orgId\"\n element={gated(\"organizations.detail\", <OrganizationDetailPage />)}\n />\n <Route\n path=\"organizations/:orgId/members\"\n element={gated(\"organizations.members\", <OrganizationMembersPage />)}\n />\n <Route\n path=\"organizations/:orgId/revenue\"\n element={gated(\"organizations.revenue\", <RevenueRedirectPage />)}\n />\n\n {/* Applications */}\n <Route path=\"apps\" element={gated(\"apps\", <ApplicationsPage />)} />\n <Route\n path=\"apps/new\"\n element={gated(\"apps.create\", <CreateApplicationPage />)}\n />\n <Route\n path=\"apps/:appId\"\n element={gated(\"apps.detail\", <ApplicationDetailPage />)}\n />\n <Route\n path=\"apps/:appId/edit\"\n element={gated(\"apps.edit\", <EditApplicationPage />)}\n />\n <Route\n path=\"apps/:appId/versions\"\n element={gated(\"apps.versions\", <ApplicationVersionsPage />)}\n />\n <Route\n path=\"apps/:appId/publish\"\n element={gated(\"apps.publish\", <PublishPage />)}\n />\n <Route\n path=\"apps/:appId/store-submission\"\n element={gated(\"apps.storeSubmission\", <StoreSubmissionPage />)}\n />\n <Route\n path=\"apps/:appId/listing\"\n element={gated(\"apps.listing\", <ListingPreviewPage />)}\n />\n <Route\n path=\"apps/:appId/logs\"\n element={gated(\"apps.logs\", <AppLogsPage />)}\n />\n\n {/* OAuth Clients — user-scoped via auth-svc (no app nesting) */}\n <Route path=\"oauth\" element={gated(\"oauth\", <OAuthClientsPage />)} />\n <Route\n path=\"oauth/new\"\n element={gated(\"oauth.create\", <CreateOAuthClientPage />)}\n />\n <Route\n path=\"oauth/:clientId\"\n element={gated(\"oauth.detail\", <OAuthClientDetailPage />)}\n />\n\n {/* API Keys — user-scoped via auth-svc (no app nesting) */}\n <Route path=\"api-keys\" element={gated(\"apiKeys\", <ApiKeysPage />)} />\n <Route\n path=\"api-keys/new\"\n element={gated(\"apiKeys.create\", <CreateApiKeyPage />)}\n />\n\n {/* Webhooks (App-specific) */}\n <Route\n path=\"apps/:appId/webhooks\"\n element={gated(\"apps.webhooks\", <WebhooksPage />)}\n />\n <Route\n path=\"apps/:appId/webhooks/new\"\n element={gated(\"apps.webhooks.create\", <CreateWebhookPage />)}\n />\n <Route\n path=\"apps/:appId/webhooks/:webhookId\"\n element={gated(\"apps.webhooks.detail\", <WebhookDetailPage />)}\n />\n\n {/* App Analytics */}\n <Route\n path=\"apps/:appId/analytics\"\n element={gated(\"apps.analytics\", <AnalyticsDashboardPage />)}\n />\n\n {/* Delegations */}\n <Route\n path=\"delegations\"\n element={gated(\"delegations\", <DelegationsPage />)}\n />\n\n {/* Global Webhooks views */}\n <Route\n path=\"webhooks/new\"\n element={gated(\"webhooks.create\", <CreateWebhookPage />)}\n />\n <Route path=\"webhooks\" element={gated(\"webhooks\", <WebhooksPage />)} />\n\n {/* Analytics & Revenue */}\n <Route\n path=\"analytics\"\n element={gated(\"analytics\", <AnalyticsDashboardPage />)}\n />\n <Route\n path=\"revenue\"\n element={gated(\"revenue\", <RevenueRedirectPage />)}\n />\n\n {/* Documentation & Resources */}\n <Route path=\"docs\" element={gated(\"docs\", <DocumentationPage />)} />\n <Route\n path=\"resources\"\n element={gated(\"resources\", <ResourcesPage />)}\n />\n\n {/* Admin surfaces (e.g. /admin/reviews) live in admin-app via\n AdminDevportalRoot — intentionally not mounted in user shells. */}\n\n {/* Publisher */}\n <Route\n path=\"publisher/profile\"\n element={gated(\"publisher.profile\", <PublisherProfilePage />)}\n />\n\n {/* Settings */}\n <Route path=\"settings\" element={gated(\"settings\", <SettingsPage />)} />\n\n {/* First-time setup wizard */}\n <Route path=\"setup\" element={gated(\"setup\", <SetupPage />)} />\n\n {/* Catch-all redirect to dashboard */}\n <Route path=\"*\" element={<CatchAllRedirect />} />\n </Routes>\n </>\n );\n}\n\n/**\n * Developer Portal Routes\n *\n * Defines all the routes for the developer portal microfrontend.\n * Uses lazy loading for all pages except the dashboard for optimal performance.\n *\n * When integrated into a shell (basePath provided), the shell already handles\n * the basePath route (e.g., /devportal/*), so this component should render\n * routes relative to that path - NOT nest them under basePath again.\n *\n * Example:\n * - Shell route: /devportal/*\n * - User navigates to: /devportal/organizations\n * - Inside DevportalRoutes, the path is: /organizations (relative to shell route)\n * - InnerRoutes matches: organizations -> OrganizationsPage\n */\nexport function DevportalRoutes() {\n // When basePath is provided, we're in shell integration mode.\n // The shell already matched the basePath route, so we render routes\n // relative to that - using wildcard to catch all sub-paths.\n // When no basePath (standalone mode), just render InnerRoutes at root.\n return (\n <Suspense fallback={<LoadingState message=\"Loading page...\" />}>\n <Routes>\n {/* Wildcard route to let InnerRoutes handle all paths */}\n <Route path=\"/*\" element={<InnerRoutes />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;;AAcA,SAAS,IAAmB;CAC1B,IAAM,EAAE,aAAU,gBAAa,GAAc;AAQ7C,QAPA,QAAgB;AACd,EAAI,KAAY,KAEd,GADe,EAAS,SAAS,IAAI,GAAG,EAAS,MAAM,GAAG,GAAG,GAAG,MAC7C,IAAI;IAExB,CAAC,GAAU,EAAS,CAAC,EACpB,KAAY,IAAiB,OAC1B,kBAAC,GAAD;EAAU,IAAG;EAAK,SAAA;EAAU,CAAA;;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kB;AAKhC,QACE,kBAAC,GAAD;EAAU,UAAU,kBAAC,GAAD,EAAc,SAAQ,mBAAoB,CAAA;YAC5D,kBAAC,GAAD,EAAA,UAEE,kBAAC,GAAD;GAAO,MAAK;GAAK,SAAS,kBAAC,GAAD,EAAe,CAAA;GAAI,CAAA,EACtC,CAAA;EACA,CAAA"}
|
|
@@ -8,234 +8,252 @@ import { PermissionGuard as c } from "../components/PermissionGuard.js";
|
|
|
8
8
|
import "../components/index.js";
|
|
9
9
|
import { DEVPORTAL_PERMISSIONS as l } from "../constants/permissions.js";
|
|
10
10
|
import "../hooks/index.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
11
|
+
import { useEffect as u } from "react";
|
|
12
|
+
import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
13
|
+
import { Activity as f, AppWindow as p, ArrowRight as m, Building2 as h, DollarSign as g, Key as _, Loader2 as v, Plus as y, TrendingUp as b, Users as x, Webhook as S } from "lucide-react";
|
|
14
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
14
15
|
//#region src/devportal/pages/DashboardPage.tsx
|
|
15
|
-
var
|
|
16
|
-
let { navigate:
|
|
17
|
-
let n =
|
|
16
|
+
var T = () => {
|
|
17
|
+
let { navigate: T, basePath: O } = e(), { t: k } = d(), A = (e, t) => {
|
|
18
|
+
let n = k(e);
|
|
18
19
|
return n === e ? t : n;
|
|
19
|
-
}, { data:
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
}, { data: j, loading: M } = s({ fetchPolicy: "cache-and-network" }), N = j?.myDeveloperOrganizations ?? [];
|
|
21
|
+
u(() => {
|
|
22
|
+
if (!(M || !j) && !(N.length > 0)) {
|
|
23
|
+
try {
|
|
24
|
+
if (localStorage.getItem("devportal_setup_dismissed")) return;
|
|
25
|
+
} catch {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
T?.(`${O}/setup`);
|
|
29
|
+
}
|
|
30
|
+
}, [
|
|
31
|
+
M,
|
|
32
|
+
j,
|
|
33
|
+
N.length,
|
|
34
|
+
T,
|
|
35
|
+
O
|
|
36
|
+
]);
|
|
37
|
+
let P = j?.applications?.edges?.map((e) => e.node) ?? [], F = {
|
|
38
|
+
totalApps: j?.applications?.totalCount ?? 0,
|
|
39
|
+
totalOrgs: N.length,
|
|
22
40
|
totalApiKeys: 0,
|
|
23
41
|
totalWebhooks: 0,
|
|
24
|
-
totalApiCalls:
|
|
25
|
-
activeInstalls:
|
|
26
|
-
monthlyRevenue:
|
|
42
|
+
totalApiCalls: N.reduce((e, t) => e + parseInt(t.totalApiCalls || "0"), 0),
|
|
43
|
+
activeInstalls: N.reduce((e, t) => e + (t.activeInstalls || 0), 0),
|
|
44
|
+
monthlyRevenue: N.reduce((e, t) => e + (t.totalRevenue || 0), 0),
|
|
27
45
|
errorRate: 0
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
return /* @__PURE__ */
|
|
46
|
+
}, I = (e) => {
|
|
47
|
+
T?.(`${O}${e}`);
|
|
48
|
+
}, L = M;
|
|
49
|
+
return /* @__PURE__ */ C(c, {
|
|
32
50
|
permission: l.APP_READ,
|
|
33
|
-
children: /* @__PURE__ */
|
|
34
|
-
title:
|
|
35
|
-
description:
|
|
36
|
-
actions: /* @__PURE__ */
|
|
51
|
+
children: /* @__PURE__ */ w(n, {
|
|
52
|
+
title: A("devportal.developerPortal", "Developer Portal"),
|
|
53
|
+
description: A("devportal.buildManageMonitor", "Build, manage, and monitor your applications"),
|
|
54
|
+
actions: /* @__PURE__ */ w("button", {
|
|
37
55
|
"data-tour": "devportal-dashboard-create-app-button",
|
|
38
|
-
onClick: () =>
|
|
56
|
+
onClick: () => I("/apps/new"),
|
|
39
57
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
40
|
-
children: [/* @__PURE__ */
|
|
58
|
+
children: [/* @__PURE__ */ C(y, { size: 16 }), A("devportal.createApp", "Create App")]
|
|
41
59
|
}),
|
|
42
60
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ C(r, {
|
|
44
62
|
"data-tour": "devportal-dashboard-stats-overview",
|
|
45
|
-
children: /* @__PURE__ */
|
|
63
|
+
children: /* @__PURE__ */ w(a, {
|
|
46
64
|
columns: 4,
|
|
47
65
|
children: [
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
title:
|
|
50
|
-
value:
|
|
51
|
-
icon: /* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ C(i, {
|
|
67
|
+
title: A("devportal.totalApps", "Total Apps"),
|
|
68
|
+
value: L ? /* @__PURE__ */ C(v, { className: "h-5 w-5 animate-spin" }) : F.totalApps,
|
|
69
|
+
icon: /* @__PURE__ */ C(p, { size: 20 }),
|
|
52
70
|
trend: void 0
|
|
53
71
|
}),
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
title:
|
|
56
|
-
value:
|
|
57
|
-
icon: /* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ C(i, {
|
|
73
|
+
title: A("devportal.organizations", "Organizations"),
|
|
74
|
+
value: L ? /* @__PURE__ */ C(v, { className: "h-5 w-5 animate-spin" }) : F.totalOrgs,
|
|
75
|
+
icon: /* @__PURE__ */ C(h, { size: 20 })
|
|
58
76
|
}),
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
title:
|
|
61
|
-
value:
|
|
62
|
-
icon: /* @__PURE__ */
|
|
63
|
-
description:
|
|
77
|
+
/* @__PURE__ */ C(i, {
|
|
78
|
+
title: A("devportal.apiKeys", "API Keys"),
|
|
79
|
+
value: F.totalApiKeys,
|
|
80
|
+
icon: /* @__PURE__ */ C(_, { size: 20 }),
|
|
81
|
+
description: A("devportal.activeKeys", "Active keys")
|
|
64
82
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
title:
|
|
67
|
-
value:
|
|
68
|
-
icon: /* @__PURE__ */ S
|
|
69
|
-
description:
|
|
83
|
+
/* @__PURE__ */ C(i, {
|
|
84
|
+
title: A("devportal.webhooks", "Webhooks"),
|
|
85
|
+
value: F.totalWebhooks,
|
|
86
|
+
icon: /* @__PURE__ */ C(S, { size: 20 }),
|
|
87
|
+
description: A("devportal.configured", "Configured")
|
|
70
88
|
})
|
|
71
89
|
]
|
|
72
90
|
})
|
|
73
91
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
title:
|
|
92
|
+
/* @__PURE__ */ C(r, {
|
|
93
|
+
title: A("devportal.usageOverview", "Usage Overview"),
|
|
76
94
|
"data-tour": "devportal-dashboard-usage-overview",
|
|
77
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ w(a, {
|
|
78
96
|
columns: 4,
|
|
79
97
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
title:
|
|
82
|
-
value:
|
|
83
|
-
icon: /* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ C(i, {
|
|
99
|
+
title: A("devportal.apiCalls", "API Calls"),
|
|
100
|
+
value: L ? /* @__PURE__ */ C(v, { className: "h-5 w-5 animate-spin" }) : F.totalApiCalls > 1e6 ? `${(F.totalApiCalls / 1e6).toFixed(1)}M` : F.totalApiCalls > 1e3 ? `${(F.totalApiCalls / 1e3).toFixed(1)}K` : F.totalApiCalls.toString(),
|
|
101
|
+
icon: /* @__PURE__ */ C(f, { size: 20 }),
|
|
84
102
|
trend: void 0
|
|
85
103
|
}),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
title:
|
|
88
|
-
value:
|
|
89
|
-
icon: /* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ C(i, {
|
|
105
|
+
title: A("devportal.activeInstalls", "Active Installs"),
|
|
106
|
+
value: L ? /* @__PURE__ */ C(v, { className: "h-5 w-5 animate-spin" }) : F.activeInstalls > 1e3 ? `${(F.activeInstalls / 1e3).toFixed(1)}K` : F.activeInstalls.toString(),
|
|
107
|
+
icon: /* @__PURE__ */ C(x, { size: 20 }),
|
|
90
108
|
trend: void 0
|
|
91
109
|
}),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
title:
|
|
94
|
-
value:
|
|
95
|
-
icon: /* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ C(i, {
|
|
111
|
+
title: A("devportal.monthlyRevenue", "Monthly Revenue"),
|
|
112
|
+
value: L ? /* @__PURE__ */ C(v, { className: "h-5 w-5 animate-spin" }) : `$${F.monthlyRevenue.toLocaleString()}`,
|
|
113
|
+
icon: /* @__PURE__ */ C(g, { size: 20 }),
|
|
96
114
|
trend: void 0
|
|
97
115
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
title:
|
|
100
|
-
value: `${
|
|
101
|
-
icon: /* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ C(i, {
|
|
117
|
+
title: A("devportal.errorRate", "Error Rate"),
|
|
118
|
+
value: `${F.errorRate}%`,
|
|
119
|
+
icon: /* @__PURE__ */ C(b, { size: 20 }),
|
|
102
120
|
trend: void 0
|
|
103
121
|
})
|
|
104
122
|
]
|
|
105
123
|
})
|
|
106
124
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ w("div", {
|
|
108
126
|
className: "grid gap-6 lg:grid-cols-2",
|
|
109
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ C(r, {
|
|
110
128
|
"data-tour": "devportal-dashboard-recent-apps",
|
|
111
|
-
title:
|
|
112
|
-
actions: /* @__PURE__ */
|
|
113
|
-
onClick: () =>
|
|
129
|
+
title: A("devportal.recentApplications", "Recent Applications"),
|
|
130
|
+
actions: /* @__PURE__ */ w("button", {
|
|
131
|
+
onClick: () => I("/apps"),
|
|
114
132
|
className: "text-sm text-primary hover:underline flex items-center gap-1",
|
|
115
133
|
children: [
|
|
116
|
-
|
|
134
|
+
A("devportal.viewAll", "View all"),
|
|
117
135
|
" ",
|
|
118
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ C(m, { size: 14 })
|
|
119
137
|
]
|
|
120
138
|
}),
|
|
121
|
-
children:
|
|
139
|
+
children: L ? /* @__PURE__ */ C("div", {
|
|
122
140
|
className: "flex items-center justify-center py-8",
|
|
123
|
-
children: /* @__PURE__ */
|
|
124
|
-
}) :
|
|
141
|
+
children: /* @__PURE__ */ C(v, { className: "h-6 w-6 animate-spin text-muted-foreground" })
|
|
142
|
+
}) : P.length > 0 ? /* @__PURE__ */ C("div", {
|
|
125
143
|
className: "space-y-2",
|
|
126
|
-
children:
|
|
144
|
+
children: P.slice(0, 3).map((e) => /* @__PURE__ */ C(o, {
|
|
127
145
|
app: e,
|
|
128
|
-
onClick: () =>
|
|
146
|
+
onClick: () => I(`/apps/${e.id}`)
|
|
129
147
|
}, e.id))
|
|
130
|
-
}) : /* @__PURE__ */
|
|
131
|
-
icon: /* @__PURE__ */
|
|
132
|
-
title:
|
|
133
|
-
description:
|
|
134
|
-
action: /* @__PURE__ */
|
|
135
|
-
onClick: () =>
|
|
148
|
+
}) : /* @__PURE__ */ C(t, {
|
|
149
|
+
icon: /* @__PURE__ */ C(p, { size: 24 }),
|
|
150
|
+
title: A("devportal.noApplicationsYet", "No applications yet"),
|
|
151
|
+
description: A("devportal.createFirstApplicationToGetStarted", "Create your first application to get started"),
|
|
152
|
+
action: /* @__PURE__ */ w("button", {
|
|
153
|
+
onClick: () => I("/apps/new"),
|
|
136
154
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
137
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ C(y, { size: 16 }), A("devportal.createApp", "Create App")]
|
|
138
156
|
})
|
|
139
157
|
})
|
|
140
|
-
}), /* @__PURE__ */
|
|
141
|
-
title:
|
|
158
|
+
}), /* @__PURE__ */ C(r, {
|
|
159
|
+
title: A("devportal.quickActions", "Quick Actions"),
|
|
142
160
|
"data-tour": "devportal-dashboard-quick-actions",
|
|
143
|
-
children: /* @__PURE__ */
|
|
161
|
+
children: /* @__PURE__ */ w("div", {
|
|
144
162
|
className: "grid gap-3",
|
|
145
163
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
title:
|
|
148
|
-
description:
|
|
149
|
-
icon: /* @__PURE__ */
|
|
150
|
-
onClick: () =>
|
|
164
|
+
/* @__PURE__ */ C(E, {
|
|
165
|
+
title: A("devportal.createNewApp", "Create New App"),
|
|
166
|
+
description: A("devportal.startBuildingANewApplication", "Start building a new application"),
|
|
167
|
+
icon: /* @__PURE__ */ C(p, { size: 20 }),
|
|
168
|
+
onClick: () => I("/apps/new")
|
|
151
169
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
title:
|
|
154
|
-
description:
|
|
155
|
-
icon: /* @__PURE__ */
|
|
156
|
-
onClick: () =>
|
|
170
|
+
/* @__PURE__ */ C(E, {
|
|
171
|
+
title: A("devportal.createOrganization", "Create Organization"),
|
|
172
|
+
description: A("devportal.setUpATeamToCollaborate", "Set up a team to collaborate"),
|
|
173
|
+
icon: /* @__PURE__ */ C(h, { size: 20 }),
|
|
174
|
+
onClick: () => I("/organizations/new")
|
|
157
175
|
}),
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
title:
|
|
160
|
-
description:
|
|
161
|
-
icon: /* @__PURE__ */
|
|
162
|
-
onClick: () =>
|
|
176
|
+
/* @__PURE__ */ C(E, {
|
|
177
|
+
title: A("devportal.generateApiKey", "Generate API Key"),
|
|
178
|
+
description: A("devportal.createCredentialsForYourApps", "Create credentials for your apps"),
|
|
179
|
+
icon: /* @__PURE__ */ C(_, { size: 20 }),
|
|
180
|
+
onClick: () => I("/api-keys")
|
|
163
181
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
title:
|
|
166
|
-
description:
|
|
167
|
-
icon: /* @__PURE__ */ S
|
|
168
|
-
onClick: () =>
|
|
182
|
+
/* @__PURE__ */ C(E, {
|
|
183
|
+
title: A("devportal.configureWebhooks", "Configure Webhooks"),
|
|
184
|
+
description: A("devportal.setUpEventNotifications", "Set up event notifications"),
|
|
185
|
+
icon: /* @__PURE__ */ C(S, { size: 20 }),
|
|
186
|
+
onClick: () => I("/webhooks")
|
|
169
187
|
})
|
|
170
188
|
]
|
|
171
189
|
})
|
|
172
190
|
})]
|
|
173
191
|
}),
|
|
174
|
-
|
|
192
|
+
L ? /* @__PURE__ */ C(r, {
|
|
175
193
|
"data-tour": "devportal-dashboard-organizations",
|
|
176
|
-
title:
|
|
177
|
-
children: /* @__PURE__ */
|
|
194
|
+
title: A("devportal.yourOrganizations", "Your Organizations"),
|
|
195
|
+
children: /* @__PURE__ */ C("div", {
|
|
178
196
|
className: "flex items-center justify-center py-8",
|
|
179
|
-
children: /* @__PURE__ */
|
|
197
|
+
children: /* @__PURE__ */ C(v, { className: "h-6 w-6 animate-spin text-muted-foreground" })
|
|
180
198
|
})
|
|
181
|
-
}) :
|
|
182
|
-
title:
|
|
183
|
-
actions: /* @__PURE__ */
|
|
184
|
-
onClick: () =>
|
|
199
|
+
}) : N.length > 0 ? /* @__PURE__ */ C(r, {
|
|
200
|
+
title: A("devportal.yourOrganizations", "Your Organizations"),
|
|
201
|
+
actions: /* @__PURE__ */ w("button", {
|
|
202
|
+
onClick: () => I("/organizations"),
|
|
185
203
|
className: "text-sm text-primary hover:underline flex items-center gap-1",
|
|
186
204
|
children: [
|
|
187
|
-
|
|
205
|
+
A("devportal.viewAll", "View all"),
|
|
188
206
|
" ",
|
|
189
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ C(m, { size: 14 })
|
|
190
208
|
]
|
|
191
209
|
}),
|
|
192
|
-
children: /* @__PURE__ */
|
|
210
|
+
children: /* @__PURE__ */ C("div", {
|
|
193
211
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
194
|
-
children:
|
|
212
|
+
children: N.slice(0, 3).map((e) => /* @__PURE__ */ C(D, {
|
|
195
213
|
org: e,
|
|
196
|
-
onClick: () =>
|
|
214
|
+
onClick: () => I(`/organizations/${e.id}`)
|
|
197
215
|
}, e.id))
|
|
198
216
|
})
|
|
199
217
|
}) : null
|
|
200
218
|
]
|
|
201
219
|
})
|
|
202
220
|
});
|
|
203
|
-
},
|
|
221
|
+
}, E = ({ title: e, description: t, icon: n, onClick: r }) => /* @__PURE__ */ w("button", {
|
|
204
222
|
onClick: r,
|
|
205
223
|
className: "flex items-center gap-4 rounded-lg border bg-card p-4 text-left hover:bg-accent transition-colors",
|
|
206
|
-
children: [/* @__PURE__ */
|
|
224
|
+
children: [/* @__PURE__ */ C("div", {
|
|
207
225
|
className: "rounded-lg bg-primary/10 p-2 text-primary",
|
|
208
226
|
children: n
|
|
209
|
-
}), /* @__PURE__ */
|
|
227
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
210
228
|
className: "font-medium",
|
|
211
229
|
children: e
|
|
212
|
-
}), /* @__PURE__ */
|
|
230
|
+
}), /* @__PURE__ */ C("p", {
|
|
213
231
|
className: "text-sm text-muted-foreground",
|
|
214
232
|
children: t
|
|
215
233
|
})] })]
|
|
216
|
-
}),
|
|
217
|
-
let { t: n } =
|
|
234
|
+
}), D = ({ org: e, onClick: t }) => {
|
|
235
|
+
let { t: n } = d(), r = (e, t) => {
|
|
218
236
|
let r = n(e);
|
|
219
237
|
return r === e ? t : r;
|
|
220
238
|
};
|
|
221
|
-
return /* @__PURE__ */
|
|
239
|
+
return /* @__PURE__ */ w("button", {
|
|
222
240
|
onClick: t,
|
|
223
241
|
className: "rounded-lg border bg-card p-4 text-left hover:bg-accent transition-colors",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
242
|
+
children: [/* @__PURE__ */ w("div", {
|
|
225
243
|
className: "flex items-center gap-3",
|
|
226
|
-
children: [e.logoUrl ? /* @__PURE__ */
|
|
244
|
+
children: [e.logoUrl ? /* @__PURE__ */ C("img", {
|
|
227
245
|
src: e.logoUrl,
|
|
228
246
|
alt: e.name,
|
|
229
247
|
className: "h-10 w-10 rounded-lg object-cover"
|
|
230
|
-
}) : /* @__PURE__ */
|
|
248
|
+
}) : /* @__PURE__ */ C("div", {
|
|
231
249
|
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10 text-primary",
|
|
232
|
-
children: /* @__PURE__ */
|
|
233
|
-
}), /* @__PURE__ */
|
|
250
|
+
children: /* @__PURE__ */ C(h, { size: 20 })
|
|
251
|
+
}), /* @__PURE__ */ w("div", {
|
|
234
252
|
className: "flex-1 min-w-0",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ C("p", {
|
|
236
254
|
className: "font-medium truncate",
|
|
237
255
|
children: e.name
|
|
238
|
-
}), /* @__PURE__ */
|
|
256
|
+
}), /* @__PURE__ */ w("p", {
|
|
239
257
|
className: "text-sm text-muted-foreground",
|
|
240
258
|
children: [
|
|
241
259
|
e.publishedApps,
|
|
@@ -244,13 +262,13 @@ var w = () => {
|
|
|
244
262
|
]
|
|
245
263
|
})]
|
|
246
264
|
})]
|
|
247
|
-
}), /* @__PURE__ */
|
|
265
|
+
}), /* @__PURE__ */ w("div", {
|
|
248
266
|
className: "mt-3 flex gap-4 text-sm text-muted-foreground",
|
|
249
|
-
children: [/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ w("span", { children: [
|
|
250
268
|
(e.totalInstalls || 0).toLocaleString(),
|
|
251
269
|
" ",
|
|
252
270
|
r("devportal.installs", "installs")
|
|
253
|
-
] }), /* @__PURE__ */
|
|
271
|
+
] }), /* @__PURE__ */ w("span", { children: [
|
|
254
272
|
"$",
|
|
255
273
|
(e.totalRevenue || 0).toLocaleString(),
|
|
256
274
|
" ",
|
|
@@ -260,6 +278,6 @@ var w = () => {
|
|
|
260
278
|
});
|
|
261
279
|
};
|
|
262
280
|
//#endregion
|
|
263
|
-
export {
|
|
281
|
+
export { T as DashboardPage };
|
|
264
282
|
|
|
265
283
|
//# sourceMappingURL=DashboardPage.js.map
|