@tesouro/embedded-components-react 0.11.129 → 0.11.132
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/fixtures/index.d.ts +4 -4
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +64 -69
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index21.js +20 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index22.js +14 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index23.js +31 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index24.js +26 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index25.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index10.js +35 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index11.js +57 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index12.js +6 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index13.js +20 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index14.js +97 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index15.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index16.js +10 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index17.js +7 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index18.js +8 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index19.js +24 -139
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index20.js +24 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index21.js +14 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +130 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +17 -100
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +21 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +41 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +98 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +82 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +3 -193
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index29.js +57 -81
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index30.js +110 -66
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +190 -111
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +71 -456
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +69 -114
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +113 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +458 -79
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +116 -79
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +10 -256
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +78 -36
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +73 -236
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +256 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +43 -516
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +245 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +20 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +497 -211
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +40 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +235 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index49.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index50.js +64 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index51.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index6.js +4 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index7.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index8.js +8 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index9.js +18 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index3.js +44 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +1 -1
- 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/ui/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ConsentBlock/ConsentBlock.js +21 -12
- package/package.json +1 -1
|
@@ -1,119 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { toast as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import "../../../../shared/ui/dist/index.js";
|
|
7
|
-
import { useUpdatePayableMutation as t } from "../../data-access/dist/index16.js";
|
|
8
|
-
import "../../data-access/dist/index.js";
|
|
9
|
-
import { cloneElement as n, isValidElement as r, useCallback as i, useEffect as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
1
|
+
import { isStateValid as e } from "../../../../shared/util/dist/lib/usStates.js";
|
|
2
|
+
import "../../../../shared/util/dist/index.js";
|
|
3
|
+
import { emptyCounterpartFormValues as t, hasCounterpartFormErrors as n, validateCounterpartForm as r } from "../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
4
|
+
import "../../../../shared/counterpart-management/feature/dist/index.js";
|
|
10
5
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
y(!1);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
})();
|
|
58
|
-
b.current = t;
|
|
59
|
-
try {
|
|
60
|
-
await t;
|
|
61
|
-
} finally {
|
|
62
|
-
b.current = void 0;
|
|
6
|
+
function i(e) {
|
|
7
|
+
return e?.trim() ?? "";
|
|
8
|
+
}
|
|
9
|
+
function a(t) {
|
|
10
|
+
let n = i(t).toUpperCase();
|
|
11
|
+
return e(n) ? n : "";
|
|
12
|
+
}
|
|
13
|
+
function o(e) {
|
|
14
|
+
let t = i(e.bank_account?.account_holder_name), n = i(e.bank_account?.routing_number), r = i(e.bank_account?.account_number);
|
|
15
|
+
if (t || n || r) return {
|
|
16
|
+
accountHolderName: t || i(e.name),
|
|
17
|
+
routingNumber: n,
|
|
18
|
+
accountNumber: r
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function s(e) {
|
|
22
|
+
if (!e) return;
|
|
23
|
+
let t = {
|
|
24
|
+
legalName: i(e.name),
|
|
25
|
+
email: i(e.email),
|
|
26
|
+
phone: i(e.phone),
|
|
27
|
+
address: {
|
|
28
|
+
line1: i(e.address?.line1),
|
|
29
|
+
line2: i(e.address?.line2),
|
|
30
|
+
city: i(e.address?.city),
|
|
31
|
+
state: a(e.address?.state),
|
|
32
|
+
postalCode: i(e.address?.postal_code)
|
|
33
|
+
},
|
|
34
|
+
bankAccount: o(e)
|
|
35
|
+
};
|
|
36
|
+
return t.legalName || t.email || t.phone || Object.values(t.address).some(Boolean) || t.bankAccount ? t : void 0;
|
|
37
|
+
}
|
|
38
|
+
function c(e) {
|
|
39
|
+
let a = s(e);
|
|
40
|
+
if (!a || i(e?.address?.country).toUpperCase() !== "US") return !1;
|
|
41
|
+
let o = t("organization", "vendor");
|
|
42
|
+
return !n(r({
|
|
43
|
+
...o,
|
|
44
|
+
...a,
|
|
45
|
+
bankAccount: {
|
|
46
|
+
accountHolderName: i(e?.bank_account?.account_holder_name),
|
|
47
|
+
routingNumber: i(e?.bank_account?.routing_number),
|
|
48
|
+
accountNumber: i(e?.bank_account?.account_number)
|
|
63
49
|
}
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
onSave: x,
|
|
86
|
-
isSaving: v
|
|
87
|
-
};
|
|
88
|
-
return {
|
|
89
|
-
...l,
|
|
90
|
-
paymentInstructions: {
|
|
91
|
-
...l.paymentInstructions,
|
|
92
|
-
...e
|
|
93
|
-
},
|
|
94
|
-
paymentInstructionsEditor: l.paymentInstructionsEditor && {
|
|
95
|
-
...l.paymentInstructionsEditor,
|
|
96
|
-
...e
|
|
97
|
-
}
|
|
98
|
-
};
|
|
50
|
+
}, void 0, "vendor"));
|
|
51
|
+
}
|
|
52
|
+
function l(e, t, n) {
|
|
53
|
+
let r = (e) => i(e) || void 0, { address: a } = e;
|
|
54
|
+
return {
|
|
55
|
+
...n,
|
|
56
|
+
name: r(e.entityType === "individual" ? `${e.firstName} ${e.lastName}` : e.legalName),
|
|
57
|
+
email: r(e.email),
|
|
58
|
+
phone: r(e.phone),
|
|
59
|
+
address: {
|
|
60
|
+
...n?.address,
|
|
61
|
+
line1: r(a.line1),
|
|
62
|
+
line2: r(a.line2),
|
|
63
|
+
city: r(a.city),
|
|
64
|
+
state: r(a.state),
|
|
65
|
+
postal_code: r(a.postalCode)
|
|
66
|
+
},
|
|
67
|
+
bank_account: {
|
|
68
|
+
account_holder_name: r(t.accountHolderName),
|
|
69
|
+
routing_number: r(t.routingNumber),
|
|
70
|
+
account_number: r(t.accountNumber)
|
|
99
71
|
}
|
|
100
|
-
return l;
|
|
101
|
-
}, [
|
|
102
|
-
p,
|
|
103
|
-
v,
|
|
104
|
-
x,
|
|
105
|
-
l
|
|
106
|
-
]);
|
|
107
|
-
return a(() => {
|
|
108
|
-
m && l.isEditingPayTo && !p && l.discardPayToEdits();
|
|
109
|
-
}, [
|
|
110
|
-
p,
|
|
111
|
-
m,
|
|
112
|
-
l.discardPayToEdits,
|
|
113
|
-
l.isEditingPayTo
|
|
114
|
-
]), {
|
|
115
|
-
vendorWithInlineSave: S,
|
|
116
|
-
isSavingPayToEdits: v
|
|
117
72
|
};
|
|
118
73
|
}
|
|
119
|
-
export { l as
|
|
74
|
+
export { s as buildVendorPrefill, c as canAutoCreateVendor, l as toCounterpartRawData };
|
|
@@ -1,11 +1,116 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
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 "../../../../shared/util/dist/index.js";
|
|
8
|
+
import { AchFieldGroup as n } from "../../../../shared/counterpart-management/ui/dist/index5.js";
|
|
9
|
+
import { CounterpartFormFields as r, countErrors as i, useFocusFirstInvalidField as a } from "../../../../shared/counterpart-management/ui/dist/index10.js";
|
|
10
|
+
import "../../../../shared/counterpart-management/ui/dist/index.js";
|
|
11
|
+
import { VendorSearchCombobox as o } from "../../ui/dist/index24.js";
|
|
12
|
+
import "../../ui/dist/index.js";
|
|
13
|
+
import { mergeVendorInlineFormLabels as s } from "./index31.js";
|
|
14
|
+
import "../../../../shared/counterpart-management/feature/dist/index.js";
|
|
15
|
+
import { useMemo as c } from "react";
|
|
16
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
1
17
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
18
|
+
function d({ mode: d, values: f, errors: p, onChange: m, onAddressChange: h, onCancel: g, onSave: _, isSaving: v = !1, search: y, paymentInstructions: b, labels: x }) {
|
|
19
|
+
let S = c(() => s(x), [x]), C = c(() => t(), []), w = a(p ?? {}), T = i({
|
|
20
|
+
...p,
|
|
21
|
+
form: void 0,
|
|
22
|
+
bankAccount: void 0
|
|
23
|
+
}) + i(b?.errors), E = y?.query.trim() ?? "", D = f.entityType === "individual" ? `${f.firstName} ${f.lastName}`.trim() : f.legalName, O = y && d === "create" ? /* @__PURE__ */ l(o, {
|
|
24
|
+
...y,
|
|
25
|
+
onAddVendor: E && E !== D.trim() ? y.onAddVendor : void 0,
|
|
26
|
+
selectedLabel: D,
|
|
27
|
+
badge: S.newVendorBadge,
|
|
28
|
+
helperText: S.unmatchedVendorHelper,
|
|
29
|
+
resultsHeading: S.resultsHeading,
|
|
30
|
+
addVendorDescription: S.addAsNewVendorDescription,
|
|
31
|
+
labels: {
|
|
32
|
+
fieldLabel: S.vendorFieldLabel,
|
|
33
|
+
addVendorAction: S.addAsNewVendor(E)
|
|
34
|
+
}
|
|
35
|
+
}) : null;
|
|
36
|
+
return /* @__PURE__ */ u("div", {
|
|
37
|
+
ref: w,
|
|
38
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
39
|
+
children: [O, /* @__PURE__ */ u("div", {
|
|
40
|
+
className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:rounded-lg ttw:border ttw:border-primary ttw:bg-surface-subtle ttw:p-6 ttw:[&_[data-slot=input]]:bg-background ttw:[&_[data-slot=select-trigger]]:bg-background",
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ u("div", {
|
|
43
|
+
className: "ttw:flex ttw:items-baseline ttw:justify-between ttw:gap-2",
|
|
44
|
+
children: [/* @__PURE__ */ l("p", {
|
|
45
|
+
className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
46
|
+
children: d === "edit" ? S.editTitle : S.createTitle
|
|
47
|
+
}), T > 0 ? /* @__PURE__ */ l("p", {
|
|
48
|
+
className: "ttw:text-sm ttw:text-destructive",
|
|
49
|
+
children: S.fieldsNeedAttention(T)
|
|
50
|
+
}) : null]
|
|
51
|
+
}),
|
|
52
|
+
y && d === "edit" ? /* @__PURE__ */ l(o, {
|
|
53
|
+
...y,
|
|
54
|
+
labels: { fieldLabel: S.switchVendorFieldLabel }
|
|
55
|
+
}) : null,
|
|
56
|
+
/* @__PURE__ */ l(r, {
|
|
57
|
+
mode: d,
|
|
58
|
+
counterpartMode: "vendor",
|
|
59
|
+
values: f,
|
|
60
|
+
errors: p,
|
|
61
|
+
stateOptions: C,
|
|
62
|
+
onChange: m,
|
|
63
|
+
onAddressChange: h,
|
|
64
|
+
sections: {
|
|
65
|
+
entityType: !0,
|
|
66
|
+
profileHeading: !1,
|
|
67
|
+
addressHeading: !1,
|
|
68
|
+
title: !1,
|
|
69
|
+
taxId: !1,
|
|
70
|
+
address: !0,
|
|
71
|
+
bankAccount: !1
|
|
72
|
+
},
|
|
73
|
+
labels: { businessNameLabel: S.nameLabel }
|
|
74
|
+
}),
|
|
75
|
+
b ? /* @__PURE__ */ u("div", {
|
|
76
|
+
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
77
|
+
children: [/* @__PURE__ */ u("div", {
|
|
78
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
79
|
+
children: [/* @__PURE__ */ l("p", {
|
|
80
|
+
className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
|
|
81
|
+
children: S.paymentInstructionsHeading
|
|
82
|
+
}), /* @__PURE__ */ l("p", {
|
|
83
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
84
|
+
children: b.isExtracted ? S.paymentInstructionsExtracted : S.paymentInstructionsDescription
|
|
85
|
+
})]
|
|
86
|
+
}), /* @__PURE__ */ l(n, {
|
|
87
|
+
idPrefix: "vendor-inline-ach",
|
|
88
|
+
values: b.values,
|
|
89
|
+
errors: b.errors,
|
|
90
|
+
onChange: b.onChange,
|
|
91
|
+
labels: S.ach
|
|
92
|
+
})]
|
|
93
|
+
}) : null,
|
|
94
|
+
/* @__PURE__ */ u("div", {
|
|
95
|
+
className: "ttw:flex ttw:justify-end ttw:gap-2",
|
|
96
|
+
children: [/* @__PURE__ */ l(e, {
|
|
97
|
+
type: "button",
|
|
98
|
+
variant: "outline",
|
|
99
|
+
onClick: g,
|
|
100
|
+
"aria-label": S.cancelAriaLabel,
|
|
101
|
+
disabled: v,
|
|
102
|
+
children: S.cancel
|
|
103
|
+
}), _ ? /* @__PURE__ */ l(e, {
|
|
104
|
+
type: "button",
|
|
105
|
+
onClick: _,
|
|
106
|
+
"aria-label": S.saveAriaLabel,
|
|
107
|
+
loading: v,
|
|
108
|
+
disabled: v,
|
|
109
|
+
children: S.save
|
|
110
|
+
}) : null]
|
|
111
|
+
})
|
|
112
|
+
]
|
|
113
|
+
})]
|
|
9
114
|
});
|
|
10
115
|
}
|
|
11
|
-
export {
|
|
116
|
+
export { d as VendorInlineForm, d as default };
|