@tesouro/embedded-components-react 0.5.53 → 0.5.55
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/index42.js +62 -59
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +49 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +104 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +8 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +18 -14
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -6,93 +6,96 @@ import { resolveLineItemAmountMinorUnits as a } from "./index40.js";
|
|
|
6
6
|
import { resolveLineItemQuantity as o } from "./index41.js";
|
|
7
7
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js
|
|
8
8
|
function s(e) {
|
|
9
|
+
return typeof e.total_amount == "number" ? e.total_amount - (e.discount ?? 0) : e.amount_due ?? void 0;
|
|
10
|
+
}
|
|
11
|
+
function c(e) {
|
|
9
12
|
return typeof e == "string" ? e : "";
|
|
10
13
|
}
|
|
11
|
-
function
|
|
12
|
-
let
|
|
13
|
-
apiStatus:
|
|
14
|
-
dueDate:
|
|
15
|
-
scheduledPaymentDate:
|
|
16
|
-
hasScheduledPayment:
|
|
17
|
-
now:
|
|
18
|
-
}),
|
|
19
|
-
label:
|
|
20
|
-
value:
|
|
21
|
-
secondaryValue:
|
|
22
|
-
}],
|
|
23
|
-
|
|
24
|
-
label:
|
|
25
|
-
value:
|
|
14
|
+
function l({ payable: l, lineItems: d, ledgerAccounts: f, labels: p, hasScheduledPayment: m, now: h, rejection: g, achInstructions: _, achInstructionsReadable: v = !1 }) {
|
|
15
|
+
let y = l.currency, b = (e) => i(e, y), x = t({
|
|
16
|
+
apiStatus: l.status,
|
|
17
|
+
dueDate: l.due_date,
|
|
18
|
+
scheduledPaymentDate: l.scheduled_payment_date,
|
|
19
|
+
hasScheduledPayment: m,
|
|
20
|
+
now: h
|
|
21
|
+
}), S = n(l), C = r(l), w = e(l.issued_at) || p.notProvided, T = e(l.due_date) || p.notProvided, E = [{
|
|
22
|
+
label: p.vendorRow,
|
|
23
|
+
value: C || p.notProvided,
|
|
24
|
+
secondaryValue: S?.email ?? void 0
|
|
25
|
+
}], D = v ? _?.account_number : void 0;
|
|
26
|
+
D && E.push({
|
|
27
|
+
label: p.bankAccountRow,
|
|
28
|
+
value: p.bankAccountValue(D.slice(-4))
|
|
26
29
|
});
|
|
27
|
-
let
|
|
30
|
+
let O = [
|
|
28
31
|
{
|
|
29
|
-
label:
|
|
30
|
-
value:
|
|
32
|
+
label: p.invoiceNumberRow,
|
|
33
|
+
value: l.document_id || p.notProvided
|
|
31
34
|
},
|
|
32
35
|
{
|
|
33
|
-
label:
|
|
34
|
-
value:
|
|
36
|
+
label: p.issueDateRow,
|
|
37
|
+
value: w
|
|
35
38
|
},
|
|
36
39
|
{
|
|
37
|
-
label:
|
|
38
|
-
value:
|
|
40
|
+
label: p.dueDateRow,
|
|
41
|
+
value: T
|
|
39
42
|
},
|
|
40
43
|
{
|
|
41
|
-
label:
|
|
42
|
-
value:
|
|
44
|
+
label: p.poNumberRow,
|
|
45
|
+
value: c(l.purchase_order_number) || p.notProvided
|
|
43
46
|
}
|
|
44
|
-
],
|
|
45
|
-
let t =
|
|
47
|
+
], k = new Map(f.map((e) => [e.id, [e.nominal_code, e.name].filter(Boolean).join(" — ")])), A = d.map((e) => {
|
|
48
|
+
let t = b(e.unit_price), n = String(o(e));
|
|
46
49
|
return {
|
|
47
50
|
id: e.id,
|
|
48
51
|
description: e.name ?? e.description ?? "",
|
|
49
|
-
glCodeLabel: (e.ledger_account_id ?
|
|
50
|
-
quantityLabel: t ?
|
|
51
|
-
amountLabel:
|
|
52
|
+
glCodeLabel: (e.ledger_account_id ? k.get(e.ledger_account_id) : void 0) || p.glCodeMissing,
|
|
53
|
+
quantityLabel: t ? p.quantityValue(n, t) : p.quantityOnlyValue(n),
|
|
54
|
+
amountLabel: b(a(e)) ?? ""
|
|
52
55
|
};
|
|
53
|
-
}),
|
|
56
|
+
}), j = [
|
|
54
57
|
{
|
|
55
|
-
label:
|
|
56
|
-
value:
|
|
58
|
+
label: p.subtotalRow,
|
|
59
|
+
value: l.subtotal
|
|
57
60
|
},
|
|
58
61
|
{
|
|
59
|
-
label:
|
|
60
|
-
value:
|
|
62
|
+
label: p.discountsRow,
|
|
63
|
+
value: l.discount
|
|
61
64
|
},
|
|
62
65
|
{
|
|
63
|
-
label:
|
|
64
|
-
value:
|
|
66
|
+
label: p.taxRow,
|
|
67
|
+
value: l.tax_amount
|
|
65
68
|
}
|
|
66
69
|
].map(({ label: e, value: t }) => ({
|
|
67
70
|
label: e,
|
|
68
|
-
value:
|
|
69
|
-
})).filter((e) => !!e.value),
|
|
70
|
-
|
|
71
|
-
label:
|
|
72
|
-
value:
|
|
71
|
+
value: b(t)
|
|
72
|
+
})).filter((e) => !!e.value), M = b(s(l));
|
|
73
|
+
M && j.push({
|
|
74
|
+
label: p.totalRow,
|
|
75
|
+
value: M,
|
|
73
76
|
emphasis: !0
|
|
74
77
|
});
|
|
75
|
-
let
|
|
78
|
+
let N = u(l);
|
|
76
79
|
return {
|
|
77
|
-
title:
|
|
78
|
-
subtitle:
|
|
79
|
-
status:
|
|
80
|
-
statusTone:
|
|
81
|
-
amountDueLabel:
|
|
82
|
-
amountPaidLabel:
|
|
83
|
-
paidOnLabel:
|
|
84
|
-
invoiceDateLabel:
|
|
85
|
-
dueDateLabel:
|
|
86
|
-
dueDateTone:
|
|
87
|
-
payToItems:
|
|
88
|
-
invoiceItems:
|
|
89
|
-
lineItems:
|
|
90
|
-
totals:
|
|
91
|
-
rejection:
|
|
80
|
+
title: C,
|
|
81
|
+
subtitle: p.subtitle,
|
|
82
|
+
status: x.status,
|
|
83
|
+
statusTone: x.tone,
|
|
84
|
+
amountDueLabel: b(l.amount_due) ?? b(l.total_amount) ?? "",
|
|
85
|
+
amountPaidLabel: N ? b(l.amount_paid) : void 0,
|
|
86
|
+
paidOnLabel: N ? p.paidOnLabel(N) : void 0,
|
|
87
|
+
invoiceDateLabel: w,
|
|
88
|
+
dueDateLabel: T,
|
|
89
|
+
dueDateTone: x.isOverdue ? "danger" : "default",
|
|
90
|
+
payToItems: E,
|
|
91
|
+
invoiceItems: O,
|
|
92
|
+
lineItems: A,
|
|
93
|
+
totals: j,
|
|
94
|
+
rejection: g
|
|
92
95
|
};
|
|
93
96
|
}
|
|
94
|
-
function
|
|
97
|
+
function u(t) {
|
|
95
98
|
return t.status === "paid" && t.paid_at ? e(t.paid_at.slice(0, 10)) : void 0;
|
|
96
99
|
}
|
|
97
100
|
//#endregion
|
|
98
|
-
export {
|
|
101
|
+
export { u as getPaidAtLabel, l as mapPayableToBillDetails, s as resolveInvoiceTotalMinorUnits };
|
|
@@ -5,82 +5,82 @@ import { resolveAmountDueMinorUnits as r } from "./index21.js";
|
|
|
5
5
|
import { formatBillMoney as i } from "./index2.js";
|
|
6
6
|
import { resolveLineItemAmountMinorUnits as a } from "./index40.js";
|
|
7
7
|
import { resolveLineItemQuantity as o } from "./index41.js";
|
|
8
|
-
import { getPaidAtLabel as s } from "./index42.js";
|
|
8
|
+
import { getPaidAtLabel as s, resolveInvoiceTotalMinorUnits as c } from "./index42.js";
|
|
9
9
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js
|
|
10
|
-
function
|
|
11
|
-
let
|
|
12
|
-
apiStatus:
|
|
13
|
-
dueDate:
|
|
14
|
-
scheduledPaymentDate:
|
|
15
|
-
hasScheduledPayment:
|
|
16
|
-
}),
|
|
10
|
+
function l({ payable: l, lineItems: u, glCodeOptions: d, glCodeRosterAvailable: f = !0, history: p, paymentHistory: m, approvalPolicy: h, labels: g, hasScheduledPayment: _, rejection: v, payableAchInstructions: y, payableAchInstructionsReadable: b = !1 }) {
|
|
11
|
+
let x = l.currency, S = t({
|
|
12
|
+
apiStatus: l.status,
|
|
13
|
+
dueDate: l.due_date,
|
|
14
|
+
scheduledPaymentDate: l.scheduled_payment_date,
|
|
15
|
+
hasScheduledPayment: _
|
|
16
|
+
}), C = n(l), w = b ? y : void 0, T = w?.account_number, E = !!(w?.account_holder_name && w.routing_number && w.account_number), D = e(l.issued_at) || g.notProvided, O = e(l.due_date) || g.notProvided, k = new Map(d.map((e) => [e.value, e.label])), A = [
|
|
17
17
|
{
|
|
18
|
-
label:
|
|
19
|
-
minorUnits:
|
|
18
|
+
label: g.subtotalRow,
|
|
19
|
+
minorUnits: l.subtotal
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
label:
|
|
23
|
-
minorUnits:
|
|
22
|
+
label: g.discountRow,
|
|
23
|
+
minorUnits: l.discount
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
label:
|
|
27
|
-
minorUnits:
|
|
26
|
+
label: g.taxRow,
|
|
27
|
+
minorUnits: l.tax_amount
|
|
28
28
|
}
|
|
29
29
|
].map((e) => ({
|
|
30
30
|
label: e.label,
|
|
31
|
-
value: i(e.minorUnits,
|
|
32
|
-
})).filter((e) => !!e.value),
|
|
33
|
-
|
|
34
|
-
label:
|
|
35
|
-
value:
|
|
31
|
+
value: i(e.minorUnits, x)
|
|
32
|
+
})).filter((e) => !!e.value), j = i(c(l), x);
|
|
33
|
+
j && A.push({
|
|
34
|
+
label: g.totalRow,
|
|
35
|
+
value: j,
|
|
36
36
|
emphasis: !0
|
|
37
37
|
});
|
|
38
|
-
let
|
|
38
|
+
let M = s(l);
|
|
39
39
|
return {
|
|
40
|
-
amountDue: i(r(
|
|
41
|
-
amountPaid:
|
|
42
|
-
paidOnLabel:
|
|
43
|
-
invoiceDateLabel:
|
|
44
|
-
dueDateLabel:
|
|
45
|
-
dueDateTone:
|
|
46
|
-
status:
|
|
47
|
-
statusTone:
|
|
40
|
+
amountDue: i(r(l), x) ?? "",
|
|
41
|
+
amountPaid: M ? i(l.amount_paid, x) : void 0,
|
|
42
|
+
paidOnLabel: M ? g.paidOnLabel(M) : void 0,
|
|
43
|
+
invoiceDateLabel: D,
|
|
44
|
+
dueDateLabel: O,
|
|
45
|
+
dueDateTone: S.isOverdue ? "danger" : "default",
|
|
46
|
+
status: S.status,
|
|
47
|
+
statusTone: S.tone,
|
|
48
48
|
payTo: {
|
|
49
|
-
name:
|
|
50
|
-
email:
|
|
51
|
-
methodLabel:
|
|
52
|
-
hasPaymentInstructions:
|
|
49
|
+
name: C?.name || g.notProvided,
|
|
50
|
+
email: C?.email ?? "",
|
|
51
|
+
methodLabel: E ? g.paymentInstructionsValue(T?.slice(-4) ?? "") : g.paymentInstructionsNotSet,
|
|
52
|
+
hasPaymentInstructions: E
|
|
53
53
|
},
|
|
54
54
|
invoiceFields: [
|
|
55
55
|
{
|
|
56
|
-
label:
|
|
57
|
-
value:
|
|
56
|
+
label: g.invoiceDateRow,
|
|
57
|
+
value: D
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
|
-
label:
|
|
61
|
-
value:
|
|
60
|
+
label: g.dueDateRow,
|
|
61
|
+
value: O
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
|
-
label:
|
|
65
|
-
value:
|
|
64
|
+
label: g.invoiceNumberRow,
|
|
65
|
+
value: l.document_id || g.notProvided
|
|
66
66
|
}
|
|
67
67
|
],
|
|
68
|
-
lineItems:
|
|
69
|
-
let t = i(e.unit_price,
|
|
68
|
+
lineItems: u.map((e) => {
|
|
69
|
+
let t = i(e.unit_price, x), n = String(o(e));
|
|
70
70
|
return {
|
|
71
71
|
id: e.id,
|
|
72
72
|
description: e.name ?? e.description ?? "",
|
|
73
|
-
glCodeLabel: e.ledger_account_id ?
|
|
74
|
-
qtyPriceLabel: t ?
|
|
75
|
-
amount: i(a(e),
|
|
73
|
+
glCodeLabel: e.ledger_account_id ? k.get(e.ledger_account_id) ?? (f ? g.glCodeMissing : g.glCodeUnavailable) : g.glCodeMissing,
|
|
74
|
+
qtyPriceLabel: t ? g.qtyPriceValue(n, t) : g.qtyOnlyValue(n),
|
|
75
|
+
amount: i(a(e), x) ?? ""
|
|
76
76
|
};
|
|
77
77
|
}),
|
|
78
|
-
amountRows:
|
|
79
|
-
approvalPolicy:
|
|
80
|
-
paymentHistory:
|
|
81
|
-
history:
|
|
82
|
-
rejection:
|
|
78
|
+
amountRows: A,
|
|
79
|
+
approvalPolicy: h,
|
|
80
|
+
paymentHistory: m,
|
|
81
|
+
history: p,
|
|
82
|
+
rejection: v
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
//#endregion
|
|
86
|
-
export {
|
|
86
|
+
export { l as buildBillDetailView };
|