@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,9 +1,10 @@
|
|
|
1
1
|
import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useTr as t } from "../../hooks/useTr.js";
|
|
3
|
+
import { useFormatters as n } from "../../hooks/useFormatters.js";
|
|
4
|
+
import { PageLayout as r } from "../../components/PageLayout.js";
|
|
5
5
|
import { ErrorView as i } from "../../components/StateViews.js";
|
|
6
6
|
import { useCreateRelationship as a, usePlans as o, useProviders as s } from "../../hooks/useSubscriberBotApi.js";
|
|
7
|
+
import { useFormError as ee } from "../../hooks/useFormError.js";
|
|
7
8
|
import { useState as c } from "react";
|
|
8
9
|
import { ArrowLeft as l, Building2 as u, StickyNote as d, Tag as f, Wallet as p } from "lucide-react";
|
|
9
10
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
@@ -63,66 +64,69 @@ function C({ icon: e, title: t, description: n, children: r }) {
|
|
|
63
64
|
});
|
|
64
65
|
}
|
|
65
66
|
function w() {
|
|
66
|
-
let g =
|
|
67
|
+
let { formatEnumLabel: g } = n(), w = t(), { navigateTo: T } = e(), E = a(), D = s({ pagination: {
|
|
67
68
|
limit: 100,
|
|
68
69
|
offset: 0
|
|
69
|
-
} }), [
|
|
70
|
-
return
|
|
71
|
-
title:
|
|
70
|
+
} }), [O, k] = c(""), [A, j] = c("SUBSCRIPTION"), [M, N] = c(""), [P, F] = c(""), [I, L] = c(""), [R, z] = c("USD"), [B, V] = c("MONTHLY"), [H, U] = c(""), [W, G] = c(!0), [K, q] = c(""), [J, Y] = c(""), [X, Z, Q, te] = ee(), ne = o(M || void 0), re = D.data?.items ?? [], $ = ne.data ?? [];
|
|
71
|
+
return D.isError ? /* @__PURE__ */ m(r, {
|
|
72
|
+
title: w("relationships.new.title", "Add relationship"),
|
|
72
73
|
children: /* @__PURE__ */ m(i, {
|
|
73
|
-
message:
|
|
74
|
-
onRetry: () => void
|
|
74
|
+
message: w("relationships.new.providerError", "Could not load the provider registry."),
|
|
75
|
+
onRetry: () => void D.refetch()
|
|
75
76
|
})
|
|
76
|
-
}) : /* @__PURE__ */ h(
|
|
77
|
-
title:
|
|
78
|
-
description:
|
|
77
|
+
}) : /* @__PURE__ */ h(r, {
|
|
78
|
+
title: w("relationships.new.title", "Add relationship"),
|
|
79
|
+
description: w("relationships.new.description", "Track a new recurring digital relationship"),
|
|
79
80
|
actions: /* @__PURE__ */ h("button", {
|
|
80
81
|
type: "button",
|
|
81
|
-
onClick: () =>
|
|
82
|
+
onClick: () => T("/relationships"),
|
|
82
83
|
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",
|
|
83
84
|
children: [
|
|
84
|
-
/* @__PURE__ */ m(l, { className: "h-4 w-4" }),
|
|
85
|
+
/* @__PURE__ */ m(l, { className: "rtl:rotate-180 h-4 w-4" }),
|
|
85
86
|
" ",
|
|
86
|
-
|
|
87
|
+
w("relationships.new.back", "Back")
|
|
87
88
|
]
|
|
88
89
|
}),
|
|
89
90
|
children: [/* @__PURE__ */ m(_, {
|
|
90
91
|
className: "mb-6",
|
|
91
|
-
children:
|
|
92
|
+
children: w("relationships.new.purpose", "Manually add a subscription, membership, license or contract. Link it to a provider and plan from the registry, set the price and renewal date, and Subscriber Bot will track its lifecycle from here.")
|
|
92
93
|
}), /* @__PURE__ */ h("form", {
|
|
93
94
|
onSubmit: (e) => {
|
|
94
|
-
if (e.preventDefault(),
|
|
95
|
-
|
|
95
|
+
if (e.preventDefault(), Z(null), !O.trim()) {
|
|
96
|
+
Z(w("relationships.new.basics.labelRequired", "A label is required."), "rel-label");
|
|
96
97
|
return;
|
|
97
98
|
}
|
|
98
99
|
let t = {
|
|
99
|
-
label:
|
|
100
|
-
kind:
|
|
101
|
-
interval:
|
|
102
|
-
autoRenew:
|
|
103
|
-
currency:
|
|
104
|
-
...
|
|
105
|
-
...
|
|
106
|
-
...
|
|
107
|
-
...
|
|
108
|
-
...
|
|
109
|
-
...
|
|
100
|
+
label: O.trim(),
|
|
101
|
+
kind: A,
|
|
102
|
+
interval: B,
|
|
103
|
+
autoRenew: W,
|
|
104
|
+
currency: R.trim() || "USD",
|
|
105
|
+
...M ? { providerId: M } : {},
|
|
106
|
+
...P ? { planId: P } : {},
|
|
107
|
+
...I ? { amount: Number(I) } : {},
|
|
108
|
+
...H ? { renewsAt: new Date(H).toISOString() } : {},
|
|
109
|
+
...K.trim() ? { notes: K.trim() } : {},
|
|
110
|
+
...J.trim() ? { department: J.trim() } : {}
|
|
110
111
|
};
|
|
111
|
-
|
|
112
|
-
onSuccess: (e) =>
|
|
113
|
-
onError: (e) =>
|
|
112
|
+
E.mutate(t, {
|
|
113
|
+
onSuccess: (e) => T(`/relationships/${e.id}`),
|
|
114
|
+
onError: (e) => Z(e instanceof Error ? e.message : w("relationships.new.error", "Could not create relationship."))
|
|
114
115
|
});
|
|
115
116
|
},
|
|
116
117
|
className: "max-w-3xl space-y-5",
|
|
117
118
|
children: [
|
|
118
|
-
|
|
119
|
+
X && /* @__PURE__ */ m("div", {
|
|
120
|
+
id: te,
|
|
121
|
+
tabIndex: -1,
|
|
122
|
+
role: "alert",
|
|
119
123
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
120
|
-
children:
|
|
124
|
+
children: X
|
|
121
125
|
}),
|
|
122
126
|
/* @__PURE__ */ m(C, {
|
|
123
127
|
icon: /* @__PURE__ */ m(f, { className: "h-4 w-4" }),
|
|
124
|
-
title:
|
|
125
|
-
description:
|
|
128
|
+
title: w("relationships.new.basics.title", "Basics"),
|
|
129
|
+
description: w("relationships.new.basics.description", "Name this relationship and choose what kind it is."),
|
|
126
130
|
children: /* @__PURE__ */ h("div", {
|
|
127
131
|
className: "space-y-4",
|
|
128
132
|
children: [
|
|
@@ -130,7 +134,7 @@ function w() {
|
|
|
130
134
|
htmlFor: "rel-label",
|
|
131
135
|
className: S,
|
|
132
136
|
children: [
|
|
133
|
-
|
|
137
|
+
w("relationships.new.basics.labelLabel", "Label"),
|
|
134
138
|
" ",
|
|
135
139
|
/* @__PURE__ */ m("span", {
|
|
136
140
|
className: "text-status-error-text",
|
|
@@ -138,11 +142,12 @@ function w() {
|
|
|
138
142
|
})
|
|
139
143
|
]
|
|
140
144
|
}), /* @__PURE__ */ m("input", {
|
|
145
|
+
...Q("rel-label"),
|
|
141
146
|
id: "rel-label",
|
|
142
147
|
type: "text",
|
|
143
|
-
value:
|
|
144
|
-
onChange: (e) =>
|
|
145
|
-
placeholder:
|
|
148
|
+
value: O,
|
|
149
|
+
onChange: (e) => k(e.target.value),
|
|
150
|
+
placeholder: w("relationships.new.basics.labelPlaceholder", "e.g. Netflix Premium, AWS Production"),
|
|
146
151
|
className: x,
|
|
147
152
|
required: !0
|
|
148
153
|
})] }),
|
|
@@ -151,15 +156,16 @@ function w() {
|
|
|
151
156
|
children: [/* @__PURE__ */ m("label", {
|
|
152
157
|
htmlFor: "rel-kind",
|
|
153
158
|
className: S,
|
|
154
|
-
children:
|
|
159
|
+
children: w("relationships.new.basics.kindLabel", "Kind")
|
|
155
160
|
}), /* @__PURE__ */ m("select", {
|
|
161
|
+
...Q("rel-kind"),
|
|
156
162
|
id: "rel-kind",
|
|
157
|
-
value:
|
|
158
|
-
onChange: (e) =>
|
|
163
|
+
value: A,
|
|
164
|
+
onChange: (e) => j(e.target.value),
|
|
159
165
|
className: x,
|
|
160
166
|
children: v.map((e) => /* @__PURE__ */ m("option", {
|
|
161
167
|
value: e,
|
|
162
|
-
children:
|
|
168
|
+
children: w(b[e], g(e))
|
|
163
169
|
}, e))
|
|
164
170
|
})]
|
|
165
171
|
}),
|
|
@@ -168,14 +174,15 @@ function w() {
|
|
|
168
174
|
children: [/* @__PURE__ */ m("label", {
|
|
169
175
|
htmlFor: "rel-department",
|
|
170
176
|
className: S,
|
|
171
|
-
children:
|
|
177
|
+
children: w("relationships.new.basics.departmentLabel", "Department or team")
|
|
172
178
|
}), /* @__PURE__ */ m("input", {
|
|
179
|
+
...Q("rel-department"),
|
|
173
180
|
id: "rel-department",
|
|
174
181
|
type: "text",
|
|
175
182
|
maxLength: 120,
|
|
176
|
-
value:
|
|
177
|
-
onChange: (e) =>
|
|
178
|
-
placeholder:
|
|
183
|
+
value: J,
|
|
184
|
+
onChange: (e) => Y(e.target.value),
|
|
185
|
+
placeholder: w("relationships.new.basics.departmentPlaceholder", "e.g. Engineering, Marketing"),
|
|
179
186
|
className: x
|
|
180
187
|
})]
|
|
181
188
|
})
|
|
@@ -184,41 +191,43 @@ function w() {
|
|
|
184
191
|
}),
|
|
185
192
|
/* @__PURE__ */ m(C, {
|
|
186
193
|
icon: /* @__PURE__ */ m(u, { className: "h-4 w-4" }),
|
|
187
|
-
title:
|
|
188
|
-
description:
|
|
194
|
+
title: w("relationships.new.providerPlan.title", "Provider & plan"),
|
|
195
|
+
description: w("relationships.new.providerPlan.description", "Link this relationship to a provider and plan from the registry (optional)."),
|
|
189
196
|
children: /* @__PURE__ */ h("div", {
|
|
190
197
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
191
198
|
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
192
199
|
htmlFor: "rel-provider",
|
|
193
200
|
className: S,
|
|
194
|
-
children:
|
|
201
|
+
children: w("relationships.new.providerPlan.providerLabel", "Provider")
|
|
195
202
|
}), /* @__PURE__ */ h("select", {
|
|
203
|
+
...Q("rel-provider"),
|
|
196
204
|
id: "rel-provider",
|
|
197
|
-
value:
|
|
205
|
+
value: M,
|
|
198
206
|
onChange: (e) => {
|
|
199
|
-
|
|
207
|
+
N(e.target.value), F("");
|
|
200
208
|
},
|
|
201
209
|
className: x,
|
|
202
210
|
children: [/* @__PURE__ */ m("option", {
|
|
203
211
|
value: "",
|
|
204
|
-
children:
|
|
205
|
-
}),
|
|
212
|
+
children: w("relationships.new.providerPlan.providerNone", "— None —")
|
|
213
|
+
}), re.map((e) => /* @__PURE__ */ m("option", {
|
|
206
214
|
value: e.id,
|
|
207
215
|
children: e.name
|
|
208
216
|
}, e.id))]
|
|
209
217
|
})] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
210
218
|
htmlFor: "rel-plan",
|
|
211
219
|
className: S,
|
|
212
|
-
children:
|
|
220
|
+
children: w("relationships.new.providerPlan.planLabel", "Plan")
|
|
213
221
|
}), /* @__PURE__ */ h("select", {
|
|
222
|
+
...Q("rel-plan"),
|
|
214
223
|
id: "rel-plan",
|
|
215
|
-
value:
|
|
216
|
-
onChange: (e) =>
|
|
224
|
+
value: P,
|
|
225
|
+
onChange: (e) => F(e.target.value),
|
|
217
226
|
className: x,
|
|
218
|
-
disabled: !
|
|
227
|
+
disabled: !M || $.length === 0,
|
|
219
228
|
children: [/* @__PURE__ */ m("option", {
|
|
220
229
|
value: "",
|
|
221
|
-
children:
|
|
230
|
+
children: M ? $.length === 0 ? w("relationships.new.providerPlan.noPlans", "No plans available") : w("relationships.new.providerPlan.planNone", "— None —") : w("relationships.new.providerPlan.selectProviderFirst", "Select a provider first")
|
|
222
231
|
}), $.map((e) => /* @__PURE__ */ m("option", {
|
|
223
232
|
value: e.id,
|
|
224
233
|
children: e.name
|
|
@@ -228,8 +237,8 @@ function w() {
|
|
|
228
237
|
}),
|
|
229
238
|
/* @__PURE__ */ m(C, {
|
|
230
239
|
icon: /* @__PURE__ */ m(p, { className: "h-4 w-4" }),
|
|
231
|
-
title:
|
|
232
|
-
description:
|
|
240
|
+
title: w("relationships.new.pricing.title", "Pricing & billing"),
|
|
241
|
+
description: w("relationships.new.pricing.description", "Set the price, cadence and next renewal so Subscriber Bot can track it."),
|
|
233
242
|
children: /* @__PURE__ */ h("div", {
|
|
234
243
|
className: "space-y-4",
|
|
235
244
|
children: [/* @__PURE__ */ h("div", {
|
|
@@ -238,42 +247,45 @@ function w() {
|
|
|
238
247
|
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
239
248
|
htmlFor: "rel-amount",
|
|
240
249
|
className: S,
|
|
241
|
-
children:
|
|
250
|
+
children: w("relationships.new.pricing.amountLabel", "Amount")
|
|
242
251
|
}), /* @__PURE__ */ m("input", {
|
|
252
|
+
...Q("rel-amount"),
|
|
243
253
|
id: "rel-amount",
|
|
244
254
|
type: "number",
|
|
245
255
|
min: "0",
|
|
246
256
|
step: "0.01",
|
|
247
|
-
value:
|
|
248
|
-
onChange: (e) =>
|
|
249
|
-
placeholder:
|
|
257
|
+
value: I,
|
|
258
|
+
onChange: (e) => L(e.target.value),
|
|
259
|
+
placeholder: w("relationships.new.pricing.amountPlaceholder", "0.00"),
|
|
250
260
|
className: x
|
|
251
261
|
})] }),
|
|
252
262
|
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
253
263
|
htmlFor: "rel-currency",
|
|
254
264
|
className: S,
|
|
255
|
-
children:
|
|
265
|
+
children: w("relationships.new.pricing.currencyLabel", "Currency")
|
|
256
266
|
}), /* @__PURE__ */ m("input", {
|
|
267
|
+
...Q("rel-currency"),
|
|
257
268
|
id: "rel-currency",
|
|
258
269
|
type: "text",
|
|
259
|
-
value:
|
|
260
|
-
onChange: (e) =>
|
|
261
|
-
placeholder:
|
|
270
|
+
value: R,
|
|
271
|
+
onChange: (e) => z(e.target.value.toUpperCase()),
|
|
272
|
+
placeholder: w("relationships.new.pricing.currencyPlaceholder", "USD"),
|
|
262
273
|
maxLength: 3,
|
|
263
274
|
className: x
|
|
264
275
|
})] }),
|
|
265
276
|
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
266
277
|
htmlFor: "rel-interval",
|
|
267
278
|
className: S,
|
|
268
|
-
children:
|
|
279
|
+
children: w("relationships.new.pricing.intervalLabel", "Billing interval")
|
|
269
280
|
}), /* @__PURE__ */ m("select", {
|
|
281
|
+
...Q("rel-interval"),
|
|
270
282
|
id: "rel-interval",
|
|
271
|
-
value:
|
|
272
|
-
onChange: (e) =>
|
|
283
|
+
value: B,
|
|
284
|
+
onChange: (e) => V(e.target.value),
|
|
273
285
|
className: x,
|
|
274
286
|
children: y.map((e) => /* @__PURE__ */ m("option", {
|
|
275
287
|
value: e,
|
|
276
|
-
children:
|
|
288
|
+
children: g(e)
|
|
277
289
|
}, e))
|
|
278
290
|
})] })
|
|
279
291
|
]
|
|
@@ -282,23 +294,24 @@ function w() {
|
|
|
282
294
|
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
283
295
|
htmlFor: "rel-renews",
|
|
284
296
|
className: S,
|
|
285
|
-
children:
|
|
297
|
+
children: w("relationships.new.pricing.renewsOnLabel", "Renews on")
|
|
286
298
|
}), /* @__PURE__ */ m("input", {
|
|
299
|
+
...Q("rel-renews"),
|
|
287
300
|
id: "rel-renews",
|
|
288
301
|
type: "date",
|
|
289
|
-
value:
|
|
290
|
-
onChange: (e) =>
|
|
302
|
+
value: H,
|
|
303
|
+
onChange: (e) => U(e.target.value),
|
|
291
304
|
className: x
|
|
292
305
|
})] }), /* @__PURE__ */ h("label", {
|
|
293
306
|
className: "flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 sm:mt-6",
|
|
294
307
|
children: [/* @__PURE__ */ m("input", {
|
|
295
308
|
type: "checkbox",
|
|
296
|
-
checked:
|
|
297
|
-
onChange: (e) =>
|
|
309
|
+
checked: W,
|
|
310
|
+
onChange: (e) => G(e.target.checked),
|
|
298
311
|
className: "size-4 rounded border-border-subtle"
|
|
299
312
|
}), /* @__PURE__ */ m("span", {
|
|
300
313
|
className: "text-sm text-text-primary",
|
|
301
|
-
children:
|
|
314
|
+
children: w("relationships.new.pricing.autoRenews", "Auto-renews")
|
|
302
315
|
})]
|
|
303
316
|
})]
|
|
304
317
|
})]
|
|
@@ -306,15 +319,16 @@ function w() {
|
|
|
306
319
|
}),
|
|
307
320
|
/* @__PURE__ */ m(C, {
|
|
308
321
|
icon: /* @__PURE__ */ m(d, { className: "h-4 w-4" }),
|
|
309
|
-
title:
|
|
310
|
-
description:
|
|
322
|
+
title: w("relationships.new.notes.title", "Notes"),
|
|
323
|
+
description: w("relationships.new.notes.description", "Anything worth remembering about this relationship."),
|
|
311
324
|
children: /* @__PURE__ */ m("textarea", {
|
|
325
|
+
...Q("rel-notes"),
|
|
312
326
|
id: "rel-notes",
|
|
313
|
-
"aria-label":
|
|
314
|
-
value:
|
|
315
|
-
onChange: (e) =>
|
|
327
|
+
"aria-label": w("relationships.new.notes.title", "Notes"),
|
|
328
|
+
value: K,
|
|
329
|
+
onChange: (e) => q(e.target.value),
|
|
316
330
|
rows: 3,
|
|
317
|
-
placeholder:
|
|
331
|
+
placeholder: w("relationships.new.notes.placeholder", "Anything worth remembering about this relationship…"),
|
|
318
332
|
className: x
|
|
319
333
|
})
|
|
320
334
|
}),
|
|
@@ -322,14 +336,14 @@ function w() {
|
|
|
322
336
|
className: "flex flex-col gap-3 sm:flex-row",
|
|
323
337
|
children: [/* @__PURE__ */ m("button", {
|
|
324
338
|
type: "submit",
|
|
325
|
-
disabled:
|
|
339
|
+
disabled: E.isPending,
|
|
326
340
|
className: "rounded-lg bg-action-primary-bg px-5 py-2.5 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
|
|
327
|
-
children:
|
|
341
|
+
children: E.isPending ? w("relationships.new.creating", "Creating…") : w("relationships.new.submit", "Create relationship")
|
|
328
342
|
}), /* @__PURE__ */ m("button", {
|
|
329
343
|
type: "button",
|
|
330
|
-
onClick: () =>
|
|
344
|
+
onClick: () => T("/relationships"),
|
|
331
345
|
className: "rounded-lg border border-border-subtle px-5 py-2.5 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
332
|
-
children:
|
|
346
|
+
children: w("relationships.new.cancel", "Cancel")
|
|
333
347
|
})]
|
|
334
348
|
})
|
|
335
349
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipNewPage.js","names":[],"sources":["../../../../src/subscriberbot/pages/relationships/RelationshipNewPage.tsx"],"sourcesContent":["/**\n * Create relationship\n * @module subscriberbot/pages/relationships\n *\n * Manual-add form for a recurring relationship AI can't auto-detect.\n * Writes `subCreateRelationship`. Provider + plan are optional pickers\n * sourced from the real registry (`subListProviders` / `subListPlans`).\n */\n\nimport { useState, type ReactNode } from 'react';\nimport { ArrowLeft, Tag, Building2, Wallet, StickyNote } from 'lucide-react';\nimport { GlassCard, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../../components/PageLayout';\nimport { ErrorView } from '../../components/StateViews';\nimport { useSubscriberBot } from '../../context/SubscriberBotContext';\nimport { useCreateRelationship, useProviders, usePlans } from '../../hooks/useSubscriberBotApi';\nimport { useTr } from '../../hooks/useTr';\nimport { formatEnumLabel } from '../../utils/formatters';\nimport type {\n SubBillingInterval,\n SubCreateRelationshipInput,\n SubRelationshipKind,\n} from '../../types';\n\nconst KINDS: SubRelationshipKind[] = [\n 'SUBSCRIPTION',\n 'MEMBERSHIP',\n 'LICENSE',\n 'CONTRACT',\n 'NEWSLETTER',\n 'RECURRING_PAYMENT',\n 'ENROLLMENT',\n 'TRIAL',\n];\n\nconst INTERVALS: SubBillingInterval[] = [\n 'MONTHLY',\n 'YEARLY',\n 'QUARTERLY',\n 'WEEKLY',\n 'DAILY',\n 'USAGE_BASED',\n 'LIFETIME',\n 'FREE',\n];\n\nconst KIND_KEY: Record<SubRelationshipKind, string> = {\n SUBSCRIPTION: 'relationships.kinds.subscription',\n MEMBERSHIP: 'relationships.kinds.membership',\n LICENSE: 'relationships.kinds.license',\n CONTRACT: 'relationships.kinds.contract',\n NEWSLETTER: 'relationships.kinds.newsletter',\n RECURRING_PAYMENT: 'relationships.kinds.recurringPayment',\n ENROLLMENT: 'relationships.kinds.enrollment',\n TRIAL: 'relationships.kinds.trial',\n};\n\nconst inputCls =\n 'w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]';\nconst labelCls = 'mb-1.5 block text-xs font-medium text-text-secondary';\n\n/** Grouped form section on a glass surface. */\nfunction FormSection({\n icon,\n title,\n description,\n children,\n}: {\n icon: ReactNode;\n title: string;\n description: string;\n children: ReactNode;\n}) {\n return (\n <GlassCard treatment=\"metric\" className=\"p-5 sm:p-6\">\n <div className=\"flex items-start gap-3\">\n <span className=\"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary\">\n {icon}\n </span>\n <div className=\"min-w-0\">\n <h2 className=\"text-sm font-semibold text-text-primary\">{title}</h2>\n <p className=\"mt-0.5 text-xs text-text-secondary\">{description}</p>\n </div>\n </div>\n <div className=\"mt-4\">{children}</div>\n </GlassCard>\n );\n}\n\nexport function RelationshipNewPage() {\n const tr = useTr();\n const { navigateTo } = useSubscriberBot();\n const create = useCreateRelationship();\n const providersQ = useProviders({ pagination: { limit: 100, offset: 0 } });\n\n const [label, setLabel] = useState('');\n const [kind, setKind] = useState<SubRelationshipKind>('SUBSCRIPTION');\n const [providerId, setProviderId] = useState('');\n const [planId, setPlanId] = useState('');\n const [amount, setAmount] = useState('');\n const [currency, setCurrency] = useState('USD');\n const [interval, setInterval] = useState<SubBillingInterval>('MONTHLY');\n const [renewsAt, setRenewsAt] = useState('');\n const [autoRenew, setAutoRenew] = useState(true);\n const [notes, setNotes] = useState('');\n const [department, setDepartment] = useState('');\n const [formError, setFormError] = useState<string | null>(null);\n\n const plansQ = usePlans(providerId || undefined);\n const providers = providersQ.data?.items ?? [];\n const plans = plansQ.data ?? [];\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n setFormError(null);\n if (!label.trim()) {\n setFormError(tr('relationships.new.basics.labelRequired', 'A label is required.'));\n return;\n }\n const input: SubCreateRelationshipInput = {\n label: label.trim(),\n kind,\n interval,\n autoRenew,\n currency: currency.trim() || 'USD',\n ...(providerId ? { providerId } : {}),\n ...(planId ? { planId } : {}),\n ...(amount ? { amount: Number(amount) } : {}),\n ...(renewsAt ? { renewsAt: new Date(renewsAt).toISOString() } : {}),\n ...(notes.trim() ? { notes: notes.trim() } : {}),\n ...(department.trim() ? { department: department.trim() } : {}),\n };\n create.mutate(input, {\n onSuccess: (rel) => navigateTo(`/relationships/${rel.id}`),\n onError: (err) =>\n setFormError(\n err instanceof Error\n ? err.message\n : tr('relationships.new.error', 'Could not create relationship.')\n ),\n });\n };\n\n if (providersQ.isError) {\n return (\n <PageLayout title={tr('relationships.new.title', 'Add relationship')}>\n <ErrorView\n message={tr('relationships.new.providerError', 'Could not load the provider registry.')}\n onRetry={() => void providersQ.refetch()}\n />\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={tr('relationships.new.title', 'Add relationship')}\n description={tr(\n 'relationships.new.description',\n 'Track a new recurring digital relationship'\n )}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/relationships')}\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 <ArrowLeft className=\"h-4 w-4\" /> {tr('relationships.new.back', 'Back')}\n </button>\n }\n >\n <PagePurpose className=\"mb-6\">\n {tr(\n 'relationships.new.purpose',\n 'Manually add a subscription, membership, license or contract. Link it to a provider and plan from the registry, set the price and renewal date, and Subscriber Bot will track its lifecycle from here.'\n )}\n </PagePurpose>\n\n <form onSubmit={handleSubmit} className=\"max-w-3xl space-y-5\">\n {formError && (\n <div className=\"rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text\">\n {formError}\n </div>\n )}\n\n {/* Basics */}\n <FormSection\n icon={<Tag className=\"h-4 w-4\" />}\n title={tr('relationships.new.basics.title', 'Basics')}\n description={tr(\n 'relationships.new.basics.description',\n 'Name this relationship and choose what kind it is.'\n )}\n >\n <div className=\"space-y-4\">\n <div>\n <label htmlFor=\"rel-label\" className={labelCls}>\n {tr('relationships.new.basics.labelLabel', 'Label')}{' '}\n <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n id=\"rel-label\"\n type=\"text\"\n value={label}\n onChange={(e) => setLabel(e.target.value)}\n placeholder={tr(\n 'relationships.new.basics.labelPlaceholder',\n 'e.g. Netflix Premium, AWS Production'\n )}\n className={inputCls}\n required\n />\n </div>\n <div className=\"max-w-xs\">\n <label htmlFor=\"rel-kind\" className={labelCls}>\n {tr('relationships.new.basics.kindLabel', 'Kind')}\n </label>\n <select\n id=\"rel-kind\"\n value={kind}\n onChange={(e) => setKind(e.target.value as SubRelationshipKind)}\n className={inputCls}\n >\n {KINDS.map((k) => (\n <option key={k} value={k}>\n {tr(KIND_KEY[k], formatEnumLabel(k))}\n </option>\n ))}\n </select>\n </div>\n <div className=\"max-w-xs\">\n <label htmlFor=\"rel-department\" className={labelCls}>\n {tr('relationships.new.basics.departmentLabel', 'Department or team')}\n </label>\n <input\n id=\"rel-department\"\n type=\"text\"\n maxLength={120}\n value={department}\n onChange={(e) => setDepartment(e.target.value)}\n placeholder={tr(\n 'relationships.new.basics.departmentPlaceholder',\n 'e.g. Engineering, Marketing'\n )}\n className={inputCls}\n />\n </div>\n </div>\n </FormSection>\n\n {/* Provider & plan */}\n <FormSection\n icon={<Building2 className=\"h-4 w-4\" />}\n title={tr('relationships.new.providerPlan.title', 'Provider & plan')}\n description={tr(\n 'relationships.new.providerPlan.description',\n 'Link this relationship to a provider and plan from the registry (optional).'\n )}\n >\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label htmlFor=\"rel-provider\" className={labelCls}>\n {tr('relationships.new.providerPlan.providerLabel', 'Provider')}\n </label>\n <select\n id=\"rel-provider\"\n value={providerId}\n onChange={(e) => {\n setProviderId(e.target.value);\n setPlanId('');\n }}\n className={inputCls}\n >\n <option value=\"\">\n {tr('relationships.new.providerPlan.providerNone', '— None —')}\n </option>\n {providers.map((p) => (\n <option key={p.id} value={p.id}>\n {p.name}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label htmlFor=\"rel-plan\" className={labelCls}>\n {tr('relationships.new.providerPlan.planLabel', 'Plan')}\n </label>\n <select\n id=\"rel-plan\"\n value={planId}\n onChange={(e) => setPlanId(e.target.value)}\n className={inputCls}\n disabled={!providerId || plans.length === 0}\n >\n <option value=\"\">\n {providerId\n ? plans.length === 0\n ? tr('relationships.new.providerPlan.noPlans', 'No plans available')\n : tr('relationships.new.providerPlan.planNone', '— None —')\n : tr(\n 'relationships.new.providerPlan.selectProviderFirst',\n 'Select a provider first'\n )}\n </option>\n {plans.map((pl) => (\n <option key={pl.id} value={pl.id}>\n {pl.name}\n </option>\n ))}\n </select>\n </div>\n </div>\n </FormSection>\n\n {/* Pricing & billing */}\n <FormSection\n icon={<Wallet className=\"h-4 w-4\" />}\n title={tr('relationships.new.pricing.title', 'Pricing & billing')}\n description={tr(\n 'relationships.new.pricing.description',\n 'Set the price, cadence and next renewal so Subscriber Bot can track it.'\n )}\n >\n <div className=\"space-y-4\">\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-3\">\n <div>\n <label htmlFor=\"rel-amount\" className={labelCls}>\n {tr('relationships.new.pricing.amountLabel', 'Amount')}\n </label>\n <input\n id=\"rel-amount\"\n type=\"number\"\n min=\"0\"\n step=\"0.01\"\n value={amount}\n onChange={(e) => setAmount(e.target.value)}\n placeholder={tr('relationships.new.pricing.amountPlaceholder', '0.00')}\n className={inputCls}\n />\n </div>\n <div>\n <label htmlFor=\"rel-currency\" className={labelCls}>\n {tr('relationships.new.pricing.currencyLabel', 'Currency')}\n </label>\n <input\n id=\"rel-currency\"\n type=\"text\"\n value={currency}\n onChange={(e) => setCurrency(e.target.value.toUpperCase())}\n placeholder={tr('relationships.new.pricing.currencyPlaceholder', 'USD')}\n maxLength={3}\n className={inputCls}\n />\n </div>\n <div>\n <label htmlFor=\"rel-interval\" className={labelCls}>\n {tr('relationships.new.pricing.intervalLabel', 'Billing interval')}\n </label>\n <select\n id=\"rel-interval\"\n value={interval}\n onChange={(e) => setInterval(e.target.value as SubBillingInterval)}\n className={inputCls}\n >\n {INTERVALS.map((i) => (\n <option key={i} value={i}>\n {formatEnumLabel(i)}\n </option>\n ))}\n </select>\n </div>\n </div>\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label htmlFor=\"rel-renews\" className={labelCls}>\n {tr('relationships.new.pricing.renewsOnLabel', 'Renews on')}\n </label>\n <input\n id=\"rel-renews\"\n type=\"date\"\n value={renewsAt}\n onChange={(e) => setRenewsAt(e.target.value)}\n className={inputCls}\n />\n </div>\n <label className=\"flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 sm:mt-6\">\n <input\n type=\"checkbox\"\n checked={autoRenew}\n onChange={(e) => setAutoRenew(e.target.checked)}\n className=\"size-4 rounded border-border-subtle\"\n />\n <span className=\"text-sm text-text-primary\">\n {tr('relationships.new.pricing.autoRenews', 'Auto-renews')}\n </span>\n </label>\n </div>\n </div>\n </FormSection>\n\n {/* Notes */}\n <FormSection\n icon={<StickyNote className=\"h-4 w-4\" />}\n title={tr('relationships.new.notes.title', 'Notes')}\n description={tr(\n 'relationships.new.notes.description',\n 'Anything worth remembering about this relationship.'\n )}\n >\n <textarea\n id=\"rel-notes\"\n aria-label={tr('relationships.new.notes.title', 'Notes')}\n value={notes}\n onChange={(e) => setNotes(e.target.value)}\n rows={3}\n placeholder={tr(\n 'relationships.new.notes.placeholder',\n 'Anything worth remembering about this relationship…'\n )}\n className={inputCls}\n />\n </FormSection>\n\n <div className=\"flex flex-col gap-3 sm:flex-row\">\n <button\n type=\"submit\"\n disabled={create.isPending}\n className=\"rounded-lg bg-action-primary-bg px-5 py-2.5 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50\"\n >\n {create.isPending\n ? tr('relationships.new.creating', 'Creating…')\n : tr('relationships.new.submit', 'Create relationship')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo('/relationships')}\n className=\"rounded-lg border border-border-subtle px-5 py-2.5 text-sm font-medium text-text-primary hover:bg-bg-sunken\"\n >\n {tr('relationships.new.cancel', 'Cancel')}\n </button>\n </div>\n </form>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;AAwBA,IAAM,IAA+B;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAEM,IAAkC;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAEM,IAAgD;CACpD,cAAc;CACd,YAAY;CACZ,SAAS;CACT,UAAU;CACV,YAAY;CACZ,mBAAmB;CACnB,YAAY;CACZ,OAAO;AACT,GAEM,IACJ,0MACI,IAAW;AAGjB,SAAS,EAAY,EACnB,SACA,UACA,gBACA,eAMC;CACD,OACE,kBAAC,GAAD;EAAW,WAAU;EAAS,WAAU;YAAxC,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,QAAD;IAAM,WAAU;cACb;GACG,CAAA,GACN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,MAAD;KAAI,WAAU;eAA2C;IAAU,CAAA,GACnE,kBAAC,KAAD;KAAG,WAAU;eAAsC;IAAe,CAAA,CAC/D;KACF;MACL,kBAAC,OAAD;GAAK,WAAU;GAAQ;EAAc,CAAA,CAC5B;;AAEf;AAEA,SAAgB,IAAsB;CACpC,IAAM,IAAK,EAAM,GACX,EAAE,kBAAe,EAAiB,GAClC,IAAS,EAAsB,GAC/B,IAAa,EAAa,EAAE,YAAY;EAAE,OAAO;EAAK,QAAQ;CAAE,EAAE,CAAC,GAEnE,CAAC,GAAO,KAAY,EAAS,EAAE,GAC/B,CAAC,GAAM,KAAW,EAA8B,cAAc,GAC9D,CAAC,GAAY,KAAiB,EAAS,EAAE,GACzC,CAAC,GAAQ,KAAa,EAAS,EAAE,GACjC,CAAC,GAAQ,KAAa,EAAS,EAAE,GACjC,CAAC,GAAU,KAAe,EAAS,KAAK,GACxC,CAAC,GAAU,KAAe,EAA6B,SAAS,GAChE,CAAC,G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C,WAAU;gBAET,EAAG,4BAA4B,QAAQ;KAClC,CAAA,CACL;;GACD;IACI;;AAEhB"}
|
|
1
|
+
{"version":3,"file":"RelationshipNewPage.js","names":[],"sources":["../../../../src/subscriberbot/pages/relationships/RelationshipNewPage.tsx"],"sourcesContent":["import { useFormatters } from '../../hooks/useFormatters';\nimport { useFormError } from '../../hooks/useFormError';\n/**\n * Create relationship\n * @module subscriberbot/pages/relationships\n *\n * Manual-add form for a recurring relationship AI can't auto-detect.\n * Writes `subCreateRelationship`. Provider + plan are optional pickers\n * sourced from the real registry (`subListProviders` / `subListPlans`).\n */\n\nimport { useState, type ReactNode } from 'react';\nimport { ArrowLeft, Tag, Building2, Wallet, StickyNote } from 'lucide-react';\nimport { GlassCard, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../../components/PageLayout';\nimport { ErrorView } from '../../components/StateViews';\nimport { useSubscriberBot } from '../../context/SubscriberBotContext';\nimport { useCreateRelationship, useProviders, usePlans } from '../../hooks/useSubscriberBotApi';\nimport { useTr } from '../../hooks/useTr';\n\nimport type {\n SubBillingInterval,\n SubCreateRelationshipInput,\n SubRelationshipKind,\n} from '../../types';\n\nconst KINDS: SubRelationshipKind[] = [\n 'SUBSCRIPTION',\n 'MEMBERSHIP',\n 'LICENSE',\n 'CONTRACT',\n 'NEWSLETTER',\n 'RECURRING_PAYMENT',\n 'ENROLLMENT',\n 'TRIAL',\n];\n\nconst INTERVALS: SubBillingInterval[] = [\n 'MONTHLY',\n 'YEARLY',\n 'QUARTERLY',\n 'WEEKLY',\n 'DAILY',\n 'USAGE_BASED',\n 'LIFETIME',\n 'FREE',\n];\n\nconst KIND_KEY: Record<SubRelationshipKind, string> = {\n SUBSCRIPTION: 'relationships.kinds.subscription',\n MEMBERSHIP: 'relationships.kinds.membership',\n LICENSE: 'relationships.kinds.license',\n CONTRACT: 'relationships.kinds.contract',\n NEWSLETTER: 'relationships.kinds.newsletter',\n RECURRING_PAYMENT: 'relationships.kinds.recurringPayment',\n ENROLLMENT: 'relationships.kinds.enrollment',\n TRIAL: 'relationships.kinds.trial',\n};\n\nconst inputCls =\n 'w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]';\nconst labelCls = 'mb-1.5 block text-xs font-medium text-text-secondary';\n\n/** Grouped form section on a glass surface. */\nfunction FormSection({\n icon,\n title,\n description,\n children,\n}: {\n icon: ReactNode;\n title: string;\n description: string;\n children: ReactNode;\n}) {\n return (\n <GlassCard treatment=\"metric\" className=\"p-5 sm:p-6\">\n <div className=\"flex items-start gap-3\">\n <span className=\"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary\">\n {icon}\n </span>\n <div className=\"min-w-0\">\n <h2 className=\"text-sm font-semibold text-text-primary\">{title}</h2>\n <p className=\"mt-0.5 text-xs text-text-secondary\">{description}</p>\n </div>\n </div>\n <div className=\"mt-4\">{children}</div>\n </GlassCard>\n );\n}\n\nexport function RelationshipNewPage() {\n const { formatEnumLabel } = useFormatters();\n\n const tr = useTr();\n const { navigateTo } = useSubscriberBot();\n const create = useCreateRelationship();\n const providersQ = useProviders({ pagination: { limit: 100, offset: 0 } });\n\n const [label, setLabel] = useState('');\n const [kind, setKind] = useState<SubRelationshipKind>('SUBSCRIPTION');\n const [providerId, setProviderId] = useState('');\n const [planId, setPlanId] = useState('');\n const [amount, setAmount] = useState('');\n const [currency, setCurrency] = useState('USD');\n const [interval, setInterval] = useState<SubBillingInterval>('MONTHLY');\n const [renewsAt, setRenewsAt] = useState('');\n const [autoRenew, setAutoRenew] = useState(true);\n const [notes, setNotes] = useState('');\n const [department, setDepartment] = useState('');\n const [formError, setFormError, fieldErrorProps, formErrorId] = useFormError();\n\n const plansQ = usePlans(providerId || undefined);\n const providers = providersQ.data?.items ?? [];\n const plans = plansQ.data ?? [];\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n setFormError(null);\n if (!label.trim()) {\n setFormError(\n tr('relationships.new.basics.labelRequired', 'A label is required.'),\n 'rel-label'\n );\n return;\n }\n const input: SubCreateRelationshipInput = {\n label: label.trim(),\n kind,\n interval,\n autoRenew,\n currency: currency.trim() || 'USD',\n ...(providerId ? { providerId } : {}),\n ...(planId ? { planId } : {}),\n ...(amount ? { amount: Number(amount) } : {}),\n ...(renewsAt ? { renewsAt: new Date(renewsAt).toISOString() } : {}),\n ...(notes.trim() ? { notes: notes.trim() } : {}),\n ...(department.trim() ? { department: department.trim() } : {}),\n };\n create.mutate(input, {\n onSuccess: (rel) => navigateTo(`/relationships/${rel.id}`),\n onError: (err) =>\n setFormError(\n err instanceof Error\n ? err.message\n : tr('relationships.new.error', 'Could not create relationship.')\n ),\n });\n };\n\n if (providersQ.isError) {\n return (\n <PageLayout title={tr('relationships.new.title', 'Add relationship')}>\n <ErrorView\n message={tr('relationships.new.providerError', 'Could not load the provider registry.')}\n onRetry={() => void providersQ.refetch()}\n />\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={tr('relationships.new.title', 'Add relationship')}\n description={tr(\n 'relationships.new.description',\n 'Track a new recurring digital relationship'\n )}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/relationships')}\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 <ArrowLeft className=\"rtl:rotate-180 h-4 w-4\" /> {tr('relationships.new.back', 'Back')}\n </button>\n }\n >\n <PagePurpose className=\"mb-6\">\n {tr(\n 'relationships.new.purpose',\n 'Manually add a subscription, membership, license or contract. Link it to a provider and plan from the registry, set the price and renewal date, and Subscriber Bot will track its lifecycle from here.'\n )}\n </PagePurpose>\n\n <form onSubmit={handleSubmit} className=\"max-w-3xl space-y-5\">\n {formError && (\n <div\n id={formErrorId}\n tabIndex={-1}\n role=\"alert\"\n className=\"rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text\"\n >\n {formError}\n </div>\n )}\n\n {/* Basics */}\n <FormSection\n icon={<Tag className=\"h-4 w-4\" />}\n title={tr('relationships.new.basics.title', 'Basics')}\n description={tr(\n 'relationships.new.basics.description',\n 'Name this relationship and choose what kind it is.'\n )}\n >\n <div className=\"space-y-4\">\n <div>\n <label htmlFor=\"rel-label\" className={labelCls}>\n {tr('relationships.new.basics.labelLabel', 'Label')}{' '}\n <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n {...fieldErrorProps('rel-label')}\n id=\"rel-label\"\n type=\"text\"\n value={label}\n onChange={(e) => setLabel(e.target.value)}\n placeholder={tr(\n 'relationships.new.basics.labelPlaceholder',\n 'e.g. Netflix Premium, AWS Production'\n )}\n className={inputCls}\n required\n />\n </div>\n <div className=\"max-w-xs\">\n <label htmlFor=\"rel-kind\" className={labelCls}>\n {tr('relationships.new.basics.kindLabel', 'Kind')}\n </label>\n <select\n {...fieldErrorProps('rel-kind')}\n id=\"rel-kind\"\n value={kind}\n onChange={(e) => setKind(e.target.value as SubRelationshipKind)}\n className={inputCls}\n >\n {KINDS.map((k) => (\n <option key={k} value={k}>\n {tr(KIND_KEY[k], formatEnumLabel(k))}\n </option>\n ))}\n </select>\n </div>\n <div className=\"max-w-xs\">\n <label htmlFor=\"rel-department\" className={labelCls}>\n {tr('relationships.new.basics.departmentLabel', 'Department or team')}\n </label>\n <input\n {...fieldErrorProps('rel-department')}\n id=\"rel-department\"\n type=\"text\"\n maxLength={120}\n value={department}\n onChange={(e) => setDepartment(e.target.value)}\n placeholder={tr(\n 'relationships.new.basics.departmentPlaceholder',\n 'e.g. Engineering, Marketing'\n )}\n className={inputCls}\n />\n </div>\n </div>\n </FormSection>\n\n {/* Provider & plan */}\n <FormSection\n icon={<Building2 className=\"h-4 w-4\" />}\n title={tr('relationships.new.providerPlan.title', 'Provider & plan')}\n description={tr(\n 'relationships.new.providerPlan.description',\n 'Link this relationship to a provider and plan from the registry (optional).'\n )}\n >\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label htmlFor=\"rel-provider\" className={labelCls}>\n {tr('relationships.new.providerPlan.providerLabel', 'Provider')}\n </label>\n <select\n {...fieldErrorProps('rel-provider')}\n id=\"rel-provider\"\n value={providerId}\n onChange={(e) => {\n setProviderId(e.target.value);\n setPlanId('');\n }}\n className={inputCls}\n >\n <option value=\"\">\n {tr('relationships.new.providerPlan.providerNone', '— None —')}\n </option>\n {providers.map((p) => (\n <option key={p.id} value={p.id}>\n {p.name}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label htmlFor=\"rel-plan\" className={labelCls}>\n {tr('relationships.new.providerPlan.planLabel', 'Plan')}\n </label>\n <select\n {...fieldErrorProps('rel-plan')}\n id=\"rel-plan\"\n value={planId}\n onChange={(e) => setPlanId(e.target.value)}\n className={inputCls}\n disabled={!providerId || plans.length === 0}\n >\n <option value=\"\">\n {providerId\n ? plans.length === 0\n ? tr('relationships.new.providerPlan.noPlans', 'No plans available')\n : tr('relationships.new.providerPlan.planNone', '— None —')\n : tr(\n 'relationships.new.providerPlan.selectProviderFirst',\n 'Select a provider first'\n )}\n </option>\n {plans.map((pl) => (\n <option key={pl.id} value={pl.id}>\n {pl.name}\n </option>\n ))}\n </select>\n </div>\n </div>\n </FormSection>\n\n {/* Pricing & billing */}\n <FormSection\n icon={<Wallet className=\"h-4 w-4\" />}\n title={tr('relationships.new.pricing.title', 'Pricing & billing')}\n description={tr(\n 'relationships.new.pricing.description',\n 'Set the price, cadence and next renewal so Subscriber Bot can track it.'\n )}\n >\n <div className=\"space-y-4\">\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-3\">\n <div>\n <label htmlFor=\"rel-amount\" className={labelCls}>\n {tr('relationships.new.pricing.amountLabel', 'Amount')}\n </label>\n <input\n {...fieldErrorProps('rel-amount')}\n id=\"rel-amount\"\n type=\"number\"\n min=\"0\"\n step=\"0.01\"\n value={amount}\n onChange={(e) => setAmount(e.target.value)}\n placeholder={tr('relationships.new.pricing.amountPlaceholder', '0.00')}\n className={inputCls}\n />\n </div>\n <div>\n <label htmlFor=\"rel-currency\" className={labelCls}>\n {tr('relationships.new.pricing.currencyLabel', 'Currency')}\n </label>\n <input\n {...fieldErrorProps('rel-currency')}\n id=\"rel-currency\"\n type=\"text\"\n value={currency}\n onChange={(e) => setCurrency(e.target.value.toUpperCase())}\n placeholder={tr('relationships.new.pricing.currencyPlaceholder', 'USD')}\n maxLength={3}\n className={inputCls}\n />\n </div>\n <div>\n <label htmlFor=\"rel-interval\" className={labelCls}>\n {tr('relationships.new.pricing.intervalLabel', 'Billing interval')}\n </label>\n <select\n {...fieldErrorProps('rel-interval')}\n id=\"rel-interval\"\n value={interval}\n onChange={(e) => setInterval(e.target.value as SubBillingInterval)}\n className={inputCls}\n >\n {INTERVALS.map((i) => (\n <option key={i} value={i}>\n {formatEnumLabel(i)}\n </option>\n ))}\n </select>\n </div>\n </div>\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label htmlFor=\"rel-renews\" className={labelCls}>\n {tr('relationships.new.pricing.renewsOnLabel', 'Renews on')}\n </label>\n <input\n {...fieldErrorProps('rel-renews')}\n id=\"rel-renews\"\n type=\"date\"\n value={renewsAt}\n onChange={(e) => setRenewsAt(e.target.value)}\n className={inputCls}\n />\n </div>\n <label className=\"flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 sm:mt-6\">\n <input\n type=\"checkbox\"\n checked={autoRenew}\n onChange={(e) => setAutoRenew(e.target.checked)}\n className=\"size-4 rounded border-border-subtle\"\n />\n <span className=\"text-sm text-text-primary\">\n {tr('relationships.new.pricing.autoRenews', 'Auto-renews')}\n </span>\n </label>\n </div>\n </div>\n </FormSection>\n\n {/* Notes */}\n <FormSection\n icon={<StickyNote className=\"h-4 w-4\" />}\n title={tr('relationships.new.notes.title', 'Notes')}\n description={tr(\n 'relationships.new.notes.description',\n 'Anything worth remembering about this relationship.'\n )}\n >\n <textarea\n {...fieldErrorProps('rel-notes')}\n id=\"rel-notes\"\n aria-label={tr('relationships.new.notes.title', 'Notes')}\n value={notes}\n onChange={(e) => setNotes(e.target.value)}\n rows={3}\n placeholder={tr(\n 'relationships.new.notes.placeholder',\n 'Anything worth remembering about this relationship…'\n )}\n className={inputCls}\n />\n </FormSection>\n\n <div className=\"flex flex-col gap-3 sm:flex-row\">\n <button\n type=\"submit\"\n disabled={create.isPending}\n className=\"rounded-lg bg-action-primary-bg px-5 py-2.5 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50\"\n >\n {create.isPending\n ? tr('relationships.new.creating', 'Creating…')\n : tr('relationships.new.submit', 'Create relationship')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo('/relationships')}\n className=\"rounded-lg border border-border-subtle px-5 py-2.5 text-sm font-medium text-text-primary hover:bg-bg-sunken\"\n >\n {tr('relationships.new.cancel', 'Cancel')}\n </button>\n </div>\n </form>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA0BA,IAAM,IAA+B;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAEM,IAAkC;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAEM,IAAgD;CACpD,cAAc;CACd,YAAY;CACZ,SAAS;CACT,UAAU;CACV,YAAY;CACZ,mBAAmB;CACnB,YAAY;CACZ,OAAO;AACT,GAEM,IACJ,0MACI,IAAW;AAGjB,SAAS,EAAY,EACnB,SACA,UACA,gBACA,eAMC;CACD,OACE,kBAAC,GAAD;EAAW,WAAU;EAAS,WAAU;YAAxC,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,QAAD;IAAM,WAAU;cACb;GACG,CAAA,GACN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,MAAD;KAAI,WAAU;eAA2C;IAAU,CAAA,GACnE,kBAAC,KAAD;KAAG,WAAU;eAAsC;IAAe,CAAA,CA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,CAAA,CACE,EAAA,CAAA,GACL,kBAAC,SAAD;QAAO,WAAU;kBAAjB,CACE,kBAAC,SAAD;SACE,MAAK;SACL,SAAS;SACT,WAAW,MAAM,EAAa,EAAE,OAAO,OAAO;SAC9C,WAAU;QACX,CAAA,GACD,kBAAC,QAAD;SAAM,WAAU;mBACb,EAAG,wCAAwC,aAAa;QACrD,CAAA,CACD;SACJ;QACF;;IACM,CAAA;IAGb,kBAAC,GAAD;KACE,MAAM,kBAAC,GAAD,EAAY,WAAU,UAAW,CAAA;KACvC,OAAO,EAAG,iCAAiC,OAAO;KAClD,aAAa,EACX,uCACA,qDACF;eAEA,kBAAC,YAAD;MACE,GAAI,EAAgB,WAAW;MAC/B,IAAG;MACH,cAAY,EAAG,iCAAiC,OAAO;MACvD,OAAO;MACP,WAAW,MAAM,EAAS,EAAE,OAAO,KAAK;MACxC,MAAM;MACN,aAAa,EACX,uCACA,qDACF;MACA,WAAW;KACZ,CAAA;IACU,CAAA;IAEb,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,UAAD;MACE,MAAK;MACL,UAAU,EAAO;MACjB,WAAU;gBAET,EAAO,YACJ,EAAG,8BAA8B,WAAW,IAC5C,EAAG,4BAA4B,qBAAqB;KAClD,CAAA,GACR,kBAAC,UAAD;MACE,MAAK;MACL,eAAe,EAAW,gBAAgB;MAC1C,WAAU;gBAET,EAAG,4BAA4B,QAAQ;KAClC,CAAA,CACL;;GACD;IACI;;AAEhB"}
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Relationships list
|
|
3
|
-
* @module subscriberbot/pages/relationships
|
|
4
|
-
*
|
|
5
|
-
* The core CRUDL list — every recurring relationship (subscription /
|
|
6
|
-
* membership / license / contract) in one paginated, filterable view.
|
|
7
|
-
* Data comes from `subListRelationships` (a SubRelationshipConnection).
|
|
8
|
-
*/
|
|
9
1
|
export declare function RelationshipsListPage(): import("react").JSX.Element;
|
|
10
2
|
//# sourceMappingURL=RelationshipsListPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipsListPage.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/pages/relationships/RelationshipsListPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RelationshipsListPage.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/pages/relationships/RelationshipsListPage.tsx"],"names":[],"mappings":"AAoFA,wBAAgB,qBAAqB,gCAkSpC"}
|