@tesouro/embedded-components-react 0.3.9 → 0.3.12
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/feature/dist/index.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +13 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +7 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +54 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +24 -52
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +61 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +123 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +11 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +40 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +51 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +5 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +71 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +48 -79
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +91 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +33 -137
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +138 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +63 -200
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +194 -184
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +180 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +64 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +12 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +46 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +26 -158
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +159 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +32 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +102 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +13 -241
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +244 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +4 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +28 -81
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +77 -130
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +145 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +2 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +45 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +9 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +3 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +7 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +14 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +59 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +3 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +107 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +8 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +38 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +18 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +92 -173
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +180 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +5 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +6 -112
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +114 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +56 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +75 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +120 -115
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js +45 -44
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +846 -817
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/scopes.js +1 -0
- 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/index7.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +1998 -1935
- package/package.json +1 -1
|
@@ -1,100 +1,20 @@
|
|
|
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 "./index3.js";
|
|
8
|
-
import { usePayablesQuery as r, usePayablesTotalCountQuery as i } from "../../data-access/dist/index13.js";
|
|
9
|
-
import "../../data-access/dist/index.js";
|
|
10
|
-
import { derivePayableStatus as a } from "./index21.js";
|
|
11
|
-
import { DEFAULT_BILL_QUEUE as o, billQueueColumns as s, billQueueHasScheduledPayment as c, billQueueOffersAddPanel as l, billQueueStatuses as u, billSortColumnId as d, billSortField as f } from "./index56.js";
|
|
12
|
-
import { useCallback as p, useEffect as m, useMemo as h, useState as g } from "react";
|
|
1
|
+
import { BillColumn as e } from "../../ui/dist/index59.js";
|
|
2
|
+
import "../../ui/dist/index.js";
|
|
13
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
status__in: u(C),
|
|
30
|
-
has_scheduled_payment: c(C),
|
|
31
|
-
counterpart_name__icontains: N || void 0,
|
|
32
|
-
sort: L,
|
|
33
|
-
order: L ? I?.desc ? "desc" : "asc" : void 0,
|
|
34
|
-
enabled: y
|
|
35
|
-
}), z = R.data?.data.length === 0, B = i({ enabled: y && z }), V = !z || (B.data?.count ?? 1) > 0, H = h(() => new Set(x), [x]), U = h(() => (R.data?.data ?? []).map((r) => {
|
|
36
|
-
let i = a({
|
|
37
|
-
apiStatus: r.status,
|
|
38
|
-
dueDate: r.due_date,
|
|
39
|
-
scheduledPaymentDate: r.scheduled_payment_date
|
|
40
|
-
}), o = r.amount_due ?? r.total_amount, s = (e) => e == null ? "" : t(e / 100, { currencyCode: r.currency ?? "USD" });
|
|
41
|
-
return {
|
|
42
|
-
vendorLabel: n(r),
|
|
43
|
-
dueDateLabel: e(r.due_date),
|
|
44
|
-
scheduledDateLabel: e(r.scheduled_payment_date),
|
|
45
|
-
paidDateLabel: e(r.paid_at?.slice(0, 10)),
|
|
46
|
-
amountDueLabel: s(o),
|
|
47
|
-
amountPaidLabel: s(r.amount_paid),
|
|
48
|
-
amountScheduledLabel: s(r.amount_to_pay ?? o),
|
|
49
|
-
status: i.status,
|
|
50
|
-
statusTone: i.tone,
|
|
51
|
-
addedOnLabel: e(r.created_at?.slice(0, 10)),
|
|
52
|
-
duplicateBadge: H.has(r.id) ? {
|
|
53
|
-
label: S,
|
|
54
|
-
tone: "warning"
|
|
55
|
-
} : void 0,
|
|
56
|
-
onOpen: () => b(r.id, i.status === "draft")
|
|
57
|
-
};
|
|
58
|
-
}), [
|
|
59
|
-
R.data?.data,
|
|
60
|
-
H,
|
|
61
|
-
S,
|
|
62
|
-
b
|
|
63
|
-
]), W = p((e) => {
|
|
64
|
-
let t = e;
|
|
65
|
-
w(t), E((e) => {
|
|
66
|
-
let n = e[0]?.id;
|
|
67
|
-
return n ? s(t).some((e) => d(e) === n) ? e : v : e;
|
|
68
|
-
}), F();
|
|
69
|
-
}, [F]), G = p((e) => {
|
|
70
|
-
E((t) => typeof e == "function" ? e(t) : e), F();
|
|
71
|
-
}, [F]), K = p((e) => {
|
|
72
|
-
O(e), F();
|
|
73
|
-
}, [F]), q = p(() => A(R.data?.next_pagination_token ?? void 0), [R.data?.next_pagination_token]), J = p(() => A(R.data?.prev_pagination_token ?? void 0), [R.data?.prev_pagination_token]), Y = p(() => {
|
|
74
|
-
R.refetch();
|
|
75
|
-
}, [R.refetch]);
|
|
76
|
-
return {
|
|
77
|
-
rows: U,
|
|
78
|
-
isLoading: R.isFetching || z && B.isLoading,
|
|
79
|
-
isError: R.isError,
|
|
80
|
-
onRetry: Y,
|
|
81
|
-
selectedFilterTabId: C,
|
|
82
|
-
onFilterTabChange: W,
|
|
83
|
-
searchValue: j,
|
|
84
|
-
onSearchChange: M,
|
|
85
|
-
hasAnyBills: V,
|
|
86
|
-
isSearchActive: N.length > 0,
|
|
87
|
-
visibleColumns: s(C),
|
|
88
|
-
showAddPanelWhenEmpty: l(C),
|
|
89
|
-
sorting: T,
|
|
90
|
-
onSortingChange: G,
|
|
91
|
-
pageSize: D,
|
|
92
|
-
onPageSizeChange: K,
|
|
93
|
-
hasNextPage: !!R.data?.next_pagination_token,
|
|
94
|
-
hasPrevPage: !!R.data?.prev_pagination_token,
|
|
95
|
-
onNextPage: q,
|
|
96
|
-
onPrevPage: J
|
|
97
|
-
};
|
|
98
|
-
}
|
|
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.DueDate]: "bill-pay-bills-cell-due-date",
|
|
11
|
+
[e.ScheduledDate]: "bill-pay-bills-cell-scheduled-date",
|
|
12
|
+
[e.PaidDate]: "bill-pay-bills-cell-paid-date",
|
|
13
|
+
[e.Status]: "bill-pay-bills-cell-status",
|
|
14
|
+
[e.AmountDue]: "bill-pay-bills-cell-amount-due",
|
|
15
|
+
[e.AmountScheduled]: "bill-pay-bills-cell-amount-scheduled",
|
|
16
|
+
[e.AmountPaid]: "bill-pay-bills-cell-amount-paid",
|
|
17
|
+
[e.AddedOn]: "bill-pay-bills-cell-added-on"
|
|
18
|
+
};
|
|
99
19
|
//#endregion
|
|
100
|
-
export {
|
|
20
|
+
export { t as billsTabTestIds, n as billsTableCellTestIds };
|
|
@@ -2,180 +2,99 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
10
|
-
import {
|
|
11
|
-
import "
|
|
12
|
-
import {
|
|
13
|
-
import { BillsScreen as a } from "../../ui/dist/index60.js";
|
|
14
|
-
import "../../ui/dist/index.js";
|
|
15
|
-
import { BillCreateDialog as o } from "./index39.js";
|
|
16
|
-
import "./index40.js";
|
|
17
|
-
import { BillDetailsContainer as s } from "./index43.js";
|
|
18
|
-
import "./index44.js";
|
|
19
|
-
import "./index50.js";
|
|
20
|
-
import "./index51.js";
|
|
21
|
-
import { DuplicateBillsContainer as c } from "./index54.js";
|
|
22
|
-
import "./index55.js";
|
|
23
|
-
import { BILL_QUEUE_ORDER as l, BillQueue as u } from "./index56.js";
|
|
24
|
-
import { BILLS_TAB_LABELS_EN as d } from "./index58.js";
|
|
25
|
-
import { billsTabTestIds as f, billsTableCellTestIds as p } from "./index59.js";
|
|
26
|
-
import { useBillsTable as ee } from "./index60.js";
|
|
27
|
-
import { copyTextToClipboard as te } from "./index57.js";
|
|
28
|
-
import { useCallback as ne, useEffect as m, useMemo as h, useState as g } from "react";
|
|
29
|
-
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
30
|
-
import { CalendarClockIcon as y, CheckIcon as b, FilePenIcon as x, ListIcon as S, LoaderCircleIcon as C } from "lucide-react";
|
|
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 "./index3.js";
|
|
8
|
+
import { usePayablesQuery as r, usePayablesTotalCountQuery as i } from "../../data-access/dist/index13.js";
|
|
9
|
+
import "../../data-access/dist/index.js";
|
|
10
|
+
import { derivePayableStatus as a } from "./index22.js";
|
|
11
|
+
import { DEFAULT_BILL_QUEUE as o, billQueueColumns as s, billQueueHasScheduledPayment as c, billQueueOffersAddPanel as l, billQueueStatuses as u, billSortColumnId as d, billSortField as f } from "./index57.js";
|
|
12
|
+
import { useCallback as p, useEffect as m, useMemo as h, useState as g } from "react";
|
|
31
13
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
[
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}), [
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
14
|
+
var _ = 10, v = [{
|
|
15
|
+
id: "addedOnLabel",
|
|
16
|
+
desc: !0
|
|
17
|
+
}];
|
|
18
|
+
function y({ enabled: y = !0, onOpenBill: b, duplicateBillIds: x, duplicateBadgeLabel: S }) {
|
|
19
|
+
let [C, w] = g(o), [T, E] = g(v), [D, O] = g(_), [k, A] = g(), [j, M] = g(""), [N, P] = g(""), F = p(() => A(void 0), []);
|
|
20
|
+
m(() => {
|
|
21
|
+
let e = setTimeout(() => {
|
|
22
|
+
P(j), F();
|
|
23
|
+
}, 300);
|
|
24
|
+
return () => clearTimeout(e);
|
|
25
|
+
}, [j, F]);
|
|
26
|
+
let I = T[0], L = f(I?.id), R = r({
|
|
27
|
+
limit: D,
|
|
28
|
+
pagination_token: k,
|
|
29
|
+
status__in: u(C),
|
|
30
|
+
has_scheduled_payment: c(C),
|
|
31
|
+
counterpart_name__icontains: N || void 0,
|
|
32
|
+
sort: L,
|
|
33
|
+
order: L ? I?.desc ? "desc" : "asc" : void 0,
|
|
34
|
+
enabled: y
|
|
35
|
+
}), z = R.data?.data.length === 0, B = i({ enabled: y && z }), V = !z || (B.data?.count ?? 1) > 0, H = h(() => new Set(x), [x]), U = h(() => (R.data?.data ?? []).map((r) => {
|
|
36
|
+
let i = a({
|
|
37
|
+
apiStatus: r.status,
|
|
38
|
+
dueDate: r.due_date,
|
|
39
|
+
scheduledPaymentDate: r.scheduled_payment_date
|
|
40
|
+
}), o = r.amount_due ?? r.total_amount, s = (e) => e == null ? "" : t(e / 100, { currencyCode: r.currency ?? "USD" });
|
|
41
|
+
return {
|
|
42
|
+
vendorLabel: n(r),
|
|
43
|
+
dueDateLabel: e(r.due_date),
|
|
44
|
+
scheduledDateLabel: e(r.scheduled_payment_date),
|
|
45
|
+
paidDateLabel: e(r.paid_at?.slice(0, 10)),
|
|
46
|
+
amountDueLabel: s(o),
|
|
47
|
+
amountPaidLabel: s(r.amount_paid),
|
|
48
|
+
amountScheduledLabel: s(r.amount_to_pay ?? o),
|
|
49
|
+
status: i.status,
|
|
50
|
+
statusTone: i.tone,
|
|
51
|
+
addedOnLabel: e(r.created_at?.slice(0, 10)),
|
|
52
|
+
duplicateBadge: H.has(r.id) ? {
|
|
53
|
+
label: S,
|
|
54
|
+
tone: "warning"
|
|
55
|
+
} : void 0,
|
|
56
|
+
onOpen: () => b(r.id, i.status === "draft")
|
|
57
|
+
};
|
|
58
|
+
}), [
|
|
59
|
+
R.data?.data,
|
|
60
|
+
H,
|
|
61
|
+
S,
|
|
62
|
+
b
|
|
63
|
+
]), W = p((e) => {
|
|
64
|
+
let t = e;
|
|
65
|
+
w(t), E((e) => {
|
|
66
|
+
let n = e[0]?.id;
|
|
67
|
+
return n ? s(t).some((e) => d(e) === n) ? e : v : e;
|
|
68
|
+
}), F();
|
|
69
|
+
}, [F]), G = p((e) => {
|
|
70
|
+
E((t) => typeof e == "function" ? e(t) : e), F();
|
|
71
|
+
}, [F]), K = p((e) => {
|
|
72
|
+
O(e), F();
|
|
73
|
+
}, [F]), q = p(() => A(R.data?.next_pagination_token ?? void 0), [R.data?.next_pagination_token]), J = p(() => A(R.data?.prev_pagination_token ?? void 0), [R.data?.prev_pagination_token]), Y = p(() => {
|
|
74
|
+
R.refetch();
|
|
75
|
+
}, [R.refetch]);
|
|
76
|
+
return {
|
|
77
|
+
rows: U,
|
|
78
|
+
isLoading: R.isFetching || z && B.isLoading,
|
|
79
|
+
isError: R.isError,
|
|
80
|
+
onRetry: Y,
|
|
81
|
+
selectedFilterTabId: C,
|
|
82
|
+
onFilterTabChange: W,
|
|
83
|
+
searchValue: j,
|
|
84
|
+
onSearchChange: M,
|
|
85
|
+
hasAnyBills: V,
|
|
86
|
+
isSearchActive: N.length > 0,
|
|
87
|
+
visibleColumns: s(C),
|
|
88
|
+
showAddPanelWhenEmpty: l(C),
|
|
89
|
+
sorting: T,
|
|
90
|
+
onSortingChange: G,
|
|
91
|
+
pageSize: D,
|
|
92
|
+
onPageSizeChange: K,
|
|
93
|
+
hasNextPage: !!R.data?.next_pagination_token,
|
|
94
|
+
hasPrevPage: !!R.data?.prev_pagination_token,
|
|
95
|
+
onNextPage: q,
|
|
96
|
+
onPrevPage: J
|
|
97
97
|
};
|
|
98
|
-
return m(() => {
|
|
99
|
-
b && (A(b), M(!0), x?.());
|
|
100
|
-
}, [x, b]), /* @__PURE__ */ v("div", {
|
|
101
|
-
"data-testid": f.root,
|
|
102
|
-
children: [
|
|
103
|
-
/* @__PURE__ */ _(a, {
|
|
104
|
-
rows: J.rows,
|
|
105
|
-
isLoading: J.isLoading || !V,
|
|
106
|
-
isError: J.isError,
|
|
107
|
-
onRetry: J.onRetry,
|
|
108
|
-
sorting: J.sorting,
|
|
109
|
-
onSortingChange: J.onSortingChange,
|
|
110
|
-
pageSize: J.pageSize,
|
|
111
|
-
onPageSizeChange: J.onPageSizeChange,
|
|
112
|
-
hasNextPage: J.hasNextPage,
|
|
113
|
-
hasPrevPage: J.hasPrevPage,
|
|
114
|
-
onNextPage: J.onNextPage,
|
|
115
|
-
onPrevPage: J.onPrevPage,
|
|
116
|
-
filterTabs: ie,
|
|
117
|
-
selectedFilterTabId: J.selectedFilterTabId,
|
|
118
|
-
onFilterTabChange: J.onFilterTabChange,
|
|
119
|
-
searchValue: J.searchValue,
|
|
120
|
-
onSearchChange: J.onSearchChange,
|
|
121
|
-
visibleColumns: J.visibleColumns,
|
|
122
|
-
cellTestIds: p,
|
|
123
|
-
isSearchActive: J.isSearchActive,
|
|
124
|
-
showAddPanelWhenEmpty: J.showAddPanelWhenEmpty,
|
|
125
|
-
emptyState: E.queueEmptyStates[J.selectedFilterTabId],
|
|
126
|
-
onCreateClick: G ? () => O(!0) : void 0,
|
|
127
|
-
onEnterManually: G ? Z : void 0,
|
|
128
|
-
onFilesSelected: G ? Q : void 0,
|
|
129
|
-
maxFiles: 10,
|
|
130
|
-
emailAddress: w,
|
|
131
|
-
onCopyEmail: $,
|
|
132
|
-
duplicateWarning: re,
|
|
133
|
-
onReviewDuplicates: () => B(!0),
|
|
134
|
-
labels: se
|
|
135
|
-
}),
|
|
136
|
-
z ? /* @__PURE__ */ _(c, {
|
|
137
|
-
open: z,
|
|
138
|
-
onOpenChange: B,
|
|
139
|
-
bills: C,
|
|
140
|
-
canManageDuplicates: G,
|
|
141
|
-
onOpenBill: ae
|
|
142
|
-
}) : null,
|
|
143
|
-
G ? /* @__PURE__ */ _(i, {
|
|
144
|
-
open: D,
|
|
145
|
-
onOpenChange: O,
|
|
146
|
-
onFilesSelected: Q,
|
|
147
|
-
maxFiles: 10,
|
|
148
|
-
onEnterManually: Z,
|
|
149
|
-
emailAddress: w,
|
|
150
|
-
onCopyEmail: $,
|
|
151
|
-
labels: { heading: J.hasAnyBills ? E.nonEmptyHeading : E.emptyHeading }
|
|
152
|
-
}) : null,
|
|
153
|
-
j ? /* @__PURE__ */ _(o, {
|
|
154
|
-
open: j,
|
|
155
|
-
onOpenChange: M,
|
|
156
|
-
payableId: k,
|
|
157
|
-
isPossibleDuplicate: Y(k)
|
|
158
|
-
}) : null,
|
|
159
|
-
F ? /* @__PURE__ */ _(s, {
|
|
160
|
-
open: F,
|
|
161
|
-
onOpenChange: I,
|
|
162
|
-
payableId: N,
|
|
163
|
-
onClose: () => I(!1),
|
|
164
|
-
onExpand: oe,
|
|
165
|
-
isPossibleDuplicate: Y(N),
|
|
166
|
-
testId: f.detailsSheet,
|
|
167
|
-
poweredByBankName: S
|
|
168
|
-
}) : null,
|
|
169
|
-
L ? /* @__PURE__ */ _(o, {
|
|
170
|
-
open: L,
|
|
171
|
-
onOpenChange: R,
|
|
172
|
-
payableId: N,
|
|
173
|
-
readOnly: !0,
|
|
174
|
-
poweredByBankName: S,
|
|
175
|
-
isPossibleDuplicate: Y(N)
|
|
176
|
-
}) : null
|
|
177
|
-
]
|
|
178
|
-
});
|
|
179
98
|
}
|
|
180
99
|
//#endregion
|
|
181
|
-
export {
|
|
100
|
+
export { y as useBillsTable };
|
|
@@ -1,5 +1,181 @@
|
|
|
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 } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
|
+
import "../../../shared/feature/dist/index.js";
|
|
12
|
+
import { AddBillDialog as i } from "../../ui/dist/index10.js";
|
|
13
|
+
import { BillsScreen as a } from "../../ui/dist/index60.js";
|
|
14
|
+
import "../../ui/dist/index.js";
|
|
15
|
+
import { BillCreateDialog as o } from "./index40.js";
|
|
16
|
+
import "./index41.js";
|
|
17
|
+
import { BillDetailsContainer as s } from "./index44.js";
|
|
18
|
+
import "./index45.js";
|
|
19
|
+
import "./index51.js";
|
|
20
|
+
import "./index52.js";
|
|
21
|
+
import { DuplicateBillsContainer as c } from "./index55.js";
|
|
1
22
|
import "./index56.js";
|
|
2
|
-
import "./
|
|
3
|
-
import "./index59.js";
|
|
4
|
-
import "./index60.js";
|
|
5
|
-
import "./index61.js";
|
|
23
|
+
import { BILL_QUEUE_ORDER as l, BillQueue as u } from "./index57.js";
|
|
24
|
+
import { BILLS_TAB_LABELS_EN as d } from "./index59.js";
|
|
25
|
+
import { billsTabTestIds as f, billsTableCellTestIds as p } from "./index60.js";
|
|
26
|
+
import { useBillsTable as ee } from "./index61.js";
|
|
27
|
+
import { copyTextToClipboard as te } from "./index58.js";
|
|
28
|
+
import { useCallback as ne, useEffect as m, useMemo as h, useState as g } from "react";
|
|
29
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
30
|
+
import { CalendarClockIcon as y, CheckIcon as b, FilePenIcon as x, ListIcon as S, LoaderCircleIcon as C } from "lucide-react";
|
|
31
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js
|
|
32
|
+
var w = "bills@business-banking.app", T = {
|
|
33
|
+
[u.Drafts]: /* @__PURE__ */ _(x, {
|
|
34
|
+
className: "ttw:size-4",
|
|
35
|
+
"aria-hidden": !0
|
|
36
|
+
}),
|
|
37
|
+
[u.Pending]: /* @__PURE__ */ _(C, {
|
|
38
|
+
className: "ttw:size-4",
|
|
39
|
+
"aria-hidden": !0
|
|
40
|
+
}),
|
|
41
|
+
[u.Scheduled]: /* @__PURE__ */ _(y, {
|
|
42
|
+
className: "ttw:size-4",
|
|
43
|
+
"aria-hidden": !0
|
|
44
|
+
}),
|
|
45
|
+
[u.Paid]: /* @__PURE__ */ _(b, {
|
|
46
|
+
className: "ttw:size-4",
|
|
47
|
+
"aria-hidden": !0
|
|
48
|
+
}),
|
|
49
|
+
[u.All]: /* @__PURE__ */ _(S, {
|
|
50
|
+
className: "ttw:size-4",
|
|
51
|
+
"aria-hidden": !0
|
|
52
|
+
})
|
|
53
|
+
};
|
|
54
|
+
function E({ labels: u, onEnqueueFiles: y, openPayableId: b, onOpenPayableHandled: x, poweredByBankName: S, duplicateBills: C }) {
|
|
55
|
+
let E = h(() => ({
|
|
56
|
+
...d,
|
|
57
|
+
...u,
|
|
58
|
+
queues: {
|
|
59
|
+
...d.queues,
|
|
60
|
+
...u?.queues
|
|
61
|
+
},
|
|
62
|
+
queueEmptyStates: l.reduce((e, t) => ({
|
|
63
|
+
...e,
|
|
64
|
+
[t]: {
|
|
65
|
+
...d.queueEmptyStates[t],
|
|
66
|
+
...u?.queueEmptyStates?.[t]
|
|
67
|
+
}
|
|
68
|
+
}), {})
|
|
69
|
+
}), [u]), [D, O] = g(!1), [k, A] = g(), [j, M] = g(!1), [N, P] = g(), [F, I] = g(!1), [L, R] = g(!1), [z, B] = g(!1), { initResponse: V } = r(), H = t(V?.scopes, [n.PayableReadOrg]), U = t(V?.scopes, [n.PayableWriteOrg]), W = !V || H, G = !V || U, K = ne((e, t) => {
|
|
70
|
+
if (t && G) {
|
|
71
|
+
A(e), M(!0);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
P(e), I(!0);
|
|
75
|
+
}, [G]), q = h(() => (C ?? []).filter((e) => e.isPossibleDuplicate).map((e) => e.id), [C]), J = ee({
|
|
76
|
+
enabled: W,
|
|
77
|
+
onOpenBill: K,
|
|
78
|
+
duplicateBillIds: q,
|
|
79
|
+
duplicateBadgeLabel: E.duplicateBadge
|
|
80
|
+
}), Y = (e) => !!(e && q.includes(e)), X = q.length, re = X === 0 ? void 0 : X === 1 ? E.duplicateWarningOne : E.duplicateWarningMany(X), ie = h(() => l.map((e) => ({
|
|
81
|
+
id: e,
|
|
82
|
+
label: E.queues[e],
|
|
83
|
+
icon: T[e]
|
|
84
|
+
})), [E.queues]), ae = (e) => {
|
|
85
|
+
B(!1), P(e), I(!0);
|
|
86
|
+
}, oe = () => {
|
|
87
|
+
I(!1), R(!0);
|
|
88
|
+
}, se = h(() => ({
|
|
89
|
+
createButton: E.createButton,
|
|
90
|
+
addBill: { heading: E.nonEmptyHeading }
|
|
91
|
+
}), [E.createButton, E.nonEmptyHeading]), Z = () => {
|
|
92
|
+
O(!1), A(void 0), M(!0);
|
|
93
|
+
}, Q = (e) => {
|
|
94
|
+
O(!1), y?.(e);
|
|
95
|
+
}, $ = async () => {
|
|
96
|
+
await te(w) ? e.success(E.emailCopiedToast) : e.error(E.emailCopyFailedToast);
|
|
97
|
+
};
|
|
98
|
+
return m(() => {
|
|
99
|
+
b && (A(b), M(!0), x?.());
|
|
100
|
+
}, [x, b]), /* @__PURE__ */ v("div", {
|
|
101
|
+
"data-testid": f.root,
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ _(a, {
|
|
104
|
+
rows: J.rows,
|
|
105
|
+
isLoading: J.isLoading || !V,
|
|
106
|
+
isError: J.isError,
|
|
107
|
+
onRetry: J.onRetry,
|
|
108
|
+
sorting: J.sorting,
|
|
109
|
+
onSortingChange: J.onSortingChange,
|
|
110
|
+
pageSize: J.pageSize,
|
|
111
|
+
onPageSizeChange: J.onPageSizeChange,
|
|
112
|
+
hasNextPage: J.hasNextPage,
|
|
113
|
+
hasPrevPage: J.hasPrevPage,
|
|
114
|
+
onNextPage: J.onNextPage,
|
|
115
|
+
onPrevPage: J.onPrevPage,
|
|
116
|
+
filterTabs: ie,
|
|
117
|
+
selectedFilterTabId: J.selectedFilterTabId,
|
|
118
|
+
onFilterTabChange: J.onFilterTabChange,
|
|
119
|
+
searchValue: J.searchValue,
|
|
120
|
+
onSearchChange: J.onSearchChange,
|
|
121
|
+
visibleColumns: J.visibleColumns,
|
|
122
|
+
cellTestIds: p,
|
|
123
|
+
isSearchActive: J.isSearchActive,
|
|
124
|
+
showAddPanelWhenEmpty: J.showAddPanelWhenEmpty,
|
|
125
|
+
emptyState: E.queueEmptyStates[J.selectedFilterTabId],
|
|
126
|
+
onCreateClick: G ? () => O(!0) : void 0,
|
|
127
|
+
onEnterManually: G ? Z : void 0,
|
|
128
|
+
onFilesSelected: G ? Q : void 0,
|
|
129
|
+
maxFiles: 10,
|
|
130
|
+
emailAddress: w,
|
|
131
|
+
onCopyEmail: $,
|
|
132
|
+
duplicateWarning: re,
|
|
133
|
+
onReviewDuplicates: () => B(!0),
|
|
134
|
+
labels: se
|
|
135
|
+
}),
|
|
136
|
+
z ? /* @__PURE__ */ _(c, {
|
|
137
|
+
open: z,
|
|
138
|
+
onOpenChange: B,
|
|
139
|
+
bills: C,
|
|
140
|
+
canManageDuplicates: G,
|
|
141
|
+
onOpenBill: ae
|
|
142
|
+
}) : null,
|
|
143
|
+
G ? /* @__PURE__ */ _(i, {
|
|
144
|
+
open: D,
|
|
145
|
+
onOpenChange: O,
|
|
146
|
+
onFilesSelected: Q,
|
|
147
|
+
maxFiles: 10,
|
|
148
|
+
onEnterManually: Z,
|
|
149
|
+
emailAddress: w,
|
|
150
|
+
onCopyEmail: $,
|
|
151
|
+
labels: { heading: J.hasAnyBills ? E.nonEmptyHeading : E.emptyHeading }
|
|
152
|
+
}) : null,
|
|
153
|
+
j ? /* @__PURE__ */ _(o, {
|
|
154
|
+
open: j,
|
|
155
|
+
onOpenChange: M,
|
|
156
|
+
payableId: k,
|
|
157
|
+
isPossibleDuplicate: Y(k)
|
|
158
|
+
}) : null,
|
|
159
|
+
F ? /* @__PURE__ */ _(s, {
|
|
160
|
+
open: F,
|
|
161
|
+
onOpenChange: I,
|
|
162
|
+
payableId: N,
|
|
163
|
+
onClose: () => I(!1),
|
|
164
|
+
onExpand: oe,
|
|
165
|
+
isPossibleDuplicate: Y(N),
|
|
166
|
+
testId: f.detailsSheet,
|
|
167
|
+
poweredByBankName: S
|
|
168
|
+
}) : null,
|
|
169
|
+
L ? /* @__PURE__ */ _(o, {
|
|
170
|
+
open: L,
|
|
171
|
+
onOpenChange: R,
|
|
172
|
+
payableId: N,
|
|
173
|
+
readOnly: !0,
|
|
174
|
+
poweredByBankName: S,
|
|
175
|
+
isPossibleDuplicate: Y(N)
|
|
176
|
+
}) : null
|
|
177
|
+
]
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
//#endregion
|
|
181
|
+
export { E as BillsTab, E as default };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
export { e as DEFAULT_TABS_LABELS };
|
|
1
|
+
import "./index57.js";
|
|
2
|
+
import "./index59.js";
|
|
3
|
+
import "./index60.js";
|
|
4
|
+
import "./index61.js";
|
|
5
|
+
import "./index62.js";
|