@burdenoff/microfe-subscriberbot 2026.1107.8 → 2026.1110.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/generated/global-operations.d.ts +4 -2
- package/dist/generated/global-types.d.ts +2 -22
- package/dist/generated/wspace-operations.d.ts +4 -2
- package/dist/generated/wspace-types.d.ts +4 -24
- package/dist/index.d.ts +0 -1
- package/dist/node_modules/clsx/dist/clsx.js +8 -7
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +134 -151
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/stories/Accessibility.stories.d.ts +2 -4
- package/dist/stories/EmptyState.stories.d.ts +0 -2
- package/dist/stories/MetricsCard.stories.d.ts +0 -2
- package/dist/stories/StatusBadge.stories.d.ts +0 -2
- package/dist/stories/pages/AgentDetailPage.stories.d.ts +0 -2
- package/dist/stories/pages/AgentNewPage.stories.d.ts +0 -2
- package/dist/stories/pages/AgentsListPage.stories.d.ts +0 -2
- package/dist/stories/pages/AssetVaultPage.stories.d.ts +0 -2
- package/dist/stories/pages/BankConnectionsPage.stories.d.ts +0 -2
- package/dist/stories/pages/DashboardPage.stories.d.ts +0 -2
- package/dist/stories/pages/DecisionDetailPage.stories.d.ts +0 -2
- package/dist/stories/pages/DecisionsPage.stories.d.ts +0 -2
- package/dist/stories/pages/EnterpriseSpendPage.stories.d.ts +0 -2
- package/dist/stories/pages/InboxPage.stories.d.ts +0 -2
- package/dist/stories/pages/InboxReadState.stories.d.ts +1 -3
- package/dist/stories/pages/InsightsPage.stories.d.ts +0 -2
- package/dist/stories/pages/InvoicesPage.stories.d.ts +0 -2
- package/dist/stories/pages/NegotiationDetailPage.stories.d.ts +0 -2
- package/dist/stories/pages/NegotiationNewPage.stories.d.ts +0 -2
- package/dist/stories/pages/NegotiationsPage.stories.d.ts +0 -2
- package/dist/stories/pages/ProcurementDetailPage.stories.d.ts +0 -2
- package/dist/stories/pages/ProcurementNewPage.stories.d.ts +0 -2
- package/dist/stories/pages/ProcurementPage.stories.d.ts +0 -2
- package/dist/stories/pages/ProviderDetailPage.stories.d.ts +0 -2
- package/dist/stories/pages/ProviderNewPage.stories.d.ts +0 -2
- package/dist/stories/pages/ProvidersListPage.stories.d.ts +0 -2
- package/dist/stories/pages/RelationshipDetailPage.stories.d.ts +0 -2
- package/dist/stories/pages/RelationshipNewPage.stories.d.ts +0 -2
- package/dist/stories/pages/RelationshipsListPage.stories.d.ts +0 -2
- package/dist/stories/pages/RenewalsPage.stories.d.ts +0 -2
- package/dist/stories/pages/SavingsPage.stories.d.ts +0 -2
- package/dist/stories/pages/WorkflowBuilderPage.stories.d.ts +0 -2
- package/dist/stories/pages/WorkflowsPage.stories.d.ts +0 -2
- package/dist/stories/support/PageHarness.d.ts +0 -2
- package/dist/stories/support/bankingFixtures.d.ts +0 -2
- package/dist/stories/support/fixtures.d.ts +0 -2
- package/dist/stories/support/graphqlMock.d.ts +0 -2
- package/dist/stories/support/handlers.d.ts +0 -2
- package/dist/stories/support/negotiationFixtures.d.ts +0 -2
- package/dist/stories/support/phoneViewport.d.ts +0 -2
- package/dist/stories/support/play.d.ts +0 -2
- package/dist/stories/support/procurementFixtures.d.ts +0 -2
- package/dist/subscriberbot/SubscriberBotRoot.d.ts +0 -2
- package/dist/subscriberbot/SubscriberBotRoot.js +10 -7
- package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
- package/dist/subscriberbot/SubscriberBotRoutes.d.ts +0 -2
- package/dist/subscriberbot/SubscriberBotRoutes.js +1 -2
- package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.d.ts +0 -2
- package/dist/subscriberbot/admin/AdminDashboardPage.js +9 -10
- package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
- package/dist/subscriberbot/admin/AdminRoot.d.ts +0 -2
- package/dist/subscriberbot/admin/AdminRoot.js +2 -3
- package/dist/subscriberbot/admin/AdminRoot.js.map +1 -1
- package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts +0 -2
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js +56 -57
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
- package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts +0 -2
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js +107 -108
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
- package/dist/subscriberbot/admin/index.d.ts +0 -1
- package/dist/subscriberbot/admin/index.js +1 -1
- package/dist/subscriberbot/components/EmptyState.d.ts +0 -2
- package/dist/subscriberbot/components/EmptyState.js +1 -2
- package/dist/subscriberbot/components/EmptyState.js.map +1 -1
- package/dist/subscriberbot/components/MetricsCard.d.ts +0 -2
- package/dist/subscriberbot/components/MetricsCard.js +1 -2
- package/dist/subscriberbot/components/MetricsCard.js.map +1 -1
- package/dist/subscriberbot/components/Modal.d.ts +0 -2
- package/dist/subscriberbot/components/Modal.js +2 -3
- package/dist/subscriberbot/components/Modal.js.map +1 -1
- package/dist/subscriberbot/components/PageLayout.d.ts +0 -2
- package/dist/subscriberbot/components/PageLayout.js +1 -2
- package/dist/subscriberbot/components/PageLayout.js.map +1 -1
- package/dist/subscriberbot/components/PostureOptions.d.ts +1 -3
- package/dist/subscriberbot/components/PostureOptions.js +7 -8
- package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
- package/dist/subscriberbot/components/StateViews.d.ts +0 -2
- package/dist/subscriberbot/components/StateViews.js +1 -2
- package/dist/subscriberbot/components/StateViews.js.map +1 -1
- package/dist/subscriberbot/components/StatusBadge.d.ts +0 -2
- package/dist/subscriberbot/components/StatusBadge.js +2 -3
- package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
- package/dist/subscriberbot/components/decisions/DecisionBanners.d.ts +0 -2
- package/dist/subscriberbot/components/decisions/DecisionBanners.js +7 -8
- package/dist/subscriberbot/components/decisions/DecisionBanners.js.map +1 -1
- package/dist/subscriberbot/components/decisions/DecisionCard.d.ts +0 -2
- package/dist/subscriberbot/components/decisions/DecisionCard.js +65 -66
- package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
- package/dist/subscriberbot/components/decisions/decisionModel.d.ts +0 -2
- package/dist/subscriberbot/components/decisions/decisionModel.js +2 -3
- package/dist/subscriberbot/components/decisions/decisionModel.js.map +1 -1
- package/dist/subscriberbot/components/decisions/index.d.ts +0 -1
- package/dist/subscriberbot/components/decisions/index.js +4 -3
- package/dist/subscriberbot/components/index.d.ts +0 -1
- package/dist/subscriberbot/components/index.js +8 -7
- package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts +0 -2
- package/dist/subscriberbot/components/mobile/MobileDashboard.js +23 -24
- package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts +0 -2
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +40 -49
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileScreen.d.ts +0 -2
- package/dist/subscriberbot/components/mobile/MobileScreen.js +1 -2
- package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
- package/dist/subscriberbot/components/mobile/RelationshipGlyph.d.ts +0 -2
- package/dist/subscriberbot/components/mobile/RelationshipGlyph.js +1 -2
- package/dist/subscriberbot/components/mobile/RelationshipGlyph.js.map +1 -1
- package/dist/subscriberbot/components/mobile/index.d.ts +0 -1
- package/dist/subscriberbot/components/mobile/index.js +4 -3
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.d.ts +0 -2
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +1 -2
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js.map +1 -1
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts +0 -2
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +4 -5
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
- package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts +0 -2
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js +4 -5
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
- package/dist/subscriberbot/components/negotiations/index.d.ts +0 -1
- package/dist/subscriberbot/components/negotiations/index.js +5 -4
- package/dist/subscriberbot/components/negotiations/labels.d.ts +0 -2
- package/dist/subscriberbot/components/negotiations/labels.js +1 -2
- package/dist/subscriberbot/components/negotiations/labels.js.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts +0 -2
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +4 -5
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.d.ts +0 -2
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +1 -2
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts +0 -2
- package/dist/subscriberbot/components/procurement/ProcurementThread.js +4 -5
- package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
- package/dist/subscriberbot/components/procurement/index.d.ts +0 -1
- package/dist/subscriberbot/components/procurement/index.js +5 -4
- package/dist/subscriberbot/components/procurement/labels.d.ts +0 -2
- package/dist/subscriberbot/components/procurement/labels.js +1 -2
- package/dist/subscriberbot/components/procurement/labels.js.map +1 -1
- package/dist/subscriberbot/components/savings/SavingsCards.d.ts +0 -2
- package/dist/subscriberbot/components/savings/SavingsCards.js +90 -91
- package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
- package/dist/subscriberbot/components/savings/index.d.ts +0 -1
- package/dist/subscriberbot/components/savings/index.js +3 -2
- package/dist/subscriberbot/components/savings/savingsModel.d.ts +0 -2
- package/dist/subscriberbot/components/savings/savingsModel.js +2 -3
- package/dist/subscriberbot/components/savings/savingsModel.js.map +1 -1
- package/dist/subscriberbot/components/viz.d.ts +0 -2
- package/dist/subscriberbot/components/viz.js +2 -3
- package/dist/subscriberbot/components/viz.js.map +1 -1
- package/dist/subscriberbot/config/assistantUsecases.d.ts +0 -1
- package/dist/subscriberbot/context/SubscriberBotContext.d.ts +0 -2
- package/dist/subscriberbot/context/SubscriberBotContext.js +3 -3
- package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
- package/dist/subscriberbot/context/index.d.ts +0 -1
- package/dist/subscriberbot/context/index.js +1 -1
- package/dist/subscriberbot/hooks/index.d.ts +0 -1
- package/dist/subscriberbot/hooks/index.js +2 -2
- package/dist/subscriberbot/hooks/useAutonomousAgentMode.d.ts +0 -2
- package/dist/subscriberbot/hooks/useAutonomousAgentMode.js +2 -3
- package/dist/subscriberbot/hooks/useAutonomousAgentMode.js.map +1 -1
- package/dist/subscriberbot/hooks/useBankingApi.d.ts +0 -2
- package/dist/subscriberbot/hooks/useBankingApi.js +2 -3
- package/dist/subscriberbot/hooks/useBankingApi.js.map +1 -1
- package/dist/subscriberbot/hooks/useCompactViewport.d.ts +0 -1
- package/dist/subscriberbot/hooks/useCompactViewport.js +1 -2
- package/dist/subscriberbot/hooks/useCompactViewport.js.map +1 -1
- package/dist/subscriberbot/hooks/useFormError.d.ts +0 -1
- package/dist/subscriberbot/hooks/useFormError.js +1 -2
- package/dist/subscriberbot/hooks/useFormError.js.map +1 -1
- package/dist/subscriberbot/hooks/useFormatters.d.ts +0 -1
- package/dist/subscriberbot/hooks/useFormatters.js +1 -2
- package/dist/subscriberbot/hooks/useFormatters.js.map +1 -1
- package/dist/subscriberbot/hooks/useNegotiationApi.d.ts +0 -2
- package/dist/subscriberbot/hooks/useNegotiationApi.js +2 -3
- package/dist/subscriberbot/hooks/useNegotiationApi.js.map +1 -1
- package/dist/subscriberbot/hooks/useProcurementApi.d.ts +0 -2
- package/dist/subscriberbot/hooks/useProcurementApi.js +2 -3
- package/dist/subscriberbot/hooks/useProcurementApi.js.map +1 -1
- package/dist/subscriberbot/hooks/useRouteSelection.d.ts +0 -1
- package/dist/subscriberbot/hooks/useRouteSelection.js +3 -3
- package/dist/subscriberbot/hooks/useRouteSelection.js.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts +0 -2
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +1 -2
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/hooks/useTr.d.ts +0 -1
- package/dist/subscriberbot/hooks/useTr.js +1 -2
- package/dist/subscriberbot/hooks/useTr.js.map +1 -1
- package/dist/subscriberbot/index.d.ts +0 -1
- package/dist/subscriberbot/index.js +9 -8
- package/dist/subscriberbot/pages/AssetVaultPage.d.ts +0 -2
- package/dist/subscriberbot/pages/AssetVaultPage.js +34 -35
- package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
- package/dist/subscriberbot/pages/DashboardPage.d.ts +1 -2
- package/dist/subscriberbot/pages/DashboardPage.js +86 -87
- package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.d.ts +1 -2
- package/dist/subscriberbot/pages/InboxPage.js +194 -199
- package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.d.ts +0 -2
- package/dist/subscriberbot/pages/InsightsPage.js +28 -29
- package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
- package/dist/subscriberbot/pages/InvoicesPage.d.ts +1 -2
- package/dist/subscriberbot/pages/InvoicesPage.js +179 -188
- package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
- package/dist/subscriberbot/pages/RenewalsPage.d.ts +0 -2
- package/dist/subscriberbot/pages/RenewalsPage.js +293 -298
- package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
- package/dist/subscriberbot/pages/SavingsPage.d.ts +0 -2
- package/dist/subscriberbot/pages/SavingsPage.js +25 -26
- package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/WorkflowsPage.d.ts +1 -2
- package/dist/subscriberbot/pages/WorkflowsPage.js +67 -68
- package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts +1 -2
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js +126 -127
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts +1 -2
- package/dist/subscriberbot/pages/agents/AgentNewPage.js +10 -11
- package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts +1 -2
- package/dist/subscriberbot/pages/agents/AgentsListPage.js +23 -24
- package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts +1 -2
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +337 -359
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
- package/dist/subscriberbot/pages/banking/ConnectBankModal.d.ts +1 -3
- package/dist/subscriberbot/pages/banking/ConnectBankModal.js +22 -27
- package/dist/subscriberbot/pages/banking/ConnectBankModal.js.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts +1 -2
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +25 -26
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts +1 -2
- package/dist/subscriberbot/pages/decisions/DecisionsPage.js +34 -35
- package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts +1 -2
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +125 -130
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts +1 -2
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +94 -95
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts +1 -2
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +15 -16
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts +1 -2
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +20 -21
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts +1 -2
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +86 -87
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts +1 -2
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +164 -165
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts +1 -2
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js +20 -21
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts +1 -2
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +350 -351
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderInsights.d.ts +2 -3
- package/dist/subscriberbot/pages/providers/ProviderInsights.js +95 -96
- package/dist/subscriberbot/pages/providers/ProviderInsights.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts +1 -2
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js +11 -12
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts +1 -2
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js +62 -63
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts +1 -2
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +166 -172
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts +1 -2
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +12 -13
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts +1 -2
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +21 -22
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.d.ts +1 -3
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +242 -255
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts +0 -2
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +2 -3
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
- package/dist/subscriberbot/services/createSandboxAssistantTransport.d.ts +0 -1
- package/dist/subscriberbot/services/createSandboxAssistantTransport.js +1 -2
- package/dist/subscriberbot/services/createSandboxAssistantTransport.js.map +1 -1
- package/dist/subscriberbot/store/index.d.ts +0 -1
- package/dist/subscriberbot/store/index.js +1 -1
- package/dist/subscriberbot/store/subscriberbotStore.d.ts +1 -3
- package/dist/subscriberbot/store/subscriberbotStore.js +1 -2
- package/dist/subscriberbot/store/subscriberbotStore.js.map +1 -1
- package/dist/subscriberbot/types/assistant.d.ts +0 -2
- package/dist/subscriberbot/types/banking.d.ts +0 -2
- package/dist/subscriberbot/types/index.d.ts +0 -2
- package/dist/subscriberbot/types/negotiation.d.ts +0 -2
- package/dist/subscriberbot/types/procurement.d.ts +0 -1
- package/dist/subscriberbot/utils/bankRedirectLink.d.ts +0 -2
- package/dist/subscriberbot/utils/bankRedirectLink.js +18 -19
- package/dist/subscriberbot/utils/bankRedirectLink.js.map +1 -1
- package/dist/subscriberbot/utils/chartScale.d.ts +0 -1
- package/dist/subscriberbot/utils/chartScale.js +1 -2
- package/dist/subscriberbot/utils/chartScale.js.map +1 -1
- package/dist/subscriberbot/utils/cn.d.ts +0 -2
- package/dist/subscriberbot/utils/cn.js +2 -3
- package/dist/subscriberbot/utils/cn.js.map +1 -1
- package/dist/subscriberbot/utils/formatters.d.ts +0 -1
- package/dist/subscriberbot/utils/formatters.js +4 -5
- package/dist/subscriberbot/utils/formatters.js.map +1 -1
- package/dist/subscriberbot/utils/index.d.ts +0 -1
- package/dist/subscriberbot/utils/navigation.d.ts +0 -1
- package/dist/subscriberbot/utils/navigation.js +1 -2
- package/dist/subscriberbot/utils/navigation.js.map +1 -1
- package/dist/subscriberbot/utils/pageContext.d.ts +0 -1
- package/dist/subscriberbot/utils/pageContext.js +3 -4
- package/dist/subscriberbot/utils/pageContext.js.map +1 -1
- package/dist/subscriberbot/utils/plaidLink.d.ts +0 -1
- package/dist/subscriberbot/utils/plaidLink.js +21 -22
- package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
- package/dist/subscriberbot/utils/portfolio.d.ts +0 -2
- package/dist/subscriberbot/utils/portfolio.js +5 -6
- package/dist/subscriberbot/utils/portfolio.js.map +1 -1
- package/dist/subscriberbot/utils/renewals.d.ts +0 -2
- package/dist/subscriberbot/utils/renewals.js +1 -2
- package/dist/subscriberbot/utils/renewals.js.map +1 -1
- package/package.json +73 -56
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/stories/Accessibility.stories.d.ts.map +0 -1
- package/dist/stories/EmptyState.stories.d.ts.map +0 -1
- package/dist/stories/MetricsCard.stories.d.ts.map +0 -1
- package/dist/stories/StatusBadge.stories.d.ts.map +0 -1
- package/dist/stories/pages/AgentDetailPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/AgentNewPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/AgentsListPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/AssetVaultPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/BankConnectionsPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/DashboardPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/DecisionDetailPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/DecisionsPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/EnterpriseSpendPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/InboxPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/InboxReadState.stories.d.ts.map +0 -1
- package/dist/stories/pages/InsightsPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/InvoicesPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/NegotiationDetailPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/NegotiationNewPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/NegotiationsPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/ProcurementDetailPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/ProcurementNewPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/ProcurementPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/ProviderDetailPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/ProviderNewPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/ProvidersListPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/RelationshipDetailPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/RelationshipNewPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/RelationshipsListPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/RenewalsPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/SavingsPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/WorkflowBuilderPage.stories.d.ts.map +0 -1
- package/dist/stories/pages/WorkflowsPage.stories.d.ts.map +0 -1
- package/dist/stories/support/PageHarness.d.ts.map +0 -1
- package/dist/stories/support/bankingFixtures.d.ts.map +0 -1
- package/dist/stories/support/fixtures.d.ts.map +0 -1
- package/dist/stories/support/graphqlMock.d.ts.map +0 -1
- package/dist/stories/support/handlers.d.ts.map +0 -1
- package/dist/stories/support/negotiationFixtures.d.ts.map +0 -1
- package/dist/stories/support/phoneViewport.d.ts.map +0 -1
- package/dist/stories/support/play.d.ts.map +0 -1
- package/dist/stories/support/procurementFixtures.d.ts.map +0 -1
- package/dist/subscriberbot/SubscriberBotRoot.d.ts.map +0 -1
- package/dist/subscriberbot/SubscriberBotRoutes.d.ts.map +0 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +0 -1
- package/dist/subscriberbot/admin/AdminRoot.d.ts.map +0 -1
- package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts.map +0 -1
- package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts.map +0 -1
- package/dist/subscriberbot/admin/index.d.ts.map +0 -1
- package/dist/subscriberbot/components/EmptyState.d.ts.map +0 -1
- package/dist/subscriberbot/components/MetricsCard.d.ts.map +0 -1
- package/dist/subscriberbot/components/Modal.d.ts.map +0 -1
- package/dist/subscriberbot/components/PageLayout.d.ts.map +0 -1
- package/dist/subscriberbot/components/PostureOptions.d.ts.map +0 -1
- package/dist/subscriberbot/components/StateViews.d.ts.map +0 -1
- package/dist/subscriberbot/components/StatusBadge.d.ts.map +0 -1
- package/dist/subscriberbot/components/decisions/DecisionBanners.d.ts.map +0 -1
- package/dist/subscriberbot/components/decisions/DecisionCard.d.ts.map +0 -1
- package/dist/subscriberbot/components/decisions/decisionModel.d.ts.map +0 -1
- package/dist/subscriberbot/components/decisions/index.d.ts.map +0 -1
- package/dist/subscriberbot/components/index.d.ts.map +0 -1
- package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts.map +0 -1
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts.map +0 -1
- package/dist/subscriberbot/components/mobile/MobileScreen.d.ts.map +0 -1
- package/dist/subscriberbot/components/mobile/RelationshipGlyph.d.ts.map +0 -1
- package/dist/subscriberbot/components/mobile/index.d.ts.map +0 -1
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.d.ts.map +0 -1
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts.map +0 -1
- package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts.map +0 -1
- package/dist/subscriberbot/components/negotiations/index.d.ts.map +0 -1
- package/dist/subscriberbot/components/negotiations/labels.d.ts.map +0 -1
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts.map +0 -1
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.d.ts.map +0 -1
- package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts.map +0 -1
- package/dist/subscriberbot/components/procurement/index.d.ts.map +0 -1
- package/dist/subscriberbot/components/procurement/labels.d.ts.map +0 -1
- package/dist/subscriberbot/components/savings/SavingsCards.d.ts.map +0 -1
- package/dist/subscriberbot/components/savings/index.d.ts.map +0 -1
- package/dist/subscriberbot/components/savings/savingsModel.d.ts.map +0 -1
- package/dist/subscriberbot/components/viz.d.ts.map +0 -1
- package/dist/subscriberbot/config/assistantUsecases.d.ts.map +0 -1
- package/dist/subscriberbot/context/SubscriberBotContext.d.ts.map +0 -1
- package/dist/subscriberbot/context/index.d.ts.map +0 -1
- package/dist/subscriberbot/hooks/index.d.ts.map +0 -1
- package/dist/subscriberbot/hooks/useAutonomousAgentMode.d.ts.map +0 -1
- package/dist/subscriberbot/hooks/useBankingApi.d.ts.map +0 -1
- package/dist/subscriberbot/hooks/useCompactViewport.d.ts.map +0 -1
- package/dist/subscriberbot/hooks/useFormError.d.ts.map +0 -1
- package/dist/subscriberbot/hooks/useFormatters.d.ts.map +0 -1
- package/dist/subscriberbot/hooks/useNegotiationApi.d.ts.map +0 -1
- package/dist/subscriberbot/hooks/useProcurementApi.d.ts.map +0 -1
- package/dist/subscriberbot/hooks/useRouteSelection.d.ts.map +0 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +0 -1
- package/dist/subscriberbot/hooks/useTr.d.ts.map +0 -1
- package/dist/subscriberbot/index.d.ts.map +0 -1
- package/dist/subscriberbot/pages/AssetVaultPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/DashboardPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/InboxPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/InsightsPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/RenewalsPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/SavingsPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/WorkflowsPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/banking/ConnectBankModal.d.ts.map +0 -1
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/providers/ProviderInsights.d.ts.map +0 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.d.ts.map +0 -1
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts.map +0 -1
- package/dist/subscriberbot/services/createSandboxAssistantTransport.d.ts.map +0 -1
- package/dist/subscriberbot/store/index.d.ts.map +0 -1
- package/dist/subscriberbot/store/subscriberbotStore.d.ts.map +0 -1
- package/dist/subscriberbot/types/assistant.d.ts.map +0 -1
- package/dist/subscriberbot/types/banking.d.ts.map +0 -1
- package/dist/subscriberbot/types/index.d.ts.map +0 -1
- package/dist/subscriberbot/types/negotiation.d.ts.map +0 -1
- package/dist/subscriberbot/types/procurement.d.ts.map +0 -1
- package/dist/subscriberbot/utils/bankRedirectLink.d.ts.map +0 -1
- package/dist/subscriberbot/utils/chartScale.d.ts.map +0 -1
- package/dist/subscriberbot/utils/cn.d.ts.map +0 -1
- package/dist/subscriberbot/utils/formatters.d.ts.map +0 -1
- package/dist/subscriberbot/utils/index.d.ts.map +0 -1
- package/dist/subscriberbot/utils/navigation.d.ts.map +0 -1
- package/dist/subscriberbot/utils/pageContext.d.ts.map +0 -1
- package/dist/subscriberbot/utils/plaidLink.d.ts.map +0 -1
- package/dist/subscriberbot/utils/portfolio.d.ts.map +0 -1
- package/dist/subscriberbot/utils/renewals.d.ts.map +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { PageLayout as
|
|
1
|
+
import { useFormError as e } from "../../hooks/useFormError.js";
|
|
2
|
+
import { useFormatters as t } from "../../hooks/useFormatters.js";
|
|
3
|
+
import "../../components/index.js";
|
|
4
|
+
import { useSubscriberBot as n } from "../../context/SubscriberBotContext.js";
|
|
5
|
+
import { PageLayout as r } from "../../components/PageLayout.js";
|
|
6
6
|
import { MetricsCard as i } from "../../components/MetricsCard.js";
|
|
7
7
|
import { StatusBadge as a } from "../../components/StatusBadge.js";
|
|
8
8
|
import { EmptyState as o } from "../../components/EmptyState.js";
|
|
9
9
|
import { Modal as s } from "../../components/Modal.js";
|
|
10
10
|
import { ErrorView as c, LoadingView as l, Section as u } from "../../components/StateViews.js";
|
|
11
|
-
import "../../
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { consumeBankRedirect as
|
|
15
|
-
import { openPlaidLink as
|
|
16
|
-
import { ConnectBankModal as
|
|
17
|
-
import { useEffect as
|
|
18
|
-
import { CalendarClock as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { PagePurpose as
|
|
21
|
-
|
|
22
|
-
var
|
|
11
|
+
import { useBankAggregators as d, useBankConnections as ee, useCompleteBankLink as f, useCreateBankLinkSession as te, useDismissRecurringCharge as p, useImportBankStatement as ne, useRecurringCharges as m, useRemoveBankConnection as h, useRestoreRecurringCharge as re, useSyncBankConnection as g, useTrackRecurringCharge as ie } from "../../hooks/useBankingApi.js";
|
|
12
|
+
import { useTr as _ } from "../../hooks/useTr.js";
|
|
13
|
+
import { cn as v } from "../../utils/cn.js";
|
|
14
|
+
import { consumeBankRedirect as y, savePendingBankLink as b } from "../../utils/bankRedirectLink.js";
|
|
15
|
+
import { openPlaidLink as x } from "../../utils/plaidLink.js";
|
|
16
|
+
import { ConnectBankModal as S } from "./ConnectBankModal.js";
|
|
17
|
+
import { useEffect as C, useMemo as w, useRef as ae, useState as T } from "react";
|
|
18
|
+
import { CalendarClock as oe, FileUp as se, Landmark as ce, Link2 as E, RefreshCw as le, Repeat as ue, ShieldCheck as de, Trash2 as fe } from "lucide-react";
|
|
19
|
+
import { Fragment as pe, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
20
|
+
import { PagePurpose as me } from "@burdenoff/fe-libs/ui";
|
|
21
|
+
// src/subscriberbot/pages/banking/BankConnectionsPage.tsx
|
|
22
|
+
var k = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", A = "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50", j = "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 disabled:opacity-50", M = "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-2.5 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50", he = [
|
|
23
23
|
"DETECTED",
|
|
24
24
|
"TRACKED",
|
|
25
25
|
"DISMISSED"
|
|
26
|
-
],
|
|
26
|
+
], ge = {
|
|
27
27
|
DETECTED: {
|
|
28
28
|
key: "banking.charges.detected",
|
|
29
29
|
fallback: "To review"
|
|
@@ -36,11 +36,11 @@ var O = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
|
|
|
36
36
|
key: "banking.charges.dismissed",
|
|
37
37
|
fallback: "Dismissed"
|
|
38
38
|
}
|
|
39
|
-
},
|
|
39
|
+
}, _e = 2e6, N = /* @__PURE__ */ new Set([
|
|
40
40
|
"PLAID",
|
|
41
41
|
"TRUELAYER",
|
|
42
42
|
"ACCOUNT_AGGREGATOR"
|
|
43
|
-
]),
|
|
43
|
+
]), ve = {
|
|
44
44
|
PLAID: {
|
|
45
45
|
key: "banking.connections.viaPlaid",
|
|
46
46
|
fallback: "Linked with Plaid"
|
|
@@ -57,455 +57,443 @@ var O = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
|
|
|
57
57
|
key: "banking.connections.viaImport",
|
|
58
58
|
fallback: "Statement import"
|
|
59
59
|
}
|
|
60
|
-
},
|
|
60
|
+
}, ye = (e) => {
|
|
61
61
|
if (!e) return !1;
|
|
62
62
|
try {
|
|
63
63
|
return new URL(e).protocol === "https:";
|
|
64
64
|
} catch {
|
|
65
65
|
return !1;
|
|
66
66
|
}
|
|
67
|
-
},
|
|
68
|
-
function
|
|
69
|
-
let { formatCurrency:
|
|
70
|
-
let
|
|
71
|
-
for (let
|
|
72
|
-
return [...
|
|
73
|
-
}, [
|
|
67
|
+
}, P = (e, t) => e instanceof Error ? e.message : t("common.somethingWentWrong", "Something went wrong");
|
|
68
|
+
function F() {
|
|
69
|
+
let { formatCurrency: e, formatDate: s, formatIntervalSuffix: ne } = t(), k = _(), { navigateTo: _e } = n(), [F, xe] = T("DETECTED"), [Se, I] = T(!1), [L, R] = T(null), [z, B] = T(!1), [V, H] = T(null), Ce = ae(!1), U = d(), W = ee(), G = m(F), K = m("DETECTED"), we = m("TRACKED"), q = te(), Te = f(), J = g(), Ee = h(), De = ie(), Oe = p(), ke = re(), Y = w(() => (U.data ?? []).filter((e) => N.has(e.aggregator)), [U.data]), X = Y.some((e) => e.available), Ae = (e) => Y.some((t) => t.aggregator === e && t.available), Z = W.data?.items ?? [], je = G.data?.items ?? [], Me = w(() => {
|
|
70
|
+
let t = /* @__PURE__ */ new Map();
|
|
71
|
+
for (let e of K.data?.items ?? []) t.set(e.currency, (t.get(e.currency) ?? 0) + e.annualCost);
|
|
72
|
+
return [...t.entries()].map(([t, n]) => e(n, t)).join(" + ");
|
|
73
|
+
}, [K.data, e]), Q = (e) => k("banking.notice.synced", "{{added}} new transaction(s) from {{institution}}; {{recurring}} recurring charge(s) found.", {
|
|
74
74
|
added: e.added,
|
|
75
75
|
institution: e.connection.institutionName,
|
|
76
76
|
recurring: e.recurringDetected
|
|
77
|
-
}),
|
|
78
|
-
|
|
77
|
+
}), Ne = async () => {
|
|
78
|
+
R(null), B(!0);
|
|
79
79
|
try {
|
|
80
|
-
let e = await
|
|
81
|
-
if (!
|
|
82
|
-
|
|
80
|
+
let e = await q.mutateAsync({ aggregator: "PLAID" }), t = await x(e.linkToken, k);
|
|
81
|
+
if (!t) return;
|
|
82
|
+
let n = await Te.mutateAsync({ input: {
|
|
83
|
+
aggregator: "PLAID",
|
|
84
|
+
publicToken: t.publicToken,
|
|
85
|
+
institutionId: t.institutionId,
|
|
86
|
+
institutionName: t.institutionName
|
|
87
|
+
} });
|
|
88
|
+
R({
|
|
83
89
|
tone: "success",
|
|
84
|
-
text:
|
|
85
|
-
aggregator: "PLAID",
|
|
86
|
-
publicToken: e.publicToken,
|
|
87
|
-
institutionId: e.institutionId,
|
|
88
|
-
institutionName: e.institutionName
|
|
89
|
-
} }))
|
|
90
|
+
text: Q(n)
|
|
90
91
|
});
|
|
91
92
|
} catch (e) {
|
|
92
|
-
|
|
93
|
+
R({
|
|
93
94
|
tone: "error",
|
|
94
|
-
text:
|
|
95
|
+
text: P(e, k)
|
|
95
96
|
});
|
|
96
97
|
} finally {
|
|
97
|
-
|
|
98
|
+
B(!1);
|
|
98
99
|
}
|
|
99
|
-
},
|
|
100
|
-
|
|
100
|
+
}, Pe = async (e, t, n) => {
|
|
101
|
+
R(null), B(!0);
|
|
101
102
|
try {
|
|
102
|
-
let r = await
|
|
103
|
+
let r = await q.mutateAsync({
|
|
103
104
|
aggregator: e,
|
|
104
105
|
...n ? { connectionId: n.id } : {},
|
|
105
106
|
...t ? { customerIdentifier: t } : {}
|
|
106
107
|
});
|
|
107
|
-
if (!
|
|
108
|
-
|
|
108
|
+
if (!ye(r.linkUrl)) throw Error(k("common.somethingWentWrong", "Something went wrong"));
|
|
109
|
+
b({
|
|
109
110
|
aggregator: e,
|
|
110
111
|
linkToken: r.linkToken,
|
|
111
112
|
connectionId: n?.id ?? null
|
|
112
113
|
}), window.location.assign(r.linkUrl);
|
|
113
114
|
} catch (e) {
|
|
114
|
-
|
|
115
|
+
R({
|
|
115
116
|
tone: "error",
|
|
116
|
-
text:
|
|
117
|
-
}),
|
|
117
|
+
text: P(e, k)
|
|
118
|
+
}), B(!1);
|
|
118
119
|
}
|
|
119
|
-
},
|
|
120
|
-
let n =
|
|
121
|
-
|
|
122
|
-
n ? Q(n) : Pe();
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
Fe(e, t, n);
|
|
120
|
+
}, Fe = (e, t) => {
|
|
121
|
+
let n = V?.connection ?? null;
|
|
122
|
+
H(null), e === "PLAID" ? n ? Ie(n) : Ne() : Pe(e, t, n);
|
|
126
123
|
};
|
|
127
|
-
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
let e =
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
publicToken: e.publicToken,
|
|
149
|
-
state: e.state
|
|
150
|
-
} }).then((e) => L({
|
|
151
|
-
tone: "success",
|
|
152
|
-
text: Z(e)
|
|
153
|
-
})).catch((e) => L({
|
|
154
|
-
tone: "error",
|
|
155
|
-
text: N(e, O)
|
|
156
|
-
})).finally(() => z(!1));
|
|
157
|
-
}
|
|
124
|
+
C(() => {
|
|
125
|
+
if (Ce.current) return;
|
|
126
|
+
Ce.current = !0;
|
|
127
|
+
let e = y();
|
|
128
|
+
e && (e.kind === "expired" ? R({
|
|
129
|
+
tone: "error",
|
|
130
|
+
text: k("banking.redirect.expired", "That bank link could not be finished here. Start connecting the bank again.")
|
|
131
|
+
}) : e.kind === "declined" ? R({
|
|
132
|
+
tone: "error",
|
|
133
|
+
text: k("banking.redirect.declined", "The bank or Account Aggregator did not grant access, so nothing was connected.")
|
|
134
|
+
}) : (B(!0), Te.mutateAsync({ input: {
|
|
135
|
+
aggregator: e.aggregator,
|
|
136
|
+
publicToken: e.publicToken,
|
|
137
|
+
state: e.state
|
|
138
|
+
} }).then((e) => R({
|
|
139
|
+
tone: "success",
|
|
140
|
+
text: Q(e)
|
|
141
|
+
})).catch((e) => R({
|
|
142
|
+
tone: "error",
|
|
143
|
+
text: P(e, k)
|
|
144
|
+
})).finally(() => B(!1))));
|
|
158
145
|
}, []);
|
|
159
|
-
let
|
|
160
|
-
|
|
146
|
+
let Ie = async (e) => {
|
|
147
|
+
R(null), B(!0);
|
|
161
148
|
try {
|
|
162
|
-
|
|
149
|
+
let t = await q.mutateAsync({
|
|
163
150
|
aggregator: "PLAID",
|
|
164
151
|
connectionId: e.id
|
|
165
|
-
})
|
|
166
|
-
|
|
152
|
+
});
|
|
153
|
+
if (!await x(t.linkToken, k)) return;
|
|
154
|
+
R({
|
|
167
155
|
tone: "success",
|
|
168
|
-
text:
|
|
156
|
+
text: Q(await J.mutateAsync({ id: e.id }))
|
|
169
157
|
});
|
|
170
158
|
} catch (e) {
|
|
171
|
-
|
|
159
|
+
R({
|
|
172
160
|
tone: "error",
|
|
173
|
-
text:
|
|
161
|
+
text: P(e, k)
|
|
174
162
|
});
|
|
175
163
|
} finally {
|
|
176
|
-
|
|
164
|
+
B(!1);
|
|
177
165
|
}
|
|
178
166
|
}, Le = async (e) => {
|
|
179
|
-
|
|
167
|
+
R(null);
|
|
180
168
|
try {
|
|
181
|
-
|
|
169
|
+
R({
|
|
182
170
|
tone: "success",
|
|
183
|
-
text:
|
|
171
|
+
text: Q(await J.mutateAsync({ id: e.id }))
|
|
184
172
|
});
|
|
185
173
|
} catch (e) {
|
|
186
|
-
|
|
174
|
+
R({
|
|
187
175
|
tone: "error",
|
|
188
|
-
text:
|
|
176
|
+
text: P(e, k)
|
|
189
177
|
});
|
|
190
178
|
}
|
|
191
179
|
}, Re = async (e) => {
|
|
192
|
-
if (window.confirm(
|
|
193
|
-
|
|
180
|
+
if (window.confirm(k("banking.disconnect.confirm", "Disconnect {{institution}}? Its accounts and transactions are deleted from Subscriber Bot. Subscriptions you already track stay.", { institution: e.institutionName }))) {
|
|
181
|
+
R(null);
|
|
194
182
|
try {
|
|
195
|
-
await
|
|
183
|
+
await Ee.mutateAsync({ id: e.id }), R({
|
|
196
184
|
tone: "success",
|
|
197
|
-
text:
|
|
185
|
+
text: k("banking.notice.disconnected", "{{institution}} was disconnected.", { institution: e.institutionName })
|
|
198
186
|
});
|
|
199
187
|
} catch (e) {
|
|
200
|
-
|
|
188
|
+
R({
|
|
201
189
|
tone: "error",
|
|
202
|
-
text:
|
|
190
|
+
text: P(e, k)
|
|
203
191
|
});
|
|
204
192
|
}
|
|
205
193
|
}
|
|
206
194
|
}, $ = async (e, t) => {
|
|
207
|
-
|
|
195
|
+
R(null);
|
|
208
196
|
try {
|
|
209
197
|
let n = await {
|
|
210
|
-
track:
|
|
211
|
-
dismiss:
|
|
212
|
-
restore:
|
|
198
|
+
track: De,
|
|
199
|
+
dismiss: Oe,
|
|
200
|
+
restore: ke
|
|
213
201
|
}[e].mutateAsync({ id: t.id });
|
|
214
|
-
e === "track" &&
|
|
202
|
+
e === "track" && R({
|
|
215
203
|
tone: "success",
|
|
216
|
-
text:
|
|
204
|
+
text: k("banking.notice.tracked", "{{name}} is now tracked as a subscription.", { name: n.displayName })
|
|
217
205
|
});
|
|
218
206
|
} catch (e) {
|
|
219
|
-
|
|
207
|
+
R({
|
|
220
208
|
tone: "error",
|
|
221
|
-
text:
|
|
209
|
+
text: P(e, k)
|
|
222
210
|
});
|
|
223
211
|
}
|
|
224
|
-
}, ze = /* @__PURE__ */
|
|
212
|
+
}, ze = /* @__PURE__ */ O("div", {
|
|
225
213
|
className: "flex flex-wrap gap-2",
|
|
226
214
|
"data-tour": "subscriberbot-banking-connect",
|
|
227
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ O("button", {
|
|
228
216
|
type: "button",
|
|
229
|
-
className:
|
|
230
|
-
onClick: () =>
|
|
217
|
+
className: j,
|
|
218
|
+
onClick: () => I(!0),
|
|
231
219
|
children: [
|
|
232
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ D(se, {
|
|
233
221
|
className: "h-4 w-4",
|
|
234
222
|
"aria-hidden": !0
|
|
235
223
|
}),
|
|
236
224
|
" ",
|
|
237
|
-
|
|
225
|
+
k("banking.import.open", "Import a statement")
|
|
238
226
|
]
|
|
239
|
-
}), /* @__PURE__ */
|
|
227
|
+
}), /* @__PURE__ */ O("button", {
|
|
240
228
|
type: "button",
|
|
241
|
-
className:
|
|
242
|
-
onClick: () =>
|
|
243
|
-
disabled: !
|
|
229
|
+
className: A,
|
|
230
|
+
onClick: () => H({ connection: null }),
|
|
231
|
+
disabled: !X || z,
|
|
244
232
|
"data-testid": "connect-bank",
|
|
245
|
-
title:
|
|
246
|
-
children: [/* @__PURE__ */ E
|
|
233
|
+
title: X ? void 0 : k("banking.plaid.unavailable", "Bank linking is not switched on yet. Import a statement instead."),
|
|
234
|
+
children: [/* @__PURE__ */ D(E, {
|
|
247
235
|
className: "h-4 w-4",
|
|
248
236
|
"aria-hidden": !0
|
|
249
|
-
}),
|
|
237
|
+
}), z ? k("banking.plaid.linking", "Connecting…") : k("banking.plaid.connect", "Connect a bank")]
|
|
250
238
|
})]
|
|
251
239
|
});
|
|
252
|
-
return /* @__PURE__ */
|
|
240
|
+
return /* @__PURE__ */ O(r, {
|
|
253
241
|
dataTour: "subscriberbot-banking",
|
|
254
|
-
title:
|
|
255
|
-
description:
|
|
242
|
+
title: k("banking.title", "Bank & card connections"),
|
|
243
|
+
description: k("banking.description", "Find every subscription in your bank and card transactions."),
|
|
256
244
|
actions: ze,
|
|
257
245
|
children: [
|
|
258
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ D(me, {
|
|
259
247
|
className: "mb-6",
|
|
260
|
-
children:
|
|
248
|
+
children: k("banking.purpose", "Connect a bank or card (US through Plaid, UK and Europe through open banking, India through an Account Aggregator), or import the CSV export any bank lets you download. Subscriber Bot spots the charges that repeat every week, month, quarter or year so you can track them or wave them off. Your bank password is never shared with Subscriber Bot, and only you can see these accounts.")
|
|
261
249
|
}),
|
|
262
|
-
|
|
250
|
+
U.data && !X && /* @__PURE__ */ O("p", {
|
|
263
251
|
className: "mb-4 flex items-start gap-2 rounded-lg border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-secondary",
|
|
264
252
|
"data-testid": "plaid-unavailable",
|
|
265
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ D(de, {
|
|
266
254
|
className: "mt-0.5 h-4 w-4 shrink-0",
|
|
267
255
|
"aria-hidden": !0
|
|
268
|
-
}),
|
|
256
|
+
}), k("banking.plaid.unavailableLong", "Direct bank linking is being switched on. Until then, import a statement export: it finds the same recurring charges.")]
|
|
269
257
|
}),
|
|
270
|
-
|
|
271
|
-
role:
|
|
272
|
-
className:
|
|
258
|
+
L && /* @__PURE__ */ D("p", {
|
|
259
|
+
role: L.tone === "error" ? "alert" : "status",
|
|
260
|
+
className: v("mb-4 rounded-lg px-3 py-2 text-sm", L.tone === "error" ? "bg-status-error-bg-subtle text-status-error-text" : "bg-status-success-bg-subtle text-status-success-text"),
|
|
273
261
|
"data-testid": "banking-notice",
|
|
274
|
-
children:
|
|
262
|
+
children: L.text
|
|
275
263
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ O("div", {
|
|
277
265
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
278
266
|
"data-tour": "subscriberbot-banking-metrics",
|
|
279
267
|
children: [
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
icon: /* @__PURE__ */
|
|
282
|
-
value:
|
|
283
|
-
label:
|
|
268
|
+
/* @__PURE__ */ D(i, {
|
|
269
|
+
icon: /* @__PURE__ */ D(ce, { className: "h-5 w-5" }),
|
|
270
|
+
value: W.isLoading ? "—" : Z.length,
|
|
271
|
+
label: k("banking.metrics.connections", "Connected accounts")
|
|
284
272
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
-
icon: /* @__PURE__ */
|
|
287
|
-
value:
|
|
288
|
-
label:
|
|
273
|
+
/* @__PURE__ */ D(i, {
|
|
274
|
+
icon: /* @__PURE__ */ D(ue, { className: "h-5 w-5" }),
|
|
275
|
+
value: K.isLoading ? "—" : K.data?.items.length ?? 0,
|
|
276
|
+
label: k("banking.metrics.detected", "Charges to review")
|
|
289
277
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
-
icon: /* @__PURE__ */
|
|
292
|
-
value:
|
|
293
|
-
label:
|
|
278
|
+
/* @__PURE__ */ D(i, {
|
|
279
|
+
icon: /* @__PURE__ */ D(oe, { className: "h-5 w-5" }),
|
|
280
|
+
value: K.isLoading ? "—" : Me || e(0, "USD"),
|
|
281
|
+
label: k("banking.metrics.yearly", "Yearly cost to review")
|
|
294
282
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
296
|
-
icon: /* @__PURE__ */
|
|
297
|
-
value:
|
|
298
|
-
label:
|
|
283
|
+
/* @__PURE__ */ D(i, {
|
|
284
|
+
icon: /* @__PURE__ */ D(de, { className: "h-5 w-5" }),
|
|
285
|
+
value: we.isLoading ? "—" : we.data?.items.length ?? 0,
|
|
286
|
+
label: k("banking.metrics.tracked", "Tracked from your bank")
|
|
299
287
|
})
|
|
300
288
|
]
|
|
301
289
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ O(u, {
|
|
303
291
|
dataTour: "subscriberbot-banking-charges",
|
|
304
|
-
title:
|
|
305
|
-
description:
|
|
306
|
-
children: [/* @__PURE__ */
|
|
292
|
+
title: k("banking.charges.title", "Recurring charges found"),
|
|
293
|
+
description: k("banking.charges.description", "Charges from the same merchant at a steady amount and rhythm."),
|
|
294
|
+
children: [/* @__PURE__ */ D("div", {
|
|
307
295
|
role: "tablist",
|
|
308
|
-
"aria-label":
|
|
296
|
+
"aria-label": k("banking.charges.filter", "Charge status"),
|
|
309
297
|
className: "mb-3 flex gap-1.5",
|
|
310
|
-
children:
|
|
298
|
+
children: he.map((e) => /* @__PURE__ */ D("button", {
|
|
311
299
|
type: "button",
|
|
312
300
|
role: "tab",
|
|
313
|
-
"aria-selected":
|
|
314
|
-
onClick: () =>
|
|
315
|
-
className:
|
|
316
|
-
children:
|
|
301
|
+
"aria-selected": F === e,
|
|
302
|
+
onClick: () => xe(e),
|
|
303
|
+
className: v("rounded-lg px-3 py-1.5 text-xs font-medium", F === e ? "bg-action-primary-bg text-action-primary-text" : "border border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
304
|
+
children: k(ge[e].key, ge[e].fallback)
|
|
317
305
|
}, e))
|
|
318
|
-
}),
|
|
319
|
-
message:
|
|
320
|
-
onRetry: () => void
|
|
321
|
-
}) :
|
|
306
|
+
}), G.isLoading ? /* @__PURE__ */ D(l, { label: k("banking.charges.loading", "Loading recurring charges…") }) : G.isError ? /* @__PURE__ */ D(c, {
|
|
307
|
+
message: P(G.error, k),
|
|
308
|
+
onRetry: () => void G.refetch()
|
|
309
|
+
}) : je.length === 0 ? /* @__PURE__ */ D(o, {
|
|
322
310
|
illustration: "empty-data",
|
|
323
|
-
title:
|
|
324
|
-
description:
|
|
325
|
-
}) : /* @__PURE__ */
|
|
311
|
+
title: k("banking.charges.empty.title", "Nothing here yet"),
|
|
312
|
+
description: k("banking.charges.empty.description", "Import a statement with at least two months of transactions, or connect a bank, and repeating charges show up here.")
|
|
313
|
+
}) : /* @__PURE__ */ D("ul", {
|
|
326
314
|
className: "grid grid-cols-1 gap-3 lg:grid-cols-2",
|
|
327
315
|
"data-testid": "recurring-charge-list",
|
|
328
|
-
children:
|
|
316
|
+
children: je.map((t) => /* @__PURE__ */ O("li", {
|
|
329
317
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-4",
|
|
330
318
|
"data-testid": "recurring-charge",
|
|
331
319
|
children: [
|
|
332
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ O("div", {
|
|
333
321
|
className: "flex items-start justify-between gap-3",
|
|
334
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ O("div", {
|
|
335
323
|
className: "min-w-0",
|
|
336
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ D("p", {
|
|
337
325
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
338
|
-
children:
|
|
339
|
-
}), /* @__PURE__ */
|
|
326
|
+
children: t.displayName
|
|
327
|
+
}), /* @__PURE__ */ D("p", {
|
|
340
328
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
341
|
-
children:
|
|
342
|
-
count:
|
|
343
|
-
first:
|
|
344
|
-
confidence:
|
|
329
|
+
children: k("banking.charges.meta", "{{count}} charges since {{first}} · {{confidence}}% sure", {
|
|
330
|
+
count: t.occurrences,
|
|
331
|
+
first: s(t.firstChargedOn),
|
|
332
|
+
confidence: t.confidence
|
|
345
333
|
})
|
|
346
334
|
})]
|
|
347
|
-
}), /* @__PURE__ */
|
|
335
|
+
}), /* @__PURE__ */ O("span", {
|
|
348
336
|
className: "shrink-0 text-sm font-semibold text-text-primary",
|
|
349
|
-
children: [
|
|
337
|
+
children: [e(t.lastAmount, t.currency), ne(t.interval)]
|
|
350
338
|
})]
|
|
351
339
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ O("p", {
|
|
353
341
|
className: "mt-2 text-xs text-text-secondary",
|
|
354
342
|
children: [
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
` · ${
|
|
343
|
+
k("banking.charges.dates", "Last charged {{last}}", { last: s(t.lastChargedOn) }),
|
|
344
|
+
t.nextExpectedOn && ` · ${k("banking.charges.next", "next expected {{next}}", { next: s(t.nextExpectedOn) })}`,
|
|
345
|
+
` · ${k("banking.charges.yearly", "{{amount}} a year", { amount: e(t.annualCost, t.currency) })}`
|
|
358
346
|
]
|
|
359
347
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ O("div", {
|
|
361
349
|
className: "mt-3 flex flex-wrap gap-2",
|
|
362
350
|
children: [
|
|
363
|
-
|
|
364
|
-
type: "button",
|
|
365
|
-
className: k,
|
|
366
|
-
onClick: () => void $("track", e),
|
|
367
|
-
disabled: Oe.isPending,
|
|
368
|
-
children: O("banking.charges.track", "Track as subscription")
|
|
369
|
-
}), /* @__PURE__ */ E("button", {
|
|
351
|
+
t.status === "DETECTED" && /* @__PURE__ */ O(pe, { children: [/* @__PURE__ */ D("button", {
|
|
370
352
|
type: "button",
|
|
371
353
|
className: A,
|
|
372
|
-
onClick: () => void $("
|
|
373
|
-
disabled:
|
|
374
|
-
children:
|
|
354
|
+
onClick: () => void $("track", t),
|
|
355
|
+
disabled: De.isPending,
|
|
356
|
+
children: k("banking.charges.track", "Track as subscription")
|
|
357
|
+
}), /* @__PURE__ */ D("button", {
|
|
358
|
+
type: "button",
|
|
359
|
+
className: j,
|
|
360
|
+
onClick: () => void $("dismiss", t),
|
|
361
|
+
disabled: Oe.isPending,
|
|
362
|
+
children: k("banking.charges.dismiss", "Not a subscription")
|
|
375
363
|
})] }),
|
|
376
|
-
|
|
364
|
+
t.status === "TRACKED" && t.relationshipId && /* @__PURE__ */ D("button", {
|
|
377
365
|
type: "button",
|
|
378
|
-
className:
|
|
379
|
-
onClick: () =>
|
|
380
|
-
children:
|
|
366
|
+
className: j,
|
|
367
|
+
onClick: () => _e(`/relationships/${t.relationshipId}`),
|
|
368
|
+
children: k("banking.charges.view", "View subscription")
|
|
381
369
|
}),
|
|
382
|
-
|
|
370
|
+
t.status === "DISMISSED" && /* @__PURE__ */ D("button", {
|
|
383
371
|
type: "button",
|
|
384
|
-
className:
|
|
385
|
-
onClick: () => void $("restore",
|
|
386
|
-
disabled:
|
|
387
|
-
children:
|
|
372
|
+
className: j,
|
|
373
|
+
onClick: () => void $("restore", t),
|
|
374
|
+
disabled: ke.isPending,
|
|
375
|
+
children: k("banking.charges.restore", "Review again")
|
|
388
376
|
})
|
|
389
377
|
]
|
|
390
378
|
})
|
|
391
379
|
]
|
|
392
|
-
},
|
|
380
|
+
}, t.id))
|
|
393
381
|
})]
|
|
394
382
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ D(u, {
|
|
396
384
|
dataTour: "subscriberbot-banking-connections",
|
|
397
|
-
title:
|
|
398
|
-
description:
|
|
399
|
-
children:
|
|
400
|
-
message:
|
|
401
|
-
onRetry: () => void
|
|
402
|
-
}) :
|
|
385
|
+
title: k("banking.connections.title", "Your connections"),
|
|
386
|
+
description: k("banking.connections.description", "Disconnecting deletes the accounts and transactions from Subscriber Bot."),
|
|
387
|
+
children: W.isLoading ? /* @__PURE__ */ D(l, { label: k("banking.connections.loading", "Loading connections…") }) : W.isError ? /* @__PURE__ */ D(c, {
|
|
388
|
+
message: P(W.error, k),
|
|
389
|
+
onRetry: () => void W.refetch()
|
|
390
|
+
}) : Z.length === 0 ? /* @__PURE__ */ D(o, {
|
|
403
391
|
illustration: "empty-data",
|
|
404
|
-
title:
|
|
405
|
-
description:
|
|
406
|
-
action: /* @__PURE__ */
|
|
392
|
+
title: k("banking.connections.empty.title", "No bank or card connected"),
|
|
393
|
+
description: k("banking.connections.empty.description", "Download a CSV of your transactions from your bank or card website and import it, or connect a bank."),
|
|
394
|
+
action: /* @__PURE__ */ O("button", {
|
|
407
395
|
type: "button",
|
|
408
|
-
className:
|
|
409
|
-
onClick: () =>
|
|
396
|
+
className: A,
|
|
397
|
+
onClick: () => I(!0),
|
|
410
398
|
children: [
|
|
411
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ D(se, {
|
|
412
400
|
className: "h-4 w-4",
|
|
413
401
|
"aria-hidden": !0
|
|
414
402
|
}),
|
|
415
403
|
" ",
|
|
416
|
-
|
|
404
|
+
k("banking.import.open", "Import a statement")
|
|
417
405
|
]
|
|
418
406
|
})
|
|
419
|
-
}) : /* @__PURE__ */
|
|
407
|
+
}) : /* @__PURE__ */ D("ul", {
|
|
420
408
|
className: "space-y-3",
|
|
421
409
|
"data-testid": "bank-connection-list",
|
|
422
|
-
children:
|
|
410
|
+
children: Z.map((e) => /* @__PURE__ */ O("li", {
|
|
423
411
|
className: "flex flex-col gap-3 rounded-xl border border-border-subtle bg-bg-surface p-4 sm:flex-row sm:items-center sm:justify-between",
|
|
424
412
|
"data-testid": "bank-connection",
|
|
425
|
-
children: [/* @__PURE__ */
|
|
413
|
+
children: [/* @__PURE__ */ O("div", {
|
|
426
414
|
className: "min-w-0",
|
|
427
415
|
children: [
|
|
428
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ O("div", {
|
|
429
417
|
className: "flex items-center gap-2",
|
|
430
|
-
children: [/* @__PURE__ */
|
|
418
|
+
children: [/* @__PURE__ */ D("p", {
|
|
431
419
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
432
420
|
children: e.institutionName
|
|
433
|
-
}), /* @__PURE__ */
|
|
421
|
+
}), /* @__PURE__ */ D(a, { status: e.status })]
|
|
434
422
|
}),
|
|
435
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ O("p", {
|
|
436
424
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
437
425
|
children: [
|
|
438
|
-
|
|
426
|
+
k(ve[e.aggregator].key, ve[e.aggregator].fallback),
|
|
439
427
|
" · ",
|
|
440
|
-
e.accounts.map((e) => e.mask ? `${e.name} ••${e.mask}` : e.name).join(", ") ||
|
|
428
|
+
e.accounts.map((e) => e.mask ? `${e.name} ••${e.mask}` : e.name).join(", ") || k("banking.connections.noAccounts", "no accounts yet"),
|
|
441
429
|
" · ",
|
|
442
|
-
|
|
443
|
-
e.lastSyncedAt && ` · ${
|
|
430
|
+
k("banking.connections.count", "{{count}} transactions", { count: e.transactionCount }),
|
|
431
|
+
e.lastSyncedAt && ` · ${k("banking.connections.synced", "updated {{date}}", { date: s(e.lastSyncedAt) })}`
|
|
444
432
|
]
|
|
445
433
|
}),
|
|
446
|
-
e.consentExpiresAt && e.status !== "REVOKED" && /* @__PURE__ */
|
|
434
|
+
e.consentExpiresAt && e.status !== "REVOKED" && /* @__PURE__ */ D("p", {
|
|
447
435
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
448
436
|
"data-testid": "bank-connection-consent",
|
|
449
|
-
children:
|
|
437
|
+
children: k("banking.connections.consentUntil", "Consent valid until {{date}}", { date: s(e.consentExpiresAt) })
|
|
450
438
|
}),
|
|
451
|
-
e.lastSyncError && /* @__PURE__ */
|
|
439
|
+
e.lastSyncError && /* @__PURE__ */ D("p", {
|
|
452
440
|
className: "mt-1 text-xs text-status-error-text",
|
|
453
441
|
children: e.lastSyncError
|
|
454
442
|
}),
|
|
455
|
-
e.status === "NEEDS_REAUTH" && /* @__PURE__ */
|
|
443
|
+
e.status === "NEEDS_REAUTH" && /* @__PURE__ */ D("p", {
|
|
456
444
|
className: "mt-1 text-xs text-status-warning-text",
|
|
457
445
|
"data-testid": "bank-connection-hint",
|
|
458
|
-
children:
|
|
446
|
+
children: k("banking.connections.needsReauth", "The bank needs you to sign in again. Reconnect to keep syncing; your history is kept.")
|
|
459
447
|
}),
|
|
460
|
-
e.status === "REVOKED" && /* @__PURE__ */
|
|
448
|
+
e.status === "REVOKED" && /* @__PURE__ */ D("p", {
|
|
461
449
|
className: "mt-1 text-xs text-text-secondary",
|
|
462
450
|
"data-testid": "bank-connection-hint",
|
|
463
|
-
children:
|
|
451
|
+
children: k("banking.connections.revoked", "Access was revoked at the bank. Disconnect this connection and link the bank again to keep tracking it.")
|
|
464
452
|
})
|
|
465
453
|
]
|
|
466
|
-
}), /* @__PURE__ */
|
|
454
|
+
}), /* @__PURE__ */ O("div", {
|
|
467
455
|
className: "flex shrink-0 gap-2",
|
|
468
456
|
children: [
|
|
469
|
-
|
|
457
|
+
N.has(e.aggregator) && e.status === "NEEDS_REAUTH" && /* @__PURE__ */ O("button", {
|
|
470
458
|
type: "button",
|
|
471
|
-
className:
|
|
472
|
-
onClick: () => e.aggregator === "PLAID" ? void
|
|
473
|
-
disabled:
|
|
459
|
+
className: M,
|
|
460
|
+
onClick: () => e.aggregator === "PLAID" ? void Ie(e) : H({ connection: e }),
|
|
461
|
+
disabled: z || !Ae(e.aggregator),
|
|
474
462
|
children: [
|
|
475
|
-
/* @__PURE__ */ E
|
|
463
|
+
/* @__PURE__ */ D(E, {
|
|
476
464
|
className: "h-3.5 w-3.5",
|
|
477
465
|
"aria-hidden": !0
|
|
478
466
|
}),
|
|
479
467
|
" ",
|
|
480
|
-
|
|
468
|
+
k("banking.connections.reconnect", "Reconnect")
|
|
481
469
|
]
|
|
482
470
|
}),
|
|
483
|
-
|
|
471
|
+
N.has(e.aggregator) && e.status !== "REVOKED" && e.status !== "NEEDS_REAUTH" && /* @__PURE__ */ O("button", {
|
|
484
472
|
type: "button",
|
|
485
|
-
className:
|
|
473
|
+
className: M,
|
|
486
474
|
onClick: () => void Le(e),
|
|
487
|
-
disabled:
|
|
475
|
+
disabled: J.isPending || !Ae(e.aggregator),
|
|
488
476
|
children: [
|
|
489
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ D(le, {
|
|
490
478
|
className: "h-3.5 w-3.5",
|
|
491
479
|
"aria-hidden": !0
|
|
492
480
|
}),
|
|
493
481
|
" ",
|
|
494
|
-
|
|
482
|
+
k("banking.connections.sync", "Sync")
|
|
495
483
|
]
|
|
496
484
|
}),
|
|
497
|
-
/* @__PURE__ */
|
|
485
|
+
/* @__PURE__ */ O("button", {
|
|
498
486
|
type: "button",
|
|
499
|
-
className:
|
|
487
|
+
className: M,
|
|
500
488
|
onClick: () => void Re(e),
|
|
501
|
-
disabled:
|
|
489
|
+
disabled: Ee.isPending,
|
|
502
490
|
children: [
|
|
503
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ D(fe, {
|
|
504
492
|
className: "h-3.5 w-3.5",
|
|
505
493
|
"aria-hidden": !0
|
|
506
494
|
}),
|
|
507
495
|
" ",
|
|
508
|
-
|
|
496
|
+
k("banking.connections.disconnect", "Disconnect")
|
|
509
497
|
]
|
|
510
498
|
})
|
|
511
499
|
]
|
|
@@ -513,155 +501,146 @@ function P() {
|
|
|
513
501
|
}, e.id))
|
|
514
502
|
})
|
|
515
503
|
}),
|
|
516
|
-
|
|
517
|
-
aggregators:
|
|
518
|
-
connection:
|
|
519
|
-
busy:
|
|
520
|
-
onClose: () =>
|
|
521
|
-
onConnect:
|
|
504
|
+
V && /* @__PURE__ */ D(S, {
|
|
505
|
+
aggregators: Y,
|
|
506
|
+
connection: V.connection,
|
|
507
|
+
busy: z,
|
|
508
|
+
onClose: () => H(null),
|
|
509
|
+
onConnect: Fe
|
|
522
510
|
}),
|
|
523
|
-
|
|
524
|
-
connections:
|
|
525
|
-
onClose: () =>
|
|
511
|
+
Se && /* @__PURE__ */ D(be, {
|
|
512
|
+
connections: Z.filter((e) => e.aggregator === "STATEMENT_IMPORT"),
|
|
513
|
+
onClose: () => I(!1),
|
|
526
514
|
onImported: (e) => {
|
|
527
|
-
|
|
515
|
+
I(!1), xe("DETECTED"), R({
|
|
528
516
|
tone: "success",
|
|
529
|
-
text:
|
|
517
|
+
text: Q(e)
|
|
530
518
|
});
|
|
531
519
|
}
|
|
532
520
|
})
|
|
533
521
|
]
|
|
534
522
|
});
|
|
535
523
|
}
|
|
536
|
-
function
|
|
537
|
-
let i =
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
y(await e.text());
|
|
544
|
-
}
|
|
545
|
-
}, se = async (e) => {
|
|
546
|
-
if (e.preventDefault(), x(null), !v.trim()) {
|
|
547
|
-
x(i("banking.import.required", "Choose a CSV file or paste the statement."), ["statement-csv", "statement-file"]);
|
|
548
|
-
return;
|
|
549
|
-
}
|
|
550
|
-
try {
|
|
551
|
-
ee(await a.mutateAsync({ input: {
|
|
524
|
+
function be({ connections: t, onClose: n, onImported: r }) {
|
|
525
|
+
let i = _(), a = ne(), [o, c] = T(""), [l, u] = T(""), [d, ee] = T(""), [f, te] = T(""), [p, m] = T("USD"), [h, re] = T("OUTFLOW_NEGATIVE"), [g, ie] = T("MDY"), [y, b] = T(""), [x, S, C, w] = e(), ae = async (e) => {
|
|
526
|
+
S(null), b(""), e && (e.size > _e ? S(i("banking.import.tooLarge", "That file is larger than 2 MB. Export a shorter date range."), "statement-file") : b(await e.text()));
|
|
527
|
+
}, oe = async (e) => {
|
|
528
|
+
if (e.preventDefault(), S(null), !y.trim()) S(i("banking.import.required", "Choose a CSV file or paste the statement."), ["statement-csv", "statement-file"]);
|
|
529
|
+
else try {
|
|
530
|
+
r(await a.mutateAsync({ input: {
|
|
552
531
|
connectionId: o || null,
|
|
553
532
|
institutionName: o ? null : l || null,
|
|
554
|
-
accountName:
|
|
555
|
-
accountMask:
|
|
556
|
-
currency:
|
|
557
|
-
csv:
|
|
558
|
-
amountConvention:
|
|
559
|
-
dateFormat:
|
|
533
|
+
accountName: d || null,
|
|
534
|
+
accountMask: f || null,
|
|
535
|
+
currency: p || "USD",
|
|
536
|
+
csv: y,
|
|
537
|
+
amountConvention: h,
|
|
538
|
+
dateFormat: g
|
|
560
539
|
} }));
|
|
561
540
|
} catch (e) {
|
|
562
|
-
|
|
541
|
+
S(P(e, i));
|
|
563
542
|
}
|
|
564
543
|
};
|
|
565
|
-
return /* @__PURE__ */
|
|
544
|
+
return /* @__PURE__ */ D(s, {
|
|
566
545
|
title: i("banking.import.title", "Import a bank or card statement"),
|
|
567
546
|
description: i("banking.import.description", "Download your transactions as CSV from your bank or card website (two months or more works best)."),
|
|
568
547
|
onClose: n,
|
|
569
548
|
maxWidthClassName: "max-w-xl",
|
|
570
|
-
children: /* @__PURE__ */
|
|
571
|
-
onSubmit: (e) => void
|
|
549
|
+
children: /* @__PURE__ */ O("form", {
|
|
550
|
+
onSubmit: (e) => void oe(e),
|
|
572
551
|
className: "space-y-3",
|
|
573
552
|
"data-testid": "import-statement-form",
|
|
574
553
|
children: [
|
|
575
|
-
|
|
554
|
+
t.length > 0 && /* @__PURE__ */ O("label", {
|
|
576
555
|
className: "block text-sm text-text-primary",
|
|
577
|
-
children: [i("banking.import.target", "Add to"), /* @__PURE__ */
|
|
578
|
-
className:
|
|
556
|
+
children: [i("banking.import.target", "Add to"), /* @__PURE__ */ O("select", {
|
|
557
|
+
className: v(k, "mt-1"),
|
|
579
558
|
value: o,
|
|
580
559
|
onChange: (e) => c(e.target.value),
|
|
581
|
-
children: [/* @__PURE__ */
|
|
560
|
+
children: [/* @__PURE__ */ D("option", {
|
|
582
561
|
value: "",
|
|
583
562
|
children: i("banking.import.newConnection", "A new connection")
|
|
584
|
-
}),
|
|
563
|
+
}), t.map((e) => /* @__PURE__ */ D("option", {
|
|
585
564
|
value: e.id,
|
|
586
565
|
children: e.institutionName
|
|
587
566
|
}, e.id))]
|
|
588
567
|
})]
|
|
589
568
|
}),
|
|
590
|
-
!o && /* @__PURE__ */
|
|
569
|
+
!o && /* @__PURE__ */ O("label", {
|
|
591
570
|
className: "block text-sm text-text-primary",
|
|
592
|
-
children: [i("banking.import.institution", "Bank or card issuer"), /* @__PURE__ */
|
|
593
|
-
className:
|
|
571
|
+
children: [i("banking.import.institution", "Bank or card issuer"), /* @__PURE__ */ D("input", {
|
|
572
|
+
className: v(k, "mt-1"),
|
|
594
573
|
value: l,
|
|
595
574
|
onChange: (e) => u(e.target.value),
|
|
596
575
|
placeholder: i("banking.import.institutionPlaceholder", "e.g. Chase"),
|
|
597
576
|
maxLength: 255
|
|
598
577
|
})]
|
|
599
578
|
}),
|
|
600
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ O("div", {
|
|
601
580
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-3",
|
|
602
|
-
children: [/* @__PURE__ */
|
|
581
|
+
children: [/* @__PURE__ */ O("label", {
|
|
603
582
|
className: "block text-sm text-text-primary sm:col-span-2",
|
|
604
|
-
children: [i("banking.import.account", "Account name"), /* @__PURE__ */
|
|
605
|
-
className:
|
|
606
|
-
value:
|
|
607
|
-
onChange: (e) =>
|
|
583
|
+
children: [i("banking.import.account", "Account name"), /* @__PURE__ */ D("input", {
|
|
584
|
+
className: v(k, "mt-1"),
|
|
585
|
+
value: d,
|
|
586
|
+
onChange: (e) => ee(e.target.value),
|
|
608
587
|
placeholder: i("banking.import.accountPlaceholder", "e.g. Sapphire card"),
|
|
609
588
|
maxLength: 255
|
|
610
589
|
})]
|
|
611
|
-
}), /* @__PURE__ */
|
|
590
|
+
}), /* @__PURE__ */ O("label", {
|
|
612
591
|
className: "block text-sm text-text-primary",
|
|
613
|
-
children: [i("banking.import.mask", "Last 4 digits"), /* @__PURE__ */
|
|
614
|
-
className:
|
|
615
|
-
value:
|
|
616
|
-
onChange: (e) =>
|
|
592
|
+
children: [i("banking.import.mask", "Last 4 digits"), /* @__PURE__ */ D("input", {
|
|
593
|
+
className: v(k, "mt-1"),
|
|
594
|
+
value: f,
|
|
595
|
+
onChange: (e) => te(e.target.value.replace(/\D/g, "").slice(-4)),
|
|
617
596
|
inputMode: "numeric",
|
|
618
597
|
maxLength: 4
|
|
619
598
|
})]
|
|
620
599
|
})]
|
|
621
600
|
}),
|
|
622
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ O("div", {
|
|
623
602
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-3",
|
|
624
603
|
children: [
|
|
625
|
-
/* @__PURE__ */
|
|
604
|
+
/* @__PURE__ */ O("label", {
|
|
626
605
|
className: "block text-sm text-text-primary",
|
|
627
|
-
children: [i("banking.import.currency", "Currency"), /* @__PURE__ */
|
|
628
|
-
className:
|
|
629
|
-
value:
|
|
630
|
-
onChange: (e) =>
|
|
606
|
+
children: [i("banking.import.currency", "Currency"), /* @__PURE__ */ D("input", {
|
|
607
|
+
className: v(k, "mt-1 uppercase"),
|
|
608
|
+
value: p,
|
|
609
|
+
onChange: (e) => m(e.target.value.toUpperCase().slice(0, 3)),
|
|
631
610
|
maxLength: 3
|
|
632
611
|
})]
|
|
633
612
|
}),
|
|
634
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ O("label", {
|
|
635
614
|
className: "block text-sm text-text-primary",
|
|
636
|
-
children: [i("banking.import.convention", "Money out is"), /* @__PURE__ */
|
|
637
|
-
className:
|
|
638
|
-
value:
|
|
639
|
-
onChange: (e) =>
|
|
640
|
-
children: [/* @__PURE__ */
|
|
615
|
+
children: [i("banking.import.convention", "Money out is"), /* @__PURE__ */ O("select", {
|
|
616
|
+
className: v(k, "mt-1"),
|
|
617
|
+
value: h,
|
|
618
|
+
onChange: (e) => re(e.target.value),
|
|
619
|
+
children: [/* @__PURE__ */ D("option", {
|
|
641
620
|
value: "OUTFLOW_NEGATIVE",
|
|
642
621
|
children: i("banking.import.negative", "Negative (bank)")
|
|
643
|
-
}), /* @__PURE__ */
|
|
622
|
+
}), /* @__PURE__ */ D("option", {
|
|
644
623
|
value: "OUTFLOW_POSITIVE",
|
|
645
624
|
children: i("banking.import.positive", "Positive (card)")
|
|
646
625
|
})]
|
|
647
626
|
})]
|
|
648
627
|
}),
|
|
649
|
-
/* @__PURE__ */
|
|
628
|
+
/* @__PURE__ */ O("label", {
|
|
650
629
|
className: "block text-sm text-text-primary",
|
|
651
|
-
children: [i("banking.import.dateFormat", "Date format"), /* @__PURE__ */
|
|
652
|
-
className:
|
|
653
|
-
value:
|
|
654
|
-
onChange: (e) =>
|
|
630
|
+
children: [i("banking.import.dateFormat", "Date format"), /* @__PURE__ */ O("select", {
|
|
631
|
+
className: v(k, "mt-1"),
|
|
632
|
+
value: g,
|
|
633
|
+
onChange: (e) => ie(e.target.value),
|
|
655
634
|
children: [
|
|
656
|
-
/* @__PURE__ */
|
|
635
|
+
/* @__PURE__ */ D("option", {
|
|
657
636
|
value: "MDY",
|
|
658
637
|
children: "MM/DD/YYYY"
|
|
659
638
|
}),
|
|
660
|
-
/* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ D("option", {
|
|
661
640
|
value: "DMY",
|
|
662
641
|
children: "DD/MM/YYYY"
|
|
663
642
|
}),
|
|
664
|
-
/* @__PURE__ */
|
|
643
|
+
/* @__PURE__ */ D("option", {
|
|
665
644
|
value: "YMD",
|
|
666
645
|
children: "YYYY-MM-DD"
|
|
667
646
|
})
|
|
@@ -670,47 +649,47 @@ function xe({ connections: e, onClose: n, onImported: ee }) {
|
|
|
670
649
|
})
|
|
671
650
|
]
|
|
672
651
|
}),
|
|
673
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ O("label", {
|
|
674
653
|
className: "block text-sm text-text-primary",
|
|
675
|
-
children: [i("banking.import.file", "CSV file"), /* @__PURE__ */
|
|
654
|
+
children: [i("banking.import.file", "CSV file"), /* @__PURE__ */ D("input", {
|
|
676
655
|
type: "file",
|
|
677
656
|
accept: ".csv,text/csv,text/plain",
|
|
678
|
-
className:
|
|
679
|
-
onChange: (e) => void
|
|
657
|
+
className: v(k, "mt-1"),
|
|
658
|
+
onChange: (e) => void ae(e.target.files?.[0]),
|
|
680
659
|
id: "statement-file",
|
|
681
|
-
...
|
|
660
|
+
...C("statement-file"),
|
|
682
661
|
"data-testid": "import-statement-file"
|
|
683
662
|
})]
|
|
684
663
|
}),
|
|
685
|
-
/* @__PURE__ */
|
|
664
|
+
/* @__PURE__ */ O("label", {
|
|
686
665
|
className: "block text-sm text-text-primary",
|
|
687
|
-
children: [i("banking.import.paste", "Or paste the statement"), /* @__PURE__ */
|
|
688
|
-
className:
|
|
689
|
-
value:
|
|
690
|
-
onChange: (e) =>
|
|
666
|
+
children: [i("banking.import.paste", "Or paste the statement"), /* @__PURE__ */ D("textarea", {
|
|
667
|
+
className: v(k, "mt-1 h-32 font-mono text-xs"),
|
|
668
|
+
value: y,
|
|
669
|
+
onChange: (e) => b(e.target.value),
|
|
691
670
|
placeholder: "Date,Description,Amount\n10/05/2026,NETFLIX.COM,-15.49",
|
|
692
671
|
id: "statement-csv",
|
|
693
|
-
...
|
|
672
|
+
...C("statement-csv"),
|
|
694
673
|
"data-testid": "import-statement-csv"
|
|
695
674
|
})]
|
|
696
675
|
}),
|
|
697
|
-
|
|
698
|
-
id:
|
|
676
|
+
x && /* @__PURE__ */ D("p", {
|
|
677
|
+
id: w,
|
|
699
678
|
tabIndex: -1,
|
|
700
679
|
role: "alert",
|
|
701
680
|
className: "text-sm text-status-error-text",
|
|
702
|
-
children:
|
|
681
|
+
children: x
|
|
703
682
|
}),
|
|
704
|
-
/* @__PURE__ */
|
|
683
|
+
/* @__PURE__ */ O("div", {
|
|
705
684
|
className: "flex justify-end gap-2 pt-1",
|
|
706
|
-
children: [/* @__PURE__ */
|
|
685
|
+
children: [/* @__PURE__ */ D("button", {
|
|
707
686
|
type: "button",
|
|
708
|
-
className:
|
|
687
|
+
className: j,
|
|
709
688
|
onClick: n,
|
|
710
689
|
children: i("common.cancel", "Cancel")
|
|
711
|
-
}), /* @__PURE__ */
|
|
690
|
+
}), /* @__PURE__ */ D("button", {
|
|
712
691
|
type: "submit",
|
|
713
|
-
className:
|
|
692
|
+
className: A,
|
|
714
693
|
disabled: a.isPending,
|
|
715
694
|
children: a.isPending ? i("banking.import.submitting", "Importing…") : i("banking.import.submit", "Import and find subscriptions")
|
|
716
695
|
})]
|
|
@@ -719,7 +698,6 @@ function xe({ connections: e, onClose: n, onImported: ee }) {
|
|
|
719
698
|
})
|
|
720
699
|
});
|
|
721
700
|
}
|
|
722
|
-
|
|
723
|
-
export { P as BankConnectionsPage };
|
|
701
|
+
export { F as BankConnectionsPage };
|
|
724
702
|
|
|
725
703
|
//# sourceMappingURL=BankConnectionsPage.js.map
|