@tesouro/embedded-components-react 0.11.2 → 0.11.5
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/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index10.js +17 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index11.js +14 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index13.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +186 -180
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +144 -140
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index4.js +26 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index5.js +130 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index6.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index7.js +7 -81
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index8.js +80 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index9.js +18 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/mocks/billPay.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/mocks/labels.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -23,25 +23,25 @@ import { useApplyDuplicateVerdictsMutation as p } from "../../../data-access/dis
|
|
|
23
23
|
import "../../../data-access/dist/index.js";
|
|
24
24
|
import { BillColumn as m } from "../../ui/dist/index19.js";
|
|
25
25
|
import "../../ui/dist/index.js";
|
|
26
|
-
import { BillQueue as h, DEFAULT_BILL_QUEUE as g, billQueueColumns as _,
|
|
27
|
-
import { duplicateRemovalPrompt as
|
|
28
|
-
import { useBillsFilters as
|
|
29
|
-
import { BillVendorLookup as
|
|
30
|
-
import { useFirstPayablesPagesQuery as
|
|
31
|
-
import { usePayablesQuery as
|
|
32
|
-
import { usePayablesTotalCountQuery as
|
|
26
|
+
import { BillQueue as h, DEFAULT_BILL_QUEUE as g, billQueueColumns as _, billQueueFilters as re, billQueueOffersAddPanel as ie, billSortColumnId as ae, billSortField as oe } from "./index5.js";
|
|
27
|
+
import { duplicateRemovalPrompt as se } from "./index11.js";
|
|
28
|
+
import { useBillsFilters as ce } from "./index14.js";
|
|
29
|
+
import { BillVendorLookup as v, useBillVendorNames as le } from "./index15.js";
|
|
30
|
+
import { useFirstPayablesPagesQuery as ue } from "../../data-access/dist/index2.js";
|
|
31
|
+
import { usePayablesQuery as de } from "../../data-access/dist/index4.js";
|
|
32
|
+
import { usePayablesTotalCountQuery as fe } from "../../data-access/dist/index5.js";
|
|
33
33
|
import "../../data-access/dist/index.js";
|
|
34
|
-
import { useCallback as
|
|
35
|
-
import { BanIcon as
|
|
34
|
+
import { useCallback as y, useEffect as pe, useMemo as b, useState as x } from "react";
|
|
35
|
+
import { BanIcon as me, FileCheckIcon as he, Trash2Icon as ge } from "lucide-react";
|
|
36
36
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js
|
|
37
|
-
var
|
|
37
|
+
var _e = 10, S = 100, ve = 3, ye = [{
|
|
38
38
|
id: "addedOnLabel",
|
|
39
39
|
desc: !0
|
|
40
40
|
}], C = {
|
|
41
41
|
AllBills: "allBills",
|
|
42
42
|
PossibleDuplicates: "possibleDuplicates"
|
|
43
43
|
};
|
|
44
|
-
function
|
|
44
|
+
function be(e, t) {
|
|
45
45
|
let n = new Map(e.map((e) => [e.id, e])), r = /* @__PURE__ */ new Map(), i = (e) => {
|
|
46
46
|
r.has(e) || r.set(e, /* @__PURE__ */ new Set());
|
|
47
47
|
}, a = (e, t) => {
|
|
@@ -76,65 +76,71 @@ function xe(e, t) {
|
|
|
76
76
|
}
|
|
77
77
|
return o;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
let
|
|
81
|
-
|
|
79
|
+
function xe({ enabled: c = !0, canPay: l, canReadVendors: d = !0, isVendorFilterPaused: v = !1, filterLabels: xe, onOpenBill: we, duplicateRowNote: Te, attachmentLabel: Ee, duplicateGroupLabels: w, canManageDuplicates: De = !1, duplicateView: T = C.AllBills, scheduledRelativeDayLabels: Oe }) {
|
|
80
|
+
let ke = i(), [E, Ae] = x(g), [je, Me] = x(ye), [D, Ne] = x(_e), [Pe, O] = x(), [Fe, Ie] = x(l);
|
|
81
|
+
l !== void 0 && Fe !== l && (Ie(l), O(void 0));
|
|
82
|
+
let k = l ?? Fe, [Le, A] = x(0), [j, M] = x(""), [N, Re] = x(""), [P, F] = x(), [I, L] = x(), R = y(() => {
|
|
83
|
+
O(void 0), A(0);
|
|
82
84
|
}, []);
|
|
83
|
-
|
|
85
|
+
pe(() => {
|
|
84
86
|
if (j === N) return;
|
|
85
87
|
let e = setTimeout(() => {
|
|
86
|
-
|
|
88
|
+
Re(j), R();
|
|
87
89
|
}, 300);
|
|
88
90
|
return () => clearTimeout(e);
|
|
89
91
|
}, [
|
|
90
92
|
j,
|
|
91
93
|
N,
|
|
92
94
|
R
|
|
93
|
-
]),
|
|
95
|
+
]), pe(() => {
|
|
94
96
|
R();
|
|
95
|
-
}, [
|
|
96
|
-
let z =
|
|
97
|
-
offersStatusFilter:
|
|
98
|
-
offersVendorFilter:
|
|
99
|
-
isVendorFilterPaused:
|
|
100
|
-
labels:
|
|
97
|
+
}, [T, R]);
|
|
98
|
+
let z = T === C.PossibleDuplicates, B = ce({
|
|
99
|
+
offersStatusFilter: E === h.All && !z,
|
|
100
|
+
offersVendorFilter: d,
|
|
101
|
+
isVendorFilterPaused: v,
|
|
102
|
+
labels: xe,
|
|
101
103
|
onFiltersChange: R
|
|
102
|
-
}), { clearAll:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
104
|
+
}), { clearAll: ze, filterByVendor: Be } = B, Ve = je[0], He = oe(Ve?.id), Ue = He ? Ve?.desc ? "desc" : "asc" : void 0, V = z ? h.All : E, We = b(() => {
|
|
105
|
+
let e = re(V, k ?? !1);
|
|
106
|
+
return {
|
|
107
|
+
...B.query,
|
|
108
|
+
...e,
|
|
109
|
+
limit: z ? S : D,
|
|
110
|
+
pagination_token: z ? void 0 : Pe,
|
|
111
|
+
status__in: z ? void 0 : e.status__in ?? B.query.status__in,
|
|
112
|
+
duplicate_match_status: z ? "suspected" : void 0,
|
|
113
|
+
counterpart_name__icontains: N || void 0,
|
|
114
|
+
sort: He,
|
|
115
|
+
order: Ue
|
|
116
|
+
};
|
|
117
|
+
}, [
|
|
113
118
|
B.query,
|
|
114
|
-
|
|
115
|
-
|
|
119
|
+
D,
|
|
120
|
+
Pe,
|
|
116
121
|
z,
|
|
117
|
-
H,
|
|
118
|
-
N,
|
|
119
122
|
V,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
k,
|
|
124
|
+
N,
|
|
125
|
+
He,
|
|
126
|
+
Ue
|
|
127
|
+
]), { organizationId: Ge } = r(), H = JSON.stringify([Ge, We]), U = de({
|
|
128
|
+
...We,
|
|
129
|
+
enabled: c && l !== void 0 && !z,
|
|
124
130
|
pollWhileOcrProcessing: !0
|
|
125
|
-
}),
|
|
126
|
-
...
|
|
131
|
+
}), W = ue({
|
|
132
|
+
...We,
|
|
127
133
|
enabled: c && z,
|
|
128
|
-
maxPages:
|
|
129
|
-
}),
|
|
130
|
-
...
|
|
131
|
-
data: { data:
|
|
132
|
-
isLoading:
|
|
133
|
-
isFetching:
|
|
134
|
-
} :
|
|
134
|
+
maxPages: ve
|
|
135
|
+
}), G = z ? {
|
|
136
|
+
...W,
|
|
137
|
+
data: { data: W.payables },
|
|
138
|
+
isLoading: W.isResolving,
|
|
139
|
+
isFetching: W.isFetching || W.isResolving
|
|
140
|
+
} : U, K = (G.data?.data ?? []).filter((e) => e.ocr_status !== "processing"), q = p(), J = y(async (t, n, r, i) => {
|
|
135
141
|
let a = u(t, n, i);
|
|
136
142
|
if (a.length) try {
|
|
137
|
-
await
|
|
143
|
+
await q.mutateAsync({
|
|
138
144
|
verdict: n,
|
|
139
145
|
targets: a.map((e) => ({
|
|
140
146
|
payableId: t.id,
|
|
@@ -144,61 +150,61 @@ function w({ enabled: c = !0, canReadVendors: l = !0, isVendorFilterPaused: d =
|
|
|
144
150
|
}))
|
|
145
151
|
}), e.success(r);
|
|
146
152
|
} catch {
|
|
147
|
-
e.error(
|
|
153
|
+
e.error(w.actionFailedToast);
|
|
148
154
|
}
|
|
149
|
-
}, [
|
|
155
|
+
}, [q, w.actionFailedToast]), Y = b(() => ({
|
|
150
156
|
delete: {
|
|
151
|
-
action:
|
|
152
|
-
title:
|
|
153
|
-
description:
|
|
154
|
-
confirmButton:
|
|
155
|
-
backButton:
|
|
156
|
-
toast:
|
|
157
|
+
action: w.deleteAction,
|
|
158
|
+
title: w.deleteConfirmTitle,
|
|
159
|
+
description: w.deleteConfirmDescription,
|
|
160
|
+
confirmButton: w.deleteConfirmButton,
|
|
161
|
+
backButton: w.cancelConfirmBackButton,
|
|
162
|
+
toast: w.deletedToast
|
|
157
163
|
},
|
|
158
164
|
cancel: {
|
|
159
|
-
action:
|
|
160
|
-
title:
|
|
161
|
-
description:
|
|
162
|
-
confirmButton:
|
|
163
|
-
backButton:
|
|
164
|
-
toast:
|
|
165
|
+
action: w.cancelAction,
|
|
166
|
+
title: w.cancelConfirmTitle,
|
|
167
|
+
description: w.cancelConfirmDescription,
|
|
168
|
+
confirmButton: w.cancelConfirmButton,
|
|
169
|
+
backButton: w.cancelConfirmBackButton,
|
|
170
|
+
toast: w.cancelledToast
|
|
165
171
|
},
|
|
166
172
|
confirm: {
|
|
167
|
-
action:
|
|
168
|
-
title:
|
|
169
|
-
description:
|
|
170
|
-
confirmButton:
|
|
171
|
-
backButton:
|
|
172
|
-
toast:
|
|
173
|
+
action: w.confirmAction,
|
|
174
|
+
title: w.confirmDuplicateTitle,
|
|
175
|
+
description: w.confirmDuplicateDescription,
|
|
176
|
+
confirmButton: w.confirmDuplicateButton,
|
|
177
|
+
backButton: w.cancelConfirmBackButton,
|
|
178
|
+
toast: w.confirmedToast
|
|
173
179
|
}
|
|
174
|
-
}), [
|
|
175
|
-
P && (await
|
|
180
|
+
}), [w]), Ke = P?.removeBy ?? "cancel", qe = y(async () => {
|
|
181
|
+
P && (await J(P.payable, a.Remove, Y[P.removeBy].toast), F(void 0));
|
|
176
182
|
}, [
|
|
177
|
-
|
|
183
|
+
J,
|
|
178
184
|
P,
|
|
179
|
-
|
|
180
|
-
]),
|
|
181
|
-
I && (await
|
|
185
|
+
Y
|
|
186
|
+
]), Je = y(async () => {
|
|
187
|
+
I && (await J(I.payable, a.Keep, w.dismissedToast, I.originalPayableId), L(void 0));
|
|
182
188
|
}, [
|
|
183
|
-
X,
|
|
184
|
-
T.dismissedToast,
|
|
185
|
-
I
|
|
186
|
-
]), [We, Ge] = x(W);
|
|
187
|
-
y(() => {
|
|
188
|
-
q.isFetching || Ge(W);
|
|
189
|
-
}, [q.isFetching, W]);
|
|
190
|
-
let Ke = q.data?.data.length, qe = Ke === 0, Je = me({ enabled: c && qe }), Ye = !qe || (Je.data?.count ?? 1) > 0, Q = b(() => E === C.PossibleDuplicates ? xe(J, T) : /* @__PURE__ */ new Map(), [
|
|
191
|
-
E,
|
|
192
189
|
J,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
190
|
+
w.dismissedToast,
|
|
191
|
+
I
|
|
192
|
+
]), [Ye, Xe] = x(H);
|
|
193
|
+
pe(() => {
|
|
194
|
+
G.isFetching || Xe(H);
|
|
195
|
+
}, [G.isFetching, H]);
|
|
196
|
+
let Ze = G.data?.data.length, Qe = Ze === 0, $e = fe({ enabled: c && Qe }), et = !Qe || ($e.data?.count ?? 1) > 0, X = b(() => T === C.PossibleDuplicates ? be(K, w) : /* @__PURE__ */ new Map(), [
|
|
197
|
+
T,
|
|
198
|
+
K,
|
|
199
|
+
w
|
|
200
|
+
]), tt = b(() => {
|
|
201
|
+
if (X.size === 0) return K;
|
|
196
202
|
let e = /* @__PURE__ */ new Map();
|
|
197
|
-
return
|
|
198
|
-
let r =
|
|
203
|
+
return K.forEach((t, n) => {
|
|
204
|
+
let r = X.get(t.id)?.key;
|
|
199
205
|
r !== void 0 && !e.has(r) && e.set(r, n);
|
|
200
|
-
}),
|
|
201
|
-
let r =
|
|
206
|
+
}), K.map((t, n) => {
|
|
207
|
+
let r = X.get(t.id);
|
|
202
208
|
return {
|
|
203
209
|
payable: t,
|
|
204
210
|
index: n,
|
|
@@ -206,35 +212,35 @@ function w({ enabled: c = !0, canReadVendors: l = !0, isVendorFilterPaused: d =
|
|
|
206
212
|
leads: r?.originalPayableId === t.id ? 0 : 1
|
|
207
213
|
};
|
|
208
214
|
}).sort((e, t) => e.order - t.order || e.leads - t.leads || e.index - t.index).map(({ payable: e }) => e);
|
|
209
|
-
}, [
|
|
210
|
-
payables:
|
|
215
|
+
}, [K, X]), { vendorNames: nt, lookup: rt } = le({
|
|
216
|
+
payables: G.data?.data,
|
|
211
217
|
enabled: c,
|
|
212
|
-
canReadVendors:
|
|
213
|
-
isPaused:
|
|
214
|
-
}),
|
|
218
|
+
canReadVendors: d,
|
|
219
|
+
isPaused: v
|
|
220
|
+
}), Z = b(() => tt.map((e) => {
|
|
215
221
|
let r = ne({
|
|
216
222
|
apiStatus: e.status,
|
|
217
223
|
dueDate: e.due_date,
|
|
218
224
|
scheduledPaymentDate: e.scheduled_payment_date
|
|
219
|
-
}), i = e.amount_due ?? e.total_amount, a = e.status === "partially_paid" || e.status === "paid", c = (t) => t == null ? "" : n(t / 100, { currencyCode: e.currency ?? "USD" }), l = o(e.scheduled_payment_date,
|
|
220
|
-
triggerLabel:
|
|
225
|
+
}), i = e.amount_due ?? e.total_amount, a = e.status === "partially_paid" || e.status === "paid", c = (t) => t == null ? "" : n(t / 100, { currencyCode: e.currency ?? "USD" }), l = o(e.scheduled_payment_date, Oe, ke), u = X.get(e.id), d = s(e), p = te(e) || (e.counterpart_id ? nt.get(e.counterpart_id) ?? "" : ""), m = e.document_id ?? "", g = f(e.status), _ = u?.originalPayableId !== void 0 && u.originalPayableId === e.id, re = z && d && De && u ? {
|
|
226
|
+
triggerLabel: w.menuTrigger({
|
|
221
227
|
vendorLabel: p,
|
|
222
228
|
invoiceNumberLabel: m
|
|
223
229
|
}),
|
|
224
230
|
items: [{
|
|
225
231
|
id: "not-duplicate",
|
|
226
|
-
label:
|
|
227
|
-
icon:
|
|
228
|
-
disabled:
|
|
232
|
+
label: w.notDuplicateAction,
|
|
233
|
+
icon: he,
|
|
234
|
+
disabled: q.isPending,
|
|
229
235
|
onSelect: () => L({
|
|
230
236
|
payable: e,
|
|
231
237
|
originalPayableId: _ ? void 0 : u.originalPayableId
|
|
232
238
|
})
|
|
233
239
|
}, ...g ? [{
|
|
234
240
|
id: "cancel-duplicate",
|
|
235
|
-
label:
|
|
236
|
-
icon: g === "delete" ?
|
|
237
|
-
disabled:
|
|
241
|
+
label: Y[g].action,
|
|
242
|
+
icon: g === "delete" ? ge : me,
|
|
243
|
+
disabled: q.isPending,
|
|
238
244
|
onSelect: () => F({
|
|
239
245
|
payable: e,
|
|
240
246
|
removeBy: g
|
|
@@ -244,21 +250,21 @@ function w({ enabled: c = !0, canReadVendors: l = !0, isVendorFilterPaused: d =
|
|
|
244
250
|
return {
|
|
245
251
|
rowKey: e.id,
|
|
246
252
|
vendorLabel: p,
|
|
247
|
-
vendorLookup: p || !e.counterpart_id ? void 0 : Ce(
|
|
253
|
+
vendorLookup: p || !e.counterpart_id ? void 0 : Ce(rt),
|
|
248
254
|
invoiceNumberLabel: m,
|
|
249
255
|
issueDateLabel: t(e.issued_at),
|
|
250
256
|
dueDateLabel: t(e.due_date),
|
|
251
257
|
dueDateTone: r.isOverdue ? "danger" : "default",
|
|
252
258
|
scheduledDateLabel: l.label,
|
|
253
259
|
scheduledDateExact: l.absoluteLabel,
|
|
254
|
-
scheduledDateIsGap:
|
|
260
|
+
scheduledDateIsGap: V === h.Scheduled,
|
|
255
261
|
paidDateLabel: t(e.paid_at?.slice(0, 10)),
|
|
256
262
|
amountDueLabel: c(i),
|
|
257
263
|
amountPaidLabel: a ? c(e.amount_paid) : "",
|
|
258
|
-
amountPaidIsGap:
|
|
264
|
+
amountPaidIsGap: V === h.Paid,
|
|
259
265
|
amountScheduledLabel: c(e.amount_to_pay ?? i),
|
|
260
266
|
totalAmountLabel: c(e.total_amount),
|
|
261
|
-
attachment: e.file_id ? { label:
|
|
267
|
+
attachment: e.file_id ? { label: Ee } : void 0,
|
|
262
268
|
status: r.status,
|
|
263
269
|
statusTone: r.tone,
|
|
264
270
|
addedOnLabel: t(e.created_at?.slice(0, 10)),
|
|
@@ -269,73 +275,73 @@ function w({ enabled: c = !0, canReadVendors: l = !0, isVendorFilterPaused: d =
|
|
|
269
275
|
},
|
|
270
276
|
...u.originalPayableId !== void 0 && !_ ? {
|
|
271
277
|
isNested: !0,
|
|
272
|
-
groupedRowLabel:
|
|
278
|
+
groupedRowLabel: w.copyRow
|
|
273
279
|
} : {}
|
|
274
280
|
} : {},
|
|
275
281
|
...re ? { menu: re } : {},
|
|
276
282
|
...!z && !u && d ? {
|
|
277
283
|
rowTone: "warning",
|
|
278
|
-
rowNote:
|
|
284
|
+
rowNote: Te
|
|
279
285
|
} : {},
|
|
280
|
-
onOpen: () =>
|
|
286
|
+
onOpen: () => we(e.id, ee(e.status))
|
|
281
287
|
};
|
|
282
288
|
}), [
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
+
tt,
|
|
290
|
+
X,
|
|
291
|
+
w,
|
|
292
|
+
Y,
|
|
293
|
+
q.isPending,
|
|
294
|
+
De,
|
|
289
295
|
z,
|
|
290
|
-
we,
|
|
291
296
|
Te,
|
|
292
|
-
|
|
297
|
+
Ee,
|
|
293
298
|
Oe,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
+
ke,
|
|
300
|
+
we,
|
|
301
|
+
V,
|
|
302
|
+
nt,
|
|
303
|
+
rt
|
|
304
|
+
]), it = b(() => z ? Se(Z, S) : [], [Z, z]), Q = Math.min(Le, Math.max(0, it.length - 1)), at = z ? it[Q] ?? [] : Z, $ = y((e) => {
|
|
299
305
|
let t = e;
|
|
300
|
-
|
|
306
|
+
Ae(t), Me((e) => {
|
|
301
307
|
let n = e[0]?.id;
|
|
302
|
-
return n ? _(t).some((e) =>
|
|
308
|
+
return n ? _(t).some((e) => ae(e) === n) ? e : ye : e;
|
|
303
309
|
}), R();
|
|
304
|
-
}, [R]),
|
|
305
|
-
|
|
306
|
-
}, [
|
|
307
|
-
M(""),
|
|
308
|
-
}, [
|
|
309
|
-
|
|
310
|
-
}, [R]),
|
|
311
|
-
|
|
312
|
-
}, [R]),
|
|
313
|
-
z ? A(
|
|
310
|
+
}, [R]), ot = y((e) => {
|
|
311
|
+
$(h.All), M(""), Be(e);
|
|
312
|
+
}, [Be, $]), st = y(() => {
|
|
313
|
+
M(""), Re(""), ze(), R();
|
|
314
|
+
}, [ze, R]), ct = y((e) => {
|
|
315
|
+
Me((t) => typeof e == "function" ? e(t) : e), R();
|
|
316
|
+
}, [R]), lt = y((e) => {
|
|
317
|
+
Ne(e), R();
|
|
318
|
+
}, [R]), ut = y(() => {
|
|
319
|
+
z ? A(Q + 1) : O(U.data?.next_pagination_token ?? void 0);
|
|
314
320
|
}, [
|
|
315
|
-
|
|
321
|
+
Q,
|
|
316
322
|
z,
|
|
317
|
-
|
|
318
|
-
]),
|
|
319
|
-
z ? A(Math.max(0,
|
|
323
|
+
U.data?.next_pagination_token
|
|
324
|
+
]), dt = y(() => {
|
|
325
|
+
z ? A(Math.max(0, Q - 1)) : O(U.data?.prev_pagination_token ?? void 0);
|
|
320
326
|
}, [
|
|
321
|
-
|
|
327
|
+
Q,
|
|
322
328
|
z,
|
|
323
|
-
|
|
324
|
-
]),
|
|
325
|
-
|
|
326
|
-
}, [
|
|
329
|
+
U.data?.prev_pagination_token
|
|
330
|
+
]), ft = y(() => {
|
|
331
|
+
G.refetch();
|
|
332
|
+
}, [G.refetch]);
|
|
327
333
|
return {
|
|
328
|
-
rows:
|
|
329
|
-
isLoading:
|
|
330
|
-
isError:
|
|
331
|
-
onRetry:
|
|
332
|
-
selectedFilterTabId:
|
|
333
|
-
onFilterTabChange:
|
|
334
|
-
showVendorBills:
|
|
335
|
-
clearQueryConstraints:
|
|
334
|
+
rows: at,
|
|
335
|
+
isLoading: G.isLoading || !z && k === void 0 || H !== Ye || Qe && $e.isLoading || (Ze ?? 0) > 0 && at.length === 0,
|
|
336
|
+
isError: G.isError,
|
|
337
|
+
onRetry: ft,
|
|
338
|
+
selectedFilterTabId: E,
|
|
339
|
+
onFilterTabChange: $,
|
|
340
|
+
showVendorBills: ot,
|
|
341
|
+
clearQueryConstraints: st,
|
|
336
342
|
searchValue: j,
|
|
337
343
|
onSearchChange: M,
|
|
338
|
-
hasAnyBills:
|
|
344
|
+
hasAnyBills: et,
|
|
339
345
|
isSearchActive: N.length > 0 || B.isFilterActive,
|
|
340
346
|
filterBarProps: B.filterBarProps,
|
|
341
347
|
visibleColumns: z ? [
|
|
@@ -345,41 +351,41 @@ function w({ enabled: c = !0, canReadVendors: l = !0, isVendorFilterPaused: d =
|
|
|
345
351
|
m.DueDate,
|
|
346
352
|
m.AddedOn,
|
|
347
353
|
m.Status
|
|
348
|
-
] : _(
|
|
349
|
-
showAddPanelWhenEmpty: !z && ie(
|
|
350
|
-
sorting:
|
|
351
|
-
onSortingChange:
|
|
352
|
-
pageSize: z ? S :
|
|
354
|
+
] : _(E),
|
|
355
|
+
showAddPanelWhenEmpty: !z && ie(E),
|
|
356
|
+
sorting: je,
|
|
357
|
+
onSortingChange: ct,
|
|
358
|
+
pageSize: z ? S : D,
|
|
353
359
|
pageSizeOptions: z ? [S] : void 0,
|
|
354
|
-
onPageSizeChange:
|
|
355
|
-
hasNextPage: z ?
|
|
356
|
-
hasPrevPage: z ?
|
|
357
|
-
onNextPage:
|
|
358
|
-
onPrevPage:
|
|
360
|
+
onPageSizeChange: lt,
|
|
361
|
+
hasNextPage: z ? Q < it.length - 1 : !!U.data?.next_pagination_token,
|
|
362
|
+
hasPrevPage: z ? Q > 0 : !!U.data?.prev_pagination_token,
|
|
363
|
+
onNextPage: ut,
|
|
364
|
+
onPrevPage: dt,
|
|
359
365
|
cancelConfirmation: {
|
|
360
366
|
open: !!P,
|
|
361
|
-
copy:
|
|
362
|
-
onConfirm: () => void
|
|
367
|
+
copy: se(Y[Ke], Ke),
|
|
368
|
+
onConfirm: () => void qe(),
|
|
363
369
|
onCancel: () => F(void 0),
|
|
364
|
-
isPending:
|
|
365
|
-
cancelButtonLabel:
|
|
370
|
+
isPending: q.isPending,
|
|
371
|
+
cancelButtonLabel: Y[Ke].backButton
|
|
366
372
|
},
|
|
367
373
|
keepConfirmation: {
|
|
368
374
|
open: !!I,
|
|
369
375
|
copy: {
|
|
370
|
-
title:
|
|
371
|
-
description:
|
|
372
|
-
confirmButton:
|
|
376
|
+
title: w.notDuplicateConfirmTitle,
|
|
377
|
+
description: w.notDuplicateConfirmDescription,
|
|
378
|
+
confirmButton: w.notDuplicateConfirmButton,
|
|
373
379
|
presentation: {
|
|
374
380
|
alignment: "center",
|
|
375
|
-
icon:
|
|
381
|
+
icon: he,
|
|
376
382
|
actionWidth: "equal"
|
|
377
383
|
}
|
|
378
384
|
},
|
|
379
|
-
onConfirm: () => void
|
|
385
|
+
onConfirm: () => void Je(),
|
|
380
386
|
onCancel: () => L(void 0),
|
|
381
|
-
isPending:
|
|
382
|
-
cancelButtonLabel:
|
|
387
|
+
isPending: q.isPending,
|
|
388
|
+
cancelButtonLabel: w.notDuplicateConfirmBackButton
|
|
383
389
|
}
|
|
384
390
|
};
|
|
385
391
|
}
|
|
@@ -391,6 +397,6 @@ function Se(e, t) {
|
|
|
391
397
|
}), r.length && n.push(r), n;
|
|
392
398
|
}
|
|
393
399
|
function Ce(e) {
|
|
394
|
-
return e ===
|
|
400
|
+
return e === v.Settled ? void 0 : e;
|
|
395
401
|
}
|
|
396
|
-
export { C as BillDuplicateView,
|
|
402
|
+
export { C as BillDuplicateView, xe as useBillsTable };
|