@tesouro/embedded-components-react 0.5.76 → 0.5.77
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/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +67 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +23 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +58 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +251 -222
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +206 -202
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { ACH_FIELD_GROUP_LABELS_EN as e } from "../../../shared/counterpart-management/ui/dist/index2.js";
|
|
2
|
+
import "../../../shared/counterpart-management/ui/dist/index.js";
|
|
3
|
+
import { DISCARD_CHANGES_DIALOG_LABELS_EN as t } from "../../ui/dist/index66.js";
|
|
4
|
+
import { BILL_REJECTED_BANNER_LABELS_EN as n } from "../../ui/dist/index74.js";
|
|
5
|
+
import { UNSAVED_BILL_DIALOG_LABELS_EN as r } from "../../ui/dist/index111.js";
|
|
4
6
|
import "../../ui/dist/index.js";
|
|
5
|
-
import { PAY_BILL_FLOW_LABELS_EN as
|
|
6
|
-
import { MARK_AS_PAID_FLOW_LABELS_EN as
|
|
7
|
+
import { PAY_BILL_FLOW_LABELS_EN as i, mergePayBillFlowLabels as a } from "./index25.js";
|
|
8
|
+
import { MARK_AS_PAID_FLOW_LABELS_EN as o, mergeMarkAsPaidFlowLabels as s } from "./index15.js";
|
|
7
9
|
import "./index18.js";
|
|
8
|
-
import { APPROVAL_POLICY_RULE_COPY_EN as
|
|
9
|
-
import { AWAITING_APPROVAL_LABEL_EN as
|
|
10
|
-
import { PAYABLE_AUDIT_HISTORY_LABELS_EN as
|
|
11
|
-
import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as
|
|
10
|
+
import { APPROVAL_POLICY_RULE_COPY_EN as c } from "./index29.js";
|
|
11
|
+
import { AWAITING_APPROVAL_LABEL_EN as l, AWAITING_APPROVAL_UNKNOWN_LABEL_EN as u, BILL_DETAIL_ACTIONS_LABELS_EN as d, PAYMENT_HISTORY_LABELS_EN as f, SCHEDULED_STATUS_BADGE_LABEL_EN as p, SCHEDULED_SUMMARY_LABEL_EN as m, mergeBillDetailActionsLabels as h, mergePaymentHistoryMethodLabels as g } from "./index45.js";
|
|
12
|
+
import { PAYABLE_AUDIT_HISTORY_LABELS_EN as _ } from "./index46.js";
|
|
13
|
+
import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as v } from "./index47.js";
|
|
12
14
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js
|
|
13
|
-
var
|
|
15
|
+
var y = {
|
|
14
16
|
unmappedValidationError: (e, t) => `${e}: ${t}`,
|
|
15
17
|
unknownValidationField: "(unknown field)",
|
|
16
18
|
requiredField: "This field is required.",
|
|
@@ -32,7 +34,7 @@ var v = {
|
|
|
32
34
|
totalNotGreaterThanZero: "Total amount must be greater than $0.",
|
|
33
35
|
poNumberTooLong: "PO number must be 255 characters or fewer.",
|
|
34
36
|
dueBeforeInvoiceDate: "Due date must be on or after the invoice date."
|
|
35
|
-
},
|
|
37
|
+
}, b = {
|
|
36
38
|
paymentInstructionsValue: (e) => `Account ending in ${e}`,
|
|
37
39
|
noMethod: "No payment method on file",
|
|
38
40
|
paymentMethodLoading: "Loading payment method...",
|
|
@@ -41,14 +43,14 @@ var v = {
|
|
|
41
43
|
vendorDetailsFailed: "We could not load this vendor. Try again.",
|
|
42
44
|
pendingVendorDescription: "Will be created when submitted",
|
|
43
45
|
bankAccountSaveFailed: "We could not save these payment instructions. Try again."
|
|
44
|
-
},
|
|
46
|
+
}, x = {
|
|
45
47
|
attachFailed: "We could not attach that file. Try again.",
|
|
46
48
|
deleteFailed: "We could not remove that document. Try again.",
|
|
47
49
|
noDocument: "No document attached to this bill.",
|
|
48
50
|
pendingDeletionNotice: "This document will be removed when you save this bill.",
|
|
49
|
-
preview:
|
|
50
|
-
},
|
|
51
|
-
...
|
|
51
|
+
preview: v
|
|
52
|
+
}, S = {
|
|
53
|
+
...f,
|
|
52
54
|
notProvided: "Not provided",
|
|
53
55
|
paymentInstructionsValue: (e) => `Account ending in ${e}`,
|
|
54
56
|
paymentInstructionsNotSet: "Not set",
|
|
@@ -69,24 +71,24 @@ var v = {
|
|
|
69
71
|
rejectedByOn: (e, t) => `Rejected by ${e} on ${t}`,
|
|
70
72
|
rejectedOn: (e) => `Rejected on ${e}`,
|
|
71
73
|
rejectionMessage: (e) => `"${e}"`
|
|
72
|
-
},
|
|
74
|
+
}, C = {
|
|
73
75
|
newTitle: "New bill",
|
|
74
76
|
extractedTitle: (e) => `Bill from ${e}`,
|
|
75
77
|
viewTitle: (e) => `Bill from ${e}`,
|
|
76
78
|
readOnlyTitle: "Bill details",
|
|
77
79
|
addedOn: (e) => `Added on ${e}`,
|
|
78
|
-
unsavedChanges:
|
|
79
|
-
discardChanges:
|
|
80
|
-
scheduledSummary:
|
|
81
|
-
scheduledStatusBadge:
|
|
82
|
-
awaitingApprovalNotice:
|
|
83
|
-
awaitingApprovalUnknownNotice:
|
|
84
|
-
actions:
|
|
85
|
-
detail:
|
|
86
|
-
history:
|
|
87
|
-
payBill:
|
|
88
|
-
markAsPaid:
|
|
89
|
-
approvalPolicyCopy:
|
|
80
|
+
unsavedChanges: r,
|
|
81
|
+
discardChanges: t,
|
|
82
|
+
scheduledSummary: m,
|
|
83
|
+
scheduledStatusBadge: p,
|
|
84
|
+
awaitingApprovalNotice: l,
|
|
85
|
+
awaitingApprovalUnknownNotice: u,
|
|
86
|
+
actions: d,
|
|
87
|
+
detail: S,
|
|
88
|
+
history: _,
|
|
89
|
+
payBill: i,
|
|
90
|
+
markAsPaid: o,
|
|
91
|
+
approvalPolicyCopy: c,
|
|
90
92
|
deleteDraft: {
|
|
91
93
|
menuItem: "Delete draft",
|
|
92
94
|
dialog: {
|
|
@@ -101,50 +103,50 @@ var v = {
|
|
|
101
103
|
noAccess: "You don't have access to GL codes",
|
|
102
104
|
empty: "No GL codes set up yet"
|
|
103
105
|
},
|
|
104
|
-
rejectedBanner:
|
|
106
|
+
rejectedBanner: n
|
|
105
107
|
};
|
|
106
|
-
function
|
|
108
|
+
function w(e) {
|
|
107
109
|
return {
|
|
108
|
-
...
|
|
110
|
+
...C,
|
|
109
111
|
...e,
|
|
110
|
-
actions:
|
|
112
|
+
actions: h(e?.actions),
|
|
111
113
|
detail: {
|
|
112
|
-
...
|
|
114
|
+
...C.detail,
|
|
113
115
|
...e?.detail,
|
|
114
|
-
paymentHistoryMethodLabels:
|
|
116
|
+
paymentHistoryMethodLabels: g(e?.detail?.paymentHistoryMethodLabels)
|
|
115
117
|
},
|
|
116
118
|
history: {
|
|
117
|
-
...
|
|
119
|
+
...C.history,
|
|
118
120
|
...e?.history
|
|
119
121
|
},
|
|
120
|
-
payBill:
|
|
121
|
-
markAsPaid:
|
|
122
|
+
payBill: a(e?.payBill),
|
|
123
|
+
markAsPaid: s(e?.markAsPaid),
|
|
122
124
|
lineItemsGlCodeUnavailable: {
|
|
123
|
-
...
|
|
125
|
+
...C.lineItemsGlCodeUnavailable,
|
|
124
126
|
...e?.lineItemsGlCodeUnavailable
|
|
125
127
|
},
|
|
126
128
|
unsavedChanges: {
|
|
127
|
-
...
|
|
129
|
+
...C.unsavedChanges,
|
|
128
130
|
...e?.unsavedChanges
|
|
129
131
|
},
|
|
130
132
|
discardChanges: {
|
|
131
|
-
...
|
|
133
|
+
...C.discardChanges,
|
|
132
134
|
...e?.discardChanges
|
|
133
135
|
},
|
|
134
136
|
rejectedBanner: {
|
|
135
|
-
...
|
|
137
|
+
...C.rejectedBanner,
|
|
136
138
|
...e?.rejectedBanner
|
|
137
139
|
},
|
|
138
140
|
approvalPolicyCopy: {
|
|
139
|
-
...
|
|
141
|
+
...C.approvalPolicyCopy,
|
|
140
142
|
...e?.approvalPolicyCopy
|
|
141
143
|
},
|
|
142
144
|
deleteDraft: {
|
|
143
|
-
...
|
|
145
|
+
...C.deleteDraft,
|
|
144
146
|
...e?.deleteDraft,
|
|
145
147
|
dialog: (() => {
|
|
146
148
|
let t = {
|
|
147
|
-
...
|
|
149
|
+
...C.deleteDraft.dialog,
|
|
148
150
|
...e?.deleteDraft?.dialog
|
|
149
151
|
};
|
|
150
152
|
return delete t.reason, t;
|
|
@@ -152,7 +154,7 @@ function C(e) {
|
|
|
152
154
|
}
|
|
153
155
|
};
|
|
154
156
|
}
|
|
155
|
-
var
|
|
157
|
+
var T = {
|
|
156
158
|
createTitle: "New vendor",
|
|
157
159
|
editTitle: "Edit vendor",
|
|
158
160
|
switchVendorFieldLabel: "Switch to a different vendor",
|
|
@@ -161,7 +163,25 @@ var w = {
|
|
|
161
163
|
cancel: "Cancel",
|
|
162
164
|
save: "Save",
|
|
163
165
|
cancelAriaLabel: "Cancel vendor",
|
|
164
|
-
saveAriaLabel: "Save vendor"
|
|
166
|
+
saveAriaLabel: "Save vendor",
|
|
167
|
+
paymentInstructionsHeading: "Payment instructions",
|
|
168
|
+
paymentInstructionsDescription: "How and where will the money be sent. This information is required to send a payment.",
|
|
169
|
+
paymentInstructionsExtracted: "We read these from the bill. Check them before saving.",
|
|
170
|
+
ach: e
|
|
165
171
|
};
|
|
172
|
+
function E(e) {
|
|
173
|
+
return {
|
|
174
|
+
...T,
|
|
175
|
+
...e,
|
|
176
|
+
ach: {
|
|
177
|
+
...T.ach,
|
|
178
|
+
...e?.ach,
|
|
179
|
+
fieldMarkers: {
|
|
180
|
+
...T.ach.fieldMarkers,
|
|
181
|
+
...e?.ach?.fieldMarkers
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
}
|
|
166
186
|
//#endregion
|
|
167
|
-
export {
|
|
187
|
+
export { y as BILL_CREATE_MESSAGE_LABELS_EN, C as BILL_CREATE_SCREEN_LABELS_EN, S as BILL_DETAIL_VIEW_LABELS_EN, x as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, T as VENDOR_INLINE_FORM_LABELS_EN, b as VENDOR_SECTION_PROPS_LABELS_EN, w as mergeBillCreateScreenCopy, E as mergeVendorInlineFormLabels };
|
|
@@ -6,21 +6,30 @@ function t(t) {
|
|
|
6
6
|
let n = e(t);
|
|
7
7
|
return n.length === 2 ? n.toUpperCase() : "";
|
|
8
8
|
}
|
|
9
|
-
function n(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
function n(t) {
|
|
10
|
+
let n = e(t.bank_account?.routing_number), r = e(t.bank_account?.account_number);
|
|
11
|
+
if (!(!n && !r)) return {
|
|
12
|
+
accountHolderName: e(t.bank_account?.account_holder_name) || e(t.name),
|
|
13
|
+
routingNumber: n,
|
|
14
|
+
accountNumber: r
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function r(r) {
|
|
18
|
+
if (!r) return;
|
|
19
|
+
let i = {
|
|
20
|
+
legalName: e(r.name),
|
|
21
|
+
email: e(r.email),
|
|
22
|
+
phone: e(r.phone),
|
|
15
23
|
address: {
|
|
16
|
-
line1: e(
|
|
17
|
-
line2: e(
|
|
18
|
-
city: e(
|
|
19
|
-
state: t(
|
|
20
|
-
postalCode: e(
|
|
21
|
-
}
|
|
24
|
+
line1: e(r.address?.line1),
|
|
25
|
+
line2: e(r.address?.line2),
|
|
26
|
+
city: e(r.address?.city),
|
|
27
|
+
state: t(r.address?.state),
|
|
28
|
+
postalCode: e(r.address?.postal_code)
|
|
29
|
+
},
|
|
30
|
+
bankAccount: n(r)
|
|
22
31
|
};
|
|
23
|
-
return
|
|
32
|
+
return i.legalName || i.email || i.phone || Object.values(i.address).some(Boolean) || i.bankAccount ? i : void 0;
|
|
24
33
|
}
|
|
25
34
|
//#endregion
|
|
26
|
-
export {
|
|
35
|
+
export { r as buildVendorPrefill };
|
|
@@ -4,39 +4,38 @@
|
|
|
4
4
|
"use client";
|
|
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
|
-
import {
|
|
8
|
-
import {
|
|
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/index50.js";
|
|
9
11
|
import "../../ui/dist/index.js";
|
|
10
12
|
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
11
|
-
import {
|
|
12
|
-
import { useMemo as
|
|
13
|
-
import { jsx as
|
|
13
|
+
import { mergeVendorInlineFormLabels as o } from "./index48.js";
|
|
14
|
+
import { useMemo as s } from "react";
|
|
15
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
14
16
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js
|
|
15
|
-
function
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, S = o(() => t(), []), C = r(d ?? {});
|
|
20
|
-
return /* @__PURE__ */ c("div", {
|
|
21
|
-
ref: C,
|
|
17
|
+
function u({ mode: u, values: d, errors: f, onChange: p, onAddressChange: m, sectionsToExpand: h, onAddressExpand: g, onCancel: _, onSave: v, isSaving: y = !1, search: b, paymentInstructions: x, labels: S }) {
|
|
18
|
+
let C = s(() => o(S), [S]), w = s(() => t(), []), T = i(f ?? {});
|
|
19
|
+
return /* @__PURE__ */ l("div", {
|
|
20
|
+
ref: T,
|
|
22
21
|
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
|
|
23
22
|
children: [
|
|
24
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ c("p", {
|
|
25
24
|
className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
26
|
-
children:
|
|
25
|
+
children: u === "edit" ? C.editTitle : C.createTitle
|
|
27
26
|
}),
|
|
28
|
-
|
|
29
|
-
...
|
|
30
|
-
labels: { fieldLabel:
|
|
27
|
+
u === "edit" && b ? /* @__PURE__ */ c(a, {
|
|
28
|
+
...b,
|
|
29
|
+
labels: { fieldLabel: C.switchVendorFieldLabel }
|
|
31
30
|
}) : null,
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
mode:
|
|
31
|
+
/* @__PURE__ */ c(r, {
|
|
32
|
+
mode: u,
|
|
34
33
|
counterpartMode: "vendor",
|
|
35
|
-
values:
|
|
36
|
-
errors:
|
|
37
|
-
stateOptions:
|
|
38
|
-
onChange:
|
|
39
|
-
onAddressChange:
|
|
34
|
+
values: d,
|
|
35
|
+
errors: f,
|
|
36
|
+
stateOptions: w,
|
|
37
|
+
onChange: p,
|
|
38
|
+
onAddressChange: m,
|
|
40
39
|
sections: {
|
|
41
40
|
entityType: !0,
|
|
42
41
|
profileHeading: !1,
|
|
@@ -45,30 +44,49 @@ function l({ mode: l, values: u, errors: d, onChange: f, onAddressChange: p, sec
|
|
|
45
44
|
address: "collapsible",
|
|
46
45
|
bankAccount: !1
|
|
47
46
|
},
|
|
48
|
-
sectionsToExpand:
|
|
49
|
-
onAddressExpand:
|
|
50
|
-
labels: { businessNameLabel:
|
|
47
|
+
sectionsToExpand: h,
|
|
48
|
+
onAddressExpand: g,
|
|
49
|
+
labels: { businessNameLabel: C.nameLabel }
|
|
51
50
|
}),
|
|
52
|
-
/* @__PURE__ */
|
|
51
|
+
x ? /* @__PURE__ */ l("div", {
|
|
52
|
+
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
53
|
+
children: [/* @__PURE__ */ l("div", {
|
|
54
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
55
|
+
children: [/* @__PURE__ */ c("p", {
|
|
56
|
+
className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
|
|
57
|
+
children: C.paymentInstructionsHeading
|
|
58
|
+
}), /* @__PURE__ */ c("p", {
|
|
59
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
60
|
+
children: x.isExtracted ? C.paymentInstructionsExtracted : C.paymentInstructionsDescription
|
|
61
|
+
})]
|
|
62
|
+
}), /* @__PURE__ */ c(n, {
|
|
63
|
+
idPrefix: "vendor-inline-ach",
|
|
64
|
+
values: x.values,
|
|
65
|
+
errors: x.errors,
|
|
66
|
+
onChange: x.onChange,
|
|
67
|
+
labels: C.ach
|
|
68
|
+
})]
|
|
69
|
+
}) : null,
|
|
70
|
+
/* @__PURE__ */ l("div", {
|
|
53
71
|
className: "ttw:flex ttw:justify-end ttw:gap-2",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
72
|
+
children: [/* @__PURE__ */ c(e, {
|
|
55
73
|
type: "button",
|
|
56
74
|
variant: "outline",
|
|
57
|
-
onClick: g,
|
|
58
|
-
"aria-label": x.cancelAriaLabel,
|
|
59
|
-
disabled: v,
|
|
60
|
-
children: x.cancel
|
|
61
|
-
}), _ ? /* @__PURE__ */ s(e, {
|
|
62
|
-
type: "button",
|
|
63
75
|
onClick: _,
|
|
64
|
-
"aria-label":
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
"aria-label": C.cancelAriaLabel,
|
|
77
|
+
disabled: y,
|
|
78
|
+
children: C.cancel
|
|
79
|
+
}), v ? /* @__PURE__ */ c(e, {
|
|
80
|
+
type: "button",
|
|
81
|
+
onClick: v,
|
|
82
|
+
"aria-label": C.saveAriaLabel,
|
|
83
|
+
loading: y,
|
|
84
|
+
disabled: y,
|
|
85
|
+
children: C.save
|
|
68
86
|
}) : null]
|
|
69
87
|
})
|
|
70
88
|
]
|
|
71
89
|
});
|
|
72
90
|
}
|
|
73
91
|
//#endregion
|
|
74
|
-
export {
|
|
92
|
+
export { u as VendorInlineForm, u as default };
|