@tesouro/embedded-components-react 0.2.336 → 0.2.338
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 +22 -0
- 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 +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +103 -58
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +74 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +12 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +25 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +64 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +40 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +51 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +5 -71
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +71 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +46 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +78 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +33 -117
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +138 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +63 -200
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +194 -184
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +180 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +64 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +12 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +46 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +26 -158
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +159 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +32 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +102 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +13 -219
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +243 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +4 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +27 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +76 -125
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +137 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +2 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +45 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +9 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +3 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +7 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +20 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +57 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +3 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +105 -157
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +11 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +40 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +100 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +171 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +34 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +1 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +38 -269
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +272 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +2 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +7 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +49 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +2 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +20 -284
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +286 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +13 -117
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +120 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +8 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +96 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +11 -56
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +57 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +1 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +51 -136
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +141 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +5 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +44 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -61
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +63 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +1 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +73 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +251 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +9 -252
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +1 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +6 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +43 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +278 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +8 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +91 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +15 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +101 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +3 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +28 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +2 -170
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +7 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +32 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +2 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +12 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +106 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +170 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +89 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +26 -26
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/clientRegistry.js +11 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +94 -74
- 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 +1378 -1371
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +0 -34
|
@@ -1,8 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { DuplicateBillsDialog as e } from "../../ui/dist/index67.js";
|
|
6
|
+
import "../../ui/dist/index.js";
|
|
7
|
+
import { DUPLICATE_BILLS_LABELS_EN as t } from "./index52.js";
|
|
8
|
+
import { useDuplicateBillsSelection as n } from "./index53.js";
|
|
9
|
+
import { useMemo as r } from "react";
|
|
10
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
1
11
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
12
|
+
var a = [];
|
|
13
|
+
function o({ open: o, onOpenChange: s, bills: c = a, canManageDuplicates: l = !0, onOpenBill: u, labels: d, dialogLabels: f }) {
|
|
14
|
+
let p = r(() => ({
|
|
15
|
+
...t,
|
|
16
|
+
...d
|
|
17
|
+
}), [d]), m = r(() => c.map((e) => e.id), [c]), { selectedIds: h, isSelected: g, toggleRow: _, toggleAllRows: v, selectAllChecked: y } = n({ rowIds: m }), b = r(() => c.map((e) => {
|
|
18
|
+
let t = e.isPossibleDuplicate ? p.duplicateBadge : p.existingBadge, n = {
|
|
19
|
+
vendorLabel: e.vendorLabel,
|
|
20
|
+
designation: t,
|
|
21
|
+
invoiceNumberLabel: e.invoiceNumberLabel,
|
|
22
|
+
addedOnLabel: e.addedOnLabel
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
...e,
|
|
26
|
+
duplicateBadge: {
|
|
27
|
+
label: t,
|
|
28
|
+
tone: e.isPossibleDuplicate ? "warning" : "success"
|
|
29
|
+
},
|
|
30
|
+
selectLabel: p.selectRow(n),
|
|
31
|
+
openLabel: p.openRow(n),
|
|
32
|
+
isSelected: g(e.id),
|
|
33
|
+
onToggleSelected: () => _(e.id),
|
|
34
|
+
onOpen: () => u?.(e.id)
|
|
35
|
+
};
|
|
36
|
+
}), [
|
|
37
|
+
c,
|
|
38
|
+
g,
|
|
39
|
+
p,
|
|
40
|
+
_,
|
|
41
|
+
u
|
|
42
|
+
]), x = () => {
|
|
43
|
+
if (h.length === 0) throw Error("Duplicate review action taken with no bills selected — keep and cancel both need a subject.");
|
|
44
|
+
s(!1);
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ i(e, {
|
|
47
|
+
open: o,
|
|
48
|
+
onOpenChange: s,
|
|
49
|
+
rows: b,
|
|
50
|
+
selectAllChecked: y,
|
|
51
|
+
onToggleAllRows: v,
|
|
52
|
+
onKeepSelected: l ? x : void 0,
|
|
53
|
+
onCancelDuplicates: l ? x : void 0,
|
|
54
|
+
isActionDisabled: h.length === 0,
|
|
55
|
+
labels: f
|
|
56
|
+
});
|
|
57
|
+
}
|
|
7
58
|
//#endregion
|
|
8
|
-
export {
|
|
59
|
+
export { o as DuplicateBillsContainer, o as default };
|
|
@@ -1,91 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 "./index20.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 "./index51.js";
|
|
12
|
-
import { useCallback as p, useEffect as m, useMemo as h, useState as g } from "react";
|
|
13
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js
|
|
14
|
-
var _ = 10, v = [{
|
|
15
|
-
id: "addedOnLabel",
|
|
16
|
-
desc: !0
|
|
17
|
-
}];
|
|
18
|
-
function y({ enabled: y = !0, onOpenBill: b }) {
|
|
19
|
-
let [x, S] = g(o), [C, w] = g(v), [T, E] = g(_), [D, O] = g(), [k, A] = g(""), [j, M] = g(""), N = p(() => O(void 0), []);
|
|
20
|
-
m(() => {
|
|
21
|
-
let e = setTimeout(() => {
|
|
22
|
-
M(k), N();
|
|
23
|
-
}, 300);
|
|
24
|
-
return () => clearTimeout(e);
|
|
25
|
-
}, [k, N]);
|
|
26
|
-
let P = C[0], F = f(P?.id), I = r({
|
|
27
|
-
limit: T,
|
|
28
|
-
pagination_token: D,
|
|
29
|
-
status__in: u(x),
|
|
30
|
-
has_scheduled_payment: c(x),
|
|
31
|
-
counterpart_name__icontains: j || void 0,
|
|
32
|
-
sort: F,
|
|
33
|
-
order: F ? P?.desc ? "desc" : "asc" : void 0,
|
|
34
|
-
enabled: y
|
|
35
|
-
}), L = I.data?.data.length === 0, R = i({ enabled: y && L }), z = !L || (R.data?.count ?? 1) > 0, B = h(() => (I.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
|
-
onOpen: () => b(r.id, i.status === "draft")
|
|
53
|
-
};
|
|
54
|
-
}), [I.data?.data, b]), V = p((e) => {
|
|
55
|
-
let t = e;
|
|
56
|
-
S(t), w((e) => {
|
|
57
|
-
let n = e[0]?.id;
|
|
58
|
-
return n ? s(t).some((e) => d(e) === n) ? e : v : e;
|
|
59
|
-
}), N();
|
|
60
|
-
}, [N]), H = p((e) => {
|
|
61
|
-
w((t) => typeof e == "function" ? e(t) : e), N();
|
|
62
|
-
}, [N]), U = p((e) => {
|
|
63
|
-
E(e), N();
|
|
64
|
-
}, [N]), W = p(() => O(I.data?.next_pagination_token), [I.data?.next_pagination_token]), G = p(() => O(I.data?.prev_pagination_token), [I.data?.prev_pagination_token]), K = p(() => {
|
|
65
|
-
I.refetch();
|
|
66
|
-
}, [I.refetch]);
|
|
67
|
-
return {
|
|
68
|
-
rows: B,
|
|
69
|
-
isLoading: I.isFetching || L && R.isLoading,
|
|
70
|
-
isError: I.isError,
|
|
71
|
-
onRetry: K,
|
|
72
|
-
selectedFilterTabId: x,
|
|
73
|
-
onFilterTabChange: V,
|
|
74
|
-
searchValue: k,
|
|
75
|
-
onSearchChange: A,
|
|
76
|
-
hasAnyBills: z,
|
|
77
|
-
isSearchActive: j.length > 0,
|
|
78
|
-
visibleColumns: s(x),
|
|
79
|
-
showAddPanelWhenEmpty: l(x),
|
|
80
|
-
sorting: C,
|
|
81
|
-
onSortingChange: H,
|
|
82
|
-
pageSize: T,
|
|
83
|
-
onPageSizeChange: U,
|
|
84
|
-
hasNextPage: !!I.data?.next_pagination_token,
|
|
85
|
-
hasPrevPage: !!I.data?.prev_pagination_token,
|
|
86
|
-
onNextPage: W,
|
|
87
|
-
onPrevPage: G
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
//#endregion
|
|
91
|
-
export { y as useBillsTable };
|
|
1
|
+
import "./index52.js";
|
|
2
|
+
import "./index53.js";
|
|
3
|
+
import "./index54.js";
|
|
@@ -1,162 +1,110 @@
|
|
|
1
|
-
|
|
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/index54.js";
|
|
1
|
+
import { BillColumn as e } from "../../ui/dist/index59.js";
|
|
14
2
|
import "../../ui/dist/index.js";
|
|
15
|
-
import { BillCreateDialog as o } from "./index38.js";
|
|
16
|
-
import "./index39.js";
|
|
17
|
-
import { BillDetailsContainer as s } from "./index42.js";
|
|
18
|
-
import "./index43.js";
|
|
19
|
-
import "./index49.js";
|
|
20
|
-
import "./index50.js";
|
|
21
|
-
import { BILL_QUEUE_ORDER as c, BillQueue as l } from "./index51.js";
|
|
22
|
-
import { BILLS_TAB_LABELS_EN as u } from "./index53.js";
|
|
23
|
-
import { billsTabTestIds as d } from "./index54.js";
|
|
24
|
-
import { useBillsTable as f } from "./index55.js";
|
|
25
|
-
import { copyTextToClipboard as p } from "./index52.js";
|
|
26
|
-
import { useCallback as m, useEffect as h, useMemo as g, useState as _ } from "react";
|
|
27
|
-
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
28
|
-
import { CalendarClockIcon as b, CheckIcon as x, FilePenIcon as S, ListIcon as C, LoaderCircleIcon as w } from "lucide-react";
|
|
29
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
4
|
+
var t = {
|
|
5
|
+
Drafts: "drafts",
|
|
6
|
+
Pending: "pending",
|
|
7
|
+
Scheduled: "scheduled",
|
|
8
|
+
Paid: "paid",
|
|
9
|
+
All: "all"
|
|
10
|
+
}, n = {
|
|
11
|
+
[t.Drafts]: ["draft"],
|
|
12
|
+
[t.Pending]: [
|
|
13
|
+
"new",
|
|
14
|
+
"approve_in_progress",
|
|
15
|
+
"waiting_to_be_paid",
|
|
16
|
+
"partially_paid"
|
|
17
|
+
],
|
|
18
|
+
[t.Scheduled]: [
|
|
19
|
+
"new",
|
|
20
|
+
"approve_in_progress",
|
|
21
|
+
"waiting_to_be_paid",
|
|
22
|
+
"partially_paid"
|
|
23
|
+
],
|
|
24
|
+
[t.Paid]: ["paid"],
|
|
25
|
+
[t.All]: void 0
|
|
26
|
+
}, r = {
|
|
27
|
+
[t.Drafts]: void 0,
|
|
28
|
+
[t.Pending]: !1,
|
|
29
|
+
[t.Scheduled]: !0,
|
|
30
|
+
[t.Paid]: void 0,
|
|
31
|
+
[t.All]: void 0
|
|
51
32
|
};
|
|
52
|
-
function
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
U ? /* @__PURE__ */ v(i, {
|
|
128
|
-
open: D,
|
|
129
|
-
onOpenChange: O,
|
|
130
|
-
onFilesSelected: X,
|
|
131
|
-
maxFiles: 10,
|
|
132
|
-
onEnterManually: Y,
|
|
133
|
-
emailAddress: T,
|
|
134
|
-
onCopyEmail: Z,
|
|
135
|
-
labels: { heading: G.hasAnyBills ? w.nonEmptyHeading : w.emptyHeading }
|
|
136
|
-
}) : null,
|
|
137
|
-
j ? /* @__PURE__ */ v(o, {
|
|
138
|
-
open: j,
|
|
139
|
-
onOpenChange: M,
|
|
140
|
-
payableId: k
|
|
141
|
-
}) : null,
|
|
142
|
-
F ? /* @__PURE__ */ v(s, {
|
|
143
|
-
open: F,
|
|
144
|
-
onOpenChange: I,
|
|
145
|
-
payableId: N,
|
|
146
|
-
onClose: () => I(!1),
|
|
147
|
-
onExpand: q,
|
|
148
|
-
testId: d.detailsSheet,
|
|
149
|
-
poweredByBankName: C
|
|
150
|
-
}) : null,
|
|
151
|
-
L ? /* @__PURE__ */ v(o, {
|
|
152
|
-
open: L,
|
|
153
|
-
onOpenChange: R,
|
|
154
|
-
payableId: N,
|
|
155
|
-
readOnly: !0,
|
|
156
|
-
poweredByBankName: C
|
|
157
|
-
}) : null
|
|
158
|
-
]
|
|
159
|
-
});
|
|
33
|
+
function i(e) {
|
|
34
|
+
return e === t.Pending || e === t.Drafts;
|
|
35
|
+
}
|
|
36
|
+
var a = t.Pending, o = [
|
|
37
|
+
t.Pending,
|
|
38
|
+
t.Drafts,
|
|
39
|
+
t.Scheduled,
|
|
40
|
+
t.Paid,
|
|
41
|
+
t.All
|
|
42
|
+
], s = {
|
|
43
|
+
[t.Drafts]: [
|
|
44
|
+
e.Vendor,
|
|
45
|
+
e.DueDate,
|
|
46
|
+
e.Status,
|
|
47
|
+
e.AmountDue,
|
|
48
|
+
e.AddedOn
|
|
49
|
+
],
|
|
50
|
+
[t.Pending]: [
|
|
51
|
+
e.Vendor,
|
|
52
|
+
e.DueDate,
|
|
53
|
+
e.Status,
|
|
54
|
+
e.AmountDue,
|
|
55
|
+
e.AddedOn
|
|
56
|
+
],
|
|
57
|
+
[t.Scheduled]: [
|
|
58
|
+
e.Vendor,
|
|
59
|
+
e.DueDate,
|
|
60
|
+
e.ScheduledDate,
|
|
61
|
+
e.Status,
|
|
62
|
+
e.AmountScheduled,
|
|
63
|
+
e.AddedOn
|
|
64
|
+
],
|
|
65
|
+
[t.Paid]: [
|
|
66
|
+
e.Vendor,
|
|
67
|
+
e.PaidDate,
|
|
68
|
+
e.Status,
|
|
69
|
+
e.AmountPaid,
|
|
70
|
+
e.AddedOn
|
|
71
|
+
],
|
|
72
|
+
[t.All]: [
|
|
73
|
+
e.Vendor,
|
|
74
|
+
e.DueDate,
|
|
75
|
+
e.ScheduledDate,
|
|
76
|
+
e.Status,
|
|
77
|
+
e.AmountDue,
|
|
78
|
+
e.AmountPaid,
|
|
79
|
+
e.AddedOn
|
|
80
|
+
]
|
|
81
|
+
};
|
|
82
|
+
function c(e) {
|
|
83
|
+
return s[e];
|
|
84
|
+
}
|
|
85
|
+
function l(e) {
|
|
86
|
+
let t = n[e];
|
|
87
|
+
return t ? [...t] : void 0;
|
|
88
|
+
}
|
|
89
|
+
function u(e) {
|
|
90
|
+
return r[e];
|
|
91
|
+
}
|
|
92
|
+
var d = {
|
|
93
|
+
vendorLabel: "counterpart_name",
|
|
94
|
+
dueDateLabel: "due_date",
|
|
95
|
+
scheduledDateLabel: "scheduled_payment_date",
|
|
96
|
+
addedOnLabel: "created_at"
|
|
97
|
+
}, f = {
|
|
98
|
+
[e.Vendor]: "vendorLabel",
|
|
99
|
+
[e.DueDate]: "dueDateLabel",
|
|
100
|
+
[e.ScheduledDate]: "scheduledDateLabel",
|
|
101
|
+
[e.AddedOn]: "addedOnLabel"
|
|
102
|
+
};
|
|
103
|
+
function p(e) {
|
|
104
|
+
return f[e];
|
|
105
|
+
}
|
|
106
|
+
function m(e) {
|
|
107
|
+
if (e) return d[e];
|
|
160
108
|
}
|
|
161
109
|
//#endregion
|
|
162
|
-
export {
|
|
110
|
+
export { s as BILL_QUEUE_COLUMNS, r as BILL_QUEUE_HAS_SCHEDULED_PAYMENT, o as BILL_QUEUE_ORDER, n as BILL_QUEUE_STATUSES, d as BILL_SORT_FIELDS, t as BillQueue, a as DEFAULT_BILL_QUEUE, c as billQueueColumns, u as billQueueHasScheduledPayment, i as billQueueOffersAddPanel, l as billQueueStatuses, p as billSortColumnId, m as billSortField };
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js
|
|
2
|
+
async function e(e) {
|
|
3
|
+
if (!e.trim()) return !1;
|
|
4
|
+
try {
|
|
5
|
+
return await navigator.clipboard.writeText(e), !0;
|
|
6
|
+
} catch {
|
|
7
|
+
return !1;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { e as copyTextToClipboard };
|
|
@@ -1,8 +1,43 @@
|
|
|
1
|
+
import { BillQueue as e } from "./index56.js";
|
|
1
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var t = {
|
|
4
|
+
[e.Drafts]: "Drafts",
|
|
5
|
+
[e.Pending]: "Pending",
|
|
6
|
+
[e.Scheduled]: "Scheduled",
|
|
7
|
+
[e.Paid]: "Paid",
|
|
8
|
+
[e.All]: "All bills"
|
|
9
|
+
}, n = {
|
|
10
|
+
[e.Drafts]: {
|
|
11
|
+
title: "No drafts",
|
|
12
|
+
description: "Bills wait here until someone submits them for approval."
|
|
13
|
+
},
|
|
14
|
+
[e.Pending]: {
|
|
15
|
+
title: "Nothing to act on",
|
|
16
|
+
description: "Every bill has been paid, scheduled, or is still a draft."
|
|
17
|
+
},
|
|
18
|
+
[e.Scheduled]: {
|
|
19
|
+
title: "No scheduled bills",
|
|
20
|
+
description: "Bills appear here once a payment date is set for them."
|
|
21
|
+
},
|
|
22
|
+
[e.Paid]: {
|
|
23
|
+
title: "No paid bills",
|
|
24
|
+
description: "Bills appear here once their payment has gone out."
|
|
25
|
+
},
|
|
26
|
+
[e.All]: {
|
|
27
|
+
title: "No bills",
|
|
28
|
+
description: "Bills appear here as soon as they are added."
|
|
29
|
+
}
|
|
30
|
+
}, r = {
|
|
31
|
+
duplicateWarningOne: "1 possible duplicate bill found",
|
|
32
|
+
duplicateWarningMany: (e) => `${e} possible duplicate bills found`,
|
|
33
|
+
duplicateBadge: "Duplicate?",
|
|
34
|
+
emptyHeading: "Add your first bill",
|
|
35
|
+
nonEmptyHeading: "Add a bill",
|
|
36
|
+
createButton: "Add bill",
|
|
37
|
+
emailCopiedToast: "Email address copied to clipboard",
|
|
38
|
+
emailCopyFailedToast: "Could not copy the email address",
|
|
39
|
+
queues: t,
|
|
40
|
+
queueEmptyStates: n
|
|
6
41
|
};
|
|
7
42
|
//#endregion
|
|
8
|
-
export {
|
|
43
|
+
export { r as BILLS_TAB_LABELS_EN, n as BILL_QUEUE_EMPTY_STATES_EN, t as BILL_QUEUE_LABELS_EN };
|
|
@@ -1,115 +1,8 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
-
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
-
import "../../../shared/data-access/dist/index.js";
|
|
8
|
-
import { EmbeddedToaster as n } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
9
|
-
import "../../../shared/ui/dist/index.js";
|
|
10
|
-
import { useAnalyticsTrack as r } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
11
|
-
import { WidgetProvider as i } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
12
|
-
import { useWidgetConfig as a } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
13
|
-
import "../../../shared/feature/dist/index.js";
|
|
14
|
-
import { BillPayWidgetUi as o } from "../../ui/dist/index43.js";
|
|
15
|
-
import { BillUploadStatusTray as s } from "../../ui/dist/index57.js";
|
|
16
|
-
import "../../ui/dist/index.js";
|
|
17
|
-
import { ApprovalPoliciesSettings as c } from "../../../shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js";
|
|
18
|
-
import "../../../shared/approval-policy/feature/dist/index.js";
|
|
19
|
-
import { useBillUploadQueue as l } from "./index49.js";
|
|
20
|
-
import "./index50.js";
|
|
21
|
-
import { billsTabTestIds as u } from "./index54.js";
|
|
22
|
-
import { BillsTab as d } from "./index56.js";
|
|
23
|
-
import "./index57.js";
|
|
24
|
-
import { BillPayWidgetAnalyticsEvent as f, WIDGET_NAME as p } from "./index44.js";
|
|
25
|
-
import { DEFAULT_TABS_LABELS as m } from "./index58.js";
|
|
26
|
-
import { CounterpartsWidget as h } from "../../../counterparts-widget/feature/dist/index8.js";
|
|
27
|
-
import "../../../counterparts-widget/feature/dist/index.js";
|
|
28
|
-
import { useCallback as g, useEffect as _, useState as v } from "react";
|
|
29
|
-
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
30
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
S.Bills,
|
|
37
|
-
S.Vendors,
|
|
38
|
-
S.Settings
|
|
39
|
-
];
|
|
40
|
-
function w({ labels: i, tabsLabels: p, approvalPolicyLabels: w, approvalPolicyComponentLabels: T, vendorLabels: E, poweredByBankName: D }) {
|
|
41
|
-
let O = r();
|
|
42
|
-
_(() => {
|
|
43
|
-
O(f.Mounted);
|
|
44
|
-
}, [O]);
|
|
45
|
-
let k = {
|
|
46
|
-
...m,
|
|
47
|
-
...p
|
|
48
|
-
}, { initResponse: A } = a(), j = e(A?.scopes, [t.ApprovalPolicyWriteOrg]), M = !A || j, [N, P] = v(S.Bills), [F, I] = v(), L = g((e) => {
|
|
49
|
-
P(S.Bills), I(e);
|
|
50
|
-
}, []), R = l({ onOpenBill: L }), z = [{
|
|
51
|
-
id: S.Bills,
|
|
52
|
-
label: k.bills,
|
|
53
|
-
content: /* @__PURE__ */ b(d, {
|
|
54
|
-
onEnqueueFiles: R.enqueue,
|
|
55
|
-
openPayableId: F,
|
|
56
|
-
onOpenPayableHandled: () => I(void 0),
|
|
57
|
-
poweredByBankName: D
|
|
58
|
-
})
|
|
59
|
-
}, {
|
|
60
|
-
id: S.Vendors,
|
|
61
|
-
label: k.vendors,
|
|
62
|
-
content: /* @__PURE__ */ b(h, {
|
|
63
|
-
...E,
|
|
64
|
-
counterpartType: "vendor",
|
|
65
|
-
showTitle: !1,
|
|
66
|
-
onViewAllDocuments: () => P(S.Bills)
|
|
67
|
-
})
|
|
68
|
-
}];
|
|
69
|
-
M && z.push({
|
|
70
|
-
id: S.Settings,
|
|
71
|
-
label: k.settings,
|
|
72
|
-
content: /* @__PURE__ */ b(c, {
|
|
73
|
-
labels: w,
|
|
74
|
-
componentLabels: T
|
|
75
|
-
})
|
|
76
|
-
});
|
|
77
|
-
let B = z.some((e) => e.id === N) ? N : C.find((e) => z.some((t) => t.id === e)) ?? z[0]?.id ?? "";
|
|
78
|
-
return /* @__PURE__ */ x(y, { children: [
|
|
79
|
-
/* @__PURE__ */ b(n, {}),
|
|
80
|
-
/* @__PURE__ */ b(o, {
|
|
81
|
-
labels: i,
|
|
82
|
-
tabs: z,
|
|
83
|
-
selectedTabId: B,
|
|
84
|
-
onTabChange: P
|
|
85
|
-
}),
|
|
86
|
-
R.isVisible ? /* @__PURE__ */ b(s, {
|
|
87
|
-
sections: R.sections,
|
|
88
|
-
summaryLabel: R.summaryLabel,
|
|
89
|
-
collapsed: R.collapsed,
|
|
90
|
-
onToggleCollapsed: R.onToggleCollapsed,
|
|
91
|
-
onClose: R.onClose,
|
|
92
|
-
testId: u.uploadTray
|
|
93
|
-
}) : null
|
|
94
|
-
] });
|
|
95
|
-
}
|
|
96
|
-
function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: d, disclosuresAcceptance: f, ...m }) {
|
|
97
|
-
return /* @__PURE__ */ b(i, {
|
|
98
|
-
widgetName: p,
|
|
99
|
-
baseUrl: e,
|
|
100
|
-
widgetToken: t,
|
|
101
|
-
organizationId: n,
|
|
102
|
-
configClient: r,
|
|
103
|
-
gatewayRouting: a,
|
|
104
|
-
linkComponent: o,
|
|
105
|
-
implementation: s,
|
|
106
|
-
uiFramework: c,
|
|
107
|
-
errorFallback: l,
|
|
108
|
-
onError: u,
|
|
109
|
-
analytics: d,
|
|
110
|
-
disclosuresAcceptance: f,
|
|
111
|
-
children: /* @__PURE__ */ b(w, { ...m })
|
|
112
|
-
});
|
|
113
|
-
}
|
|
2
|
+
var e = {
|
|
3
|
+
root: "bill-pay-bills-tab",
|
|
4
|
+
uploadTray: "bill-pay-upload-tray",
|
|
5
|
+
detailsSheet: "bill-pay-details-sheet"
|
|
6
|
+
};
|
|
114
7
|
//#endregion
|
|
115
|
-
export {
|
|
8
|
+
export { e as billsTabTestIds };
|