@tesouro/embedded-components-react 0.9.24 → 0.9.26
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/README.md +13 -0
- package/dist/index.css +93 -55
- package/dist/index.d.ts +53 -3
- package/dist/index.js +9 -7
- package/dist/lib/AccountsQuickViewWidget.d.ts +650 -0
- package/dist/lib/AccountsQuickViewWidget.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/accounts-quick-view-widget/data-access/dist/index.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/accounts-quick-view-widget/data-access/dist/index2.js +21 -0
- package/dist/libs/tesouro-embedded-components-react/accounts-quick-view-widget/feature/dist/index.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/accounts-quick-view-widget/feature/dist/lib/AccountsQuickViewWidget/AccountsQuickViewWidgetFeature.js +82 -0
- package/dist/libs/tesouro-embedded-components-react/accounts-quick-view-widget/feature/dist/lib/AccountsQuickViewWidget/labels.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/accounts-quick-view-widget/feature/dist/lib/AccountsQuickViewWidget/testIds.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/accounts-quick-view-widget/feature/dist/lib/accountsBalanceSummary/summarizeAccountBalances.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/accounts-quick-view-widget/feature/dist/lib/accountsBalanceSummary/useAccountsBalanceSummary.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/accounts-quick-view-widget/feature/dist/lib/analytics/events.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/accounts-quick-view-widget/ui/dist/index.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/accounts-quick-view-widget/ui/dist/index2.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/accounts-quick-view-widget/ui/dist/index3.js +31 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index10.js +14 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index11.js +59 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index12.js +10 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index13.js +9 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index14.js +7 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index15.js +9 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index16.js +29 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index17.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index18.js +14 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index19.js +155 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index20.js +13 -157
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index21.js +18 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +32 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +99 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +69 -85
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +3 -85
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +57 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +114 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +190 -111
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index29.js +75 -187
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index3.js +35 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index30.js +67 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +111 -69
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +461 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +102 -452
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +12 -116
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +85 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +67 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +231 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +38 -232
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +245 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +169 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +21 -252
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +534 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +4 -542
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +43 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +236 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +3 -240
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +63 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +1 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +82 -225
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index6.js +45 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index7.js +4 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index8.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index9.js +8 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index36.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +138 -155
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +48 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +219 -207
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index4.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index6.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index7.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +1 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +278 -322
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/mocks/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +18 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index10.js +2 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index11.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +39 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +2 -78
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +78 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +25 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +28 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +2 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +7 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +34 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index6.js +31 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +1 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index8.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index9.js +52 -2
- 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/quick-view/ui/dist/index.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/shared/quick-view/ui/dist/index2.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/shared/quick-view/ui/dist/index3.js +100 -0
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/themeTokens.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +4696 -4681
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index49.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +0 -29
|
@@ -1,104 +1,88 @@
|
|
|
1
1
|
import { formatCalendarDate as e } from "../../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
2
2
|
import "../../../../shared/util/dist/index.js";
|
|
3
3
|
import { formatBillMoney as t } from "../../../util/dist/lib/formatBillMoney.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { resolveAmountDueMinorUnits as n } from "../../../util/dist/lib/resolveAmountDue.js";
|
|
5
|
+
import { resolveLineItemAmountMinorUnits as r } from "../../../util/dist/lib/resolveLineItemAmount.js";
|
|
6
|
+
import { resolveLineItemQuantity as i } from "../../../util/dist/lib/resolveLineItemQuantity.js";
|
|
7
|
+
import { resolveVendor as a } from "../../../util/dist/lib/resolveVendor.js";
|
|
7
8
|
import "../../../util/dist/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
9
|
+
import { derivePayableStatus as o } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
|
|
10
|
+
import { getPaidAtLabel as s, resolveInvoiceTotalMinorUnits as c } from "./index23.js";
|
|
10
11
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
let b = u.currency, x = (e) => t(e, b), S = s({
|
|
19
|
-
apiStatus: u.status,
|
|
20
|
-
dueDate: u.due_date,
|
|
21
|
-
scheduledPaymentDate: u.scheduled_payment_date,
|
|
22
|
-
hasScheduledPayment: h,
|
|
23
|
-
now: g
|
|
24
|
-
}), C = i(u), w = a(u), T = e(u.issued_at) || m.notProvided, E = e(u.due_date) || m.notProvided, D = [{
|
|
25
|
-
label: m.vendorRow,
|
|
26
|
-
value: w || m.notProvided,
|
|
27
|
-
secondaryValue: C?.email ?? void 0
|
|
28
|
-
}], O = y ? v?.account_number : void 0;
|
|
29
|
-
O && D.push({
|
|
30
|
-
label: m.bankAccountRow,
|
|
31
|
-
value: m.bankAccountValue(O.slice(-4))
|
|
32
|
-
});
|
|
33
|
-
let k = [
|
|
34
|
-
{
|
|
35
|
-
label: m.invoiceNumberRow,
|
|
36
|
-
value: u.document_id || m.notProvided
|
|
37
|
-
},
|
|
12
|
+
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 }) {
|
|
13
|
+
let x = l.currency, S = o({
|
|
14
|
+
apiStatus: l.status,
|
|
15
|
+
dueDate: l.due_date,
|
|
16
|
+
scheduledPaymentDate: l.scheduled_payment_date,
|
|
17
|
+
hasScheduledPayment: _
|
|
18
|
+
}), C = a(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 = [
|
|
38
19
|
{
|
|
39
|
-
label:
|
|
40
|
-
|
|
20
|
+
label: g.subtotalRow,
|
|
21
|
+
minorUnits: l.subtotal
|
|
41
22
|
},
|
|
42
23
|
{
|
|
43
|
-
label:
|
|
44
|
-
|
|
24
|
+
label: g.discountRow,
|
|
25
|
+
minorUnits: l.discount
|
|
45
26
|
},
|
|
46
27
|
{
|
|
47
|
-
label:
|
|
48
|
-
|
|
28
|
+
label: g.taxRow,
|
|
29
|
+
minorUnits: l.tax_amount
|
|
49
30
|
}
|
|
50
|
-
]
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
amountLabel: x(n(e)) ?? ""
|
|
58
|
-
};
|
|
59
|
-
}), M = [
|
|
60
|
-
{
|
|
61
|
-
label: m.subtotalRow,
|
|
62
|
-
value: u.subtotal
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label: m.discountsRow,
|
|
66
|
-
value: u.discount
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
label: m.taxRow,
|
|
70
|
-
value: u.tax_amount
|
|
71
|
-
}
|
|
72
|
-
].map(({ label: e, value: t }) => ({
|
|
73
|
-
label: e,
|
|
74
|
-
value: x(t)
|
|
75
|
-
})).filter((e) => !!e.value), N = x(c(u));
|
|
76
|
-
N && M.push({
|
|
77
|
-
label: m.totalRow,
|
|
78
|
-
value: N,
|
|
31
|
+
].map((e) => ({
|
|
32
|
+
label: e.label,
|
|
33
|
+
value: t(e.minorUnits, x)
|
|
34
|
+
})).filter((e) => !!e.value), j = t(c(l), x);
|
|
35
|
+
j && A.push({
|
|
36
|
+
label: g.totalRow,
|
|
37
|
+
value: j,
|
|
79
38
|
emphasis: !0
|
|
80
39
|
});
|
|
81
|
-
let
|
|
40
|
+
let M = s(l);
|
|
82
41
|
return {
|
|
83
|
-
|
|
84
|
-
|
|
42
|
+
amountDue: t(n(l), x) ?? "",
|
|
43
|
+
amountPaid: M ? t(l.amount_paid, x) : void 0,
|
|
44
|
+
paidOnLabel: M ? g.paidOnLabel(M) : void 0,
|
|
45
|
+
invoiceDateLabel: D,
|
|
46
|
+
dueDateLabel: O,
|
|
47
|
+
dueDateTone: S.isOverdue ? "danger" : "default",
|
|
85
48
|
status: S.status,
|
|
86
49
|
statusTone: S.tone,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
50
|
+
payTo: {
|
|
51
|
+
name: C?.name || g.notProvided,
|
|
52
|
+
email: C?.email ?? "",
|
|
53
|
+
methodLabel: E ? g.paymentInstructionsValue(T?.slice(-4) ?? "") : g.paymentInstructionsNotSet,
|
|
54
|
+
hasPaymentInstructions: E
|
|
55
|
+
},
|
|
56
|
+
invoiceFields: [
|
|
57
|
+
{
|
|
58
|
+
label: g.invoiceDateRow,
|
|
59
|
+
value: D
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: g.dueDateRow,
|
|
63
|
+
value: O
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
label: g.invoiceNumberRow,
|
|
67
|
+
value: l.document_id || g.notProvided
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
lineItems: u.map((e) => {
|
|
71
|
+
let n = t(e.unit_price, x), a = String(i(e));
|
|
72
|
+
return {
|
|
73
|
+
id: e.id,
|
|
74
|
+
description: e.name ?? e.description ?? "",
|
|
75
|
+
glCodeLabel: e.ledger_account_id ? k.get(e.ledger_account_id) ?? (f ? g.glCodeMissing : g.glCodeUnavailable) : g.glCodeMissing,
|
|
76
|
+
qtyPriceLabel: n ? g.qtyPriceValue(a, n) : g.qtyOnlyValue(a),
|
|
77
|
+
amount: t(r(e), x) ?? ""
|
|
78
|
+
};
|
|
79
|
+
}),
|
|
80
|
+
amountRows: A,
|
|
81
|
+
approvalPolicy: h,
|
|
82
|
+
paymentHistory: m,
|
|
83
|
+
history: p,
|
|
84
|
+
rejection: v
|
|
98
85
|
};
|
|
99
86
|
}
|
|
100
|
-
function d(t) {
|
|
101
|
-
return t.status === "paid" && t.paid_at ? e(t.paid_at.slice(0, 10)) : void 0;
|
|
102
|
-
}
|
|
103
87
|
//#endregion
|
|
104
|
-
export {
|
|
88
|
+
export { l as buildBillDetailView };
|
|
@@ -1,88 +1,6 @@
|
|
|
1
|
-
import { formatCalendarDate as e } from "../../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
2
|
-
import "../../../../shared/util/dist/index.js";
|
|
3
|
-
import { formatBillMoney as t } from "../../../util/dist/lib/formatBillMoney.js";
|
|
4
|
-
import { resolveAmountDueMinorUnits as n } from "../../../util/dist/lib/resolveAmountDue.js";
|
|
5
|
-
import { resolveLineItemAmountMinorUnits as r } from "../../../util/dist/lib/resolveLineItemAmount.js";
|
|
6
|
-
import { resolveLineItemQuantity as i } from "../../../util/dist/lib/resolveLineItemQuantity.js";
|
|
7
|
-
import { resolveVendor as a } from "../../../util/dist/lib/resolveVendor.js";
|
|
8
|
-
import "../../../util/dist/index.js";
|
|
9
|
-
import { derivePayableStatus as o } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
|
|
10
|
-
import { getPaidAtLabel as s, resolveInvoiceTotalMinorUnits as c } from "./index24.js";
|
|
11
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
apiStatus: l.status,
|
|
15
|
-
dueDate: l.due_date,
|
|
16
|
-
scheduledPaymentDate: l.scheduled_payment_date,
|
|
17
|
-
hasScheduledPayment: _
|
|
18
|
-
}), C = a(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 = [
|
|
19
|
-
{
|
|
20
|
-
label: g.subtotalRow,
|
|
21
|
-
minorUnits: l.subtotal
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
label: g.discountRow,
|
|
25
|
-
minorUnits: l.discount
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
label: g.taxRow,
|
|
29
|
-
minorUnits: l.tax_amount
|
|
30
|
-
}
|
|
31
|
-
].map((e) => ({
|
|
32
|
-
label: e.label,
|
|
33
|
-
value: t(e.minorUnits, x)
|
|
34
|
-
})).filter((e) => !!e.value), j = t(c(l), x);
|
|
35
|
-
j && A.push({
|
|
36
|
-
label: g.totalRow,
|
|
37
|
-
value: j,
|
|
38
|
-
emphasis: !0
|
|
39
|
-
});
|
|
40
|
-
let M = s(l);
|
|
41
|
-
return {
|
|
42
|
-
amountDue: t(n(l), x) ?? "",
|
|
43
|
-
amountPaid: M ? t(l.amount_paid, x) : void 0,
|
|
44
|
-
paidOnLabel: M ? g.paidOnLabel(M) : void 0,
|
|
45
|
-
invoiceDateLabel: D,
|
|
46
|
-
dueDateLabel: O,
|
|
47
|
-
dueDateTone: S.isOverdue ? "danger" : "default",
|
|
48
|
-
status: S.status,
|
|
49
|
-
statusTone: S.tone,
|
|
50
|
-
payTo: {
|
|
51
|
-
name: C?.name || g.notProvided,
|
|
52
|
-
email: C?.email ?? "",
|
|
53
|
-
methodLabel: E ? g.paymentInstructionsValue(T?.slice(-4) ?? "") : g.paymentInstructionsNotSet,
|
|
54
|
-
hasPaymentInstructions: E
|
|
55
|
-
},
|
|
56
|
-
invoiceFields: [
|
|
57
|
-
{
|
|
58
|
-
label: g.invoiceDateRow,
|
|
59
|
-
value: D
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: g.dueDateRow,
|
|
63
|
-
value: O
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
label: g.invoiceNumberRow,
|
|
67
|
-
value: l.document_id || g.notProvided
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
lineItems: u.map((e) => {
|
|
71
|
-
let n = t(e.unit_price, x), a = String(i(e));
|
|
72
|
-
return {
|
|
73
|
-
id: e.id,
|
|
74
|
-
description: e.name ?? e.description ?? "",
|
|
75
|
-
glCodeLabel: e.ledger_account_id ? k.get(e.ledger_account_id) ?? (f ? g.glCodeMissing : g.glCodeUnavailable) : g.glCodeMissing,
|
|
76
|
-
qtyPriceLabel: n ? g.qtyPriceValue(a, n) : g.qtyOnlyValue(a),
|
|
77
|
-
amount: t(r(e), x) ?? ""
|
|
78
|
-
};
|
|
79
|
-
}),
|
|
80
|
-
amountRows: A,
|
|
81
|
-
approvalPolicy: h,
|
|
82
|
-
paymentHistory: m,
|
|
83
|
-
history: p,
|
|
84
|
-
rejection: v
|
|
85
|
-
};
|
|
2
|
+
function e({ isUnsavedPromptOpen: e, isLocked: t, isDirty: n }) {
|
|
3
|
+
return e ? "dismiss-prompt" : !t && n ? "prompt" : "close";
|
|
86
4
|
}
|
|
87
5
|
//#endregion
|
|
88
|
-
export {
|
|
6
|
+
export { e as resolveEditorDismissal };
|
|
@@ -1,6 +1,59 @@
|
|
|
1
|
+
import { formatCalendarDate as e } from "../../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
2
|
+
import "../../../../shared/util/dist/index.js";
|
|
3
|
+
import { formatBillMoney as t } from "../../../util/dist/lib/formatBillMoney.js";
|
|
4
|
+
import "../../../util/dist/index.js";
|
|
1
5
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
6
|
+
var n = {
|
|
7
|
+
dateLabel: (e) => new Date(e).toLocaleDateString("en-US", {
|
|
8
|
+
month: "short",
|
|
9
|
+
day: "numeric",
|
|
10
|
+
year: "numeric"
|
|
11
|
+
}),
|
|
12
|
+
timeLabel: (e) => new Date(e).toLocaleTimeString(void 0, {
|
|
13
|
+
hour: "numeric",
|
|
14
|
+
minute: "2-digit",
|
|
15
|
+
timeZoneName: "short"
|
|
16
|
+
}),
|
|
17
|
+
byActor: (e, t) => `${e} by ${t}`,
|
|
18
|
+
formatAmount: (e) => t(e) ?? "",
|
|
19
|
+
billCreated: "Bill created",
|
|
20
|
+
createdManually: "Data entered manually",
|
|
21
|
+
createdFromUpload: "File uploaded and scanned automatically",
|
|
22
|
+
billCreatedByEmail: "Bill created by email",
|
|
23
|
+
sentFrom: (e) => `Sent from ${e}`,
|
|
24
|
+
billDetailsUpdated: "Bill details updated",
|
|
25
|
+
filledInFromFile: "Filled in from the attached file",
|
|
26
|
+
submittedForReview: "Finalized and submitted for review",
|
|
27
|
+
approvalRequested: "Approval requested",
|
|
28
|
+
approved: "Approved",
|
|
29
|
+
approvedAutomatically: "Auto-approved",
|
|
30
|
+
rejected: "Rejected",
|
|
31
|
+
policyOverrideApproved: "Policy override: Approved",
|
|
32
|
+
policyOverrideRejected: "Policy override: Rejected",
|
|
33
|
+
quotedReason: (e) => `"${e}"`,
|
|
34
|
+
cancelled: "Cancelled",
|
|
35
|
+
reopened: "Re-opened",
|
|
36
|
+
paymentReleased: "Payment released",
|
|
37
|
+
paid: (e) => `Paid ${e}`,
|
|
38
|
+
paymentReverted: "Payment reverted",
|
|
39
|
+
calendarDateLabel: (t) => e(t),
|
|
40
|
+
paymentScheduled: "Payment scheduled",
|
|
41
|
+
scheduledFor: (e) => `Scheduled for ${e}`,
|
|
42
|
+
scheduledPaymentCancelled: "Scheduled payment cancelled",
|
|
43
|
+
cancelledAsBillChanged: "The bill was changed",
|
|
44
|
+
cancelledAsBillDeleted: "The bill was deleted",
|
|
45
|
+
paymentFailed: "Payment failed",
|
|
46
|
+
billMarkedAsFullyPaid: "Bill marked as fully paid",
|
|
47
|
+
billMarkedAsPartiallyPaid: "Bill marked as partially paid",
|
|
48
|
+
draftDeleted: "Draft deleted",
|
|
49
|
+
fileAttached: "File attached",
|
|
50
|
+
fileRemoved: "File removed",
|
|
51
|
+
creditNoteLinked: "Credit note linked",
|
|
52
|
+
creditNoteUnlinked: "Credit note unlinked",
|
|
53
|
+
lineItemsUpdated: "Line items updated",
|
|
54
|
+
lineItemAdded: "Line item added",
|
|
55
|
+
lineItemUpdated: "Line item updated",
|
|
56
|
+
lineItemRemoved: "Line item removed"
|
|
57
|
+
};
|
|
5
58
|
//#endregion
|
|
6
|
-
export {
|
|
59
|
+
export { n as PAYABLE_AUDIT_HISTORY_LABELS_EN };
|