@tesouro/embedded-components-react 0.5.175 → 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.
Files changed (21) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +47 -46
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +36 -35
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +31 -30
  4. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js +17 -20
  5. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js +28 -30
  6. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js +20 -23
  7. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js +31 -33
  8. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js +29 -31
  9. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js +36 -38
  10. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js +29 -31
  11. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js +36 -38
  12. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +47 -46
  13. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +33 -33
  14. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js +27 -29
  15. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +28 -27
  16. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +38 -37
  17. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +31 -30
  18. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useOrganizationOnboardingSuppression.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +33 -32
  20. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  21. package/package.json +1 -1
@@ -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 { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
- import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
9
- import { getAllPagesNextPageParam as i, useAutoFetchNextPage as a } from "../../../../shared/data-access/dist/lib/allPages.js";
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 o } from "react";
12
- import { useInfiniteQuery as s } from "@tanstack/react-query";
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 c = 100;
15
- function l({ Status: l, enabled: u } = {}) {
16
- let { client: d, organizationId: f, widgetToken: p, authEpoch: m } = n(), h = r(f), g = !!(f && p) && (u === !0 || u === void 0), _ = t({
17
- client: d,
18
- headers: h,
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: c,
21
- ...l ? { Status: l } : {}
21
+ Limit: l,
22
+ ...u ? { Status: u } : {}
22
23
  }
23
- }), v = s({
24
- queryKey: [
25
- ..._.queryKey,
26
- "all",
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: d,
34
- headers: h,
31
+ client: f,
32
+ headers: _,
35
33
  query: {
36
- Limit: c,
37
- ...l ? { Status: l } : {},
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: i
43
+ getNextPageParam: a
46
44
  });
47
- a(v, g);
48
- let y = o(() => {
49
- if (v.data) return {
50
- data: v.data.pages.flatMap((e) => e.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
- }, [v.data]), b = v.isSuccess && !v.hasNextPage && !v.isFetchingNextPage;
52
+ }, [b.data]), S = b.isSuccess && !b.hasNextPage && !b.isFetchingNextPage;
55
53
  return {
56
- ...v,
57
- data: y,
58
- isComplete: b
54
+ ...b,
55
+ data: x,
56
+ isComplete: S
59
57
  };
60
58
  }
61
59
  //#endregion
62
- export { l as useAllTeamMembersQuery };
60
+ export { u as useAllTeamMembersQuery };
@@ -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 { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
- import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
9
- import { getAllPagesNextPageParam as i, useAutoFetchNextPage as a } from "../../../../shared/data-access/dist/lib/allPages.js";
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 o } from "react";
12
- import { useInfiniteQuery as s } from "@tanstack/react-query";
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 c = 100;
15
- function l({ enabled: l } = {}) {
16
- let { client: u, organizationId: d, widgetToken: f, authEpoch: p } = n(), m = r(d), h = !!(d && f) && (l === !0 || l === void 0), g = t({
17
- client: u,
18
- headers: m,
19
- query: { limit: c }
20
- }), _ = s({
21
- queryKey: [
22
- ...g.queryKey,
23
- "all",
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: u,
31
- headers: m,
28
+ client: d,
29
+ headers: g,
32
30
  query: {
33
- limit: c,
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: i
39
+ getNextPageParam: a
42
40
  });
43
- a(_, h);
44
- let v = o(() => {
45
- if (_.data) return {
46
- data: _.data.pages.flatMap((e) => e.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
- }, [_.data]), y = _.isSuccess && !_.hasNextPage && !_.isFetchingNextPage;
48
+ }, [y.data]), x = y.isSuccess && !y.hasNextPage && !y.isFetchingNextPage;
51
49
  return {
52
- ..._,
53
- data: v,
54
- isComplete: y
50
+ ...y,
51
+ data: b,
52
+ isComplete: x
55
53
  };
56
54
  }
57
55
  //#endregion
58
- export { l as useAllDepartmentsQuery };
56
+ export { u as useAllDepartmentsQuery };
@@ -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 { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
- import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
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 i, useMemo as a } from "react";
11
- import { useInfiniteQuery as o } from "@tanstack/react-query";
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 s = 100;
14
- function c({ departmentId: c, enabled: l }) {
15
- let { client: u, organizationId: d, widgetToken: f, authEpoch: p } = n(), m = r(d), h = !!(d && f && c) && (l === !0 || l === void 0), g = t({
16
- path: { departmentId: c ?? "" },
17
- client: u,
18
- headers: m,
19
- query: { limit: s }
20
- }), _ = o({
21
- queryKey: [
22
- ...g.queryKey,
23
- "all-members",
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: u,
31
- headers: m,
32
- path: { departmentId: c ?? "" },
28
+ client: d,
29
+ headers: g,
30
+ path: { departmentId: l ?? "" },
33
31
  query: {
34
- limit: s,
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
- i(() => {
48
- h && _.hasNextPage && !_.isFetchingNextPage && !_.isError && _.fetchNextPage();
45
+ a(() => {
46
+ _ && y.hasNextPage && !y.isFetchingNextPage && !y.isError && y.fetchNextPage();
49
47
  }, [
50
- h,
51
- _.hasNextPage,
52
- _.isFetchingNextPage,
53
- _.isError,
54
- _.fetchNextPage,
55
- _
48
+ _,
49
+ y.hasNextPage,
50
+ y.isFetchingNextPage,
51
+ y.isError,
52
+ y.fetchNextPage,
53
+ y
56
54
  ]);
57
- let v = _.isSuccess && !_.hasNextPage && !_.isFetchingNextPage, y = a(() => {
58
- if (!_.data || !v) return;
59
- let e = _.data.pages, t = e[e.length - 1], n = e.flatMap((e) => e.members?.data ?? []);
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
- }, [_.data, v]);
66
+ }, [y.data, b]);
69
67
  return {
70
- ..._,
71
- data: y,
72
- isComplete: v
68
+ ...y,
69
+ data: x,
70
+ isComplete: b
73
71
  };
74
72
  }
75
73
  //#endregion
76
- export { c as useDepartmentMembersQuery };
74
+ export { l as useDepartmentMembersQuery };
@@ -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 { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
- import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
9
- import { getAllPagesNextPageParam as i, useAutoFetchNextPage as a } from "../../../../shared/data-access/dist/lib/allPages.js";
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 o } from "react";
12
- import { useInfiniteQuery as s } from "@tanstack/react-query";
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 c = 100;
15
- function l({ enabled: l } = {}) {
16
- let { client: u, organizationId: d, widgetToken: f, authEpoch: p } = n(), m = r(d), h = !!(d && f) && (l === !0 || l === void 0), g = t({
17
- client: u,
18
- headers: m,
19
- query: { limit: c }
20
- }), _ = s({
21
- queryKey: [
22
- ...g.queryKey,
23
- "all",
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: u,
31
- headers: m,
28
+ client: d,
29
+ headers: g,
32
30
  query: {
33
- limit: c,
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: i
39
+ getNextPageParam: a
42
40
  });
43
- a(_, h);
44
- let v = o(() => {
45
- if (_.data) return {
46
- data: _.data.pages.flatMap((e) => e.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
- }, [_.data]), y = _.isSuccess && !_.hasNextPage && !_.isFetchingNextPage;
48
+ }, [y.data]), x = y.isSuccess && !y.hasNextPage && !y.isFetchingNextPage;
51
49
  return {
52
- ..._,
53
- data: v,
54
- isComplete: y
50
+ ...y,
51
+ data: b,
52
+ isComplete: x
55
53
  };
56
54
  }
57
55
  //#endregion
58
- export { l as useAllLocationsQuery };
56
+ export { u as useAllLocationsQuery };
@@ -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 { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
- import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
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 i, useMemo as a } from "react";
11
- import { useInfiniteQuery as o } from "@tanstack/react-query";
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 s = 100;
14
- function c({ locationId: c, enabled: l }) {
15
- let { client: u, organizationId: d, widgetToken: f, authEpoch: p } = n(), m = r(d), h = !!(d && f && c) && (l === !0 || l === void 0), g = t({
16
- path: { locationId: c ?? "" },
17
- client: u,
18
- headers: m,
19
- query: { limit: s }
20
- }), _ = o({
21
- queryKey: [
22
- ...g.queryKey,
23
- "all-members",
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: u,
31
- headers: m,
32
- path: { locationId: c ?? "" },
28
+ client: d,
29
+ headers: g,
30
+ path: { locationId: l ?? "" },
33
31
  query: {
34
- limit: s,
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
- i(() => {
48
- h && _.hasNextPage && !_.isFetchingNextPage && !_.isError && _.fetchNextPage();
45
+ a(() => {
46
+ _ && y.hasNextPage && !y.isFetchingNextPage && !y.isError && y.fetchNextPage();
49
47
  }, [
50
- h,
51
- _.hasNextPage,
52
- _.isFetchingNextPage,
53
- _.isError,
54
- _.fetchNextPage,
55
- _
48
+ _,
49
+ y.hasNextPage,
50
+ y.isFetchingNextPage,
51
+ y.isError,
52
+ y.fetchNextPage,
53
+ y
56
54
  ]);
57
- let v = _.isSuccess && !_.hasNextPage && !_.isFetchingNextPage, y = a(() => {
58
- if (!_.data || !v) return;
59
- let e = _.data.pages, t = e[e.length - 1], n = e.flatMap((e) => e.members?.data ?? []);
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
- }, [_.data, v]);
66
+ }, [y.data, b]);
69
67
  return {
70
- ..._,
71
- data: y,
72
- isComplete: v
68
+ ...y,
69
+ data: x,
70
+ isComplete: b
73
71
  };
74
72
  }
75
73
  //#endregion
76
- export { c as useLocationMembersQuery };
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 { withAuthEpoch as a } from "../../../../data-access/dist/lib/withAuthEpoch.js";
8
- import { invalidateAllClients as o, setAllClientsQueriesData as s } from "../../../../data-access/dist/lib/clientRegistry.js";
9
- import { useEmbedApi as c } from "../../../../data-access/dist/lib/EmbedApiContext.js";
10
- import { getAllPagesNextPaginationTokenParam as l, isAllPagesResolving as u, useAutoFetchNextPage as d } from "../../../../data-access/dist/lib/allPages.js";
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 f, approvalPoliciesInvalidationKey as p } from "./queryKeys.js";
13
- import { useMemo as m } from "react";
14
- import { useInfiniteQuery as h, useMutation as g, useQueryClient as _ } from "@tanstack/react-query";
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 v = 100;
17
- function y(e, t, n) {
16
+ var y = 100;
17
+ function b(e, t, n) {
18
18
  let r = (e) => e && n(e);
19
- e.setQueriesData({ queryKey: t }, r), s(t, r);
19
+ e.setQueriesData({ queryKey: t }, r), c(t, r);
20
20
  }
21
- function b(e, t) {
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 x({ objectType: t = f.Payable, enabled: r = !0 } = {}) {
31
- let { client: i, organizationId: o, widgetToken: s, authEpoch: p, organizationPending: g } = c(), _ = o, y = !!(_ && s) && r, b = { "x-organization-id": _ ?? "" }, x = { object_type: t }, S = n({
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: b,
34
- query: x
35
- }), C = h({
36
- queryKey: [...a(S, {
37
- authEpoch: p,
38
- organizationPending: g
33
+ headers: x,
34
+ query: S
35
+ }), w = g({
36
+ queryKey: [...o(C, {
37
+ authEpoch: m,
38
+ organizationPending: _
39
39
  }).queryKey, "all"],
40
- enabled: y,
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: b,
46
+ headers: x,
46
47
  query: n ? { pagination_token: n } : {
47
- ...x,
48
- limit: v
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: l
56
+ getNextPageParam: u
56
57
  });
57
- d(C, y);
58
- let w = m(() => C.data ? { data: C.data.pages.flatMap((e) => e.data ?? []) } : void 0, [C.data]);
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
- ...C,
61
- data: w,
62
- isResolving: u(C)
61
+ ...w,
62
+ data: T,
63
+ isResolving: d(w)
63
64
  };
64
65
  }
65
- function S({ objectType: e = f.Payable } = {}) {
66
- let { client: t, organizationId: n } = c(), r = _();
67
- return g({
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
- y(r, p({
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 b(e, (e) => e.map((e) => e.id === i.id ? i : e));
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 o(p({
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 C({ objectType: e = f.Payable } = {}) {
96
- let { client: t, organizationId: n } = c(), i = _();
97
- return g({
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
- y(i, p({
104
+ b(i, m({
104
105
  client: t,
105
106
  organizationId: n,
106
107
  objectType: e
107
- }), (e) => b(e, (e) => e.map((e) => e.id === r.id ? r : e))), await o(p({
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 w({ objectType: e = f.Payable } = {}) {
116
- let { client: n, organizationId: r } = c(), i = _();
117
- return g({
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
- y(i, p({
124
+ b(i, m({
124
125
  client: n,
125
126
  organizationId: r,
126
127
  objectType: e
127
- }), (e) => b(e, (e) => e.filter((e) => e.id !== a.path.approval_policy_id))), await o(p({
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 { w as useDeleteApprovalPoliciesIdMutation, x as useGetApprovalPoliciesQuery, C as usePatchApprovalPoliciesIdMutation, S as usePostApprovalPoliciesMutation };
137
+ export { T as useDeleteApprovalPoliciesIdMutation, S as useGetApprovalPoliciesQuery, w as usePatchApprovalPoliciesIdMutation, C as usePostApprovalPoliciesMutation };