@tesouro/embedded-components-react 0.5.75 → 0.5.77
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 +0 -8
- 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/index45.js +140 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +46 -140
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +114 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +182 -111
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +75 -164
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +31 -76
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +89 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +405 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +12 -381
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +84 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +54 -79
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +223 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +37 -223
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +245 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +21 -252
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +575 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +4 -572
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +44 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +247 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +3 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +44 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +1 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +11 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +127 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +3 -129
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +127 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +8 -124
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +7 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +47 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +18 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +28 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +82 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +47 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +250 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +123 -241
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +211 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +3 -219
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +98 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +1 -100
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +2 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +12 -269
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +2 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +16 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +97 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +76 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +277 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +2 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +16 -369
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +56 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +2 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +15 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +50 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +1 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +32 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +374 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +1 -55
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +20 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +87 -188
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +48 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +47 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +10 -85
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +197 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +41 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +14 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +88 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +1 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +167 -161
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/auditHistory/buildPayableAuditHistory.js +5 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +1391 -1369
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +0 -27
|
@@ -2,252 +2,134 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
+
import { formatCalendarDate as t } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
7
|
+
import { formatMoneyExact as n } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
8
|
+
import { hasSuspectedPayableDuplicate as ee } from "../../data-access/dist/index7.js";
|
|
9
|
+
import { usePayablesQuery as r, usePayablesTotalCountQuery as i } from "../../data-access/dist/index17.js";
|
|
7
10
|
import "../../data-access/dist/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import "
|
|
10
|
-
import {
|
|
11
|
-
import "
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { BILLS_FILTER_LABELS_EN as c } from "./index80.js";
|
|
15
|
-
import { useCallback as l, useEffect as u, useMemo as d, useState as f } from "react";
|
|
16
|
-
import { format as p, formatISO as m } from "date-fns";
|
|
11
|
+
import { derivePayableStatus as te } from "./index7.js";
|
|
12
|
+
import { resolveVendorName as ne } from "./index8.js";
|
|
13
|
+
import { isEditablePayableStatus as re } from "./index19.js";
|
|
14
|
+
import { BillQueue as a, DEFAULT_BILL_QUEUE as o, billQueueColumns as s, billQueueHasScheduledPayment as c, billQueueOffersAddPanel as l, billQueueStatuses as u, billSortColumnId as d, billSortField as f } from "./index72.js";
|
|
15
|
+
import { useBillsFilters as p } from "./index80.js";
|
|
16
|
+
import { useCallback as m, useEffect as h, useMemo as g, useState as _ } from "react";
|
|
17
17
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}, x = {
|
|
29
|
-
[o.Today]: "current",
|
|
30
|
-
[o.ThisWeek]: "current",
|
|
31
|
-
[o.ThisMonth]: "current",
|
|
32
|
-
[o.ThisQuarter]: "current",
|
|
33
|
-
[o.ThisYear]: "current",
|
|
34
|
-
[o.Yesterday]: "past",
|
|
35
|
-
[o.LastWeek]: "past",
|
|
36
|
-
[o.LastMonth]: "past",
|
|
37
|
-
[o.Last30Days]: "past",
|
|
38
|
-
[o.Last90Days]: "past",
|
|
39
|
-
[o.LastQuarter]: "past",
|
|
40
|
-
[o.LastYear]: "past"
|
|
41
|
-
};
|
|
42
|
-
function S() {
|
|
43
|
-
return {
|
|
44
|
-
dateField: n.DueDate,
|
|
45
|
-
statuses: [],
|
|
46
|
-
amountMode: "any",
|
|
47
|
-
amountMin: "",
|
|
48
|
-
amountMax: "",
|
|
49
|
-
vendorIds: []
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function C(e) {
|
|
53
|
-
let t = Number.parseFloat(e);
|
|
54
|
-
return Number.isFinite(t) ? Math.round(t * 100) : void 0;
|
|
55
|
-
}
|
|
56
|
-
function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFilterPaused: T = !1, onFiltersChange: E, labels: D } = {}) {
|
|
57
|
-
let O = d(() => ({
|
|
58
|
-
...c,
|
|
59
|
-
...D,
|
|
60
|
-
presets: {
|
|
61
|
-
...c.presets,
|
|
62
|
-
...D?.presets
|
|
63
|
-
},
|
|
64
|
-
statuses: {
|
|
65
|
-
...c.statuses,
|
|
66
|
-
...D?.statuses
|
|
67
|
-
},
|
|
68
|
-
dateFieldNames: {
|
|
69
|
-
...c.dateFieldNames,
|
|
70
|
-
...D?.dateFieldNames
|
|
71
|
-
}
|
|
72
|
-
}), [D]), [k, A] = f(S), [j, M] = f({}), [N, P] = f(""), [F, I] = f(""), L = l((e) => {
|
|
73
|
-
A((t) => ({
|
|
74
|
-
...t,
|
|
75
|
-
...e
|
|
76
|
-
})), E?.();
|
|
77
|
-
}, [E]);
|
|
78
|
-
u(() => {
|
|
79
|
-
w || A((e) => e.vendorIds.length === 0 ? e : (E?.(), {
|
|
80
|
-
...e,
|
|
81
|
-
vendorIds: []
|
|
82
|
-
}));
|
|
83
|
-
}, [w, E]), u(() => {
|
|
84
|
-
o || A((e) => e.statuses.length === 0 ? e : (E?.(), {
|
|
85
|
-
...e,
|
|
86
|
-
statuses: []
|
|
87
|
-
}));
|
|
88
|
-
}, [o, E]), u(() => {
|
|
89
|
-
let e = setTimeout(() => I(N.trim()), _);
|
|
18
|
+
var v = 10, y = [{
|
|
19
|
+
id: "addedOnLabel",
|
|
20
|
+
desc: !0
|
|
21
|
+
}];
|
|
22
|
+
function b({ enabled: b = !0, canReadVendors: x = !0, isVendorFilterPaused: S = !1, filterLabels: C, onOpenBill: w, duplicateRowNote: T, attachmentLabel: E }) {
|
|
23
|
+
let [D, O] = _(o), [k, A] = _(y), [j, ie] = _(v), [M, N] = _(), [P, F] = _(""), [I, L] = _(""), R = m(() => N(void 0), []);
|
|
24
|
+
h(() => {
|
|
25
|
+
let e = setTimeout(() => {
|
|
26
|
+
L(P), R();
|
|
27
|
+
}, 300);
|
|
90
28
|
return () => clearTimeout(e);
|
|
91
|
-
}, [
|
|
92
|
-
let
|
|
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
|
-
|
|
29
|
+
}, [P, R]);
|
|
30
|
+
let z = p({
|
|
31
|
+
offersStatusFilter: D === a.All,
|
|
32
|
+
offersVendorFilter: x,
|
|
33
|
+
isVendorFilterPaused: S,
|
|
34
|
+
labels: C,
|
|
35
|
+
onFiltersChange: R
|
|
36
|
+
}), B = k[0], V = f(B?.id), H = V ? B?.desc ? "desc" : "asc" : void 0, U = g(() => ({
|
|
37
|
+
...z.query,
|
|
38
|
+
limit: j,
|
|
39
|
+
pagination_token: M,
|
|
40
|
+
status__in: u(D) ?? z.query.status__in,
|
|
41
|
+
has_scheduled_payment: c(D),
|
|
42
|
+
counterpart_name__icontains: I || void 0,
|
|
43
|
+
sort: V,
|
|
44
|
+
order: H
|
|
45
|
+
}), [
|
|
46
|
+
z.query,
|
|
47
|
+
j,
|
|
48
|
+
M,
|
|
49
|
+
D,
|
|
50
|
+
I,
|
|
51
|
+
V,
|
|
52
|
+
H
|
|
53
|
+
]), { organizationId: W } = e(), G = JSON.stringify([W, U]), K = r({
|
|
54
|
+
...U,
|
|
55
|
+
enabled: b,
|
|
56
|
+
pollWhileOcrProcessing: !0
|
|
57
|
+
}), [q, J] = _(G);
|
|
58
|
+
h(() => {
|
|
59
|
+
K.isFetching || J(G);
|
|
60
|
+
}, [K.isFetching, G]);
|
|
61
|
+
let Y = K.data?.data.length, X = Y === 0, Z = i({ enabled: b && X }), ae = !X || (Z.data?.count ?? 1) > 0, Q = g(() => (K.data?.data ?? []).filter((e) => e.ocr_status !== "processing").map((e) => {
|
|
62
|
+
let r = te({
|
|
63
|
+
apiStatus: e.status,
|
|
64
|
+
dueDate: e.due_date,
|
|
65
|
+
scheduledPaymentDate: e.scheduled_payment_date
|
|
66
|
+
}), i = e.amount_due ?? e.total_amount, o = e.status === "partially_paid" || e.status === "paid", s = (t) => t == null ? "" : n(t / 100, { currencyCode: e.currency ?? "USD" });
|
|
67
|
+
return {
|
|
68
|
+
rowKey: e.id,
|
|
69
|
+
vendorLabel: ne(e),
|
|
70
|
+
issueDateLabel: t(e.issued_at),
|
|
71
|
+
dueDateLabel: t(e.due_date),
|
|
72
|
+
dueDateTone: r.isOverdue ? "danger" : "default",
|
|
73
|
+
scheduledDateLabel: t(e.scheduled_payment_date),
|
|
74
|
+
scheduledDateIsGap: D === a.Scheduled,
|
|
75
|
+
paidDateLabel: t(e.paid_at?.slice(0, 10)),
|
|
76
|
+
amountDueLabel: s(i),
|
|
77
|
+
amountPaidLabel: o ? s(e.amount_paid) : "",
|
|
78
|
+
amountPaidIsGap: D === a.Paid,
|
|
79
|
+
amountScheduledLabel: s(e.amount_to_pay ?? i),
|
|
80
|
+
totalAmountLabel: s(e.total_amount),
|
|
81
|
+
attachment: e.file_id ? { label: E } : void 0,
|
|
82
|
+
status: r.status,
|
|
83
|
+
statusTone: r.tone,
|
|
84
|
+
addedOnLabel: t(e.created_at?.slice(0, 10)),
|
|
85
|
+
...ee(e) ? {
|
|
86
|
+
rowTone: "warning",
|
|
87
|
+
rowNote: T
|
|
88
|
+
} : {},
|
|
89
|
+
onOpen: () => w(e.id, re(e.status))
|
|
124
90
|
};
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
key: h.Amount,
|
|
145
|
-
label: O.amountChip(a)
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
return k.hasFile !== void 0 && t.push({
|
|
149
|
-
key: h.Attachment,
|
|
150
|
-
label: k.hasFile ? O.attachmentChipHas : O.attachmentChipNone
|
|
151
|
-
}), t;
|
|
152
|
-
}, [
|
|
153
|
-
O,
|
|
154
|
-
k,
|
|
155
|
-
j
|
|
156
|
-
]), W = l((e) => {
|
|
157
|
-
switch (e) {
|
|
158
|
-
case h.Date:
|
|
159
|
-
L({
|
|
160
|
-
datePreset: void 0,
|
|
161
|
-
dateFrom: void 0,
|
|
162
|
-
dateTo: void 0
|
|
163
|
-
});
|
|
164
|
-
break;
|
|
165
|
-
case h.Status:
|
|
166
|
-
L({ statuses: [] });
|
|
167
|
-
break;
|
|
168
|
-
case h.Vendor:
|
|
169
|
-
L({ vendorIds: [] });
|
|
170
|
-
break;
|
|
171
|
-
case h.Amount:
|
|
172
|
-
L({
|
|
173
|
-
amountMode: "any",
|
|
174
|
-
amountMin: "",
|
|
175
|
-
amountMax: ""
|
|
176
|
-
});
|
|
177
|
-
break;
|
|
178
|
-
case h.Attachment: L({ hasFile: void 0 });
|
|
179
|
-
}
|
|
180
|
-
}, [L]), G = l(() => {
|
|
181
|
-
A(S()), E?.();
|
|
182
|
-
}, [E]), K = l((e) => {
|
|
183
|
-
M((t) => {
|
|
184
|
-
let n = { ...t };
|
|
185
|
-
for (let t of z) e.includes(t.value) && (n[t.value] = t.label);
|
|
186
|
-
return n;
|
|
187
|
-
}), L({ vendorIds: e });
|
|
188
|
-
}, [L, z]);
|
|
91
|
+
}), [
|
|
92
|
+
K.data?.data,
|
|
93
|
+
T,
|
|
94
|
+
E,
|
|
95
|
+
w,
|
|
96
|
+
D
|
|
97
|
+
]), oe = m((e) => {
|
|
98
|
+
let t = e;
|
|
99
|
+
O(t), A((e) => {
|
|
100
|
+
let n = e[0]?.id;
|
|
101
|
+
return n ? s(t).some((e) => d(e) === n) ? e : y : e;
|
|
102
|
+
}), R();
|
|
103
|
+
}, [R]), se = m((e) => {
|
|
104
|
+
A((t) => typeof e == "function" ? e(t) : e), R();
|
|
105
|
+
}, [R]), ce = m((e) => {
|
|
106
|
+
ie(e), R();
|
|
107
|
+
}, [R]), le = m(() => N(K.data?.next_pagination_token ?? void 0), [K.data?.next_pagination_token]), $ = m(() => N(K.data?.prev_pagination_token ?? void 0), [K.data?.prev_pagination_token]), ue = m(() => {
|
|
108
|
+
K.refetch();
|
|
109
|
+
}, [K.refetch]);
|
|
189
110
|
return {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
},
|
|
212
|
-
datePresets: V,
|
|
213
|
-
selectedDatePreset: k.datePreset,
|
|
214
|
-
dateFrom: k.dateFrom,
|
|
215
|
-
dateTo: k.dateTo,
|
|
216
|
-
onDateRangeChange: ({ from: e, to: t }) => L({
|
|
217
|
-
datePreset: void 0,
|
|
218
|
-
dateFrom: e,
|
|
219
|
-
dateTo: t
|
|
220
|
-
}),
|
|
221
|
-
onDatePresetChange: (e) => {
|
|
222
|
-
let t = /* @__PURE__ */ new Date(), r = k.dateField === n.AddedOn ? new Date(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()) : t, { from: i, to: a } = s(e, r);
|
|
223
|
-
L({
|
|
224
|
-
datePreset: e,
|
|
225
|
-
dateFrom: i,
|
|
226
|
-
dateTo: a
|
|
227
|
-
});
|
|
228
|
-
},
|
|
229
|
-
statusOptions: B,
|
|
230
|
-
selectedStatuses: k.statuses,
|
|
231
|
-
onStatusChange: (e) => L({ statuses: e }),
|
|
232
|
-
amountMode: k.amountMode,
|
|
233
|
-
onAmountModeChange: (e) => L({ amountMode: e }),
|
|
234
|
-
amountMin: k.amountMin,
|
|
235
|
-
amountMax: k.amountMax,
|
|
236
|
-
onAmountMinChange: (e) => L({ amountMin: e }),
|
|
237
|
-
onAmountMaxChange: (e) => L({ amountMax: e }),
|
|
238
|
-
vendorOptions: z,
|
|
239
|
-
selectedVendors: k.vendorIds,
|
|
240
|
-
onVendorChange: K,
|
|
241
|
-
vendorSearchValue: N,
|
|
242
|
-
onVendorSearchChange: P,
|
|
243
|
-
isVendorLoading: R.isLoading || T,
|
|
244
|
-
isVendorError: R.isError,
|
|
245
|
-
hasAttachment: k.hasFile,
|
|
246
|
-
onHasAttachmentChange: (e) => L({ hasFile: e })
|
|
247
|
-
},
|
|
248
|
-
query: H,
|
|
249
|
-
isFilterActive: U.length > 0
|
|
111
|
+
rows: Q,
|
|
112
|
+
isLoading: K.isLoading || G !== q || X && Z.isLoading || (Y ?? 0) > 0 && Q.length === 0,
|
|
113
|
+
isError: K.isError,
|
|
114
|
+
onRetry: ue,
|
|
115
|
+
selectedFilterTabId: D,
|
|
116
|
+
onFilterTabChange: oe,
|
|
117
|
+
searchValue: P,
|
|
118
|
+
onSearchChange: F,
|
|
119
|
+
hasAnyBills: ae,
|
|
120
|
+
isSearchActive: I.length > 0 || z.isFilterActive,
|
|
121
|
+
filterBarProps: z.filterBarProps,
|
|
122
|
+
visibleColumns: s(D),
|
|
123
|
+
showAddPanelWhenEmpty: l(D),
|
|
124
|
+
sorting: k,
|
|
125
|
+
onSortingChange: se,
|
|
126
|
+
pageSize: j,
|
|
127
|
+
onPageSizeChange: ce,
|
|
128
|
+
hasNextPage: !!K.data?.next_pagination_token,
|
|
129
|
+
hasPrevPage: !!K.data?.prev_pagination_token,
|
|
130
|
+
onNextPage: le,
|
|
131
|
+
onPrevPage: $
|
|
250
132
|
};
|
|
251
133
|
}
|
|
252
134
|
//#endregion
|
|
253
|
-
export {
|
|
135
|
+
export { b as useBillsTable };
|