@tesouro/embedded-components-react 0.5.107 → 0.5.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/dist/index.d.ts +16 -2
- package/dist/lib/CounterpartsWidget.d.ts +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +327 -327
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +11 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +78 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +149 -135
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +31 -18
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +125 -121
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +195 -193
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -180,6 +180,14 @@ function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFil
|
|
|
180
180
|
}, [L]), G = l(() => {
|
|
181
181
|
A(S()), E?.();
|
|
182
182
|
}, [E]), K = l((e) => {
|
|
183
|
+
M((t) => ({
|
|
184
|
+
...t,
|
|
185
|
+
[e.id]: e.name
|
|
186
|
+
})), A({
|
|
187
|
+
...S(),
|
|
188
|
+
vendorIds: [e.id]
|
|
189
|
+
}), E?.();
|
|
190
|
+
}, [E]), q = l((e) => {
|
|
183
191
|
M((t) => {
|
|
184
192
|
let n = { ...t };
|
|
185
193
|
for (let t of z) e.includes(t.value) && (n[t.value] = t.label);
|
|
@@ -237,7 +245,7 @@ function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFil
|
|
|
237
245
|
onAmountMaxChange: (e) => L({ amountMax: e }),
|
|
238
246
|
vendorOptions: z,
|
|
239
247
|
selectedVendors: k.vendorIds,
|
|
240
|
-
onVendorChange:
|
|
248
|
+
onVendorChange: q,
|
|
241
249
|
vendorSearchValue: N,
|
|
242
250
|
onVendorSearchChange: P,
|
|
243
251
|
isVendorLoading: R.isLoading || T,
|
|
@@ -246,7 +254,8 @@ function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFil
|
|
|
246
254
|
onHasAttachmentChange: (e) => L({ hasFile: e })
|
|
247
255
|
},
|
|
248
256
|
query: H,
|
|
249
|
-
isFilterActive: U.length > 0
|
|
257
|
+
isFilterActive: U.length > 0,
|
|
258
|
+
filterByVendor: K
|
|
250
259
|
};
|
|
251
260
|
}
|
|
252
261
|
//#endregion
|
|
@@ -5,131 +5,134 @@
|
|
|
5
5
|
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
6
|
import { formatCalendarDate as t } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
7
7
|
import { formatMoneyExact as n } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
8
|
-
import { hasSuspectedPayableDuplicate as
|
|
9
|
-
import { usePayablesQuery as
|
|
8
|
+
import { hasSuspectedPayableDuplicate as r } from "../../data-access/dist/index7.js";
|
|
9
|
+
import { usePayablesQuery as i, usePayablesTotalCountQuery as a } from "../../data-access/dist/index17.js";
|
|
10
10
|
import "../../data-access/dist/index.js";
|
|
11
|
-
import { derivePayableStatus as
|
|
12
|
-
import { resolveVendorName as
|
|
13
|
-
import { isEditablePayableStatus as
|
|
14
|
-
import { BillQueue as
|
|
15
|
-
import { useBillsFilters as
|
|
16
|
-
import { useCallback as
|
|
11
|
+
import { derivePayableStatus as o } from "./index7.js";
|
|
12
|
+
import { resolveVendorName as ee } from "./index8.js";
|
|
13
|
+
import { isEditablePayableStatus as s } from "./index19.js";
|
|
14
|
+
import { BillQueue as c, DEFAULT_BILL_QUEUE as l, billQueueColumns as u, billQueueHasScheduledPayment as te, billQueueOffersAddPanel as d, billQueueStatuses as f, billSortColumnId as ne, billSortField as p } from "./index72.js";
|
|
15
|
+
import { useBillsFilters as m } from "./index80.js";
|
|
16
|
+
import { useCallback as h, useEffect as g, useMemo as _, useState as v } from "react";
|
|
17
17
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js
|
|
18
|
-
var
|
|
18
|
+
var y = 10, b = [{
|
|
19
19
|
id: "addedOnLabel",
|
|
20
20
|
desc: !0
|
|
21
21
|
}];
|
|
22
|
-
function
|
|
23
|
-
let [D,
|
|
24
|
-
|
|
22
|
+
function x({ enabled: x = !0, canReadVendors: S = !0, isVendorFilterPaused: C = !1, filterLabels: re, onOpenBill: w, duplicateRowNote: T, attachmentLabel: E }) {
|
|
23
|
+
let [D, ie] = v(l), [O, k] = v(b), [A, j] = v(y), [M, N] = v(), [P, F] = v(""), [I, L] = v(""), R = h(() => N(void 0), []);
|
|
24
|
+
g(() => {
|
|
25
25
|
let e = setTimeout(() => {
|
|
26
26
|
L(P), R();
|
|
27
27
|
}, 300);
|
|
28
28
|
return () => clearTimeout(e);
|
|
29
29
|
}, [P, R]);
|
|
30
|
-
let z =
|
|
31
|
-
offersStatusFilter: D ===
|
|
32
|
-
offersVendorFilter:
|
|
33
|
-
isVendorFilterPaused:
|
|
34
|
-
labels:
|
|
30
|
+
let z = m({
|
|
31
|
+
offersStatusFilter: D === c.All,
|
|
32
|
+
offersVendorFilter: S,
|
|
33
|
+
isVendorFilterPaused: C,
|
|
34
|
+
labels: re,
|
|
35
35
|
onFiltersChange: R
|
|
36
|
-
}), B =
|
|
36
|
+
}), { filterByVendor: B } = z, V = O[0], H = p(V?.id), U = H ? V?.desc ? "desc" : "asc" : void 0, W = _(() => ({
|
|
37
37
|
...z.query,
|
|
38
|
-
limit:
|
|
38
|
+
limit: A,
|
|
39
39
|
pagination_token: M,
|
|
40
|
-
status__in:
|
|
41
|
-
has_scheduled_payment:
|
|
40
|
+
status__in: f(D) ?? z.query.status__in,
|
|
41
|
+
has_scheduled_payment: te(D),
|
|
42
42
|
counterpart_name__icontains: I || void 0,
|
|
43
|
-
sort:
|
|
44
|
-
order:
|
|
43
|
+
sort: H,
|
|
44
|
+
order: U
|
|
45
45
|
}), [
|
|
46
46
|
z.query,
|
|
47
|
-
|
|
47
|
+
A,
|
|
48
48
|
M,
|
|
49
49
|
D,
|
|
50
50
|
I,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
]), { organizationId:
|
|
54
|
-
...
|
|
55
|
-
enabled:
|
|
51
|
+
H,
|
|
52
|
+
U
|
|
53
|
+
]), { organizationId: G } = e(), K = JSON.stringify([G, W]), q = i({
|
|
54
|
+
...W,
|
|
55
|
+
enabled: x,
|
|
56
56
|
pollWhileOcrProcessing: !0
|
|
57
|
-
}), [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, [
|
|
61
|
-
let Y =
|
|
62
|
-
let
|
|
57
|
+
}), [J, ae] = v(K);
|
|
58
|
+
g(() => {
|
|
59
|
+
q.isFetching || ae(K);
|
|
60
|
+
}, [q.isFetching, K]);
|
|
61
|
+
let Y = q.data?.data.length, X = Y === 0, Z = a({ enabled: x && X }), oe = !X || (Z.data?.count ?? 1) > 0, Q = _(() => (q.data?.data ?? []).filter((e) => e.ocr_status !== "processing").map((e) => {
|
|
62
|
+
let i = o({
|
|
63
63
|
apiStatus: e.status,
|
|
64
64
|
dueDate: e.due_date,
|
|
65
65
|
scheduledPaymentDate: e.scheduled_payment_date
|
|
66
|
-
}),
|
|
66
|
+
}), a = e.amount_due ?? e.total_amount, l = e.status === "partially_paid" || e.status === "paid", u = (t) => t == null ? "" : n(t / 100, { currencyCode: e.currency ?? "USD" });
|
|
67
67
|
return {
|
|
68
68
|
rowKey: e.id,
|
|
69
|
-
vendorLabel:
|
|
69
|
+
vendorLabel: ee(e),
|
|
70
70
|
issueDateLabel: t(e.issued_at),
|
|
71
71
|
dueDateLabel: t(e.due_date),
|
|
72
|
-
dueDateTone:
|
|
72
|
+
dueDateTone: i.isOverdue ? "danger" : "default",
|
|
73
73
|
scheduledDateLabel: t(e.scheduled_payment_date),
|
|
74
|
-
scheduledDateIsGap: D ===
|
|
74
|
+
scheduledDateIsGap: D === c.Scheduled,
|
|
75
75
|
paidDateLabel: t(e.paid_at?.slice(0, 10)),
|
|
76
|
-
amountDueLabel:
|
|
77
|
-
amountPaidLabel:
|
|
78
|
-
amountPaidIsGap: D ===
|
|
79
|
-
amountScheduledLabel:
|
|
80
|
-
totalAmountLabel:
|
|
76
|
+
amountDueLabel: u(a),
|
|
77
|
+
amountPaidLabel: l ? u(e.amount_paid) : "",
|
|
78
|
+
amountPaidIsGap: D === c.Paid,
|
|
79
|
+
amountScheduledLabel: u(e.amount_to_pay ?? a),
|
|
80
|
+
totalAmountLabel: u(e.total_amount),
|
|
81
81
|
attachment: e.file_id ? { label: E } : void 0,
|
|
82
|
-
status:
|
|
83
|
-
statusTone:
|
|
82
|
+
status: i.status,
|
|
83
|
+
statusTone: i.tone,
|
|
84
84
|
addedOnLabel: t(e.created_at?.slice(0, 10)),
|
|
85
|
-
...
|
|
85
|
+
...r(e) ? {
|
|
86
86
|
rowTone: "warning",
|
|
87
87
|
rowNote: T
|
|
88
88
|
} : {},
|
|
89
|
-
onOpen: () => w(e.id,
|
|
89
|
+
onOpen: () => w(e.id, s(e.status))
|
|
90
90
|
};
|
|
91
91
|
}), [
|
|
92
|
-
|
|
92
|
+
q.data?.data,
|
|
93
93
|
T,
|
|
94
94
|
E,
|
|
95
95
|
w,
|
|
96
96
|
D
|
|
97
|
-
]),
|
|
97
|
+
]), $ = h((e) => {
|
|
98
98
|
let t = e;
|
|
99
|
-
|
|
99
|
+
ie(t), k((e) => {
|
|
100
100
|
let n = e[0]?.id;
|
|
101
|
-
return n ?
|
|
101
|
+
return n ? u(t).some((e) => ne(e) === n) ? e : b : e;
|
|
102
102
|
}), R();
|
|
103
|
-
}, [R]), se =
|
|
104
|
-
|
|
105
|
-
}, [
|
|
106
|
-
|
|
107
|
-
}, [R]), le =
|
|
108
|
-
|
|
109
|
-
}, [
|
|
103
|
+
}, [R]), se = h((e) => {
|
|
104
|
+
$(c.All), F(""), B(e);
|
|
105
|
+
}, [B, $]), ce = h((e) => {
|
|
106
|
+
k((t) => typeof e == "function" ? e(t) : e), R();
|
|
107
|
+
}, [R]), le = h((e) => {
|
|
108
|
+
j(e), R();
|
|
109
|
+
}, [R]), ue = h(() => N(q.data?.next_pagination_token ?? void 0), [q.data?.next_pagination_token]), de = h(() => N(q.data?.prev_pagination_token ?? void 0), [q.data?.prev_pagination_token]), fe = h(() => {
|
|
110
|
+
q.refetch();
|
|
111
|
+
}, [q.refetch]);
|
|
110
112
|
return {
|
|
111
113
|
rows: Q,
|
|
112
|
-
isLoading:
|
|
113
|
-
isError:
|
|
114
|
-
onRetry:
|
|
114
|
+
isLoading: q.isLoading || K !== J || X && Z.isLoading || (Y ?? 0) > 0 && Q.length === 0,
|
|
115
|
+
isError: q.isError,
|
|
116
|
+
onRetry: fe,
|
|
115
117
|
selectedFilterTabId: D,
|
|
116
|
-
onFilterTabChange:
|
|
118
|
+
onFilterTabChange: $,
|
|
119
|
+
showVendorBills: se,
|
|
117
120
|
searchValue: P,
|
|
118
121
|
onSearchChange: F,
|
|
119
|
-
hasAnyBills:
|
|
122
|
+
hasAnyBills: oe,
|
|
120
123
|
isSearchActive: I.length > 0 || z.isFilterActive,
|
|
121
124
|
filterBarProps: z.filterBarProps,
|
|
122
|
-
visibleColumns:
|
|
123
|
-
showAddPanelWhenEmpty:
|
|
124
|
-
sorting:
|
|
125
|
-
onSortingChange:
|
|
126
|
-
pageSize:
|
|
127
|
-
onPageSizeChange:
|
|
128
|
-
hasNextPage: !!
|
|
129
|
-
hasPrevPage: !!
|
|
130
|
-
onNextPage:
|
|
131
|
-
onPrevPage:
|
|
125
|
+
visibleColumns: u(D),
|
|
126
|
+
showAddPanelWhenEmpty: d(D),
|
|
127
|
+
sorting: O,
|
|
128
|
+
onSortingChange: ce,
|
|
129
|
+
pageSize: A,
|
|
130
|
+
onPageSizeChange: le,
|
|
131
|
+
hasNextPage: !!q.data?.next_pagination_token,
|
|
132
|
+
hasPrevPage: !!q.data?.prev_pagination_token,
|
|
133
|
+
onNextPage: ue,
|
|
134
|
+
onPrevPage: de
|
|
132
135
|
};
|
|
133
136
|
}
|
|
134
137
|
//#endregion
|
|
135
|
-
export {
|
|
138
|
+
export { x as useBillsTable };
|
|
@@ -7,114 +7,114 @@ import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnySco
|
|
|
7
7
|
import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
8
8
|
import "../../../shared/data-access/dist/index.js";
|
|
9
9
|
import "../../../shared/ui/dist/index.js";
|
|
10
|
-
import { useWidgetConfig as
|
|
10
|
+
import { useWidgetConfig as r, useWidgetInitStaleForToken as ee } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
11
|
import "../../../shared/feature/dist/index.js";
|
|
12
|
-
import { useDuplicateBillsCount as
|
|
13
|
-
import { AddBillDialog as
|
|
14
|
-
import { BillsScreen as
|
|
12
|
+
import { useDuplicateBillsCount as te } from "./index10.js";
|
|
13
|
+
import { AddBillDialog as ne } from "../../ui/dist/index10.js";
|
|
14
|
+
import { BillsScreen as i } from "../../ui/dist/index82.js";
|
|
15
15
|
import "../../ui/dist/index.js";
|
|
16
|
-
import { DuplicateBillsContainer as
|
|
16
|
+
import { DuplicateBillsContainer as a } from "./index12.js";
|
|
17
17
|
import "./index14.js";
|
|
18
|
-
import { BillCreateDialog as
|
|
18
|
+
import { BillCreateDialog as o } from "./index60.js";
|
|
19
19
|
import "./index61.js";
|
|
20
|
-
import { BillDetailsContainer as
|
|
20
|
+
import { BillDetailsContainer as re } from "./index63.js";
|
|
21
21
|
import "./index64.js";
|
|
22
22
|
import "./index70.js";
|
|
23
23
|
import "./index71.js";
|
|
24
|
-
import { BILL_QUEUE_ORDER as
|
|
25
|
-
import { BILLS_TAB_LABELS_EN as
|
|
26
|
-
import { useBillsTable as
|
|
27
|
-
import { copyTextToClipboard as
|
|
28
|
-
import { resolveDuplicateWarning as
|
|
29
|
-
import { billsTabTestIds as
|
|
30
|
-
import { useCallback as
|
|
31
|
-
import { jsx as
|
|
32
|
-
import { CalendarClockIcon as
|
|
24
|
+
import { BILL_QUEUE_ORDER as s, BillQueue as c } from "./index72.js";
|
|
25
|
+
import { BILLS_TAB_LABELS_EN as l } from "./index75.js";
|
|
26
|
+
import { useBillsTable as ie } from "./index81.js";
|
|
27
|
+
import { copyTextToClipboard as ae } from "./index73.js";
|
|
28
|
+
import { resolveDuplicateWarning as u } from "./index74.js";
|
|
29
|
+
import { billsTabTestIds as d, billsTableCellTestIds as f } from "./index76.js";
|
|
30
|
+
import { useCallback as p, useEffect as m, useMemo as h, useState as g } from "react";
|
|
31
|
+
import { jsx as _, jsxs as oe } from "react/jsx-runtime";
|
|
32
|
+
import { CalendarClockIcon as v, CheckIcon as y, FilePenIcon as b, ListIcon as x, LoaderCircleIcon as S } from "lucide-react";
|
|
33
33
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js
|
|
34
|
-
var
|
|
35
|
-
[
|
|
34
|
+
var C = "bills@business-banking.app", w = {
|
|
35
|
+
[c.Drafts]: /* @__PURE__ */ _(b, {
|
|
36
36
|
className: "ttw:size-4",
|
|
37
37
|
"aria-hidden": !0
|
|
38
38
|
}),
|
|
39
|
-
[
|
|
39
|
+
[c.Pending]: /* @__PURE__ */ _(S, {
|
|
40
40
|
className: "ttw:size-4",
|
|
41
41
|
"aria-hidden": !0
|
|
42
42
|
}),
|
|
43
|
-
[
|
|
43
|
+
[c.Scheduled]: /* @__PURE__ */ _(v, {
|
|
44
44
|
className: "ttw:size-4",
|
|
45
45
|
"aria-hidden": !0
|
|
46
46
|
}),
|
|
47
|
-
[
|
|
47
|
+
[c.Paid]: /* @__PURE__ */ _(y, {
|
|
48
48
|
className: "ttw:size-4",
|
|
49
49
|
"aria-hidden": !0
|
|
50
50
|
}),
|
|
51
|
-
[
|
|
51
|
+
[c.All]: /* @__PURE__ */ _(x, {
|
|
52
52
|
className: "ttw:size-4",
|
|
53
53
|
"aria-hidden": !0
|
|
54
54
|
})
|
|
55
55
|
};
|
|
56
|
-
function
|
|
57
|
-
let D =
|
|
58
|
-
...
|
|
59
|
-
...
|
|
56
|
+
function T({ labels: c, onEnqueueFiles: v, openPayableId: y, onOpenPayableHandled: b, vendorIntent: x, onVendorIntentHandled: S, poweredByBankName: T, onSettingsClick: E }) {
|
|
57
|
+
let D = h(() => ({
|
|
58
|
+
...l,
|
|
59
|
+
...c,
|
|
60
60
|
queues: {
|
|
61
|
-
...
|
|
62
|
-
...
|
|
61
|
+
...l.queues,
|
|
62
|
+
...c?.queues
|
|
63
63
|
},
|
|
64
64
|
filters: {
|
|
65
|
-
...
|
|
66
|
-
...
|
|
65
|
+
...l.filters,
|
|
66
|
+
...c?.filters,
|
|
67
67
|
presets: {
|
|
68
|
-
...
|
|
69
|
-
...
|
|
68
|
+
...l.filters.presets,
|
|
69
|
+
...c?.filters?.presets
|
|
70
70
|
},
|
|
71
71
|
statuses: {
|
|
72
|
-
...
|
|
73
|
-
...
|
|
72
|
+
...l.filters.statuses,
|
|
73
|
+
...c?.filters?.statuses
|
|
74
74
|
},
|
|
75
75
|
dateFieldNames: {
|
|
76
|
-
...
|
|
77
|
-
...
|
|
76
|
+
...l.filters.dateFieldNames,
|
|
77
|
+
...c?.filters?.dateFieldNames
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
filterBar: {
|
|
81
|
-
...
|
|
82
|
-
...
|
|
81
|
+
...l.filterBar,
|
|
82
|
+
...c?.filterBar
|
|
83
83
|
},
|
|
84
|
-
queueEmptyStates:
|
|
84
|
+
queueEmptyStates: s.reduce((e, t) => ({
|
|
85
85
|
...e,
|
|
86
86
|
[t]: {
|
|
87
|
-
...
|
|
88
|
-
...
|
|
87
|
+
...l.queueEmptyStates[t],
|
|
88
|
+
...c?.queueEmptyStates?.[t]
|
|
89
89
|
}
|
|
90
90
|
}), {})
|
|
91
|
-
}), [
|
|
91
|
+
}), [c]), [se, O] = g(!1), [ce, k] = g(), [le, 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 = ee(), U = t(V?.scopes, [n.PayableReadOrg]), ue = t(V?.scopes, [n.PayableWriteOrg]), W = !V || U, G = !V || ue, de = p((e, t) => {
|
|
92
92
|
if (t && G) {
|
|
93
|
-
k(e),
|
|
93
|
+
k(e), A(void 0), M(!0);
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
}, [G]),
|
|
96
|
+
P(e), R(!0);
|
|
97
|
+
}, [G]), fe = t(V?.scopes, [n.CounterpartReadOrg]), K = ie({
|
|
98
98
|
enabled: W,
|
|
99
|
-
canReadVendors:
|
|
100
|
-
isVendorFilterPaused:
|
|
99
|
+
canReadVendors: fe,
|
|
100
|
+
isVendorFilterPaused: H,
|
|
101
101
|
filterLabels: D.filters,
|
|
102
|
-
onOpenBill:
|
|
102
|
+
onOpenBill: de,
|
|
103
103
|
duplicateRowNote: D.duplicateRowNote,
|
|
104
104
|
attachmentLabel: D.attachmentIndicator
|
|
105
|
-
}),
|
|
105
|
+
}), q = te({ enabled: W }), pe = u(q, D), me = h(() => s.map((e) => ({
|
|
106
106
|
id: e,
|
|
107
107
|
label: D.queues[e],
|
|
108
|
-
icon:
|
|
109
|
-
})), [D.queues]),
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
},
|
|
108
|
+
icon: w[e]
|
|
109
|
+
})), [D.queues]), he = (e) => {
|
|
110
|
+
B(!1), P(e), R(!0);
|
|
111
|
+
}, ge = () => {
|
|
112
|
+
I(!1), R(!0);
|
|
113
|
+
}, _e = () => {
|
|
114
|
+
R(!1), I(!0);
|
|
115
|
+
}, J = () => {
|
|
116
|
+
I(!1), R(!1), k(N), A(void 0), M(!0);
|
|
117
|
+
}, Y = h(() => ({
|
|
118
118
|
createButton: D.createButton,
|
|
119
119
|
settingsButton: D.settingsButton,
|
|
120
120
|
addBill: { heading: D.nonEmptyHeading }
|
|
@@ -122,99 +122,113 @@ function D({ labels: u, onEnqueueFiles: b, openPayableId: x, onOpenPayableHandle
|
|
|
122
122
|
D.createButton,
|
|
123
123
|
D.settingsButton,
|
|
124
124
|
D.nonEmptyHeading
|
|
125
|
-
]),
|
|
126
|
-
...
|
|
125
|
+
]), ve = h(() => ({
|
|
126
|
+
...K.filterBarProps,
|
|
127
127
|
labels: D.filterBar
|
|
128
|
-
}), [
|
|
129
|
-
O(!1), k(void 0),
|
|
130
|
-
},
|
|
131
|
-
O(!1),
|
|
132
|
-
},
|
|
133
|
-
await
|
|
128
|
+
}), [K.filterBarProps, D.filterBar]), X = p((e) => {
|
|
129
|
+
O(!1), k(void 0), A(e), M(!0);
|
|
130
|
+
}, []), Z = (e) => {
|
|
131
|
+
O(!1), v?.(e);
|
|
132
|
+
}, Q = async () => {
|
|
133
|
+
await ae(C) ? e.success(D.emailCopiedToast) : e.error(D.emailCopyFailedToast);
|
|
134
134
|
};
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}, [
|
|
138
|
-
|
|
135
|
+
m(() => {
|
|
136
|
+
y && (k(y), A(void 0), M(!0), b?.());
|
|
137
|
+
}, [b, y]);
|
|
138
|
+
let { showVendorBills: $ } = K;
|
|
139
|
+
return m(() => {
|
|
140
|
+
x && (x.action === "createBill" ? G && X(x.vendorId) : $({
|
|
141
|
+
id: x.vendorId,
|
|
142
|
+
name: x.vendorName
|
|
143
|
+
}), S?.());
|
|
144
|
+
}, [
|
|
145
|
+
G,
|
|
146
|
+
S,
|
|
147
|
+
X,
|
|
148
|
+
$,
|
|
149
|
+
x
|
|
150
|
+
]), /* @__PURE__ */ oe("div", {
|
|
151
|
+
"data-testid": d.root,
|
|
139
152
|
children: [
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
rows:
|
|
142
|
-
isLoading:
|
|
143
|
-
isError:
|
|
144
|
-
onRetry:
|
|
145
|
-
sorting:
|
|
146
|
-
onSortingChange:
|
|
147
|
-
pageSize:
|
|
148
|
-
onPageSizeChange:
|
|
149
|
-
hasNextPage:
|
|
150
|
-
hasPrevPage:
|
|
151
|
-
onNextPage:
|
|
152
|
-
onPrevPage:
|
|
153
|
-
filterTabs:
|
|
154
|
-
selectedFilterTabId:
|
|
155
|
-
onFilterTabChange:
|
|
156
|
-
searchValue:
|
|
157
|
-
onSearchChange:
|
|
158
|
-
filters:
|
|
159
|
-
visibleColumns:
|
|
160
|
-
cellTestIds:
|
|
161
|
-
isSearchActive:
|
|
162
|
-
showAddPanelWhenEmpty:
|
|
163
|
-
emptyState: D.queueEmptyStates[
|
|
153
|
+
/* @__PURE__ */ _(i, {
|
|
154
|
+
rows: K.rows,
|
|
155
|
+
isLoading: K.isLoading || !V,
|
|
156
|
+
isError: K.isError,
|
|
157
|
+
onRetry: K.onRetry,
|
|
158
|
+
sorting: K.sorting,
|
|
159
|
+
onSortingChange: K.onSortingChange,
|
|
160
|
+
pageSize: K.pageSize,
|
|
161
|
+
onPageSizeChange: K.onPageSizeChange,
|
|
162
|
+
hasNextPage: K.hasNextPage,
|
|
163
|
+
hasPrevPage: K.hasPrevPage,
|
|
164
|
+
onNextPage: K.onNextPage,
|
|
165
|
+
onPrevPage: K.onPrevPage,
|
|
166
|
+
filterTabs: me,
|
|
167
|
+
selectedFilterTabId: K.selectedFilterTabId,
|
|
168
|
+
onFilterTabChange: K.onFilterTabChange,
|
|
169
|
+
searchValue: K.searchValue,
|
|
170
|
+
onSearchChange: K.onSearchChange,
|
|
171
|
+
filters: ve,
|
|
172
|
+
visibleColumns: K.visibleColumns,
|
|
173
|
+
cellTestIds: f,
|
|
174
|
+
isSearchActive: K.isSearchActive,
|
|
175
|
+
showAddPanelWhenEmpty: K.showAddPanelWhenEmpty,
|
|
176
|
+
emptyState: D.queueEmptyStates[K.selectedFilterTabId],
|
|
164
177
|
onCreateClick: G ? () => O(!0) : void 0,
|
|
165
|
-
onSettingsClick:
|
|
166
|
-
onEnterManually: G ?
|
|
167
|
-
onFilesSelected: G ?
|
|
178
|
+
onSettingsClick: E,
|
|
179
|
+
onEnterManually: G ? () => X() : void 0,
|
|
180
|
+
onFilesSelected: G ? Z : void 0,
|
|
168
181
|
maxFiles: 10,
|
|
169
|
-
emailAddress:
|
|
170
|
-
onCopyEmail:
|
|
171
|
-
duplicateWarning:
|
|
172
|
-
onReviewDuplicates:
|
|
173
|
-
labels:
|
|
182
|
+
emailAddress: C,
|
|
183
|
+
onCopyEmail: Q,
|
|
184
|
+
duplicateWarning: pe,
|
|
185
|
+
onReviewDuplicates: q.isError ? void 0 : () => B(!0),
|
|
186
|
+
labels: Y
|
|
174
187
|
}),
|
|
175
|
-
|
|
176
|
-
open:
|
|
177
|
-
onOpenChange:
|
|
188
|
+
z ? /* @__PURE__ */ _(a, {
|
|
189
|
+
open: z,
|
|
190
|
+
onOpenChange: B,
|
|
178
191
|
enabled: W,
|
|
179
192
|
canManageDuplicates: G,
|
|
180
|
-
onOpenBill:
|
|
193
|
+
onOpenBill: he
|
|
181
194
|
}) : null,
|
|
182
|
-
G ? /* @__PURE__ */
|
|
183
|
-
open:
|
|
195
|
+
G ? /* @__PURE__ */ _(ne, {
|
|
196
|
+
open: se,
|
|
184
197
|
onOpenChange: O,
|
|
185
|
-
onFilesSelected:
|
|
198
|
+
onFilesSelected: Z,
|
|
186
199
|
maxFiles: 10,
|
|
187
|
-
onEnterManually:
|
|
188
|
-
emailAddress:
|
|
189
|
-
onCopyEmail:
|
|
190
|
-
labels: { heading:
|
|
200
|
+
onEnterManually: () => X(),
|
|
201
|
+
emailAddress: C,
|
|
202
|
+
onCopyEmail: Q,
|
|
203
|
+
labels: { heading: K.hasAnyBills ? D.nonEmptyHeading : D.emptyHeading }
|
|
191
204
|
}) : null,
|
|
192
|
-
|
|
193
|
-
open:
|
|
194
|
-
onOpenChange:
|
|
195
|
-
payableId:
|
|
205
|
+
j ? /* @__PURE__ */ _(o, {
|
|
206
|
+
open: j,
|
|
207
|
+
onOpenChange: M,
|
|
208
|
+
payableId: ce,
|
|
209
|
+
initialCounterpartId: le
|
|
196
210
|
}) : null,
|
|
197
|
-
|
|
198
|
-
open:
|
|
199
|
-
onOpenChange:
|
|
200
|
-
payableId:
|
|
201
|
-
onClose: () =>
|
|
202
|
-
onExpand:
|
|
203
|
-
onEdit:
|
|
204
|
-
testId:
|
|
205
|
-
poweredByBankName:
|
|
211
|
+
F ? /* @__PURE__ */ _(re, {
|
|
212
|
+
open: F,
|
|
213
|
+
onOpenChange: I,
|
|
214
|
+
payableId: N,
|
|
215
|
+
onClose: () => I(!1),
|
|
216
|
+
onExpand: ge,
|
|
217
|
+
onEdit: J,
|
|
218
|
+
testId: d.detailsSheet,
|
|
219
|
+
poweredByBankName: T
|
|
206
220
|
}) : null,
|
|
207
|
-
|
|
208
|
-
open:
|
|
209
|
-
onOpenChange:
|
|
210
|
-
payableId:
|
|
221
|
+
L ? /* @__PURE__ */ _(o, {
|
|
222
|
+
open: L,
|
|
223
|
+
onOpenChange: R,
|
|
224
|
+
payableId: N,
|
|
211
225
|
readOnly: !0,
|
|
212
|
-
onCollapse:
|
|
213
|
-
onEdit:
|
|
214
|
-
poweredByBankName:
|
|
226
|
+
onCollapse: _e,
|
|
227
|
+
onEdit: J,
|
|
228
|
+
poweredByBankName: T
|
|
215
229
|
}) : null
|
|
216
230
|
]
|
|
217
231
|
});
|
|
218
232
|
}
|
|
219
233
|
//#endregion
|
|
220
|
-
export {
|
|
234
|
+
export { T as BillsTab, T as default };
|