@tesouro/embedded-components-react 0.4.15 → 0.4.17
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 +39 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +47 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +22 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +75 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +63 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +64 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +141 -118
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +93 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +83 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +235 -218
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +19 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +42 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +39 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +8 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +52 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +26 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +19 -306
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +154 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +2 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +60 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +251 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +7 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +49 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +2 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +15 -337
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +50 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +21 -118
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +340 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +10 -97
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +99 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +11 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +58 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +1 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +52 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +10 -179
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +181 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +41 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +5 -90
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +92 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +83 -291
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +292 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +6 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +39 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +36 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +10 -199
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +201 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +3 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +15 -345
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +345 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +6 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +7 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +122 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +26 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +94 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +5 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +5 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +10 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +105 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +15 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +125 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +7 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +170 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +11 -105
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +108 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +39 -33
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +37 -37
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +0 -2
|
@@ -2,81 +2,97 @@ import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCal
|
|
|
2
2
|
import { derivePayableStatus as t } from "./index6.js";
|
|
3
3
|
import { resolveVendor as n } from "./index7.js";
|
|
4
4
|
import { resolveAmountDueMinorUnits as r } from "./index19.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { maskAccountNumber as i } from "./index21.js";
|
|
6
|
+
import { formatBillMoney as a } from "./index2.js";
|
|
7
|
+
import { getPaidAtLabel as o } from "./index38.js";
|
|
7
8
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
-
apiStatus:
|
|
11
|
-
dueDate:
|
|
12
|
-
scheduledPaymentDate:
|
|
13
|
-
hasScheduledPayment:
|
|
14
|
-
}),
|
|
9
|
+
function s({ payable: s, lineItems: c, glCodeOptions: l, glCodeRosterAvailable: u = !0, history: d, paymentHistory: f, approvalPolicy: p, labels: m, hasScheduledPayment: h, payableAchInstructions: g, payableAchInstructionsReadable: _ = !1 }) {
|
|
10
|
+
let v = s.currency, y = t({
|
|
11
|
+
apiStatus: s.status,
|
|
12
|
+
dueDate: s.due_date,
|
|
13
|
+
scheduledPaymentDate: s.scheduled_payment_date,
|
|
14
|
+
hasScheduledPayment: h
|
|
15
|
+
}), b = n(s), x = _ ? g : b?.bank_account, S = x?.account_number, C = !!(x?.account_holder_name && x.routing_number && x.account_number), w = e(s.issued_at) || m.notProvided, T = e(s.due_date) || m.notProvided, E = new Map(l.map((e) => [e.value, e.label])), D = [
|
|
15
16
|
{
|
|
16
|
-
label:
|
|
17
|
-
minorUnits:
|
|
17
|
+
label: m.subtotalRow,
|
|
18
|
+
minorUnits: s.subtotal
|
|
18
19
|
},
|
|
19
20
|
{
|
|
20
|
-
label:
|
|
21
|
-
minorUnits:
|
|
21
|
+
label: m.discountRow,
|
|
22
|
+
minorUnits: s.discount
|
|
22
23
|
},
|
|
23
24
|
{
|
|
24
|
-
label:
|
|
25
|
-
minorUnits:
|
|
25
|
+
label: m.taxRow,
|
|
26
|
+
minorUnits: s.tax_amount
|
|
26
27
|
}
|
|
27
28
|
].map((e) => ({
|
|
28
29
|
label: e.label,
|
|
29
|
-
value:
|
|
30
|
-
})).filter((e) => !!e.value),
|
|
31
|
-
|
|
32
|
-
label:
|
|
33
|
-
value:
|
|
30
|
+
value: a(e.minorUnits, v)
|
|
31
|
+
})).filter((e) => !!e.value), O = a(s.total_amount, v);
|
|
32
|
+
O && D.push({
|
|
33
|
+
label: m.totalRow,
|
|
34
|
+
value: O,
|
|
34
35
|
emphasis: !0
|
|
35
36
|
});
|
|
36
|
-
let
|
|
37
|
+
let k = o(s);
|
|
37
38
|
return {
|
|
38
|
-
amountDue:
|
|
39
|
-
amountPaid:
|
|
40
|
-
paidOnLabel:
|
|
41
|
-
invoiceDateLabel:
|
|
42
|
-
dueDateLabel:
|
|
43
|
-
dueDateTone:
|
|
44
|
-
status:
|
|
45
|
-
statusTone:
|
|
39
|
+
amountDue: a(r(s), v) ?? "",
|
|
40
|
+
amountPaid: k ? a(s.amount_paid, v) : void 0,
|
|
41
|
+
paidOnLabel: k ? m.paidOnLabel(k) : void 0,
|
|
42
|
+
invoiceDateLabel: w,
|
|
43
|
+
dueDateLabel: T,
|
|
44
|
+
dueDateTone: y.isOverdue ? "danger" : "default",
|
|
45
|
+
status: y.status,
|
|
46
|
+
statusTone: y.tone,
|
|
46
47
|
payTo: {
|
|
47
|
-
name:
|
|
48
|
-
email:
|
|
49
|
-
|
|
48
|
+
name: b?.name || m.notProvided,
|
|
49
|
+
email: b?.email ?? "",
|
|
50
|
+
methodLabel: C ? m.paymentInstructionsValue(S?.slice(-4) ?? "") : m.paymentInstructionsNotSet,
|
|
51
|
+
fields: C ? [
|
|
52
|
+
{
|
|
53
|
+
label: m.accountHolderFieldLabel,
|
|
54
|
+
value: x?.account_holder_name ?? ""
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: m.routingNumberFieldLabel,
|
|
58
|
+
value: x?.routing_number ?? ""
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: m.accountNumberFieldLabel,
|
|
62
|
+
value: S ?? "",
|
|
63
|
+
maskedValue: i(S ?? void 0)
|
|
64
|
+
}
|
|
65
|
+
] : []
|
|
50
66
|
},
|
|
51
67
|
invoiceFields: [
|
|
52
68
|
{
|
|
53
|
-
label:
|
|
54
|
-
value:
|
|
69
|
+
label: m.invoiceDateRow,
|
|
70
|
+
value: w
|
|
55
71
|
},
|
|
56
72
|
{
|
|
57
|
-
label:
|
|
58
|
-
value:
|
|
73
|
+
label: m.dueDateRow,
|
|
74
|
+
value: T
|
|
59
75
|
},
|
|
60
76
|
{
|
|
61
|
-
label:
|
|
62
|
-
value:
|
|
77
|
+
label: m.invoiceNumberRow,
|
|
78
|
+
value: s.document_id || m.notProvided
|
|
63
79
|
}
|
|
64
80
|
],
|
|
65
|
-
lineItems:
|
|
66
|
-
let t =
|
|
81
|
+
lineItems: c.map((e) => {
|
|
82
|
+
let t = a(e.unit_price, v);
|
|
67
83
|
return {
|
|
68
84
|
id: e.id,
|
|
69
85
|
description: e.name ?? e.description ?? "",
|
|
70
|
-
glCodeLabel: e.ledger_account_id ?
|
|
71
|
-
qtyPriceLabel: e.quantity != null && t ?
|
|
72
|
-
amount:
|
|
86
|
+
glCodeLabel: e.ledger_account_id ? E.get(e.ledger_account_id) ?? (u ? m.glCodeMissing : m.glCodeUnavailable) : m.glCodeMissing,
|
|
87
|
+
qtyPriceLabel: e.quantity != null && t ? m.qtyPriceValue(String(e.quantity), t) : "",
|
|
88
|
+
amount: a(e.subtotal, v) ?? ""
|
|
73
89
|
};
|
|
74
90
|
}),
|
|
75
|
-
amountRows:
|
|
76
|
-
approvalPolicy:
|
|
77
|
-
paymentHistory:
|
|
78
|
-
history:
|
|
91
|
+
amountRows: D,
|
|
92
|
+
approvalPolicy: p,
|
|
93
|
+
paymentHistory: f,
|
|
94
|
+
history: d
|
|
79
95
|
};
|
|
80
96
|
}
|
|
81
97
|
//#endregion
|
|
82
|
-
export {
|
|
98
|
+
export { s as buildBillDetailView };
|
|
@@ -20,7 +20,8 @@ var e = {
|
|
|
20
20
|
confirmedToast: "Duplicate confirmed",
|
|
21
21
|
dismissedToast: "Marked as “not a duplicate”.",
|
|
22
22
|
removedToast: "Duplicate removed",
|
|
23
|
-
verdictFailedToast: "Couldn't update this duplicate. Try again."
|
|
23
|
+
verdictFailedToast: "Couldn't update this duplicate. Try again.",
|
|
24
|
+
allResolvedToast: "All possible duplicates resolved"
|
|
24
25
|
};
|
|
25
26
|
//#endregion
|
|
26
27
|
export { e as DUPLICATE_BILLS_LABELS_EN };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UNSAVED_BILL_DIALOG_LABELS_EN as e } from "../../ui/dist/
|
|
1
|
+
import { UNSAVED_BILL_DIALOG_LABELS_EN as e } from "../../ui/dist/index101.js";
|
|
2
2
|
import "../../ui/dist/index.js";
|
|
3
3
|
import { PAY_BILL_FLOW_LABELS_EN as t, mergePayBillFlowLabels as n } from "./index23.js";
|
|
4
4
|
import { MARK_AS_PAID_FLOW_LABELS_EN as r, mergeMarkAsPaidFlowLabels as i } from "./index14.js";
|
|
@@ -45,6 +45,10 @@ var f = {
|
|
|
45
45
|
...s,
|
|
46
46
|
notProvided: "Not provided",
|
|
47
47
|
paymentInstructionsValue: (e) => `Account ending in ${e}`,
|
|
48
|
+
paymentInstructionsNotSet: "Not set",
|
|
49
|
+
accountHolderFieldLabel: "Account holder",
|
|
50
|
+
routingNumberFieldLabel: "Routing number",
|
|
51
|
+
accountNumberFieldLabel: "Account number",
|
|
48
52
|
invoiceDateRow: "Invoice date",
|
|
49
53
|
dueDateRow: "Due date",
|
|
50
54
|
invoiceNumberRow: "Invoice number",
|
|
@@ -169,7 +173,11 @@ var y = {
|
|
|
169
173
|
accountNumberLabel: "Account number",
|
|
170
174
|
achHelp: "Ask your vendor for this — it's usually on their invoice, W-9, or a payment instructions email they send you.",
|
|
171
175
|
cancel: "Cancel",
|
|
172
|
-
save: "Save vendor"
|
|
176
|
+
save: "Save vendor",
|
|
177
|
+
discardConfirmTitle: "Discard unsaved changes?",
|
|
178
|
+
discardConfirmDescription: "You've made changes to this vendor that haven't been saved. If you leave now, they'll be lost.",
|
|
179
|
+
keepEditingAction: "Keep editing",
|
|
180
|
+
discardChangesAction: "Discard changes"
|
|
173
181
|
};
|
|
174
182
|
//#endregion
|
|
175
183
|
export { f as BILL_CREATE_MESSAGE_LABELS_EN, _ as BILL_CREATE_SCREEN_LABELS_EN, h as BILL_DETAIL_VIEW_LABELS_EN, g as BILL_HISTORY_LABELS_EN, m as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, y as VENDOR_INLINE_FORM_LABELS_EN, p as VENDOR_SECTION_PROPS_LABELS_EN, v as mergeBillCreateScreenCopy };
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { useAttachPayableFileMutation as e } from "../../data-access/dist/index13.js";
|
|
6
6
|
import "../../data-access/dist/index.js";
|
|
7
|
-
import { SourceDocumentPanel as t } from "../../ui/dist/
|
|
7
|
+
import { SourceDocumentPanel as t } from "../../ui/dist/index99.js";
|
|
8
8
|
import "../../ui/dist/index.js";
|
|
9
9
|
import { createSourceDocumentPreview as n } from "./index42.js";
|
|
10
10
|
import { SOURCE_DOCUMENT_CONTAINER_LABELS_EN as r } from "./index43.js";
|
|
@@ -2,77 +2,83 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import { getStateOptions as
|
|
7
|
-
import { AchFieldGroup as
|
|
8
|
-
import { CounterpartFormFields as
|
|
9
|
-
import { COUNTERPART_MESSAGE_LABELS_EN as
|
|
10
|
-
import { useCounterpartForm as
|
|
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";
|
|
11
11
|
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
12
|
-
import { VENDOR_INLINE_FORM_LABELS_EN as
|
|
13
|
-
import { useCallback as
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import { Landmark as
|
|
12
|
+
import { VENDOR_INLINE_FORM_LABELS_EN as f } from "./index43.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";
|
|
16
16
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js
|
|
17
|
-
function
|
|
18
|
-
let
|
|
19
|
-
...
|
|
20
|
-
...
|
|
21
|
-
}, [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, [
|
|
25
|
-
let
|
|
26
|
-
view:
|
|
27
|
-
setView:
|
|
28
|
-
selectedId:
|
|
29
|
-
setSelectedId:
|
|
30
|
-
messages:
|
|
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
31
|
counterpartType: "vendor",
|
|
32
|
-
counterpart:
|
|
33
|
-
primaryAddress:
|
|
34
|
-
bankAccounts:
|
|
35
|
-
isBankAccountsLoading:
|
|
36
|
-
isBankAccountsError:
|
|
37
|
-
}), { openCreate:
|
|
38
|
-
|
|
39
|
-
|
|
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();
|
|
40
40
|
}, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
]),
|
|
45
|
-
|
|
41
|
+
S,
|
|
42
|
+
Y,
|
|
43
|
+
X
|
|
44
|
+
]), m(() => {
|
|
45
|
+
K.current !== "none" && F === "none" && L && A(L), K.current = F;
|
|
46
46
|
}, [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
]),
|
|
51
|
-
|
|
47
|
+
F,
|
|
48
|
+
L,
|
|
49
|
+
A
|
|
50
|
+
]), m(() => {
|
|
51
|
+
S !== "create" || q.current || (q.current = !0, Z((e) => ({
|
|
52
52
|
...e,
|
|
53
53
|
entityType: "organization",
|
|
54
|
-
legalName:
|
|
55
|
-
email:
|
|
56
|
-
phone:
|
|
57
|
-
address:
|
|
58
|
-
})),
|
|
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());
|
|
59
59
|
}, [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
]),
|
|
66
|
-
|
|
60
|
+
S,
|
|
61
|
+
O,
|
|
62
|
+
k,
|
|
63
|
+
Z,
|
|
64
|
+
Q
|
|
65
|
+
]), m(() => {
|
|
66
|
+
S === "edit" && (J.values.bankAccount.routingNumber || J.values.bankAccount.accountNumber) && B(!0);
|
|
67
67
|
}, [
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
]),
|
|
72
|
-
|
|
73
|
-
}, [
|
|
74
|
-
let
|
|
75
|
-
|
|
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" ? {
|
|
76
82
|
...t,
|
|
77
83
|
...e,
|
|
78
84
|
firstName: t.firstName || t.legalName,
|
|
@@ -85,34 +91,34 @@ function y({ mode: y, counterpart: b, primaryAddress: x, bankAccounts: S, isBank
|
|
|
85
91
|
...t,
|
|
86
92
|
...e
|
|
87
93
|
});
|
|
88
|
-
}, [
|
|
89
|
-
return /* @__PURE__ */
|
|
90
|
-
ref:
|
|
94
|
+
}, [Z]);
|
|
95
|
+
return /* @__PURE__ */ y("div", {
|
|
96
|
+
ref: re,
|
|
91
97
|
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
|
|
92
98
|
children: [
|
|
93
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ y("div", {
|
|
94
100
|
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-2",
|
|
95
|
-
children: [/* @__PURE__ */
|
|
101
|
+
children: [/* @__PURE__ */ v("p", {
|
|
96
102
|
className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
97
|
-
children:
|
|
98
|
-
}), /* @__PURE__ */
|
|
103
|
+
children: S === "edit" ? P.editTitle : P.createTitle
|
|
104
|
+
}), /* @__PURE__ */ v(o, {
|
|
99
105
|
type: "button",
|
|
100
106
|
variant: "ghost",
|
|
101
107
|
size: "icon",
|
|
102
|
-
"aria-label":
|
|
103
|
-
onClick:
|
|
104
|
-
children: /* @__PURE__ */
|
|
108
|
+
"aria-label": P.close,
|
|
109
|
+
onClick: $,
|
|
110
|
+
children: /* @__PURE__ */ v(x, { className: "ttw:size-4" })
|
|
105
111
|
})]
|
|
106
112
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
mode:
|
|
113
|
+
/* @__PURE__ */ v(c, {
|
|
114
|
+
mode: S,
|
|
109
115
|
counterpartMode: "vendor",
|
|
110
|
-
values:
|
|
111
|
-
errors:
|
|
112
|
-
stateOptions:
|
|
113
|
-
onChange:
|
|
116
|
+
values: J.values,
|
|
117
|
+
errors: J.errors,
|
|
118
|
+
stateOptions: G,
|
|
119
|
+
onChange: ie,
|
|
114
120
|
onAddressChange: (e) => {
|
|
115
|
-
|
|
121
|
+
H(!0), Z((t) => ({
|
|
116
122
|
...t,
|
|
117
123
|
address: {
|
|
118
124
|
...t.address,
|
|
@@ -128,45 +134,45 @@ function y({ mode: y, counterpart: b, primaryAddress: x, bankAccounts: S, isBank
|
|
|
128
134
|
address: "collapsible",
|
|
129
135
|
bankAccount: !1
|
|
130
136
|
},
|
|
131
|
-
sectionsToExpand:
|
|
132
|
-
onAddressExpand:
|
|
133
|
-
labels: { businessNameLabel:
|
|
137
|
+
sectionsToExpand: J.sectionsToExpand,
|
|
138
|
+
onAddressExpand: J.expandAddress,
|
|
139
|
+
labels: { businessNameLabel: P.nameLabel }
|
|
134
140
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ y("div", {
|
|
136
142
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
137
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ v("p", {
|
|
138
144
|
className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
|
|
139
|
-
children:
|
|
140
|
-
}), /* @__PURE__ */
|
|
145
|
+
children: P.paymentMethodsHeading
|
|
146
|
+
}), /* @__PURE__ */ v("p", {
|
|
141
147
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
142
|
-
children:
|
|
148
|
+
children: P.paymentMethodsDescription
|
|
143
149
|
})]
|
|
144
150
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ y("div", {
|
|
146
152
|
className: "ttw:flex ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-border ttw:p-3",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ v("span", {
|
|
148
154
|
className: "ttw:flex ttw:size-8 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-md ttw:bg-primary",
|
|
149
|
-
children: /* @__PURE__ */
|
|
155
|
+
children: /* @__PURE__ */ v(b, {
|
|
150
156
|
"aria-hidden": !0,
|
|
151
157
|
className: "ttw:size-4 ttw:text-white"
|
|
152
158
|
})
|
|
153
|
-
}), /* @__PURE__ */
|
|
159
|
+
}), /* @__PURE__ */ y("div", {
|
|
154
160
|
className: "ttw:flex ttw:flex-1 ttw:flex-col ttw:gap-3",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
161
|
+
children: [/* @__PURE__ */ y("div", {
|
|
156
162
|
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
157
|
-
children: [/* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ v("p", {
|
|
158
164
|
className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
159
|
-
children:
|
|
160
|
-
}), /* @__PURE__ */
|
|
165
|
+
children: P.achTitle
|
|
166
|
+
}), /* @__PURE__ */ v("p", {
|
|
161
167
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
162
|
-
children:
|
|
168
|
+
children: P.achDescription
|
|
163
169
|
})]
|
|
164
|
-
}),
|
|
170
|
+
}), z ? /* @__PURE__ */ y(te, { children: [/* @__PURE__ */ v(ee, {
|
|
165
171
|
idPrefix: "vendor-inline-ach",
|
|
166
|
-
values:
|
|
167
|
-
errors:
|
|
172
|
+
values: J.values.bankAccount,
|
|
173
|
+
errors: J.errors?.bankAccount,
|
|
168
174
|
onChange: (e) => {
|
|
169
|
-
|
|
175
|
+
H(!0), Z((t) => ({
|
|
170
176
|
...t,
|
|
171
177
|
bankAccount: {
|
|
172
178
|
...t.bankAccount,
|
|
@@ -175,39 +181,56 @@ function y({ mode: y, counterpart: b, primaryAddress: x, bankAccounts: S, isBank
|
|
|
175
181
|
}));
|
|
176
182
|
},
|
|
177
183
|
labels: {
|
|
178
|
-
accountHolderName:
|
|
179
|
-
routingNumber:
|
|
180
|
-
accountNumber:
|
|
184
|
+
accountHolderName: P.accountHolderNameLabel,
|
|
185
|
+
routingNumber: P.routingNumberLabel,
|
|
186
|
+
accountNumber: P.accountNumberLabel
|
|
181
187
|
}
|
|
182
|
-
}), /* @__PURE__ */
|
|
188
|
+
}), /* @__PURE__ */ v("p", {
|
|
183
189
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
184
|
-
children:
|
|
185
|
-
})] }) : /* @__PURE__ */
|
|
190
|
+
children: P.achHelp
|
|
191
|
+
})] }) : /* @__PURE__ */ y(o, {
|
|
186
192
|
type: "button",
|
|
187
193
|
variant: "link",
|
|
188
194
|
className: "ttw:w-fit ttw:px-0",
|
|
189
|
-
onClick: () =>
|
|
190
|
-
children: [/* @__PURE__ */
|
|
195
|
+
onClick: () => B(!0),
|
|
196
|
+
children: [/* @__PURE__ */ v(ne, { className: "ttw:size-4" }), P.addBankAccount]
|
|
191
197
|
})]
|
|
192
198
|
})]
|
|
193
199
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ y("div", {
|
|
195
201
|
className: "ttw:flex ttw:justify-end ttw:gap-2",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ v(o, {
|
|
197
203
|
type: "button",
|
|
198
204
|
variant: "outline",
|
|
199
|
-
onClick:
|
|
200
|
-
children:
|
|
201
|
-
}), /* @__PURE__ */
|
|
205
|
+
onClick: $,
|
|
206
|
+
children: P.cancel
|
|
207
|
+
}), /* @__PURE__ */ v(o, {
|
|
202
208
|
type: "button",
|
|
203
|
-
onClick:
|
|
204
|
-
loading:
|
|
205
|
-
disabled:
|
|
206
|
-
children:
|
|
209
|
+
onClick: J.submit,
|
|
210
|
+
loading: J.isSubmitting,
|
|
211
|
+
disabled: J.isSubmitting,
|
|
212
|
+
children: P.save
|
|
207
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
|
+
})] })] })
|
|
208
231
|
})
|
|
209
232
|
]
|
|
210
233
|
});
|
|
211
234
|
}
|
|
212
235
|
//#endregion
|
|
213
|
-
export {
|
|
236
|
+
export { S as VendorInlineForm, S as default };
|