@burdenoff/microfe-subscriberbot 2026.1103.2 → 2026.1105.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/stories/Accessibility.stories.d.ts +13 -0
- package/dist/stories/Accessibility.stories.d.ts.map +1 -0
- package/dist/stories/pages/AgentNewPage.stories.d.ts.map +1 -1
- package/dist/stories/pages/BankConnectionsPage.stories.d.ts +1 -0
- package/dist/stories/pages/BankConnectionsPage.stories.d.ts.map +1 -1
- package/dist/stories/pages/EnterpriseSpendPage.stories.d.ts.map +1 -1
- package/dist/stories/pages/InboxPage.stories.d.ts.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.js +168 -168
- package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
- package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts.map +1 -1
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js +116 -116
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
- package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts.map +1 -1
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js +211 -211
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
- package/dist/subscriberbot/components/Modal.d.ts.map +1 -1
- package/dist/subscriberbot/components/Modal.js +43 -33
- package/dist/subscriberbot/components/Modal.js.map +1 -1
- package/dist/subscriberbot/components/PostureOptions.d.ts.map +1 -1
- package/dist/subscriberbot/components/PostureOptions.js +10 -10
- package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
- package/dist/subscriberbot/components/StateViews.d.ts.map +1 -1
- package/dist/subscriberbot/components/StateViews.js +45 -37
- package/dist/subscriberbot/components/StateViews.js.map +1 -1
- package/dist/subscriberbot/components/StatusBadge.d.ts.map +1 -1
- package/dist/subscriberbot/components/StatusBadge.js +6 -6
- package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
- package/dist/subscriberbot/components/decisions/DecisionBanners.js +6 -6
- package/dist/subscriberbot/components/decisions/DecisionCard.d.ts.map +1 -1
- package/dist/subscriberbot/components/decisions/DecisionCard.js +149 -147
- package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileDashboard.js +127 -127
- package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +114 -114
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileScreen.js +1 -1
- package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +4 -4
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts.map +1 -1
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +11 -11
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
- package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts.map +1 -1
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js +29 -29
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +43 -43
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +4 -4
- package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementThread.js +14 -14
- package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
- package/dist/subscriberbot/components/savings/SavingsCards.d.ts.map +1 -1
- package/dist/subscriberbot/components/savings/SavingsCards.js +242 -237
- package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
- package/dist/subscriberbot/components/viz.d.ts +1 -0
- package/dist/subscriberbot/components/viz.d.ts.map +1 -1
- package/dist/subscriberbot/components/viz.js +100 -101
- package/dist/subscriberbot/components/viz.js.map +1 -1
- package/dist/subscriberbot/hooks/index.js +1 -1
- package/dist/subscriberbot/hooks/useFormError.d.ts +7 -0
- package/dist/subscriberbot/hooks/useFormError.d.ts.map +1 -0
- package/dist/subscriberbot/hooks/useFormError.js +28 -0
- package/dist/subscriberbot/hooks/useFormError.js.map +1 -0
- package/dist/subscriberbot/hooks/useFormatters.d.ts +11 -0
- package/dist/subscriberbot/hooks/useFormatters.d.ts.map +1 -0
- package/dist/subscriberbot/hooks/useFormatters.js +13 -0
- package/dist/subscriberbot/hooks/useFormatters.js.map +1 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +371 -370
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/hooks/useTr.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useTr.js +1 -1
- package/dist/subscriberbot/hooks/useTr.js.map +1 -1
- package/dist/subscriberbot/index.js +1 -1
- package/dist/subscriberbot/pages/AssetVaultPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/AssetVaultPage.js +124 -124
- package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
- package/dist/subscriberbot/pages/DashboardPage.d.ts +0 -10
- package/dist/subscriberbot/pages/DashboardPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/DashboardPage.js +107 -98
- package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.d.ts +0 -10
- package/dist/subscriberbot/pages/InboxPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.js +421 -402
- package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.js +130 -121
- package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
- package/dist/subscriberbot/pages/InvoicesPage.d.ts +0 -12
- package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InvoicesPage.js +237 -215
- package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
- package/dist/subscriberbot/pages/RenewalsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/RenewalsPage.js +303 -295
- package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
- package/dist/subscriberbot/pages/SavingsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/SavingsPage.js +57 -57
- package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/WorkflowsPage.d.ts +0 -13
- package/dist/subscriberbot/pages/WorkflowsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/WorkflowsPage.js +202 -196
- package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts +0 -18
- package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js +283 -275
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts +0 -6
- package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentNewPage.js +85 -77
- package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts +0 -9
- package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.js +136 -136
- package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts +0 -9
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +267 -260
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts +0 -10
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +96 -96
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts +0 -11
- package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionsPage.js +46 -46
- package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts +0 -11
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +181 -171
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts +0 -9
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +164 -164
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts +0 -9
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +197 -181
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts +0 -8
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +79 -79
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts +0 -9
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +147 -147
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts +0 -10
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +204 -188
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts +0 -9
- package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js +80 -80
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts +0 -10
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +484 -458
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts +0 -8
- package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js +146 -136
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts +0 -10
- package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js +88 -87
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts +0 -11
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +520 -490
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts +0 -8
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +104 -90
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts +0 -8
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +97 -96
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +76 -74
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts +5 -3
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts.map +1 -1
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +26 -25
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
- package/dist/subscriberbot/utils/formatters.d.ts +16 -5
- package/dist/subscriberbot/utils/formatters.d.ts.map +1 -1
- package/dist/subscriberbot/utils/formatters.js +57 -25
- package/dist/subscriberbot/utils/formatters.js.map +1 -1
- package/dist/subscriberbot/utils/plaidLink.d.ts +2 -1
- package/dist/subscriberbot/utils/plaidLink.d.ts.map +1 -1
- package/dist/subscriberbot/utils/plaidLink.js +21 -21
- package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { useTr as t } from "../../hooks/useTr.js";
|
|
3
|
+
import { useFormatters as n } from "../../hooks/useFormatters.js";
|
|
4
|
+
import { cn as r } from "../../utils/cn.js";
|
|
5
|
+
import { PageLayout as i } from "../../components/PageLayout.js";
|
|
6
|
+
import { MetricsCard as a } from "../../components/MetricsCard.js";
|
|
7
|
+
import { EmptyState as o } from "../../components/EmptyState.js";
|
|
8
8
|
import { LoadingView as s } from "../../components/StateViews.js";
|
|
9
9
|
import "../../components/index.js";
|
|
10
10
|
import { useDecisions as c } from "../../hooks/useSubscriberBotApi.js";
|
|
@@ -49,16 +49,16 @@ var C = [
|
|
|
49
49
|
}
|
|
50
50
|
];
|
|
51
51
|
function w() {
|
|
52
|
-
let w =
|
|
53
|
-
...
|
|
54
|
-
...
|
|
55
|
-
}), [
|
|
56
|
-
return /* @__PURE__ */ S(
|
|
57
|
-
title:
|
|
58
|
-
description:
|
|
52
|
+
let { formatCurrency: w } = n(), T = t(), { navigateTo: E } = e(), [D, O] = g("PROPOSED"), [k, A] = g(""), { data: j, isLoading: M, isError: N, error: P, refetch: F } = c(h(() => ({
|
|
53
|
+
...D === "ALL" ? {} : { status: D },
|
|
54
|
+
...k ? { kind: k } : {}
|
|
55
|
+
}), [D, k])), I = j?.items ?? [], L = c({ status: "PROPOSED" }), R = L.data?.items ?? [], z = R.reduce((e, t) => (e[t.currency] = (e[t.currency] ?? 0) + t.estimatedSavings, e), {}), B = Object.entries(z).filter(([, e]) => e > 0).map(([e, t]) => w(t, e)).join(" + ") || w(0, R[0]?.currency ?? "USD"), V = R.filter((e) => d(e.recommendation)).length;
|
|
56
|
+
return /* @__PURE__ */ S(i, {
|
|
57
|
+
title: T("decisions.title", "AI Decisions"),
|
|
58
|
+
description: T("decisions.description", "What your agents recommend doing about your subscriptions, with the reasoning and the records behind it."),
|
|
59
59
|
actions: /* @__PURE__ */ S("button", {
|
|
60
60
|
type: "button",
|
|
61
|
-
onClick: () =>
|
|
61
|
+
onClick: () => E("/agents"),
|
|
62
62
|
className: "inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
63
63
|
children: [
|
|
64
64
|
/* @__PURE__ */ x(_, {
|
|
@@ -66,28 +66,28 @@ function w() {
|
|
|
66
66
|
"aria-hidden": !0
|
|
67
67
|
}),
|
|
68
68
|
" ",
|
|
69
|
-
|
|
69
|
+
T("decisions.manageAgents", "Manage agents")
|
|
70
70
|
]
|
|
71
71
|
}),
|
|
72
72
|
children: [
|
|
73
73
|
/* @__PURE__ */ x(p, {}),
|
|
74
|
-
!
|
|
74
|
+
!L.isError && /* @__PURE__ */ S("div", {
|
|
75
75
|
className: "mt-6 grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
76
76
|
children: [
|
|
77
|
-
/* @__PURE__ */ x(
|
|
77
|
+
/* @__PURE__ */ x(a, {
|
|
78
78
|
icon: /* @__PURE__ */ x(v, { className: "h-5 w-5" }),
|
|
79
|
-
value:
|
|
80
|
-
label:
|
|
79
|
+
value: L.isLoading ? "—" : R.length,
|
|
80
|
+
label: T("decisions.metrics.toReview", "Waiting for review")
|
|
81
81
|
}),
|
|
82
|
-
/* @__PURE__ */ x(
|
|
82
|
+
/* @__PURE__ */ x(a, {
|
|
83
83
|
icon: /* @__PURE__ */ x(y, { className: "h-5 w-5" }),
|
|
84
|
-
value:
|
|
85
|
-
label:
|
|
84
|
+
value: L.isLoading ? "—" : B,
|
|
85
|
+
label: T("decisions.metrics.savings", "Estimated yearly savings if applied")
|
|
86
86
|
}),
|
|
87
|
-
/* @__PURE__ */ x(
|
|
87
|
+
/* @__PURE__ */ x(a, {
|
|
88
88
|
icon: /* @__PURE__ */ x(b, { className: "h-5 w-5" }),
|
|
89
|
-
value:
|
|
90
|
-
label:
|
|
89
|
+
value: L.isLoading ? "—" : V,
|
|
90
|
+
label: T("decisions.metrics.cancellations", "Cancellations proposed")
|
|
91
91
|
})
|
|
92
92
|
]
|
|
93
93
|
}),
|
|
@@ -95,54 +95,54 @@ function w() {
|
|
|
95
95
|
className: "mt-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
96
96
|
children: [/* @__PURE__ */ x("div", {
|
|
97
97
|
role: "tablist",
|
|
98
|
-
"aria-label":
|
|
98
|
+
"aria-label": T("decisions.tabs.label", "Decision status"),
|
|
99
99
|
className: "flex flex-wrap gap-1.5",
|
|
100
100
|
children: C.map((e) => /* @__PURE__ */ x("button", {
|
|
101
101
|
type: "button",
|
|
102
102
|
role: "tab",
|
|
103
|
-
"aria-selected":
|
|
104
|
-
onClick: () =>
|
|
105
|
-
className:
|
|
106
|
-
children:
|
|
103
|
+
"aria-selected": D === e.id,
|
|
104
|
+
onClick: () => O(e.id),
|
|
105
|
+
className: r("rounded-lg px-3 py-1.5 text-xs font-medium", D === e.id ? "bg-action-primary-bg text-action-primary-text" : "border border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
106
|
+
children: T(e.key, e.fallback)
|
|
107
107
|
}, e.id))
|
|
108
108
|
}), /* @__PURE__ */ S("label", {
|
|
109
109
|
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
110
|
-
children: [
|
|
111
|
-
value:
|
|
112
|
-
onChange: (e) =>
|
|
110
|
+
children: [T("decisions.filters.kind", "Kind"), /* @__PURE__ */ S("select", {
|
|
111
|
+
value: k,
|
|
112
|
+
onChange: (e) => A(e.target.value),
|
|
113
113
|
className: "rounded-lg border border-border-subtle bg-bg-surface px-2 py-1.5 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
114
114
|
children: [/* @__PURE__ */ x("option", {
|
|
115
115
|
value: "",
|
|
116
|
-
children:
|
|
116
|
+
children: T("decisions.filters.allKinds", "All kinds")
|
|
117
117
|
}), l.map((e) => /* @__PURE__ */ x("option", {
|
|
118
118
|
value: e,
|
|
119
|
-
children:
|
|
119
|
+
children: T(u[e].key, u[e].fallback)
|
|
120
120
|
}, e))]
|
|
121
121
|
})]
|
|
122
122
|
})]
|
|
123
123
|
}),
|
|
124
124
|
/* @__PURE__ */ S("div", {
|
|
125
125
|
className: "mt-4",
|
|
126
|
-
children: [
|
|
127
|
-
message:
|
|
128
|
-
onRetry: () => void
|
|
129
|
-
}) :
|
|
126
|
+
children: [M ? /* @__PURE__ */ x(s, { label: T("decisions.loading", "Loading decisions…") }) : N ? /* @__PURE__ */ x(m, {
|
|
127
|
+
message: P instanceof Error ? P.message : void 0,
|
|
128
|
+
onRetry: () => void F()
|
|
129
|
+
}) : I.length === 0 ? /* @__PURE__ */ x(o, {
|
|
130
130
|
illustration: "empty-data",
|
|
131
|
-
title:
|
|
132
|
-
description:
|
|
131
|
+
title: D === "PROPOSED" ? T("decisions.empty.proposedTitle", "Nothing waiting for review") : T("decisions.empty.title", "No decisions here"),
|
|
132
|
+
description: T("decisions.empty.description", "Run a cost, renewal, vendor or discovery agent to get recommendations. Running an agent never changes a subscription on its own."),
|
|
133
133
|
action: /* @__PURE__ */ x("button", {
|
|
134
134
|
type: "button",
|
|
135
|
-
onClick: () =>
|
|
135
|
+
onClick: () => E("/agents"),
|
|
136
136
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
137
|
-
children:
|
|
137
|
+
children: T("decisions.empty.action", "Go to agents")
|
|
138
138
|
})
|
|
139
139
|
}) : /* @__PURE__ */ x("div", {
|
|
140
140
|
className: "grid grid-cols-1 gap-3 lg:grid-cols-2",
|
|
141
141
|
"data-testid": "decision-queue",
|
|
142
|
-
children:
|
|
143
|
-
}),
|
|
142
|
+
children: I.map((e) => /* @__PURE__ */ x(f, { decision: e }, e.id))
|
|
143
|
+
}), j?.pageInfo.hasMore && /* @__PURE__ */ x("p", {
|
|
144
144
|
className: "mt-3 text-xs text-text-secondary",
|
|
145
|
-
children:
|
|
145
|
+
children: T("decisions.truncated", "Showing the newest {{count}}. Filter by kind or status to narrow the list.", { count: I.length })
|
|
146
146
|
})]
|
|
147
147
|
})
|
|
148
148
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecisionsPage.js","names":[],"sources":["../../../../src/subscriberbot/pages/decisions/DecisionsPage.tsx"],"sourcesContent":["/**\n * Portfolio decision queue\n * @module subscriberbot/pages/decisions\n *\n * `/subscriberbot/decisions` — every recommendation the workspace's agents\n * have made, newest first, from the real `subListDecisions` query. Filter by\n * status and kind; each card shows the recommendation, rationale, confidence,\n * estimated saving and the source rows it used, and can be applied or\n * dismissed. When the decision engine is unreachable the page degrades to a\n * banner that points at the manual path instead of a blank screen.\n */\n\nimport { useMemo, useState } from 'react';\nimport { Bot, ClipboardList, PiggyBank, ShieldAlert } from 'lucide-react';\nimport { PageLayout, EmptyState, MetricsCard, LoadingView } from '../../components';\nimport {\n AiDisclaimer,\n DecisionCard,\n DecisionsUnavailableBanner,\n DECISION_KINDS,\n DECISION_KIND_LABEL,\n isDestructive,\n} from '../../components/decisions';\nimport { useSubscriberBot } from '../../context/SubscriberBotContext';\nimport { useDecisions } from '../../hooks/useSubscriberBotApi';\nimport { useTr } from '../../hooks/useTr';\nimport { formatCurrency } from '../../utils/formatters';\nimport { cn } from '../../utils/cn';\nimport type { SubDecisionFilter, SubDecisionKind, SubDecisionStatus } from '../../types';\n\ntype StatusTab = 'PROPOSED' | 'APPLIED' | 'DISMISSED' | 'STALE' | 'FLAGGED' | 'ALL';\n\nconst STATUS_TABS: Array<{ id: StatusTab; key: string; fallback: string }> = [\n { id: 'PROPOSED', key: 'decisions.tabs.proposed', fallback: 'To review' },\n { id: 'APPLIED', key: 'decisions.tabs.applied', fallback: 'Applied' },\n { id: 'DISMISSED', key: 'decisions.tabs.dismissed', fallback: 'Dismissed' },\n { id: 'STALE', key: 'decisions.tabs.stale', fallback: 'Stale' },\n { id: 'FLAGGED', key: 'decisions.tabs.flagged', fallback: 'Flagged' },\n { id: 'ALL', key: 'decisions.tabs.all', fallback: 'All' },\n];\n\nexport function DecisionsPage() {\n const tr = useTr();\n const { navigateTo } = useSubscriberBot();\n const [tab, setTab] = useState<StatusTab>('PROPOSED');\n const [kind, setKind] = useState<SubDecisionKind | ''>('');\n\n const filter = useMemo<SubDecisionFilter>(\n () => ({\n ...(tab !== 'ALL' ? { status: tab as SubDecisionStatus } : {}),\n ...(kind ? { kind } : {}),\n }),\n [tab, kind]\n );\n const { data, isLoading, isError, error, refetch } = useDecisions(filter);\n const decisions = data?.items ?? [];\n\n // Summary over the open queue (what is still waiting for a human).\n const open = useDecisions({ status: 'PROPOSED' });\n const openItems = open.data?.items ?? [];\n const savingsByCurrency = openItems.reduce<Record<string, number>>((acc, d) => {\n acc[d.currency] = (acc[d.currency] ?? 0) + d.estimatedSavings;\n return acc;\n }, {});\n const savingsText =\n Object.entries(savingsByCurrency)\n .filter(([, amount]) => amount > 0)\n .map(([currency, amount]) => formatCurrency(amount, currency))\n .join(' + ') || formatCurrency(0, openItems[0]?.currency ?? 'USD');\n const destructiveOpen = openItems.filter((d) => isDestructive(d.recommendation)).length;\n\n return (\n <PageLayout\n title={tr('decisions.title', 'AI Decisions')}\n description={tr(\n 'decisions.description',\n 'What your agents recommend doing about your subscriptions, with the reasoning and the records behind it.'\n )}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/agents')}\n className=\"inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken\"\n >\n <Bot className=\"h-4 w-4\" aria-hidden /> {tr('decisions.manageAgents', 'Manage agents')}\n </button>\n }\n >\n <AiDisclaimer />\n\n {!open.isError && (\n <div className=\"mt-6 grid grid-cols-1 gap-4 sm:grid-cols-3\">\n <MetricsCard\n icon={<ClipboardList className=\"h-5 w-5\" />}\n value={open.isLoading ? '—' : openItems.length}\n label={tr('decisions.metrics.toReview', 'Waiting for review')}\n />\n <MetricsCard\n icon={<PiggyBank className=\"h-5 w-5\" />}\n value={open.isLoading ? '—' : savingsText}\n label={tr('decisions.metrics.savings', 'Estimated yearly savings if applied')}\n />\n <MetricsCard\n icon={<ShieldAlert className=\"h-5 w-5\" />}\n value={open.isLoading ? '—' : destructiveOpen}\n label={tr('decisions.metrics.cancellations', 'Cancellations proposed')}\n />\n </div>\n )}\n\n <div className=\"mt-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div\n role=\"tablist\"\n aria-label={tr('decisions.tabs.label', 'Decision status')}\n className=\"flex flex-wrap gap-1.5\"\n >\n {STATUS_TABS.map((t) => (\n <button\n key={t.id}\n type=\"button\"\n role=\"tab\"\n aria-selected={tab === t.id}\n onClick={() => setTab(t.id)}\n className={cn(\n 'rounded-lg px-3 py-1.5 text-xs font-medium',\n tab === t.id\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'border border-border-subtle text-text-primary hover:bg-bg-sunken'\n )}\n >\n {tr(t.key, t.fallback)}\n </button>\n ))}\n </div>\n <label className=\"flex items-center gap-2 text-xs text-text-secondary\">\n {tr('decisions.filters.kind', 'Kind')}\n <select\n value={kind}\n onChange={(e) => setKind(e.target.value as SubDecisionKind | '')}\n className=\"rounded-lg border border-border-subtle bg-bg-surface px-2 py-1.5 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n >\n <option value=\"\">{tr('decisions.filters.allKinds', 'All kinds')}</option>\n {DECISION_KINDS.map((k) => (\n <option key={k} value={k}>\n {tr(DECISION_KIND_LABEL[k].key, DECISION_KIND_LABEL[k].fallback)}\n </option>\n ))}\n </select>\n </label>\n </div>\n\n <div className=\"mt-4\">\n {isLoading ? (\n <LoadingView label={tr('decisions.loading', 'Loading decisions…')} />\n ) : isError ? (\n <DecisionsUnavailableBanner\n message={error instanceof Error ? error.message : undefined}\n onRetry={() => void refetch()}\n />\n ) : decisions.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n title={\n tab === 'PROPOSED'\n ? tr('decisions.empty.proposedTitle', 'Nothing waiting for review')\n : tr('decisions.empty.title', 'No decisions here')\n }\n description={tr(\n 'decisions.empty.description',\n 'Run a cost, renewal, vendor or discovery agent to get recommendations. Running an agent never changes a subscription on its own.'\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/agents')}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90\"\n >\n {tr('decisions.empty.action', 'Go to agents')}\n </button>\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-3 lg:grid-cols-2\" data-testid=\"decision-queue\">\n {decisions.map((d) => (\n <DecisionCard key={d.id} decision={d} />\n ))}\n </div>\n )}\n {data?.pageInfo.hasMore && (\n <p className=\"mt-3 text-xs text-text-secondary\">\n {tr(\n 'decisions.truncated',\n 'Showing the newest {{count}}. Filter by kind or status to narrow the list.',\n { count: decisions.length }\n )}\n </p>\n )}\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgCA,IAAM,IAAuE;CAC3E;EAAE,IAAI;EAAY,KAAK;EAA2B,UAAU;CAAY;CACxE;EAAE,IAAI;EAAW,KAAK;EAA0B,UAAU;CAAU;CACpE;EAAE,IAAI;EAAa,KAAK;EAA4B,UAAU;CAAY;CAC1E;EAAE,IAAI;EAAS,KAAK;EAAwB,UAAU;CAAQ;CAC9D;EAAE,IAAI;EAAW,KAAK;EAA0B,UAAU;CAAU;CACpE;EAAE,IAAI;EAAO,KAAK;EAAsB,UAAU;CAAM;AAC1D;AAEA,SAAgB,IAAgB;CAC9B,IAAM,IAAK,EAAM,GACX,EAAE,kBAAe,EAAiB,GAClC,CAAC,GAAK,KAAU,EAAoB,UAAU,GAC9C,CAAC,GAAM,KAAW,EAA+B,EAAE,GASnD,EAAE,SAAM,cAAW,YA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iCAAiC,4BAA4B,IAChE,EAAG,yBAAyB,mBAAmB;KAErD,aAAa,EACX,+BACA,kIACF;KACA,QACE,kBAAC,UAAD;MACE,MAAK;MACL,eAAe,EAAW,SAAS;MACnC,WAAU;gBAET,EAAG,0BAA0B,cAAc;KACtC,CAAA;IAEX,CAAA,IAED,kBAAC,OAAD;KAAK,WAAU;KAAwC,eAAY;eAChE,EAAU,KAAK,MACd,kBAAC,GAAD,EAAyB,UAAU,EAAI,GAApB,EAAE,EAAkB,CACxC;IACE,CAAA,GAEN,GAAM,SAAS,WACd,kBAAC,KAAD;KAAG,WAAU;eACV,EACC,uBACA,8EACA,EAAE,OAAO,EAAU,OAAO,CAC5B;IACC,CAAA,CAEF;;EACK;;AAEhB"}
|
|
1
|
+
{"version":3,"file":"DecisionsPage.js","names":[],"sources":["../../../../src/subscriberbot/pages/decisions/DecisionsPage.tsx"],"sourcesContent":["import { useFormatters } from '../../hooks/useFormatters';\n/**\n * Portfolio decision queue\n * @module subscriberbot/pages/decisions\n *\n * `/subscriberbot/decisions` — every recommendation the workspace's agents\n * have made, newest first, from the real `subListDecisions` query. Filter by\n * status and kind; each card shows the recommendation, rationale, confidence,\n * estimated saving and the source rows it used, and can be applied or\n * dismissed. When the decision engine is unreachable the page degrades to a\n * banner that points at the manual path instead of a blank screen.\n */\n\nimport { useMemo, useState } from 'react';\nimport { Bot, ClipboardList, PiggyBank, ShieldAlert } from 'lucide-react';\nimport { PageLayout, EmptyState, MetricsCard, LoadingView } from '../../components';\nimport {\n AiDisclaimer,\n DecisionCard,\n DecisionsUnavailableBanner,\n DECISION_KINDS,\n DECISION_KIND_LABEL,\n isDestructive,\n} from '../../components/decisions';\nimport { useSubscriberBot } from '../../context/SubscriberBotContext';\nimport { useDecisions } from '../../hooks/useSubscriberBotApi';\nimport { useTr } from '../../hooks/useTr';\n\nimport { cn } from '../../utils/cn';\nimport type { SubDecisionFilter, SubDecisionKind, SubDecisionStatus } from '../../types';\n\ntype StatusTab = 'PROPOSED' | 'APPLIED' | 'DISMISSED' | 'STALE' | 'FLAGGED' | 'ALL';\n\nconst STATUS_TABS: Array<{ id: StatusTab; key: string; fallback: string }> = [\n { id: 'PROPOSED', key: 'decisions.tabs.proposed', fallback: 'To review' },\n { id: 'APPLIED', key: 'decisions.tabs.applied', fallback: 'Applied' },\n { id: 'DISMISSED', key: 'decisions.tabs.dismissed', fallback: 'Dismissed' },\n { id: 'STALE', key: 'decisions.tabs.stale', fallback: 'Stale' },\n { id: 'FLAGGED', key: 'decisions.tabs.flagged', fallback: 'Flagged' },\n { id: 'ALL', key: 'decisions.tabs.all', fallback: 'All' },\n];\n\nexport function DecisionsPage() {\n const { formatCurrency } = useFormatters();\n\n const tr = useTr();\n const { navigateTo } = useSubscriberBot();\n const [tab, setTab] = useState<StatusTab>('PROPOSED');\n const [kind, setKind] = useState<SubDecisionKind | ''>('');\n\n const filter = useMemo<SubDecisionFilter>(\n () => ({\n ...(tab !== 'ALL' ? { status: tab as SubDecisionStatus } : {}),\n ...(kind ? { kind } : {}),\n }),\n [tab, kind]\n );\n const { data, isLoading, isError, error, refetch } = useDecisions(filter);\n const decisions = data?.items ?? [];\n\n // Summary over the open queue (what is still waiting for a human).\n const open = useDecisions({ status: 'PROPOSED' });\n const openItems = open.data?.items ?? [];\n const savingsByCurrency = openItems.reduce<Record<string, number>>((acc, d) => {\n acc[d.currency] = (acc[d.currency] ?? 0) + d.estimatedSavings;\n return acc;\n }, {});\n const savingsText =\n Object.entries(savingsByCurrency)\n .filter(([, amount]) => amount > 0)\n .map(([currency, amount]) => formatCurrency(amount, currency))\n .join(' + ') || formatCurrency(0, openItems[0]?.currency ?? 'USD');\n const destructiveOpen = openItems.filter((d) => isDestructive(d.recommendation)).length;\n\n return (\n <PageLayout\n title={tr('decisions.title', 'AI Decisions')}\n description={tr(\n 'decisions.description',\n 'What your agents recommend doing about your subscriptions, with the reasoning and the records behind it.'\n )}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/agents')}\n className=\"inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken\"\n >\n <Bot className=\"h-4 w-4\" aria-hidden /> {tr('decisions.manageAgents', 'Manage agents')}\n </button>\n }\n >\n <AiDisclaimer />\n\n {!open.isError && (\n <div className=\"mt-6 grid grid-cols-1 gap-4 sm:grid-cols-3\">\n <MetricsCard\n icon={<ClipboardList className=\"h-5 w-5\" />}\n value={open.isLoading ? '—' : openItems.length}\n label={tr('decisions.metrics.toReview', 'Waiting for review')}\n />\n <MetricsCard\n icon={<PiggyBank className=\"h-5 w-5\" />}\n value={open.isLoading ? '—' : savingsText}\n label={tr('decisions.metrics.savings', 'Estimated yearly savings if applied')}\n />\n <MetricsCard\n icon={<ShieldAlert className=\"h-5 w-5\" />}\n value={open.isLoading ? '—' : destructiveOpen}\n label={tr('decisions.metrics.cancellations', 'Cancellations proposed')}\n />\n </div>\n )}\n\n <div className=\"mt-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div\n role=\"tablist\"\n aria-label={tr('decisions.tabs.label', 'Decision status')}\n className=\"flex flex-wrap gap-1.5\"\n >\n {STATUS_TABS.map((t) => (\n <button\n key={t.id}\n type=\"button\"\n role=\"tab\"\n aria-selected={tab === t.id}\n onClick={() => setTab(t.id)}\n className={cn(\n 'rounded-lg px-3 py-1.5 text-xs font-medium',\n tab === t.id\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'border border-border-subtle text-text-primary hover:bg-bg-sunken'\n )}\n >\n {tr(t.key, t.fallback)}\n </button>\n ))}\n </div>\n <label className=\"flex items-center gap-2 text-xs text-text-secondary\">\n {tr('decisions.filters.kind', 'Kind')}\n <select\n value={kind}\n onChange={(e) => setKind(e.target.value as SubDecisionKind | '')}\n className=\"rounded-lg border border-border-subtle bg-bg-surface px-2 py-1.5 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n >\n <option value=\"\">{tr('decisions.filters.allKinds', 'All kinds')}</option>\n {DECISION_KINDS.map((k) => (\n <option key={k} value={k}>\n {tr(DECISION_KIND_LABEL[k].key, DECISION_KIND_LABEL[k].fallback)}\n </option>\n ))}\n </select>\n </label>\n </div>\n\n <div className=\"mt-4\">\n {isLoading ? (\n <LoadingView label={tr('decisions.loading', 'Loading decisions…')} />\n ) : isError ? (\n <DecisionsUnavailableBanner\n message={error instanceof Error ? error.message : undefined}\n onRetry={() => void refetch()}\n />\n ) : decisions.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n title={\n tab === 'PROPOSED'\n ? tr('decisions.empty.proposedTitle', 'Nothing waiting for review')\n : tr('decisions.empty.title', 'No decisions here')\n }\n description={tr(\n 'decisions.empty.description',\n 'Run a cost, renewal, vendor or discovery agent to get recommendations. Running an agent never changes a subscription on its own.'\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/agents')}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90\"\n >\n {tr('decisions.empty.action', 'Go to agents')}\n </button>\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-3 lg:grid-cols-2\" data-testid=\"decision-queue\">\n {decisions.map((d) => (\n <DecisionCard key={d.id} decision={d} />\n ))}\n </div>\n )}\n {data?.pageInfo.hasMore && (\n <p className=\"mt-3 text-xs text-text-secondary\">\n {tr(\n 'decisions.truncated',\n 'Showing the newest {{count}}. Filter by kind or status to narrow the list.',\n { count: decisions.length }\n )}\n </p>\n )}\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiCA,IAAM,IAAuE;CAC3E;EAAE,IAAI;EAAY,KAAK;EAA2B,UAAU;CAAY;CACxE;EAAE,IAAI;EAAW,KAAK;EAA0B,UAAU;CAAU;CACpE;EAAE,IAAI;EAAa,KAAK;EAA4B,UAAU;CAAY;CAC1E;EAAE,IAAI;EAAS,KAAK;EAAwB,UAAU;CAAQ;CAC9D;EAAE,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ACJ;;GAEL,kBAAC,OAAD;IAAK,WAAU;cAAf,CACG,IACC,kBAAC,GAAD,EAAa,OAAO,EAAG,qBAAqB,oBAAoB,EAAI,CAAA,IAClE,IACF,kBAAC,GAAD;KACE,SAAS,aAAiB,QAAQ,EAAM,UAAU,KAAA;KAClD,eAAe,KAAK,EAAQ;IAC7B,CAAA,IACC,EAAU,WAAW,IACvB,kBAAC,GAAD;KACE,cAAa;KACb,OACE,MAAQ,aACJ,EAAG,iCAAiC,4BAA4B,IAChE,EAAG,yBAAyB,mBAAmB;KAErD,aAAa,EACX,+BACA,kIACF;KACA,QACE,kBAAC,UAAD;MACE,MAAK;MACL,eAAe,EAAW,SAAS;MACnC,WAAU;gBAET,EAAG,0BAA0B,cAAc;KACtC,CAAA;IAEX,CAAA,IAED,kBAAC,OAAD;KAAK,WAAU;KAAwC,eAAY;eAChE,EAAU,KAAK,MACd,kBAAC,GAAD,EAAyB,UAAU,EAAI,GAApB,EAAE,EAAkB,CACxC;IACE,CAAA,GAEN,GAAM,SAAS,WACd,kBAAC,KAAD;KAAG,WAAU;eACV,EACC,uBACA,8EACA,EAAE,OAAO,EAAU,OAAO,CAC5B;IACC,CAAA,CAEF;;EACK;;AAEhB"}
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enterprise SaaS spend management
|
|
3
|
-
* @module subscriberbot/pages/enterprise
|
|
4
|
-
*
|
|
5
|
-
* `/subscriberbot/enterprise/spend` (BOFF-4008) — the finance / IT leadership
|
|
6
|
-
* view of recurring spend: company-wide spend and trend, budget variance,
|
|
7
|
-
* spend by department, duplicate tools, shadow IT, the quarterly renewal
|
|
8
|
-
* pipeline, compliance / risk flags and the licence table. Every figure comes
|
|
9
|
-
* from the real `subEnterpriseSpendDashboard` query, which aggregates the
|
|
10
|
-
* live portfolio server-side; nothing on this page is mocked.
|
|
11
|
-
*/
|
|
12
1
|
export declare function EnterpriseSpendPage(): import("react").JSX.Element;
|
|
13
2
|
//# sourceMappingURL=EnterpriseSpendPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnterpriseSpendPage.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/pages/enterprise/EnterpriseSpendPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EnterpriseSpendPage.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/pages/enterprise/EnterpriseSpendPage.tsx"],"names":[],"mappings":"AAoTA,wBAAgB,mBAAmB,gCAsmBlC"}
|