@tesouro/embedded-components-react 0.5.46 → 0.5.48
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.css +56 -0
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +7 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +46 -36
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +34 -184
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +163 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +22 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +88 -317
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +322 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +12 -64
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +57 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +52 -214
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +215 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +35 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +240 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +21 -532
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +536 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +4 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +38 -230
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +234 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +46 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +6 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +11 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +129 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +3 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +124 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +8 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +44 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +27 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +83 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +47 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +241 -122
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +125 -211
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +219 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +4 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +5 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +100 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +0 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +28 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index3.js +12 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +242 -210
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/user/useOrganizationUserNames.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/auditHistory/buildPayableAuditHistory.js +137 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
|
@@ -2,325 +2,96 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import "../../../shared/
|
|
8
|
-
import {
|
|
9
|
-
import "../../../shared/
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import { usePayableSuggestionsQuery as ee } from "../../data-access/dist/index18.js";
|
|
13
|
-
import "../../data-access/dist/index.js";
|
|
14
|
-
import { COUNTERPART_MESSAGE_LABELS_EN as te } from "../../../shared/counterpart-management/feature/dist/lib/labels.js";
|
|
15
|
-
import { counterpartFormBankAccountToCreatePayload as ne, counterpartFormBankAccountToUpdatePayload as re, getAchInstructions as o, getCounterpartEmail as s, getCounterpartName as c, getPayableAchInstructions as ie, isAchCompatibleBankAccount as l, resolveCounterpartBankAccountWrite as ae, validateAchFormValues as oe } from "../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
16
|
-
import { useCounterpartDetails as se } from "../../../shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js";
|
|
17
|
-
import { useCounterpartForm as ce } from "../../../shared/counterpart-management/feature/dist/lib/useCounterpartForm.js";
|
|
5
|
+
import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { getStateOptions as t } from "../../../shared/util/dist/lib/usStates.js";
|
|
7
|
+
import { AchFieldGroup as n } from "../../../shared/counterpart-management/ui/dist/index5.js";
|
|
8
|
+
import { CounterpartFormFields as r, useFocusFirstInvalidField as i } from "../../../shared/counterpart-management/ui/dist/index9.js";
|
|
9
|
+
import "../../../shared/counterpart-management/ui/dist/index.js";
|
|
10
|
+
import { VendorSearchCombobox as a } from "../../ui/dist/index43.js";
|
|
11
|
+
import "../../ui/dist/index.js";
|
|
18
12
|
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { jsx as fe } from "react/jsx-runtime";
|
|
13
|
+
import { VENDOR_INLINE_FORM_LABELS_EN as o } from "./index49.js";
|
|
14
|
+
import { useMemo as s } from "react";
|
|
15
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
16
|
+
import { Plus as u } from "lucide-react";
|
|
24
17
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
accountHolderName: e.account_holder_name ?? "",
|
|
33
|
-
routingNumber: e.routing_number ?? "",
|
|
34
|
-
accountNumber: e.account_number ?? ""
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function g(e, t) {
|
|
38
|
-
return e.accountHolderName.trim() === t.accountHolderName.trim() && e.routingNumber.trim() === t.routingNumber.trim() && e.accountNumber.trim() === t.accountNumber.trim();
|
|
39
|
-
}
|
|
40
|
-
function ge(e, t) {
|
|
41
|
-
return e?.find((e) => e.id === t && l(e)) ?? o(e);
|
|
42
|
-
}
|
|
43
|
-
function _({ payableId: o, counterpartId: l, payableCounterpartId: _, payableCounterpartBankAccountId: _e, isVendorKnown: ve = !0, onCounterpartChange: ye, requiredError: be, extractedVendor: xe, readOnly: v = !1, canEditVendor: Se = !0, canEditPaymentInstructions: Ce = !0, canAddPaymentInstructions: we = !0, confirmDiscard: y = (e) => e(), labels: Te }) {
|
|
44
|
-
let b = {
|
|
45
|
-
...le,
|
|
46
|
-
...Te
|
|
47
|
-
}, { initResponse: Ee } = n(), De = e(Ee?.scopes, [t.CounterpartReadOrg]), [x, Oe] = m(""), [ke, Ae] = m(""), [S, C] = m(), [je, Me] = m("none"), [Ne, Pe] = m(), [Fe, w] = m(!1), [T, E] = m(!1), [D, O] = m(h), Ie = p(D);
|
|
48
|
-
Ie.current = D;
|
|
49
|
-
let k = p(h), [Le, A] = m(), [j, M] = m(), Re = p(l), [ze, Be] = m(!1), N = T && !g(D, k.current), P = u(() => {
|
|
50
|
-
E(!1), O(h), k.current = h, A(void 0);
|
|
51
|
-
}, []), F = u((e) => {
|
|
52
|
-
Be(!0), ye(e);
|
|
53
|
-
}, [ye]), I = ee(o, { enabled: !v && !!o && !l && !_ }).data?.suggested_counterpart?.id;
|
|
54
|
-
d(() => {
|
|
55
|
-
!v && !ze && !l && !_ && I && F(I);
|
|
56
|
-
}, [
|
|
57
|
-
l,
|
|
58
|
-
_,
|
|
59
|
-
v,
|
|
60
|
-
ze,
|
|
61
|
-
I,
|
|
62
|
-
F
|
|
63
|
-
]), d(() => {
|
|
64
|
-
Re.current !== l && (Re.current = l, P(), M(void 0));
|
|
65
|
-
}, [l, P]), d(() => {
|
|
66
|
-
let e = setTimeout(() => {
|
|
67
|
-
Ae(x.trim());
|
|
68
|
-
}, me);
|
|
69
|
-
return () => clearTimeout(e);
|
|
70
|
-
}, [x]);
|
|
71
|
-
let L = r({
|
|
72
|
-
sort: "counterpart_name",
|
|
73
|
-
order: "asc",
|
|
74
|
-
limit: pe,
|
|
75
|
-
counterpart_name__icontains: ke || void 0,
|
|
76
|
-
is_vendor: !0,
|
|
77
|
-
enabled: !v && (S === "edit" || !S && !l) && ve && De
|
|
78
|
-
}), R = se({
|
|
79
|
-
selectedId: l,
|
|
80
|
-
enabled: De
|
|
81
|
-
}), Ve = i(), He = a(), z = ce({
|
|
82
|
-
view: je,
|
|
83
|
-
setView: Me,
|
|
84
|
-
selectedId: Ne,
|
|
85
|
-
setSelectedId: Pe,
|
|
86
|
-
messages: te,
|
|
87
|
-
counterpartType: "vendor",
|
|
88
|
-
counterpart: R.counterpart,
|
|
89
|
-
primaryAddress: R.primaryAddress,
|
|
90
|
-
includeBankAccount: !1
|
|
91
|
-
}), { openCreate: Ue, openEdit: We, close: Ge, setValues: B, submit: Ke } = z, V = f(() => {
|
|
92
|
-
let e = R.counterpart;
|
|
93
|
-
if (!e) return;
|
|
94
|
-
if (R.isBankAccountsLoading) return {
|
|
95
|
-
name: c(e),
|
|
96
|
-
email: s(e),
|
|
97
|
-
methodLabel: b.paymentMethodLoading,
|
|
98
|
-
hasPaymentInstructions: !1
|
|
99
|
-
};
|
|
100
|
-
if (R.isBankAccountsError) return {
|
|
101
|
-
name: c(e),
|
|
102
|
-
email: s(e),
|
|
103
|
-
methodLabel: b.paymentMethodUnavailable,
|
|
104
|
-
hasPaymentInstructions: !1
|
|
105
|
-
};
|
|
106
|
-
let t = ie(R.bankAccounts);
|
|
107
|
-
return {
|
|
108
|
-
name: c(e),
|
|
109
|
-
email: s(e),
|
|
110
|
-
methodLabel: t ? b.paymentInstructionsValue(t.account_number?.slice(-4) ?? "") : b.noMethod,
|
|
111
|
-
hasPaymentInstructions: !!t
|
|
112
|
-
};
|
|
113
|
-
}, [
|
|
114
|
-
R.bankAccounts,
|
|
115
|
-
R.counterpart,
|
|
116
|
-
R.isBankAccountsError,
|
|
117
|
-
R.isBankAccountsLoading,
|
|
118
|
-
b
|
|
119
|
-
]), H = l === _ ? _e : void 0, U = f(() => ge(R.bankAccounts, H), [R.bankAccounts, H]), qe = f(() => ie(R.bankAccounts)?.id, [R.bankAccounts]), W = !R.counterpart || R.isLoading || R.isFetching || R.isError || R.isAddressesLoading || R.isAddressesFetching || R.isAddressesError || R.isBankAccountsLoading || R.isBankAccountsFetching || R.isBankAccountsError, G = u(() => {
|
|
120
|
-
Ge(), C(void 0), w(!1);
|
|
121
|
-
}, [Ge]), K = f(() => ue(xe), [xe]), q = u((e) => {
|
|
122
|
-
if (w(!1), e === "edit") Pe(l), We();
|
|
123
|
-
else {
|
|
124
|
-
Ue();
|
|
125
|
-
let e = x.trim();
|
|
126
|
-
B((t) => ({
|
|
127
|
-
...t,
|
|
128
|
-
entityType: "organization",
|
|
129
|
-
legalName: e || K?.legalName || t.legalName,
|
|
130
|
-
email: K?.email || t.email,
|
|
131
|
-
phone: K?.phone || t.phone,
|
|
132
|
-
address: K?.address ?? t.address
|
|
133
|
-
}));
|
|
134
|
-
}
|
|
135
|
-
C(e);
|
|
136
|
-
}, [
|
|
137
|
-
l,
|
|
138
|
-
Ue,
|
|
139
|
-
We,
|
|
140
|
-
x,
|
|
141
|
-
B,
|
|
142
|
-
K
|
|
143
|
-
]), Je = u(() => {
|
|
144
|
-
let e = U ? he(U) : h;
|
|
145
|
-
k.current = e, O(e), A(void 0), E(!0);
|
|
146
|
-
}, [U]), Ye = u(() => {
|
|
147
|
-
N ? y(P) : P();
|
|
148
|
-
}, [
|
|
149
|
-
P,
|
|
150
|
-
y,
|
|
151
|
-
N
|
|
152
|
-
]), J = u(() => {
|
|
153
|
-
G(), P();
|
|
154
|
-
}, [P, G]), Y = Fe || N, X = u((e) => {
|
|
155
|
-
let t = () => {
|
|
156
|
-
J(), e();
|
|
157
|
-
};
|
|
158
|
-
Y ? y(t) : t();
|
|
159
|
-
}, [
|
|
160
|
-
y,
|
|
161
|
-
J,
|
|
162
|
-
Y
|
|
163
|
-
]), Xe = u(() => {
|
|
164
|
-
Y ? y(J) : J();
|
|
165
|
-
}, [
|
|
166
|
-
y,
|
|
167
|
-
J,
|
|
168
|
-
Y
|
|
169
|
-
]), Ze = u(async () => {
|
|
170
|
-
let e = l, t = !1, n = Ie.current;
|
|
171
|
-
if (!g(n, k.current)) {
|
|
172
|
-
let e = oe(n);
|
|
173
|
-
if (Object.keys(e).length > 0) return A(e), E(!0), { ok: !1 };
|
|
174
|
-
}
|
|
175
|
-
if (S === "edit" && W) return { ok: !1 };
|
|
176
|
-
if (S) {
|
|
177
|
-
let n = await Ke();
|
|
178
|
-
if (!n.ok) return { ok: !1 };
|
|
179
|
-
S === "create" ? (e = n.counterpartId, t = !0, G(), M(void 0), F(e)) : (G(), e = n.counterpartId ?? e);
|
|
180
|
-
}
|
|
181
|
-
if (!e) return { ok: !0 };
|
|
182
|
-
let r = R.isBankAccountsLoading || R.isBankAccountsFetching || R.isBankAccountsError;
|
|
183
|
-
if (g(n, k.current)) {
|
|
184
|
-
if (t) return {
|
|
185
|
-
ok: !0,
|
|
186
|
-
counterpartId: e
|
|
187
|
-
};
|
|
188
|
-
let n = j ?? H;
|
|
189
|
-
return n ? (E(!1), {
|
|
190
|
-
ok: !0,
|
|
191
|
-
counterpartId: e,
|
|
192
|
-
counterpartBankAccountId: n
|
|
193
|
-
}) : r ? { ok: !1 } : (E(!1), {
|
|
194
|
-
ok: !0,
|
|
195
|
-
counterpartId: e,
|
|
196
|
-
counterpartBankAccountId: qe
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
if (r) return { ok: !1 };
|
|
200
|
-
A(void 0);
|
|
201
|
-
let i = ae(R.bankAccounts, j ?? U?.id), a;
|
|
202
|
-
return i.kind === "update" ? (await He.mutateAsync({
|
|
203
|
-
path: {
|
|
204
|
-
counterpart_id: e,
|
|
205
|
-
bank_account_id: i.bankAccountId
|
|
206
|
-
},
|
|
207
|
-
body: re(n, { includeAchDefaults: i.includeAchDefaults })
|
|
208
|
-
}), a = i.bankAccountId) : a = (await Ve.mutateAsync({
|
|
209
|
-
path: { counterpart_id: e },
|
|
210
|
-
body: ne(n, { isDefaultForCurrency: i.isDefaultForCurrency })
|
|
211
|
-
}))?.id, k.current = n, M(a), E(!1), {
|
|
212
|
-
ok: !0,
|
|
213
|
-
counterpartId: e,
|
|
214
|
-
counterpartBankAccountId: a
|
|
215
|
-
};
|
|
216
|
-
}, [
|
|
217
|
-
P,
|
|
218
|
-
G,
|
|
219
|
-
l,
|
|
220
|
-
Ve,
|
|
221
|
-
R.bankAccounts,
|
|
222
|
-
R.isBankAccountsError,
|
|
223
|
-
R.isBankAccountsFetching,
|
|
224
|
-
R.isBankAccountsLoading,
|
|
225
|
-
S,
|
|
226
|
-
W,
|
|
227
|
-
H,
|
|
228
|
-
qe,
|
|
229
|
-
F,
|
|
230
|
-
U,
|
|
231
|
-
Ke,
|
|
232
|
-
He,
|
|
233
|
-
j
|
|
234
|
-
]), Qe = f(() => (L.data?.data ?? []).map((e) => ({
|
|
235
|
-
name: c(e),
|
|
236
|
-
email: s(e),
|
|
237
|
-
onSelect: () => {
|
|
238
|
-
X(() => F(e.id));
|
|
239
|
-
}
|
|
240
|
-
})), [
|
|
241
|
-
L.data,
|
|
242
|
-
X,
|
|
243
|
-
F
|
|
244
|
-
]), $e = u((e) => {
|
|
245
|
-
w(!0), B((t) => e.entityType === "individual" && t.entityType !== "individual" ? {
|
|
246
|
-
...t,
|
|
247
|
-
...e,
|
|
248
|
-
firstName: t.firstName || t.legalName,
|
|
249
|
-
legalName: t.legalName
|
|
250
|
-
} : e.entityType === "organization" && t.entityType !== "organization" ? {
|
|
251
|
-
...t,
|
|
252
|
-
...e,
|
|
253
|
-
legalName: t.legalName || [t.firstName, t.lastName].filter(Boolean).join(" ")
|
|
254
|
-
} : {
|
|
255
|
-
...t,
|
|
256
|
-
...e
|
|
257
|
-
});
|
|
258
|
-
}, [B]), et = u((e) => {
|
|
259
|
-
w(!0), B((t) => ({
|
|
260
|
-
...t,
|
|
261
|
-
address: {
|
|
262
|
-
...t.address,
|
|
263
|
-
...e
|
|
264
|
-
}
|
|
265
|
-
}));
|
|
266
|
-
}, [B]), Z = {
|
|
267
|
-
query: x,
|
|
268
|
-
onQueryChange: Oe,
|
|
269
|
-
isLoading: !ve || !Ee || !!l && R.isLoading || L.isFetching,
|
|
270
|
-
onAddVendor: () => {
|
|
271
|
-
X(() => q("create"));
|
|
272
|
-
},
|
|
273
|
-
results: Qe
|
|
274
|
-
}, Q = we && (S === "create" || !W) ? {
|
|
275
|
-
isOpen: T,
|
|
276
|
-
values: D,
|
|
277
|
-
errors: Le,
|
|
278
|
-
onOpen: Je,
|
|
279
|
-
onCancel: Ye,
|
|
280
|
-
onChange: (e) => {
|
|
281
|
-
O((t) => ({
|
|
282
|
-
...t,
|
|
283
|
-
...e
|
|
284
|
-
})), A(void 0);
|
|
18
|
+
function d({ mode: d, values: f, errors: p, onChange: m, onAddressChange: h, sectionsToExpand: g, onAddressExpand: _, onCancel: v, paymentInstructions: y, search: b, labels: x }) {
|
|
19
|
+
let S = {
|
|
20
|
+
...o,
|
|
21
|
+
...x,
|
|
22
|
+
ach: {
|
|
23
|
+
...o.ach,
|
|
24
|
+
...x?.ach
|
|
285
25
|
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
26
|
+
}, C = s(() => t(), []), w = i(p ?? {});
|
|
27
|
+
return /* @__PURE__ */ l("div", {
|
|
28
|
+
ref: w,
|
|
29
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ c("p", {
|
|
32
|
+
className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
33
|
+
children: d === "edit" ? S.editTitle : S.createTitle
|
|
34
|
+
}),
|
|
35
|
+
d === "edit" && b ? /* @__PURE__ */ c(a, {
|
|
36
|
+
...b,
|
|
37
|
+
labels: { fieldLabel: S.switchVendorFieldLabel }
|
|
38
|
+
}) : null,
|
|
39
|
+
/* @__PURE__ */ c(r, {
|
|
40
|
+
mode: d,
|
|
41
|
+
counterpartMode: "vendor",
|
|
42
|
+
values: f,
|
|
43
|
+
errors: p,
|
|
44
|
+
stateOptions: C,
|
|
45
|
+
onChange: m,
|
|
46
|
+
onAddressChange: h,
|
|
47
|
+
sections: {
|
|
48
|
+
entityType: !0,
|
|
49
|
+
profileHeading: !1,
|
|
50
|
+
title: !1,
|
|
51
|
+
taxId: !1,
|
|
52
|
+
address: "collapsible",
|
|
53
|
+
bankAccount: !1
|
|
54
|
+
},
|
|
55
|
+
sectionsToExpand: g,
|
|
56
|
+
onAddressExpand: _,
|
|
57
|
+
labels: { businessNameLabel: S.nameLabel }
|
|
58
|
+
}),
|
|
59
|
+
y ? y.isOpen ? /* @__PURE__ */ l("div", {
|
|
60
|
+
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
61
|
+
children: [/* @__PURE__ */ c(n, {
|
|
62
|
+
idPrefix: "vendor-inline-ach",
|
|
63
|
+
values: y.values,
|
|
64
|
+
errors: y.errors,
|
|
65
|
+
onChange: y.onChange,
|
|
66
|
+
labels: S.ach
|
|
67
|
+
}), /* @__PURE__ */ c("div", {
|
|
68
|
+
className: "ttw:flex ttw:justify-end",
|
|
69
|
+
children: /* @__PURE__ */ c(e, {
|
|
70
|
+
type: "button",
|
|
71
|
+
variant: "outline",
|
|
72
|
+
onClick: y.onCancel,
|
|
73
|
+
children: S.cancelPaymentInstructions
|
|
74
|
+
})
|
|
75
|
+
})]
|
|
76
|
+
}) : /* @__PURE__ */ l(e, {
|
|
77
|
+
type: "button",
|
|
78
|
+
variant: "link",
|
|
79
|
+
className: "ttw:w-fit ttw:px-0",
|
|
80
|
+
onClick: y.onOpen,
|
|
81
|
+
children: [/* @__PURE__ */ c(u, { className: "ttw:size-4" }), S.addPaymentInstructions]
|
|
82
|
+
}) : null,
|
|
83
|
+
/* @__PURE__ */ c("div", {
|
|
84
|
+
className: "ttw:flex ttw:justify-end",
|
|
85
|
+
children: /* @__PURE__ */ c(e, {
|
|
86
|
+
type: "button",
|
|
87
|
+
variant: "outline",
|
|
88
|
+
onClick: v,
|
|
89
|
+
"aria-label": S.cancelAriaLabel,
|
|
90
|
+
children: S.cancel
|
|
91
|
+
})
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
});
|
|
324
95
|
}
|
|
325
96
|
//#endregion
|
|
326
|
-
export {
|
|
97
|
+
export { d as VendorInlineForm, d as default };
|