@tesouro/embedded-components-react 0.11.4 → 0.11.7
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
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { BILL_QUEUE_ORDER as e, billQueueFilters as t } from "./index5.js";
|
|
6
|
+
import { usePayablesCountQueries as n } from "../../data-access/dist/index3.js";
|
|
7
|
+
import "../../data-access/dist/index.js";
|
|
8
|
+
import { useMemo as r, useState as i } from "react";
|
|
2
9
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index10.js
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
tone: r === "confirm" ? "default" : "destructive",
|
|
12
|
-
actionWidth: "equal"
|
|
13
|
-
}
|
|
14
|
-
};
|
|
10
|
+
function a({ enabled: a = !0, canPay: o } = {}) {
|
|
11
|
+
let [s, c] = i(o);
|
|
12
|
+
o !== void 0 && s !== o && c(o);
|
|
13
|
+
let l = o ?? s, u = r(() => e.map((e) => t(e, l ?? !1)), [l]), d = n({
|
|
14
|
+
filters: u,
|
|
15
|
+
enabled: a && o !== void 0
|
|
16
|
+
});
|
|
17
|
+
return r(() => Object.fromEntries(e.map((e, t) => [e, d[t]?.count])), [d]);
|
|
15
18
|
}
|
|
16
|
-
export {
|
|
19
|
+
export { a as useBillQueueCounts };
|
|
@@ -1,30 +1,16 @@
|
|
|
1
|
+
import { BanIcon as e, Trash2Icon as t } from "lucide-react";
|
|
1
2
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index11.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
e.ReadyToPay,
|
|
15
|
-
e.Paid,
|
|
16
|
-
e.Canceled,
|
|
17
|
-
e.Rejected
|
|
18
|
-
], n = {
|
|
19
|
-
[e.Draft]: ["draft"],
|
|
20
|
-
[e.ReadyToSubmit]: ["new"],
|
|
21
|
-
[e.PendingApproval]: ["approve_in_progress"],
|
|
22
|
-
[e.ReadyToPay]: ["waiting_to_be_paid", "partially_paid"],
|
|
23
|
-
[e.Paid]: ["paid"],
|
|
24
|
-
[e.Canceled]: ["canceled"],
|
|
25
|
-
[e.Rejected]: ["rejected"]
|
|
26
|
-
};
|
|
27
|
-
function r(e) {
|
|
28
|
-
return e.flatMap((e) => n[e] ?? [e]);
|
|
3
|
+
function n(n, r) {
|
|
4
|
+
return {
|
|
5
|
+
title: n.title,
|
|
6
|
+
description: n.description,
|
|
7
|
+
confirmButton: n.confirmButton,
|
|
8
|
+
presentation: {
|
|
9
|
+
alignment: "center",
|
|
10
|
+
icon: r === "delete" ? t : e,
|
|
11
|
+
tone: r === "confirm" ? "default" : "destructive",
|
|
12
|
+
actionWidth: "equal"
|
|
13
|
+
}
|
|
14
|
+
};
|
|
29
15
|
}
|
|
30
|
-
export {
|
|
16
|
+
export { n as duplicateRemovalPrompt };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BillStatusFilter as e } from "./
|
|
1
|
+
import { BillStatusFilter as e } from "./index4.js";
|
|
2
2
|
import { BillsDatePreset as t } from "./index12.js";
|
|
3
3
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index13.js
|
|
4
4
|
var n = {
|
|
@@ -8,9 +8,9 @@ import "../../../util/dist/index.js";
|
|
|
8
8
|
import { getCounterpartName as t } from "../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
9
9
|
import { useCounterpartsQuery as n } from "../../../../shared/counterpart-management/data-access/dist/index3.js";
|
|
10
10
|
import "../../../../shared/counterpart-management/feature/dist/index.js";
|
|
11
|
-
import {
|
|
11
|
+
import { BILL_STATUS_FILTER_ORDER as r, billStatusFilterApiValues as i } from "./index4.js";
|
|
12
|
+
import { BillsFilterField as a } from "../../ui/dist/index9.js";
|
|
12
13
|
import "../../ui/dist/index.js";
|
|
13
|
-
import { BILL_STATUS_FILTER_ORDER as i, billStatusFilterApiValues as a } from "./index11.js";
|
|
14
14
|
import { BillsDatePreset as o, resolveDatePreset as s } from "./index12.js";
|
|
15
15
|
import { BILLS_FILTER_LABELS_EN as c } from "./index13.js";
|
|
16
16
|
import { useCallback as l, useEffect as u, useMemo as d, useState as f } from "react";
|
|
@@ -23,9 +23,9 @@ var h = {
|
|
|
23
23
|
Vendor: "vendor",
|
|
24
24
|
Attachment: "attachment"
|
|
25
25
|
}, g = 50, _ = 300, v = "MMM d, yyyy", y = 864e5, b = {
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
26
|
+
[a.IssueDate]: "issued_at",
|
|
27
|
+
[a.DueDate]: "due_date",
|
|
28
|
+
[a.AddedOn]: "created_at"
|
|
29
29
|
}, x = {
|
|
30
30
|
[o.Today]: "current",
|
|
31
31
|
[o.ThisWeek]: "current",
|
|
@@ -42,7 +42,7 @@ var h = {
|
|
|
42
42
|
};
|
|
43
43
|
function S() {
|
|
44
44
|
return {
|
|
45
|
-
dateField:
|
|
45
|
+
dateField: a.DueDate,
|
|
46
46
|
statuses: [],
|
|
47
47
|
amountMode: "any",
|
|
48
48
|
amountMin: "",
|
|
@@ -100,7 +100,7 @@ function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFil
|
|
|
100
100
|
}), z = d(() => (R.data?.data ?? []).map((e) => ({
|
|
101
101
|
value: e.id,
|
|
102
102
|
label: t(e)
|
|
103
|
-
})), [R.data?.data]), B = d(() =>
|
|
103
|
+
})), [R.data?.data]), B = d(() => r.map((e) => ({
|
|
104
104
|
value: e,
|
|
105
105
|
label: O.statuses[e]
|
|
106
106
|
})), [O.statuses]), V = d(() => Object.entries(x).map(([e, t]) => ({
|
|
@@ -113,7 +113,7 @@ function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFil
|
|
|
113
113
|
O.presets
|
|
114
114
|
]), H = d(() => {
|
|
115
115
|
let e = {}, t = b[k.dateField], n = (e) => Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
|
|
116
|
-
if (k.dateFrom && (e[`${t}__gte`] = t === "created_at" ? new Date(n(k.dateFrom)).toISOString() : m(k.dateFrom, { representation: "date" })), k.dateTo && (t === "created_at" ? e.created_at__lt = new Date(n(k.dateTo) + y).toISOString() : e[`${t}__lte`] = m(k.dateTo, { representation: "date" })), k.statuses.length > 0 && (e.status__in =
|
|
116
|
+
if (k.dateFrom && (e[`${t}__gte`] = t === "created_at" ? new Date(n(k.dateFrom)).toISOString() : m(k.dateFrom, { representation: "date" })), k.dateTo && (t === "created_at" ? e.created_at__lt = new Date(n(k.dateTo) + y).toISOString() : e[`${t}__lte`] = m(k.dateTo, { representation: "date" })), k.statuses.length > 0 && (e.status__in = i(k.statuses)), k.amountMode !== "any") {
|
|
117
117
|
let t = "total_amount__gte", n = "total_amount__lte", r = C(k.amountMin), i = C(k.amountMax);
|
|
118
118
|
k.amountMode === "exact" ? r !== void 0 && (e[t] = r, e[n] = r) : (r !== void 0 && (e[t] = r), i !== void 0 && (e[n] = i));
|
|
119
119
|
}
|
|
@@ -198,13 +198,13 @@ function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFil
|
|
|
198
198
|
return {
|
|
199
199
|
filterBarProps: {
|
|
200
200
|
fields: [...d(() => [
|
|
201
|
-
...w ? [
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
...o ? [
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
201
|
+
...w ? [a.Vendor] : [],
|
|
202
|
+
a.IssueDate,
|
|
203
|
+
a.DueDate,
|
|
204
|
+
...o ? [a.Status] : [],
|
|
205
|
+
a.TotalAmount,
|
|
206
|
+
a.AddedOn,
|
|
207
|
+
a.Attachment
|
|
208
208
|
], [o, w])],
|
|
209
209
|
activeFilterCount: U.length,
|
|
210
210
|
chips: U,
|
|
@@ -228,11 +228,11 @@ function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFil
|
|
|
228
228
|
dateTo: t
|
|
229
229
|
}),
|
|
230
230
|
onDatePresetChange: (e) => {
|
|
231
|
-
let t = /* @__PURE__ */ new Date(), n = k.dateField ===
|
|
231
|
+
let t = /* @__PURE__ */ new Date(), n = k.dateField === a.AddedOn ? new Date(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()) : t, { from: r, to: i } = s(e, n);
|
|
232
232
|
L({
|
|
233
233
|
datePreset: e,
|
|
234
|
-
dateFrom:
|
|
235
|
-
dateTo:
|
|
234
|
+
dateFrom: r,
|
|
235
|
+
dateTo: i
|
|
236
236
|
});
|
|
237
237
|
},
|
|
238
238
|
statusOptions: B,
|