@tesouro/embedded-components-react 0.11.188 → 0.11.190
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 +12 -8
- package/dist/fixtures/index.d.ts +13 -46
- package/dist/index.css +3 -0
- package/dist/index.d.ts +18 -1
- package/dist/index.js +40 -39
- package/dist/lib/BankAccountsWidget.d.ts +2 -0
- package/dist/lib/BillPayWidget.d.ts +16 -1
- package/dist/lib/BillPayWidget.js +3 -1
- package/dist/lib/WidgetSuite.d.ts +2 -0
- package/dist/libs/tesouro-embedded-components-react/balance-history-widget/feature/dist/lib/BalanceHistoryWidget/BalanceHistoryWidgetFeature.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/lib/BalancesWidget/BalancesWidgetContext.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index2.js +17 -14
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/formatters.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/labels.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/useBankAccountsWidget.js +9 -3
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/AccountCard.js +76 -58
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +180 -180
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +62 -62
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +20 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index10.js +101 -58
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index11.js +19 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index15.js +169 -138
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +227 -204
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +208 -204
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index19.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index21.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index23.js +212 -212
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index9.js +9 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +43 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +66 -64
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/index.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +21 -21
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +20 -20
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +4 -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/transfers-widget/feature/dist/lib/TransfersWidget/TransfersWidgetInner.js +77 -77
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/transferViews.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/useTransferMoneyModalController.js +129 -122
- package/dist/packages/shared-ui-shadcn/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { AuditHistoryList as e, Badge as t, Button as n, CollapsibleSection as r, Sheet as i, SheetContent as a, SheetDescription as o, SheetHeader as s, SheetTitle as c, Skeleton as l, Typography as u } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { DueDateText as d } from "../../../../shared/ui/dist/lib/DueDateText/DueDateText.js";
|
|
3
3
|
import "../../../../shared/ui/dist/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { BillActionButtons as f, NO_BILL_ACTIONS as p } from "../../../ui/dist/index2.js";
|
|
5
|
+
import { BillOverflowMenu as m } from "../../../ui/dist/index11.js";
|
|
6
|
+
import "../../../ui/dist/index.js";
|
|
7
|
+
import { BillStatusBadge as h } from "../../../../shared/document-status/ui/dist/index4.js";
|
|
8
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
9
|
+
import { ApprovalPolicyCard as g } from "./index3.js";
|
|
5
10
|
import "./index4.js";
|
|
6
|
-
import { BillRejectionNotice as
|
|
11
|
+
import { BillRejectionNotice as _ } from "./index6.js";
|
|
7
12
|
import "./index7.js";
|
|
8
|
-
import { PaymentHistoryList as
|
|
13
|
+
import { PaymentHistoryList as v } from "./index8.js";
|
|
9
14
|
import "./index9.js";
|
|
10
|
-
import {
|
|
11
|
-
import "../../../../shared/document-status/ui/dist/index.js";
|
|
12
|
-
import { ScheduledSummaryBadge as g } from "./index5.js";
|
|
13
|
-
import { BillActionButtons as _, NO_BILL_ACTIONS as v } from "../../../ui/dist/index2.js";
|
|
14
|
-
import { BillOverflowMenu as y } from "../../../ui/dist/index11.js";
|
|
15
|
-
import "../../../ui/dist/index.js";
|
|
15
|
+
import { ScheduledSummaryBadge as y } from "./index5.js";
|
|
16
16
|
import { BILL_DETAILS_SHEET_LABELS_EN as b } from "./index33.js";
|
|
17
17
|
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
18
18
|
import { MoveDiagonal2Icon as w, XIcon as T } from "lucide-react";
|
|
@@ -38,7 +38,7 @@ function E({ items: e }) {
|
|
|
38
38
|
}, e.label))
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
function D({ open: D, onOpenChange: O, details: k, actions: A =
|
|
41
|
+
function D({ open: D, onOpenChange: O, details: k, actions: A = p, approvalPolicy: j, showApprovalOverrideNotice: M, awaitingApprovalNotice: N, scheduledSummary: P, scheduledSummaryDate: F, paymentHistory: I, paymentHistoryError: L, paymentHistoryLoading: R, auditHistory: z, auditHistoryError: B, auditHistoryLoading: V, auditHistoryNamesError: H, isLoading: U, isError: W, notice: G, onClose: K, onExpand: q, testId: J, labels: Y }) {
|
|
42
42
|
let X = {
|
|
43
43
|
...b,
|
|
44
44
|
...Y,
|
|
@@ -96,7 +96,7 @@ function D({ open: D, onOpenChange: O, details: k, actions: A = v, approvalPolic
|
|
|
96
96
|
onClick: q,
|
|
97
97
|
children: /* @__PURE__ */ S(w, { className: "ttw:size-4" })
|
|
98
98
|
}) : null,
|
|
99
|
-
k && !U && !W ? /* @__PURE__ */ S(
|
|
99
|
+
k && !U && !W ? /* @__PURE__ */ S(m, {
|
|
100
100
|
actions: A.menu,
|
|
101
101
|
triggerLabel: X.overflowMenuTrigger,
|
|
102
102
|
placement: "header"
|
|
@@ -164,7 +164,7 @@ function D({ open: D, onOpenChange: O, details: k, actions: A = v, approvalPolic
|
|
|
164
164
|
variant: "outline",
|
|
165
165
|
className: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700",
|
|
166
166
|
children: k.paidOnLabel
|
|
167
|
-
}) : P ? /* @__PURE__ */ S(
|
|
167
|
+
}) : P ? /* @__PURE__ */ S(y, {
|
|
168
168
|
summary: P,
|
|
169
169
|
date: F
|
|
170
170
|
}) : /* @__PURE__ */ S(h, {
|
|
@@ -199,7 +199,7 @@ function D({ open: D, onOpenChange: O, details: k, actions: A = v, approvalPolic
|
|
|
199
199
|
})]
|
|
200
200
|
})]
|
|
201
201
|
}),
|
|
202
|
-
k.rejection ? /* @__PURE__ */ S(
|
|
202
|
+
k.rejection ? /* @__PURE__ */ S(_, { ...k.rejection }) : null,
|
|
203
203
|
M ? /* @__PURE__ */ S(u, {
|
|
204
204
|
variant: "caption",
|
|
205
205
|
color: "muted",
|
|
@@ -211,7 +211,7 @@ function D({ open: D, onOpenChange: O, details: k, actions: A = v, approvalPolic
|
|
|
211
211
|
}) : null,
|
|
212
212
|
A.row.length ? /* @__PURE__ */ S("div", {
|
|
213
213
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
214
|
-
children: /* @__PURE__ */ S(
|
|
214
|
+
children: /* @__PURE__ */ S(f, { actions: A.row })
|
|
215
215
|
}) : null
|
|
216
216
|
]
|
|
217
217
|
}),
|
|
@@ -226,7 +226,7 @@ function D({ open: D, onOpenChange: O, details: k, actions: A = v, approvalPolic
|
|
|
226
226
|
children: L ? /* @__PURE__ */ S("p", {
|
|
227
227
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
228
228
|
children: X.paymentHistoryErrorDescription
|
|
229
|
-
}) : R ? /* @__PURE__ */ S(l, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ S(
|
|
229
|
+
}) : R ? /* @__PURE__ */ S(l, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ S(v, { records: I ?? [] })
|
|
230
230
|
}) : null,
|
|
231
231
|
/* @__PURE__ */ S(r, {
|
|
232
232
|
defaultOpen: !0,
|
|
@@ -303,7 +303,7 @@ function D({ open: D, onOpenChange: O, details: k, actions: A = v, approvalPolic
|
|
|
303
303
|
labels: X.auditHistory
|
|
304
304
|
})]
|
|
305
305
|
}),
|
|
306
|
-
j ? /* @__PURE__ */ S(
|
|
306
|
+
j ? /* @__PURE__ */ S(g, {
|
|
307
307
|
view: j,
|
|
308
308
|
labels: X.approvalPolicy
|
|
309
309
|
}) : null
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Badge as e, Button as t, Skeleton as n, Table as r, TableBody as i, TableCard as a, TableCardCollapseToggle as o, TableCardFooter as s, TableCardHeader as c, TableCell as l, TableHead as u, TableHeader as d, TableRow as f, cn as p } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import { BillDuplicateIcon as h } from "../../../ui/dist/index6.js";
|
|
5
|
-
import { BillDuplicateWarning as g } from "../../../ui/dist/index8.js";
|
|
2
|
+
import { BillDuplicateIcon as m } from "../../../ui/dist/index6.js";
|
|
3
|
+
import { BillDuplicateWarning as h } from "../../../ui/dist/index8.js";
|
|
6
4
|
import "../../../ui/dist/index.js";
|
|
5
|
+
import { BillStatusBadge as g } from "../../../../shared/document-status/ui/dist/index4.js";
|
|
6
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
7
7
|
import { BILL_DUPLICATE_NOTICE_LABELS_EN as _ } from "./index36.js";
|
|
8
8
|
import { useId as v, useState as y } from "react";
|
|
9
9
|
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
@@ -44,7 +44,7 @@ function E({ message: E, title: D, meta: O, onNotADuplicate: k, onRemoveBill: A,
|
|
|
44
44
|
children: [
|
|
45
45
|
/* @__PURE__ */ x(c, {
|
|
46
46
|
id: B,
|
|
47
|
-
icon: /* @__PURE__ */ x(
|
|
47
|
+
icon: /* @__PURE__ */ x(m, {}),
|
|
48
48
|
title: D ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("span", {
|
|
49
49
|
className: "ttw:sr-only",
|
|
50
50
|
children: [z.titleAnnouncement, " "]
|
|
@@ -119,7 +119,7 @@ function E({ message: E, title: D, meta: O, onNotADuplicate: k, onRemoveBill: A,
|
|
|
119
119
|
}),
|
|
120
120
|
/* @__PURE__ */ x(l, {
|
|
121
121
|
className: "ttw:py-2.5",
|
|
122
|
-
children: t.status ? /* @__PURE__ */ x(
|
|
122
|
+
children: t.status ? /* @__PURE__ */ x(g, {
|
|
123
123
|
status: t.status,
|
|
124
124
|
tone: t.statusTone ?? "neutral"
|
|
125
125
|
}) : null
|
|
@@ -142,7 +142,7 @@ function E({ message: E, title: D, meta: O, onNotADuplicate: k, onRemoveBill: A,
|
|
|
142
142
|
children: z.question
|
|
143
143
|
}), K] }) : null
|
|
144
144
|
]
|
|
145
|
-
}) : /* @__PURE__ */ S(
|
|
145
|
+
}) : /* @__PURE__ */ S(h, {
|
|
146
146
|
message: E ?? z.message,
|
|
147
147
|
testId: L,
|
|
148
148
|
children: [K, j ? /* @__PURE__ */ x(t, {
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import "./index5.js";
|
|
2
2
|
import "./index7.js";
|
|
3
|
+
import { BillSummaryCard as e } from "./index10.js";
|
|
3
4
|
import "./index17.js";
|
|
4
5
|
import "./index18.js";
|
|
5
6
|
import "./index19.js";
|
|
6
|
-
|
|
7
|
+
import { BillsListWidget as t } from "./index21.js";
|
|
7
8
|
import "./index22.js";
|
|
9
|
+
export { e as BillSummaryCard, t as BillsListWidget };
|
|
@@ -2,96 +2,136 @@ import { amountOutputToMajorUnits as e } from "../../../../shared/util/dist/lib/
|
|
|
2
2
|
import { formatMoneyExact as t } from "../../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
3
3
|
import "../../../../shared/util/dist/index.js";
|
|
4
4
|
import "../../../util/dist/index.js";
|
|
5
|
+
import { BillStatusFilter as n, billStatusFilterApiValues as r } from "./index4.js";
|
|
5
6
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index10.js
|
|
6
|
-
var
|
|
7
|
+
var i = {
|
|
7
8
|
TotalUnpaid: "total_unpaid",
|
|
8
9
|
Overdue: "overdue",
|
|
9
10
|
Scheduled: "scheduled",
|
|
10
11
|
NotSubmitted: "not_submitted"
|
|
11
|
-
},
|
|
12
|
+
}, a = {
|
|
12
13
|
Scheduled: "scheduled",
|
|
13
14
|
ReadyToPay: "ready_to_pay",
|
|
14
15
|
ReadyToSubmit: "ready_to_submit",
|
|
15
16
|
PendingApproval: "pending_approval",
|
|
16
17
|
Rejected: "rejected",
|
|
17
18
|
Draft: "draft"
|
|
18
|
-
},
|
|
19
|
+
}, o = Object.values(a), s = [
|
|
19
20
|
"draft",
|
|
20
21
|
"new",
|
|
21
22
|
"approve_in_progress",
|
|
22
23
|
"waiting_to_be_paid",
|
|
23
24
|
"partially_paid",
|
|
24
25
|
"rejected"
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
];
|
|
27
|
+
function c(e) {
|
|
28
|
+
return Object.values(i).includes(e);
|
|
29
|
+
}
|
|
30
|
+
var l = [
|
|
31
|
+
n.Draft,
|
|
32
|
+
n.ReadyToSubmit,
|
|
33
|
+
n.PendingApproval,
|
|
34
|
+
n.ReadyToPay,
|
|
35
|
+
n.Rejected
|
|
36
|
+
], u = [
|
|
37
|
+
n.Draft,
|
|
38
|
+
n.ReadyToSubmit,
|
|
39
|
+
n.Rejected
|
|
40
|
+
];
|
|
41
|
+
function d(e, t) {
|
|
42
|
+
let n = [...s];
|
|
43
|
+
switch (e) {
|
|
44
|
+
case i.TotalUnpaid: return {
|
|
45
|
+
statuses: l,
|
|
46
|
+
query: { status__in: n }
|
|
47
|
+
};
|
|
48
|
+
case i.Overdue: return { query: {
|
|
49
|
+
status__in: n,
|
|
50
|
+
due_date__lt: t
|
|
51
|
+
} };
|
|
52
|
+
case i.Scheduled: return { query: {
|
|
53
|
+
status__in: n,
|
|
54
|
+
has_scheduled_payment: !0
|
|
55
|
+
} };
|
|
56
|
+
case i.NotSubmitted: return {
|
|
57
|
+
statuses: u,
|
|
58
|
+
query: {
|
|
59
|
+
status__in: r(u),
|
|
60
|
+
has_scheduled_payment: !1
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
var f = {
|
|
66
|
+
draft: a.Draft,
|
|
67
|
+
new: a.ReadyToSubmit,
|
|
68
|
+
approve_in_progress: a.PendingApproval,
|
|
69
|
+
waiting_to_be_paid: a.ReadyToPay,
|
|
70
|
+
partially_paid: a.ReadyToPay,
|
|
71
|
+
rejected: a.Rejected
|
|
72
|
+
}, p = [
|
|
73
|
+
a.Draft,
|
|
74
|
+
a.ReadyToSubmit,
|
|
75
|
+
a.Rejected
|
|
76
|
+
], m = {
|
|
37
77
|
metric: "id",
|
|
38
78
|
aggregation_function: "count"
|
|
39
|
-
},
|
|
79
|
+
}, h = {
|
|
40
80
|
metric: "amount_due",
|
|
41
81
|
aggregation_function: "summary"
|
|
42
82
|
};
|
|
43
|
-
function
|
|
83
|
+
function g(e = {}) {
|
|
44
84
|
let t = {
|
|
45
85
|
...e,
|
|
46
86
|
currency: "USD",
|
|
47
|
-
status__in: [...
|
|
87
|
+
status__in: [...s],
|
|
48
88
|
has_scheduled_payment: !1,
|
|
49
89
|
dimension: "status"
|
|
50
90
|
}, n = {
|
|
51
91
|
...e,
|
|
52
92
|
currency: "USD",
|
|
53
|
-
status__in: [...
|
|
93
|
+
status__in: [...s],
|
|
54
94
|
has_scheduled_payment: !0
|
|
55
95
|
};
|
|
56
96
|
return [
|
|
57
97
|
{
|
|
58
98
|
...t,
|
|
59
|
-
...
|
|
99
|
+
...m
|
|
60
100
|
},
|
|
61
101
|
{
|
|
62
102
|
...t,
|
|
63
|
-
...
|
|
103
|
+
...h
|
|
64
104
|
},
|
|
65
105
|
{
|
|
66
106
|
...n,
|
|
67
|
-
...
|
|
107
|
+
...m
|
|
68
108
|
},
|
|
69
109
|
{
|
|
70
110
|
...n,
|
|
71
|
-
...
|
|
111
|
+
...h
|
|
72
112
|
}
|
|
73
113
|
];
|
|
74
114
|
}
|
|
75
|
-
function
|
|
76
|
-
return
|
|
115
|
+
function _(e) {
|
|
116
|
+
return g({ due_date__lt: e });
|
|
77
117
|
}
|
|
78
|
-
var
|
|
79
|
-
function
|
|
118
|
+
var v = () => Object.fromEntries(o.map((e) => [e, 0]));
|
|
119
|
+
function y(e) {
|
|
80
120
|
if (e.length < 4 || e.some((e) => e.isError)) return null;
|
|
81
121
|
let [t, n, r, i] = e, a = (e = []) => {
|
|
82
|
-
let t =
|
|
122
|
+
let t = v();
|
|
83
123
|
for (let n of e) {
|
|
84
|
-
let e =
|
|
124
|
+
let e = f[n.dimension_value ?? ""];
|
|
85
125
|
e && (t[e] += n.metric_value);
|
|
86
126
|
}
|
|
87
127
|
return t;
|
|
88
|
-
},
|
|
89
|
-
return
|
|
90
|
-
counts:
|
|
91
|
-
amounts:
|
|
128
|
+
}, o = a(t.points), s = a(n.points);
|
|
129
|
+
return o.scheduled = r.points?.[0]?.metric_value ?? 0, s.scheduled = i.points?.[0]?.metric_value ?? 0, {
|
|
130
|
+
counts: o,
|
|
131
|
+
amounts: s
|
|
92
132
|
};
|
|
93
133
|
}
|
|
94
|
-
var
|
|
134
|
+
var b = (e, t = o) => t.reduce((t, n) => t + e[n], 0), x = (n) => t(e({
|
|
95
135
|
value: n,
|
|
96
136
|
currencyCode: "USD"
|
|
97
137
|
}), {
|
|
@@ -100,48 +140,51 @@ var m = (e, t = i) => t.reduce((t, n) => t + e[n], 0), h = (n) => t(e({
|
|
|
100
140
|
minimumFractionDigits: 2,
|
|
101
141
|
maximumFractionDigits: 2
|
|
102
142
|
});
|
|
103
|
-
function
|
|
104
|
-
let
|
|
105
|
-
|
|
143
|
+
function S({ totals: e, overdue: t, labels: n, selectedCard: r = null }) {
|
|
144
|
+
let s = (e, t, i, a, o) => {
|
|
145
|
+
let s = e === r;
|
|
146
|
+
if (!i) return {
|
|
106
147
|
id: e,
|
|
107
148
|
label: t,
|
|
108
|
-
amountLabel:
|
|
149
|
+
amountLabel: n.unavailable,
|
|
150
|
+
selected: s
|
|
109
151
|
};
|
|
110
|
-
let
|
|
152
|
+
let c = b(i.counts, a), l = n.billCount(c);
|
|
111
153
|
return {
|
|
112
154
|
id: e,
|
|
113
155
|
label: t,
|
|
114
|
-
amountLabel:
|
|
115
|
-
captionLabel:
|
|
116
|
-
description:
|
|
156
|
+
amountLabel: x(b(i.amounts, a)),
|
|
157
|
+
captionLabel: l,
|
|
158
|
+
description: c > 0 ? o(c, l) : void 0,
|
|
159
|
+
selected: s
|
|
117
160
|
};
|
|
118
|
-
}, c = (e, t) => (
|
|
119
|
-
billCount:
|
|
120
|
-
statuses:
|
|
161
|
+
}, c = (e, t) => (r, i) => n.statusBreakdown({
|
|
162
|
+
billCount: i,
|
|
163
|
+
statuses: o.filter((n) => t.includes(n) && (e?.counts[n] ?? 0) > 0).map((t) => n.statusCount[t](e?.counts[t] ?? 0))
|
|
121
164
|
});
|
|
122
165
|
return {
|
|
123
166
|
kind: "ready",
|
|
124
167
|
cards: [
|
|
125
|
-
|
|
126
|
-
let
|
|
127
|
-
[
|
|
128
|
-
[
|
|
129
|
-
[
|
|
130
|
-
[
|
|
168
|
+
s(i.TotalUnpaid, n.totalUnpaid, e, o, (r, i) => {
|
|
169
|
+
let a = e?.counts ?? v(), o = [
|
|
170
|
+
[b(a, p), n.stageCount.notSubmitted],
|
|
171
|
+
[a.pending_approval, n.stageCount.inApproval],
|
|
172
|
+
[a.ready_to_pay, n.stageCount.readyToPay],
|
|
173
|
+
[a.scheduled, n.stageCount.scheduled]
|
|
131
174
|
];
|
|
132
|
-
return
|
|
133
|
-
billCount:
|
|
175
|
+
return n.totalUnpaidDescription({
|
|
176
|
+
billCount: i,
|
|
134
177
|
stages: o.filter(([e]) => e > 0).map(([e, t]) => t(e)),
|
|
135
|
-
overdueCount: t ?
|
|
178
|
+
overdueCount: t ? b(t.counts) : void 0
|
|
136
179
|
});
|
|
137
180
|
}),
|
|
138
181
|
{
|
|
139
|
-
...
|
|
182
|
+
...s(i.Overdue, n.overdue, t, o, c(t, o)),
|
|
140
183
|
labelTone: "destructive"
|
|
141
184
|
},
|
|
142
|
-
|
|
143
|
-
|
|
185
|
+
s(i.Scheduled, n.scheduled, e, [a.Scheduled], (e, t) => n.scheduledDescription(t)),
|
|
186
|
+
s(i.NotSubmitted, n.notSubmitted, e, p, c(e, p))
|
|
144
187
|
]
|
|
145
188
|
};
|
|
146
189
|
}
|
|
147
|
-
export {
|
|
190
|
+
export { i as BillSummaryCard, a as BillSummaryStatus, s as UNPAID_PAYABLE_STATUSES, d as billSummaryCardFilter, g as billSummaryQueries, S as buildBillSummaryCardsView, c as isBillSummaryCard, _ as overdueBillSummaryQueries, y as readBillTotals };
|
|
@@ -4,32 +4,34 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { useLocalCalendarDay as e } from "../../../../shared/feature/dist/lib/calendar/useLocalCalendarDay.js";
|
|
6
6
|
import "../../../../shared/feature/dist/index.js";
|
|
7
|
-
import {
|
|
7
|
+
import { billSummaryQueries as t, buildBillSummaryCardsView as n, overdueBillSummaryQueries as r, readBillTotals as i } from "./index10.js";
|
|
8
|
+
import { usePayablesAnalyticsQueries as a } from "../../data-access/dist/index6.js";
|
|
8
9
|
import "../../data-access/dist/index.js";
|
|
9
|
-
import { billSummaryQueries as n, buildBillSummaryCardsView as r, overdueBillSummaryQueries as i, readBillTotals as a } from "./index10.js";
|
|
10
10
|
import { useMemo as o } from "react";
|
|
11
11
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index11.js
|
|
12
|
-
var s =
|
|
13
|
-
function c({ enabled:
|
|
14
|
-
let
|
|
12
|
+
var s = t();
|
|
13
|
+
function c({ enabled: t, labels: c, selectedCard: l }) {
|
|
14
|
+
let u = e(), d = o(() => u ? r(u) : [], [u]), f = a({
|
|
15
15
|
queries: s,
|
|
16
|
-
enabled:
|
|
17
|
-
}),
|
|
18
|
-
queries:
|
|
19
|
-
enabled:
|
|
20
|
-
}),
|
|
16
|
+
enabled: t
|
|
17
|
+
}), p = a({
|
|
18
|
+
queries: d,
|
|
19
|
+
enabled: t
|
|
20
|
+
}), m = !u || [...f, ...p].some((e) => e.isPending);
|
|
21
21
|
return o(() => {
|
|
22
|
-
if (
|
|
23
|
-
totals:
|
|
24
|
-
overdue:
|
|
25
|
-
labels: c
|
|
22
|
+
if (t) return m ? { kind: "loading" } : n({
|
|
23
|
+
totals: i(f),
|
|
24
|
+
overdue: i(p),
|
|
25
|
+
labels: c,
|
|
26
|
+
selectedCard: l
|
|
26
27
|
});
|
|
27
28
|
}, [
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
t,
|
|
30
|
+
m,
|
|
30
31
|
c,
|
|
32
|
+
p,
|
|
31
33
|
f,
|
|
32
|
-
|
|
34
|
+
l
|
|
33
35
|
]);
|
|
34
36
|
}
|
|
35
37
|
export { c as useBillSummaryCards };
|
|
@@ -38,6 +38,8 @@ var n = {
|
|
|
38
38
|
amountChip: (e) => `Total amount: ${e}`,
|
|
39
39
|
attachmentChipHas: "Has attachment",
|
|
40
40
|
attachmentChipNone: "No attachment",
|
|
41
|
+
pastDue: "Past due",
|
|
42
|
+
scheduledStatus: "Scheduled",
|
|
41
43
|
moreSelected: (e, t) => `${e} + ${t} more`,
|
|
42
44
|
amountAtLeast: (e) => `${e} or more`,
|
|
43
45
|
amountAtMost: (e) => `${e} or less`,
|