@tesouro/embedded-components-react 0.2.317 → 0.2.319
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 +5 -4
- package/dist/index.css +9 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.d.ts +4 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +10 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +170 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +13 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +30 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +50 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index3.js +11 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +33 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +47 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +18 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +40 -131
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +48 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +30 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +18 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +29 -97
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +1 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +13 -109
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +24 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +30 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +19 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +49 -76
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +4 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +73 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +50 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +4 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +7 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +38 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +115 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +56 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +206 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +195 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +58 -64
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +46 -139
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +34 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +155 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +3 -60
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +36 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +92 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +9 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +191 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +4 -114
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +26 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +78 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +92 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +5 -206
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +45 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +53 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +79 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +148 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +3 -197
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +85 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +30 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +38 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +20 -151
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +158 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +29 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +13 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +13 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +24 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +2 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +31 -283
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +261 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +7 -118
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +49 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +20 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +286 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +14 -56
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +120 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +1 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +8 -157
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +96 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +11 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +57 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +50 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +138 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +1 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +5 -227
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +37 -188
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +55 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +229 -84
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +195 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +88 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +5 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +34 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +12 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +106 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +170 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +89 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +21 -21
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +189 -156
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +157 -97
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +1834 -1819
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +10 -10
- 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/index7.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +0 -2
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js
CHANGED
|
@@ -4,72 +4,27 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
6
|
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { withAuthEpoch as a } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
10
|
-
import { getAllPagesNextPaginationTokenParam as o, isAllPagesResolving as s, useAutoFetchNextPage as c } from "../../../shared/data-access/dist/lib/allPages.js";
|
|
7
|
+
import { getPayablesIdHistoryOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
8
|
+
import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
11
9
|
import "../../../shared/data-access/dist/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import { useMemo as u } from "react";
|
|
14
|
-
import { useInfiniteQuery as d, useMutation as f } from "@tanstack/react-query";
|
|
10
|
+
import { useQuery as i } from "@tanstack/react-query";
|
|
15
11
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
let { client:
|
|
19
|
-
client:
|
|
20
|
-
headers:
|
|
21
|
-
path: { payable_id:
|
|
22
|
-
query: {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
initialPageParam: void 0,
|
|
27
|
-
queryFn: async ({ signal: e, pageParam: t }) => {
|
|
28
|
-
let { data: i } = await n({
|
|
29
|
-
client: f,
|
|
30
|
-
headers: _,
|
|
31
|
-
path: { payable_id: r ?? "" },
|
|
32
|
-
query: {
|
|
33
|
-
limit: p,
|
|
34
|
-
...t ? { pagination_token: t } : {}
|
|
35
|
-
},
|
|
36
|
-
signal: e,
|
|
37
|
-
throwOnError: !0
|
|
38
|
-
});
|
|
39
|
-
return i;
|
|
40
|
-
},
|
|
41
|
-
getNextPageParam: o
|
|
42
|
-
});
|
|
43
|
-
c(b, v);
|
|
44
|
-
let x = u(() => b.data?.pages.flatMap((e) => e.data ?? []) ?? [], [b.data]);
|
|
45
|
-
return {
|
|
46
|
-
...b,
|
|
47
|
-
lineItems: x,
|
|
48
|
-
isResolving: s(b)
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function h() {
|
|
52
|
-
let { client: n, organizationId: i } = e();
|
|
53
|
-
return f({
|
|
54
|
-
mutationFn: async ({ path: e, body: a }) => {
|
|
55
|
-
let { data: o } = await r({
|
|
56
|
-
client: n,
|
|
57
|
-
headers: t(i),
|
|
58
|
-
path: e,
|
|
59
|
-
body: a,
|
|
60
|
-
throwOnError: !0
|
|
61
|
-
});
|
|
62
|
-
return o;
|
|
63
|
-
},
|
|
64
|
-
onSuccess: async (e, t) => {
|
|
65
|
-
await l({
|
|
66
|
-
client: n,
|
|
67
|
-
organizationId: i,
|
|
68
|
-
payableId: t.path.payable_id,
|
|
69
|
-
includeLineItems: !0
|
|
70
|
-
});
|
|
12
|
+
var a = 100;
|
|
13
|
+
function o(o, { enabled: s } = {}) {
|
|
14
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), f = !!(l && u && o) && s !== !1, p = n({
|
|
15
|
+
client: c,
|
|
16
|
+
headers: t(l),
|
|
17
|
+
path: { payable_id: o ?? "" },
|
|
18
|
+
query: {
|
|
19
|
+
sort: "timestamp",
|
|
20
|
+
order: "asc",
|
|
21
|
+
limit: a
|
|
71
22
|
}
|
|
72
23
|
});
|
|
24
|
+
return i({
|
|
25
|
+
...r(p, d),
|
|
26
|
+
enabled: f
|
|
27
|
+
});
|
|
73
28
|
}
|
|
74
29
|
//#endregion
|
|
75
|
-
export {
|
|
30
|
+
export { o as usePayableHistoryQuery };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js
CHANGED
|
@@ -4,34 +4,53 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
6
|
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
-
import {
|
|
7
|
+
import { getPayablesIdLineItems as n, putPayablesIdLineItems as r } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
8
|
+
import { getPayablesIdLineItemsOptions as i } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
+
import { withAuthEpoch as a } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
10
|
+
import { getAllPagesNextPaginationTokenParam as o, isAllPagesResolving as s, useAutoFetchNextPage as c } from "../../../shared/data-access/dist/lib/allPages.js";
|
|
8
11
|
import "../../../shared/data-access/dist/index.js";
|
|
9
12
|
import { invalidatePayableQueries as l } from "./index4.js";
|
|
10
|
-
import {
|
|
13
|
+
import { useMemo as u } from "react";
|
|
14
|
+
import { useInfiniteQuery as d, useMutation as f } from "@tanstack/react-query";
|
|
11
15
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
var p = 100;
|
|
17
|
+
function m(r, { enabled: l } = {}) {
|
|
18
|
+
let { client: f, organizationId: m, widgetToken: h, authEpoch: g } = e(), _ = t(m), v = !!(m && h && r) && l !== !1, y = i({
|
|
19
|
+
client: f,
|
|
20
|
+
headers: _,
|
|
21
|
+
path: { payable_id: r ?? "" },
|
|
22
|
+
query: { limit: p }
|
|
23
|
+
}), b = d({
|
|
24
|
+
queryKey: [...a(y, g).queryKey, "all"],
|
|
25
|
+
enabled: v,
|
|
26
|
+
initialPageParam: void 0,
|
|
27
|
+
queryFn: async ({ signal: e, pageParam: t }) => {
|
|
28
|
+
let { data: i } = await n({
|
|
29
|
+
client: f,
|
|
30
|
+
headers: _,
|
|
31
|
+
path: { payable_id: r ?? "" },
|
|
32
|
+
query: {
|
|
33
|
+
limit: p,
|
|
34
|
+
...t ? { pagination_token: t } : {}
|
|
35
|
+
},
|
|
36
|
+
signal: e,
|
|
20
37
|
throwOnError: !0
|
|
21
38
|
});
|
|
22
|
-
return
|
|
39
|
+
return i;
|
|
23
40
|
},
|
|
24
|
-
|
|
25
|
-
await l({
|
|
26
|
-
client: n,
|
|
27
|
-
organizationId: r
|
|
28
|
-
});
|
|
29
|
-
}
|
|
41
|
+
getNextPageParam: o
|
|
30
42
|
});
|
|
43
|
+
c(b, v);
|
|
44
|
+
let x = u(() => b.data?.pages.flatMap((e) => e.data ?? []) ?? [], [b.data]);
|
|
45
|
+
return {
|
|
46
|
+
...b,
|
|
47
|
+
lineItems: x,
|
|
48
|
+
isResolving: s(b)
|
|
49
|
+
};
|
|
31
50
|
}
|
|
32
|
-
function
|
|
51
|
+
function h() {
|
|
33
52
|
let { client: n, organizationId: i } = e();
|
|
34
|
-
return
|
|
53
|
+
return f({
|
|
35
54
|
mutationFn: async ({ path: e, body: a }) => {
|
|
36
55
|
let { data: o } = await r({
|
|
37
56
|
client: n,
|
|
@@ -46,121 +65,11 @@ function f() {
|
|
|
46
65
|
await l({
|
|
47
66
|
client: n,
|
|
48
67
|
organizationId: i,
|
|
49
|
-
payableId: t.path.payable_id
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function p() {
|
|
55
|
-
let { client: n, organizationId: i } = e();
|
|
56
|
-
return u({
|
|
57
|
-
mutationFn: async ({ file: e }) => {
|
|
58
|
-
let { data: a } = await c({
|
|
59
|
-
client: n,
|
|
60
|
-
headers: t(i),
|
|
61
|
-
body: { file: e },
|
|
62
|
-
throwOnError: !0
|
|
63
|
-
});
|
|
64
|
-
if (a?.id && a.currency !== "USD") try {
|
|
65
|
-
return await r({
|
|
66
|
-
client: n,
|
|
67
|
-
headers: t(i),
|
|
68
|
-
path: { payable_id: a.id },
|
|
69
|
-
body: { currency: "USD" },
|
|
70
|
-
throwOnError: !0
|
|
71
|
-
}), {
|
|
72
|
-
...a,
|
|
73
|
-
currency: "USD"
|
|
74
|
-
};
|
|
75
|
-
} catch {}
|
|
76
|
-
return a;
|
|
77
|
-
},
|
|
78
|
-
onSuccess: async () => {
|
|
79
|
-
await l({
|
|
80
|
-
client: n,
|
|
81
|
-
organizationId: i
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
function m() {
|
|
87
|
-
let { client: n, organizationId: r } = e();
|
|
88
|
-
return u({
|
|
89
|
-
mutationFn: async ({ path: e, file: i }) => {
|
|
90
|
-
let { data: o } = await a({
|
|
91
|
-
client: n,
|
|
92
|
-
headers: t(r),
|
|
93
|
-
path: e,
|
|
94
|
-
body: { file: i },
|
|
95
|
-
throwOnError: !0
|
|
96
|
-
});
|
|
97
|
-
return o;
|
|
98
|
-
},
|
|
99
|
-
onSuccess: async (e, t) => {
|
|
100
|
-
await l({
|
|
101
|
-
client: n,
|
|
102
|
-
organizationId: r,
|
|
103
|
-
payableId: t.path.payable_id
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
function h() {
|
|
109
|
-
let { client: r, organizationId: i } = e();
|
|
110
|
-
return u({
|
|
111
|
-
mutationFn: async ({ path: e }) => {
|
|
112
|
-
await n({
|
|
113
|
-
client: r,
|
|
114
|
-
headers: t(i),
|
|
115
|
-
path: e,
|
|
116
|
-
throwOnError: !0
|
|
117
|
-
});
|
|
118
|
-
},
|
|
119
|
-
onSuccess: async (e, t) => {
|
|
120
|
-
await l({
|
|
121
|
-
client: r,
|
|
122
|
-
organizationId: i,
|
|
123
|
-
payableId: t.payableId
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
function g() {
|
|
129
|
-
let { client: n, organizationId: r } = e();
|
|
130
|
-
return u({ mutationFn: async ({ path: e }) => {
|
|
131
|
-
let { data: i } = await s({
|
|
132
|
-
client: n,
|
|
133
|
-
headers: t(r),
|
|
134
|
-
path: e,
|
|
135
|
-
throwOnError: !0
|
|
136
|
-
});
|
|
137
|
-
return {
|
|
138
|
-
id: i.id,
|
|
139
|
-
validation_errors: i.validation_errors ?? []
|
|
140
|
-
};
|
|
141
|
-
} });
|
|
142
|
-
}
|
|
143
|
-
function _() {
|
|
144
|
-
let { client: n, organizationId: r } = e();
|
|
145
|
-
return u({
|
|
146
|
-
mutationFn: async ({ path: e }) => {
|
|
147
|
-
let { data: i } = await o({
|
|
148
|
-
client: n,
|
|
149
|
-
headers: t(r),
|
|
150
|
-
path: e,
|
|
151
|
-
throwOnError: !0
|
|
152
|
-
});
|
|
153
|
-
return i;
|
|
154
|
-
},
|
|
155
|
-
onSuccess: async (e, t) => {
|
|
156
|
-
await l({
|
|
157
|
-
client: n,
|
|
158
|
-
organizationId: r,
|
|
159
68
|
payableId: t.path.payable_id,
|
|
160
|
-
|
|
69
|
+
includeLineItems: !0
|
|
161
70
|
});
|
|
162
71
|
}
|
|
163
72
|
});
|
|
164
73
|
}
|
|
165
74
|
//#endregion
|
|
166
|
-
export { m as
|
|
75
|
+
export { m as useAllPayableLineItemsQuery, h as useReplacePayableLineItemsMutation };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js
CHANGED
|
@@ -1,17 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
+
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
+
import { getPaymentRecords as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
8
|
+
import { getPaymentRecordsOptions as r } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
+
import { withAuthEpoch as i } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
10
|
+
import { getAllPagesNextPaginationTokenParam as a, isAllPagesResolving as o, useAutoFetchNextPage as s } from "../../../shared/data-access/dist/lib/allPages.js";
|
|
3
11
|
import "../../../shared/data-access/dist/index.js";
|
|
12
|
+
import { useMemo as c } from "react";
|
|
13
|
+
import { useInfiniteQuery as l } from "@tanstack/react-query";
|
|
4
14
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js
|
|
5
|
-
var
|
|
6
|
-
function
|
|
15
|
+
var u = 100;
|
|
16
|
+
function d(d, { enabled: f } = {}) {
|
|
17
|
+
let { client: p, organizationId: m, widgetToken: h, authEpoch: g } = e(), _ = t(m), v = !!(m && h && d) && f !== !1, y = {
|
|
18
|
+
limit: u,
|
|
19
|
+
object_id__in: d ? [d] : [],
|
|
20
|
+
order: "desc",
|
|
21
|
+
sort: "paid_at"
|
|
22
|
+
}, b = r({
|
|
23
|
+
client: p,
|
|
24
|
+
headers: _,
|
|
25
|
+
query: y
|
|
26
|
+
}), x = l({
|
|
27
|
+
queryKey: [...i(b, g).queryKey, "all"],
|
|
28
|
+
enabled: v,
|
|
29
|
+
initialPageParam: void 0,
|
|
30
|
+
queryFn: async ({ signal: e, pageParam: t }) => {
|
|
31
|
+
let { data: r } = await n({
|
|
32
|
+
client: p,
|
|
33
|
+
headers: _,
|
|
34
|
+
query: {
|
|
35
|
+
...y,
|
|
36
|
+
...t ? { pagination_token: t } : {}
|
|
37
|
+
},
|
|
38
|
+
signal: e,
|
|
39
|
+
throwOnError: !0
|
|
40
|
+
});
|
|
41
|
+
return r;
|
|
42
|
+
},
|
|
43
|
+
getNextPageParam: a
|
|
44
|
+
});
|
|
45
|
+
s(x, v);
|
|
46
|
+
let S = c(() => x.data?.pages.flatMap((e) => e.data ?? []) ?? [], [x.data]);
|
|
7
47
|
return {
|
|
8
|
-
...
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
path: { payable_id: i }
|
|
12
|
-
}),
|
|
13
|
-
refetchInterval: (e) => e.state.data?.ocr_status === "processing" && 2500
|
|
48
|
+
...x,
|
|
49
|
+
paymentRecords: S,
|
|
50
|
+
isResolving: o(x)
|
|
14
51
|
};
|
|
15
52
|
}
|
|
16
53
|
//#endregion
|
|
17
|
-
export {
|
|
54
|
+
export { d as usePayablePaymentRecordsQuery };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js
CHANGED
|
@@ -3,28 +3,38 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
-
import {
|
|
6
|
+
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
+
import { postPayablesIdSchedulePayment as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
7
8
|
import "../../../shared/data-access/dist/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
9
|
+
import { invalidatePayableQueries as r } from "./index4.js";
|
|
10
|
+
import { useMutation as i } from "@tanstack/react-query";
|
|
10
11
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js
|
|
11
|
-
function
|
|
12
|
-
let { client:
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
client:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
12
|
+
function a() {
|
|
13
|
+
let { client: a, organizationId: o } = e();
|
|
14
|
+
return i({
|
|
15
|
+
mutationFn: async ({ payableId: e, paymentDate: r, sourceBankAccountId: i }) => {
|
|
16
|
+
let { data: s } = await n({
|
|
17
|
+
client: a,
|
|
18
|
+
headers: t(o),
|
|
19
|
+
path: { payable_id: e },
|
|
20
|
+
body: {
|
|
21
|
+
payment_date: r,
|
|
22
|
+
source_bank_account_id: i
|
|
23
|
+
},
|
|
24
|
+
throwOnError: !0
|
|
25
|
+
});
|
|
26
|
+
return s;
|
|
27
|
+
},
|
|
28
|
+
onSuccess: async (e, t) => {
|
|
29
|
+
try {
|
|
30
|
+
await r({
|
|
31
|
+
client: a,
|
|
32
|
+
organizationId: o,
|
|
33
|
+
payableId: t.payableId
|
|
34
|
+
});
|
|
35
|
+
} catch {}
|
|
36
|
+
}
|
|
27
37
|
});
|
|
28
38
|
}
|
|
29
39
|
//#endregion
|
|
30
|
-
export {
|
|
40
|
+
export { a as useSchedulePaymentMutation };
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import "./index2.js";
|
|
2
|
-
import "./index8.js";
|
|
3
1
|
import "./index10.js";
|
|
4
|
-
import "./
|
|
5
|
-
import "./index13.js";
|
|
6
|
-
import "./index14.js";
|
|
7
|
-
import "./index15.js";
|
|
2
|
+
import "./index11.js";
|
|
8
3
|
import "./index16.js";
|
|
9
|
-
import "./index17.js";
|
|
10
|
-
import "./index18.js";
|
|
11
4
|
import "./index22.js";
|
|
12
|
-
import "./index24.js";
|
|
13
|
-
import "./index25.js";
|
|
14
|
-
import "./index26.js";
|
|
15
|
-
import "./index27.js";
|
|
16
|
-
import "./index28.js";
|
|
17
5
|
import "./index29.js";
|
|
18
|
-
import "./index30.js";
|
|
19
6
|
import "./index31.js";
|
|
20
|
-
import "./
|
|
21
|
-
import
|
|
7
|
+
import "./index33.js";
|
|
8
|
+
import "./index34.js";
|
|
9
|
+
import "./index35.js";
|
|
10
|
+
import "./index36.js";
|
|
11
|
+
import "./index37.js";
|
|
12
|
+
import "./index38.js";
|
|
13
|
+
import "./index42.js";
|
|
14
|
+
import "./index44.js";
|
|
15
|
+
import "./index45.js";
|
|
16
|
+
import "./index46.js";
|
|
17
|
+
import "./index47.js";
|
|
18
|
+
import "./index48.js";
|
|
19
|
+
import "./index49.js";
|
|
20
|
+
import "./index50.js";
|
|
21
|
+
import "./index51.js";
|
|
22
|
+
import "./index52.js";
|
|
23
|
+
import { BillPayWidget as e } from "./index56.js";
|
|
22
24
|
export { e as BillPayWidget };
|
|
@@ -2,103 +2,35 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { resolveAmountDueMinorUnits as e } from "./index2.js";
|
|
6
|
+
import { resolveVendor as t } from "./index3.js";
|
|
7
|
+
import { payBillFlowTestIds as n } from "./index4.js";
|
|
8
|
+
import { ReviewTransactionDialog as r } from "../../ui/dist/index55.js";
|
|
9
|
+
import { SchedulePaymentDialog as i } from "../../ui/dist/index59.js";
|
|
10
|
+
import "../../ui/dist/index.js";
|
|
11
|
+
import { usePayBillFlow as a } from "./index9.js";
|
|
12
|
+
import { useImperativeHandle as o } from "react";
|
|
13
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
14
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})), E(!0);
|
|
29
|
-
}, []), M = a((e) => {
|
|
30
|
-
w((t) => {
|
|
31
|
-
if (!t?.[e]) return t;
|
|
32
|
-
let n = { ...t };
|
|
33
|
-
return delete n[e], Object.keys(n).length ? n : void 0;
|
|
34
|
-
});
|
|
35
|
-
}, []), N = a((e, t) => {
|
|
36
|
-
M(e), m((n) => n.map((n) => {
|
|
37
|
-
if (n.id !== e) return n;
|
|
38
|
-
let r = {
|
|
39
|
-
...n,
|
|
40
|
-
...t
|
|
41
|
-
};
|
|
42
|
-
return "amount" in t ? r : {
|
|
43
|
-
...r,
|
|
44
|
-
amount: l(r.quantity, r.price, r.amount)
|
|
45
|
-
};
|
|
46
|
-
})), O(!0), b(void 0);
|
|
47
|
-
}, [M]), P = a((e, t) => {
|
|
48
|
-
M(e), m((n) => n.map((n) => {
|
|
49
|
-
if (n.id !== e) return n;
|
|
50
|
-
let r = Number.parseFloat(n.quantity), i = String(Math.max(1, (Number.isFinite(r) ? r : 1) + t));
|
|
51
|
-
return {
|
|
52
|
-
...n,
|
|
53
|
-
quantity: i,
|
|
54
|
-
amount: l(i, n.price, n.amount)
|
|
55
|
-
};
|
|
56
|
-
})), O(!0), b(void 0);
|
|
57
|
-
}, [M]), F = a((e) => {
|
|
58
|
-
M(e), m((t) => t.length <= 1 ? t : t.filter((t) => t.id !== e)), O(!0), b(void 0);
|
|
59
|
-
}, [M]), I = a(() => {
|
|
60
|
-
m((e) => [...e, r()]), O(!0), b(void 0);
|
|
61
|
-
}, []), L = a((e) => {
|
|
62
|
-
g(e), A(!0), b(void 0);
|
|
63
|
-
}, []), R = a((e) => {
|
|
64
|
-
v(e), A(!0), b(void 0);
|
|
65
|
-
}, []), z = a((e) => {
|
|
66
|
-
b(e), A(!0);
|
|
67
|
-
}, []), B = s(() => p.map((e) => ({
|
|
68
|
-
...e,
|
|
69
|
-
onChange: (t) => N(e.id, t),
|
|
70
|
-
onQuantityStep: (t) => P(e.id, t),
|
|
71
|
-
onRemove: () => F(e.id)
|
|
72
|
-
})), [
|
|
73
|
-
p,
|
|
74
|
-
N,
|
|
75
|
-
F,
|
|
76
|
-
P
|
|
77
|
-
]), V = s(() => e(p, _, h), [
|
|
78
|
-
p,
|
|
79
|
-
_,
|
|
80
|
-
h
|
|
81
|
-
]);
|
|
82
|
-
return {
|
|
83
|
-
values: d,
|
|
84
|
-
errors: x,
|
|
85
|
-
setErrors: S,
|
|
86
|
-
lineItemErrors: C,
|
|
87
|
-
setLineItemErrors: w,
|
|
88
|
-
onChange: j,
|
|
89
|
-
lineItems: p,
|
|
90
|
-
lineItemRows: B,
|
|
91
|
-
discount: h,
|
|
92
|
-
onDiscountChange: L,
|
|
93
|
-
tax: _,
|
|
94
|
-
onTaxChange: R,
|
|
95
|
-
total: y ?? V,
|
|
96
|
-
totalOverride: y,
|
|
97
|
-
onTotalChange: z,
|
|
98
|
-
onAddLineItem: I,
|
|
99
|
-
isTotalsDirty: k,
|
|
100
|
-
isDirty: T || D || k
|
|
101
|
-
};
|
|
15
|
+
function u({ ref: u, payable: d, poweredByBankName: f, labels: p }) {
|
|
16
|
+
let m = t(d), h = a({
|
|
17
|
+
payableId: d.id,
|
|
18
|
+
amountDueMinorUnits: e(d) ?? 0,
|
|
19
|
+
currencyCode: d.currency ?? void 0,
|
|
20
|
+
dueDate: d.due_date,
|
|
21
|
+
vendorName: m?.name,
|
|
22
|
+
vendorEmail: m?.email,
|
|
23
|
+
vendorBankAccount: m?.bank_account,
|
|
24
|
+
poweredByBankName: f,
|
|
25
|
+
labels: p
|
|
26
|
+
});
|
|
27
|
+
return o(u, () => ({ open: h.open }), [h.open]), /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(i, {
|
|
28
|
+
...h.dialogProps,
|
|
29
|
+
testId: n.scheduleDialog
|
|
30
|
+
}), /* @__PURE__ */ c(r, {
|
|
31
|
+
...h.reviewProps,
|
|
32
|
+
testId: n.reviewDialog
|
|
33
|
+
})] });
|
|
102
34
|
}
|
|
103
35
|
//#endregion
|
|
104
|
-
export { u as
|
|
36
|
+
export { u as PayBillFlow, u as default };
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var e = {
|
|
3
|
-
dialog: "bill-pay-bill-create-dialog",
|
|
4
|
-
vendorSection: "bill-pay-bill-create-vendor",
|
|
5
|
-
lineItems: "bill-pay-bill-create-line-items",
|
|
6
|
-
documentPanel: "bill-pay-bill-create-document"
|
|
7
|
-
};
|
|
8
|
-
//#endregion
|
|
9
|
-
export { e as billCreateTestIds };
|
|
1
|
+
import "./index10.js";
|