@tesouro/embedded-components-react 0.3.49 → 0.3.50
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.css +8 -2
- 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 +11 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +39 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +26 -311
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +325 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +13 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +20 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +75 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +80 -68
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +86 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +77 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +18 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +50 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +22 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +82 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +7 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +15 -159
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +23 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +66 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +2 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +5 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +3 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +31 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +23 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +37 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +161 -61
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +29 -130
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +1 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +47 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +4 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +12 -55
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +63 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +26 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +62 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +133 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +20 -163
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +4 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +39 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +5 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +70 -211
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +47 -103
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +92 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +34 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +59 -62
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +163 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +67 -181
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +20 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +203 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +214 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +98 -312
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +16 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +49 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +29 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +183 -156
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +38 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +102 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +18 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +343 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +30 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +79 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +179 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +3 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +2 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +38 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +6 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +92 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +123 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +7 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +45 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +69 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +21 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +27 -208
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +86 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +47 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +244 -106
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +201 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +44 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +28 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +6 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +119 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +24 -111
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +5 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +5 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +10 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +105 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +15 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +125 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +7 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +170 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +11 -105
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +108 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +8 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +47 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +87 -71
- 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,115 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
6
|
-
import { formatMoneyExact as t } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
7
|
-
import { resolveVendorName as n } from "./index7.js";
|
|
8
|
-
import { usePayablesQuery as r, usePayablesTotalCountQuery as i } from "../../data-access/dist/index14.js";
|
|
9
|
-
import "../../data-access/dist/index.js";
|
|
10
|
-
import { derivePayableStatus as a } from "./index26.js";
|
|
11
|
-
import { isEditablePayableStatus as o } from "./index24.js";
|
|
12
|
-
import { BillQueue as s, DEFAULT_BILL_QUEUE as c, billQueueColumns as l, billQueueHasScheduledPayment as u, billQueueOffersAddPanel as d, billQueueStatuses as f, billSortColumnId as p, billSortField as m } from "./index62.js";
|
|
13
|
-
import { useBillsFilters as h } from "./index69.js";
|
|
14
|
-
import { useCallback as g, useEffect as _, useMemo as v, useState as y } from "react";
|
|
1
|
+
import { BillColumn as e } from "../../ui/dist/index66.js";
|
|
2
|
+
import "../../ui/dist/index.js";
|
|
15
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}), W = M[0], G = m(W?.id), K = r({
|
|
35
|
-
...U.query,
|
|
36
|
-
limit: P,
|
|
37
|
-
pagination_token: I,
|
|
38
|
-
status__in: f(A) ?? U.query.status__in,
|
|
39
|
-
has_scheduled_payment: u(A),
|
|
40
|
-
counterpart_name__icontains: B || void 0,
|
|
41
|
-
sort: G,
|
|
42
|
-
order: G ? W?.desc ? "desc" : "asc" : void 0,
|
|
43
|
-
enabled: S
|
|
44
|
-
}), q = K.data?.data.length === 0, J = i({ enabled: S && q }), Y = !q || (J.data?.count ?? 1) > 0, X = v(() => new Set(D), [D]), Z = v(() => (K.data?.data ?? []).map((r) => {
|
|
45
|
-
let i = a({
|
|
46
|
-
apiStatus: r.status,
|
|
47
|
-
dueDate: r.due_date,
|
|
48
|
-
scheduledPaymentDate: r.scheduled_payment_date
|
|
49
|
-
}), s = r.amount_due ?? r.total_amount, c = (e) => e == null ? "" : t(e / 100, { currencyCode: r.currency ?? "USD" });
|
|
50
|
-
return {
|
|
51
|
-
vendorLabel: n(r),
|
|
52
|
-
issueDateLabel: e(r.issued_at),
|
|
53
|
-
dueDateLabel: e(r.due_date),
|
|
54
|
-
dueDateTone: i.isOverdue ? "danger" : "default",
|
|
55
|
-
scheduledDateLabel: e(r.scheduled_payment_date),
|
|
56
|
-
paidDateLabel: e(r.paid_at?.slice(0, 10)),
|
|
57
|
-
amountDueLabel: c(s),
|
|
58
|
-
amountPaidLabel: c(r.amount_paid),
|
|
59
|
-
amountScheduledLabel: c(r.amount_to_pay ?? s),
|
|
60
|
-
totalAmountLabel: c(r.total_amount),
|
|
61
|
-
attachment: r.file_id ? { label: k } : void 0,
|
|
62
|
-
status: i.status,
|
|
63
|
-
statusTone: i.tone,
|
|
64
|
-
addedOnLabel: e(r.created_at?.slice(0, 10)),
|
|
65
|
-
duplicateBadge: X.has(r.id) ? {
|
|
66
|
-
label: O,
|
|
67
|
-
tone: "warning"
|
|
68
|
-
} : void 0,
|
|
69
|
-
onOpen: () => E(r.id, o(r.status))
|
|
70
|
-
};
|
|
71
|
-
}), [
|
|
72
|
-
K.data?.data,
|
|
73
|
-
X,
|
|
74
|
-
O,
|
|
75
|
-
k,
|
|
76
|
-
E
|
|
77
|
-
]), Q = g((e) => {
|
|
78
|
-
let t = e;
|
|
79
|
-
j(t), N((e) => {
|
|
80
|
-
let n = e[0]?.id;
|
|
81
|
-
return n ? l(t).some((e) => p(e) === n) ? e : x : e;
|
|
82
|
-
}), H();
|
|
83
|
-
}, [H]), $ = g((e) => {
|
|
84
|
-
N((t) => typeof e == "function" ? e(t) : e), H();
|
|
85
|
-
}, [H]), ee = g((e) => {
|
|
86
|
-
F(e), H();
|
|
87
|
-
}, [H]), te = g(() => L(K.data?.next_pagination_token ?? void 0), [K.data?.next_pagination_token]), ne = g(() => L(K.data?.prev_pagination_token ?? void 0), [K.data?.prev_pagination_token]), re = g(() => {
|
|
88
|
-
K.refetch();
|
|
89
|
-
}, [K.refetch]);
|
|
90
|
-
return {
|
|
91
|
-
rows: Z,
|
|
92
|
-
isLoading: K.isFetching || q && J.isLoading,
|
|
93
|
-
isError: K.isError,
|
|
94
|
-
onRetry: re,
|
|
95
|
-
selectedFilterTabId: A,
|
|
96
|
-
onFilterTabChange: Q,
|
|
97
|
-
searchValue: R,
|
|
98
|
-
onSearchChange: z,
|
|
99
|
-
hasAnyBills: Y,
|
|
100
|
-
isSearchActive: B.length > 0 || U.isFilterActive,
|
|
101
|
-
filterBarProps: U.filterBarProps,
|
|
102
|
-
visibleColumns: l(A),
|
|
103
|
-
showAddPanelWhenEmpty: d(A),
|
|
104
|
-
sorting: M,
|
|
105
|
-
onSortingChange: $,
|
|
106
|
-
pageSize: P,
|
|
107
|
-
onPageSizeChange: ee,
|
|
108
|
-
hasNextPage: !!K.data?.next_pagination_token,
|
|
109
|
-
hasPrevPage: !!K.data?.prev_pagination_token,
|
|
110
|
-
onNextPage: te,
|
|
111
|
-
onPrevPage: ne
|
|
112
|
-
};
|
|
113
|
-
}
|
|
4
|
+
var t = {
|
|
5
|
+
root: "bill-pay-bills-tab",
|
|
6
|
+
uploadTray: "bill-pay-upload-tray",
|
|
7
|
+
detailsSheet: "bill-pay-details-sheet"
|
|
8
|
+
}, n = {
|
|
9
|
+
[e.Vendor]: "bill-pay-bills-cell-vendor",
|
|
10
|
+
[e.Attachment]: "bill-pay-bills-cell-attachment",
|
|
11
|
+
[e.IssueDate]: "bill-pay-bills-cell-issue-date",
|
|
12
|
+
[e.DueDate]: "bill-pay-bills-cell-due-date",
|
|
13
|
+
[e.ScheduledDate]: "bill-pay-bills-cell-scheduled-date",
|
|
14
|
+
[e.PaidDate]: "bill-pay-bills-cell-paid-date",
|
|
15
|
+
[e.Status]: "bill-pay-bills-cell-status",
|
|
16
|
+
[e.AmountDue]: "bill-pay-bills-cell-amount-due",
|
|
17
|
+
[e.AmountScheduled]: "bill-pay-bills-cell-amount-scheduled",
|
|
18
|
+
[e.AmountPaid]: "bill-pay-bills-cell-amount-paid",
|
|
19
|
+
[e.TotalAmount]: "bill-pay-bills-cell-total-amount",
|
|
20
|
+
[e.AddedOn]: "bill-pay-bills-cell-added-on"
|
|
21
|
+
};
|
|
114
22
|
//#endregion
|
|
115
|
-
export {
|
|
23
|
+
export { t as billsTabTestIds, n as billsTableCellTestIds };
|
|
@@ -1,212 +1,31 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
7
|
-
import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
8
|
-
import "../../../shared/data-access/dist/index.js";
|
|
9
|
-
import "../../../shared/ui/dist/index.js";
|
|
10
|
-
import { useWidgetConfig as r, useWidgetInitStaleForToken as ee } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
|
-
import "../../../shared/feature/dist/index.js";
|
|
12
|
-
import { AddBillDialog as te } from "../../ui/dist/index10.js";
|
|
13
|
-
import { BillsScreen as ne } from "../../ui/dist/index67.js";
|
|
14
|
-
import "../../ui/dist/index.js";
|
|
15
|
-
import { BillCreateDialog as i } from "./index45.js";
|
|
16
|
-
import "./index46.js";
|
|
17
|
-
import { BillDetailsContainer as a } from "./index49.js";
|
|
18
|
-
import "./index50.js";
|
|
19
|
-
import "./index56.js";
|
|
20
|
-
import "./index57.js";
|
|
21
|
-
import { DuplicateBillsContainer as o } from "./index60.js";
|
|
22
|
-
import "./index61.js";
|
|
23
|
-
import { BILL_QUEUE_ORDER as s, BillQueue as c } from "./index62.js";
|
|
24
|
-
import { BILLS_TAB_LABELS_EN as l } from "./index64.js";
|
|
25
|
-
import { useBillsTable as u } from "./index70.js";
|
|
26
|
-
import { copyTextToClipboard as re } from "./index63.js";
|
|
27
|
-
import { billsTabTestIds as d, billsTableCellTestIds as ie } from "./index65.js";
|
|
28
|
-
import { useCallback as f, useEffect as p, useMemo as m, useState as h } from "react";
|
|
29
|
-
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
30
|
-
import { CalendarClockIcon as v, CheckIcon as y, FilePenIcon as b, ListIcon as x, LoaderCircleIcon as S } from "lucide-react";
|
|
31
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
[
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
2
|
+
var e = {
|
|
3
|
+
Draft: "draft",
|
|
4
|
+
PendingApproval: "pending_approval",
|
|
5
|
+
ReadyToPay: "ready_to_pay",
|
|
6
|
+
PartiallyPaid: "partially_paid",
|
|
7
|
+
Paid: "paid",
|
|
8
|
+
Rejected: "rejected",
|
|
9
|
+
Canceled: "canceled"
|
|
10
|
+
}, t = [
|
|
11
|
+
e.Draft,
|
|
12
|
+
e.PendingApproval,
|
|
13
|
+
e.ReadyToPay,
|
|
14
|
+
e.PartiallyPaid,
|
|
15
|
+
e.Paid,
|
|
16
|
+
e.Rejected,
|
|
17
|
+
e.Canceled
|
|
18
|
+
], n = {
|
|
19
|
+
[e.Draft]: ["draft"],
|
|
20
|
+
[e.PendingApproval]: ["new", "approve_in_progress"],
|
|
21
|
+
[e.ReadyToPay]: ["waiting_to_be_paid"],
|
|
22
|
+
[e.PartiallyPaid]: ["partially_paid"],
|
|
23
|
+
[e.Paid]: ["paid"],
|
|
24
|
+
[e.Rejected]: ["rejected"],
|
|
25
|
+
[e.Canceled]: ["canceled"]
|
|
53
26
|
};
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
-
...l,
|
|
57
|
-
...c,
|
|
58
|
-
queues: {
|
|
59
|
-
...l.queues,
|
|
60
|
-
...c?.queues
|
|
61
|
-
},
|
|
62
|
-
filters: {
|
|
63
|
-
...l.filters,
|
|
64
|
-
...c?.filters,
|
|
65
|
-
presets: {
|
|
66
|
-
...l.filters.presets,
|
|
67
|
-
...c?.filters?.presets
|
|
68
|
-
},
|
|
69
|
-
statuses: {
|
|
70
|
-
...l.filters.statuses,
|
|
71
|
-
...c?.filters?.statuses
|
|
72
|
-
},
|
|
73
|
-
dateFieldNames: {
|
|
74
|
-
...l.filters.dateFieldNames,
|
|
75
|
-
...c?.filters?.dateFieldNames
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
filterBar: {
|
|
79
|
-
...l.filterBar,
|
|
80
|
-
...c?.filterBar
|
|
81
|
-
},
|
|
82
|
-
queueEmptyStates: s.reduce((e, t) => ({
|
|
83
|
-
...e,
|
|
84
|
-
[t]: {
|
|
85
|
-
...l.queueEmptyStates[t],
|
|
86
|
-
...c?.queueEmptyStates?.[t]
|
|
87
|
-
}
|
|
88
|
-
}), {})
|
|
89
|
-
}), [c]), [ae, E] = h(!1), [D, O] = h(), [k, A] = h(!1), [j, M] = h(), [N, P] = h(!1), [F, I] = h(!1), [L, R] = h(!1), { initResponse: z } = r(), B = ee(), V = t(z?.scopes, [n.PayableReadOrg]), H = t(z?.scopes, [n.PayableWriteOrg]), U = !z || V, W = !z || H, G = f((e, t) => {
|
|
90
|
-
if (t && W) {
|
|
91
|
-
O(e), A(!0);
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
M(e), P(!0);
|
|
95
|
-
}, [W]), K = m(() => (S ?? []).filter((e) => e.isPossibleDuplicate).map((e) => e.id), [S]), q = t(z?.scopes, [n.CounterpartReadOrg]), J = u({
|
|
96
|
-
enabled: U,
|
|
97
|
-
canReadVendors: q,
|
|
98
|
-
isVendorFilterPaused: B,
|
|
99
|
-
filterLabels: T.filters,
|
|
100
|
-
onOpenBill: G,
|
|
101
|
-
duplicateBillIds: K,
|
|
102
|
-
duplicateBadgeLabel: T.duplicateBadge,
|
|
103
|
-
attachmentLabel: T.attachmentIndicator
|
|
104
|
-
}), Y = (e) => !!(e && K.includes(e)), X = K.length, oe = X === 0 ? void 0 : X === 1 ? T.duplicateWarningOne : T.duplicateWarningMany(X), se = m(() => s.map((e) => ({
|
|
105
|
-
id: e,
|
|
106
|
-
label: T.queues[e],
|
|
107
|
-
icon: w[e]
|
|
108
|
-
})), [T.queues]), ce = (e) => {
|
|
109
|
-
R(!1), M(e), P(!0);
|
|
110
|
-
}, le = () => {
|
|
111
|
-
P(!1), I(!0);
|
|
112
|
-
}, ue = () => {
|
|
113
|
-
I(!1), P(!0);
|
|
114
|
-
}, de = m(() => ({
|
|
115
|
-
createButton: T.createButton,
|
|
116
|
-
addBill: { heading: T.nonEmptyHeading }
|
|
117
|
-
}), [T.createButton, T.nonEmptyHeading]), fe = m(() => ({
|
|
118
|
-
...J.filterBarProps,
|
|
119
|
-
labels: T.filterBar
|
|
120
|
-
}), [J.filterBarProps, T.filterBar]), Z = () => {
|
|
121
|
-
E(!1), O(void 0), A(!0);
|
|
122
|
-
}, Q = (e) => {
|
|
123
|
-
E(!1), v?.(e);
|
|
124
|
-
}, $ = async () => {
|
|
125
|
-
await re(C) ? e.success(T.emailCopiedToast) : e.error(T.emailCopyFailedToast);
|
|
126
|
-
};
|
|
127
|
-
return p(() => {
|
|
128
|
-
y && (O(y), A(!0), b?.());
|
|
129
|
-
}, [b, y]), /* @__PURE__ */ _("div", {
|
|
130
|
-
"data-testid": d.root,
|
|
131
|
-
children: [
|
|
132
|
-
/* @__PURE__ */ g(ne, {
|
|
133
|
-
rows: J.rows,
|
|
134
|
-
isLoading: J.isLoading || !z,
|
|
135
|
-
isError: J.isError,
|
|
136
|
-
onRetry: J.onRetry,
|
|
137
|
-
sorting: J.sorting,
|
|
138
|
-
onSortingChange: J.onSortingChange,
|
|
139
|
-
pageSize: J.pageSize,
|
|
140
|
-
onPageSizeChange: J.onPageSizeChange,
|
|
141
|
-
hasNextPage: J.hasNextPage,
|
|
142
|
-
hasPrevPage: J.hasPrevPage,
|
|
143
|
-
onNextPage: J.onNextPage,
|
|
144
|
-
onPrevPage: J.onPrevPage,
|
|
145
|
-
filterTabs: se,
|
|
146
|
-
selectedFilterTabId: J.selectedFilterTabId,
|
|
147
|
-
onFilterTabChange: J.onFilterTabChange,
|
|
148
|
-
searchValue: J.searchValue,
|
|
149
|
-
onSearchChange: J.onSearchChange,
|
|
150
|
-
filters: fe,
|
|
151
|
-
visibleColumns: J.visibleColumns,
|
|
152
|
-
cellTestIds: ie,
|
|
153
|
-
isSearchActive: J.isSearchActive,
|
|
154
|
-
showAddPanelWhenEmpty: J.showAddPanelWhenEmpty,
|
|
155
|
-
emptyState: T.queueEmptyStates[J.selectedFilterTabId],
|
|
156
|
-
onCreateClick: W ? () => E(!0) : void 0,
|
|
157
|
-
onEnterManually: W ? Z : void 0,
|
|
158
|
-
onFilesSelected: W ? Q : void 0,
|
|
159
|
-
maxFiles: 10,
|
|
160
|
-
emailAddress: C,
|
|
161
|
-
onCopyEmail: $,
|
|
162
|
-
duplicateWarning: oe,
|
|
163
|
-
onReviewDuplicates: () => R(!0),
|
|
164
|
-
labels: de
|
|
165
|
-
}),
|
|
166
|
-
L ? /* @__PURE__ */ g(o, {
|
|
167
|
-
open: L,
|
|
168
|
-
onOpenChange: R,
|
|
169
|
-
bills: S,
|
|
170
|
-
canManageDuplicates: W,
|
|
171
|
-
onOpenBill: ce
|
|
172
|
-
}) : null,
|
|
173
|
-
W ? /* @__PURE__ */ g(te, {
|
|
174
|
-
open: ae,
|
|
175
|
-
onOpenChange: E,
|
|
176
|
-
onFilesSelected: Q,
|
|
177
|
-
maxFiles: 10,
|
|
178
|
-
onEnterManually: Z,
|
|
179
|
-
emailAddress: C,
|
|
180
|
-
onCopyEmail: $,
|
|
181
|
-
labels: { heading: J.hasAnyBills ? T.nonEmptyHeading : T.emptyHeading }
|
|
182
|
-
}) : null,
|
|
183
|
-
k ? /* @__PURE__ */ g(i, {
|
|
184
|
-
open: k,
|
|
185
|
-
onOpenChange: A,
|
|
186
|
-
payableId: D,
|
|
187
|
-
isPossibleDuplicate: Y(D)
|
|
188
|
-
}) : null,
|
|
189
|
-
N ? /* @__PURE__ */ g(a, {
|
|
190
|
-
open: N,
|
|
191
|
-
onOpenChange: P,
|
|
192
|
-
payableId: j,
|
|
193
|
-
onClose: () => P(!1),
|
|
194
|
-
onExpand: le,
|
|
195
|
-
isPossibleDuplicate: Y(j),
|
|
196
|
-
testId: d.detailsSheet,
|
|
197
|
-
poweredByBankName: x
|
|
198
|
-
}) : null,
|
|
199
|
-
F ? /* @__PURE__ */ g(i, {
|
|
200
|
-
open: F,
|
|
201
|
-
onOpenChange: I,
|
|
202
|
-
payableId: j,
|
|
203
|
-
readOnly: !0,
|
|
204
|
-
onCollapse: ue,
|
|
205
|
-
poweredByBankName: x,
|
|
206
|
-
isPossibleDuplicate: Y(j)
|
|
207
|
-
}) : null
|
|
208
|
-
]
|
|
209
|
-
});
|
|
27
|
+
function r(e) {
|
|
28
|
+
return e.flatMap((e) => n[e] ?? [e]);
|
|
210
29
|
}
|
|
211
30
|
//#endregion
|
|
212
|
-
export {
|
|
31
|
+
export { t as BILL_STATUS_FILTER_ORDER, e as BillStatusFilter, r as billStatusFilterApiValues };
|
|
@@ -1,4 +1,86 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { endOfDay as e, endOfMonth as t, endOfQuarter as n, endOfWeek as r, endOfYear as i, startOfDay as a, startOfMonth as o, startOfQuarter as s, startOfWeek as c, startOfYear as l, subDays as u, subMonths as d, subQuarters as f, subWeeks as p, subYears as m } from "date-fns";
|
|
2
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js
|
|
3
|
+
var h = {
|
|
4
|
+
Today: "today",
|
|
5
|
+
ThisWeek: "this_week",
|
|
6
|
+
ThisMonth: "this_month",
|
|
7
|
+
ThisQuarter: "this_quarter",
|
|
8
|
+
ThisYear: "this_year",
|
|
9
|
+
Yesterday: "yesterday",
|
|
10
|
+
LastWeek: "last_week",
|
|
11
|
+
LastMonth: "last_month",
|
|
12
|
+
Last30Days: "last_30_days",
|
|
13
|
+
Last90Days: "last_90_days",
|
|
14
|
+
LastQuarter: "last_quarter",
|
|
15
|
+
LastYear: "last_year"
|
|
16
|
+
};
|
|
17
|
+
function g(g, _ = /* @__PURE__ */ new Date()) {
|
|
18
|
+
let v = a(_);
|
|
19
|
+
switch (g) {
|
|
20
|
+
case h.Today: return {
|
|
21
|
+
from: v,
|
|
22
|
+
to: e(v)
|
|
23
|
+
};
|
|
24
|
+
case h.ThisWeek: return {
|
|
25
|
+
from: c(v),
|
|
26
|
+
to: r(v)
|
|
27
|
+
};
|
|
28
|
+
case h.ThisMonth: return {
|
|
29
|
+
from: o(v),
|
|
30
|
+
to: t(v)
|
|
31
|
+
};
|
|
32
|
+
case h.ThisQuarter: return {
|
|
33
|
+
from: s(v),
|
|
34
|
+
to: n(v)
|
|
35
|
+
};
|
|
36
|
+
case h.ThisYear: return {
|
|
37
|
+
from: l(v),
|
|
38
|
+
to: i(v)
|
|
39
|
+
};
|
|
40
|
+
case h.Yesterday: {
|
|
41
|
+
let t = u(v, 1);
|
|
42
|
+
return {
|
|
43
|
+
from: t,
|
|
44
|
+
to: e(t)
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
case h.LastWeek: {
|
|
48
|
+
let e = c(p(v, 1));
|
|
49
|
+
return {
|
|
50
|
+
from: e,
|
|
51
|
+
to: r(e)
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
case h.LastMonth: {
|
|
55
|
+
let e = o(d(v, 1));
|
|
56
|
+
return {
|
|
57
|
+
from: e,
|
|
58
|
+
to: t(e)
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
case h.Last30Days: return {
|
|
62
|
+
from: u(v, 29),
|
|
63
|
+
to: e(v)
|
|
64
|
+
};
|
|
65
|
+
case h.Last90Days: return {
|
|
66
|
+
from: u(v, 89),
|
|
67
|
+
to: e(v)
|
|
68
|
+
};
|
|
69
|
+
case h.LastQuarter: {
|
|
70
|
+
let e = s(f(v, 1));
|
|
71
|
+
return {
|
|
72
|
+
from: e,
|
|
73
|
+
to: n(e)
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
case h.LastYear: {
|
|
77
|
+
let e = l(m(v, 1));
|
|
78
|
+
return {
|
|
79
|
+
from: e,
|
|
80
|
+
to: i(e)
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
export { h as BillsDatePreset, g as resolveDatePreset };
|
|
@@ -1,8 +1,50 @@
|
|
|
1
|
+
import { BillStatusFilter as e } from "./index71.js";
|
|
2
|
+
import { BillsDatePreset as t } from "./index72.js";
|
|
1
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
var n = {
|
|
5
|
+
presets: {
|
|
6
|
+
[t.Today]: "Today",
|
|
7
|
+
[t.ThisWeek]: "This week",
|
|
8
|
+
[t.ThisMonth]: "This month",
|
|
9
|
+
[t.ThisQuarter]: "This quarter",
|
|
10
|
+
[t.ThisYear]: "This year",
|
|
11
|
+
[t.Yesterday]: "Yesterday",
|
|
12
|
+
[t.LastWeek]: "Last week",
|
|
13
|
+
[t.LastMonth]: "Last month",
|
|
14
|
+
[t.Last30Days]: "Last 30 days",
|
|
15
|
+
[t.Last90Days]: "Last 90 days",
|
|
16
|
+
[t.LastQuarter]: "Last quarter",
|
|
17
|
+
[t.LastYear]: "Last year"
|
|
18
|
+
},
|
|
19
|
+
presetGroupCurrent: "Current",
|
|
20
|
+
presetGroupPast: "Past",
|
|
21
|
+
statuses: {
|
|
22
|
+
[e.Draft]: "Draft",
|
|
23
|
+
[e.PendingApproval]: "Pending approval",
|
|
24
|
+
[e.ReadyToPay]: "Ready to pay",
|
|
25
|
+
[e.PartiallyPaid]: "Partially paid",
|
|
26
|
+
[e.Paid]: "Paid",
|
|
27
|
+
[e.Rejected]: "Rejected",
|
|
28
|
+
[e.Canceled]: "Canceled"
|
|
29
|
+
},
|
|
30
|
+
dateFieldNames: {
|
|
31
|
+
issueDate: "Issue date",
|
|
32
|
+
dueDate: "Due date",
|
|
33
|
+
addedOn: "Added on"
|
|
34
|
+
},
|
|
35
|
+
dateChip: (e, t) => `${e}: ${t}`,
|
|
36
|
+
statusChip: (e) => `Status: ${e}`,
|
|
37
|
+
vendorChip: (e) => `Vendor: ${e}`,
|
|
38
|
+
amountChip: (e) => `Total amount: ${e}`,
|
|
39
|
+
attachmentChipHas: "Has attachment",
|
|
40
|
+
attachmentChipNone: "No attachment",
|
|
41
|
+
moreSelected: (e, t) => `${e} + ${t} more`,
|
|
42
|
+
amountAtLeast: (e) => `${e} or more`,
|
|
43
|
+
amountAtMost: (e) => `${e} or less`,
|
|
44
|
+
amountBetween: (e, t) => `${e} - ${t}`,
|
|
45
|
+
dateRange: (e, t) => `${e} - ${t}`,
|
|
46
|
+
dateFrom: (e) => `From ${e}`,
|
|
47
|
+
dateTo: (e) => `Until ${e}`
|
|
6
48
|
};
|
|
7
49
|
//#endregion
|
|
8
|
-
export {
|
|
50
|
+
export { n as BILLS_FILTER_LABELS_EN };
|