@tesouro/embedded-components-react 0.4.28 → 0.4.29
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 +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +15 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +87 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index18.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +5 -70
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +64 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +38 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +104 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +87 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +7 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +17 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +23 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +66 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +2 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +78 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +3 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +30 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +37 -166
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +164 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +48 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +1 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +45 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +13 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +8 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +7 -59
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +64 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +8 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +18 -136
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +139 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +24 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +4 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +39 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +79 -85
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +96 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +3 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +47 -119
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +135 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +33 -186
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +186 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +22 -232
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +223 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +14 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +202 -103
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +121 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +47 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +27 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +198 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +30 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +240 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +19 -425
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +433 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +25 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +4 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +35 -218
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +224 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +46 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +10 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +112 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +21 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +3 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +124 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +43 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +27 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +83 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +47 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +239 -101
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +58 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +107 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +209 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +5 -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/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
|
@@ -2,222 +2,235 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import "../../../shared/
|
|
8
|
-
import {
|
|
9
|
-
import "../../../shared/feature/dist/
|
|
10
|
-
import {
|
|
11
|
-
import { useCreateCounterpartBankAccountMutation as ee, useUpdateCounterpartBankAccountMutation as te } from "../../../shared/counterpart-management/data-access/dist/index5.js";
|
|
12
|
-
import { usePayableSuggestionsQuery as i } from "../../data-access/dist/index17.js";
|
|
13
|
-
import "../../data-access/dist/index.js";
|
|
14
|
-
import { maskAccountNumber as a } from "./index22.js";
|
|
15
|
-
import { counterpartFormBankAccountToCreatePayload as ne, counterpartFormBankAccountToUpdatePayload as re, getAchInstructions as ie, getCounterpartEmail as o, getCounterpartName as s, getPayableAchInstructions as c, hasAchFormValues 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";
|
|
5
|
+
import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { getStateOptions as s } from "../../../shared/util/dist/lib/usStates.js";
|
|
7
|
+
import { AchFieldGroup as ee } from "../../../shared/counterpart-management/ui/dist/index5.js";
|
|
8
|
+
import { CounterpartFormFields as c, useFocusFirstInvalidField as l } from "../../../shared/counterpart-management/ui/dist/index9.js";
|
|
9
|
+
import { COUNTERPART_MESSAGE_LABELS_EN as u } from "../../../shared/counterpart-management/feature/dist/lib/labels.js";
|
|
10
|
+
import { useCounterpartForm as d } from "../../../shared/counterpart-management/feature/dist/lib/useCounterpartForm.js";
|
|
17
11
|
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { jsx as de } from "react/jsx-runtime";
|
|
12
|
+
import { VENDOR_INLINE_FORM_LABELS_EN as f } from "./index46.js";
|
|
13
|
+
import { useCallback as p, useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
|
|
14
|
+
import { Fragment as te, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
15
|
+
import { Landmark as b, Plus as ne, X as x } from "lucide-react";
|
|
23
16
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
17
|
+
function S({ mode: S, counterpart: C, primaryAddress: w, bankAccounts: T, isBankAccountsLoading: E, isBankAccountsError: D, initialName: O, initialValues: k, onSaved: A, onCancel: j, onDirtyChange: M, labels: N }) {
|
|
18
|
+
let P = {
|
|
19
|
+
...f,
|
|
20
|
+
...N
|
|
21
|
+
}, [F, I] = _("none"), [L, R] = _(C?.id), [z, B] = _(!1), [V, H] = _(!1), [U, W] = _(!1);
|
|
22
|
+
m(() => {
|
|
23
|
+
M?.(V);
|
|
24
|
+
}, [V, M]);
|
|
25
|
+
let G = h(() => s(), []), K = g(F), q = g(!1), J = d({
|
|
26
|
+
view: F,
|
|
27
|
+
setView: I,
|
|
28
|
+
selectedId: L,
|
|
29
|
+
setSelectedId: R,
|
|
30
|
+
messages: u,
|
|
31
|
+
counterpartType: "vendor",
|
|
32
|
+
counterpart: C,
|
|
33
|
+
primaryAddress: w,
|
|
34
|
+
bankAccounts: T,
|
|
35
|
+
isBankAccountsLoading: E,
|
|
36
|
+
isBankAccountsError: D
|
|
37
|
+
}), { openCreate: Y, openEdit: X, setValues: Z, expandAddress: Q } = J, re = l(J.errors);
|
|
38
|
+
m(() => {
|
|
39
|
+
S === "edit" ? X() : Y();
|
|
42
40
|
}, [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
]), d(() => {
|
|
49
|
-
B.current !== v && (B.current = v, H());
|
|
50
|
-
}, [v, H]), d(() => {
|
|
51
|
-
let e = setTimeout(() => {
|
|
52
|
-
_e(E.trim());
|
|
53
|
-
}, h);
|
|
54
|
-
return () => clearTimeout(e);
|
|
55
|
-
}, [E]);
|
|
56
|
-
let G = r({
|
|
57
|
-
sort: "counterpart_name",
|
|
58
|
-
order: "asc",
|
|
59
|
-
limit: fe,
|
|
60
|
-
counterpart_name__icontains: ge || void 0,
|
|
61
|
-
is_vendor: !0,
|
|
62
|
-
enabled: !O && !v && x && he
|
|
63
|
-
}), K = se({ selectedId: v }), q = ee(), J = te(), Y = f(() => {
|
|
64
|
-
let e = K.counterpart;
|
|
65
|
-
if (!e) return;
|
|
66
|
-
if (K.isBankAccountsLoading) return {
|
|
67
|
-
name: s(e),
|
|
68
|
-
email: o(e),
|
|
69
|
-
methodLabel: w.paymentMethodLoading,
|
|
70
|
-
fields: []
|
|
71
|
-
};
|
|
72
|
-
if (K.isBankAccountsError) return {
|
|
73
|
-
name: s(e),
|
|
74
|
-
email: o(e),
|
|
75
|
-
methodLabel: w.paymentMethodUnavailable,
|
|
76
|
-
fields: []
|
|
77
|
-
};
|
|
78
|
-
let t = c(K.bankAccounts);
|
|
79
|
-
return {
|
|
80
|
-
name: s(e),
|
|
81
|
-
email: o(e),
|
|
82
|
-
methodLabel: t ? w.achMethod : w.noMethod,
|
|
83
|
-
fields: t ? [
|
|
84
|
-
{
|
|
85
|
-
label: w.accountHolder,
|
|
86
|
-
value: t.account_holder_name ?? ""
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
label: w.routingNumber,
|
|
90
|
-
value: t.routing_number ?? ""
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
label: w.accountNumber,
|
|
94
|
-
value: t.account_number ?? "",
|
|
95
|
-
maskedValue: t.account_number ? a(t.account_number) : ""
|
|
96
|
-
}
|
|
97
|
-
] : []
|
|
98
|
-
};
|
|
41
|
+
S,
|
|
42
|
+
Y,
|
|
43
|
+
X
|
|
44
|
+
]), m(() => {
|
|
45
|
+
K.current !== "none" && F === "none" && L && A(L), K.current = F;
|
|
99
46
|
}, [
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
ok: !0,
|
|
113
|
-
counterpartBankAccountId: Z
|
|
114
|
-
};
|
|
115
|
-
if (K.isBankAccountsLoading || K.isBankAccountsFetching || K.isBankAccountsError) return { ok: !1 };
|
|
116
|
-
let t = oe(e);
|
|
117
|
-
if (Object.keys(t).length > 0) return L(t), A(!0), { ok: !1 };
|
|
118
|
-
L(void 0);
|
|
119
|
-
let n = ae(K.bankAccounts, R ?? X?.id);
|
|
120
|
-
if (n.kind === "update") return await J.mutateAsync({
|
|
121
|
-
path: {
|
|
122
|
-
counterpart_id: v,
|
|
123
|
-
bank_account_id: n.bankAccountId
|
|
124
|
-
},
|
|
125
|
-
body: re(e, { includeAchDefaults: n.includeAchDefaults })
|
|
126
|
-
}), z(n.bankAccountId), {
|
|
127
|
-
ok: !0,
|
|
128
|
-
counterpartBankAccountId: n.bankAccountId
|
|
129
|
-
};
|
|
130
|
-
let r = await q.mutateAsync({
|
|
131
|
-
path: { counterpart_id: v },
|
|
132
|
-
body: ne(e, { isDefaultForCurrency: n.isDefaultForCurrency })
|
|
133
|
-
});
|
|
134
|
-
return z(r?.id), {
|
|
135
|
-
ok: !0,
|
|
136
|
-
counterpartBankAccountId: r?.id
|
|
137
|
-
};
|
|
47
|
+
F,
|
|
48
|
+
L,
|
|
49
|
+
A
|
|
50
|
+
]), m(() => {
|
|
51
|
+
S !== "create" || q.current || (q.current = !0, Z((e) => ({
|
|
52
|
+
...e,
|
|
53
|
+
entityType: "organization",
|
|
54
|
+
legalName: O?.trim() || k?.legalName || e.legalName,
|
|
55
|
+
email: k?.email || e.email,
|
|
56
|
+
phone: k?.phone || e.phone,
|
|
57
|
+
address: k?.address ?? e.address
|
|
58
|
+
})), k?.address && Object.values(k.address).some(Boolean) && Q());
|
|
138
59
|
}, [
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
K.bankAccounts,
|
|
143
|
-
K.isBankAccountsError,
|
|
144
|
-
K.isBankAccountsFetching,
|
|
145
|
-
K.isBankAccountsLoading,
|
|
146
|
-
R,
|
|
60
|
+
S,
|
|
61
|
+
O,
|
|
62
|
+
k,
|
|
147
63
|
Z,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
J
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}, [])
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
|
|
64
|
+
Q
|
|
65
|
+
]), m(() => {
|
|
66
|
+
S === "edit" && (J.values.bankAccount.routingNumber || J.values.bankAccount.accountNumber) && B(!0);
|
|
67
|
+
}, [
|
|
68
|
+
S,
|
|
69
|
+
J.values.bankAccount.accountNumber,
|
|
70
|
+
J.values.bankAccount.routingNumber
|
|
71
|
+
]), m(() => {
|
|
72
|
+
J.sectionsToExpand.bankAccount && B(!0);
|
|
73
|
+
}, [J.sectionsToExpand.bankAccount]);
|
|
74
|
+
let $ = p(() => {
|
|
75
|
+
if (V) {
|
|
76
|
+
W(!0);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
j();
|
|
80
|
+
}, [V, j]), ie = p((e) => {
|
|
81
|
+
H(!0), Z((t) => e.entityType === "individual" && t.entityType !== "individual" ? {
|
|
82
|
+
...t,
|
|
83
|
+
...e,
|
|
84
|
+
firstName: t.firstName || t.legalName,
|
|
85
|
+
legalName: t.legalName
|
|
86
|
+
} : e.entityType === "organization" && t.entityType !== "organization" ? {
|
|
87
|
+
...t,
|
|
88
|
+
...e,
|
|
89
|
+
legalName: t.legalName || [t.firstName, t.lastName].filter(Boolean).join(" ")
|
|
90
|
+
} : {
|
|
91
|
+
...t,
|
|
92
|
+
...e
|
|
93
|
+
});
|
|
94
|
+
}, [Z]);
|
|
95
|
+
return /* @__PURE__ */ y("div", {
|
|
96
|
+
ref: re,
|
|
97
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ y("div", {
|
|
100
|
+
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-2",
|
|
101
|
+
children: [/* @__PURE__ */ v("p", {
|
|
102
|
+
className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
103
|
+
children: S === "edit" ? P.editTitle : P.createTitle
|
|
104
|
+
}), /* @__PURE__ */ v(o, {
|
|
105
|
+
type: "button",
|
|
106
|
+
variant: "ghost",
|
|
107
|
+
size: "icon",
|
|
108
|
+
"aria-label": P.close,
|
|
109
|
+
onClick: $,
|
|
110
|
+
children: /* @__PURE__ */ v(x, { className: "ttw:size-4" })
|
|
111
|
+
})]
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ v(c, {
|
|
114
|
+
mode: S,
|
|
115
|
+
counterpartMode: "vendor",
|
|
116
|
+
values: J.values,
|
|
117
|
+
errors: J.errors,
|
|
118
|
+
stateOptions: G,
|
|
119
|
+
onChange: ie,
|
|
120
|
+
onAddressChange: (e) => {
|
|
121
|
+
H(!0), Z((t) => ({
|
|
198
122
|
...t,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
123
|
+
address: {
|
|
124
|
+
...t.address,
|
|
125
|
+
...e
|
|
126
|
+
}
|
|
127
|
+
}));
|
|
128
|
+
},
|
|
129
|
+
sections: {
|
|
130
|
+
entityType: !0,
|
|
131
|
+
profileHeading: !1,
|
|
132
|
+
title: !1,
|
|
133
|
+
taxId: !1,
|
|
134
|
+
address: "collapsible",
|
|
135
|
+
bankAccount: !1
|
|
136
|
+
},
|
|
137
|
+
sectionsToExpand: J.sectionsToExpand,
|
|
138
|
+
onAddressExpand: J.expandAddress,
|
|
139
|
+
labels: { businessNameLabel: P.nameLabel }
|
|
140
|
+
}),
|
|
141
|
+
/* @__PURE__ */ y("div", {
|
|
142
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
143
|
+
children: [/* @__PURE__ */ v("p", {
|
|
144
|
+
className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
|
|
145
|
+
children: P.paymentMethodsHeading
|
|
146
|
+
}), /* @__PURE__ */ v("p", {
|
|
147
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
148
|
+
children: P.paymentMethodsDescription
|
|
149
|
+
})]
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ y("div", {
|
|
152
|
+
className: "ttw:flex ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-border ttw:p-3",
|
|
153
|
+
children: [/* @__PURE__ */ v("span", {
|
|
154
|
+
className: "ttw:flex ttw:size-8 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-md ttw:bg-primary",
|
|
155
|
+
children: /* @__PURE__ */ v(b, {
|
|
156
|
+
"aria-hidden": !0,
|
|
157
|
+
className: "ttw:size-4 ttw:text-white"
|
|
158
|
+
})
|
|
159
|
+
}), /* @__PURE__ */ y("div", {
|
|
160
|
+
className: "ttw:flex ttw:flex-1 ttw:flex-col ttw:gap-3",
|
|
161
|
+
children: [/* @__PURE__ */ y("div", {
|
|
162
|
+
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
163
|
+
children: [/* @__PURE__ */ v("p", {
|
|
164
|
+
className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
165
|
+
children: P.achTitle
|
|
166
|
+
}), /* @__PURE__ */ v("p", {
|
|
167
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
168
|
+
children: P.achDescription
|
|
169
|
+
})]
|
|
170
|
+
}), z ? /* @__PURE__ */ y(te, { children: [/* @__PURE__ */ v(ee, {
|
|
171
|
+
idPrefix: "vendor-inline-ach",
|
|
172
|
+
values: J.values.bankAccount,
|
|
173
|
+
errors: J.errors?.bankAccount,
|
|
174
|
+
onChange: (e) => {
|
|
175
|
+
H(!0), Z((t) => ({
|
|
176
|
+
...t,
|
|
177
|
+
bankAccount: {
|
|
178
|
+
...t.bankAccount,
|
|
179
|
+
...e
|
|
180
|
+
}
|
|
181
|
+
}));
|
|
182
|
+
},
|
|
183
|
+
labels: {
|
|
184
|
+
accountHolderName: P.accountHolderNameLabel,
|
|
185
|
+
routingNumber: P.routingNumberLabel,
|
|
186
|
+
accountNumber: P.accountNumberLabel
|
|
187
|
+
}
|
|
188
|
+
}), /* @__PURE__ */ v("p", {
|
|
189
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
190
|
+
children: P.achHelp
|
|
191
|
+
})] }) : /* @__PURE__ */ y(o, {
|
|
192
|
+
type: "button",
|
|
193
|
+
variant: "link",
|
|
194
|
+
className: "ttw:w-fit ttw:px-0",
|
|
195
|
+
onClick: () => B(!0),
|
|
196
|
+
children: [/* @__PURE__ */ v(ne, { className: "ttw:size-4" }), P.addBankAccount]
|
|
197
|
+
})]
|
|
198
|
+
})]
|
|
199
|
+
}),
|
|
200
|
+
/* @__PURE__ */ y("div", {
|
|
201
|
+
className: "ttw:flex ttw:justify-end ttw:gap-2",
|
|
202
|
+
children: [/* @__PURE__ */ v(o, {
|
|
203
|
+
type: "button",
|
|
204
|
+
variant: "outline",
|
|
205
|
+
onClick: $,
|
|
206
|
+
children: P.cancel
|
|
207
|
+
}), /* @__PURE__ */ v(o, {
|
|
208
|
+
type: "button",
|
|
209
|
+
onClick: J.submit,
|
|
210
|
+
loading: J.isSubmitting,
|
|
211
|
+
disabled: J.isSubmitting,
|
|
212
|
+
children: P.save
|
|
213
|
+
})]
|
|
214
|
+
}),
|
|
215
|
+
/* @__PURE__ */ v(e, {
|
|
216
|
+
open: U,
|
|
217
|
+
onOpenChange: W,
|
|
218
|
+
children: /* @__PURE__ */ y(t, { children: [/* @__PURE__ */ y(i, { children: [/* @__PURE__ */ v(a, { children: P.discardConfirmTitle }), /* @__PURE__ */ v(n, { children: P.discardConfirmDescription })] }), /* @__PURE__ */ y(r, { children: [/* @__PURE__ */ v(o, {
|
|
219
|
+
type: "button",
|
|
220
|
+
variant: "outline",
|
|
221
|
+
onClick: () => W(!1),
|
|
222
|
+
children: P.keepEditingAction
|
|
223
|
+
}), /* @__PURE__ */ v(o, {
|
|
224
|
+
type: "button",
|
|
225
|
+
variant: "destructive",
|
|
226
|
+
onClick: () => {
|
|
227
|
+
W(!1), j();
|
|
228
|
+
},
|
|
229
|
+
children: P.discardChangesAction
|
|
230
|
+
})] })] })
|
|
231
|
+
})
|
|
232
|
+
]
|
|
233
|
+
});
|
|
221
234
|
}
|
|
222
235
|
//#endregion
|
|
223
|
-
export {
|
|
236
|
+
export { S as VendorInlineForm, S as default };
|
|
@@ -1,27 +1,16 @@
|
|
|
1
|
+
import { useEffect as e, useReducer as t } from "react";
|
|
1
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
cancelConfirmTitle: "Cancel duplicate bill?",
|
|
15
|
-
cancelConfirmDescription: "You can't undo this action.",
|
|
16
|
-
cancelConfirmButton: "Cancel this bill",
|
|
17
|
-
cancelConfirmBackButton: "Back",
|
|
18
|
-
deletedToast: "Duplicate removed",
|
|
19
|
-
cancelledToast: "Duplicate cancelled",
|
|
20
|
-
confirmedToast: "Duplicate confirmed",
|
|
21
|
-
dismissedToast: "Marked as “not a duplicate”.",
|
|
22
|
-
removedToast: "Duplicate removed",
|
|
23
|
-
verdictFailedToast: "Couldn't update this duplicate. Try again.",
|
|
24
|
-
allResolvedToast: "All possible duplicates resolved"
|
|
25
|
-
};
|
|
3
|
+
var n = 1e4;
|
|
4
|
+
function r(e) {
|
|
5
|
+
return !e || e.approval_policy_id || e.status !== "approve_in_progress" || !e.updated_at ? !0 : Date.now() - new Date(e.updated_at).getTime() >= n;
|
|
6
|
+
}
|
|
7
|
+
function i(i) {
|
|
8
|
+
let a = r(i), [, o] = t((e) => e + 1, 0);
|
|
9
|
+
return e(() => {
|
|
10
|
+
if (a || !i?.updated_at) return;
|
|
11
|
+
let e = n - (Date.now() - new Date(i.updated_at).getTime()), t = setTimeout(o, Math.max(e, 0));
|
|
12
|
+
return () => clearTimeout(t);
|
|
13
|
+
}, [a, i?.updated_at]), a;
|
|
14
|
+
}
|
|
26
15
|
//#endregion
|
|
27
|
-
export {
|
|
16
|
+
export { r as isApprovalPolicyAssignmentSettled, i as useIsApprovalPolicyAssignmentSettled };
|