@tesouro/embedded-components-react 0.4.28 → 0.4.29
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.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +15 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +87 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index18.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +5 -70
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +64 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +38 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +104 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +87 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +7 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +17 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +23 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +66 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +2 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +78 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +3 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +30 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +37 -166
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +164 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +48 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +1 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +45 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +13 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +8 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +7 -59
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +64 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +8 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +18 -136
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +139 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +24 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +4 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +39 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +79 -85
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +96 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +3 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +47 -119
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +135 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +33 -186
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +186 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +22 -232
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +223 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +14 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +202 -103
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +121 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +47 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +27 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +198 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +30 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +240 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +19 -425
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +433 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +25 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +4 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +35 -218
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +224 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +46 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +10 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +112 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +21 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +3 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +124 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +43 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +27 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +83 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +47 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +239 -101
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +58 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +107 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +209 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
|
@@ -1,99 +1,93 @@
|
|
|
1
1
|
import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
2
|
-
import { derivePayableStatus as t } from "./
|
|
3
|
-
import { resolveVendor as n } from "./
|
|
4
|
-
import {
|
|
5
|
-
import { maskAccountNumber as i } from "./index22.js";
|
|
6
|
-
import { formatBillMoney as a } from "./index2.js";
|
|
7
|
-
import { getPaidAtLabel as o } from "./index39.js";
|
|
2
|
+
import { derivePayableStatus as t } from "./index8.js";
|
|
3
|
+
import { resolveVendor as n, resolveVendorName as r } from "./index9.js";
|
|
4
|
+
import { formatBillMoney as i } from "./index2.js";
|
|
8
5
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
apiStatus:
|
|
12
|
-
dueDate:
|
|
13
|
-
scheduledPaymentDate:
|
|
14
|
-
hasScheduledPayment:
|
|
15
|
-
|
|
6
|
+
function a({ payable: a, lineItems: s, ledgerAccounts: c, labels: l, hasScheduledPayment: u, now: d, rejection: f }) {
|
|
7
|
+
let p = a.currency, m = (e) => i(e, p), h = t({
|
|
8
|
+
apiStatus: a.status,
|
|
9
|
+
dueDate: a.due_date,
|
|
10
|
+
scheduledPaymentDate: a.scheduled_payment_date,
|
|
11
|
+
hasScheduledPayment: u,
|
|
12
|
+
now: d
|
|
13
|
+
}), g = n(a), _ = r(a), v = e(a.issued_at) || l.notProvided, y = e(a.due_date) || l.notProvided, b = [{
|
|
14
|
+
label: l.vendorRow,
|
|
15
|
+
value: _ || l.notProvided,
|
|
16
|
+
secondaryValue: g?.email ?? void 0
|
|
17
|
+
}], x = g?.bank_account?.account_number;
|
|
18
|
+
x && b.push({
|
|
19
|
+
label: l.bankAccountRow,
|
|
20
|
+
value: l.bankAccountValue(x.slice(-4))
|
|
21
|
+
});
|
|
22
|
+
let S = [
|
|
23
|
+
{
|
|
24
|
+
label: l.invoiceNumberRow,
|
|
25
|
+
value: a.document_id || l.notProvided
|
|
26
|
+
},
|
|
16
27
|
{
|
|
17
|
-
label:
|
|
18
|
-
|
|
28
|
+
label: l.issueDateRow,
|
|
29
|
+
value: v
|
|
19
30
|
},
|
|
20
31
|
{
|
|
21
|
-
label:
|
|
22
|
-
|
|
32
|
+
label: l.dueDateRow,
|
|
33
|
+
value: y
|
|
23
34
|
},
|
|
24
35
|
{
|
|
25
|
-
label:
|
|
26
|
-
|
|
36
|
+
label: l.poNumberRow,
|
|
37
|
+
value: l.notProvided
|
|
27
38
|
}
|
|
28
|
-
].map((e) => ({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
], C = new Map(c.map((e) => [e.id, [e.nominal_code, e.name].filter(Boolean).join(" — ")])), w = s.map((e) => {
|
|
40
|
+
let t = m(e.unit_price);
|
|
41
|
+
return {
|
|
42
|
+
id: e.id,
|
|
43
|
+
description: e.name ?? e.description ?? "",
|
|
44
|
+
glCodeLabel: (e.ledger_account_id ? C.get(e.ledger_account_id) : void 0) || l.glCodeMissing,
|
|
45
|
+
quantityLabel: e.quantity != null && t ? l.quantityValue(String(e.quantity), t) : "",
|
|
46
|
+
amountLabel: m(e.subtotal) ?? ""
|
|
47
|
+
};
|
|
48
|
+
}), T = [
|
|
49
|
+
{
|
|
50
|
+
label: l.subtotalRow,
|
|
51
|
+
value: a.subtotal
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: l.discountsRow,
|
|
55
|
+
value: a.discount
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: l.taxRow,
|
|
59
|
+
value: a.tax_amount
|
|
60
|
+
}
|
|
61
|
+
].map(({ label: e, value: t }) => ({
|
|
62
|
+
label: e,
|
|
63
|
+
value: m(t)
|
|
64
|
+
})).filter((e) => !!e.value), E = m(a.total_amount);
|
|
65
|
+
E && T.push({
|
|
66
|
+
label: l.totalRow,
|
|
67
|
+
value: E,
|
|
35
68
|
emphasis: !0
|
|
36
69
|
});
|
|
37
|
-
let
|
|
70
|
+
let D = o(a);
|
|
38
71
|
return {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
value: S?.account_holder_name ?? ""
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
label: m.routingNumberFieldLabel,
|
|
58
|
-
value: S?.routing_number ?? ""
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
label: m.accountNumberFieldLabel,
|
|
62
|
-
value: C ?? "",
|
|
63
|
-
maskedValue: i(C ?? void 0)
|
|
64
|
-
}
|
|
65
|
-
] : []
|
|
66
|
-
},
|
|
67
|
-
invoiceFields: [
|
|
68
|
-
{
|
|
69
|
-
label: m.invoiceDateRow,
|
|
70
|
-
value: T
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
label: m.dueDateRow,
|
|
74
|
-
value: E
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
label: m.invoiceNumberRow,
|
|
78
|
-
value: s.document_id || m.notProvided
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
lineItems: c.map((e) => {
|
|
82
|
-
let t = a(e.unit_price, y);
|
|
83
|
-
return {
|
|
84
|
-
id: e.id,
|
|
85
|
-
description: e.name ?? e.description ?? "",
|
|
86
|
-
glCodeLabel: e.ledger_account_id ? D.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, y) ?? ""
|
|
89
|
-
};
|
|
90
|
-
}),
|
|
91
|
-
amountRows: O,
|
|
92
|
-
approvalPolicy: p,
|
|
93
|
-
paymentHistory: f,
|
|
94
|
-
history: d,
|
|
95
|
-
rejection: g
|
|
72
|
+
title: _,
|
|
73
|
+
subtitle: l.subtitle,
|
|
74
|
+
status: h.status,
|
|
75
|
+
statusTone: h.tone,
|
|
76
|
+
amountDueLabel: m(a.amount_due) ?? m(a.total_amount) ?? "",
|
|
77
|
+
amountPaidLabel: D ? m(a.amount_paid) : void 0,
|
|
78
|
+
paidOnLabel: D ? l.paidOnLabel(D) : void 0,
|
|
79
|
+
invoiceDateLabel: v,
|
|
80
|
+
dueDateLabel: y,
|
|
81
|
+
dueDateTone: h.isOverdue ? "danger" : "default",
|
|
82
|
+
payToItems: b,
|
|
83
|
+
invoiceItems: S,
|
|
84
|
+
lineItems: w,
|
|
85
|
+
totals: T,
|
|
86
|
+
rejection: f
|
|
96
87
|
};
|
|
97
88
|
}
|
|
89
|
+
function o(t) {
|
|
90
|
+
return t.status === "paid" && t.paid_at ? e(t.paid_at.slice(0, 10)) : void 0;
|
|
91
|
+
}
|
|
98
92
|
//#endregion
|
|
99
|
-
export {
|
|
93
|
+
export { o as getPaidAtLabel, a as mapPayableToBillDetails };
|
|
@@ -1,6 +1,99 @@
|
|
|
1
|
+
import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
2
|
+
import { derivePayableStatus as t } from "./index8.js";
|
|
3
|
+
import { resolveVendor as n } from "./index9.js";
|
|
4
|
+
import { resolveAmountDueMinorUnits as r } from "./index21.js";
|
|
5
|
+
import { maskAccountNumber as i } from "./index23.js";
|
|
6
|
+
import { formatBillMoney as a } from "./index2.js";
|
|
7
|
+
import { getPaidAtLabel as o } from "./index40.js";
|
|
1
8
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js
|
|
2
|
-
function
|
|
3
|
-
|
|
9
|
+
function s({ payable: s, lineItems: c, glCodeOptions: l, glCodeRosterAvailable: u = !0, history: d, paymentHistory: f, approvalPolicy: p, labels: m, hasScheduledPayment: h, rejection: g, payableAchInstructions: _, payableAchInstructionsReadable: v = !1 }) {
|
|
10
|
+
let y = s.currency, b = t({
|
|
11
|
+
apiStatus: s.status,
|
|
12
|
+
dueDate: s.due_date,
|
|
13
|
+
scheduledPaymentDate: s.scheduled_payment_date,
|
|
14
|
+
hasScheduledPayment: h
|
|
15
|
+
}), x = n(s), S = v ? _ : x?.bank_account, C = S?.account_number, w = !!(S?.account_holder_name && S.routing_number && S.account_number), T = e(s.issued_at) || m.notProvided, E = e(s.due_date) || m.notProvided, D = new Map(l.map((e) => [e.value, e.label])), O = [
|
|
16
|
+
{
|
|
17
|
+
label: m.subtotalRow,
|
|
18
|
+
minorUnits: s.subtotal
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: m.discountRow,
|
|
22
|
+
minorUnits: s.discount
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
label: m.taxRow,
|
|
26
|
+
minorUnits: s.tax_amount
|
|
27
|
+
}
|
|
28
|
+
].map((e) => ({
|
|
29
|
+
label: e.label,
|
|
30
|
+
value: a(e.minorUnits, y)
|
|
31
|
+
})).filter((e) => !!e.value), k = a(s.total_amount, y);
|
|
32
|
+
k && O.push({
|
|
33
|
+
label: m.totalRow,
|
|
34
|
+
value: k,
|
|
35
|
+
emphasis: !0
|
|
36
|
+
});
|
|
37
|
+
let A = o(s);
|
|
38
|
+
return {
|
|
39
|
+
amountDue: a(r(s), y) ?? "",
|
|
40
|
+
amountPaid: A ? a(s.amount_paid, y) : void 0,
|
|
41
|
+
paidOnLabel: A ? m.paidOnLabel(A) : void 0,
|
|
42
|
+
invoiceDateLabel: T,
|
|
43
|
+
dueDateLabel: E,
|
|
44
|
+
dueDateTone: b.isOverdue ? "danger" : "default",
|
|
45
|
+
status: b.status,
|
|
46
|
+
statusTone: b.tone,
|
|
47
|
+
payTo: {
|
|
48
|
+
name: x?.name || m.notProvided,
|
|
49
|
+
email: x?.email ?? "",
|
|
50
|
+
methodLabel: w ? m.paymentInstructionsValue(C?.slice(-4) ?? "") : m.paymentInstructionsNotSet,
|
|
51
|
+
fields: w ? [
|
|
52
|
+
{
|
|
53
|
+
label: m.accountHolderFieldLabel,
|
|
54
|
+
value: S?.account_holder_name ?? ""
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: m.routingNumberFieldLabel,
|
|
58
|
+
value: S?.routing_number ?? ""
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: m.accountNumberFieldLabel,
|
|
62
|
+
value: C ?? "",
|
|
63
|
+
maskedValue: i(C ?? void 0)
|
|
64
|
+
}
|
|
65
|
+
] : []
|
|
66
|
+
},
|
|
67
|
+
invoiceFields: [
|
|
68
|
+
{
|
|
69
|
+
label: m.invoiceDateRow,
|
|
70
|
+
value: T
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: m.dueDateRow,
|
|
74
|
+
value: E
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: m.invoiceNumberRow,
|
|
78
|
+
value: s.document_id || m.notProvided
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
lineItems: c.map((e) => {
|
|
82
|
+
let t = a(e.unit_price, y);
|
|
83
|
+
return {
|
|
84
|
+
id: e.id,
|
|
85
|
+
description: e.name ?? e.description ?? "",
|
|
86
|
+
glCodeLabel: e.ledger_account_id ? D.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, y) ?? ""
|
|
89
|
+
};
|
|
90
|
+
}),
|
|
91
|
+
amountRows: O,
|
|
92
|
+
approvalPolicy: p,
|
|
93
|
+
paymentHistory: f,
|
|
94
|
+
history: d,
|
|
95
|
+
rejection: g
|
|
96
|
+
};
|
|
4
97
|
}
|
|
5
98
|
//#endregion
|
|
6
|
-
export {
|
|
99
|
+
export { s as buildBillDetailView };
|
|
@@ -1,52 +1,6 @@
|
|
|
1
|
-
import { derivePayableStatus as e } from "./index7.js";
|
|
2
|
-
import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../ui/dist/index17.js";
|
|
3
|
-
import "../../ui/dist/index.js";
|
|
4
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
"credit_note_unlinked",
|
|
8
|
-
"line_item_added",
|
|
9
|
-
"line_item_updated",
|
|
10
|
-
"line_item_removed",
|
|
11
|
-
"deleted"
|
|
12
|
-
]);
|
|
13
|
-
function r(n, r, i) {
|
|
14
|
-
switch (n) {
|
|
15
|
-
case "payable_created": return r?.source_of_payable_data === "ocr" ? i.billUploaded : i.billAdded;
|
|
16
|
-
case "payable_updated": return i.billUpdated;
|
|
17
|
-
case "file_attached": return i.attachmentAdded;
|
|
18
|
-
case "submitted_for_approval": return i.submittedForApproval;
|
|
19
|
-
case "approval_requested": return i.approvalRequested;
|
|
20
|
-
case "approval_action": {
|
|
21
|
-
let e = r?.action, t = r?.reject_reason;
|
|
22
|
-
return e === "approve" ? i.approved : e === "reject" ? typeof t == "string" && t ? i.rejectedWithReason(t) : i.rejected : void 0;
|
|
23
|
-
}
|
|
24
|
-
case "auto_approved": return i.autoApproved;
|
|
25
|
-
case "reopened": return i.reopened;
|
|
26
|
-
case "marked_as_paid": return i.markedAsPaid;
|
|
27
|
-
case "marked_as_partially_paid": return i.markedAsPartiallyPaid;
|
|
28
|
-
case "payment_reverted": return i.paymentReverted;
|
|
29
|
-
case "status_changed": {
|
|
30
|
-
let n = r?.new_status;
|
|
31
|
-
if (typeof n != "string") return;
|
|
32
|
-
let a = e({ apiStatus: n }).status;
|
|
33
|
-
return i.statusChanged(t[a] ?? t.unknown);
|
|
34
|
-
}
|
|
35
|
-
default: return;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
function i(e, t, i) {
|
|
39
|
-
let a = new Map(t.map((e) => [e.id, e.name]));
|
|
40
|
-
return e.filter((e) => !n.has(e.event_type)).map((e) => {
|
|
41
|
-
let t = r(e.event_type, e.event_data, i);
|
|
42
|
-
if (!t) return;
|
|
43
|
-
let n = e.entity_user_id ? a.get(e.entity_user_id) : void 0;
|
|
44
|
-
return {
|
|
45
|
-
id: e.id,
|
|
46
|
-
dateLabel: i.dateLabel(e.timestamp),
|
|
47
|
-
description: n ? i.byActor(t, n) : t
|
|
48
|
-
};
|
|
49
|
-
}).filter((e) => !!e);
|
|
2
|
+
function e({ isUnsavedPromptOpen: e, isLocked: t, isDirty: n }) {
|
|
3
|
+
return e ? "dismiss-prompt" : !t && n ? "prompt" : "close";
|
|
50
4
|
}
|
|
51
5
|
//#endregion
|
|
52
|
-
export {
|
|
6
|
+
export { e as resolveEditorDismissal };
|
|
@@ -1,124 +1,52 @@
|
|
|
1
|
+
import { derivePayableStatus as e } from "./index8.js";
|
|
2
|
+
import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../ui/dist/index17.js";
|
|
3
|
+
import "../../ui/dist/index.js";
|
|
1
4
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
placeholder: "Tell the submitter what needs to change",
|
|
21
|
-
optionalHint: "Optional"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
cancel: {
|
|
25
|
-
title: "Cancel this bill?",
|
|
26
|
-
description: "Cancelling is permanent. The bill can't be reopened, edited, or paid afterwards.",
|
|
27
|
-
confirmButton: "Cancel bill"
|
|
28
|
-
},
|
|
29
|
-
cancelScheduledPayment: {
|
|
30
|
-
title: "Cancel this scheduled payment?",
|
|
31
|
-
description: "The payment will not be sent. The bill stays ready to pay, so you can schedule it again for another date.",
|
|
32
|
-
confirmButton: "Cancel payment"
|
|
33
|
-
},
|
|
34
|
-
forceApprove: {
|
|
35
|
-
title: "Override approval policy?",
|
|
36
|
-
description: "The below people haven't approved this bill yet. Approving now will bypass their required review. This will be recorded in the audit history and can't be undone.",
|
|
37
|
-
confirmButton: "Override and approve"
|
|
38
|
-
},
|
|
39
|
-
forceReject: {
|
|
40
|
-
title: "Override approval policy?",
|
|
41
|
-
description: "The below people haven't approved this bill yet. Rejecting now will bypass their required review. This will be recorded in the audit history and can't be undone.",
|
|
42
|
-
confirmButton: "Override and reject"
|
|
43
|
-
},
|
|
44
|
-
cancelButton: "Cancel"
|
|
45
|
-
},
|
|
46
|
-
actionError: "Couldn't update this bill. Try again.",
|
|
47
|
-
actionSuccess: {
|
|
48
|
-
approve: "Bill approved.",
|
|
49
|
-
reject: "Bill rejected.",
|
|
50
|
-
markAsPaid: "Bill marked as paid.",
|
|
51
|
-
cancel: "Bill canceled.",
|
|
52
|
-
cancelScheduledPayment: "Scheduled payment canceled.",
|
|
53
|
-
reopen: "Bill reopened.",
|
|
54
|
-
forceApprove: "Bill approved, overriding the approval policy.",
|
|
55
|
-
forceReject: "Bill rejected, overriding the approval policy."
|
|
56
|
-
}
|
|
57
|
-
}, t = (e) => `Payment scheduled for ${e}`, n = [
|
|
58
|
-
"reject",
|
|
59
|
-
"cancel",
|
|
60
|
-
"cancelScheduledPayment",
|
|
61
|
-
"forceApprove",
|
|
62
|
-
"forceReject"
|
|
63
|
-
];
|
|
64
|
-
function r(e, t) {
|
|
65
|
-
let n = e.reason ? {
|
|
66
|
-
...e.reason,
|
|
67
|
-
...t?.reason
|
|
68
|
-
} : void 0, r = {
|
|
69
|
-
...e,
|
|
70
|
-
...t,
|
|
71
|
-
reason: n
|
|
72
|
-
};
|
|
73
|
-
return n || delete r.reason, r;
|
|
74
|
-
}
|
|
75
|
-
function i(e, t) {
|
|
76
|
-
let i = {
|
|
77
|
-
...e,
|
|
78
|
-
...t
|
|
79
|
-
};
|
|
80
|
-
for (let a of n) i[a] = r(e[a], t?.[a]);
|
|
81
|
-
return i;
|
|
82
|
-
}
|
|
83
|
-
function a(t) {
|
|
84
|
-
let n = e;
|
|
85
|
-
return {
|
|
86
|
-
...n,
|
|
87
|
-
...t,
|
|
88
|
-
decisionDialog: i(n.decisionDialog, t?.decisionDialog),
|
|
89
|
-
actionSuccess: {
|
|
90
|
-
...n.actionSuccess,
|
|
91
|
-
...t?.actionSuccess
|
|
5
|
+
var n = /* @__PURE__ */ new Set([
|
|
6
|
+
"credit_note_linked",
|
|
7
|
+
"credit_note_unlinked",
|
|
8
|
+
"line_item_added",
|
|
9
|
+
"line_item_updated",
|
|
10
|
+
"line_item_removed",
|
|
11
|
+
"deleted"
|
|
12
|
+
]);
|
|
13
|
+
function r(n, r, i) {
|
|
14
|
+
switch (n) {
|
|
15
|
+
case "payable_created": return r?.source_of_payable_data === "ocr" ? i.billUploaded : i.billAdded;
|
|
16
|
+
case "payable_updated": return i.billUpdated;
|
|
17
|
+
case "file_attached": return i.attachmentAdded;
|
|
18
|
+
case "submitted_for_approval": return i.submittedForApproval;
|
|
19
|
+
case "approval_requested": return i.approvalRequested;
|
|
20
|
+
case "approval_action": {
|
|
21
|
+
let e = r?.action, t = r?.reject_reason;
|
|
22
|
+
return e === "approve" ? i.approved : e === "reject" ? typeof t == "string" && t ? i.rejectedWithReason(t) : i.rejected : void 0;
|
|
92
23
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
paymentHistoryPartiallyPaidLabel: "Partial payment",
|
|
106
|
-
paymentHistoryRevertedLabel: "Payment reverted",
|
|
107
|
-
paymentHistoryMethodLabels: {
|
|
108
|
-
ach: "ACH",
|
|
109
|
-
us_ach: "ACH",
|
|
110
|
-
wire: "Wire",
|
|
111
|
-
check: "Check",
|
|
112
|
-
paper_check: "Check",
|
|
113
|
-
bank_account: "Bank transfer",
|
|
114
|
-
card: "Card"
|
|
24
|
+
case "auto_approved": return i.autoApproved;
|
|
25
|
+
case "reopened": return i.reopened;
|
|
26
|
+
case "marked_as_paid": return i.markedAsPaid;
|
|
27
|
+
case "marked_as_partially_paid": return i.markedAsPartiallyPaid;
|
|
28
|
+
case "payment_reverted": return i.paymentReverted;
|
|
29
|
+
case "status_changed": {
|
|
30
|
+
let n = r?.new_status;
|
|
31
|
+
if (typeof n != "string") return;
|
|
32
|
+
let a = e({ apiStatus: n }).status;
|
|
33
|
+
return i.statusChanged(t[a] ?? t.unknown);
|
|
34
|
+
}
|
|
35
|
+
default: return;
|
|
115
36
|
}
|
|
116
|
-
}
|
|
117
|
-
function
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
37
|
+
}
|
|
38
|
+
function i(e, t, i) {
|
|
39
|
+
let a = new Map(t.map((e) => [e.id, e.name]));
|
|
40
|
+
return e.filter((e) => !n.has(e.event_type)).map((e) => {
|
|
41
|
+
let t = r(e.event_type, e.event_data, i);
|
|
42
|
+
if (!t) return;
|
|
43
|
+
let n = e.entity_user_id ? a.get(e.entity_user_id) : void 0;
|
|
44
|
+
return {
|
|
45
|
+
id: e.id,
|
|
46
|
+
dateLabel: i.dateLabel(e.timestamp),
|
|
47
|
+
description: n ? i.byActor(t, n) : t
|
|
48
|
+
};
|
|
49
|
+
}).filter((e) => !!e);
|
|
122
50
|
}
|
|
123
51
|
//#endregion
|
|
124
|
-
export {
|
|
52
|
+
export { i as buildBillHistory };
|