@tesouro/embedded-components-react 0.5.19 → 0.5.20
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/index6.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +4 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +78 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +98 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +3 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +47 -136
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +136 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +33 -187
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +188 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +22 -232
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +223 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +202 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +126 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +47 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +49 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +202 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +32 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +240 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +19 -434
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +436 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +4 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +35 -231
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +235 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +46 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +10 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +112 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +3 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +124 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +43 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +27 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +83 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +47 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +239 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +110 -206
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +213 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index10.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index11.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index12.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +24 -0
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index14.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index15.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index17.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index18.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index19.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index2.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index20.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index21.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index22.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index23.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index3.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index4.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index5.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index6.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index7.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index8.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index9.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index10.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index11.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index12.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index13.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index14.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index15.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index16.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index17.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index2.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index7.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index10.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index11.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index12.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index13.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index14.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index15.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index16.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index17.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index18.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index5.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index8.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +12 -1
- 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
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index11.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index13.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index2.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index4.js +0 -29
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index5.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index6.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index2.js +0 -9
- /package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index.js +0 -0
- /package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index.js +0 -0
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { RefreshingRootWidgetProvider as _ } from "./libs/tesouro-embedded-compo
|
|
|
14
14
|
import { useDisclosuresAcceptanceSurface as v, useOwnWidgetConfig as y, useRefetchWidget as b, useWidgetConfig as x, useWidgetError as S, useWidgetInitStaleForToken as C, useWidgetLoading as w } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
15
15
|
import { BankAccountsWidget as T } from "./libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js";
|
|
16
16
|
import { CounterpartsWidget as E } from "./libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js";
|
|
17
|
-
import { BillPayWidget as D } from "./libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/
|
|
17
|
+
import { BillPayWidget as D } from "./libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js";
|
|
18
18
|
import { CardDetailsWidget as O } from "./libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js";
|
|
19
19
|
import { CreditCardsWidget as k } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/index10.js";
|
|
20
20
|
import { DebitCardsWidget as A } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/index11.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { BillPayWidget as e } from "../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/
|
|
1
|
+
import { BillPayWidget as e } from "../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js";
|
|
3
3
|
export { e as BillPayWidget };
|
|
@@ -10,23 +10,23 @@ import "./index14.js";
|
|
|
10
10
|
import "./index27.js";
|
|
11
11
|
import "./index28.js";
|
|
12
12
|
import "./index39.js";
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
16
|
-
import "./
|
|
17
|
-
import "./index60.js";
|
|
13
|
+
import "./index42.js";
|
|
14
|
+
import "./index48.js";
|
|
15
|
+
import "./index57.js";
|
|
16
|
+
import "./index59.js";
|
|
18
17
|
import "./index61.js";
|
|
19
18
|
import "./index62.js";
|
|
20
19
|
import "./index63.js";
|
|
21
20
|
import "./index64.js";
|
|
22
|
-
import "./
|
|
21
|
+
import "./index65.js";
|
|
23
22
|
import "./index69.js";
|
|
24
23
|
import "./index70.js";
|
|
25
24
|
import "./index71.js";
|
|
26
25
|
import "./index72.js";
|
|
27
|
-
import "./
|
|
28
|
-
import "./
|
|
26
|
+
import "./index73.js";
|
|
27
|
+
import "./index76.js";
|
|
29
28
|
import "./index82.js";
|
|
30
29
|
import "./index83.js";
|
|
31
|
-
import
|
|
30
|
+
import "./index84.js";
|
|
31
|
+
import { BillPayWidget as e } from "./index88.js";
|
|
32
32
|
export { e as BillPayWidget };
|
|
@@ -1,94 +1,7 @@
|
|
|
1
|
-
import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
2
|
-
import { derivePayableStatus as t } from "./index7.js";
|
|
3
|
-
import { resolveVendor as n, resolveVendorName as r } from "./index8.js";
|
|
4
|
-
import { formatBillMoney as i } from "./index2.js";
|
|
5
|
-
import { resolveLineItemAmountMinorUnits as a } from "./index40.js";
|
|
6
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
dueDate: o.due_date,
|
|
11
|
-
scheduledPaymentDate: o.scheduled_payment_date,
|
|
12
|
-
hasScheduledPayment: d,
|
|
13
|
-
now: f
|
|
14
|
-
}), y = n(o), b = r(o), x = e(o.issued_at) || u.notProvided, S = e(o.due_date) || u.notProvided, C = [{
|
|
15
|
-
label: u.vendorRow,
|
|
16
|
-
value: b || u.notProvided,
|
|
17
|
-
secondaryValue: y?.email ?? void 0
|
|
18
|
-
}], w = h ? m?.account_number : void 0;
|
|
19
|
-
w && C.push({
|
|
20
|
-
label: u.bankAccountRow,
|
|
21
|
-
value: u.bankAccountValue(w.slice(-4))
|
|
22
|
-
});
|
|
23
|
-
let T = [
|
|
24
|
-
{
|
|
25
|
-
label: u.invoiceNumberRow,
|
|
26
|
-
value: o.document_id || u.notProvided
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
label: u.issueDateRow,
|
|
30
|
-
value: x
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
label: u.dueDateRow,
|
|
34
|
-
value: S
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
label: u.poNumberRow,
|
|
38
|
-
value: u.notProvided
|
|
39
|
-
}
|
|
40
|
-
], E = new Map(l.map((e) => [e.id, [e.nominal_code, e.name].filter(Boolean).join(" — ")])), D = c.map((e) => {
|
|
41
|
-
let t = _(e.unit_price);
|
|
42
|
-
return {
|
|
43
|
-
id: e.id,
|
|
44
|
-
description: e.name ?? e.description ?? "",
|
|
45
|
-
glCodeLabel: (e.ledger_account_id ? E.get(e.ledger_account_id) : void 0) || u.glCodeMissing,
|
|
46
|
-
quantityLabel: e.quantity != null && t ? u.quantityValue(String(e.quantity), t) : "",
|
|
47
|
-
amountLabel: _(a(e)) ?? ""
|
|
48
|
-
};
|
|
49
|
-
}), O = [
|
|
50
|
-
{
|
|
51
|
-
label: u.subtotalRow,
|
|
52
|
-
value: o.subtotal
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
label: u.discountsRow,
|
|
56
|
-
value: o.discount
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
label: u.taxRow,
|
|
60
|
-
value: o.tax_amount
|
|
61
|
-
}
|
|
62
|
-
].map(({ label: e, value: t }) => ({
|
|
63
|
-
label: e,
|
|
64
|
-
value: _(t)
|
|
65
|
-
})).filter((e) => !!e.value), k = _(o.total_amount);
|
|
66
|
-
k && O.push({
|
|
67
|
-
label: u.totalRow,
|
|
68
|
-
value: k,
|
|
69
|
-
emphasis: !0
|
|
70
|
-
});
|
|
71
|
-
let A = s(o);
|
|
72
|
-
return {
|
|
73
|
-
title: b,
|
|
74
|
-
subtitle: u.subtitle,
|
|
75
|
-
status: v.status,
|
|
76
|
-
statusTone: v.tone,
|
|
77
|
-
amountDueLabel: _(o.amount_due) ?? _(o.total_amount) ?? "",
|
|
78
|
-
amountPaidLabel: A ? _(o.amount_paid) : void 0,
|
|
79
|
-
paidOnLabel: A ? u.paidOnLabel(A) : void 0,
|
|
80
|
-
invoiceDateLabel: x,
|
|
81
|
-
dueDateLabel: S,
|
|
82
|
-
dueDateTone: v.isOverdue ? "danger" : "default",
|
|
83
|
-
payToItems: C,
|
|
84
|
-
invoiceItems: T,
|
|
85
|
-
lineItems: D,
|
|
86
|
-
totals: O,
|
|
87
|
-
rejection: p
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
function s(t) {
|
|
91
|
-
return t.status === "paid" && t.paid_at ? e(t.paid_at.slice(0, 10)) : void 0;
|
|
2
|
+
var e = (e) => typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
3
|
+
function t({ quantity: t, unit_price: n, subtotal: r }) {
|
|
4
|
+
return e(t) ? t : e(n) && e(r) && r % n === 0 ? r / n : 1;
|
|
92
5
|
}
|
|
93
6
|
//#endregion
|
|
94
|
-
export {
|
|
7
|
+
export { t as resolveLineItemQuantity };
|
|
@@ -1,100 +1,95 @@
|
|
|
1
1
|
import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
2
2
|
import { derivePayableStatus as t } from "./index7.js";
|
|
3
|
-
import { resolveVendor as n } from "./index8.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { resolveLineItemAmountMinorUnits as o } from "./index40.js";
|
|
8
|
-
import { getPaidAtLabel as s } from "./index41.js";
|
|
3
|
+
import { resolveVendor as n, resolveVendorName as r } from "./index8.js";
|
|
4
|
+
import { formatBillMoney as i } from "./index2.js";
|
|
5
|
+
import { resolveLineItemAmountMinorUnits as a } from "./index40.js";
|
|
6
|
+
import { resolveLineItemQuantity as o } from "./index41.js";
|
|
9
7
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js
|
|
10
|
-
function
|
|
11
|
-
let
|
|
12
|
-
apiStatus:
|
|
13
|
-
dueDate:
|
|
14
|
-
scheduledPaymentDate:
|
|
15
|
-
hasScheduledPayment:
|
|
16
|
-
|
|
8
|
+
function s({ payable: s, lineItems: l, ledgerAccounts: u, labels: d, hasScheduledPayment: f, now: p, rejection: m, achInstructions: h, achInstructionsReadable: g = !1 }) {
|
|
9
|
+
let _ = s.currency, v = (e) => i(e, _), y = t({
|
|
10
|
+
apiStatus: s.status,
|
|
11
|
+
dueDate: s.due_date,
|
|
12
|
+
scheduledPaymentDate: s.scheduled_payment_date,
|
|
13
|
+
hasScheduledPayment: f,
|
|
14
|
+
now: p
|
|
15
|
+
}), b = n(s), x = r(s), S = e(s.issued_at) || d.notProvided, C = e(s.due_date) || d.notProvided, w = [{
|
|
16
|
+
label: d.vendorRow,
|
|
17
|
+
value: x || d.notProvided,
|
|
18
|
+
secondaryValue: b?.email ?? void 0
|
|
19
|
+
}], T = g ? h?.account_number : void 0;
|
|
20
|
+
T && w.push({
|
|
21
|
+
label: d.bankAccountRow,
|
|
22
|
+
value: d.bankAccountValue(T.slice(-4))
|
|
23
|
+
});
|
|
24
|
+
let E = [
|
|
25
|
+
{
|
|
26
|
+
label: d.invoiceNumberRow,
|
|
27
|
+
value: s.document_id || d.notProvided
|
|
28
|
+
},
|
|
17
29
|
{
|
|
18
|
-
label:
|
|
19
|
-
|
|
30
|
+
label: d.issueDateRow,
|
|
31
|
+
value: S
|
|
20
32
|
},
|
|
21
33
|
{
|
|
22
|
-
label:
|
|
23
|
-
|
|
34
|
+
label: d.dueDateRow,
|
|
35
|
+
value: C
|
|
24
36
|
},
|
|
25
37
|
{
|
|
26
|
-
label:
|
|
27
|
-
|
|
38
|
+
label: d.poNumberRow,
|
|
39
|
+
value: d.notProvided
|
|
28
40
|
}
|
|
29
|
-
].map((e) => ({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
41
|
+
], D = new Map(u.map((e) => [e.id, [e.nominal_code, e.name].filter(Boolean).join(" — ")])), O = l.map((e) => {
|
|
42
|
+
let t = v(e.unit_price), n = String(o(e));
|
|
43
|
+
return {
|
|
44
|
+
id: e.id,
|
|
45
|
+
description: e.name ?? e.description ?? "",
|
|
46
|
+
glCodeLabel: (e.ledger_account_id ? D.get(e.ledger_account_id) : void 0) || d.glCodeMissing,
|
|
47
|
+
quantityLabel: t ? d.quantityValue(n, t) : d.quantityOnlyValue(n),
|
|
48
|
+
amountLabel: v(a(e)) ?? ""
|
|
49
|
+
};
|
|
50
|
+
}), k = [
|
|
51
|
+
{
|
|
52
|
+
label: d.subtotalRow,
|
|
53
|
+
value: s.subtotal
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
label: d.discountsRow,
|
|
57
|
+
value: s.discount
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: d.taxRow,
|
|
61
|
+
value: s.tax_amount
|
|
62
|
+
}
|
|
63
|
+
].map(({ label: e, value: t }) => ({
|
|
64
|
+
label: e,
|
|
65
|
+
value: v(t)
|
|
66
|
+
})).filter((e) => !!e.value), A = v(s.total_amount);
|
|
33
67
|
A && k.push({
|
|
34
|
-
label:
|
|
68
|
+
label: d.totalRow,
|
|
35
69
|
value: A,
|
|
36
70
|
emphasis: !0
|
|
37
71
|
});
|
|
38
|
-
let j = s
|
|
72
|
+
let j = c(s);
|
|
39
73
|
return {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
value: C?.account_holder_name ?? ""
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
label: h.routingNumberFieldLabel,
|
|
59
|
-
value: C?.routing_number ?? ""
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: h.accountNumberFieldLabel,
|
|
63
|
-
value: w ?? "",
|
|
64
|
-
maskedValue: i(w ?? void 0)
|
|
65
|
-
}
|
|
66
|
-
] : []
|
|
67
|
-
},
|
|
68
|
-
invoiceFields: [
|
|
69
|
-
{
|
|
70
|
-
label: h.invoiceDateRow,
|
|
71
|
-
value: E
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
label: h.dueDateRow,
|
|
75
|
-
value: D
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
label: h.invoiceNumberRow,
|
|
79
|
-
value: c.document_id || h.notProvided
|
|
80
|
-
}
|
|
81
|
-
],
|
|
82
|
-
lineItems: l.map((e) => {
|
|
83
|
-
let t = a(e.unit_price, b);
|
|
84
|
-
return {
|
|
85
|
-
id: e.id,
|
|
86
|
-
description: e.name ?? e.description ?? "",
|
|
87
|
-
glCodeLabel: e.ledger_account_id ? O.get(e.ledger_account_id) ?? (d ? h.glCodeMissing : h.glCodeUnavailable) : h.glCodeMissing,
|
|
88
|
-
qtyPriceLabel: e.quantity != null && t ? h.qtyPriceValue(String(e.quantity), t) : "",
|
|
89
|
-
amount: a(o(e), b) ?? ""
|
|
90
|
-
};
|
|
91
|
-
}),
|
|
92
|
-
amountRows: k,
|
|
93
|
-
approvalPolicy: m,
|
|
94
|
-
paymentHistory: p,
|
|
95
|
-
history: f,
|
|
96
|
-
rejection: _
|
|
74
|
+
title: x,
|
|
75
|
+
subtitle: d.subtitle,
|
|
76
|
+
status: y.status,
|
|
77
|
+
statusTone: y.tone,
|
|
78
|
+
amountDueLabel: v(s.amount_due) ?? v(s.total_amount) ?? "",
|
|
79
|
+
amountPaidLabel: j ? v(s.amount_paid) : void 0,
|
|
80
|
+
paidOnLabel: j ? d.paidOnLabel(j) : void 0,
|
|
81
|
+
invoiceDateLabel: S,
|
|
82
|
+
dueDateLabel: C,
|
|
83
|
+
dueDateTone: y.isOverdue ? "danger" : "default",
|
|
84
|
+
payToItems: w,
|
|
85
|
+
invoiceItems: E,
|
|
86
|
+
lineItems: O,
|
|
87
|
+
totals: k,
|
|
88
|
+
rejection: m
|
|
97
89
|
};
|
|
98
90
|
}
|
|
91
|
+
function c(t) {
|
|
92
|
+
return t.status === "paid" && t.paid_at ? e(t.paid_at.slice(0, 10)) : void 0;
|
|
93
|
+
}
|
|
99
94
|
//#endregion
|
|
100
|
-
export { c as
|
|
95
|
+
export { c as getPaidAtLabel, s as mapPayableToBillDetails };
|
|
@@ -1,6 +1,101 @@
|
|
|
1
|
+
import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
2
|
+
import { derivePayableStatus as t } from "./index7.js";
|
|
3
|
+
import { resolveVendor as n } from "./index8.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 { resolveLineItemAmountMinorUnits as o } from "./index40.js";
|
|
8
|
+
import { resolveLineItemQuantity as s } from "./index41.js";
|
|
9
|
+
import { getPaidAtLabel as c } from "./index42.js";
|
|
1
10
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js
|
|
2
|
-
function
|
|
3
|
-
|
|
11
|
+
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 }) {
|
|
12
|
+
let x = l.currency, S = t({
|
|
13
|
+
apiStatus: l.status,
|
|
14
|
+
dueDate: l.due_date,
|
|
15
|
+
scheduledPaymentDate: l.scheduled_payment_date,
|
|
16
|
+
hasScheduledPayment: _
|
|
17
|
+
}), 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 = [
|
|
18
|
+
{
|
|
19
|
+
label: g.subtotalRow,
|
|
20
|
+
minorUnits: l.subtotal
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: g.discountRow,
|
|
24
|
+
minorUnits: l.discount
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: g.taxRow,
|
|
28
|
+
minorUnits: l.tax_amount
|
|
29
|
+
}
|
|
30
|
+
].map((e) => ({
|
|
31
|
+
label: e.label,
|
|
32
|
+
value: a(e.minorUnits, x)
|
|
33
|
+
})).filter((e) => !!e.value), j = a(l.total_amount, x);
|
|
34
|
+
j && A.push({
|
|
35
|
+
label: g.totalRow,
|
|
36
|
+
value: j,
|
|
37
|
+
emphasis: !0
|
|
38
|
+
});
|
|
39
|
+
let M = c(l);
|
|
40
|
+
return {
|
|
41
|
+
amountDue: a(r(l), x) ?? "",
|
|
42
|
+
amountPaid: M ? a(l.amount_paid, x) : void 0,
|
|
43
|
+
paidOnLabel: M ? g.paidOnLabel(M) : void 0,
|
|
44
|
+
invoiceDateLabel: D,
|
|
45
|
+
dueDateLabel: O,
|
|
46
|
+
dueDateTone: S.isOverdue ? "danger" : "default",
|
|
47
|
+
status: S.status,
|
|
48
|
+
statusTone: S.tone,
|
|
49
|
+
payTo: {
|
|
50
|
+
name: C?.name || g.notProvided,
|
|
51
|
+
email: C?.email ?? "",
|
|
52
|
+
methodLabel: E ? g.paymentInstructionsValue(T?.slice(-4) ?? "") : g.paymentInstructionsNotSet,
|
|
53
|
+
fields: E ? [
|
|
54
|
+
{
|
|
55
|
+
label: g.accountHolderFieldLabel,
|
|
56
|
+
value: w?.account_holder_name ?? ""
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
label: g.routingNumberFieldLabel,
|
|
60
|
+
value: w?.routing_number ?? ""
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
label: g.accountNumberFieldLabel,
|
|
64
|
+
value: T ?? "",
|
|
65
|
+
maskedValue: i(T ?? void 0)
|
|
66
|
+
}
|
|
67
|
+
] : []
|
|
68
|
+
},
|
|
69
|
+
invoiceFields: [
|
|
70
|
+
{
|
|
71
|
+
label: g.invoiceDateRow,
|
|
72
|
+
value: D
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: g.dueDateRow,
|
|
76
|
+
value: O
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: g.invoiceNumberRow,
|
|
80
|
+
value: l.document_id || g.notProvided
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
lineItems: u.map((e) => {
|
|
84
|
+
let t = a(e.unit_price, x), n = String(s(e));
|
|
85
|
+
return {
|
|
86
|
+
id: e.id,
|
|
87
|
+
description: e.name ?? e.description ?? "",
|
|
88
|
+
glCodeLabel: e.ledger_account_id ? k.get(e.ledger_account_id) ?? (f ? g.glCodeMissing : g.glCodeUnavailable) : g.glCodeMissing,
|
|
89
|
+
qtyPriceLabel: t ? g.qtyPriceValue(n, t) : g.qtyOnlyValue(n),
|
|
90
|
+
amount: a(o(e), x) ?? ""
|
|
91
|
+
};
|
|
92
|
+
}),
|
|
93
|
+
amountRows: A,
|
|
94
|
+
approvalPolicy: h,
|
|
95
|
+
paymentHistory: m,
|
|
96
|
+
history: p,
|
|
97
|
+
rejection: v
|
|
98
|
+
};
|
|
4
99
|
}
|
|
5
100
|
//#endregion
|
|
6
|
-
export {
|
|
101
|
+
export { l 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/index44.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 };
|