@tesouro/embedded-components-react 0.5.113 → 0.5.115
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 +3 -0
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +57 -36
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +15 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +3 -124
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +124 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +8 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +44 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +19 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +28 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +76 -252
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +48 -136
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +246 -218
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +138 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +212 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +3 -112
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +7 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +104 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index89.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +231 -228
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +143 -154
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +79 -87
- 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
|
@@ -1,138 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
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 r } from "../../data-access/dist/index7.js";
|
|
9
|
-
import { usePayablesQuery as i, usePayablesTotalCountQuery as a } from "../../data-access/dist/index17.js";
|
|
10
|
-
import "../../data-access/dist/index.js";
|
|
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";
|
|
1
|
+
import { BillStatusFilter as e } from "./index79.js";
|
|
2
|
+
import { BillsDatePreset as t } from "./index80.js";
|
|
17
3
|
//#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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
apiStatus: e.status,
|
|
64
|
-
dueDate: e.due_date,
|
|
65
|
-
scheduledPaymentDate: e.scheduled_payment_date
|
|
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
|
-
return {
|
|
68
|
-
rowKey: e.id,
|
|
69
|
-
vendorLabel: ee(e),
|
|
70
|
-
issueDateLabel: t(e.issued_at),
|
|
71
|
-
dueDateLabel: t(e.due_date),
|
|
72
|
-
dueDateTone: i.isOverdue ? "danger" : "default",
|
|
73
|
-
scheduledDateLabel: t(e.scheduled_payment_date),
|
|
74
|
-
scheduledDateIsGap: D === c.Scheduled,
|
|
75
|
-
paidDateLabel: t(e.paid_at?.slice(0, 10)),
|
|
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
|
-
attachment: e.file_id ? { label: E } : void 0,
|
|
82
|
-
status: i.status,
|
|
83
|
-
statusTone: i.tone,
|
|
84
|
-
addedOnLabel: t(e.created_at?.slice(0, 10)),
|
|
85
|
-
...r(e) ? {
|
|
86
|
-
rowTone: "warning",
|
|
87
|
-
rowNote: T
|
|
88
|
-
} : {},
|
|
89
|
-
onOpen: () => w(e.id, s(e.status))
|
|
90
|
-
};
|
|
91
|
-
}), [
|
|
92
|
-
q.data?.data,
|
|
93
|
-
T,
|
|
94
|
-
E,
|
|
95
|
-
w,
|
|
96
|
-
D
|
|
97
|
-
]), $ = h((e) => {
|
|
98
|
-
let t = e;
|
|
99
|
-
ie(t), k((e) => {
|
|
100
|
-
let n = e[0]?.id;
|
|
101
|
-
return n ? u(t).some((e) => ne(e) === n) ? e : b : e;
|
|
102
|
-
}), R();
|
|
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]);
|
|
112
|
-
return {
|
|
113
|
-
rows: Q,
|
|
114
|
-
isLoading: q.isLoading || K !== J || X && Z.isLoading || (Y ?? 0) > 0 && Q.length === 0,
|
|
115
|
-
isError: q.isError,
|
|
116
|
-
onRetry: fe,
|
|
117
|
-
selectedFilterTabId: D,
|
|
118
|
-
onFilterTabChange: $,
|
|
119
|
-
showVendorBills: se,
|
|
120
|
-
searchValue: P,
|
|
121
|
-
onSearchChange: F,
|
|
122
|
-
hasAnyBills: oe,
|
|
123
|
-
isSearchActive: I.length > 0 || z.isFilterActive,
|
|
124
|
-
filterBarProps: z.filterBarProps,
|
|
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
|
|
135
|
-
};
|
|
136
|
-
}
|
|
4
|
+
var n = {
|
|
5
|
+
presets: {
|
|
6
|
+
[t.Today]: "Today",
|
|
7
|
+
[t.ThisWeek]: "This week",
|
|
8
|
+
[t.ThisMonth]: "This month",
|
|
9
|
+
[t.ThisQuarter]: "This quarter",
|
|
10
|
+
[t.ThisYear]: "This year",
|
|
11
|
+
[t.Yesterday]: "Yesterday",
|
|
12
|
+
[t.LastWeek]: "Last week",
|
|
13
|
+
[t.LastMonth]: "Last month",
|
|
14
|
+
[t.Last30Days]: "Last 30 days",
|
|
15
|
+
[t.Last90Days]: "Last 90 days",
|
|
16
|
+
[t.LastQuarter]: "Last quarter",
|
|
17
|
+
[t.LastYear]: "Last year"
|
|
18
|
+
},
|
|
19
|
+
presetGroupCurrent: "Current",
|
|
20
|
+
presetGroupPast: "Past",
|
|
21
|
+
statuses: {
|
|
22
|
+
[e.Draft]: "Draft",
|
|
23
|
+
[e.ReadyToSubmit]: "Ready to submit",
|
|
24
|
+
[e.PendingApproval]: "Pending review",
|
|
25
|
+
[e.ReadyToPay]: "Ready to pay",
|
|
26
|
+
[e.Paid]: "Paid",
|
|
27
|
+
[e.Canceled]: "Cancelled",
|
|
28
|
+
[e.Rejected]: "Rejected"
|
|
29
|
+
},
|
|
30
|
+
dateFieldNames: {
|
|
31
|
+
issueDate: "Issue date",
|
|
32
|
+
dueDate: "Due date",
|
|
33
|
+
addedOn: "Added on"
|
|
34
|
+
},
|
|
35
|
+
dateChip: (e, t) => `${e}: ${t}`,
|
|
36
|
+
statusChip: (e) => `Status: ${e}`,
|
|
37
|
+
vendorChip: (e) => `Vendor: ${e}`,
|
|
38
|
+
amountChip: (e) => `Total amount: ${e}`,
|
|
39
|
+
attachmentChipHas: "Has attachment",
|
|
40
|
+
attachmentChipNone: "No attachment",
|
|
41
|
+
moreSelected: (e, t) => `${e} + ${t} more`,
|
|
42
|
+
amountAtLeast: (e) => `${e} or more`,
|
|
43
|
+
amountAtMost: (e) => `${e} or less`,
|
|
44
|
+
amountBetween: (e, t) => `${e} - ${t}`,
|
|
45
|
+
dateRange: (e, t) => `${e} - ${t}`,
|
|
46
|
+
dateFrom: (e) => `From ${e}`,
|
|
47
|
+
dateTo: (e) => `Until ${e}`
|
|
48
|
+
};
|
|
137
49
|
//#endregion
|
|
138
|
-
export {
|
|
50
|
+
export { n as BILLS_FILTER_LABELS_EN };
|