@tesouro/embedded-components-react 0.5.176 → 0.5.178
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/bank-accounts-widget/data-access/dist/index5.js +47 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +36 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +31 -30
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js +17 -20
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js +28 -30
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js +20 -23
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js +31 -33
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js +29 -31
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js +36 -38
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js +29 -31
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js +36 -38
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +47 -46
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +33 -33
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js +27 -29
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +28 -27
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +38 -37
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +31 -30
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +33 -32
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js
CHANGED
|
@@ -4,37 +4,35 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getUsers as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { getUsersOptions as t } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { authEpochPlaceholder as n } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { useEmbedApi as r } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
|
+
import { organizationHeaders as i } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
10
|
+
import { getAllPagesNextPageParam as a, useAutoFetchNextPage as o } from "../../../../shared/data-access/dist/lib/allPages.js";
|
|
10
11
|
import "../../../../shared/data-access/dist/index.js";
|
|
11
|
-
import { useMemo as
|
|
12
|
-
import { useInfiniteQuery as
|
|
12
|
+
import { useMemo as s } from "react";
|
|
13
|
+
import { useInfiniteQuery as c } from "@tanstack/react-query";
|
|
13
14
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
let { client:
|
|
17
|
-
client:
|
|
18
|
-
headers:
|
|
15
|
+
var l = 100;
|
|
16
|
+
function u({ Status: u, enabled: d } = {}) {
|
|
17
|
+
let { client: f, organizationId: p, widgetToken: m, authEpoch: h, organizationPending: g } = r(), _ = i(p), v = !!(p && m) && (d === !0 || d === void 0), y = [...t({
|
|
18
|
+
client: f,
|
|
19
|
+
headers: _,
|
|
19
20
|
query: {
|
|
20
|
-
Limit:
|
|
21
|
-
...
|
|
21
|
+
Limit: l,
|
|
22
|
+
...u ? { Status: u } : {}
|
|
22
23
|
}
|
|
23
|
-
}),
|
|
24
|
-
queryKey: [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{ authEpoch: m }
|
|
28
|
-
],
|
|
29
|
-
enabled: g,
|
|
24
|
+
}).queryKey, "all"], b = c({
|
|
25
|
+
queryKey: [...y, { authEpoch: h }],
|
|
26
|
+
placeholderData: n(y, g),
|
|
27
|
+
enabled: v,
|
|
30
28
|
initialPageParam: void 0,
|
|
31
29
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
32
30
|
let { data: r } = await e({
|
|
33
|
-
client:
|
|
34
|
-
headers:
|
|
31
|
+
client: f,
|
|
32
|
+
headers: _,
|
|
35
33
|
query: {
|
|
36
|
-
Limit:
|
|
37
|
-
...
|
|
34
|
+
Limit: l,
|
|
35
|
+
...u ? { Status: u } : {},
|
|
38
36
|
...n ? { PaginationToken: n } : {}
|
|
39
37
|
},
|
|
40
38
|
signal: t,
|
|
@@ -42,21 +40,21 @@ function l({ Status: l, enabled: u } = {}) {
|
|
|
42
40
|
});
|
|
43
41
|
return r;
|
|
44
42
|
},
|
|
45
|
-
getNextPageParam:
|
|
43
|
+
getNextPageParam: a
|
|
46
44
|
});
|
|
47
|
-
|
|
48
|
-
let
|
|
49
|
-
if (
|
|
50
|
-
data:
|
|
45
|
+
o(b, v);
|
|
46
|
+
let x = s(() => {
|
|
47
|
+
if (b.data) return {
|
|
48
|
+
data: b.data.pages.flatMap((e) => e.data ?? []),
|
|
51
49
|
nextPaginationToken: null,
|
|
52
50
|
prevPaginationToken: null
|
|
53
51
|
};
|
|
54
|
-
}, [
|
|
52
|
+
}, [b.data]), S = b.isSuccess && !b.hasNextPage && !b.isFetchingNextPage;
|
|
55
53
|
return {
|
|
56
|
-
...
|
|
57
|
-
data:
|
|
58
|
-
isComplete:
|
|
54
|
+
...b,
|
|
55
|
+
data: x,
|
|
56
|
+
isComplete: S
|
|
59
57
|
};
|
|
60
58
|
}
|
|
61
59
|
//#endregion
|
|
62
|
-
export {
|
|
60
|
+
export { u as useAllTeamMembersQuery };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js
CHANGED
|
@@ -4,33 +4,31 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { listDepartments as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { listDepartmentsOptions as t } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { authEpochPlaceholder as n } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { useEmbedApi as r } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
|
+
import { organizationHeaders as i } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
10
|
+
import { getAllPagesNextPageParam as a, useAutoFetchNextPage as o } from "../../../../shared/data-access/dist/lib/allPages.js";
|
|
10
11
|
import "../../../../shared/data-access/dist/index.js";
|
|
11
|
-
import { useMemo as
|
|
12
|
-
import { useInfiniteQuery as
|
|
12
|
+
import { useMemo as s } from "react";
|
|
13
|
+
import { useInfiniteQuery as c } from "@tanstack/react-query";
|
|
13
14
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
let { client:
|
|
17
|
-
client:
|
|
18
|
-
headers:
|
|
19
|
-
query: { limit:
|
|
20
|
-
}),
|
|
21
|
-
queryKey: [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{ authEpoch: p }
|
|
25
|
-
],
|
|
26
|
-
enabled: h,
|
|
15
|
+
var l = 100;
|
|
16
|
+
function u({ enabled: u } = {}) {
|
|
17
|
+
let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationPending: h } = r(), g = i(f), _ = !!(f && p) && (u === !0 || u === void 0), v = [...t({
|
|
18
|
+
client: d,
|
|
19
|
+
headers: g,
|
|
20
|
+
query: { limit: l }
|
|
21
|
+
}).queryKey, "all"], y = c({
|
|
22
|
+
queryKey: [...v, { authEpoch: m }],
|
|
23
|
+
placeholderData: n(v, h),
|
|
24
|
+
enabled: _,
|
|
27
25
|
initialPageParam: void 0,
|
|
28
26
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
29
27
|
let { data: r } = await e({
|
|
30
|
-
client:
|
|
31
|
-
headers:
|
|
28
|
+
client: d,
|
|
29
|
+
headers: g,
|
|
32
30
|
query: {
|
|
33
|
-
limit:
|
|
31
|
+
limit: l,
|
|
34
32
|
...n ? { paginationToken: n } : {}
|
|
35
33
|
},
|
|
36
34
|
signal: t,
|
|
@@ -38,21 +36,21 @@ function l({ enabled: l } = {}) {
|
|
|
38
36
|
});
|
|
39
37
|
return r;
|
|
40
38
|
},
|
|
41
|
-
getNextPageParam:
|
|
39
|
+
getNextPageParam: a
|
|
42
40
|
});
|
|
43
|
-
|
|
44
|
-
let
|
|
45
|
-
if (
|
|
46
|
-
data:
|
|
41
|
+
o(y, _);
|
|
42
|
+
let b = s(() => {
|
|
43
|
+
if (y.data) return {
|
|
44
|
+
data: y.data.pages.flatMap((e) => e.data ?? []),
|
|
47
45
|
nextPaginationToken: null,
|
|
48
46
|
prevPaginationToken: null
|
|
49
47
|
};
|
|
50
|
-
}, [
|
|
48
|
+
}, [y.data]), x = y.isSuccess && !y.hasNextPage && !y.isFetchingNextPage;
|
|
51
49
|
return {
|
|
52
|
-
...
|
|
53
|
-
data:
|
|
54
|
-
isComplete:
|
|
50
|
+
...y,
|
|
51
|
+
data: b,
|
|
52
|
+
isComplete: x
|
|
55
53
|
};
|
|
56
54
|
}
|
|
57
55
|
//#endregion
|
|
58
|
-
export {
|
|
56
|
+
export { u as useAllDepartmentsQuery };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js
CHANGED
|
@@ -4,34 +4,32 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getDepartment as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { getDepartmentOptions as t } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { authEpochPlaceholder as n } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { useEmbedApi as r } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
|
+
import { organizationHeaders as i } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
10
|
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { useEffect as
|
|
11
|
-
import { useInfiniteQuery as
|
|
11
|
+
import { useEffect as a, useMemo as o } from "react";
|
|
12
|
+
import { useInfiniteQuery as s } from "@tanstack/react-query";
|
|
12
13
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
let { client:
|
|
16
|
-
path: { departmentId:
|
|
17
|
-
client:
|
|
18
|
-
headers:
|
|
19
|
-
query: { limit:
|
|
20
|
-
}),
|
|
21
|
-
queryKey: [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{ authEpoch: p }
|
|
25
|
-
],
|
|
26
|
-
enabled: h,
|
|
14
|
+
var c = 100;
|
|
15
|
+
function l({ departmentId: l, enabled: u }) {
|
|
16
|
+
let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationPending: h } = r(), g = i(f), _ = !!(f && p && l) && (u === !0 || u === void 0), v = [...t({
|
|
17
|
+
path: { departmentId: l ?? "" },
|
|
18
|
+
client: d,
|
|
19
|
+
headers: g,
|
|
20
|
+
query: { limit: c }
|
|
21
|
+
}).queryKey, "all-members"], y = s({
|
|
22
|
+
queryKey: [...v, { authEpoch: m }],
|
|
23
|
+
placeholderData: n(v, h),
|
|
24
|
+
enabled: _,
|
|
27
25
|
initialPageParam: void 0,
|
|
28
26
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
29
27
|
let { data: r } = await e({
|
|
30
|
-
client:
|
|
31
|
-
headers:
|
|
32
|
-
path: { departmentId:
|
|
28
|
+
client: d,
|
|
29
|
+
headers: g,
|
|
30
|
+
path: { departmentId: l ?? "" },
|
|
33
31
|
query: {
|
|
34
|
-
limit:
|
|
32
|
+
limit: c,
|
|
35
33
|
...n ? { paginationToken: n } : {}
|
|
36
34
|
},
|
|
37
35
|
signal: t,
|
|
@@ -44,19 +42,19 @@ function c({ departmentId: c, enabled: l }) {
|
|
|
44
42
|
if (!(i === void 0 || r.includes(i))) return i;
|
|
45
43
|
}
|
|
46
44
|
});
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
a(() => {
|
|
46
|
+
_ && y.hasNextPage && !y.isFetchingNextPage && !y.isError && y.fetchNextPage();
|
|
49
47
|
}, [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
_,
|
|
49
|
+
y.hasNextPage,
|
|
50
|
+
y.isFetchingNextPage,
|
|
51
|
+
y.isError,
|
|
52
|
+
y.fetchNextPage,
|
|
53
|
+
y
|
|
56
54
|
]);
|
|
57
|
-
let
|
|
58
|
-
if (!
|
|
59
|
-
let e =
|
|
55
|
+
let b = y.isSuccess && !y.hasNextPage && !y.isFetchingNextPage, x = o(() => {
|
|
56
|
+
if (!y.data || !b) return;
|
|
57
|
+
let e = y.data.pages, t = e[e.length - 1], n = e.flatMap((e) => e.members?.data ?? []);
|
|
60
58
|
return {
|
|
61
59
|
...t,
|
|
62
60
|
members: {
|
|
@@ -65,12 +63,12 @@ function c({ departmentId: c, enabled: l }) {
|
|
|
65
63
|
nextPaginationToken: null
|
|
66
64
|
}
|
|
67
65
|
};
|
|
68
|
-
}, [
|
|
66
|
+
}, [y.data, b]);
|
|
69
67
|
return {
|
|
70
|
-
...
|
|
71
|
-
data:
|
|
72
|
-
isComplete:
|
|
68
|
+
...y,
|
|
69
|
+
data: x,
|
|
70
|
+
isComplete: b
|
|
73
71
|
};
|
|
74
72
|
}
|
|
75
73
|
//#endregion
|
|
76
|
-
export {
|
|
74
|
+
export { l as useDepartmentMembersQuery };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js
CHANGED
|
@@ -4,33 +4,31 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { listLocations as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { listLocationsOptions as t } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { authEpochPlaceholder as n } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { useEmbedApi as r } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
|
+
import { organizationHeaders as i } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
10
|
+
import { getAllPagesNextPageParam as a, useAutoFetchNextPage as o } from "../../../../shared/data-access/dist/lib/allPages.js";
|
|
10
11
|
import "../../../../shared/data-access/dist/index.js";
|
|
11
|
-
import { useMemo as
|
|
12
|
-
import { useInfiniteQuery as
|
|
12
|
+
import { useMemo as s } from "react";
|
|
13
|
+
import { useInfiniteQuery as c } from "@tanstack/react-query";
|
|
13
14
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
let { client:
|
|
17
|
-
client:
|
|
18
|
-
headers:
|
|
19
|
-
query: { limit:
|
|
20
|
-
}),
|
|
21
|
-
queryKey: [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{ authEpoch: p }
|
|
25
|
-
],
|
|
26
|
-
enabled: h,
|
|
15
|
+
var l = 100;
|
|
16
|
+
function u({ enabled: u } = {}) {
|
|
17
|
+
let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationPending: h } = r(), g = i(f), _ = !!(f && p) && (u === !0 || u === void 0), v = [...t({
|
|
18
|
+
client: d,
|
|
19
|
+
headers: g,
|
|
20
|
+
query: { limit: l }
|
|
21
|
+
}).queryKey, "all"], y = c({
|
|
22
|
+
queryKey: [...v, { authEpoch: m }],
|
|
23
|
+
placeholderData: n(v, h),
|
|
24
|
+
enabled: _,
|
|
27
25
|
initialPageParam: void 0,
|
|
28
26
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
29
27
|
let { data: r } = await e({
|
|
30
|
-
client:
|
|
31
|
-
headers:
|
|
28
|
+
client: d,
|
|
29
|
+
headers: g,
|
|
32
30
|
query: {
|
|
33
|
-
limit:
|
|
31
|
+
limit: l,
|
|
34
32
|
...n ? { paginationToken: n } : {}
|
|
35
33
|
},
|
|
36
34
|
signal: t,
|
|
@@ -38,21 +36,21 @@ function l({ enabled: l } = {}) {
|
|
|
38
36
|
});
|
|
39
37
|
return r;
|
|
40
38
|
},
|
|
41
|
-
getNextPageParam:
|
|
39
|
+
getNextPageParam: a
|
|
42
40
|
});
|
|
43
|
-
|
|
44
|
-
let
|
|
45
|
-
if (
|
|
46
|
-
data:
|
|
41
|
+
o(y, _);
|
|
42
|
+
let b = s(() => {
|
|
43
|
+
if (y.data) return {
|
|
44
|
+
data: y.data.pages.flatMap((e) => e.data ?? []),
|
|
47
45
|
nextPaginationToken: null,
|
|
48
46
|
prevPaginationToken: null
|
|
49
47
|
};
|
|
50
|
-
}, [
|
|
48
|
+
}, [y.data]), x = y.isSuccess && !y.hasNextPage && !y.isFetchingNextPage;
|
|
51
49
|
return {
|
|
52
|
-
...
|
|
53
|
-
data:
|
|
54
|
-
isComplete:
|
|
50
|
+
...y,
|
|
51
|
+
data: b,
|
|
52
|
+
isComplete: x
|
|
55
53
|
};
|
|
56
54
|
}
|
|
57
55
|
//#endregion
|
|
58
|
-
export {
|
|
56
|
+
export { u as useAllLocationsQuery };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js
CHANGED
|
@@ -4,34 +4,32 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getLocation as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { getLocationOptions as t } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { authEpochPlaceholder as n } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { useEmbedApi as r } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
9
|
+
import { organizationHeaders as i } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
10
|
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { useEffect as
|
|
11
|
-
import { useInfiniteQuery as
|
|
11
|
+
import { useEffect as a, useMemo as o } from "react";
|
|
12
|
+
import { useInfiniteQuery as s } from "@tanstack/react-query";
|
|
12
13
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
let { client:
|
|
16
|
-
path: { locationId:
|
|
17
|
-
client:
|
|
18
|
-
headers:
|
|
19
|
-
query: { limit:
|
|
20
|
-
}),
|
|
21
|
-
queryKey: [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{ authEpoch: p }
|
|
25
|
-
],
|
|
26
|
-
enabled: h,
|
|
14
|
+
var c = 100;
|
|
15
|
+
function l({ locationId: l, enabled: u }) {
|
|
16
|
+
let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationPending: h } = r(), g = i(f), _ = !!(f && p && l) && (u === !0 || u === void 0), v = [...t({
|
|
17
|
+
path: { locationId: l ?? "" },
|
|
18
|
+
client: d,
|
|
19
|
+
headers: g,
|
|
20
|
+
query: { limit: c }
|
|
21
|
+
}).queryKey, "all-members"], y = s({
|
|
22
|
+
queryKey: [...v, { authEpoch: m }],
|
|
23
|
+
placeholderData: n(v, h),
|
|
24
|
+
enabled: _,
|
|
27
25
|
initialPageParam: void 0,
|
|
28
26
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
29
27
|
let { data: r } = await e({
|
|
30
|
-
client:
|
|
31
|
-
headers:
|
|
32
|
-
path: { locationId:
|
|
28
|
+
client: d,
|
|
29
|
+
headers: g,
|
|
30
|
+
path: { locationId: l ?? "" },
|
|
33
31
|
query: {
|
|
34
|
-
limit:
|
|
32
|
+
limit: c,
|
|
35
33
|
...n ? { paginationToken: n } : {}
|
|
36
34
|
},
|
|
37
35
|
signal: t,
|
|
@@ -44,19 +42,19 @@ function c({ locationId: c, enabled: l }) {
|
|
|
44
42
|
if (!(i === void 0 || r.includes(i))) return i;
|
|
45
43
|
}
|
|
46
44
|
});
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
a(() => {
|
|
46
|
+
_ && y.hasNextPage && !y.isFetchingNextPage && !y.isError && y.fetchNextPage();
|
|
49
47
|
}, [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
_,
|
|
49
|
+
y.hasNextPage,
|
|
50
|
+
y.isFetchingNextPage,
|
|
51
|
+
y.isError,
|
|
52
|
+
y.fetchNextPage,
|
|
53
|
+
y
|
|
56
54
|
]);
|
|
57
|
-
let
|
|
58
|
-
if (!
|
|
59
|
-
let e =
|
|
55
|
+
let b = y.isSuccess && !y.hasNextPage && !y.isFetchingNextPage, x = o(() => {
|
|
56
|
+
if (!y.data || !b) return;
|
|
57
|
+
let e = y.data.pages, t = e[e.length - 1], n = e.flatMap((e) => e.members?.data ?? []);
|
|
60
58
|
return {
|
|
61
59
|
...t,
|
|
62
60
|
members: {
|
|
@@ -65,12 +63,12 @@ function c({ locationId: c, enabled: l }) {
|
|
|
65
63
|
nextPaginationToken: null
|
|
66
64
|
}
|
|
67
65
|
};
|
|
68
|
-
}, [
|
|
66
|
+
}, [y.data, b]);
|
|
69
67
|
return {
|
|
70
|
-
...
|
|
71
|
-
data:
|
|
72
|
-
isComplete:
|
|
68
|
+
...y,
|
|
69
|
+
data: x,
|
|
70
|
+
isComplete: b
|
|
73
71
|
};
|
|
74
72
|
}
|
|
75
73
|
//#endregion
|
|
76
|
-
export {
|
|
74
|
+
export { l as useLocationMembersQuery };
|
|
@@ -4,21 +4,21 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { getApprovalPolicies as e } from "../../../../data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { deleteApprovalPoliciesIdMutation as t, getApprovalPoliciesOptions as n, patchApprovalPoliciesIdMutation as r, postApprovalPoliciesMutation as i } from "../../../../data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import { invalidateAllClients as
|
|
9
|
-
import { useEmbedApi as
|
|
10
|
-
import { getAllPagesNextPaginationTokenParam as
|
|
7
|
+
import { authEpochPlaceholder as a, withAuthEpoch as o } from "../../../../data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { invalidateAllClients as s, setAllClientsQueriesData as c } from "../../../../data-access/dist/lib/clientRegistry.js";
|
|
9
|
+
import { useEmbedApi as l } from "../../../../data-access/dist/lib/EmbedApiContext.js";
|
|
10
|
+
import { getAllPagesNextPaginationTokenParam as u, isAllPagesResolving as d, useAutoFetchNextPage as f } from "../../../../data-access/dist/lib/allPages.js";
|
|
11
11
|
import "../../../../data-access/dist/index.js";
|
|
12
|
-
import { ApprovalPolicyObjectType as
|
|
13
|
-
import { useMemo as
|
|
14
|
-
import { useInfiniteQuery as
|
|
12
|
+
import { ApprovalPolicyObjectType as p, approvalPoliciesInvalidationKey as m } from "./queryKeys.js";
|
|
13
|
+
import { useMemo as h } from "react";
|
|
14
|
+
import { useInfiniteQuery as g, useMutation as _, useQueryClient as v } from "@tanstack/react-query";
|
|
15
15
|
//#region ../../libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js
|
|
16
|
-
var
|
|
17
|
-
function
|
|
16
|
+
var y = 100;
|
|
17
|
+
function b(e, t, n) {
|
|
18
18
|
let r = (e) => e && n(e);
|
|
19
|
-
e.setQueriesData({ queryKey: t }, r),
|
|
19
|
+
e.setQueriesData({ queryKey: t }, r), c(t, r);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function x(e, t) {
|
|
22
22
|
return {
|
|
23
23
|
...e,
|
|
24
24
|
pages: e.pages.map((e) => ({
|
|
@@ -27,55 +27,56 @@ function b(e, t) {
|
|
|
27
27
|
}))
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
let { client: i, organizationId:
|
|
30
|
+
function S({ objectType: t = p.Payable, enabled: r = !0 } = {}) {
|
|
31
|
+
let { client: i, organizationId: s, widgetToken: c, authEpoch: m, organizationPending: _ } = l(), v = s, b = !!(v && c) && r, x = { "x-organization-id": v ?? "" }, S = { object_type: t }, C = n({
|
|
32
32
|
client: i,
|
|
33
|
-
headers:
|
|
34
|
-
query:
|
|
35
|
-
}),
|
|
36
|
-
queryKey: [...
|
|
37
|
-
authEpoch:
|
|
38
|
-
organizationPending:
|
|
33
|
+
headers: x,
|
|
34
|
+
query: S
|
|
35
|
+
}), w = g({
|
|
36
|
+
queryKey: [...o(C, {
|
|
37
|
+
authEpoch: m,
|
|
38
|
+
organizationPending: _
|
|
39
39
|
}).queryKey, "all"],
|
|
40
|
-
|
|
40
|
+
placeholderData: a(C.queryKey, _),
|
|
41
|
+
enabled: b,
|
|
41
42
|
initialPageParam: void 0,
|
|
42
43
|
queryFn: async ({ signal: t, pageParam: n }) => {
|
|
43
44
|
let { data: r } = await e({
|
|
44
45
|
client: i,
|
|
45
|
-
headers:
|
|
46
|
+
headers: x,
|
|
46
47
|
query: n ? { pagination_token: n } : {
|
|
47
|
-
...
|
|
48
|
-
limit:
|
|
48
|
+
...S,
|
|
49
|
+
limit: y
|
|
49
50
|
},
|
|
50
51
|
signal: t,
|
|
51
52
|
throwOnError: !0
|
|
52
53
|
});
|
|
53
54
|
return r;
|
|
54
55
|
},
|
|
55
|
-
getNextPageParam:
|
|
56
|
+
getNextPageParam: u
|
|
56
57
|
});
|
|
57
|
-
|
|
58
|
-
let
|
|
58
|
+
f(w, b);
|
|
59
|
+
let T = h(() => w.data ? { data: w.data.pages.flatMap((e) => e.data ?? []) } : void 0, [w.data]);
|
|
59
60
|
return {
|
|
60
|
-
...
|
|
61
|
-
data:
|
|
62
|
-
isResolving:
|
|
61
|
+
...w,
|
|
62
|
+
data: T,
|
|
63
|
+
isResolving: d(w)
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
-
let { client: t, organizationId: n } =
|
|
67
|
-
return
|
|
66
|
+
function C({ objectType: e = p.Payable } = {}) {
|
|
67
|
+
let { client: t, organizationId: n } = l(), r = v();
|
|
68
|
+
return _({
|
|
68
69
|
...i({
|
|
69
70
|
client: t,
|
|
70
71
|
headers: { "x-organization-id": n ?? "" }
|
|
71
72
|
}),
|
|
72
73
|
onSuccess: async (i) => {
|
|
73
|
-
|
|
74
|
+
b(r, m({
|
|
74
75
|
client: t,
|
|
75
76
|
organizationId: n,
|
|
76
77
|
objectType: e
|
|
77
78
|
}), (e) => {
|
|
78
|
-
if (e.pages.some((e) => e.data?.some((e) => e.id === i.id))) return
|
|
79
|
+
if (e.pages.some((e) => e.data?.some((e) => e.id === i.id))) return x(e, (e) => e.map((e) => e.id === i.id ? i : e));
|
|
79
80
|
let t = e.pages.length - 1;
|
|
80
81
|
return t < 0 ? e : {
|
|
81
82
|
...e,
|
|
@@ -84,7 +85,7 @@ function S({ objectType: e = f.Payable } = {}) {
|
|
|
84
85
|
data: [...e.data ?? [], i]
|
|
85
86
|
} : e)
|
|
86
87
|
};
|
|
87
|
-
}), await
|
|
88
|
+
}), await s(m({
|
|
88
89
|
client: t,
|
|
89
90
|
organizationId: n,
|
|
90
91
|
objectType: e
|
|
@@ -92,19 +93,19 @@ function S({ objectType: e = f.Payable } = {}) {
|
|
|
92
93
|
}
|
|
93
94
|
});
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
-
let { client: t, organizationId: n } =
|
|
97
|
-
return
|
|
96
|
+
function w({ objectType: e = p.Payable } = {}) {
|
|
97
|
+
let { client: t, organizationId: n } = l(), i = v();
|
|
98
|
+
return _({
|
|
98
99
|
...r({
|
|
99
100
|
client: t,
|
|
100
101
|
headers: { "x-organization-id": n ?? "" }
|
|
101
102
|
}),
|
|
102
103
|
onSuccess: async (r) => {
|
|
103
|
-
|
|
104
|
+
b(i, m({
|
|
104
105
|
client: t,
|
|
105
106
|
organizationId: n,
|
|
106
107
|
objectType: e
|
|
107
|
-
}), (e) =>
|
|
108
|
+
}), (e) => x(e, (e) => e.map((e) => e.id === r.id ? r : e))), await s(m({
|
|
108
109
|
client: t,
|
|
109
110
|
organizationId: n,
|
|
110
111
|
objectType: e
|
|
@@ -112,19 +113,19 @@ function C({ objectType: e = f.Payable } = {}) {
|
|
|
112
113
|
}
|
|
113
114
|
});
|
|
114
115
|
}
|
|
115
|
-
function
|
|
116
|
-
let { client: n, organizationId: r } =
|
|
117
|
-
return
|
|
116
|
+
function T({ objectType: e = p.Payable } = {}) {
|
|
117
|
+
let { client: n, organizationId: r } = l(), i = v();
|
|
118
|
+
return _({
|
|
118
119
|
...t({
|
|
119
120
|
client: n,
|
|
120
121
|
headers: { "x-organization-id": r ?? "" }
|
|
121
122
|
}),
|
|
122
123
|
onSuccess: async (t, a) => {
|
|
123
|
-
|
|
124
|
+
b(i, m({
|
|
124
125
|
client: n,
|
|
125
126
|
organizationId: r,
|
|
126
127
|
objectType: e
|
|
127
|
-
}), (e) =>
|
|
128
|
+
}), (e) => x(e, (e) => e.filter((e) => e.id !== a.path.approval_policy_id))), await s(m({
|
|
128
129
|
client: n,
|
|
129
130
|
organizationId: r,
|
|
130
131
|
objectType: e
|
|
@@ -133,4 +134,4 @@ function w({ objectType: e = f.Payable } = {}) {
|
|
|
133
134
|
});
|
|
134
135
|
}
|
|
135
136
|
//#endregion
|
|
136
|
-
export {
|
|
137
|
+
export { T as useDeleteApprovalPoliciesIdMutation, S as useGetApprovalPoliciesQuery, w as usePatchApprovalPoliciesIdMutation, C as usePostApprovalPoliciesMutation };
|