@tesouro/embedded-components-react 0.5.286 → 0.5.289
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 +21 -1
- package/dist/index.css +6 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +39 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +102 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index29.js +267 -248
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +20 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index24.js +119 -88
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +62 -55
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +27 -22
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +1281 -1275
- 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/util/dist/lib/usStates.js +4 -1
- package/package.json +1 -1
package/dist/fixtures/index.d.ts
CHANGED
|
@@ -1174,15 +1174,35 @@ type DocumentRenderingSettings = {
|
|
|
1174
1174
|
* The document verification the applicant must complete before a KYC decision can be made.
|
|
1175
1175
|
*/
|
|
1176
1176
|
type DocumentVerificationOutput = {
|
|
1177
|
+
/**
|
|
1178
|
+
* The mobile number on the application, to offer as the number to text the link to.
|
|
1179
|
+
*/
|
|
1180
|
+
applicationPhoneNumber: string;
|
|
1177
1181
|
/**
|
|
1178
1182
|
* The provider's hosted capture link. Open it on a phone, or render it as a QR code for the applicant to scan.
|
|
1179
1183
|
*/
|
|
1180
1184
|
captureUrl: string;
|
|
1185
|
+
lastTextAttempt?: null | DocumentVerificationTextAttemptOutput;
|
|
1181
1186
|
/**
|
|
1182
|
-
* When the
|
|
1187
|
+
* When the link was last texted successfully (UTC). Null until a text goes out.
|
|
1183
1188
|
*/
|
|
1184
1189
|
smsSentAt?: null | string;
|
|
1185
1190
|
};
|
|
1191
|
+
/**
|
|
1192
|
+
* The applicant's most recent request to have the capture link texted, whether or not it went out.
|
|
1193
|
+
*/
|
|
1194
|
+
type DocumentVerificationTextAttemptOutput = {
|
|
1195
|
+
/**
|
|
1196
|
+
* When the text was requested (UTC).
|
|
1197
|
+
*/
|
|
1198
|
+
attemptedAt: string;
|
|
1199
|
+
/**
|
|
1200
|
+
* The last four digits of the number the text was requested for.
|
|
1201
|
+
*/
|
|
1202
|
+
phoneNumberLast4?: null | string;
|
|
1203
|
+
status: DocumentVerificationTextStatusDto;
|
|
1204
|
+
};
|
|
1205
|
+
type DocumentVerificationTextStatusDto = 'SENT' | 'FAILED';
|
|
1186
1206
|
/**
|
|
1187
1207
|
* Response DTO for embedded business entity data.
|
|
1188
1208
|
*/
|
package/dist/index.css
CHANGED
|
@@ -6482,6 +6482,12 @@
|
|
|
6482
6482
|
.ttw\:\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg {
|
|
6483
6483
|
width: calc(var(--ttw-spacing) * 5);
|
|
6484
6484
|
}
|
|
6485
|
+
.ttw\:\[\&_\[data-slot\=input\]\]\:bg-background [data-slot=input] {
|
|
6486
|
+
background-color: var(--ttw-background);
|
|
6487
|
+
}
|
|
6488
|
+
.ttw\:\[\&_\[data-slot\=select-trigger\]\]\:bg-background [data-slot=select-trigger] {
|
|
6489
|
+
background-color: var(--ttw-background);
|
|
6490
|
+
}
|
|
6485
6491
|
.ttw\:\[\&_li\]\:pb-2 li {
|
|
6486
6492
|
padding-bottom: calc(var(--ttw-spacing) * 2);
|
|
6487
6493
|
}
|
|
@@ -41,6 +41,7 @@ var g = {
|
|
|
41
41
|
searchFailed: "We could not load vendors. Try again.",
|
|
42
42
|
vendorDetailsFailed: "We could not load this vendor. Try again.",
|
|
43
43
|
pendingVendorDescription: "Will be created when submitted",
|
|
44
|
+
pendingVendorIncompleteDescription: "Add the missing vendor details before submitting",
|
|
44
45
|
bankAccountSaveFailed: "We could not save these payment instructions. Try again."
|
|
45
46
|
}, v = {
|
|
46
47
|
attachFailed: "We could not attach that file. Try again.",
|
|
@@ -155,11 +156,17 @@ function x(e) {
|
|
|
155
156
|
};
|
|
156
157
|
}
|
|
157
158
|
var S = {
|
|
158
|
-
createTitle: "New vendor",
|
|
159
|
+
createTitle: "New vendor details",
|
|
159
160
|
editTitle: "Edit vendor",
|
|
160
161
|
switchVendorFieldLabel: "Switch to a different vendor",
|
|
162
|
+
vendorFieldLabel: "Vendor",
|
|
163
|
+
newVendorBadge: "New vendor",
|
|
164
|
+
unmatchedVendorHelper: "We couldn't match this vendor to your list. Search to choose an existing vendor, or finish adding a new one below.",
|
|
165
|
+
resultsHeading: "Your vendors",
|
|
166
|
+
addAsNewVendor: (e) => `Add "${e}" as a new vendor`,
|
|
167
|
+
addAsNewVendorDescription: "Uses the details extracted from this bill",
|
|
168
|
+
fieldsNeedAttention: (e) => `${e} ${e === 1 ? "field needs" : "fields need"} attention`,
|
|
161
169
|
nameLabel: "Business name",
|
|
162
|
-
addAddress: "Add address (optional)",
|
|
163
170
|
cancel: "Cancel",
|
|
164
171
|
save: "Save",
|
|
165
172
|
cancelAriaLabel: "Cancel vendor",
|
|
@@ -1,35 +1,52 @@
|
|
|
1
|
+
import { isStateValid as e } from "../../../../shared/util/dist/lib/usStates.js";
|
|
2
|
+
import { emptyCounterpartFormValues as t, hasCounterpartFormErrors as n, validateCounterpartForm as r } from "../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
3
|
+
import "../../../../shared/counterpart-management/feature/dist/index.js";
|
|
1
4
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js
|
|
2
|
-
function
|
|
5
|
+
function i(e) {
|
|
3
6
|
return e?.trim() ?? "";
|
|
4
7
|
}
|
|
5
|
-
function
|
|
6
|
-
let n =
|
|
7
|
-
return n
|
|
8
|
+
function a(t) {
|
|
9
|
+
let n = i(t).toUpperCase();
|
|
10
|
+
return e(n) ? n : "";
|
|
8
11
|
}
|
|
9
|
-
function
|
|
10
|
-
let n = e
|
|
11
|
-
if (n || r) return {
|
|
12
|
-
accountHolderName:
|
|
12
|
+
function o(e) {
|
|
13
|
+
let t = i(e.bank_account?.account_holder_name), n = i(e.bank_account?.routing_number), r = i(e.bank_account?.account_number);
|
|
14
|
+
if (t || n || r) return {
|
|
15
|
+
accountHolderName: t || i(e.name),
|
|
13
16
|
routingNumber: n,
|
|
14
17
|
accountNumber: r
|
|
15
18
|
};
|
|
16
19
|
}
|
|
17
|
-
function
|
|
18
|
-
if (!
|
|
19
|
-
let
|
|
20
|
-
legalName: e
|
|
21
|
-
email: e
|
|
22
|
-
phone: e
|
|
20
|
+
function s(e) {
|
|
21
|
+
if (!e) return;
|
|
22
|
+
let t = {
|
|
23
|
+
legalName: i(e.name),
|
|
24
|
+
email: i(e.email),
|
|
25
|
+
phone: i(e.phone),
|
|
23
26
|
address: {
|
|
24
|
-
line1: e
|
|
25
|
-
line2: e
|
|
26
|
-
city: e
|
|
27
|
-
state:
|
|
28
|
-
postalCode: e
|
|
27
|
+
line1: i(e.address?.line1),
|
|
28
|
+
line2: i(e.address?.line2),
|
|
29
|
+
city: i(e.address?.city),
|
|
30
|
+
state: a(e.address?.state),
|
|
31
|
+
postalCode: i(e.address?.postal_code)
|
|
29
32
|
},
|
|
30
|
-
bankAccount:
|
|
33
|
+
bankAccount: o(e)
|
|
31
34
|
};
|
|
32
|
-
return
|
|
35
|
+
return t.legalName || t.email || t.phone || Object.values(t.address).some(Boolean) || t.bankAccount ? t : void 0;
|
|
36
|
+
}
|
|
37
|
+
function c(e) {
|
|
38
|
+
let a = s(e);
|
|
39
|
+
if (!a || i(e?.address?.country).toUpperCase() !== "US") return !1;
|
|
40
|
+
let o = t("organization", "vendor");
|
|
41
|
+
return !n(r({
|
|
42
|
+
...o,
|
|
43
|
+
...a,
|
|
44
|
+
bankAccount: {
|
|
45
|
+
accountHolderName: i(e?.bank_account?.account_holder_name),
|
|
46
|
+
routingNumber: i(e?.bank_account?.routing_number),
|
|
47
|
+
accountNumber: i(e?.bank_account?.account_number)
|
|
48
|
+
}
|
|
49
|
+
}, "create", void 0, "vendor"));
|
|
33
50
|
}
|
|
34
51
|
//#endregion
|
|
35
|
-
export {
|
|
52
|
+
export { s as buildVendorPrefill, c as canAutoCreateVendor };
|
|
@@ -5,88 +5,113 @@
|
|
|
5
5
|
import { Button as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
6
|
import { getStateOptions as t } from "../../../../shared/util/dist/lib/usStates.js";
|
|
7
7
|
import { AchFieldGroup as n } from "../../../../shared/counterpart-management/ui/dist/index5.js";
|
|
8
|
-
import { CounterpartFormFields as r,
|
|
8
|
+
import { CounterpartFormFields as r, countErrors as i, useFocusFirstInvalidField as a } from "../../../../shared/counterpart-management/ui/dist/index9.js";
|
|
9
9
|
import "../../../../shared/counterpart-management/ui/dist/index.js";
|
|
10
|
-
import { VendorSearchCombobox as
|
|
10
|
+
import { VendorSearchCombobox as o } from "../../ui/dist/index24.js";
|
|
11
11
|
import "../../ui/dist/index.js";
|
|
12
|
-
import { mergeVendorInlineFormLabels as
|
|
12
|
+
import { mergeVendorInlineFormLabels as s } from "./index25.js";
|
|
13
13
|
import "../../../../shared/counterpart-management/feature/dist/index.js";
|
|
14
|
-
import { useMemo as
|
|
15
|
-
import { jsx as
|
|
14
|
+
import { useMemo as c } from "react";
|
|
15
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
16
16
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js
|
|
17
|
-
function
|
|
18
|
-
let
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
17
|
+
function d({ mode: d, values: f, errors: p, onChange: m, onAddressChange: h, sectionsToExpand: g, onAddressExpand: _, onCancel: v, onSave: y, isSaving: b = !1, search: x, paymentInstructions: S, labels: C }) {
|
|
18
|
+
let w = c(() => s(C), [C]), T = c(() => t(), []), E = a(p ?? {}), D = i({
|
|
19
|
+
...p,
|
|
20
|
+
form: void 0,
|
|
21
|
+
bankAccount: void 0
|
|
22
|
+
}) + i(S?.errors), O = x?.query.trim() ?? "", k = f.entityType === "individual" ? `${f.firstName} ${f.lastName}`.trim() : f.legalName, A = x && d === "create" ? /* @__PURE__ */ l(o, {
|
|
23
|
+
...x,
|
|
24
|
+
selectedLabel: k,
|
|
25
|
+
badge: w.newVendorBadge,
|
|
26
|
+
helperText: w.unmatchedVendorHelper,
|
|
27
|
+
resultsHeading: w.resultsHeading,
|
|
28
|
+
addVendorDescription: w.addAsNewVendorDescription,
|
|
29
|
+
labels: {
|
|
30
|
+
fieldLabel: w.vendorFieldLabel,
|
|
31
|
+
addVendorAction: w.addAsNewVendor(O || k)
|
|
32
|
+
}
|
|
33
|
+
}) : null;
|
|
34
|
+
return /* @__PURE__ */ u("div", {
|
|
35
|
+
ref: E,
|
|
36
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
37
|
+
children: [A, /* @__PURE__ */ u("div", {
|
|
38
|
+
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",
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ u("div", {
|
|
41
|
+
className: "ttw:flex ttw:items-baseline ttw:justify-between ttw:gap-2",
|
|
42
|
+
children: [/* @__PURE__ */ l("p", {
|
|
43
|
+
className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
44
|
+
children: d === "edit" ? w.editTitle : w.createTitle
|
|
45
|
+
}), D > 0 ? /* @__PURE__ */ l("p", {
|
|
46
|
+
className: "ttw:text-sm ttw:text-destructive",
|
|
47
|
+
children: w.fieldsNeedAttention(D)
|
|
48
|
+
}) : null]
|
|
49
|
+
}),
|
|
50
|
+
x && d === "edit" ? /* @__PURE__ */ l(o, {
|
|
51
|
+
...x,
|
|
52
|
+
labels: { fieldLabel: w.switchVendorFieldLabel }
|
|
53
|
+
}) : null,
|
|
54
|
+
/* @__PURE__ */ l(r, {
|
|
55
|
+
mode: d,
|
|
56
|
+
counterpartMode: "vendor",
|
|
57
|
+
values: f,
|
|
58
|
+
errors: p,
|
|
59
|
+
stateOptions: T,
|
|
60
|
+
onChange: m,
|
|
61
|
+
onAddressChange: h,
|
|
62
|
+
sections: {
|
|
63
|
+
entityType: !0,
|
|
64
|
+
profileHeading: !1,
|
|
65
|
+
addressHeading: !1,
|
|
66
|
+
title: !1,
|
|
67
|
+
taxId: !1,
|
|
68
|
+
address: d !== "edit" || "collapsible",
|
|
69
|
+
bankAccount: !1
|
|
70
|
+
},
|
|
71
|
+
sectionsToExpand: g,
|
|
72
|
+
onAddressExpand: _,
|
|
73
|
+
labels: { businessNameLabel: w.nameLabel }
|
|
74
|
+
}),
|
|
75
|
+
S ? /* @__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: w.paymentInstructionsHeading
|
|
82
|
+
}), /* @__PURE__ */ l("p", {
|
|
83
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
84
|
+
children: S.isExtracted ? w.paymentInstructionsExtracted : w.paymentInstructionsDescription
|
|
85
|
+
})]
|
|
86
|
+
}), /* @__PURE__ */ l(n, {
|
|
87
|
+
idPrefix: "vendor-inline-ach",
|
|
88
|
+
values: S.values,
|
|
89
|
+
errors: S.errors,
|
|
90
|
+
onChange: S.onChange,
|
|
91
|
+
labels: w.ach
|
|
61
92
|
})]
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
loading: y,
|
|
84
|
-
disabled: y,
|
|
85
|
-
children: C.save
|
|
86
|
-
}) : null]
|
|
87
|
-
})
|
|
88
|
-
]
|
|
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: v,
|
|
100
|
+
"aria-label": w.cancelAriaLabel,
|
|
101
|
+
disabled: b,
|
|
102
|
+
children: w.cancel
|
|
103
|
+
}), y ? /* @__PURE__ */ l(e, {
|
|
104
|
+
type: "button",
|
|
105
|
+
onClick: y,
|
|
106
|
+
"aria-label": w.saveAriaLabel,
|
|
107
|
+
loading: b,
|
|
108
|
+
disabled: b,
|
|
109
|
+
children: w.save
|
|
110
|
+
}) : null]
|
|
111
|
+
})
|
|
112
|
+
]
|
|
113
|
+
})]
|
|
89
114
|
});
|
|
90
115
|
}
|
|
91
116
|
//#endregion
|
|
92
|
-
export {
|
|
117
|
+
export { d as VendorInlineForm, d as default };
|