@tesouro/embedded-components-react 0.4.0 → 0.4.2
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/index28.js +8 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +7 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +56 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +18 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +126 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +22 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +4 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +40 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +5 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +72 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +47 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +91 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +33 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +167 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +23 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +199 -203
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +198 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +105 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +47 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +27 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +198 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +30 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +240 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +18 -341
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +343 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +4 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +31 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +78 -163
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +170 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +46 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +9 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +3 -128
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +125 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +43 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +27 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +83 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +47 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +239 -101
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +107 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +209 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index523.js +6 -3
- 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
|
@@ -2,209 +2,114 @@
|
|
|
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 {
|
|
14
|
-
import {
|
|
15
|
-
import "
|
|
16
|
-
import { DuplicateBillsContainer as te } from "./index9.js";
|
|
17
|
-
import "./index11.js";
|
|
18
|
-
import { BillCreateDialog as s } from "./index53.js";
|
|
19
|
-
import "./index54.js";
|
|
20
|
-
import { BillDetailsContainer as c } from "./index57.js";
|
|
21
|
-
import "./index58.js";
|
|
22
|
-
import "./index64.js";
|
|
23
|
-
import "./index65.js";
|
|
24
|
-
import { BILL_QUEUE_ORDER as l, BillQueue as u } from "./index66.js";
|
|
25
|
-
import { BILLS_TAB_LABELS_EN as d } from "./index69.js";
|
|
26
|
-
import { useBillsTable as f } from "./index75.js";
|
|
27
|
-
import { copyTextToClipboard as p } from "./index67.js";
|
|
28
|
-
import { resolveDuplicateWarning as m } from "./index68.js";
|
|
29
|
-
import { billsTabTestIds as h, billsTableCellTestIds as ne } from "./index70.js";
|
|
30
|
-
import { useCallback as re, useEffect as ie, useMemo as g, useState as _ } from "react";
|
|
31
|
-
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
32
|
-
import { CalendarClockIcon as b, CheckIcon as x, FilePenIcon as S, ListIcon as C, LoaderCircleIcon as w } 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 { hasSuspectedPayableDuplicate as n } from "../../data-access/dist/index6.js";
|
|
8
|
+
import { usePayablesQuery as r, usePayablesTotalCountQuery as i } from "../../data-access/dist/index15.js";
|
|
9
|
+
import "../../data-access/dist/index.js";
|
|
10
|
+
import { derivePayableStatus as a } from "./index4.js";
|
|
11
|
+
import { resolveVendorName as o } from "./index5.js";
|
|
12
|
+
import { isEditablePayableStatus as s } from "./index34.js";
|
|
13
|
+
import { BillQueue as c, DEFAULT_BILL_QUEUE as l, billQueueColumns as u, billQueueHasScheduledPayment as d, billQueueOffersAddPanel as f, billQueueStatuses as p, billSortColumnId as m, billSortField as h } from "./index67.js";
|
|
14
|
+
import { useBillsFilters as g } from "./index75.js";
|
|
15
|
+
import { useCallback as _, useEffect as v, useMemo as y, useState as b } from "react";
|
|
33
16
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js
|
|
34
|
-
var
|
|
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
|
-
|
|
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
|
-
|
|
17
|
+
var x = 10, S = [{
|
|
18
|
+
id: "addedOnLabel",
|
|
19
|
+
desc: !0
|
|
20
|
+
}];
|
|
21
|
+
function C({ enabled: C = !0, canReadVendors: w = !0, isVendorFilterPaused: T = !1, filterLabels: E, onOpenBill: D, duplicateBadgeLabel: O, attachmentLabel: k }) {
|
|
22
|
+
let [A, j] = b(l), [M, N] = b(S), [P, F] = b(x), [I, L] = b(), [R, z] = b(""), [B, V] = b(""), H = _(() => L(void 0), []);
|
|
23
|
+
v(() => {
|
|
24
|
+
let e = setTimeout(() => {
|
|
25
|
+
V(R), H();
|
|
26
|
+
}, 300);
|
|
27
|
+
return () => clearTimeout(e);
|
|
28
|
+
}, [R, H]);
|
|
29
|
+
let U = g({
|
|
30
|
+
offersStatusFilter: A === c.All,
|
|
31
|
+
offersVendorFilter: w,
|
|
32
|
+
isVendorFilterPaused: T,
|
|
33
|
+
labels: E,
|
|
34
|
+
onFiltersChange: H
|
|
35
|
+
}), W = M[0], G = h(W?.id), K = r({
|
|
36
|
+
...U.query,
|
|
37
|
+
limit: P,
|
|
38
|
+
pagination_token: I,
|
|
39
|
+
status__in: p(A) ?? U.query.status__in,
|
|
40
|
+
has_scheduled_payment: d(A),
|
|
41
|
+
counterpart_name__icontains: B || void 0,
|
|
42
|
+
sort: G,
|
|
43
|
+
order: G ? W?.desc ? "desc" : "asc" : void 0,
|
|
44
|
+
enabled: C
|
|
45
|
+
}), q = K.data?.data.length === 0, J = i({ enabled: C && q }), Y = !q || (J.data?.count ?? 1) > 0, X = y(() => (K.data?.data ?? []).map((r) => {
|
|
46
|
+
let i = a({
|
|
47
|
+
apiStatus: r.status,
|
|
48
|
+
dueDate: r.due_date,
|
|
49
|
+
scheduledPaymentDate: r.scheduled_payment_date
|
|
50
|
+
}), c = r.amount_due ?? r.total_amount, l = (e) => e == null ? "" : t(e / 100, { currencyCode: r.currency ?? "USD" });
|
|
51
|
+
return {
|
|
52
|
+
vendorLabel: o(r),
|
|
53
|
+
issueDateLabel: e(r.issued_at),
|
|
54
|
+
dueDateLabel: e(r.due_date),
|
|
55
|
+
dueDateTone: i.isOverdue ? "danger" : "default",
|
|
56
|
+
scheduledDateLabel: e(r.scheduled_payment_date),
|
|
57
|
+
paidDateLabel: e(r.paid_at?.slice(0, 10)),
|
|
58
|
+
amountDueLabel: l(c),
|
|
59
|
+
amountPaidLabel: l(r.amount_paid),
|
|
60
|
+
amountScheduledLabel: l(r.amount_to_pay ?? c),
|
|
61
|
+
totalAmountLabel: l(r.total_amount),
|
|
62
|
+
attachment: r.file_id ? { label: k } : void 0,
|
|
63
|
+
status: i.status,
|
|
64
|
+
statusTone: i.tone,
|
|
65
|
+
addedOnLabel: e(r.created_at?.slice(0, 10)),
|
|
66
|
+
duplicateBadge: n(r) ? {
|
|
67
|
+
label: O,
|
|
68
|
+
tone: "warning"
|
|
69
|
+
} : void 0,
|
|
70
|
+
onOpen: () => D(r.id, s(r.status))
|
|
71
|
+
};
|
|
72
|
+
}), [
|
|
73
|
+
K.data?.data,
|
|
74
|
+
O,
|
|
75
|
+
k,
|
|
76
|
+
D
|
|
77
|
+
]), Z = _((e) => {
|
|
78
|
+
let t = e;
|
|
79
|
+
j(t), N((e) => {
|
|
80
|
+
let n = e[0]?.id;
|
|
81
|
+
return n ? u(t).some((e) => m(e) === n) ? e : S : e;
|
|
82
|
+
}), H();
|
|
83
|
+
}, [H]), Q = _((e) => {
|
|
84
|
+
N((t) => typeof e == "function" ? e(t) : e), H();
|
|
85
|
+
}, [H]), $ = _((e) => {
|
|
86
|
+
F(e), H();
|
|
87
|
+
}, [H]), ee = _(() => L(K.data?.next_pagination_token ?? void 0), [K.data?.next_pagination_token]), te = _(() => L(K.data?.prev_pagination_token ?? void 0), [K.data?.prev_pagination_token]), ne = _(() => {
|
|
88
|
+
K.refetch();
|
|
89
|
+
}, [K.refetch]);
|
|
90
|
+
return {
|
|
91
|
+
rows: X,
|
|
92
|
+
isLoading: K.isFetching || q && J.isLoading,
|
|
93
|
+
isError: K.isError,
|
|
94
|
+
onRetry: ne,
|
|
95
|
+
selectedFilterTabId: A,
|
|
96
|
+
onFilterTabChange: Z,
|
|
97
|
+
searchValue: R,
|
|
98
|
+
onSearchChange: z,
|
|
99
|
+
hasAnyBills: Y,
|
|
100
|
+
isSearchActive: B.length > 0 || U.isFilterActive,
|
|
101
|
+
filterBarProps: U.filterBarProps,
|
|
102
|
+
visibleColumns: u(A),
|
|
103
|
+
showAddPanelWhenEmpty: f(A),
|
|
104
|
+
sorting: M,
|
|
105
|
+
onSortingChange: Q,
|
|
106
|
+
pageSize: P,
|
|
107
|
+
onPageSizeChange: $,
|
|
108
|
+
hasNextPage: !!K.data?.next_pagination_token,
|
|
109
|
+
hasPrevPage: !!K.data?.prev_pagination_token,
|
|
110
|
+
onNextPage: ee,
|
|
111
|
+
onPrevPage: te
|
|
127
112
|
};
|
|
128
|
-
return ie(() => {
|
|
129
|
-
x && (k(x), j(!0), S?.());
|
|
130
|
-
}, [S, x]), /* @__PURE__ */ y("div", {
|
|
131
|
-
"data-testid": h.root,
|
|
132
|
-
children: [
|
|
133
|
-
/* @__PURE__ */ v(o, {
|
|
134
|
-
rows: J.rows,
|
|
135
|
-
isLoading: J.isLoading || !B,
|
|
136
|
-
isError: J.isError,
|
|
137
|
-
onRetry: J.onRetry,
|
|
138
|
-
sorting: J.sorting,
|
|
139
|
-
onSortingChange: J.onSortingChange,
|
|
140
|
-
pageSize: J.pageSize,
|
|
141
|
-
onPageSizeChange: J.onPageSizeChange,
|
|
142
|
-
hasNextPage: J.hasNextPage,
|
|
143
|
-
hasPrevPage: J.hasPrevPage,
|
|
144
|
-
onNextPage: J.onNextPage,
|
|
145
|
-
onPrevPage: J.onPrevPage,
|
|
146
|
-
filterTabs: se,
|
|
147
|
-
selectedFilterTabId: J.selectedFilterTabId,
|
|
148
|
-
onFilterTabChange: J.onFilterTabChange,
|
|
149
|
-
searchValue: J.searchValue,
|
|
150
|
-
onSearchChange: J.onSearchChange,
|
|
151
|
-
filters: de,
|
|
152
|
-
visibleColumns: J.visibleColumns,
|
|
153
|
-
cellTestIds: ne,
|
|
154
|
-
isSearchActive: J.isSearchActive,
|
|
155
|
-
showAddPanelWhenEmpty: J.showAddPanelWhenEmpty,
|
|
156
|
-
emptyState: w.queueEmptyStates[J.selectedFilterTabId],
|
|
157
|
-
onCreateClick: G ? () => O(!0) : void 0,
|
|
158
|
-
onEnterManually: G ? Z : void 0,
|
|
159
|
-
onFilesSelected: G ? Q : void 0,
|
|
160
|
-
maxFiles: 10,
|
|
161
|
-
emailAddress: T,
|
|
162
|
-
onCopyEmail: $,
|
|
163
|
-
duplicateWarning: oe,
|
|
164
|
-
onReviewDuplicates: Y.isError ? void 0 : () => z(!0),
|
|
165
|
-
labels: ue
|
|
166
|
-
}),
|
|
167
|
-
R ? /* @__PURE__ */ v(te, {
|
|
168
|
-
open: R,
|
|
169
|
-
onOpenChange: z,
|
|
170
|
-
enabled: W,
|
|
171
|
-
canManageDuplicates: G,
|
|
172
|
-
onOpenBill: ce
|
|
173
|
-
}) : null,
|
|
174
|
-
G ? /* @__PURE__ */ v(a, {
|
|
175
|
-
open: D,
|
|
176
|
-
onOpenChange: O,
|
|
177
|
-
onFilesSelected: Q,
|
|
178
|
-
maxFiles: 10,
|
|
179
|
-
onEnterManually: Z,
|
|
180
|
-
emailAddress: T,
|
|
181
|
-
onCopyEmail: $,
|
|
182
|
-
labels: { heading: J.hasAnyBills ? w.nonEmptyHeading : w.emptyHeading }
|
|
183
|
-
}) : null,
|
|
184
|
-
A ? /* @__PURE__ */ v(s, {
|
|
185
|
-
open: A,
|
|
186
|
-
onOpenChange: j,
|
|
187
|
-
payableId: ae
|
|
188
|
-
}) : null,
|
|
189
|
-
P ? /* @__PURE__ */ v(c, {
|
|
190
|
-
open: P,
|
|
191
|
-
onOpenChange: F,
|
|
192
|
-
payableId: M,
|
|
193
|
-
onClose: () => F(!1),
|
|
194
|
-
onExpand: le,
|
|
195
|
-
testId: h.detailsSheet,
|
|
196
|
-
poweredByBankName: C
|
|
197
|
-
}) : null,
|
|
198
|
-
I ? /* @__PURE__ */ v(s, {
|
|
199
|
-
open: I,
|
|
200
|
-
onOpenChange: L,
|
|
201
|
-
payableId: M,
|
|
202
|
-
readOnly: !0,
|
|
203
|
-
onCollapse: X,
|
|
204
|
-
poweredByBankName: C
|
|
205
|
-
}) : null
|
|
206
|
-
]
|
|
207
|
-
});
|
|
208
113
|
}
|
|
209
114
|
//#endregion
|
|
210
|
-
export {
|
|
115
|
+
export { C as useBillsTable };
|
|
@@ -1,4 +1,210 @@
|
|
|
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 ee, useWidgetInitStaleForToken as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
|
+
import "../../../shared/feature/dist/index.js";
|
|
12
|
+
import { useDuplicateBillsCount as i } from "./index7.js";
|
|
13
|
+
import { AddBillDialog as a } from "../../ui/dist/index10.js";
|
|
14
|
+
import { BillsScreen as o } from "../../ui/dist/index68.js";
|
|
15
|
+
import "../../ui/dist/index.js";
|
|
16
|
+
import { DuplicateBillsContainer as te } from "./index9.js";
|
|
17
|
+
import "./index11.js";
|
|
18
|
+
import { BillCreateDialog as s } from "./index54.js";
|
|
19
|
+
import "./index55.js";
|
|
20
|
+
import { BillDetailsContainer as c } from "./index58.js";
|
|
21
|
+
import "./index59.js";
|
|
22
|
+
import "./index65.js";
|
|
1
23
|
import "./index66.js";
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./index76.js";
|
|
24
|
+
import { BILL_QUEUE_ORDER as l, BillQueue as u } from "./index67.js";
|
|
25
|
+
import { BILLS_TAB_LABELS_EN as d } from "./index70.js";
|
|
26
|
+
import { useBillsTable as f } from "./index76.js";
|
|
27
|
+
import { copyTextToClipboard as p } from "./index68.js";
|
|
28
|
+
import { resolveDuplicateWarning as m } from "./index69.js";
|
|
29
|
+
import { billsTabTestIds as h, billsTableCellTestIds as ne } from "./index71.js";
|
|
30
|
+
import { useCallback as re, useEffect as ie, useMemo as g, useState as _ } from "react";
|
|
31
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
32
|
+
import { CalendarClockIcon as b, CheckIcon as x, FilePenIcon as S, ListIcon as C, LoaderCircleIcon as w } from "lucide-react";
|
|
33
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js
|
|
34
|
+
var T = "bills@business-banking.app", E = {
|
|
35
|
+
[u.Drafts]: /* @__PURE__ */ v(S, {
|
|
36
|
+
className: "ttw:size-4",
|
|
37
|
+
"aria-hidden": !0
|
|
38
|
+
}),
|
|
39
|
+
[u.Pending]: /* @__PURE__ */ v(w, {
|
|
40
|
+
className: "ttw:size-4",
|
|
41
|
+
"aria-hidden": !0
|
|
42
|
+
}),
|
|
43
|
+
[u.Scheduled]: /* @__PURE__ */ v(b, {
|
|
44
|
+
className: "ttw:size-4",
|
|
45
|
+
"aria-hidden": !0
|
|
46
|
+
}),
|
|
47
|
+
[u.Paid]: /* @__PURE__ */ v(x, {
|
|
48
|
+
className: "ttw:size-4",
|
|
49
|
+
"aria-hidden": !0
|
|
50
|
+
}),
|
|
51
|
+
[u.All]: /* @__PURE__ */ v(C, {
|
|
52
|
+
className: "ttw:size-4",
|
|
53
|
+
"aria-hidden": !0
|
|
54
|
+
})
|
|
55
|
+
};
|
|
56
|
+
function D({ labels: u, onEnqueueFiles: b, openPayableId: x, onOpenPayableHandled: S, poweredByBankName: C }) {
|
|
57
|
+
let w = g(() => ({
|
|
58
|
+
...d,
|
|
59
|
+
...u,
|
|
60
|
+
queues: {
|
|
61
|
+
...d.queues,
|
|
62
|
+
...u?.queues
|
|
63
|
+
},
|
|
64
|
+
filters: {
|
|
65
|
+
...d.filters,
|
|
66
|
+
...u?.filters,
|
|
67
|
+
presets: {
|
|
68
|
+
...d.filters.presets,
|
|
69
|
+
...u?.filters?.presets
|
|
70
|
+
},
|
|
71
|
+
statuses: {
|
|
72
|
+
...d.filters.statuses,
|
|
73
|
+
...u?.filters?.statuses
|
|
74
|
+
},
|
|
75
|
+
dateFieldNames: {
|
|
76
|
+
...d.filters.dateFieldNames,
|
|
77
|
+
...u?.filters?.dateFieldNames
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
filterBar: {
|
|
81
|
+
...d.filterBar,
|
|
82
|
+
...u?.filterBar
|
|
83
|
+
},
|
|
84
|
+
queueEmptyStates: l.reduce((e, t) => ({
|
|
85
|
+
...e,
|
|
86
|
+
[t]: {
|
|
87
|
+
...d.queueEmptyStates[t],
|
|
88
|
+
...u?.queueEmptyStates?.[t]
|
|
89
|
+
}
|
|
90
|
+
}), {})
|
|
91
|
+
}), [u]), [D, O] = _(!1), [ae, k] = _(), [A, j] = _(!1), [M, N] = _(), [P, F] = _(!1), [I, L] = _(!1), [R, z] = _(!1), { initResponse: B } = ee(), V = r(), H = t(B?.scopes, [n.PayableReadOrg]), U = t(B?.scopes, [n.PayableWriteOrg]), W = !B || H, G = !B || U, K = re((e, t) => {
|
|
92
|
+
if (t && G) {
|
|
93
|
+
k(e), j(!0);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
N(e), F(!0);
|
|
97
|
+
}, [G]), q = t(B?.scopes, [n.CounterpartReadOrg]), J = f({
|
|
98
|
+
enabled: W,
|
|
99
|
+
canReadVendors: q,
|
|
100
|
+
isVendorFilterPaused: V,
|
|
101
|
+
filterLabels: w.filters,
|
|
102
|
+
onOpenBill: K,
|
|
103
|
+
duplicateBadgeLabel: w.duplicateBadge,
|
|
104
|
+
attachmentLabel: w.attachmentIndicator
|
|
105
|
+
}), Y = i({ enabled: W }), oe = m(Y, w), se = g(() => l.map((e) => ({
|
|
106
|
+
id: e,
|
|
107
|
+
label: w.queues[e],
|
|
108
|
+
icon: E[e]
|
|
109
|
+
})), [w.queues]), ce = (e) => {
|
|
110
|
+
z(!1), N(e), F(!0);
|
|
111
|
+
}, le = () => {
|
|
112
|
+
F(!1), L(!0);
|
|
113
|
+
}, X = () => {
|
|
114
|
+
L(!1), F(!0);
|
|
115
|
+
}, ue = g(() => ({
|
|
116
|
+
createButton: w.createButton,
|
|
117
|
+
addBill: { heading: w.nonEmptyHeading }
|
|
118
|
+
}), [w.createButton, w.nonEmptyHeading]), de = g(() => ({
|
|
119
|
+
...J.filterBarProps,
|
|
120
|
+
labels: w.filterBar
|
|
121
|
+
}), [J.filterBarProps, w.filterBar]), Z = () => {
|
|
122
|
+
O(!1), k(void 0), j(!0);
|
|
123
|
+
}, Q = (e) => {
|
|
124
|
+
O(!1), b?.(e);
|
|
125
|
+
}, $ = async () => {
|
|
126
|
+
await p(T) ? e.success(w.emailCopiedToast) : e.error(w.emailCopyFailedToast);
|
|
127
|
+
};
|
|
128
|
+
return ie(() => {
|
|
129
|
+
x && (k(x), j(!0), S?.());
|
|
130
|
+
}, [S, x]), /* @__PURE__ */ y("div", {
|
|
131
|
+
"data-testid": h.root,
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ v(o, {
|
|
134
|
+
rows: J.rows,
|
|
135
|
+
isLoading: J.isLoading || !B,
|
|
136
|
+
isError: J.isError,
|
|
137
|
+
onRetry: J.onRetry,
|
|
138
|
+
sorting: J.sorting,
|
|
139
|
+
onSortingChange: J.onSortingChange,
|
|
140
|
+
pageSize: J.pageSize,
|
|
141
|
+
onPageSizeChange: J.onPageSizeChange,
|
|
142
|
+
hasNextPage: J.hasNextPage,
|
|
143
|
+
hasPrevPage: J.hasPrevPage,
|
|
144
|
+
onNextPage: J.onNextPage,
|
|
145
|
+
onPrevPage: J.onPrevPage,
|
|
146
|
+
filterTabs: se,
|
|
147
|
+
selectedFilterTabId: J.selectedFilterTabId,
|
|
148
|
+
onFilterTabChange: J.onFilterTabChange,
|
|
149
|
+
searchValue: J.searchValue,
|
|
150
|
+
onSearchChange: J.onSearchChange,
|
|
151
|
+
filters: de,
|
|
152
|
+
visibleColumns: J.visibleColumns,
|
|
153
|
+
cellTestIds: ne,
|
|
154
|
+
isSearchActive: J.isSearchActive,
|
|
155
|
+
showAddPanelWhenEmpty: J.showAddPanelWhenEmpty,
|
|
156
|
+
emptyState: w.queueEmptyStates[J.selectedFilterTabId],
|
|
157
|
+
onCreateClick: G ? () => O(!0) : void 0,
|
|
158
|
+
onEnterManually: G ? Z : void 0,
|
|
159
|
+
onFilesSelected: G ? Q : void 0,
|
|
160
|
+
maxFiles: 10,
|
|
161
|
+
emailAddress: T,
|
|
162
|
+
onCopyEmail: $,
|
|
163
|
+
duplicateWarning: oe,
|
|
164
|
+
onReviewDuplicates: Y.isError ? void 0 : () => z(!0),
|
|
165
|
+
labels: ue
|
|
166
|
+
}),
|
|
167
|
+
R ? /* @__PURE__ */ v(te, {
|
|
168
|
+
open: R,
|
|
169
|
+
onOpenChange: z,
|
|
170
|
+
enabled: W,
|
|
171
|
+
canManageDuplicates: G,
|
|
172
|
+
onOpenBill: ce
|
|
173
|
+
}) : null,
|
|
174
|
+
G ? /* @__PURE__ */ v(a, {
|
|
175
|
+
open: D,
|
|
176
|
+
onOpenChange: O,
|
|
177
|
+
onFilesSelected: Q,
|
|
178
|
+
maxFiles: 10,
|
|
179
|
+
onEnterManually: Z,
|
|
180
|
+
emailAddress: T,
|
|
181
|
+
onCopyEmail: $,
|
|
182
|
+
labels: { heading: J.hasAnyBills ? w.nonEmptyHeading : w.emptyHeading }
|
|
183
|
+
}) : null,
|
|
184
|
+
A ? /* @__PURE__ */ v(s, {
|
|
185
|
+
open: A,
|
|
186
|
+
onOpenChange: j,
|
|
187
|
+
payableId: ae
|
|
188
|
+
}) : null,
|
|
189
|
+
P ? /* @__PURE__ */ v(c, {
|
|
190
|
+
open: P,
|
|
191
|
+
onOpenChange: F,
|
|
192
|
+
payableId: M,
|
|
193
|
+
onClose: () => F(!1),
|
|
194
|
+
onExpand: le,
|
|
195
|
+
testId: h.detailsSheet,
|
|
196
|
+
poweredByBankName: C
|
|
197
|
+
}) : null,
|
|
198
|
+
I ? /* @__PURE__ */ v(s, {
|
|
199
|
+
open: I,
|
|
200
|
+
onOpenChange: L,
|
|
201
|
+
payableId: M,
|
|
202
|
+
readOnly: !0,
|
|
203
|
+
onCollapse: X,
|
|
204
|
+
poweredByBankName: C
|
|
205
|
+
}) : null
|
|
206
|
+
]
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
//#endregion
|
|
210
|
+
export { D as BillsTab, D as default };
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
settings: "Settings"
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
export { e as DEFAULT_TABS_LABELS };
|
|
1
|
+
import "./index67.js";
|
|
2
|
+
import "./index70.js";
|
|
3
|
+
import "./index76.js";
|
|
4
|
+
import "./index77.js";
|
|
@@ -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/index48.js";
|
|
15
|
-
import { BillUploadStatusTray as s } from "../../ui/dist/index71.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 "./index64.js";
|
|
20
|
-
import "./index65.js";
|
|
21
|
-
import { billsTabTestIds as u } from "./index70.js";
|
|
22
|
-
import { BillsTab as d } from "./index76.js";
|
|
23
|
-
import "./index77.js";
|
|
24
|
-
import { BillPayWidgetAnalyticsEvent as f, WIDGET_NAME as p } from "./index59.js";
|
|
25
|
-
import { DEFAULT_TABS_LABELS as m } from "./index78.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/index79.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
|
-
onViewAllDocuments: () => P(S.Bills)
|
|
66
|
-
})
|
|
67
|
-
}];
|
|
68
|
-
M && z.push({
|
|
69
|
-
id: S.Settings,
|
|
70
|
-
label: k.settings,
|
|
71
|
-
content: /* @__PURE__ */ b(c, {
|
|
72
|
-
labels: w,
|
|
73
|
-
componentLabels: T
|
|
74
|
-
})
|
|
75
|
-
});
|
|
76
|
-
let B = z.some((e) => e.id === N) ? N : C.find((e) => z.some((t) => t.id === e)) ?? z[0]?.id ?? "";
|
|
77
|
-
return /* @__PURE__ */ x(y, { children: [
|
|
78
|
-
/* @__PURE__ */ b(n, {}),
|
|
79
|
-
/* @__PURE__ */ b(o, {
|
|
80
|
-
labels: i,
|
|
81
|
-
tabs: z,
|
|
82
|
-
selectedTabId: B,
|
|
83
|
-
onTabChange: P
|
|
84
|
-
}),
|
|
85
|
-
R.isVisible ? /* @__PURE__ */ b(s, {
|
|
86
|
-
sections: R.sections,
|
|
87
|
-
summaryLabel: R.summaryLabel,
|
|
88
|
-
collapsed: R.collapsed,
|
|
89
|
-
onToggleCollapsed: R.onToggleCollapsed,
|
|
90
|
-
onClose: R.onClose,
|
|
91
|
-
testId: u.uploadTray
|
|
92
|
-
}) : null
|
|
93
|
-
] });
|
|
94
|
-
}
|
|
95
|
-
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, providerLabels: m, ...h }) {
|
|
96
|
-
return /* @__PURE__ */ b(i, {
|
|
97
|
-
widgetName: p,
|
|
98
|
-
baseUrl: e,
|
|
99
|
-
widgetToken: t,
|
|
100
|
-
organizationId: n,
|
|
101
|
-
configClient: r,
|
|
102
|
-
gatewayRouting: a,
|
|
103
|
-
linkComponent: o,
|
|
104
|
-
implementation: s,
|
|
105
|
-
uiFramework: c,
|
|
106
|
-
errorFallback: l,
|
|
107
|
-
onError: u,
|
|
108
|
-
analytics: d,
|
|
109
|
-
disclosuresAcceptance: f,
|
|
110
|
-
providerLabels: m,
|
|
111
|
-
children: /* @__PURE__ */ b(w, { ...h })
|
|
112
|
-
});
|
|
113
|
-
}
|
|
2
|
+
var e = {
|
|
3
|
+
bills: "Bills",
|
|
4
|
+
vendors: "Vendors",
|
|
5
|
+
settings: "Settings"
|
|
6
|
+
};
|
|
114
7
|
//#endregion
|
|
115
|
-
export {
|
|
8
|
+
export { e as DEFAULT_TABS_LABELS };
|