@burdenoff/microfe-subscriberbot 2026.706.2 → 2026.706.3
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/subscriberbot/SubscriberBotRoutes.js +14 -6
- package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
- package/dist/subscriberbot/components/index.js +7 -0
- package/dist/subscriberbot/components/viz.js +196 -0
- package/dist/subscriberbot/components/viz.js.map +1 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +38 -30
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/pages/AssetVaultPage.js +182 -0
- package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -0
- package/dist/subscriberbot/pages/DashboardPage.js +272 -199
- package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.js +517 -234
- package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.js +220 -0
- package/dist/subscriberbot/pages/InsightsPage.js.map +1 -0
- package/dist/subscriberbot/pages/InvoicesPage.js +325 -237
- package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
- package/dist/subscriberbot/pages/WorkflowsPage.js +301 -112
- package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js +311 -165
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.js +183 -93
- package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +426 -293
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js +217 -153
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js +215 -112
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +542 -428
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +242 -192
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +174 -133
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,15 +5,15 @@ import { Navigate as i, Route as a, Routes as o, useLocation as s } from "react-
|
|
|
5
5
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
6
|
import { Spinner as u } from "@burdenoff/fe-libs/ui";
|
|
7
7
|
//#region src/subscriberbot/SubscriberBotRoutes.tsx
|
|
8
|
-
var d = r(() => import("./pages/relationships/RelationshipsListPage.js").then((e) => ({ default: e.RelationshipsListPage }))), f = r(() => import("./pages/relationships/RelationshipNewPage.js").then((e) => ({ default: e.RelationshipNewPage }))), p = r(() => import("./pages/relationships/RelationshipDetailPage.js").then((e) => ({ default: e.RelationshipDetailPage }))), m = r(() => import("./pages/providers/ProvidersListPage.js").then((e) => ({ default: e.ProvidersListPage }))), h = r(() => import("./pages/providers/ProviderNewPage.js").then((e) => ({ default: e.ProviderNewPage }))), g = r(() => import("./pages/providers/ProviderDetailPage.js").then((e) => ({ default: e.ProviderDetailPage }))), _ = r(() => import("./pages/InboxPage.js").then((e) => ({ default: e.InboxPage }))), v = r(() => import("./pages/InvoicesPage.js").then((e) => ({ default: e.InvoicesPage }))), y = r(() => import("./pages/WorkflowsPage.js").then((e) => ({ default: e.WorkflowsPage }))), b = r(() => import("./pages/agents/AgentsListPage.js").then((e) => ({ default: e.AgentsListPage }))), x = r(() => import("./pages/agents/AgentNewPage.js").then((e) => ({ default: e.AgentNewPage }))), S = r(() => import("./pages/agents/AgentDetailPage.js").then((e) => ({ default: e.AgentDetailPage }))), C = () => /* @__PURE__ */ c("div", {
|
|
8
|
+
var d = r(() => import("./pages/relationships/RelationshipsListPage.js").then((e) => ({ default: e.RelationshipsListPage }))), f = r(() => import("./pages/relationships/RelationshipNewPage.js").then((e) => ({ default: e.RelationshipNewPage }))), p = r(() => import("./pages/relationships/RelationshipDetailPage.js").then((e) => ({ default: e.RelationshipDetailPage }))), m = r(() => import("./pages/providers/ProvidersListPage.js").then((e) => ({ default: e.ProvidersListPage }))), h = r(() => import("./pages/providers/ProviderNewPage.js").then((e) => ({ default: e.ProviderNewPage }))), g = r(() => import("./pages/providers/ProviderDetailPage.js").then((e) => ({ default: e.ProviderDetailPage }))), _ = r(() => import("./pages/InboxPage.js").then((e) => ({ default: e.InboxPage }))), v = r(() => import("./pages/InvoicesPage.js").then((e) => ({ default: e.InvoicesPage }))), y = r(() => import("./pages/WorkflowsPage.js").then((e) => ({ default: e.WorkflowsPage }))), b = r(() => import("./pages/agents/AgentsListPage.js").then((e) => ({ default: e.AgentsListPage }))), x = r(() => import("./pages/agents/AgentNewPage.js").then((e) => ({ default: e.AgentNewPage }))), S = r(() => import("./pages/agents/AgentDetailPage.js").then((e) => ({ default: e.AgentDetailPage }))), C = r(() => import("./pages/InsightsPage.js").then((e) => ({ default: e.InsightsPage }))), w = r(() => import("./pages/AssetVaultPage.js").then((e) => ({ default: e.AssetVaultPage }))), T = () => /* @__PURE__ */ c("div", {
|
|
9
9
|
className: "flex min-h-[400px] items-center justify-center",
|
|
10
10
|
children: /* @__PURE__ */ c(u, { size: "lg" })
|
|
11
|
-
}),
|
|
12
|
-
let { basePath: r, isStandalone: u } = e(),
|
|
13
|
-
return
|
|
11
|
+
}), E = () => {
|
|
12
|
+
let { basePath: r, isStandalone: u } = e(), E = s(), D = r === "/" ? "" : (r ?? "").replace(/\/$/, "");
|
|
13
|
+
return D && !u && !(E.pathname === D || E.pathname.startsWith(D + "/")) ? null : /* @__PURE__ */ c("div", {
|
|
14
14
|
className: "flex min-h-full flex-col",
|
|
15
15
|
children: /* @__PURE__ */ c(n, {
|
|
16
|
-
fallback: /* @__PURE__ */ c(
|
|
16
|
+
fallback: /* @__PURE__ */ c(T, {}),
|
|
17
17
|
children: /* @__PURE__ */ l(o, { children: [
|
|
18
18
|
/* @__PURE__ */ c(a, {
|
|
19
19
|
index: !0,
|
|
@@ -51,6 +51,14 @@ var d = r(() => import("./pages/relationships/RelationshipsListPage.js").then((e
|
|
|
51
51
|
path: "invoices",
|
|
52
52
|
element: /* @__PURE__ */ c(v, {})
|
|
53
53
|
}),
|
|
54
|
+
/* @__PURE__ */ c(a, {
|
|
55
|
+
path: "insights",
|
|
56
|
+
element: /* @__PURE__ */ c(C, {})
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ c(a, {
|
|
59
|
+
path: "vault",
|
|
60
|
+
element: /* @__PURE__ */ c(w, {})
|
|
61
|
+
}),
|
|
54
62
|
/* @__PURE__ */ c(a, {
|
|
55
63
|
path: "agents",
|
|
56
64
|
element: /* @__PURE__ */ c(b, {})
|
|
@@ -79,6 +87,6 @@ var d = r(() => import("./pages/relationships/RelationshipsListPage.js").then((e
|
|
|
79
87
|
});
|
|
80
88
|
};
|
|
81
89
|
//#endregion
|
|
82
|
-
export {
|
|
90
|
+
export { E as SubscriberBotRoutes };
|
|
83
91
|
|
|
84
92
|
//# sourceMappingURL=SubscriberBotRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriberBotRoutes.js","names":[],"sources":["../../src/subscriberbot/SubscriberBotRoutes.tsx"],"sourcesContent":["/**\n * SubscriberBot Routes\n * @module subscriberbot\n *\n * Domain routes for the Subscriber Bot product. The dashboard is eager-loaded\n * (primary landing); all other pages are lazy-loaded.\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { Spinner } from '@burdenoff/fe-libs/ui';\nimport { useSubscriberBot } from './context/SubscriberBotContext';\n\n// Eager — primary landing\nimport { DashboardPage } from './pages/DashboardPage';\n\n// Relationships\nconst RelationshipsListPage = lazy(() =>\n import('./pages/relationships/RelationshipsListPage').then((m) => ({\n default: m.RelationshipsListPage,\n }))\n);\nconst RelationshipNewPage = lazy(() =>\n import('./pages/relationships/RelationshipNewPage').then((m) => ({\n default: m.RelationshipNewPage,\n }))\n);\nconst RelationshipDetailPage = lazy(() =>\n import('./pages/relationships/RelationshipDetailPage').then((m) => ({\n default: m.RelationshipDetailPage,\n }))\n);\n\n// Providers\nconst ProvidersListPage = lazy(() =>\n import('./pages/providers/ProvidersListPage').then((m) => ({ default: m.ProvidersListPage }))\n);\nconst ProviderNewPage = lazy(() =>\n import('./pages/providers/ProviderNewPage').then((m) => ({ default: m.ProviderNewPage }))\n);\nconst ProviderDetailPage = lazy(() =>\n import('./pages/providers/ProviderDetailPage').then((m) => ({ default: m.ProviderDetailPage }))\n);\n\n// Inbox / Invoices / Workflows\nconst InboxPage = lazy(() => import('./pages/InboxPage').then((m) => ({ default: m.InboxPage })));\nconst InvoicesPage = lazy(() =>\n import('./pages/InvoicesPage').then((m) => ({ default: m.InvoicesPage }))\n);\nconst WorkflowsPage = lazy(() =>\n import('./pages/WorkflowsPage').then((m) => ({ default: m.WorkflowsPage }))\n);\n\n// Agents\nconst AgentsListPage = lazy(() =>\n import('./pages/agents/AgentsListPage').then((m) => ({ default: m.AgentsListPage }))\n);\nconst AgentNewPage = lazy(() =>\n import('./pages/agents/AgentNewPage').then((m) => ({ default: m.AgentNewPage }))\n);\nconst AgentDetailPage = lazy(() =>\n import('./pages/agents/AgentDetailPage').then((m) => ({ default: m.AgentDetailPage }))\n);\n\nconst PageLoader: FC = () => (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <Spinner size=\"lg\" />\n </div>\n);\n\nexport const SubscriberBotRoutes: FC = () => {\n const { basePath, isStandalone } = useSubscriberBot();\n const location = useLocation();\n\n // Normalize base path\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: only render if the current path matches basePath (integrated mode).\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex min-h-full flex-col\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Overview / dashboard */}\n <Route index element={<DashboardPage />} />\n\n {/* Relationships (the core domain) */}\n <Route path=\"relationships\" element={<RelationshipsListPage />} />\n <Route path=\"relationships/new\" element={<RelationshipNewPage />} />\n <Route path=\"relationships/:id\" element={<RelationshipDetailPage />} />\n\n {/* Providers (registry) */}\n <Route path=\"providers\" element={<ProvidersListPage />} />\n <Route path=\"providers/new\" element={<ProviderNewPage />} />\n <Route path=\"providers/:id\" element={<ProviderDetailPage />} />\n\n {/* Universal Inbox */}\n <Route path=\"inbox\" element={<InboxPage />} />\n\n {/* Invoices */}\n <Route path=\"invoices\" element={<InvoicesPage />} />\n\n {/* AI Agents */}\n <Route path=\"agents\" element={<AgentsListPage />} />\n <Route path=\"agents/new\" element={<AgentNewPage />} />\n <Route path=\"agents/:id\" element={<AgentDetailPage />} />\n\n {/* Workflows */}\n <Route path=\"workflows\" element={<WorkflowsPage />} />\n\n {/* Fallback */}\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAiBA,IAAM,IAAwB,QAC5B,OAAO,kDAA+C,MAAM,OAAO,EACjE,SAAS,EAAE,uBACZ,EAAE,CACJ,EACK,IAAsB,QAC1B,OAAO,gDAA6C,MAAM,OAAO,EAC/D,SAAS,EAAE,qBACZ,EAAE,CACJ,EACK,IAAyB,QAC7B,OAAO,mDAAgD,MAAM,OAAO,EAClE,SAAS,EAAE,wBACZ,EAAE,CACJ,EAGK,IAAoB,QACxB,OAAO,0CAAuC,MAAM,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAC9F,E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C,GAAD,EAAyB,CAAA;KAAI,CAAA;IAClE,kBAAC,GAAD;KAAO,MAAK;KAAoB,SAAS,kBAAC,GAAD,EAAuB,CAAA;KAAI,CAAA;IACpE,kBAAC,GAAD;KAAO,MAAK;KAAoB,SAAS,kBAAC,GAAD,EAA0B,CAAA;KAAI,CAAA;IAGvE,kBAAC,GAAD;KAAO,MAAK;KAAY,SAAS,kBAAC,GAAD,EAAqB,CAAA;KAAI,CAAA;IAC1D,kBAAC,GAAD;KAAO,MAAK;KAAgB,SAAS,kBAAC,GAAD,EAAmB,CAAA;KAAI,CAAA;IAC5D,kBAAC,GAAD;KAAO,MAAK;KAAgB,SAAS,kBAAC,GAAD,EAAsB,CAAA;KAAI,CAAA;IAG/D,kBAAC,GAAD;KAAO,MAAK;KAAQ,SAAS,kBAAC,GAAD,EAAa,CAAA;KAAI,CAAA;IAG9C,kBAAC,GAAD;KAAO,MAAK;KAAW,SAAS,kBAAC,GAAD,EAAgB,CAAA;KAAI,CAAA;IAGpD,kBAAC,GAAD;KAAO,MAAK;KAAS,SAAS,kBAAC,GAAD,EAAkB,CAAA;KAAI,CAAA;IACpD,kBAAC,GAAD;KAAO,MAAK;KAAa,SAAS,kBAAC,GAAD,EAAgB,CAAA;KAAI,CAAA;IACtD,kBAAC,GAAD;KAAO,MAAK;KAAa,SAAS,kBAAC,GAAD,EAAmB,CAAA;KAAI,CAAA;IAGzD,kBAAC,GAAD;KAAO,MAAK;KAAY,SAAS,kBAAC,GAAD,EAAiB,CAAA;KAAI,CAAA;IAGtD,kBAAC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAAC,GAAD;MAAU,IAAG;MAAG,SAAA;MAAU,CAAA;KAAI,CAAA;IAChD,EAAA,CAAA;GACA,CAAA;EACP,CAAA"}
|
|
1
|
+
{"version":3,"file":"SubscriberBotRoutes.js","names":[],"sources":["../../src/subscriberbot/SubscriberBotRoutes.tsx"],"sourcesContent":["/**\n * SubscriberBot Routes\n * @module subscriberbot\n *\n * Domain routes for the Subscriber Bot product. The dashboard is eager-loaded\n * (primary landing); all other pages are lazy-loaded.\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { Spinner } from '@burdenoff/fe-libs/ui';\nimport { useSubscriberBot } from './context/SubscriberBotContext';\n\n// Eager — primary landing\nimport { DashboardPage } from './pages/DashboardPage';\n\n// Relationships\nconst RelationshipsListPage = lazy(() =>\n import('./pages/relationships/RelationshipsListPage').then((m) => ({\n default: m.RelationshipsListPage,\n }))\n);\nconst RelationshipNewPage = lazy(() =>\n import('./pages/relationships/RelationshipNewPage').then((m) => ({\n default: m.RelationshipNewPage,\n }))\n);\nconst RelationshipDetailPage = lazy(() =>\n import('./pages/relationships/RelationshipDetailPage').then((m) => ({\n default: m.RelationshipDetailPage,\n }))\n);\n\n// Providers\nconst ProvidersListPage = lazy(() =>\n import('./pages/providers/ProvidersListPage').then((m) => ({ default: m.ProvidersListPage }))\n);\nconst ProviderNewPage = lazy(() =>\n import('./pages/providers/ProviderNewPage').then((m) => ({ default: m.ProviderNewPage }))\n);\nconst ProviderDetailPage = lazy(() =>\n import('./pages/providers/ProviderDetailPage').then((m) => ({ default: m.ProviderDetailPage }))\n);\n\n// Inbox / Invoices / Workflows\nconst InboxPage = lazy(() => import('./pages/InboxPage').then((m) => ({ default: m.InboxPage })));\nconst InvoicesPage = lazy(() =>\n import('./pages/InvoicesPage').then((m) => ({ default: m.InvoicesPage }))\n);\nconst WorkflowsPage = lazy(() =>\n import('./pages/WorkflowsPage').then((m) => ({ default: m.WorkflowsPage }))\n);\n\n// Agents\nconst AgentsListPage = lazy(() =>\n import('./pages/agents/AgentsListPage').then((m) => ({ default: m.AgentsListPage }))\n);\nconst AgentNewPage = lazy(() =>\n import('./pages/agents/AgentNewPage').then((m) => ({ default: m.AgentNewPage }))\n);\nconst AgentDetailPage = lazy(() =>\n import('./pages/agents/AgentDetailPage').then((m) => ({ default: m.AgentDetailPage }))\n);\n\n// Insights + Asset Vault (aggregated real data)\nconst InsightsPage = lazy(() => import('./pages/InsightsPage').then((m) => ({ default: m.InsightsPage })));\nconst AssetVaultPage = lazy(() =>\n import('./pages/AssetVaultPage').then((m) => ({ default: m.AssetVaultPage }))\n);\n\nconst PageLoader: FC = () => (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <Spinner size=\"lg\" />\n </div>\n);\n\nexport const SubscriberBotRoutes: FC = () => {\n const { basePath, isStandalone } = useSubscriberBot();\n const location = useLocation();\n\n // Normalize base path\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: only render if the current path matches basePath (integrated mode).\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex min-h-full flex-col\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Overview / dashboard */}\n <Route index element={<DashboardPage />} />\n\n {/* Relationships (the core domain) */}\n <Route path=\"relationships\" element={<RelationshipsListPage />} />\n <Route path=\"relationships/new\" element={<RelationshipNewPage />} />\n <Route path=\"relationships/:id\" element={<RelationshipDetailPage />} />\n\n {/* Providers (registry) */}\n <Route path=\"providers\" element={<ProvidersListPage />} />\n <Route path=\"providers/new\" element={<ProviderNewPage />} />\n <Route path=\"providers/:id\" element={<ProviderDetailPage />} />\n\n {/* Universal Inbox */}\n <Route path=\"inbox\" element={<InboxPage />} />\n\n {/* Invoices */}\n <Route path=\"invoices\" element={<InvoicesPage />} />\n\n {/* Insights (spend analytics + renewal forecast) */}\n <Route path=\"insights\" element={<InsightsPage />} />\n\n {/* Digital Asset Vault */}\n <Route path=\"vault\" element={<AssetVaultPage />} />\n\n {/* AI Agents */}\n <Route path=\"agents\" element={<AgentsListPage />} />\n <Route path=\"agents/new\" element={<AgentNewPage />} />\n <Route path=\"agents/:id\" element={<AgentDetailPage />} />\n\n {/* Workflows */}\n <Route path=\"workflows\" element={<WorkflowsPage />} />\n\n {/* Fallback */}\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAiBA,IAAM,IAAwB,QAC5B,OAAO,kDAA+C,MAAM,OAAO,EACjE,SAAS,EAAE,uBACZ,EAAE,CACJ,EACK,IAAsB,QAC1B,OAAO,gDAA6C,MAAM,OAAO,EAC/D,SAAS,EAAE,qBACZ,EAAE,CACJ,EACK,IAAyB,QAC7B,OAAO,mDAAgD,MAAM,OAAO,EAClE,SAAS,EAAE,wBACZ,EAAE,CACJ,EAGK,IAAoB,QACxB,OAAO,0CAAuC,MAAM,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAC9F,EACK,IAAkB,QACtB,OAAO,wCAAqC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAC1F,EACK,IAAqB,QACzB,OAAO,2CAAwC,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAChG,EAGK,IAAY,QAAW,OAAO,wBAAqB,MAAM,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,EAC3F,IAAe,QACnB,OAAO,2BAAwB,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAC1E,EACK,IAAgB,QACpB,OAAO,4BAAyB,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAC5E,EAGK,IAAiB,QACrB,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CACrF,EACK,IAAe,QACnB,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CACjF,EACK,IAAkB,QACtB,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CACvF,EAGK,IAAe,QAAW,OAAO,2BAAwB,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,EACp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S,kBAAC,GAAD,EAAgB,CAAA;KAAI,CAAA;IAGpD,kBAAC,GAAD;KAAO,MAAK;KAAW,SAAS,kBAAC,GAAD,EAAgB,CAAA;KAAI,CAAA;IAGpD,kBAAC,GAAD;KAAO,MAAK;KAAQ,SAAS,kBAAC,GAAD,EAAkB,CAAA;KAAI,CAAA;IAGnD,kBAAC,GAAD;KAAO,MAAK;KAAS,SAAS,kBAAC,GAAD,EAAkB,CAAA;KAAI,CAAA;IACpD,kBAAC,GAAD;KAAO,MAAK;KAAa,SAAS,kBAAC,GAAD,EAAgB,CAAA;KAAI,CAAA;IACtD,kBAAC,GAAD;KAAO,MAAK;KAAa,SAAS,kBAAC,GAAD,EAAmB,CAAA;KAAI,CAAA;IAGzD,kBAAC,GAAD;KAAO,MAAK;KAAY,SAAS,kBAAC,GAAD,EAAiB,CAAA;KAAI,CAAA;IAGtD,kBAAC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAAC,GAAD;MAAU,IAAG;MAAG,SAAA;MAAU,CAAA;KAAI,CAAA;IAChD,EAAA,CAAA;GACA,CAAA;EACP,CAAA"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/subscriberbot/components/viz.tsx
|
|
4
|
+
var r = [
|
|
5
|
+
"var(--color-chart-1)",
|
|
6
|
+
"var(--color-chart-2)",
|
|
7
|
+
"var(--color-chart-3)",
|
|
8
|
+
"var(--color-chart-4)",
|
|
9
|
+
"var(--color-chart-5)",
|
|
10
|
+
"var(--color-chart-6)",
|
|
11
|
+
"var(--color-chart-7)",
|
|
12
|
+
"var(--color-chart-8)"
|
|
13
|
+
], i = "var(--color-chart-negative)", a = "var(--color-chart-grid)", o = "var(--color-status-warning-text)", s = "var(--color-status-success-text)", c = (e, t) => t ?? r[e % r.length], l = ({ data: r, size: i = 160, thickness: o = 18, centerLabel: s, centerSub: l, className: u }) => {
|
|
14
|
+
let d = r.reduce((e, t) => e + Math.max(0, t.value), 0), f = (i - o) / 2, p = 2 * Math.PI * f, m = i / 2, h = 0, g = r.map((e) => `${e.label}: ${e.value}`).join(", ");
|
|
15
|
+
return /* @__PURE__ */ n("div", {
|
|
16
|
+
className: e("relative inline-flex items-center justify-center", u),
|
|
17
|
+
children: [/* @__PURE__ */ n("svg", {
|
|
18
|
+
width: i,
|
|
19
|
+
height: i,
|
|
20
|
+
viewBox: `0 0 ${i} ${i}`,
|
|
21
|
+
role: "img",
|
|
22
|
+
"aria-label": `Donut chart. ${g}`,
|
|
23
|
+
className: "max-w-full",
|
|
24
|
+
children: [/* @__PURE__ */ t("circle", {
|
|
25
|
+
cx: m,
|
|
26
|
+
cy: m,
|
|
27
|
+
r: f,
|
|
28
|
+
fill: "none",
|
|
29
|
+
stroke: a,
|
|
30
|
+
strokeWidth: o,
|
|
31
|
+
opacity: .4
|
|
32
|
+
}), d > 0 && r.map((e, n) => {
|
|
33
|
+
let r = Math.max(0, e.value) / d * p, i = /* @__PURE__ */ t("circle", {
|
|
34
|
+
cx: m,
|
|
35
|
+
cy: m,
|
|
36
|
+
r: f,
|
|
37
|
+
fill: "none",
|
|
38
|
+
stroke: c(n, e.color),
|
|
39
|
+
strokeWidth: o,
|
|
40
|
+
strokeDasharray: `${r} ${p - r}`,
|
|
41
|
+
strokeDashoffset: -h,
|
|
42
|
+
strokeLinecap: "butt",
|
|
43
|
+
transform: `rotate(-90 ${m} ${m})`
|
|
44
|
+
}, n);
|
|
45
|
+
return h += r, i;
|
|
46
|
+
})]
|
|
47
|
+
}), (s || l) && /* @__PURE__ */ n("div", {
|
|
48
|
+
className: "absolute inset-0 flex flex-col items-center justify-center text-center",
|
|
49
|
+
children: [s && /* @__PURE__ */ t("span", {
|
|
50
|
+
className: "text-xl font-bold text-text-primary tabular-nums leading-none",
|
|
51
|
+
children: s
|
|
52
|
+
}), l && /* @__PURE__ */ t("span", {
|
|
53
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
54
|
+
children: l
|
|
55
|
+
})]
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
58
|
+
}, u = ({ data: r, valueFormat: i, className: a }) => /* @__PURE__ */ t("ul", {
|
|
59
|
+
className: e("space-y-2", a),
|
|
60
|
+
children: r.map((e, r) => /* @__PURE__ */ n("li", {
|
|
61
|
+
className: "flex items-center gap-2 text-sm",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ t("span", {
|
|
64
|
+
className: "h-2.5 w-2.5 shrink-0 rounded-full",
|
|
65
|
+
style: { backgroundColor: c(r, e.color) },
|
|
66
|
+
"aria-hidden": !0
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ t("span", {
|
|
69
|
+
className: "flex-1 truncate text-text-secondary",
|
|
70
|
+
children: e.label
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ t("span", {
|
|
73
|
+
className: "font-medium text-text-primary tabular-nums",
|
|
74
|
+
children: i ? i(e.value) : e.value
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
}, r))
|
|
78
|
+
}), d = ({ data: r, valueFormat: i, className: o }) => {
|
|
79
|
+
let s = Math.max(1, ...r.map((e) => e.value));
|
|
80
|
+
return /* @__PURE__ */ t("ul", {
|
|
81
|
+
className: e("space-y-3", o),
|
|
82
|
+
role: "img",
|
|
83
|
+
"aria-label": "Bar chart",
|
|
84
|
+
children: r.map((e, r) => /* @__PURE__ */ n("li", { children: [/* @__PURE__ */ n("div", {
|
|
85
|
+
className: "flex items-center justify-between text-sm",
|
|
86
|
+
children: [/* @__PURE__ */ t("span", {
|
|
87
|
+
className: "truncate text-text-secondary",
|
|
88
|
+
children: e.label
|
|
89
|
+
}), /* @__PURE__ */ t("span", {
|
|
90
|
+
className: "font-medium text-text-primary tabular-nums",
|
|
91
|
+
children: i ? i(e.value) : e.value
|
|
92
|
+
})]
|
|
93
|
+
}), /* @__PURE__ */ t("div", {
|
|
94
|
+
className: "mt-1.5 h-2 w-full overflow-hidden rounded-full",
|
|
95
|
+
style: { backgroundColor: a },
|
|
96
|
+
children: /* @__PURE__ */ t("div", {
|
|
97
|
+
className: "h-full rounded-full transition-all",
|
|
98
|
+
style: {
|
|
99
|
+
width: `${e.value / s * 100}%`,
|
|
100
|
+
backgroundColor: c(r, e.color)
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
})] }, r))
|
|
104
|
+
});
|
|
105
|
+
}, f = ({ value: r, max: c = 100, size: l = 120, label: u, className: d }) => {
|
|
106
|
+
let f = Math.max(0, Math.min(1, r / c)), p = l / 2 - 10, m = l / 2, h = Math.PI * p, g = f >= .66 ? s : f >= .33 ? o : i;
|
|
107
|
+
return /* @__PURE__ */ n("div", {
|
|
108
|
+
className: e("inline-flex flex-col items-center", d),
|
|
109
|
+
children: [/* @__PURE__ */ n("svg", {
|
|
110
|
+
width: l,
|
|
111
|
+
height: l / 2 + 8,
|
|
112
|
+
viewBox: `0 0 ${l} ${l / 2 + 8}`,
|
|
113
|
+
role: "img",
|
|
114
|
+
"aria-label": `Gauge: ${Math.round(f * 100)} percent`,
|
|
115
|
+
className: "max-w-full",
|
|
116
|
+
children: [/* @__PURE__ */ t("path", {
|
|
117
|
+
d: `M10 ${m} A ${p} ${p} 0 0 1 ${l - 10} ${m}`,
|
|
118
|
+
fill: "none",
|
|
119
|
+
stroke: a,
|
|
120
|
+
strokeWidth: 10,
|
|
121
|
+
strokeLinecap: "round"
|
|
122
|
+
}), /* @__PURE__ */ t("path", {
|
|
123
|
+
d: `M10 ${m} A ${p} ${p} 0 0 1 ${l - 10} ${m}`,
|
|
124
|
+
fill: "none",
|
|
125
|
+
stroke: g,
|
|
126
|
+
strokeWidth: 10,
|
|
127
|
+
strokeLinecap: "round",
|
|
128
|
+
strokeDasharray: `${f * h} ${h}`
|
|
129
|
+
})]
|
|
130
|
+
}), /* @__PURE__ */ n("div", {
|
|
131
|
+
className: "-mt-4 text-center",
|
|
132
|
+
children: [/* @__PURE__ */ t("span", {
|
|
133
|
+
className: "text-lg font-bold text-text-primary tabular-nums",
|
|
134
|
+
children: Math.round(r)
|
|
135
|
+
}), u && /* @__PURE__ */ t("p", {
|
|
136
|
+
className: "text-xs text-text-secondary",
|
|
137
|
+
children: u
|
|
138
|
+
})]
|
|
139
|
+
})]
|
|
140
|
+
});
|
|
141
|
+
}, p = {
|
|
142
|
+
default: "var(--color-accent-indigo)",
|
|
143
|
+
positive: s,
|
|
144
|
+
warning: o,
|
|
145
|
+
muted: "var(--color-text-secondary)"
|
|
146
|
+
}, m = ({ items: r, className: i }) => /* @__PURE__ */ n("ol", {
|
|
147
|
+
className: e("relative space-y-5 pl-6", i),
|
|
148
|
+
children: [/* @__PURE__ */ t("span", {
|
|
149
|
+
className: "absolute left-[7px] top-1 bottom-1 w-px bg-border-subtle",
|
|
150
|
+
"aria-hidden": !0
|
|
151
|
+
}), r.map((e, r) => /* @__PURE__ */ n("li", {
|
|
152
|
+
className: "relative",
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ t("span", {
|
|
155
|
+
className: "absolute -left-[22px] top-1 h-3 w-3 rounded-full ring-4 ring-bg-surface",
|
|
156
|
+
style: { backgroundColor: p[e.tone ?? "default"] },
|
|
157
|
+
"aria-hidden": !0
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ n("div", {
|
|
160
|
+
className: "flex items-baseline justify-between gap-2",
|
|
161
|
+
children: [/* @__PURE__ */ t("p", {
|
|
162
|
+
className: "text-sm font-medium text-text-primary",
|
|
163
|
+
children: e.title
|
|
164
|
+
}), e.meta && /* @__PURE__ */ t("span", {
|
|
165
|
+
className: "text-sm tabular-nums text-text-primary",
|
|
166
|
+
children: e.meta
|
|
167
|
+
})]
|
|
168
|
+
}),
|
|
169
|
+
e.sub && /* @__PURE__ */ t("p", {
|
|
170
|
+
className: "text-xs text-text-secondary",
|
|
171
|
+
children: e.sub
|
|
172
|
+
})
|
|
173
|
+
]
|
|
174
|
+
}, r))]
|
|
175
|
+
}), h = ({ value: n, max: r = 100, tone: c = "accent", className: l }) => {
|
|
176
|
+
let u = Math.max(0, Math.min(1, r ? n / r : 0)), d = c === "positive" ? s : c === "warning" ? o : c === "negative" ? i : "var(--color-accent-indigo)";
|
|
177
|
+
return /* @__PURE__ */ t("div", {
|
|
178
|
+
className: e("h-2 w-full overflow-hidden rounded-full", l),
|
|
179
|
+
style: { backgroundColor: a },
|
|
180
|
+
role: "progressbar",
|
|
181
|
+
"aria-valuenow": Math.round(u * 100),
|
|
182
|
+
"aria-valuemin": 0,
|
|
183
|
+
"aria-valuemax": 100,
|
|
184
|
+
children: /* @__PURE__ */ t("div", {
|
|
185
|
+
className: "h-full rounded-full transition-all",
|
|
186
|
+
style: {
|
|
187
|
+
width: `${u * 100}%`,
|
|
188
|
+
backgroundColor: d
|
|
189
|
+
}
|
|
190
|
+
})
|
|
191
|
+
});
|
|
192
|
+
};
|
|
193
|
+
//#endregion
|
|
194
|
+
export { d as BarList, r as CHART_COLORS, l as Donut, f as Gauge, u as Legend, h as MiniProgress, m as Timeline };
|
|
195
|
+
|
|
196
|
+
//# sourceMappingURL=viz.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viz.js","names":[],"sources":["../../../src/subscriberbot/components/viz.tsx"],"sourcesContent":["/**\n * Tokenized, responsive SVG visualization primitives.\n * @module subscriberbot/components/viz\n *\n * Every color is a fe-libs semantic CSS variable (never a raw hex), so charts\n * theme automatically in light/dark and per-product themes. All charts scale to\n * their container (SVG viewBox) and carry an accessible role/label.\n */\nimport type { FC, ReactNode } from 'react';\nimport { cn } from '../utils/cn';\n\n/** Categorical palette — fe-libs chart tokens. */\nexport const CHART_COLORS = [\n 'var(--color-chart-1)',\n 'var(--color-chart-2)',\n 'var(--color-chart-3)',\n 'var(--color-chart-4)',\n 'var(--color-chart-5)',\n 'var(--color-chart-6)',\n 'var(--color-chart-7)',\n 'var(--color-chart-8)',\n] as const;\n\nconst POSITIVE = 'var(--color-chart-positive)';\nconst NEGATIVE = 'var(--color-chart-negative)';\nconst GRID = 'var(--color-chart-grid)';\nconst WARN = 'var(--color-status-warning-text)';\nconst SUCCESS = 'var(--color-status-success-text)';\n\nexport interface Segment {\n label: string;\n value: number;\n color?: string;\n}\n\nconst colorAt = (i: number, override?: string) => override ?? CHART_COLORS[i % CHART_COLORS.length];\n\n// ---------------------------------------------------------------------------\n// Donut — proportional ring with an optional center label.\n// ---------------------------------------------------------------------------\nexport const Donut: FC<{\n data: Segment[];\n size?: number;\n thickness?: number;\n centerLabel?: string;\n centerSub?: string;\n className?: string;\n}> = ({ data, size = 160, thickness = 18, centerLabel, centerSub, className }) => {\n const total = data.reduce((s, d) => s + Math.max(0, d.value), 0);\n const r = (size - thickness) / 2;\n const c = 2 * Math.PI * r;\n const cx = size / 2;\n let offset = 0;\n const label = data.map((d) => `${d.label}: ${d.value}`).join(', ');\n\n return (\n <div className={cn('relative inline-flex items-center justify-center', className)}>\n <svg\n width={size}\n height={size}\n viewBox={`0 0 ${size} ${size}`}\n role=\"img\"\n aria-label={`Donut chart. ${label}`}\n className=\"max-w-full\"\n >\n <circle cx={cx} cy={cx} r={r} fill=\"none\" stroke={GRID} strokeWidth={thickness} opacity={0.4} />\n {total > 0 &&\n data.map((d, i) => {\n const frac = Math.max(0, d.value) / total;\n const len = frac * c;\n const seg = (\n <circle\n key={i}\n cx={cx}\n cy={cx}\n r={r}\n fill=\"none\"\n stroke={colorAt(i, d.color)}\n strokeWidth={thickness}\n strokeDasharray={`${len} ${c - len}`}\n strokeDashoffset={-offset}\n strokeLinecap=\"butt\"\n transform={`rotate(-90 ${cx} ${cx})`}\n />\n );\n offset += len;\n return seg;\n })}\n </svg>\n {(centerLabel || centerSub) && (\n <div className=\"absolute inset-0 flex flex-col items-center justify-center text-center\">\n {centerLabel && (\n <span className=\"text-xl font-bold text-text-primary tabular-nums leading-none\">{centerLabel}</span>\n )}\n {centerSub && <span className=\"mt-1 text-xs text-text-secondary\">{centerSub}</span>}\n </div>\n )}\n </div>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Legend — pairs with Donut / charts.\n// ---------------------------------------------------------------------------\nexport const Legend: FC<{ data: Segment[]; valueFormat?: (n: number) => string; className?: string }> = ({\n data,\n valueFormat,\n className,\n}) => (\n <ul className={cn('space-y-2', className)}>\n {data.map((d, i) => (\n <li key={i} className=\"flex items-center gap-2 text-sm\">\n <span\n className=\"h-2.5 w-2.5 shrink-0 rounded-full\"\n style={{ backgroundColor: colorAt(i, d.color) }}\n aria-hidden\n />\n <span className=\"flex-1 truncate text-text-secondary\">{d.label}</span>\n <span className=\"font-medium text-text-primary tabular-nums\">\n {valueFormat ? valueFormat(d.value) : d.value}\n </span>\n </li>\n ))}\n </ul>\n);\n\n// ---------------------------------------------------------------------------\n// BarList — horizontal labelled bars (e.g. spend by category).\n// ---------------------------------------------------------------------------\nexport const BarList: FC<{\n data: Segment[];\n valueFormat?: (n: number) => string;\n className?: string;\n}> = ({ data, valueFormat, className }) => {\n const max = Math.max(1, ...data.map((d) => d.value));\n return (\n <ul className={cn('space-y-3', className)} role=\"img\" aria-label=\"Bar chart\">\n {data.map((d, i) => (\n <li key={i}>\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"truncate text-text-secondary\">{d.label}</span>\n <span className=\"font-medium text-text-primary tabular-nums\">\n {valueFormat ? valueFormat(d.value) : d.value}\n </span>\n </div>\n <div className=\"mt-1.5 h-2 w-full overflow-hidden rounded-full\" style={{ backgroundColor: GRID }}>\n <div\n className=\"h-full rounded-full transition-all\"\n style={{ width: `${(d.value / max) * 100}%`, backgroundColor: colorAt(i, d.color) }}\n />\n </div>\n </li>\n ))}\n </ul>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Sparkline / area — small trend line.\n// ---------------------------------------------------------------------------\nexport const Sparkline: FC<{\n points: number[];\n width?: number;\n height?: number;\n positive?: boolean;\n className?: string;\n}> = ({ points, width = 220, height = 56, positive = true, className }) => {\n if (points.length < 2) return null;\n const max = Math.max(...points);\n const min = Math.min(...points);\n const span = max - min || 1;\n const stroke = positive ? POSITIVE : NEGATIVE;\n const step = width / (points.length - 1);\n const coords = points.map((p, i) => [i * step, height - ((p - min) / span) * (height - 8) - 4]);\n const line = coords.map(([x, y], i) => `${i === 0 ? 'M' : 'L'}${x.toFixed(1)},${y.toFixed(1)}`).join(' ');\n const area = `${line} L${width},${height} L0,${height} Z`;\n return (\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n role=\"img\"\n aria-label=\"Trend sparkline\"\n className={cn('max-w-full', className)}\n preserveAspectRatio=\"none\"\n >\n <path d={area} fill={stroke} opacity={0.12} />\n <path d={line} fill=\"none\" stroke={stroke} strokeWidth={2} strokeLinejoin=\"round\" strokeLinecap=\"round\" />\n </svg>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Gauge — 0..max semicircle (e.g. health score).\n// ---------------------------------------------------------------------------\nexport const Gauge: FC<{\n value: number;\n max?: number;\n size?: number;\n label?: string;\n className?: string;\n}> = ({ value, max = 100, size = 120, label, className }) => {\n const pct = Math.max(0, Math.min(1, value / max));\n const r = size / 2 - 10;\n const cy = size / 2;\n const circ = Math.PI * r; // half circle\n const tone = pct >= 0.66 ? SUCCESS : pct >= 0.33 ? WARN : NEGATIVE;\n return (\n <div className={cn('inline-flex flex-col items-center', className)}>\n <svg\n width={size}\n height={size / 2 + 8}\n viewBox={`0 0 ${size} ${size / 2 + 8}`}\n role=\"img\"\n aria-label={`Gauge: ${Math.round(pct * 100)} percent`}\n className=\"max-w-full\"\n >\n <path\n d={`M10 ${cy} A ${r} ${r} 0 0 1 ${size - 10} ${cy}`}\n fill=\"none\"\n stroke={GRID}\n strokeWidth={10}\n strokeLinecap=\"round\"\n />\n <path\n d={`M10 ${cy} A ${r} ${r} 0 0 1 ${size - 10} ${cy}`}\n fill=\"none\"\n stroke={tone}\n strokeWidth={10}\n strokeLinecap=\"round\"\n strokeDasharray={`${pct * circ} ${circ}`}\n />\n </svg>\n <div className=\"-mt-4 text-center\">\n <span className=\"text-lg font-bold text-text-primary tabular-nums\">{Math.round(value)}</span>\n {label && <p className=\"text-xs text-text-secondary\">{label}</p>}\n </div>\n </div>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Timeline — vertical events with a connector rail (e.g. renewals).\n// ---------------------------------------------------------------------------\nexport interface TimelineItem {\n title: string;\n sub?: string;\n meta?: ReactNode;\n tone?: 'default' | 'positive' | 'warning' | 'muted';\n}\nconst dotTone: Record<NonNullable<TimelineItem['tone']>, string> = {\n default: 'var(--color-accent-indigo)',\n positive: SUCCESS,\n warning: WARN,\n muted: 'var(--color-text-secondary)',\n};\nexport const Timeline: FC<{ items: TimelineItem[]; className?: string }> = ({ items, className }) => (\n <ol className={cn('relative space-y-5 pl-6', className)}>\n <span className=\"absolute left-[7px] top-1 bottom-1 w-px bg-border-subtle\" aria-hidden />\n {items.map((it, i) => (\n <li key={i} className=\"relative\">\n <span\n className=\"absolute -left-[22px] top-1 h-3 w-3 rounded-full ring-4 ring-bg-surface\"\n style={{ backgroundColor: dotTone[it.tone ?? 'default'] }}\n aria-hidden\n />\n <div className=\"flex items-baseline justify-between gap-2\">\n <p className=\"text-sm font-medium text-text-primary\">{it.title}</p>\n {it.meta && <span className=\"text-sm tabular-nums text-text-primary\">{it.meta}</span>}\n </div>\n {it.sub && <p className=\"text-xs text-text-secondary\">{it.sub}</p>}\n </li>\n ))}\n </ol>\n);\n\n// ---------------------------------------------------------------------------\n// MiniProgress — inline utilization bar (e.g. seats used).\n// ---------------------------------------------------------------------------\nexport const MiniProgress: FC<{\n value: number;\n max?: number;\n tone?: 'accent' | 'positive' | 'warning' | 'negative';\n className?: string;\n}> = ({ value, max = 100, tone = 'accent', className }) => {\n const pct = Math.max(0, Math.min(1, max ? value / max : 0));\n const color =\n tone === 'positive' ? SUCCESS : tone === 'warning' ? WARN : tone === 'negative' ? NEGATIVE : 'var(--color-accent-indigo)';\n return (\n <div\n className={cn('h-2 w-full overflow-hidden rounded-full', className)}\n style={{ backgroundColor: GRID }}\n role=\"progressbar\"\n aria-valuenow={Math.round(pct * 100)}\n aria-valuemin={0}\n aria-valuemax={100}\n >\n <div className=\"h-full rounded-full transition-all\" style={{ width: `${pct * 100}%`, backgroundColor: color }} />\n </div>\n );\n};\n"],"mappings":";;;AAYA,IAAa,IAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EAGK,IAAW,+BACX,IAAO,2BACP,IAAO,oCACP,IAAU,oCAQV,KAAW,GAAW,MAAsB,KAAY,EAAa,IAAI,EAAa,SAK/E,KAOP,EAAE,SAAM,UAAO,KAAK,eAAY,IAAI,gBAAa,cAAW,mBAAgB;CAChF,IAAM,IAAQ,EAAK,QAAQ,GAAG,MAAM,IAAI,KAAK,IAAI,GAAG,EAAE,MAAM,EAAE,EAAE,EAC1D,KAAK,IAAO,KAAa,GACzB,IAAI,IAAI,KAAK,KAAK,GAClB,IAAK,IAAO,GACd,IAAS,GACP,IAAQ,EAAK,KAAK,MAAM,GAAG,EAAE,MAAM,IAAI,EAAE,QAAQ,CAAC,KAAK,KAAK;AAElE,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,oDAAoD,EAAU;YAAjF,CACE,kBAAC,OAAD;GACE,OAAO;GACP,QAAQ;GACR,SAAS,OAAO,EAAK,GAAG;GACxB,MAAK;GACL,cAAY,gBAAgB;GAC5B,WAAU;aANZ,CAQE,kBAAC,UAAD;IAAY;IAAI,IAAI;IAAO;IAAG,MAAK;IAAO,QAAQ;IAAM,aAAa;IAAW,SAAS;IAAO,CAAA,EAC/F,IAAQ,KACP,EAAK,KAAK,GAAG,MAAM;IAEjB,IAAM,IADO,KAAK,IAAI,GAAG,EAAE,MAAM,GAAG,IACjB,GACb,IACJ,kBAAC,UAAD;KAEM;KACJ,IAAI;KACD;KACH,MAAK;KACL,QAAQ,EAAQ,GAAG,EAAE,MAAM;KAC3B,aAAa;KACb,iBAAiB,GAAG,EAAI,GAAG,IAAI;KAC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|
+
queryKey: [...l.assets, "all"],
|
|
180
|
+
queryFn: async () => (await c(`query SubAllAssets {
|
|
181
|
+
subListAssets { ${v} }
|
|
182
|
+
}`, {}, t)).subListAssets
|
|
183
|
+
});
|
|
184
|
+
}, j = () => {
|
|
177
185
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
178
186
|
return r({
|
|
179
187
|
mutationFn: async (e) => (await c(`mutation SubCreateAsset($input: SubCreateAssetInput!) {
|
|
@@ -183,13 +191,13 @@ var c = async (e, t, n) => {
|
|
|
183
191
|
t.invalidateQueries({ queryKey: l.assets }), t.invalidateQueries({ queryKey: l.relationship(e.relationshipId) });
|
|
184
192
|
}
|
|
185
193
|
});
|
|
186
|
-
},
|
|
194
|
+
}, M = "/SubscriberBot/Assets", N = () => {
|
|
187
195
|
let { apiGatewayUrl: r } = e(), [i, a] = n(0), [o, s] = n(!1);
|
|
188
196
|
return {
|
|
189
197
|
uploadFile: t(async (e) => {
|
|
190
198
|
s(!0), a(0);
|
|
191
199
|
try {
|
|
192
|
-
let t = (await c("mutation SubEnsureFolder($path: String!) {\n ensureFolderByPath(path: $path) { id }\n }", { path:
|
|
200
|
+
let t = (await c("mutation SubEnsureFolder($path: String!) {\n ensureFolderByPath(path: $path) { id }\n }", { path: M }, r)).ensureFolderByPath?.id;
|
|
193
201
|
if (!t) throw Error("Could not resolve the upload folder.");
|
|
194
202
|
let n = e.type || "application/octet-stream", i = e.name.lastIndexOf("."), o = i > -1 ? e.name.slice(i + 1) : "bin", s = await c("mutation SubInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) {\n uploadUrl\n session { id }\n }\n }", { input: {
|
|
195
203
|
fileName: e.name,
|
|
@@ -224,13 +232,13 @@ var c = async (e, t, n) => {
|
|
|
224
232
|
progress: i,
|
|
225
233
|
isUploading: o
|
|
226
234
|
};
|
|
227
|
-
},
|
|
235
|
+
}, P = () => {
|
|
228
236
|
let { apiGatewayUrl: n } = e();
|
|
229
237
|
return t(async (e) => (await c("query SubFileDownloadUrl($id: ID!, $expiresIn: Int) {\n getFileDownloadUrl(id: $id, expiresIn: $expiresIn)\n }", {
|
|
230
238
|
id: e,
|
|
231
239
|
expiresIn: 21600
|
|
232
240
|
}, n)).getFileDownloadUrl, [n]);
|
|
233
|
-
},
|
|
241
|
+
}, F = (t = {}) => {
|
|
234
242
|
let { apiGatewayUrl: n } = e();
|
|
235
243
|
return i({
|
|
236
244
|
queryKey: [...l.providers, t],
|
|
@@ -259,7 +267,7 @@ var c = async (e, t, n) => {
|
|
|
259
267
|
}
|
|
260
268
|
}, n)).subListProviders
|
|
261
269
|
});
|
|
262
|
-
},
|
|
270
|
+
}, I = (t) => {
|
|
263
271
|
let { apiGatewayUrl: n } = e();
|
|
264
272
|
return i({
|
|
265
273
|
queryKey: l.provider(t ?? ""),
|
|
@@ -271,7 +279,7 @@ var c = async (e, t, n) => {
|
|
|
271
279
|
}
|
|
272
280
|
}`, { id: t }, n)).subProvider
|
|
273
281
|
});
|
|
274
|
-
},
|
|
282
|
+
}, L = () => {
|
|
275
283
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
276
284
|
return r({
|
|
277
285
|
mutationFn: async (e) => (await c(`mutation SubCreateProvider($input: SubCreateProviderInput!) {
|
|
@@ -281,7 +289,7 @@ var c = async (e, t, n) => {
|
|
|
281
289
|
t.invalidateQueries({ queryKey: l.providers });
|
|
282
290
|
}
|
|
283
291
|
});
|
|
284
|
-
},
|
|
292
|
+
}, R = () => {
|
|
285
293
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
286
294
|
return r({
|
|
287
295
|
mutationFn: async ({ id: e, input: t }) => (await c(`mutation SubUpdateProvider($id: ID!, $input: SubUpdateProviderInput!) {
|
|
@@ -294,7 +302,7 @@ var c = async (e, t, n) => {
|
|
|
294
302
|
t.invalidateQueries({ queryKey: l.providers }), t.invalidateQueries({ queryKey: l.provider(e.id) });
|
|
295
303
|
}
|
|
296
304
|
});
|
|
297
|
-
},
|
|
305
|
+
}, z = () => {
|
|
298
306
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
299
307
|
return r({
|
|
300
308
|
mutationFn: async (e) => (await c("mutation SubArchiveProvider($id: ID!) {\n subArchiveProvider(id: $id)\n }", { id: e }, n)).subArchiveProvider,
|
|
@@ -311,7 +319,7 @@ var c = async (e, t, n) => {
|
|
|
311
319
|
subListPlans(providerId: $providerId) { ${d} }
|
|
312
320
|
}`, { providerId: t }, n)).subListPlans
|
|
313
321
|
});
|
|
314
|
-
},
|
|
322
|
+
}, B = () => {
|
|
315
323
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
316
324
|
return r({
|
|
317
325
|
mutationFn: async (e) => (await c(`mutation SubCreatePlan($input: SubCreatePlanInput!) {
|
|
@@ -321,7 +329,7 @@ var c = async (e, t, n) => {
|
|
|
321
329
|
t.invalidateQueries({ queryKey: l.plans }), t.invalidateQueries({ queryKey: l.provider(e.providerId) });
|
|
322
330
|
}
|
|
323
331
|
});
|
|
324
|
-
},
|
|
332
|
+
}, V = (t = {}) => {
|
|
325
333
|
let { apiGatewayUrl: n } = e();
|
|
326
334
|
return i({
|
|
327
335
|
queryKey: [...l.inbox, t],
|
|
@@ -353,7 +361,7 @@ var c = async (e, t, n) => {
|
|
|
353
361
|
}
|
|
354
362
|
}, n)).subListInboxMessages
|
|
355
363
|
});
|
|
356
|
-
},
|
|
364
|
+
}, H = () => {
|
|
357
365
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
358
366
|
return r({
|
|
359
367
|
mutationFn: async (e) => (await c(`mutation SubMarkMessageRead($id: ID!) {
|
|
@@ -363,7 +371,7 @@ var c = async (e, t, n) => {
|
|
|
363
371
|
t.invalidateQueries({ queryKey: l.inbox });
|
|
364
372
|
}
|
|
365
373
|
});
|
|
366
|
-
},
|
|
374
|
+
}, U = () => {
|
|
367
375
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
368
376
|
return r({
|
|
369
377
|
mutationFn: async (e) => (await c(`mutation SubIngestMessage($input: SubIngestMessageInput!) {
|
|
@@ -373,7 +381,7 @@ var c = async (e, t, n) => {
|
|
|
373
381
|
t.invalidateQueries({ queryKey: l.inbox });
|
|
374
382
|
}
|
|
375
383
|
});
|
|
376
|
-
},
|
|
384
|
+
}, W = (t = {}) => {
|
|
377
385
|
let { apiGatewayUrl: n } = e();
|
|
378
386
|
return i({
|
|
379
387
|
queryKey: [...l.invoices, t],
|
|
@@ -399,7 +407,7 @@ var c = async (e, t, n) => {
|
|
|
399
407
|
}
|
|
400
408
|
}, n)).subListInvoices
|
|
401
409
|
});
|
|
402
|
-
},
|
|
410
|
+
}, G = () => {
|
|
403
411
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
404
412
|
return r({
|
|
405
413
|
mutationFn: async (e) => (await c(`mutation SubMarkInvoicePaid($id: ID!) {
|
|
@@ -409,7 +417,7 @@ var c = async (e, t, n) => {
|
|
|
409
417
|
t.invalidateQueries({ queryKey: l.invoices });
|
|
410
418
|
}
|
|
411
419
|
});
|
|
412
|
-
},
|
|
420
|
+
}, K = () => {
|
|
413
421
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
414
422
|
return r({
|
|
415
423
|
mutationFn: async (e) => (await c(`mutation SubCreateInvoice($input: SubCreateInvoiceInput!) {
|
|
@@ -419,13 +427,13 @@ var c = async (e, t, n) => {
|
|
|
419
427
|
t.invalidateQueries({ queryKey: l.invoices });
|
|
420
428
|
}
|
|
421
429
|
});
|
|
422
|
-
},
|
|
430
|
+
}, q = (t) => {
|
|
423
431
|
let { apiGatewayUrl: n } = e();
|
|
424
432
|
return i({
|
|
425
433
|
queryKey: [...l.paymentInstruments, t],
|
|
426
434
|
queryFn: async () => (await c("query SubPaymentInstruments($ownerId: ID) {\n subListPaymentInstruments(ownerId: $ownerId) {\n id label type status brand last4 expiryMonth expiryYear isDefault\n ownerId workspaceId createdAt updatedAt\n }\n }", { ownerId: t }, n)).subListPaymentInstruments
|
|
427
435
|
});
|
|
428
|
-
},
|
|
436
|
+
}, J = () => {
|
|
429
437
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
430
438
|
return r({
|
|
431
439
|
mutationFn: async (e) => (await c(`mutation SubCreatePaymentInstrument($input: SubCreatePaymentInstrumentInput!) {
|
|
@@ -435,7 +443,7 @@ var c = async (e, t, n) => {
|
|
|
435
443
|
t.invalidateQueries({ queryKey: l.paymentInstruments });
|
|
436
444
|
}
|
|
437
445
|
});
|
|
438
|
-
},
|
|
446
|
+
}, Y = () => {
|
|
439
447
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
440
448
|
return r({
|
|
441
449
|
mutationFn: async (e) => (await c("mutation SubRemovePaymentInstrument($id: ID!) {\n subRemovePaymentInstrument(id: $id)\n }", { id: e }, n)).subRemovePaymentInstrument,
|
|
@@ -443,13 +451,13 @@ var c = async (e, t, n) => {
|
|
|
443
451
|
t.invalidateQueries({ queryKey: l.paymentInstruments });
|
|
444
452
|
}
|
|
445
453
|
});
|
|
446
|
-
},
|
|
454
|
+
}, X = (t) => {
|
|
447
455
|
let { apiGatewayUrl: n } = e();
|
|
448
456
|
return i({
|
|
449
457
|
queryKey: [...l.channels, t],
|
|
450
458
|
queryFn: async () => (await c("query SubChannels($ownerId: ID) {\n subListChannels(ownerId: $ownerId) {\n id label type status address ingestEnabled ownerId verifiedAt\n workspaceId createdAt updatedAt\n }\n }", { ownerId: t }, n)).subListChannels
|
|
451
459
|
});
|
|
452
|
-
},
|
|
460
|
+
}, Z = () => {
|
|
453
461
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
454
462
|
return r({
|
|
455
463
|
mutationFn: async (e) => (await c(`mutation SubCreateChannel($input: SubCreateChannelInput!) {
|
|
@@ -459,7 +467,7 @@ var c = async (e, t, n) => {
|
|
|
459
467
|
t.invalidateQueries({ queryKey: l.channels });
|
|
460
468
|
}
|
|
461
469
|
});
|
|
462
|
-
},
|
|
470
|
+
}, Q = () => {
|
|
463
471
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
464
472
|
return r({
|
|
465
473
|
mutationFn: async (e) => (await c(`mutation SubVerifyChannel($id: ID!) {
|
|
@@ -469,7 +477,7 @@ var c = async (e, t, n) => {
|
|
|
469
477
|
t.invalidateQueries({ queryKey: l.channels });
|
|
470
478
|
}
|
|
471
479
|
});
|
|
472
|
-
},
|
|
480
|
+
}, $ = (t = {}) => {
|
|
473
481
|
let { apiGatewayUrl: n } = e();
|
|
474
482
|
return i({
|
|
475
483
|
queryKey: [...l.agents, t],
|
|
@@ -483,7 +491,7 @@ var c = async (e, t, n) => {
|
|
|
483
491
|
ownerId: t.ownerId
|
|
484
492
|
}, n)).subListAgents
|
|
485
493
|
});
|
|
486
|
-
},
|
|
494
|
+
}, te = (t) => {
|
|
487
495
|
let { apiGatewayUrl: n } = e();
|
|
488
496
|
return i({
|
|
489
497
|
queryKey: l.agent(t ?? ""),
|
|
@@ -498,7 +506,7 @@ var c = async (e, t, n) => {
|
|
|
498
506
|
}
|
|
499
507
|
}`, { id: t }, n)).subAgent
|
|
500
508
|
});
|
|
501
|
-
},
|
|
509
|
+
}, ne = () => {
|
|
502
510
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
503
511
|
return r({
|
|
504
512
|
mutationFn: async (e) => (await c(`mutation SubCreateAgent($input: SubCreateAgentInput!) {
|
|
@@ -508,7 +516,7 @@ var c = async (e, t, n) => {
|
|
|
508
516
|
t.invalidateQueries({ queryKey: l.agents });
|
|
509
517
|
}
|
|
510
518
|
});
|
|
511
|
-
},
|
|
519
|
+
}, re = () => {
|
|
512
520
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
513
521
|
return r({
|
|
514
522
|
mutationFn: async ({ id: e, status: t }) => (await c(`mutation SubSetAgentStatus($id: ID!, $status: SubAgentStatus!) {
|
|
@@ -521,7 +529,7 @@ var c = async (e, t, n) => {
|
|
|
521
529
|
t.invalidateQueries({ queryKey: l.agents }), t.invalidateQueries({ queryKey: l.agent(e.id) });
|
|
522
530
|
}
|
|
523
531
|
});
|
|
524
|
-
},
|
|
532
|
+
}, ie = () => {
|
|
525
533
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
526
534
|
return r({
|
|
527
535
|
mutationFn: async (e) => (await c(`mutation SubCreatePolicy($input: SubCreatePolicyInput!) {
|
|
@@ -531,7 +539,7 @@ var c = async (e, t, n) => {
|
|
|
531
539
|
t.invalidateQueries({ queryKey: l.agents }), t.invalidateQueries({ queryKey: l.agent(e.agentId) });
|
|
532
540
|
}
|
|
533
541
|
});
|
|
534
|
-
},
|
|
542
|
+
}, ae = (t) => {
|
|
535
543
|
let { apiGatewayUrl: n } = e();
|
|
536
544
|
return i({
|
|
537
545
|
queryKey: [...l.workflows, t],
|
|
@@ -539,7 +547,7 @@ var c = async (e, t, n) => {
|
|
|
539
547
|
subListWorkflows(status: $status) { ${g} }
|
|
540
548
|
}`, { status: t }, n)).subListWorkflows
|
|
541
549
|
});
|
|
542
|
-
},
|
|
550
|
+
}, oe = () => {
|
|
543
551
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
544
552
|
return r({
|
|
545
553
|
mutationFn: async (e) => (await c(`mutation SubCreateWorkflow($input: SubCreateWorkflowInput!) {
|
|
@@ -549,7 +557,7 @@ var c = async (e, t, n) => {
|
|
|
549
557
|
t.invalidateQueries({ queryKey: l.workflows });
|
|
550
558
|
}
|
|
551
559
|
});
|
|
552
|
-
},
|
|
560
|
+
}, se = () => {
|
|
553
561
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
554
562
|
return r({
|
|
555
563
|
mutationFn: async (e) => (await c(`mutation SubActivateWorkflow($id: ID!) {
|
|
@@ -561,6 +569,6 @@ var c = async (e, t, n) => {
|
|
|
561
569
|
});
|
|
562
570
|
};
|
|
563
571
|
//#endregion
|
|
564
|
-
export {
|
|
572
|
+
export { se as useActivateWorkflow, te as useAgent, $ as useAgents, A as useAllAssets, z as useArchiveProvider, E as useCancelRelationship, X as useChannels, ne as useCreateAgent, j as useCreateAsset, Z as useCreateChannel, k as useCreateEntitlement, K as useCreateInvoice, J as useCreatePaymentInstrument, B as useCreatePlan, ie as useCreatePolicy, L as useCreateProvider, w as useCreateRelationship, oe as useCreateWorkflow, P as useFileDownloadUrl, V as useInboxMessages, U as useIngestMessage, W as useInvoices, G as useMarkInvoicePaid, H as useMarkMessageRead, q as usePaymentInstruments, ee as usePlans, I as useProvider, F as useProviders, C as useRelationship, S as useRelationships, Y as useRemovePaymentInstrument, O as useRenewalEvents, re as useSetAgentStatus, T as useTransitionRelationship, R as useUpdateProvider, D as useUpdateRelationship, N as useUploadFile, Q as useVerifyChannel, ae as useWorkflows };
|
|
565
573
|
|
|
566
574
|
//# sourceMappingURL=useSubscriberBotApi.js.map
|