@burdenoff/microfe-subscriberbot 2026.1107.2 → 2026.1107.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/stories/pages/BankConnectionsPage.stories.d.ts +1 -0
- package/dist/stories/pages/BankConnectionsPage.stories.d.ts.map +1 -1
- package/dist/stories/support/bankingFixtures.d.ts +3 -0
- package/dist/stories/support/bankingFixtures.d.ts.map +1 -1
- package/dist/subscriberbot/components/StatusBadge.d.ts.map +1 -1
- package/dist/subscriberbot/components/StatusBadge.js +1 -0
- package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
- package/dist/subscriberbot/hooks/useBankingApi.d.ts +1 -0
- package/dist/subscriberbot/hooks/useBankingApi.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useBankingApi.js +1 -1
- package/dist/subscriberbot/hooks/useBankingApi.js.map +1 -1
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +294 -248
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
- package/dist/subscriberbot/types/banking.d.ts +1 -1
- package/dist/subscriberbot/types/banking.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,26 +2,26 @@ import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
|
|
|
2
2
|
import { useTr as t } from "../../hooks/useTr.js";
|
|
3
3
|
import { useFormatters as n } from "../../hooks/useFormatters.js";
|
|
4
4
|
import { cn as r } from "../../utils/cn.js";
|
|
5
|
-
import { PageLayout as
|
|
6
|
-
import { MetricsCard as
|
|
7
|
-
import { StatusBadge as
|
|
8
|
-
import { EmptyState as
|
|
9
|
-
import { Modal as
|
|
10
|
-
import { ErrorView as
|
|
5
|
+
import { PageLayout as i } from "../../components/PageLayout.js";
|
|
6
|
+
import { MetricsCard as a } from "../../components/MetricsCard.js";
|
|
7
|
+
import { StatusBadge as o } from "../../components/StatusBadge.js";
|
|
8
|
+
import { EmptyState as s } from "../../components/EmptyState.js";
|
|
9
|
+
import { Modal as c } from "../../components/Modal.js";
|
|
10
|
+
import { ErrorView as l, LoadingView as u, Section as d } from "../../components/StateViews.js";
|
|
11
11
|
import "../../components/index.js";
|
|
12
|
-
import { useFormError as
|
|
13
|
-
import { useBankAggregators as
|
|
14
|
-
import { openPlaidLink as
|
|
15
|
-
import { useMemo as
|
|
16
|
-
import { CalendarClock as
|
|
17
|
-
import { Fragment as
|
|
18
|
-
import { PagePurpose as
|
|
12
|
+
import { useFormError as f } from "../../hooks/useFormError.js";
|
|
13
|
+
import { useBankAggregators as p, useBankConnections as ee, useCompleteBankLink as m, useCreateBankLinkSession as h, useDismissRecurringCharge as g, useImportBankStatement as _, useRecurringCharges as v, useRemoveBankConnection as y, useRestoreRecurringCharge as b, useSyncBankConnection as x, useTrackRecurringCharge as S } from "../../hooks/useBankingApi.js";
|
|
14
|
+
import { openPlaidLink as C } from "../../utils/plaidLink.js";
|
|
15
|
+
import { useMemo as w, useState as T } from "react";
|
|
16
|
+
import { CalendarClock as E, FileUp as D, Landmark as O, Link2 as k, RefreshCw as A, Repeat as j, ShieldCheck as te, Trash2 as ne } from "lucide-react";
|
|
17
|
+
import { Fragment as re, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
18
|
+
import { PagePurpose as ie } from "@burdenoff/fe-libs/ui";
|
|
19
19
|
//#region src/subscriberbot/pages/banking/BankConnectionsPage.tsx
|
|
20
|
-
var
|
|
20
|
+
var P = "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)]", F = "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", I = "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", L = "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", ae = [
|
|
21
21
|
"DETECTED",
|
|
22
22
|
"TRACKED",
|
|
23
23
|
"DISMISSED"
|
|
24
|
-
],
|
|
24
|
+
], oe = {
|
|
25
25
|
DETECTED: {
|
|
26
26
|
key: "banking.charges.detected",
|
|
27
27
|
fallback: "To review"
|
|
@@ -34,20 +34,20 @@ var M = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
|
|
|
34
34
|
key: "banking.charges.dismissed",
|
|
35
35
|
fallback: "Dismissed"
|
|
36
36
|
}
|
|
37
|
-
},
|
|
37
|
+
}, se = 2e6, R = (e, t) => e instanceof Error ? e.message : t("common.somethingWentWrong", "Something went wrong");
|
|
38
38
|
function z() {
|
|
39
|
-
let { formatCurrency:
|
|
39
|
+
let { formatCurrency: c, formatDate: f, formatIntervalSuffix: _ } = n(), P = t(), { navigateTo: se } = e(), [z, B] = T("DETECTED"), [le, V] = T(!1), [H, U] = T(null), [W, G] = T(!1), ue = p(), K = ee(), q = v(z), J = v("DETECTED"), de = v("TRACKED"), fe = h(), pe = m(), Y = x(), me = y(), he = S(), ge = g(), _e = b(), X = ue.data?.find((e) => e.aggregator === "PLAID"), Z = K.data?.items ?? [], ve = q.data?.items ?? [], ye = w(() => {
|
|
40
40
|
let e = /* @__PURE__ */ new Map();
|
|
41
41
|
for (let t of J.data?.items ?? []) e.set(t.currency, (e.get(t.currency) ?? 0) + t.annualCost);
|
|
42
|
-
return [...e.entries()].map(([e, t]) =>
|
|
43
|
-
}, [J.data,
|
|
42
|
+
return [...e.entries()].map(([e, t]) => c(t, e)).join(" + ");
|
|
43
|
+
}, [J.data, c]), Q = (e) => P("banking.notice.synced", "{{added}} new transaction(s) from {{institution}}; {{recurring}} recurring charge(s) found.", {
|
|
44
44
|
added: e.added,
|
|
45
45
|
institution: e.connection.institutionName,
|
|
46
46
|
recurring: e.recurringDetected
|
|
47
47
|
}), be = async () => {
|
|
48
48
|
U(null), G(!0);
|
|
49
49
|
try {
|
|
50
|
-
let e = await
|
|
50
|
+
let e = await C((await fe.mutateAsync({ aggregator: "PLAID" })).linkToken, P);
|
|
51
51
|
if (!e) return;
|
|
52
52
|
U({
|
|
53
53
|
tone: "success",
|
|
@@ -61,36 +61,55 @@ function z() {
|
|
|
61
61
|
} catch (e) {
|
|
62
62
|
U({
|
|
63
63
|
tone: "error",
|
|
64
|
-
text: R(e,
|
|
64
|
+
text: R(e, P)
|
|
65
65
|
});
|
|
66
66
|
} finally {
|
|
67
67
|
G(!1);
|
|
68
68
|
}
|
|
69
69
|
}, xe = async (e) => {
|
|
70
|
-
U(null);
|
|
70
|
+
U(null), G(!0);
|
|
71
71
|
try {
|
|
72
|
+
if (!await C((await fe.mutateAsync({
|
|
73
|
+
aggregator: "PLAID",
|
|
74
|
+
connectionId: e.id
|
|
75
|
+
})).linkToken, P)) return;
|
|
72
76
|
U({
|
|
73
77
|
tone: "success",
|
|
74
|
-
text: Q(await
|
|
78
|
+
text: Q(await Y.mutateAsync({ id: e.id }))
|
|
75
79
|
});
|
|
76
80
|
} catch (e) {
|
|
77
81
|
U({
|
|
78
82
|
tone: "error",
|
|
79
|
-
text: R(e,
|
|
83
|
+
text: R(e, P)
|
|
80
84
|
});
|
|
85
|
+
} finally {
|
|
86
|
+
G(!1);
|
|
81
87
|
}
|
|
82
88
|
}, Se = async (e) => {
|
|
83
|
-
|
|
89
|
+
U(null);
|
|
90
|
+
try {
|
|
91
|
+
U({
|
|
92
|
+
tone: "success",
|
|
93
|
+
text: Q(await Y.mutateAsync({ id: e.id }))
|
|
94
|
+
});
|
|
95
|
+
} catch (e) {
|
|
96
|
+
U({
|
|
97
|
+
tone: "error",
|
|
98
|
+
text: R(e, P)
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}, Ce = async (e) => {
|
|
102
|
+
if (window.confirm(P("banking.disconnect.confirm", "Disconnect {{institution}}? Its accounts and transactions are deleted from Subscriber Bot. Subscriptions you already track stay.", { institution: e.institutionName }))) {
|
|
84
103
|
U(null);
|
|
85
104
|
try {
|
|
86
|
-
await
|
|
105
|
+
await me.mutateAsync({ id: e.id }), U({
|
|
87
106
|
tone: "success",
|
|
88
|
-
text:
|
|
107
|
+
text: P("banking.notice.disconnected", "{{institution}} was disconnected.", { institution: e.institutionName })
|
|
89
108
|
});
|
|
90
109
|
} catch (e) {
|
|
91
110
|
U({
|
|
92
111
|
tone: "error",
|
|
93
|
-
text: R(e,
|
|
112
|
+
text: R(e, P)
|
|
94
113
|
});
|
|
95
114
|
}
|
|
96
115
|
}
|
|
@@ -98,183 +117,183 @@ function z() {
|
|
|
98
117
|
U(null);
|
|
99
118
|
try {
|
|
100
119
|
let n = await {
|
|
101
|
-
track:
|
|
102
|
-
dismiss:
|
|
120
|
+
track: he,
|
|
121
|
+
dismiss: ge,
|
|
103
122
|
restore: _e
|
|
104
123
|
}[e].mutateAsync({ id: t.id });
|
|
105
124
|
e === "track" && U({
|
|
106
125
|
tone: "success",
|
|
107
|
-
text:
|
|
126
|
+
text: P("banking.notice.tracked", "{{name}} is now tracked as a subscription.", { name: n.displayName })
|
|
108
127
|
});
|
|
109
128
|
} catch (e) {
|
|
110
129
|
U({
|
|
111
130
|
tone: "error",
|
|
112
|
-
text: R(e,
|
|
131
|
+
text: R(e, P)
|
|
113
132
|
});
|
|
114
133
|
}
|
|
115
|
-
},
|
|
134
|
+
}, we = /* @__PURE__ */ N("div", {
|
|
116
135
|
className: "flex flex-wrap gap-2",
|
|
117
136
|
"data-tour": "subscriberbot-banking-connect",
|
|
118
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ N("button", {
|
|
119
138
|
type: "button",
|
|
120
|
-
className:
|
|
139
|
+
className: I,
|
|
121
140
|
onClick: () => V(!0),
|
|
122
141
|
children: [
|
|
123
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ M(D, {
|
|
124
143
|
className: "h-4 w-4",
|
|
125
144
|
"aria-hidden": !0
|
|
126
145
|
}),
|
|
127
146
|
" ",
|
|
128
|
-
|
|
147
|
+
P("banking.import.open", "Import a statement")
|
|
129
148
|
]
|
|
130
|
-
}), /* @__PURE__ */
|
|
149
|
+
}), /* @__PURE__ */ N("button", {
|
|
131
150
|
type: "button",
|
|
132
|
-
className:
|
|
151
|
+
className: F,
|
|
133
152
|
onClick: () => void be(),
|
|
134
153
|
disabled: !X?.available || W,
|
|
135
|
-
title: X?.available ? void 0 :
|
|
136
|
-
children: [/* @__PURE__ */
|
|
154
|
+
title: X?.available ? void 0 : P("banking.plaid.unavailable", "Bank linking is not switched on yet. Import a statement instead."),
|
|
155
|
+
children: [/* @__PURE__ */ M(k, {
|
|
137
156
|
className: "h-4 w-4",
|
|
138
157
|
"aria-hidden": !0
|
|
139
|
-
}), W ?
|
|
158
|
+
}), W ? P("banking.plaid.linking", "Connecting…") : P("banking.plaid.connect", "Connect a bank")]
|
|
140
159
|
})]
|
|
141
160
|
});
|
|
142
|
-
return /* @__PURE__ */
|
|
161
|
+
return /* @__PURE__ */ N(i, {
|
|
143
162
|
dataTour: "subscriberbot-banking",
|
|
144
|
-
title:
|
|
145
|
-
description:
|
|
146
|
-
actions:
|
|
163
|
+
title: P("banking.title", "Bank & card connections"),
|
|
164
|
+
description: P("banking.description", "Find every subscription in your bank and card transactions."),
|
|
165
|
+
actions: we,
|
|
147
166
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ M(ie, {
|
|
149
168
|
className: "mb-6",
|
|
150
|
-
children:
|
|
169
|
+
children: P("banking.purpose", "Connect a US bank or card through Plaid, 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.")
|
|
151
170
|
}),
|
|
152
|
-
X && !X.available && /* @__PURE__ */
|
|
171
|
+
X && !X.available && /* @__PURE__ */ N("p", {
|
|
153
172
|
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",
|
|
154
173
|
"data-testid": "plaid-unavailable",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ M(te, {
|
|
156
175
|
className: "mt-0.5 h-4 w-4 shrink-0",
|
|
157
176
|
"aria-hidden": !0
|
|
158
|
-
}),
|
|
177
|
+
}), P("banking.plaid.unavailableLong", "Direct bank linking is being switched on. Until then, import a statement export: it finds the same recurring charges.")]
|
|
159
178
|
}),
|
|
160
|
-
H && /* @__PURE__ */
|
|
179
|
+
H && /* @__PURE__ */ M("p", {
|
|
161
180
|
role: H.tone === "error" ? "alert" : "status",
|
|
162
181
|
className: r("mb-4 rounded-lg px-3 py-2 text-sm", H.tone === "error" ? "bg-status-error-bg-subtle text-status-error-text" : "bg-status-success-bg-subtle text-status-success-text"),
|
|
163
182
|
"data-testid": "banking-notice",
|
|
164
183
|
children: H.text
|
|
165
184
|
}),
|
|
166
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ N("div", {
|
|
167
186
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
168
187
|
"data-tour": "subscriberbot-banking-metrics",
|
|
169
188
|
children: [
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
icon: /* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ M(a, {
|
|
190
|
+
icon: /* @__PURE__ */ M(O, { className: "h-5 w-5" }),
|
|
172
191
|
value: K.isLoading ? "—" : Z.length,
|
|
173
|
-
label:
|
|
192
|
+
label: P("banking.metrics.connections", "Connected accounts")
|
|
174
193
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
icon: /* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ M(a, {
|
|
195
|
+
icon: /* @__PURE__ */ M(j, { className: "h-5 w-5" }),
|
|
177
196
|
value: J.isLoading ? "—" : J.data?.items.length ?? 0,
|
|
178
|
-
label:
|
|
197
|
+
label: P("banking.metrics.detected", "Charges to review")
|
|
179
198
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
icon: /* @__PURE__ */
|
|
182
|
-
value: J.isLoading ? "—" : ye ||
|
|
183
|
-
label:
|
|
199
|
+
/* @__PURE__ */ M(a, {
|
|
200
|
+
icon: /* @__PURE__ */ M(E, { className: "h-5 w-5" }),
|
|
201
|
+
value: J.isLoading ? "—" : ye || c(0, "USD"),
|
|
202
|
+
label: P("banking.metrics.yearly", "Yearly cost to review")
|
|
184
203
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
icon: /* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ M(a, {
|
|
205
|
+
icon: /* @__PURE__ */ M(te, { className: "h-5 w-5" }),
|
|
187
206
|
value: de.isLoading ? "—" : de.data?.items.length ?? 0,
|
|
188
|
-
label:
|
|
207
|
+
label: P("banking.metrics.tracked", "Tracked from your bank")
|
|
189
208
|
})
|
|
190
209
|
]
|
|
191
210
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ N(d, {
|
|
193
212
|
dataTour: "subscriberbot-banking-charges",
|
|
194
|
-
title:
|
|
195
|
-
description:
|
|
196
|
-
children: [/* @__PURE__ */
|
|
213
|
+
title: P("banking.charges.title", "Recurring charges found"),
|
|
214
|
+
description: P("banking.charges.description", "Charges from the same merchant at a steady amount and rhythm."),
|
|
215
|
+
children: [/* @__PURE__ */ M("div", {
|
|
197
216
|
role: "tablist",
|
|
198
|
-
"aria-label":
|
|
217
|
+
"aria-label": P("banking.charges.filter", "Charge status"),
|
|
199
218
|
className: "mb-3 flex gap-1.5",
|
|
200
|
-
children:
|
|
219
|
+
children: ae.map((e) => /* @__PURE__ */ M("button", {
|
|
201
220
|
type: "button",
|
|
202
221
|
role: "tab",
|
|
203
222
|
"aria-selected": z === e,
|
|
204
223
|
onClick: () => B(e),
|
|
205
224
|
className: r("rounded-lg px-3 py-1.5 text-xs font-medium", z === e ? "bg-action-primary-bg text-action-primary-text" : "border border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
206
|
-
children:
|
|
225
|
+
children: P(oe[e].key, oe[e].fallback)
|
|
207
226
|
}, e))
|
|
208
|
-
}), q.isLoading ? /* @__PURE__ */
|
|
209
|
-
message: R(q.error,
|
|
227
|
+
}), q.isLoading ? /* @__PURE__ */ M(u, { label: P("banking.charges.loading", "Loading recurring charges…") }) : q.isError ? /* @__PURE__ */ M(l, {
|
|
228
|
+
message: R(q.error, P),
|
|
210
229
|
onRetry: () => void q.refetch()
|
|
211
|
-
}) : ve.length === 0 ? /* @__PURE__ */
|
|
230
|
+
}) : ve.length === 0 ? /* @__PURE__ */ M(s, {
|
|
212
231
|
illustration: "empty-data",
|
|
213
|
-
title:
|
|
214
|
-
description:
|
|
215
|
-
}) : /* @__PURE__ */
|
|
232
|
+
title: P("banking.charges.empty.title", "Nothing here yet"),
|
|
233
|
+
description: P("banking.charges.empty.description", "Import a statement with at least two months of transactions, or connect a bank, and repeating charges show up here.")
|
|
234
|
+
}) : /* @__PURE__ */ M("ul", {
|
|
216
235
|
className: "grid grid-cols-1 gap-3 lg:grid-cols-2",
|
|
217
236
|
"data-testid": "recurring-charge-list",
|
|
218
|
-
children: ve.map((e) => /* @__PURE__ */
|
|
237
|
+
children: ve.map((e) => /* @__PURE__ */ N("li", {
|
|
219
238
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-4",
|
|
220
239
|
"data-testid": "recurring-charge",
|
|
221
240
|
children: [
|
|
222
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ N("div", {
|
|
223
242
|
className: "flex items-start justify-between gap-3",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ N("div", {
|
|
225
244
|
className: "min-w-0",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
245
|
+
children: [/* @__PURE__ */ M("p", {
|
|
227
246
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
228
247
|
children: e.displayName
|
|
229
|
-
}), /* @__PURE__ */
|
|
248
|
+
}), /* @__PURE__ */ M("p", {
|
|
230
249
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
231
|
-
children:
|
|
250
|
+
children: P("banking.charges.meta", "{{count}} charges since {{first}} · {{confidence}}% sure", {
|
|
232
251
|
count: e.occurrences,
|
|
233
|
-
first:
|
|
252
|
+
first: f(e.firstChargedOn),
|
|
234
253
|
confidence: e.confidence
|
|
235
254
|
})
|
|
236
255
|
})]
|
|
237
|
-
}), /* @__PURE__ */
|
|
256
|
+
}), /* @__PURE__ */ N("span", {
|
|
238
257
|
className: "shrink-0 text-sm font-semibold text-text-primary",
|
|
239
|
-
children: [
|
|
258
|
+
children: [c(e.lastAmount, e.currency), _(e.interval)]
|
|
240
259
|
})]
|
|
241
260
|
}),
|
|
242
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ N("p", {
|
|
243
262
|
className: "mt-2 text-xs text-text-secondary",
|
|
244
263
|
children: [
|
|
245
|
-
|
|
246
|
-
e.nextExpectedOn && ` · ${
|
|
247
|
-
` · ${
|
|
264
|
+
P("banking.charges.dates", "Last charged {{last}}", { last: f(e.lastChargedOn) }),
|
|
265
|
+
e.nextExpectedOn && ` · ${P("banking.charges.next", "next expected {{next}}", { next: f(e.nextExpectedOn) })}`,
|
|
266
|
+
` · ${P("banking.charges.yearly", "{{amount}} a year", { amount: c(e.annualCost, e.currency) })}`
|
|
248
267
|
]
|
|
249
268
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ N("div", {
|
|
251
270
|
className: "mt-3 flex flex-wrap gap-2",
|
|
252
271
|
children: [
|
|
253
|
-
e.status === "DETECTED" && /* @__PURE__ */
|
|
272
|
+
e.status === "DETECTED" && /* @__PURE__ */ N(re, { children: [/* @__PURE__ */ M("button", {
|
|
254
273
|
type: "button",
|
|
255
|
-
className:
|
|
274
|
+
className: F,
|
|
256
275
|
onClick: () => void $("track", e),
|
|
257
|
-
disabled:
|
|
258
|
-
children:
|
|
259
|
-
}), /* @__PURE__ */
|
|
276
|
+
disabled: he.isPending,
|
|
277
|
+
children: P("banking.charges.track", "Track as subscription")
|
|
278
|
+
}), /* @__PURE__ */ M("button", {
|
|
260
279
|
type: "button",
|
|
261
|
-
className:
|
|
280
|
+
className: I,
|
|
262
281
|
onClick: () => void $("dismiss", e),
|
|
263
|
-
disabled:
|
|
264
|
-
children:
|
|
282
|
+
disabled: ge.isPending,
|
|
283
|
+
children: P("banking.charges.dismiss", "Not a subscription")
|
|
265
284
|
})] }),
|
|
266
|
-
e.status === "TRACKED" && e.relationshipId && /* @__PURE__ */
|
|
285
|
+
e.status === "TRACKED" && e.relationshipId && /* @__PURE__ */ M("button", {
|
|
267
286
|
type: "button",
|
|
268
|
-
className:
|
|
269
|
-
onClick: () =>
|
|
270
|
-
children:
|
|
287
|
+
className: I,
|
|
288
|
+
onClick: () => se(`/relationships/${e.relationshipId}`),
|
|
289
|
+
children: P("banking.charges.view", "View subscription")
|
|
271
290
|
}),
|
|
272
|
-
e.status === "DISMISSED" && /* @__PURE__ */
|
|
291
|
+
e.status === "DISMISSED" && /* @__PURE__ */ M("button", {
|
|
273
292
|
type: "button",
|
|
274
|
-
className:
|
|
293
|
+
className: I,
|
|
275
294
|
onClick: () => void $("restore", e),
|
|
276
295
|
disabled: _e.isPending,
|
|
277
|
-
children:
|
|
296
|
+
children: P("banking.charges.restore", "Review again")
|
|
278
297
|
})
|
|
279
298
|
]
|
|
280
299
|
})
|
|
@@ -282,96 +301,123 @@ function z() {
|
|
|
282
301
|
}, e.id))
|
|
283
302
|
})]
|
|
284
303
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ M(d, {
|
|
286
305
|
dataTour: "subscriberbot-banking-connections",
|
|
287
|
-
title:
|
|
288
|
-
description:
|
|
289
|
-
children: K.isLoading ? /* @__PURE__ */
|
|
290
|
-
message: R(K.error,
|
|
306
|
+
title: P("banking.connections.title", "Your connections"),
|
|
307
|
+
description: P("banking.connections.description", "Disconnecting deletes the accounts and transactions from Subscriber Bot."),
|
|
308
|
+
children: K.isLoading ? /* @__PURE__ */ M(u, { label: P("banking.connections.loading", "Loading connections…") }) : K.isError ? /* @__PURE__ */ M(l, {
|
|
309
|
+
message: R(K.error, P),
|
|
291
310
|
onRetry: () => void K.refetch()
|
|
292
|
-
}) : Z.length === 0 ? /* @__PURE__ */
|
|
311
|
+
}) : Z.length === 0 ? /* @__PURE__ */ M(s, {
|
|
293
312
|
illustration: "empty-data",
|
|
294
|
-
title:
|
|
295
|
-
description:
|
|
296
|
-
action: /* @__PURE__ */
|
|
313
|
+
title: P("banking.connections.empty.title", "No bank or card connected"),
|
|
314
|
+
description: P("banking.connections.empty.description", "Download a CSV of your transactions from your bank or card website and import it, or connect a bank."),
|
|
315
|
+
action: /* @__PURE__ */ N("button", {
|
|
297
316
|
type: "button",
|
|
298
|
-
className:
|
|
317
|
+
className: F,
|
|
299
318
|
onClick: () => V(!0),
|
|
300
319
|
children: [
|
|
301
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ M(D, {
|
|
302
321
|
className: "h-4 w-4",
|
|
303
322
|
"aria-hidden": !0
|
|
304
323
|
}),
|
|
305
324
|
" ",
|
|
306
|
-
|
|
325
|
+
P("banking.import.open", "Import a statement")
|
|
307
326
|
]
|
|
308
327
|
})
|
|
309
|
-
}) : /* @__PURE__ */
|
|
328
|
+
}) : /* @__PURE__ */ M("ul", {
|
|
310
329
|
className: "space-y-3",
|
|
311
330
|
"data-testid": "bank-connection-list",
|
|
312
|
-
children: Z.map((e) => /* @__PURE__ */
|
|
331
|
+
children: Z.map((e) => /* @__PURE__ */ N("li", {
|
|
313
332
|
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",
|
|
314
333
|
"data-testid": "bank-connection",
|
|
315
|
-
children: [/* @__PURE__ */
|
|
334
|
+
children: [/* @__PURE__ */ N("div", {
|
|
316
335
|
className: "min-w-0",
|
|
317
336
|
children: [
|
|
318
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ N("div", {
|
|
319
338
|
className: "flex items-center gap-2",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ M("p", {
|
|
321
340
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
322
341
|
children: e.institutionName
|
|
323
|
-
}), /* @__PURE__ */
|
|
342
|
+
}), /* @__PURE__ */ M(o, { status: e.status })]
|
|
324
343
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ N("p", {
|
|
326
345
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
327
346
|
children: [
|
|
328
|
-
e.aggregator === "PLAID" ?
|
|
347
|
+
e.aggregator === "PLAID" ? P("banking.connections.viaPlaid", "Linked with Plaid") : P("banking.connections.viaImport", "Statement import"),
|
|
329
348
|
" · ",
|
|
330
|
-
e.accounts.map((e) => e.mask ? `${e.name} ••${e.mask}` : e.name).join(", ") ||
|
|
349
|
+
e.accounts.map((e) => e.mask ? `${e.name} ••${e.mask}` : e.name).join(", ") || P("banking.connections.noAccounts", "no accounts yet"),
|
|
331
350
|
" · ",
|
|
332
|
-
|
|
333
|
-
e.lastSyncedAt && ` · ${
|
|
351
|
+
P("banking.connections.count", "{{count}} transactions", { count: e.transactionCount }),
|
|
352
|
+
e.lastSyncedAt && ` · ${P("banking.connections.synced", "updated {{date}}", { date: f(e.lastSyncedAt) })}`
|
|
334
353
|
]
|
|
335
354
|
}),
|
|
336
|
-
e.lastSyncError && /* @__PURE__ */
|
|
355
|
+
e.lastSyncError && /* @__PURE__ */ M("p", {
|
|
337
356
|
className: "mt-1 text-xs text-status-error-text",
|
|
338
357
|
children: e.lastSyncError
|
|
358
|
+
}),
|
|
359
|
+
e.status === "NEEDS_REAUTH" && /* @__PURE__ */ M("p", {
|
|
360
|
+
className: "mt-1 text-xs text-status-warning-text",
|
|
361
|
+
"data-testid": "bank-connection-hint",
|
|
362
|
+
children: P("banking.connections.needsReauth", "The bank needs you to sign in again. Reconnect to keep syncing; your history is kept.")
|
|
363
|
+
}),
|
|
364
|
+
e.status === "REVOKED" && /* @__PURE__ */ M("p", {
|
|
365
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
366
|
+
"data-testid": "bank-connection-hint",
|
|
367
|
+
children: P("banking.connections.revoked", "Access was revoked at the bank. Disconnect this connection and link the bank again to keep tracking it.")
|
|
339
368
|
})
|
|
340
369
|
]
|
|
341
|
-
}), /* @__PURE__ */
|
|
370
|
+
}), /* @__PURE__ */ N("div", {
|
|
342
371
|
className: "flex shrink-0 gap-2",
|
|
343
|
-
children: [
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
372
|
+
children: [
|
|
373
|
+
e.aggregator === "PLAID" && e.status === "NEEDS_REAUTH" && /* @__PURE__ */ N("button", {
|
|
374
|
+
type: "button",
|
|
375
|
+
className: L,
|
|
376
|
+
onClick: () => void xe(e),
|
|
377
|
+
disabled: W || !X?.available,
|
|
378
|
+
children: [
|
|
379
|
+
/* @__PURE__ */ M(k, {
|
|
380
|
+
className: "h-3.5 w-3.5",
|
|
381
|
+
"aria-hidden": !0
|
|
382
|
+
}),
|
|
383
|
+
" ",
|
|
384
|
+
P("banking.connections.reconnect", "Reconnect")
|
|
385
|
+
]
|
|
386
|
+
}),
|
|
387
|
+
e.aggregator === "PLAID" && e.status !== "REVOKED" && e.status !== "NEEDS_REAUTH" && /* @__PURE__ */ N("button", {
|
|
388
|
+
type: "button",
|
|
389
|
+
className: L,
|
|
390
|
+
onClick: () => void Se(e),
|
|
391
|
+
disabled: Y.isPending || !X?.available,
|
|
392
|
+
children: [
|
|
393
|
+
/* @__PURE__ */ M(A, {
|
|
394
|
+
className: "h-3.5 w-3.5",
|
|
395
|
+
"aria-hidden": !0
|
|
396
|
+
}),
|
|
397
|
+
" ",
|
|
398
|
+
P("banking.connections.sync", "Sync")
|
|
399
|
+
]
|
|
400
|
+
}),
|
|
401
|
+
/* @__PURE__ */ N("button", {
|
|
402
|
+
type: "button",
|
|
403
|
+
className: L,
|
|
404
|
+
onClick: () => void Ce(e),
|
|
405
|
+
disabled: me.isPending,
|
|
406
|
+
children: [
|
|
407
|
+
/* @__PURE__ */ M(ne, {
|
|
408
|
+
className: "h-3.5 w-3.5",
|
|
409
|
+
"aria-hidden": !0
|
|
410
|
+
}),
|
|
411
|
+
" ",
|
|
412
|
+
P("banking.connections.disconnect", "Disconnect")
|
|
413
|
+
]
|
|
414
|
+
})
|
|
415
|
+
]
|
|
370
416
|
})]
|
|
371
417
|
}, e.id))
|
|
372
418
|
})
|
|
373
419
|
}),
|
|
374
|
-
le && /* @__PURE__ */
|
|
420
|
+
le && /* @__PURE__ */ M(ce, {
|
|
375
421
|
connections: Z.filter((e) => e.aggregator === "STATEMENT_IMPORT"),
|
|
376
422
|
onClose: () => V(!1),
|
|
377
423
|
onImported: (e) => {
|
|
@@ -384,85 +430,85 @@ function z() {
|
|
|
384
430
|
]
|
|
385
431
|
});
|
|
386
432
|
}
|
|
387
|
-
function ce({ connections: e, onClose: n, onImported:
|
|
388
|
-
let
|
|
389
|
-
if (
|
|
390
|
-
if (e.size >
|
|
391
|
-
|
|
433
|
+
function ce({ connections: e, onClose: n, onImported: i }) {
|
|
434
|
+
let a = t(), o = _(), [s, l] = T(""), [u, d] = T(""), [p, ee] = T(""), [m, h] = T(""), [g, v] = T("USD"), [y, b] = T("OUTFLOW_NEGATIVE"), [x, S] = T("MDY"), [C, w] = T(""), [E, D, O, k] = f(), A = async (e) => {
|
|
435
|
+
if (D(null), w(""), e) {
|
|
436
|
+
if (e.size > se) {
|
|
437
|
+
D(a("banking.import.tooLarge", "That file is larger than 2 MB. Export a shorter date range."), "statement-file");
|
|
392
438
|
return;
|
|
393
439
|
}
|
|
394
|
-
|
|
440
|
+
w(await e.text());
|
|
395
441
|
}
|
|
396
|
-
},
|
|
397
|
-
if (e.preventDefault(),
|
|
398
|
-
|
|
442
|
+
}, j = async (e) => {
|
|
443
|
+
if (e.preventDefault(), D(null), !C.trim()) {
|
|
444
|
+
D(a("banking.import.required", "Choose a CSV file or paste the statement."), ["statement-csv", "statement-file"]);
|
|
399
445
|
return;
|
|
400
446
|
}
|
|
401
447
|
try {
|
|
402
|
-
|
|
403
|
-
connectionId:
|
|
404
|
-
institutionName:
|
|
405
|
-
accountName:
|
|
448
|
+
i(await o.mutateAsync({ input: {
|
|
449
|
+
connectionId: s || null,
|
|
450
|
+
institutionName: s ? null : u || null,
|
|
451
|
+
accountName: p || null,
|
|
406
452
|
accountMask: m || null,
|
|
407
453
|
currency: g || "USD",
|
|
408
|
-
csv:
|
|
454
|
+
csv: C,
|
|
409
455
|
amountConvention: y,
|
|
410
|
-
dateFormat:
|
|
456
|
+
dateFormat: x
|
|
411
457
|
} }));
|
|
412
458
|
} catch (e) {
|
|
413
|
-
|
|
459
|
+
D(R(e, a));
|
|
414
460
|
}
|
|
415
461
|
};
|
|
416
|
-
return /* @__PURE__ */
|
|
417
|
-
title:
|
|
418
|
-
description:
|
|
462
|
+
return /* @__PURE__ */ M(c, {
|
|
463
|
+
title: a("banking.import.title", "Import a bank or card statement"),
|
|
464
|
+
description: a("banking.import.description", "Download your transactions as CSV from your bank or card website (two months or more works best)."),
|
|
419
465
|
onClose: n,
|
|
420
466
|
maxWidthClassName: "max-w-xl",
|
|
421
|
-
children: /* @__PURE__ */
|
|
422
|
-
onSubmit: (e) => void
|
|
467
|
+
children: /* @__PURE__ */ N("form", {
|
|
468
|
+
onSubmit: (e) => void j(e),
|
|
423
469
|
className: "space-y-3",
|
|
424
470
|
"data-testid": "import-statement-form",
|
|
425
471
|
children: [
|
|
426
|
-
e.length > 0 && /* @__PURE__ */
|
|
472
|
+
e.length > 0 && /* @__PURE__ */ N("label", {
|
|
427
473
|
className: "block text-sm text-text-primary",
|
|
428
|
-
children: [
|
|
429
|
-
className: r(
|
|
430
|
-
value:
|
|
431
|
-
onChange: (e) =>
|
|
432
|
-
children: [/* @__PURE__ */
|
|
474
|
+
children: [a("banking.import.target", "Add to"), /* @__PURE__ */ N("select", {
|
|
475
|
+
className: r(P, "mt-1"),
|
|
476
|
+
value: s,
|
|
477
|
+
onChange: (e) => l(e.target.value),
|
|
478
|
+
children: [/* @__PURE__ */ M("option", {
|
|
433
479
|
value: "",
|
|
434
|
-
children:
|
|
435
|
-
}), e.map((e) => /* @__PURE__ */
|
|
480
|
+
children: a("banking.import.newConnection", "A new connection")
|
|
481
|
+
}), e.map((e) => /* @__PURE__ */ M("option", {
|
|
436
482
|
value: e.id,
|
|
437
483
|
children: e.institutionName
|
|
438
484
|
}, e.id))]
|
|
439
485
|
})]
|
|
440
486
|
}),
|
|
441
|
-
!
|
|
487
|
+
!s && /* @__PURE__ */ N("label", {
|
|
442
488
|
className: "block text-sm text-text-primary",
|
|
443
|
-
children: [
|
|
444
|
-
className: r(
|
|
445
|
-
value:
|
|
446
|
-
onChange: (e) =>
|
|
447
|
-
placeholder:
|
|
489
|
+
children: [a("banking.import.institution", "Bank or card issuer"), /* @__PURE__ */ M("input", {
|
|
490
|
+
className: r(P, "mt-1"),
|
|
491
|
+
value: u,
|
|
492
|
+
onChange: (e) => d(e.target.value),
|
|
493
|
+
placeholder: a("banking.import.institutionPlaceholder", "e.g. Chase"),
|
|
448
494
|
maxLength: 255
|
|
449
495
|
})]
|
|
450
496
|
}),
|
|
451
|
-
/* @__PURE__ */
|
|
497
|
+
/* @__PURE__ */ N("div", {
|
|
452
498
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-3",
|
|
453
|
-
children: [/* @__PURE__ */
|
|
499
|
+
children: [/* @__PURE__ */ N("label", {
|
|
454
500
|
className: "block text-sm text-text-primary sm:col-span-2",
|
|
455
|
-
children: [
|
|
456
|
-
className: r(
|
|
457
|
-
value:
|
|
458
|
-
onChange: (e) =>
|
|
459
|
-
placeholder:
|
|
501
|
+
children: [a("banking.import.account", "Account name"), /* @__PURE__ */ M("input", {
|
|
502
|
+
className: r(P, "mt-1"),
|
|
503
|
+
value: p,
|
|
504
|
+
onChange: (e) => ee(e.target.value),
|
|
505
|
+
placeholder: a("banking.import.accountPlaceholder", "e.g. Sapphire card"),
|
|
460
506
|
maxLength: 255
|
|
461
507
|
})]
|
|
462
|
-
}), /* @__PURE__ */
|
|
508
|
+
}), /* @__PURE__ */ N("label", {
|
|
463
509
|
className: "block text-sm text-text-primary",
|
|
464
|
-
children: [
|
|
465
|
-
className: r(
|
|
510
|
+
children: [a("banking.import.mask", "Last 4 digits"), /* @__PURE__ */ M("input", {
|
|
511
|
+
className: r(P, "mt-1"),
|
|
466
512
|
value: m,
|
|
467
513
|
onChange: (e) => h(e.target.value.replace(/\D/g, "").slice(-4)),
|
|
468
514
|
inputMode: "numeric",
|
|
@@ -470,49 +516,49 @@ function ce({ connections: e, onClose: n, onImported: ee }) {
|
|
|
470
516
|
})]
|
|
471
517
|
})]
|
|
472
518
|
}),
|
|
473
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ N("div", {
|
|
474
520
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-3",
|
|
475
521
|
children: [
|
|
476
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ N("label", {
|
|
477
523
|
className: "block text-sm text-text-primary",
|
|
478
|
-
children: [
|
|
479
|
-
className: r(
|
|
524
|
+
children: [a("banking.import.currency", "Currency"), /* @__PURE__ */ M("input", {
|
|
525
|
+
className: r(P, "mt-1 uppercase"),
|
|
480
526
|
value: g,
|
|
481
527
|
onChange: (e) => v(e.target.value.toUpperCase().slice(0, 3)),
|
|
482
528
|
maxLength: 3
|
|
483
529
|
})]
|
|
484
530
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
531
|
+
/* @__PURE__ */ N("label", {
|
|
486
532
|
className: "block text-sm text-text-primary",
|
|
487
|
-
children: [
|
|
488
|
-
className: r(
|
|
533
|
+
children: [a("banking.import.convention", "Money out is"), /* @__PURE__ */ N("select", {
|
|
534
|
+
className: r(P, "mt-1"),
|
|
489
535
|
value: y,
|
|
490
|
-
onChange: (e) =>
|
|
491
|
-
children: [/* @__PURE__ */
|
|
536
|
+
onChange: (e) => b(e.target.value),
|
|
537
|
+
children: [/* @__PURE__ */ M("option", {
|
|
492
538
|
value: "OUTFLOW_NEGATIVE",
|
|
493
|
-
children:
|
|
494
|
-
}), /* @__PURE__ */
|
|
539
|
+
children: a("banking.import.negative", "Negative (bank)")
|
|
540
|
+
}), /* @__PURE__ */ M("option", {
|
|
495
541
|
value: "OUTFLOW_POSITIVE",
|
|
496
|
-
children:
|
|
542
|
+
children: a("banking.import.positive", "Positive (card)")
|
|
497
543
|
})]
|
|
498
544
|
})]
|
|
499
545
|
}),
|
|
500
|
-
/* @__PURE__ */
|
|
546
|
+
/* @__PURE__ */ N("label", {
|
|
501
547
|
className: "block text-sm text-text-primary",
|
|
502
|
-
children: [
|
|
503
|
-
className: r(
|
|
504
|
-
value:
|
|
505
|
-
onChange: (e) =>
|
|
548
|
+
children: [a("banking.import.dateFormat", "Date format"), /* @__PURE__ */ N("select", {
|
|
549
|
+
className: r(P, "mt-1"),
|
|
550
|
+
value: x,
|
|
551
|
+
onChange: (e) => S(e.target.value),
|
|
506
552
|
children: [
|
|
507
|
-
/* @__PURE__ */
|
|
553
|
+
/* @__PURE__ */ M("option", {
|
|
508
554
|
value: "MDY",
|
|
509
555
|
children: "MM/DD/YYYY"
|
|
510
556
|
}),
|
|
511
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ M("option", {
|
|
512
558
|
value: "DMY",
|
|
513
559
|
children: "DD/MM/YYYY"
|
|
514
560
|
}),
|
|
515
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ M("option", {
|
|
516
562
|
value: "YMD",
|
|
517
563
|
children: "YYYY-MM-DD"
|
|
518
564
|
})
|
|
@@ -521,49 +567,49 @@ function ce({ connections: e, onClose: n, onImported: ee }) {
|
|
|
521
567
|
})
|
|
522
568
|
]
|
|
523
569
|
}),
|
|
524
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ N("label", {
|
|
525
571
|
className: "block text-sm text-text-primary",
|
|
526
|
-
children: [
|
|
572
|
+
children: [a("banking.import.file", "CSV file"), /* @__PURE__ */ M("input", {
|
|
527
573
|
type: "file",
|
|
528
574
|
accept: ".csv,text/csv,text/plain",
|
|
529
|
-
className: r(
|
|
530
|
-
onChange: (e) => void
|
|
575
|
+
className: r(P, "mt-1"),
|
|
576
|
+
onChange: (e) => void A(e.target.files?.[0]),
|
|
531
577
|
id: "statement-file",
|
|
532
|
-
...
|
|
578
|
+
...O("statement-file"),
|
|
533
579
|
"data-testid": "import-statement-file"
|
|
534
580
|
})]
|
|
535
581
|
}),
|
|
536
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ N("label", {
|
|
537
583
|
className: "block text-sm text-text-primary",
|
|
538
|
-
children: [
|
|
539
|
-
className: r(
|
|
540
|
-
value:
|
|
541
|
-
onChange: (e) =>
|
|
584
|
+
children: [a("banking.import.paste", "Or paste the statement"), /* @__PURE__ */ M("textarea", {
|
|
585
|
+
className: r(P, "mt-1 h-32 font-mono text-xs"),
|
|
586
|
+
value: C,
|
|
587
|
+
onChange: (e) => w(e.target.value),
|
|
542
588
|
placeholder: "Date,Description,Amount\n10/05/2026,NETFLIX.COM,-15.49",
|
|
543
589
|
id: "statement-csv",
|
|
544
|
-
...
|
|
590
|
+
...O("statement-csv"),
|
|
545
591
|
"data-testid": "import-statement-csv"
|
|
546
592
|
})]
|
|
547
593
|
}),
|
|
548
|
-
|
|
549
|
-
id:
|
|
594
|
+
E && /* @__PURE__ */ M("p", {
|
|
595
|
+
id: k,
|
|
550
596
|
tabIndex: -1,
|
|
551
597
|
role: "alert",
|
|
552
598
|
className: "text-sm text-status-error-text",
|
|
553
|
-
children:
|
|
599
|
+
children: E
|
|
554
600
|
}),
|
|
555
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ N("div", {
|
|
556
602
|
className: "flex justify-end gap-2 pt-1",
|
|
557
|
-
children: [/* @__PURE__ */
|
|
603
|
+
children: [/* @__PURE__ */ M("button", {
|
|
558
604
|
type: "button",
|
|
559
|
-
className:
|
|
605
|
+
className: I,
|
|
560
606
|
onClick: n,
|
|
561
|
-
children:
|
|
562
|
-
}), /* @__PURE__ */
|
|
607
|
+
children: a("common.cancel", "Cancel")
|
|
608
|
+
}), /* @__PURE__ */ M("button", {
|
|
563
609
|
type: "submit",
|
|
564
|
-
className:
|
|
565
|
-
disabled:
|
|
566
|
-
children:
|
|
610
|
+
className: F,
|
|
611
|
+
disabled: o.isPending,
|
|
612
|
+
children: o.isPending ? a("banking.import.submitting", "Importing…") : a("banking.import.submit", "Import and find subscriptions")
|
|
567
613
|
})]
|
|
568
614
|
})
|
|
569
615
|
]
|