@tesouro/embedded-components-react 0.11.179 → 0.11.181
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 +22 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index.js +24 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index10.js +16 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index11.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index12.js +5 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index13.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index14.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index15.js +13 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index16.js +34 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index17.js +23 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index18.js +26 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index19.js +12 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index2.js +34 -85
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index20.js +48 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index21.js +36 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index22.js +20 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index23.js +14 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index24.js +31 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index25.js +26 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index26.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index3.js +90 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index4.js +30 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index5.js +8 -74
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index6.js +60 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index7.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index8.js +12 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index9.js +20 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index10.js +17 -36
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index11.js +42 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index12.js +89 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index13.js +5 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index14.js +15 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index15.js +103 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index16.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index17.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index18.js +7 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index19.js +11 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index20.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index21.js +22 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +14 -137
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +139 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +12 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +15 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +39 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +96 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index29.js +4 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index30.js +56 -116
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +114 -197
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +194 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +75 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +69 -111
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +108 -459
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +450 -102
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +117 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +8 -85
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +73 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +71 -246
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +251 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +38 -237
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +244 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +21 -529
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +530 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +4 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +41 -242
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +245 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index49.js +3 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index50.js +4 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index51.js +64 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index52.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index9.js +6 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index3.js +7 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index10.js +14 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index11.js +82 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index12.js +47 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index13.js +261 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +23 -251
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index15.js +450 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +286 -442
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +4 -300
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index19.js +37 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index20.js +1 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index5.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index7.js +88 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index8.js +17 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index9.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index10.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +263 -262
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/invalidatePayableQueries/approvalDecisionQueries.js +22 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/invalidatePayableQueries/invalidatePayableQueries.js +20 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/queryKeys.js +32 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/mocks/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +42 -42
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +237 -215
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +151 -135
- 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/ui/dist/index.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/AttentionStrip/AttentionStrip.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/AttentionStrip/AttentionViewBar.js +33 -0
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index21.js +0 -1
|
@@ -1,76 +1,10 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { getPayablesIdLineItems as e, putPayablesIdLineItems as t } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
-
import { getPayablesIdLineItemsOptions as n } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import { withAuthEpochInfinite as r } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
-
import { useEmbedApi as i } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
|
-
import { organizationHeaders as a } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
10
|
-
import { getAllPagesNextPaginationTokenParam as o, isAllPagesResolving as s, useAutoFetchNextPage as c } from "../../../../shared/data-access/dist/lib/allPages.js";
|
|
11
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
12
|
-
import { invalidatePayableQueries as l } from "../../../data-access/dist/lib/invalidatePayableQueries/invalidatePayableQueries.js";
|
|
13
|
-
import "../../../data-access/dist/invalidation.js";
|
|
14
|
-
import { dataOrThrowWithStatus as u } from "./index4.js";
|
|
15
|
-
import { useMemo as d } from "react";
|
|
16
|
-
import { useInfiniteQuery as f, useMutation as p } from "@tanstack/react-query";
|
|
17
1
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index5.js
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}), x = f({
|
|
26
|
-
...r(b.queryKey, {
|
|
27
|
-
authEpoch: g,
|
|
28
|
-
organizationStatus: _
|
|
29
|
-
}, { suffix: ["all"] }),
|
|
30
|
-
enabled: y,
|
|
31
|
-
initialPageParam: void 0,
|
|
32
|
-
queryFn: async ({ signal: n, pageParam: r }) => {
|
|
33
|
-
let { data: i } = await e({
|
|
34
|
-
client: u,
|
|
35
|
-
headers: v,
|
|
36
|
-
path: { payable_id: t ?? "" },
|
|
37
|
-
query: {
|
|
38
|
-
limit: m,
|
|
39
|
-
...r ? { pagination_token: r } : {}
|
|
40
|
-
},
|
|
41
|
-
signal: n,
|
|
42
|
-
throwOnError: !0
|
|
43
|
-
});
|
|
44
|
-
return i;
|
|
45
|
-
},
|
|
46
|
-
getNextPageParam: o
|
|
47
|
-
});
|
|
48
|
-
c(x, y);
|
|
49
|
-
let S = d(() => x.data?.pages.flatMap((e) => e.data ?? []) ?? [], [x.data]);
|
|
50
|
-
return {
|
|
51
|
-
...x,
|
|
52
|
-
lineItems: S,
|
|
53
|
-
isResolving: s(x)
|
|
54
|
-
};
|
|
2
|
+
async function e(e) {
|
|
3
|
+
let { data: t, error: n, response: r } = await e;
|
|
4
|
+
if (n === void 0) return t;
|
|
5
|
+
throw r && typeof n == "object" && n ? {
|
|
6
|
+
...n,
|
|
7
|
+
status: r.status
|
|
8
|
+
} : n;
|
|
55
9
|
}
|
|
56
|
-
|
|
57
|
-
let { client: e, organizationId: n } = i();
|
|
58
|
-
return p({
|
|
59
|
-
mutationFn: async ({ path: r, body: i }) => u(t({
|
|
60
|
-
client: e,
|
|
61
|
-
headers: a(n),
|
|
62
|
-
path: r,
|
|
63
|
-
body: i,
|
|
64
|
-
throwOnError: !1
|
|
65
|
-
})),
|
|
66
|
-
onSuccess: async (t, r) => {
|
|
67
|
-
await l({
|
|
68
|
-
client: e,
|
|
69
|
-
organizationId: n,
|
|
70
|
-
payableId: r.path.payable_id,
|
|
71
|
-
includeLineItems: !0
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
export { h as useAllPayableLineItemsQuery, g as useReplacePayableLineItemsMutation };
|
|
10
|
+
export { e as dataOrThrowWithStatus };
|
|
@@ -2,34 +2,75 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { getPayablesIdLineItems as e, putPayablesIdLineItems as t } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { getPayablesIdLineItemsOptions as n } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
+
import { withAuthEpochInfinite as r } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { useEmbedApi as i } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
|
+
import { organizationHeaders as a } from "../../../../shared/data-access/dist/lib/organizationHeaders.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
|
-
import { invalidatePayableQueries as
|
|
12
|
+
import { invalidatePayableQueries as l } from "../../../data-access/dist/lib/invalidatePayableQueries/invalidatePayableQueries.js";
|
|
10
13
|
import "../../../data-access/dist/invalidation.js";
|
|
11
|
-
import {
|
|
14
|
+
import { dataOrThrowWithStatus as u } from "./index5.js";
|
|
15
|
+
import { useMemo as d } from "react";
|
|
16
|
+
import { useInfiniteQuery as f, useMutation as p } from "@tanstack/react-query";
|
|
12
17
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index6.js
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
var m = 100;
|
|
19
|
+
function h(t, { enabled: l } = {}) {
|
|
20
|
+
let { client: u, organizationId: p, widgetToken: h, authEpoch: g, organizationStatus: _ } = i(), v = a(p), y = !!(p && h && t) && l !== !1, b = n({
|
|
21
|
+
client: u,
|
|
22
|
+
headers: v,
|
|
23
|
+
path: { payable_id: t ?? "" },
|
|
24
|
+
query: { limit: m }
|
|
25
|
+
}), x = f({
|
|
26
|
+
...r(b.queryKey, {
|
|
27
|
+
authEpoch: g,
|
|
28
|
+
organizationStatus: _
|
|
29
|
+
}, { suffix: ["all"] }),
|
|
30
|
+
enabled: y,
|
|
31
|
+
initialPageParam: void 0,
|
|
32
|
+
queryFn: async ({ signal: n, pageParam: r }) => {
|
|
17
33
|
let { data: i } = await e({
|
|
18
|
-
client:
|
|
19
|
-
headers:
|
|
20
|
-
path: t,
|
|
21
|
-
|
|
34
|
+
client: u,
|
|
35
|
+
headers: v,
|
|
36
|
+
path: { payable_id: t ?? "" },
|
|
37
|
+
query: {
|
|
38
|
+
limit: m,
|
|
39
|
+
...r ? { pagination_token: r } : {}
|
|
40
|
+
},
|
|
41
|
+
signal: n,
|
|
22
42
|
throwOnError: !0
|
|
23
43
|
});
|
|
24
44
|
return i;
|
|
25
45
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
46
|
+
getNextPageParam: o
|
|
47
|
+
});
|
|
48
|
+
c(x, y);
|
|
49
|
+
let S = d(() => x.data?.pages.flatMap((e) => e.data ?? []) ?? [], [x.data]);
|
|
50
|
+
return {
|
|
51
|
+
...x,
|
|
52
|
+
lineItems: S,
|
|
53
|
+
isResolving: s(x)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function g() {
|
|
57
|
+
let { client: e, organizationId: n } = i();
|
|
58
|
+
return p({
|
|
59
|
+
mutationFn: async ({ path: r, body: i }) => u(t({
|
|
60
|
+
client: e,
|
|
61
|
+
headers: a(n),
|
|
62
|
+
path: r,
|
|
63
|
+
body: i,
|
|
64
|
+
throwOnError: !1
|
|
65
|
+
})),
|
|
66
|
+
onSuccess: async (t, r) => {
|
|
67
|
+
await l({
|
|
68
|
+
client: e,
|
|
69
|
+
organizationId: n,
|
|
70
|
+
payableId: r.path.payable_id,
|
|
71
|
+
includeLineItems: !0
|
|
31
72
|
});
|
|
32
73
|
}
|
|
33
74
|
});
|
|
34
75
|
}
|
|
35
|
-
export {
|
|
76
|
+
export { h as useAllPayableLineItemsQuery, g as useReplacePayableLineItemsMutation };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { postPayablesIdAttachFile as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { useEmbedApi as t } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
7
|
import { organizationHeaders as n } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
8
8
|
import "../../../../shared/data-access/dist/index.js";
|
|
@@ -13,14 +13,15 @@ import { useMutation as i } from "@tanstack/react-query";
|
|
|
13
13
|
function a() {
|
|
14
14
|
let { client: a, organizationId: o } = t();
|
|
15
15
|
return i({
|
|
16
|
-
mutationFn: async ({ path: t }) => {
|
|
17
|
-
let { data:
|
|
16
|
+
mutationFn: async ({ path: t, file: r }) => {
|
|
17
|
+
let { data: i } = await e({
|
|
18
18
|
client: a,
|
|
19
19
|
headers: n(o),
|
|
20
20
|
path: t,
|
|
21
|
+
body: { file: r },
|
|
21
22
|
throwOnError: !0
|
|
22
23
|
});
|
|
23
|
-
return
|
|
24
|
+
return i;
|
|
24
25
|
},
|
|
25
26
|
onSuccess: async (e, t) => {
|
|
26
27
|
await r({
|
|
@@ -31,4 +32,4 @@ function a() {
|
|
|
31
32
|
}
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
|
-
export { a as
|
|
35
|
+
export { a as useAttachPayableFileMutation };
|
|
@@ -2,22 +2,21 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { postPayablesIdCancel as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { useEmbedApi as t } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
7
|
import { organizationHeaders as n } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
8
8
|
import "../../../../shared/data-access/dist/index.js";
|
|
9
9
|
import { invalidatePayableQueries as r } from "../../../data-access/dist/lib/invalidatePayableQueries/invalidatePayableQueries.js";
|
|
10
|
-
import { reconcileCancelledPaymentQueries as i } from "../../../data-access/dist/lib/invalidatePayableQueries/reconcileCancelledPaymentQueries.js";
|
|
11
10
|
import "../../../data-access/dist/invalidation.js";
|
|
12
|
-
import { useMutation as
|
|
11
|
+
import { useMutation as i } from "@tanstack/react-query";
|
|
13
12
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index8.js
|
|
14
|
-
function
|
|
15
|
-
let { client:
|
|
16
|
-
return
|
|
13
|
+
function a() {
|
|
14
|
+
let { client: a, organizationId: o } = t();
|
|
15
|
+
return i({
|
|
17
16
|
mutationFn: async ({ path: t }) => {
|
|
18
17
|
let { data: r } = await e({
|
|
19
|
-
client:
|
|
20
|
-
headers: n(
|
|
18
|
+
client: a,
|
|
19
|
+
headers: n(o),
|
|
21
20
|
path: t,
|
|
22
21
|
throwOnError: !0
|
|
23
22
|
});
|
|
@@ -25,15 +24,11 @@ function o() {
|
|
|
25
24
|
},
|
|
26
25
|
onSuccess: async (e, t) => {
|
|
27
26
|
await r({
|
|
28
|
-
client:
|
|
29
|
-
organizationId:
|
|
30
|
-
payableId: t.
|
|
31
|
-
})
|
|
32
|
-
client: o,
|
|
33
|
-
organizationId: s,
|
|
34
|
-
payableId: t.payableId
|
|
35
|
-
}).catch(() => {});
|
|
27
|
+
client: a,
|
|
28
|
+
organizationId: o,
|
|
29
|
+
payableId: t.path.payable_id
|
|
30
|
+
});
|
|
36
31
|
}
|
|
37
32
|
});
|
|
38
33
|
}
|
|
39
|
-
export {
|
|
34
|
+
export { a as useCancelPayableMutation };
|
|
@@ -2,30 +2,38 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { postPaymentIntentsIdCancel as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { useEmbedApi as t } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
7
|
import { organizationHeaders as n } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
8
8
|
import "../../../../shared/data-access/dist/index.js";
|
|
9
9
|
import { invalidatePayableQueries as r } from "../../../data-access/dist/lib/invalidatePayableQueries/invalidatePayableQueries.js";
|
|
10
|
+
import { reconcileCancelledPaymentQueries as i } from "../../../data-access/dist/lib/invalidatePayableQueries/reconcileCancelledPaymentQueries.js";
|
|
10
11
|
import "../../../data-access/dist/invalidation.js";
|
|
11
|
-
import { dataOrThrowWithStatus as i } from "./index4.js";
|
|
12
12
|
import { useMutation as a } from "@tanstack/react-query";
|
|
13
13
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index9.js
|
|
14
14
|
function o() {
|
|
15
15
|
let { client: o, organizationId: s } = t();
|
|
16
16
|
return a({
|
|
17
|
-
mutationFn: async ({
|
|
18
|
-
|
|
19
|
-
headers: n(s),
|
|
20
|
-
body: t,
|
|
21
|
-
throwOnError: !1
|
|
22
|
-
})),
|
|
23
|
-
onSuccess: async () => {
|
|
24
|
-
await r({
|
|
17
|
+
mutationFn: async ({ path: t }) => {
|
|
18
|
+
let { data: r } = await e({
|
|
25
19
|
client: o,
|
|
26
|
-
|
|
20
|
+
headers: n(s),
|
|
21
|
+
path: t,
|
|
22
|
+
throwOnError: !0
|
|
27
23
|
});
|
|
24
|
+
return r;
|
|
25
|
+
},
|
|
26
|
+
onSuccess: async (e, t) => {
|
|
27
|
+
await r({
|
|
28
|
+
client: o,
|
|
29
|
+
organizationId: s,
|
|
30
|
+
payableId: t.payableId
|
|
31
|
+
}), i({
|
|
32
|
+
client: o,
|
|
33
|
+
organizationId: s,
|
|
34
|
+
payableId: t.payableId
|
|
35
|
+
}).catch(() => {});
|
|
28
36
|
}
|
|
29
37
|
});
|
|
30
38
|
}
|
|
31
|
-
export { o as
|
|
39
|
+
export { o as useCancelScheduledPaymentMutation };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./index44.js";
|
|
1
|
+
import "./index27.js";
|
|
2
|
+
import "./index32.js";
|
|
3
|
+
import "./index41.js";
|
|
4
|
+
import "./index43.js";
|
|
6
5
|
import "./index45.js";
|
|
7
6
|
import "./index46.js";
|
|
8
7
|
import "./index47.js";
|
|
9
8
|
import "./index48.js";
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
import "./index49.js";
|
|
10
|
+
export { BillDetailsWidget, BillDialogWidget } from "./index51.js";
|
|
11
|
+
import "./index52.js";
|
|
@@ -1,39 +1,20 @@
|
|
|
1
1
|
import { ApprovalPoliciesSettingsDefaultLabels as e } from "../../../../shared/approval-policy/feature/dist/lib/labels.js";
|
|
2
|
-
import { parseApprovalPolicyScript as t } from "../../../../shared/approval-policy/util/dist/lib/policyScript.js";
|
|
3
|
-
import { parseApprovalPolicyTrigger as n } from "../../../../shared/approval-policy/util/dist/lib/policyTrigger.js";
|
|
4
|
-
import { buildPolicySentence as r, buildPolicyTitle as i } from "../../../../shared/approval-policy/feature/dist/lib/policyViewModel.js";
|
|
5
2
|
import "../../../../shared/approval-policy/feature/dist/index.js";
|
|
6
3
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index10.js
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
if (!d.length) return;
|
|
27
|
-
let { condition: f, hasKnownAmountBounds: p } = n(a.trigger);
|
|
28
|
-
if (!p) return;
|
|
29
|
-
let m = {
|
|
30
|
-
...e,
|
|
31
|
-
...l
|
|
32
|
-
};
|
|
33
|
-
return {
|
|
34
|
-
title: i(f, m),
|
|
35
|
-
sentence: r(f, m),
|
|
36
|
-
steps: d
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
export { a as buildApprovalPolicyCardView };
|
|
4
|
+
var t = {
|
|
5
|
+
deletedBadge: "Deleted",
|
|
6
|
+
deletedNote: "This rule was deleted after this bill was submitted.",
|
|
7
|
+
deletedApprovalsNote: "The approvals below still apply to this bill.",
|
|
8
|
+
noRuleTitle: "No approval rule",
|
|
9
|
+
noRuleSentence: "No rule covered this bill when it was submitted.",
|
|
10
|
+
approvalProgress: "{approved} of {required} approvals in",
|
|
11
|
+
ruleTitleRange: e.ruleTitleRange,
|
|
12
|
+
ruleTitleUpTo: e.ruleTitleUpTo,
|
|
13
|
+
ruleTitleFrom: e.ruleTitleFrom,
|
|
14
|
+
ruleTitleAny: e.ruleTitleAny,
|
|
15
|
+
ruleSentenceRange: e.ruleSentenceRange,
|
|
16
|
+
ruleSentenceUpTo: e.ruleSentenceUpTo,
|
|
17
|
+
ruleSentenceFrom: e.ruleSentenceFrom,
|
|
18
|
+
ruleSentenceAny: e.ruleSentenceAny
|
|
19
|
+
};
|
|
20
|
+
export { t as APPROVAL_POLICY_RULE_COPY_EN };
|
|
@@ -1,60 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ApprovalPoliciesSettingsDefaultLabels as e } from "../../../../shared/approval-policy/feature/dist/lib/labels.js";
|
|
2
|
+
import { parseApprovalPolicyScript as t } from "../../../../shared/approval-policy/util/dist/lib/policyScript.js";
|
|
3
|
+
import { parseApprovalPolicyTrigger as n } from "../../../../shared/approval-policy/util/dist/lib/policyTrigger.js";
|
|
4
|
+
import { buildPolicySentence as r, buildPolicyTitle as i } from "../../../../shared/approval-policy/feature/dist/lib/policyViewModel.js";
|
|
5
|
+
import "../../../../shared/approval-policy/feature/dist/index.js";
|
|
3
6
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index11.js
|
|
4
|
-
function
|
|
5
|
-
let
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
let f = i?.find((e) => e.id === n), p = f ? t({
|
|
18
|
-
policy: f,
|
|
19
|
-
lookup: s,
|
|
20
|
-
approvedUserIds: c,
|
|
21
|
-
approvedRoleIds: l,
|
|
22
|
-
copy: u
|
|
23
|
-
}) : void 0;
|
|
24
|
-
if (p) return {
|
|
25
|
-
source: "live",
|
|
26
|
-
view: p
|
|
27
|
-
};
|
|
28
|
-
let m = !!i && !f, h = r(o, s), g = h.length ? `${d.deletedNote} ${d.deletedApprovalsNote}` : d.deletedNote;
|
|
29
|
-
if (a || m || h.length) return {
|
|
30
|
-
source: "snapshot",
|
|
31
|
-
view: {
|
|
32
|
-
title: a,
|
|
33
|
-
...m ? {
|
|
34
|
-
badge: d.deletedBadge,
|
|
35
|
-
note: g
|
|
36
|
-
} : {},
|
|
37
|
-
steps: h
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function r(e, t) {
|
|
42
|
-
let n = [];
|
|
43
|
-
for (let [r, i] of [...e].reverse().entries()) {
|
|
44
|
-
let e = i.approved_by ?? [], a = i.user_ids ?? [], o = e.filter((e) => !a.includes(e)), s = [];
|
|
45
|
-
for (let n of [...i.role_ids ?? [], ...a]) {
|
|
46
|
-
let r = t.get(n);
|
|
47
|
-
r && s.push({
|
|
48
|
-
id: n,
|
|
49
|
-
label: r.label,
|
|
50
|
-
approved: r.kind === "user" ? e.includes(n) : o.length >= (i.required_approval_count ?? 1)
|
|
7
|
+
function a({ policy: e, lookup: n, approvedUserIds: r, approvedRoleIds: i, copy: a }) {
|
|
8
|
+
let s = t(e.script);
|
|
9
|
+
if (!s.groups.length || !s.isSupported) return;
|
|
10
|
+
let c = [];
|
|
11
|
+
for (let [e, t] of s.groups.entries()) {
|
|
12
|
+
let a = [];
|
|
13
|
+
for (let e of [...t.roleIds, ...t.userIds]) {
|
|
14
|
+
let t = n.get(e);
|
|
15
|
+
t && a.push({
|
|
16
|
+
id: e,
|
|
17
|
+
label: t.label,
|
|
18
|
+
approved: t.kind === "user" ? r.has(e) : !!i?.has(e)
|
|
51
19
|
});
|
|
52
20
|
}
|
|
53
|
-
|
|
54
|
-
id: `
|
|
55
|
-
chips:
|
|
21
|
+
a.length && c.push({
|
|
22
|
+
id: `group-${e + 1}`,
|
|
23
|
+
chips: a
|
|
56
24
|
});
|
|
57
25
|
}
|
|
58
|
-
return
|
|
26
|
+
if (!c.length) return;
|
|
27
|
+
let l = o({
|
|
28
|
+
trigger: e.trigger,
|
|
29
|
+
copy: a
|
|
30
|
+
});
|
|
31
|
+
return l ? {
|
|
32
|
+
...l,
|
|
33
|
+
steps: c
|
|
34
|
+
} : void 0;
|
|
35
|
+
}
|
|
36
|
+
function o({ trigger: t, copy: a }) {
|
|
37
|
+
let { condition: o, hasKnownAmountBounds: s } = n(t);
|
|
38
|
+
if (!s) return;
|
|
39
|
+
let c = {
|
|
40
|
+
...e,
|
|
41
|
+
...a
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
title: i(o, c),
|
|
45
|
+
sentence: r(o, c)
|
|
46
|
+
};
|
|
59
47
|
}
|
|
60
|
-
export {
|
|
48
|
+
export { a as buildApprovalPolicyCardView, o as buildApprovalPolicyHeading };
|
|
@@ -1,8 +1,91 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
1
|
+
import { formatLabel as e } from "../../../../shared/approval-policy/feature/dist/lib/labels.js";
|
|
2
|
+
import "../../../../shared/approval-policy/feature/dist/index.js";
|
|
3
|
+
import { APPROVAL_POLICY_RULE_COPY_EN as t } from "./index10.js";
|
|
4
|
+
import { buildApprovalPolicyCardView as n, buildApprovalPolicyHeading as r } from "./index11.js";
|
|
3
5
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index12.js
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
var i = /* @__PURE__ */ new Set(["waiting", "not_started"]);
|
|
7
|
+
function a({ approvalPolicyId: e, livePolicies: a, snapshotPolicyName: s, routedSteps: c, currentRound: l, lookup: u, approvedUserIds: d, approvedRoleIds: f, copy: p }) {
|
|
8
|
+
let m = {
|
|
9
|
+
...t,
|
|
10
|
+
...p
|
|
11
|
+
};
|
|
12
|
+
if (!e) return {
|
|
13
|
+
source: "none",
|
|
14
|
+
view: {
|
|
15
|
+
title: m.noRuleTitle,
|
|
16
|
+
sentence: m.noRuleSentence,
|
|
17
|
+
steps: []
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
let h = a?.find((t) => t.id === e);
|
|
21
|
+
if (h && c) {
|
|
22
|
+
let e = o(c, u, "step", m);
|
|
23
|
+
if (e.length) return {
|
|
24
|
+
source: "routed",
|
|
25
|
+
view: {
|
|
26
|
+
...r({
|
|
27
|
+
trigger: h.trigger,
|
|
28
|
+
copy: p
|
|
29
|
+
}) ?? { title: s },
|
|
30
|
+
steps: e.map(({ step: e }) => e)
|
|
31
|
+
},
|
|
32
|
+
pendingApprovers: e.filter(({ record: e }) => i.has(e.status ?? "")).map(({ step: e }) => ({
|
|
33
|
+
id: e.id,
|
|
34
|
+
names: e.chips.filter((e) => !e.approved).map((e) => e.label)
|
|
35
|
+
})).filter((e) => e.names.length > 0)
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
let g = h ? n({
|
|
39
|
+
policy: h,
|
|
40
|
+
lookup: u,
|
|
41
|
+
approvedUserIds: d,
|
|
42
|
+
approvedRoleIds: f,
|
|
43
|
+
copy: p
|
|
44
|
+
}) : void 0;
|
|
45
|
+
if (g) return {
|
|
46
|
+
source: "live",
|
|
47
|
+
view: g
|
|
48
|
+
};
|
|
49
|
+
let _ = !!a && !h, v = o([...l].reverse(), u, "request", m).map(({ step: e }) => e), y = v.length ? `${m.deletedNote} ${m.deletedApprovalsNote}` : m.deletedNote;
|
|
50
|
+
if (s || _ || v.length) return {
|
|
51
|
+
source: "snapshot",
|
|
52
|
+
view: {
|
|
53
|
+
title: s,
|
|
54
|
+
..._ ? {
|
|
55
|
+
badge: m.deletedBadge,
|
|
56
|
+
note: y
|
|
57
|
+
} : {},
|
|
58
|
+
steps: v
|
|
59
|
+
}
|
|
60
|
+
};
|
|
7
61
|
}
|
|
8
|
-
|
|
62
|
+
function o(t, n, r, i) {
|
|
63
|
+
let a = [];
|
|
64
|
+
for (let [o, s] of t.entries()) {
|
|
65
|
+
let t = s.approved_by ?? [], c = s.user_ids ?? [], l = s.required_approval_count ?? 1, u = t.filter((e) => !c.includes(e)).length >= l, d = [];
|
|
66
|
+
for (let e of [...s.role_ids ?? [], ...c]) {
|
|
67
|
+
let r = n.get(e);
|
|
68
|
+
r && d.push({
|
|
69
|
+
id: e,
|
|
70
|
+
label: r.label,
|
|
71
|
+
approved: r.kind === "user" ? t.includes(e) : u
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
if (d.length) {
|
|
75
|
+
let n = l > 1 ? e(i.approvalProgress, {
|
|
76
|
+
approved: String(Math.min(t.length, l)),
|
|
77
|
+
required: String(l)
|
|
78
|
+
}) : void 0;
|
|
79
|
+
a.push({
|
|
80
|
+
step: {
|
|
81
|
+
id: `${r}-${o + 1}`,
|
|
82
|
+
chips: d,
|
|
83
|
+
...n ? { caption: n } : {}
|
|
84
|
+
},
|
|
85
|
+
record: s
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return a;
|
|
90
|
+
}
|
|
91
|
+
export { a as resolveApprovalPolicySection };
|
|
@@ -1,24 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { usePayableHistoryQuery as e } from "../../data-access/dist/index3.js";
|
|
1
|
+
import { policyAssignmentDeadline as e, policyAssignmentFirstSeenAt as t } from "../../data-access/dist/index22.js";
|
|
6
2
|
import "../../data-access/dist/index.js";
|
|
7
3
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index13.js
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
for (let e of o.data?.data ?? []) e.event_type === t ? s = e.timestamp : e.event_type === n && (c = i(e.event_data));
|
|
12
|
-
return {
|
|
13
|
-
roundStartedAt: s,
|
|
14
|
-
snapshotPolicyName: c,
|
|
15
|
-
isLoading: o.isLoading,
|
|
16
|
-
isError: o.isError
|
|
17
|
-
};
|
|
4
|
+
function n(n, r) {
|
|
5
|
+
let i = e(n, t(n));
|
|
6
|
+
return i !== void 0 && (r ?? 0) < i;
|
|
18
7
|
}
|
|
19
|
-
|
|
20
|
-
if (!e || typeof e != "object" || !("approval_policy_name" in e)) return;
|
|
21
|
-
let t = e.approval_policy_name;
|
|
22
|
-
return typeof t == "string" && t ? t : void 0;
|
|
23
|
-
}
|
|
24
|
-
export { r as usePayableApprovalRoundStart };
|
|
8
|
+
export { n as isAwaitingPolicyAssignment };
|