@tesouro/embedded-components-react 0.11.260 → 0.11.263

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.
@@ -8,43 +8,88 @@ import { LoadingRegion as n } from "../../../../../shared/ui/dist/lib/LoadingReg
8
8
  import "../../../../../shared/ui/dist/index.js";
9
9
  import { DeviceProfilingFailure as r } from "./deviceProfilingPage.js";
10
10
  import { DEVICE_PROFILING_OFF as i, useDeviceProfiling as a } from "./useDeviceProfiling.js";
11
- import { Activity as o, createContext as s, useContext as c, useState as l } from "react";
12
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
11
+ import { Activity as o, createContext as s, useContext as c, useEffect as l, useRef as u, useState as d } from "react";
12
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
13
13
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/deviceProfiling/DeviceProfiling.js
14
- var p = s(i);
15
- function m({ children: e }) {
16
- let t = a();
17
- return /* @__PURE__ */ d(p.Provider, {
14
+ var h = s(i), g = s({
15
+ next: async () => null,
16
+ refused: () => void 0
17
+ });
18
+ function _(e, t) {
19
+ switch (e.status) {
20
+ case "off":
21
+ case "ready": return !e.rechecking && (t.resolve(e.status === "ready" ? e.requestFields : null), !0);
22
+ case "blocked": return t.reject(/* @__PURE__ */ Error(`Device profiling blocked: ${e.failure}`)), !0;
23
+ default: return !1;
24
+ }
25
+ }
26
+ function v(e) {
27
+ let t = u(e);
28
+ t.current = e;
29
+ let n = u(/* @__PURE__ */ new Set());
30
+ l(() => {
31
+ for (let t of [...n.current]) _(e, t) && n.current.delete(t);
32
+ }, [e]), l(() => {
33
+ let e = n.current;
34
+ return () => {
35
+ for (let t of e) t.reject(new DOMException("Widget unmounted", "AbortError"));
36
+ e.clear();
37
+ };
38
+ }, []);
39
+ let [r] = d(() => ({
40
+ next: () => new Promise((e, r) => {
41
+ let i = {
42
+ resolve: e,
43
+ reject: r
44
+ };
45
+ _(t.current, i) || n.current.add(i);
46
+ }),
47
+ refused: (e) => {
48
+ let n = t.current;
49
+ n.status === "ready" && n.requestFields === e && n.renew();
50
+ }
51
+ }));
52
+ return r;
53
+ }
54
+ function y({ children: e }) {
55
+ let t = a(), n = v(t);
56
+ return /* @__PURE__ */ p(h.Provider, {
18
57
  value: t,
19
- children: e
58
+ children: /* @__PURE__ */ p(g.Provider, {
59
+ value: n,
60
+ children: e
61
+ })
20
62
  });
21
63
  }
22
- var h = /* @__PURE__ */ new Set([r.HostLoadedSdk, r.SessionConflict]);
23
- function g({ labels: r, testIds: i, className: a, children: s }) {
24
- let m = c(p), [g, _] = l(!1), v = m.status === "blocked" || !g && (m.status === "checking" || m.status === "pending");
25
- !v && !g && _(!0);
26
- let y = null;
27
- return m.status === "blocked" ? y = /* @__PURE__ */ d(t, {
28
- title: h.has(m.failure) ? r.unavailableTitle : r.blockedTitle,
29
- description: h.has(m.failure) ? r.unavailableDescription : r.blockedDescription,
64
+ function b() {
65
+ return c(g);
66
+ }
67
+ var x = /* @__PURE__ */ new Set([r.HostLoadedSdk, r.SessionConflict]);
68
+ function S({ labels: r, testIds: i, className: a, children: s }) {
69
+ let l = c(h), [u, g] = d(!1), _ = l.status === "blocked" || !u && (l.status === "checking" || l.status === "pending");
70
+ !_ && !u && g(!0);
71
+ let v = null;
72
+ return l.status === "blocked" ? v = /* @__PURE__ */ p(t, {
73
+ title: x.has(l.failure) ? r.unavailableTitle : r.blockedTitle,
74
+ description: x.has(l.failure) ? r.unavailableDescription : r.blockedDescription,
30
75
  retryLabel: r.retry,
31
- onRetry: m.retry,
76
+ onRetry: l.retry,
32
77
  testId: i?.blocked
33
- }) : m.status === "pending" && (y = /* @__PURE__ */ f(n, {
78
+ }) : l.status === "pending" && (v = /* @__PURE__ */ m(n, {
34
79
  isLoading: !0,
35
80
  loadingLabel: r.loading,
36
81
  "data-testid": i?.loading,
37
82
  className: "ttw:flex ttw:w-full ttw:max-w-2xl ttw:flex-col ttw:gap-4",
38
- children: [/* @__PURE__ */ d(e, {
83
+ children: [/* @__PURE__ */ p(e, {
39
84
  height: 32,
40
85
  width: "60%"
41
- }), /* @__PURE__ */ d(e, { height: 240 })]
42
- })), /* @__PURE__ */ f(u, { children: [v && y ? /* @__PURE__ */ d("div", {
86
+ }), /* @__PURE__ */ p(e, { height: 240 })]
87
+ })), /* @__PURE__ */ m(f, { children: [_ && v ? /* @__PURE__ */ p("div", {
43
88
  className: a,
44
- children: y
45
- }) : null, v && !g ? null : /* @__PURE__ */ d(o, {
46
- mode: v ? "hidden" : "visible",
89
+ children: v
90
+ }) : null, _ && !u ? null : /* @__PURE__ */ p(o, {
91
+ mode: _ ? "hidden" : "visible",
47
92
  children: s
48
93
  })] });
49
94
  }
50
- export { g as DeviceProfilingGate, m as DeviceProfilingProvider };
95
+ export { S as DeviceProfilingGate, y as DeviceProfilingProvider, b as useDeviceRequestFields };
@@ -102,8 +102,8 @@ function m(e) {
102
102
  return {
103
103
  read: () => i.result,
104
104
  subscribe: (e) => (i.listeners.add(e), () => i.listeners.delete(e)),
105
- retry: () => {
106
- t.session === i && i.result.status === "failed" && f(t, i, e);
105
+ rerun: () => {
106
+ t.session === i && i.result.status !== "running" && f(t, i, e);
107
107
  },
108
108
  release: () => {
109
109
  a || (a = !0, --i.holders, queueMicrotask(() => {
@@ -11,78 +11,112 @@ import { OnboardingAnalyticsEvent as r } from "../analytics/events.js";
11
11
  import { DeviceProfilingFailure as i, holdProfilingSession as a, lookUpDeviceProfiling as o, onProfilingSessionEnd as s, profilingSessionKey as c } from "./deviceProfilingPage.js";
12
12
  import { fetchDeviceProfiling as l } from "../../../../data-access/dist/index13.js";
13
13
  import "../../../../data-access/dist/index.js";
14
- import { useEffect as u, useMemo as d, useRef as f, useState as p, useSyncExternalStore as m } from "react";
14
+ import { useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m, useSyncExternalStore as h } from "react";
15
15
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/deviceProfiling/useDeviceProfiling.js
16
- var h = { status: "off" }, g = { status: "checking" }, _ = { status: "pending" }, v = () => () => void 0;
17
- function y() {
18
- let { client: y, widgetToken: b } = t(), x = n(), [S, C] = p(null), [w, T] = p(!1), [E, D] = p(0), O = !!b, [k, A] = p({
19
- client: y,
20
- hasToken: O
16
+ var g = { status: "off" }, _ = {
17
+ status: "off",
18
+ rechecking: !0
19
+ }, v = { status: "checking" }, y = { status: "pending" }, b = () => () => void 0;
20
+ function x() {
21
+ let { client: x, widgetToken: S } = t(), C = n(), [w, T] = m(null), [E, D] = m(null), [O, k] = m(0), [A, j] = m(!1), M = p(A);
22
+ M.current = A;
23
+ let N = !!S, [P, F] = m({
24
+ client: x,
25
+ hasToken: N
21
26
  });
22
- (y !== k.client || O !== k.hasToken) && (A({
23
- client: y,
24
- hasToken: O
25
- }), C(null), T(!1)), u(() => {
26
- if (!b) return;
27
- let t = !0, n = `${y.getConfig().baseUrl ?? ""} ${e(b)}`;
28
- return o(n, () => l({
29
- client: y,
30
- widgetToken: b
31
- })).then((e) => {
32
- t && (C({ profiling: e }), T(!1));
27
+ (x !== P.client || N !== P.hasToken) && (F({
28
+ client: x,
29
+ hasToken: N
30
+ }), T(null), D(null), j(!1));
31
+ let I = S ? `${x.getConfig().baseUrl ?? ""} ${e(S)}` : null, L = I !== null && E === I;
32
+ d(() => {
33
+ if (!S || !I) return;
34
+ let e = !0;
35
+ return o(I, () => l({
36
+ client: x,
37
+ widgetToken: S
38
+ })).then((t) => {
39
+ e && (M.current && t && c(t) === V.current && J.current?.rerun(), T({
40
+ profiling: t,
41
+ lookupKey: I
42
+ }), D(null), j(!1));
33
43
  }, () => {
34
- t && T(!0);
44
+ e && D(I);
35
45
  }), () => {
36
- t = !1;
46
+ e = !1;
37
47
  };
38
48
  }, [
39
- y,
40
- b,
41
- E
49
+ x,
50
+ S,
51
+ I,
52
+ O
42
53
  ]);
43
- let j = S?.profiling ?? null, M = f(j);
44
- M.current = j;
45
- let N = j ? c(j) : null, [P, F] = p(null), [I, L] = p(0);
46
- u(() => {
47
- let e = M.current;
48
- if (N === null || e === null) {
49
- F(null);
54
+ let R = w?.profiling ?? null, z = p(R);
55
+ z.current = R;
56
+ let B = R ? c(R) : null, V = p(B);
57
+ V.current = B;
58
+ let [H, U] = m(null), [W, G] = m(0);
59
+ d(() => {
60
+ let e = z.current;
61
+ if (B === null || e === null) {
62
+ U(null);
50
63
  return;
51
64
  }
52
65
  let t = a(e);
53
- return t === null ? (F("conflict"), s(() => L((e) => e + 1))) : (F(t), () => t.release());
54
- }, [N, I]);
55
- let R = P === "conflict" ? null : P, z = m(R?.subscribe ?? v, () => R?.read() ?? null, () => null), B = d(() => w && S?.profiling !== null ? {
66
+ return U({
67
+ key: B,
68
+ held: t
69
+ }), t === null ? s(() => G((e) => e + 1)) : () => t.release();
70
+ }, [B, W]);
71
+ let K = H?.key === B ? H : null, q = K?.held ?? null, J = p(q);
72
+ J.current = q;
73
+ let Y = h(q?.subscribe ?? b, () => q?.read() ?? null, () => null), X = f(() => L && w?.profiling !== null ? {
56
74
  failure: i.EndpointFailed,
57
75
  retry: () => {
58
- T(!1), D((e) => e + 1);
76
+ D(null), k((e) => e + 1);
59
77
  }
60
- } : P === "conflict" ? {
78
+ } : K && !K.held ? {
61
79
  failure: i.SessionConflict,
62
- retry: () => L((e) => e + 1)
63
- } : z?.status === "failed" ? {
64
- failure: z.failure,
65
- retry: () => R?.retry()
80
+ retry: () => G((e) => e + 1)
81
+ } : Y?.status === "failed" ? {
82
+ failure: Y.failure,
83
+ retry: () => q?.rerun()
66
84
  } : null, [
85
+ L,
67
86
  w,
68
- S,
69
- P,
70
- R,
71
- z
72
- ]), V = B?.failure ?? null;
73
- return u(() => {
74
- V && x(r.DeviceProfilingBlocked, { reason: V });
75
- }, [V, x]), d(() => B ? {
76
- status: "blocked",
77
- ...B
78
- } : S ? S.profiling ? z?.status === "ready" ? {
79
- status: "ready",
80
- requestFields: z.requestFields
81
- } : _ : h : E > 0 ? _ : g, [
82
- B,
83
- S,
84
- E,
85
- z
87
+ K,
88
+ q,
89
+ Y
90
+ ]), Z = X?.failure ?? null;
91
+ d(() => {
92
+ Z && C(r.DeviceProfilingBlocked, { reason: Z });
93
+ }, [Z, C]);
94
+ let Q = u(() => {
95
+ j(!0), D(null), k((e) => e + 1);
96
+ }, []);
97
+ return f(() => {
98
+ if (X) return {
99
+ status: "blocked",
100
+ ...X
101
+ };
102
+ if (!w) return O > 0 ? y : v;
103
+ if (A) return y;
104
+ let e = w.lookupKey !== I && !L;
105
+ return w.profiling ? Y?.status === "ready" ? {
106
+ status: "ready",
107
+ requestFields: Y.requestFields,
108
+ rechecking: e,
109
+ renew: Q
110
+ } : y : e ? _ : g;
111
+ }, [
112
+ X,
113
+ w,
114
+ O,
115
+ A,
116
+ I,
117
+ L,
118
+ Y,
119
+ Q
86
120
  ]);
87
121
  }
88
- export { h as DEVICE_PROFILING_OFF, y as useDeviceProfiling };
122
+ export { g as DEVICE_PROFILING_OFF, x as useDeviceProfiling };
@@ -20,30 +20,31 @@ import { useCurrentUserQuery as _i } from "./lib/useCurrentUserQuery.js";
20
20
  import { useMyEntityQuery as vi } from "./lib/useMyEntityQuery.js";
21
21
  import { useMailboxAddress as yi } from "./lib/useMailboxAddress.js";
22
22
  import "./lib/apiErrorStatus.js";
23
- import { isApiConflictError as bi } from "./lib/isApiConflictError.js";
24
- import { isApiForbiddenError as xi } from "./lib/isApiForbiddenError.js";
25
- import { isApiNotFoundError as Si } from "./lib/isApiNotFoundError.js";
26
- import { isApiUnprocessableError as Ci } from "./lib/isApiUnprocessableError.js";
23
+ import { hasApiErrorCode as bi } from "./lib/hasApiErrorCode.js";
24
+ import { isApiConflictError as xi } from "./lib/isApiConflictError.js";
25
+ import { isApiForbiddenError as Si } from "./lib/isApiForbiddenError.js";
26
+ import { isApiNotFoundError as Ci } from "./lib/isApiNotFoundError.js";
27
+ import { isApiUnprocessableError as wi } from "./lib/isApiUnprocessableError.js";
27
28
  import "./lib/isUserDataNotFoundError.js";
28
- import { useGetUserDataQuery as wi } from "./lib/useGetUserDataQuery.js";
29
- import { useUpsertUserDataMutation as Ti } from "./lib/useUpsertUserDataMutation.js";
30
- import { Scope as Ei, isScope as Di } from "./lib/scopes.js";
31
- import { getAllPagesNextPageParam as Oi, getAllPagesNextPaginationTokenParam as ki, isAllPagesResolving as Ai, useAutoFetchNextPage as ji } from "./lib/allPages.js";
32
- import { useAllBankAccountsQuery as Mi } from "./lib/bank-account/useAllBankAccountsQuery.js";
33
- import { useAllDebitCardsQuery as Ni } from "./lib/debit-card/useAllDebitCardsQuery.js";
34
- import { useAllExternalBankAccountsQuery as Pi } from "./lib/external-bank-account/useAllExternalBankAccountsQuery.js";
35
- import { useAllMerchantCategoryGroupsQuery as Fi } from "./lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js";
36
- import { useAllLedgerAccountsQuery as Ii, useLedgerAccountsQuery as Li } from "./lib/reference-data/useLedgerAccountsQuery.js";
37
- import { usePaymentTermsQuery as Ri } from "./lib/reference-data/usePaymentTermsQuery.js";
38
- import { useOrganizationQuery as zi } from "./lib/organization/useOrganizationQuery.js";
39
- import { useAllOrganizationRolesQuery as Bi } from "./lib/role/useAllOrganizationRolesQuery.js";
29
+ import { useGetUserDataQuery as Ti } from "./lib/useGetUserDataQuery.js";
30
+ import { useUpsertUserDataMutation as Ei } from "./lib/useUpsertUserDataMutation.js";
31
+ import { Scope as Di, isScope as Oi } from "./lib/scopes.js";
32
+ import { getAllPagesNextPageParam as ki, getAllPagesNextPaginationTokenParam as Ai, isAllPagesResolving as ji, useAutoFetchNextPage as Mi } from "./lib/allPages.js";
33
+ import { useAllBankAccountsQuery as Ni } from "./lib/bank-account/useAllBankAccountsQuery.js";
34
+ import { useAllDebitCardsQuery as Pi } from "./lib/debit-card/useAllDebitCardsQuery.js";
35
+ import { useAllExternalBankAccountsQuery as Fi } from "./lib/external-bank-account/useAllExternalBankAccountsQuery.js";
36
+ import { useAllMerchantCategoryGroupsQuery as Ii } from "./lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js";
37
+ import { useAllLedgerAccountsQuery as Li, useLedgerAccountsQuery as Ri } from "./lib/reference-data/useLedgerAccountsQuery.js";
38
+ import { usePaymentTermsQuery as zi } from "./lib/reference-data/usePaymentTermsQuery.js";
39
+ import { useOrganizationQuery as Bi } from "./lib/organization/useOrganizationQuery.js";
40
+ import { useAllOrganizationRolesQuery as Vi } from "./lib/role/useAllOrganizationRolesQuery.js";
40
41
  import "./lib/data-export/useDataExportQueries.js";
41
- import { useRolePermissionsQueries as Vi } from "./lib/role/useRolePermissionsQueries.js";
42
- import { useAllOrganizationUsersQuery as Hi } from "./lib/user/useAllOrganizationUsersQuery.js";
43
- import { personDisclosure as Ui } from "./lib/disclosures/personDisclosure.js";
44
- import { useAcceptWidgetDisclosures as Wi } from "./lib/disclosures/useAcceptWidgetDisclosures.js";
45
- import { useDisclosuresQuery as Gi } from "./lib/disclosures/useDisclosuresQuery.js";
46
- import { OnboardingSuppressionReason as Ki } from "./lib/onboardingSuppressionReason.js";
47
- import { useOrganizationOnboardingSuppression as qi } from "./lib/useOrganizationOnboardingSuppression.js";
48
- import { useOrganizationApplicationStatus as Ji } from "./lib/useOrganizationApplicationStatus.js";
49
- export { ui as EmbedApiProvider, Ki as OnboardingSuppressionReason, qr as OrganizationStatus, Ei as Scope, Xe as activateCreditCardMutation, Ze as activateDebitCardMutation, Zr as applicationStatusInvalidationKey, Qr as applicationStatusQueryOptions, li as attachTransportInterceptors, e as bulkUpdateDepartmentMembers, t as bulkUpdateLocationMembers, n as bulkUpdateRoleMembers, ei as cancelAllClients, si as cloneEmbeddedClient, Qe as connectExternalBankAccountMutation, $e as createAchMoneyMovementMutation, et as createApplicationMutation, tt as createBankAccountMutation, nt as createBookTransferMutation, rt as createCheckDepositMutation, $r as createClientSecretInstaller, it as createDebitCardMutation, r as createDepartment, ci as createEmbeddedClient, i as createLocation, a as createUser, at as createVelocityControlMutation, o as deactivateDepartment, s as deactivateLocation, ot as deleteApprovalPoliciesIdMutation, st as deleteBankAccountApplicationMutation, c as deleteCounterpartsId, l as deleteCounterpartsIdBankAccountsId, u as deleteEntitiesIdLogo, d as deleteFilesId, ct as deleteLedgerAccountsIdMutation, f as deleteMeasureUnitsId, p as deletePayablesId, m as deletePayablesIdFile, h as deleteProductsId, lt as deleteReceiptsIdMutation, g as deleteReceivablesId, ut as disableUserMutation, _ as downloadBankAccountTransactions, mi as fetchWidgetInit, v as getAggregateHistoricalBalances, dt as getAggregateHistoricalBalancesQueryKey, Oi as getAllPagesNextPageParam, ki as getAllPagesNextPaginationTokenParam, ft as getAnalyticsExpensesOptions, pt as getAnalyticsExpensesQueryKey, mt as getAnalyticsPayablesOptions, ht as getAnalyticsPayablesQueryKey, gt as getAnalyticsReceiptsOptions, _t as getAnalyticsReceiptsQueryKey, vt as getAnalyticsReceivablesOptions, yt as getAnalyticsReceivablesQueryKey, y as getApplicationStatus, b as getApprovalPolicies, bt as getApprovalPoliciesIdProcessesIdStepsOptions, xt as getApprovalPoliciesIdProcessesIdStepsQueryKey, St as getApprovalPoliciesIdProcessesOptions, Ct as getApprovalPoliciesIdProcessesQueryKey, wt as getApprovalPoliciesOptions, Tt as getApprovalPoliciesQueryKey, x as getApprovalRequests, Et as getApprovalRequestsOptions, Dt as getApprovalRequestsQueryKey, S as getBankAccountAccess, Ot as getBankAccountAccessQueryKey, kt as getBankAccountApplicationOptions, C as getBankAccountHistoricalBalances, At as getBankAccountHistoricalBalancesQueryKey, jt as getBankAccountOptions, Mt as getBankAccountQueryKey, w as getBankAccountStatement, Nt as getBankAccountStatementsOptions, Pt as getBankAccountTransactionsOptions, Ft as getBankAccountTransactionsQueryKey, It as getBankAccountsQueryKey, Lt as getBankDetailsIdOptions, Rt as getBankDetailsOptions, zt as getBankDetailsQueryKey, T as getCounterparts, Bt as getCounterpartsIdAddressesOptions, Vt as getCounterpartsIdAddressesQueryKey, Ht as getCounterpartsIdBankAccountsOptions, Ut as getCounterpartsIdBankAccountsQueryKey, Wt as getCounterpartsIdOptions, Gt as getCounterpartsIdQueryKey, Kt as getCounterpartsOptions, qt as getCounterpartsQueryKey, Jt as getCreditCardByIdOptions, Yt as getCreditCardByIdQueryKey, Xt as getCreditCardsOptions, Zt as getCreditCardsQueryKey, Qt as getDebitCardByIdOptions, $t as getDebitCardByIdQueryKey, en as getDebitCardCredentialsOptions, tn as getDebitCardSpendSummaryOptions, nn as getDebitCardsOptions, rn as getDebitCardsQueryKey, E as getDepartment, an as getDepartmentOptions, on as getDepartmentQueryKey, D as getDepositableBankAccounts, sn as getDepositableBankAccountsOptions, cn as getDocumentsIdNextNumbersOptions, ln as getDocumentsIdNextNumbersQueryKey, un as getEntitiesIdPaymentMethodsOptions, dn as getEntitiesIdSettingsOptions, fn as getEntitiesIdSettingsQueryKey, pn as getEntityUsersOptions, mn as getExpensesIdExpenseHistoryOptions, hn as getExpensesIdExpenseHistoryQueryKey, gn as getExpensesIdOptions, _n as getExpensesIdQueryKey, vn as getExpensesOptions, yn as getExpensesQueryKey, bn as getExpensesValidationsOptions, xn as getExpensesValidationsQueryKey, O as getExternalBankAccountAccess, Sn as getExternalBankAccountAccessQueryKey, Cn as getExternalBankAccountOptions, wn as getExternalBankAccountsOptions, Tn as getExternalBankAccountsQueryKey, En as getFilesQueryKey, Dn as getLedgerAccountsQueryKey, k as getLocation, On as getLocationOptions, kn as getLocationQueryKey, An as getMeOptions, jn as getMeasureUnitsOptions, Mn as getMeasureUnitsQueryKey, Nn as getOrganizationOptions, Pn as getOrganizationTransactionsOptions, Fn as getOrganizationTransfersOptions, In as getOrganizationTransfersQueryKey, Ln as getOverdueRemindersOptions, Rn as getOverdueRemindersQueryKey, A as getPayables, j as getPayablesId, M as getPayablesIdHistory, zn as getPayablesIdHistoryOptions, Bn as getPayablesIdHistoryQueryKey, N as getPayablesIdLineItems, Vn as getPayablesIdLineItemsOptions, Hn as getPayablesIdLineItemsQueryKey, Un as getPayablesIdOptions, Wn as getPayablesIdQueryKey, Gn as getPayablesIdSuggestionsOptions, Kn as getPayablesOptions, qn as getPayablesQueryKey, P as getPaymentRecords, Jn as getPaymentRecordsOptions, Yn as getPaymentRecordsQueryKey, Xn as getPaymentRemindersOptions, Zn as getPaymentRemindersQueryKey, F as getProducts, Qn as getProductsIdOptions, $n as getProductsIdQueryKey, er as getProductsOptions, tr as getProductsQueryKey, I as getReceipts, nr as getReceiptsIdQueryKey, rr as getReceiptsOptions, ir as getReceiptsQueryKey, L as getReceivables, R as getReceivablesIdHistory, ar as getReceivablesIdHistoryQueryKey, or as getReceivablesIdMailsQueryKey, sr as getReceivablesIdOptions, cr as getReceivablesIdPdfLinkOptions, lr as getReceivablesIdPdfLinkQueryKey, ur as getReceivablesIdQueryKey, dr as getReceivablesOptions, fr as getReceivablesQueryKey, pr as getReceivablesRequiredFieldsOptions, mr as getRecurrencesIdOptions, hr as getRecurrencesIdQueryKey, gr as getRecurrencesOptions, _r as getRecurrencesQueryKey, z as getUsers, vr as getUsersOptions, yr as getUsersQueryKey, br as getVelocityControlsQueryKey, xr as grantBankAccountAccessMutation, Sr as grantExternalBankAccountAccessMutation, hi as hasAnyScope, ti as invalidateAllClients, Ai as isAllPagesResolving, bi as isApiConflictError, xi as isApiForbiddenError, Si as isApiNotFoundError, Ci as isApiUnprocessableError, Jr as isOrganizationOnItsWay, Di as isScope, Cr as linkExternalBankAccountMutation, B as listDepartments, wr as listDepartmentsOptions, Tr as listDepartmentsQueryKey, V as listLocations, Er as listLocationsOptions, Dr as listLocationsQueryKey, H as listRoles, Or as listRolesQueryKey, U as manageBankAccountAccess, W as manageDebitCardAccess, kr as manageDebitCardAccessMutation, gi as myEntityInvalidationKey, fi as optionalOrganizationHeaders, pi as organizationHeaders, Ar as patchApprovalPoliciesIdMutation, G as patchCounterpartsId, K as patchCounterpartsIdAddressesId, q as patchCounterpartsIdBankAccountsId, J as patchEntitiesIdSettings, Y as patchExpensesId, jr as patchLedgerAccountsIdMutation, X as patchMeasureUnitsId, Z as patchPayablesId, Q as patchProductsId, Mr as patchReceiptsIdMutation, $ as patchReceivablesId, ee as patchRecurrencesId, Ui as personDisclosure, Nr as postApprovalPoliciesMutation, te as postApprovalRequestsIdApprove, ne as postApprovalRequestsIdReject, re as postBankDetails, ie as postCounterparts, ae as postCounterpartsIdAddresses, oe as postCounterpartsIdBankAccounts, se as postExpensesIdApprove, ce as postExpensesIdReject, le as postExpensesIdReopen, ue as postExpensesIdSubmit, de as postFiles, Pr as postLedgerAccountsMutation, fe as postMeasureUnits, pe as postOverdueReminders, me as postPayables, he as postPayablesIdApprovePaymentOperation, ge as postPayablesIdAttachFile, _e as postPayablesIdCancel, ve as postPayablesIdDuplicatesIdConfirm, ye as postPayablesIdDuplicatesIdDismiss, be as postPayablesIdMarkAsPaid, xe as postPayablesIdReject, Se as postPayablesIdReopen, Ce as postPayablesIdSchedulePayment, we as postPayablesIdSubmitForApproval, Te as postPayablesIdValidate, Ee as postPayablesUploadFromFile, De as postPaymentIntentsIdCancel, Oe as postPaymentRecords, ke as postPaymentReminders, Ae as postProducts, Fr as postReceiptsUploadFromFileMutation, je as postReceivables, Me as postReceivablesIdAccept, Ne as postReceivablesIdCancel, Pe as postReceivablesIdClone, Fe as postReceivablesIdDecline, Ie as postReceivablesIdIssue, Le as postReceivablesIdMarkAsPaid, Re as postReceivablesIdMarkAsUncollectible, ze as postReceivablesIdSend, Be as postRecurrences, Ve as postRecurrencesIdCancel, He as postRecurrencesIdPause, Ue as postRecurrencesIdResume, We as putEntitiesIdLogo, Ir as putExpensesValidationsMutation, Ge as putPayablesIdLineItems, ni as registerQueryClient, ri as removeInactiveFromAllClients, Ke as resendUserInvitation, ii as resetAllClients, ai as setAllClientsQueriesData, Lr as setDebitCardLockStatusMutation, Rr as submitApplicationMutation, zr as unlinkExternalBankAccountMutation, oi as unregisterQueryClient, Br as updateApplicationMutation, Vr as updateBankAccountMutation, Hr as updateDebitCardMutation, qe as updateDepartment, Ur as updateExternalBankAccountMutation, Je as updateLocation, Ye as updateUser, Wi as useAcceptWidgetDisclosures, Mi as useAllBankAccountsQuery, Ni as useAllDebitCardsQuery, Pi as useAllExternalBankAccountsQuery, Ii as useAllLedgerAccountsQuery, Fi as useAllMerchantCategoryGroupsQuery, Bi as useAllOrganizationRolesQuery, Hi as useAllOrganizationUsersQuery, ji as useAutoFetchNextPage, _i as useCurrentUserQuery, Gi as useDisclosuresQuery, di as useEmbedApi, wi as useGetUserDataQuery, Li as useLedgerAccountsQuery, yi as useMailboxAddress, vi as useMyEntityQuery, Ji as useOrganizationApplicationStatus, qi as useOrganizationOnboardingSuppression, zi as useOrganizationQuery, Ri as usePaymentTermsQuery, Vi as useRolePermissionsQueries, Ti as useUpsertUserDataMutation, Wr as validateExternalBankAccountMutation, Gr as verifyDebitCardMutation, Kr as widgetTokenCacheId, Yr as withAuthEpoch, Xr as withAuthEpochInfinite };
42
+ import { useRolePermissionsQueries as Hi } from "./lib/role/useRolePermissionsQueries.js";
43
+ import { useAllOrganizationUsersQuery as Ui } from "./lib/user/useAllOrganizationUsersQuery.js";
44
+ import { personDisclosure as Wi } from "./lib/disclosures/personDisclosure.js";
45
+ import { useAcceptWidgetDisclosures as Gi } from "./lib/disclosures/useAcceptWidgetDisclosures.js";
46
+ import { useDisclosuresQuery as Ki } from "./lib/disclosures/useDisclosuresQuery.js";
47
+ import { OnboardingSuppressionReason as qi } from "./lib/onboardingSuppressionReason.js";
48
+ import { useOrganizationOnboardingSuppression as Ji } from "./lib/useOrganizationOnboardingSuppression.js";
49
+ import { useOrganizationApplicationStatus as Yi } from "./lib/useOrganizationApplicationStatus.js";
50
+ export { ui as EmbedApiProvider, qi as OnboardingSuppressionReason, qr as OrganizationStatus, Di as Scope, Xe as activateCreditCardMutation, Ze as activateDebitCardMutation, Zr as applicationStatusInvalidationKey, Qr as applicationStatusQueryOptions, li as attachTransportInterceptors, e as bulkUpdateDepartmentMembers, t as bulkUpdateLocationMembers, n as bulkUpdateRoleMembers, ei as cancelAllClients, si as cloneEmbeddedClient, Qe as connectExternalBankAccountMutation, $e as createAchMoneyMovementMutation, et as createApplicationMutation, tt as createBankAccountMutation, nt as createBookTransferMutation, rt as createCheckDepositMutation, $r as createClientSecretInstaller, it as createDebitCardMutation, r as createDepartment, ci as createEmbeddedClient, i as createLocation, a as createUser, at as createVelocityControlMutation, o as deactivateDepartment, s as deactivateLocation, ot as deleteApprovalPoliciesIdMutation, st as deleteBankAccountApplicationMutation, c as deleteCounterpartsId, l as deleteCounterpartsIdBankAccountsId, u as deleteEntitiesIdLogo, d as deleteFilesId, ct as deleteLedgerAccountsIdMutation, f as deleteMeasureUnitsId, p as deletePayablesId, m as deletePayablesIdFile, h as deleteProductsId, lt as deleteReceiptsIdMutation, g as deleteReceivablesId, ut as disableUserMutation, _ as downloadBankAccountTransactions, mi as fetchWidgetInit, v as getAggregateHistoricalBalances, dt as getAggregateHistoricalBalancesQueryKey, ki as getAllPagesNextPageParam, Ai as getAllPagesNextPaginationTokenParam, ft as getAnalyticsExpensesOptions, pt as getAnalyticsExpensesQueryKey, mt as getAnalyticsPayablesOptions, ht as getAnalyticsPayablesQueryKey, gt as getAnalyticsReceiptsOptions, _t as getAnalyticsReceiptsQueryKey, vt as getAnalyticsReceivablesOptions, yt as getAnalyticsReceivablesQueryKey, y as getApplicationStatus, b as getApprovalPolicies, bt as getApprovalPoliciesIdProcessesIdStepsOptions, xt as getApprovalPoliciesIdProcessesIdStepsQueryKey, St as getApprovalPoliciesIdProcessesOptions, Ct as getApprovalPoliciesIdProcessesQueryKey, wt as getApprovalPoliciesOptions, Tt as getApprovalPoliciesQueryKey, x as getApprovalRequests, Et as getApprovalRequestsOptions, Dt as getApprovalRequestsQueryKey, S as getBankAccountAccess, Ot as getBankAccountAccessQueryKey, kt as getBankAccountApplicationOptions, C as getBankAccountHistoricalBalances, At as getBankAccountHistoricalBalancesQueryKey, jt as getBankAccountOptions, Mt as getBankAccountQueryKey, w as getBankAccountStatement, Nt as getBankAccountStatementsOptions, Pt as getBankAccountTransactionsOptions, Ft as getBankAccountTransactionsQueryKey, It as getBankAccountsQueryKey, Lt as getBankDetailsIdOptions, Rt as getBankDetailsOptions, zt as getBankDetailsQueryKey, T as getCounterparts, Bt as getCounterpartsIdAddressesOptions, Vt as getCounterpartsIdAddressesQueryKey, Ht as getCounterpartsIdBankAccountsOptions, Ut as getCounterpartsIdBankAccountsQueryKey, Wt as getCounterpartsIdOptions, Gt as getCounterpartsIdQueryKey, Kt as getCounterpartsOptions, qt as getCounterpartsQueryKey, Jt as getCreditCardByIdOptions, Yt as getCreditCardByIdQueryKey, Xt as getCreditCardsOptions, Zt as getCreditCardsQueryKey, Qt as getDebitCardByIdOptions, $t as getDebitCardByIdQueryKey, en as getDebitCardCredentialsOptions, tn as getDebitCardSpendSummaryOptions, nn as getDebitCardsOptions, rn as getDebitCardsQueryKey, E as getDepartment, an as getDepartmentOptions, on as getDepartmentQueryKey, D as getDepositableBankAccounts, sn as getDepositableBankAccountsOptions, cn as getDocumentsIdNextNumbersOptions, ln as getDocumentsIdNextNumbersQueryKey, un as getEntitiesIdPaymentMethodsOptions, dn as getEntitiesIdSettingsOptions, fn as getEntitiesIdSettingsQueryKey, pn as getEntityUsersOptions, mn as getExpensesIdExpenseHistoryOptions, hn as getExpensesIdExpenseHistoryQueryKey, gn as getExpensesIdOptions, _n as getExpensesIdQueryKey, vn as getExpensesOptions, yn as getExpensesQueryKey, bn as getExpensesValidationsOptions, xn as getExpensesValidationsQueryKey, O as getExternalBankAccountAccess, Sn as getExternalBankAccountAccessQueryKey, Cn as getExternalBankAccountOptions, wn as getExternalBankAccountsOptions, Tn as getExternalBankAccountsQueryKey, En as getFilesQueryKey, Dn as getLedgerAccountsQueryKey, k as getLocation, On as getLocationOptions, kn as getLocationQueryKey, An as getMeOptions, jn as getMeasureUnitsOptions, Mn as getMeasureUnitsQueryKey, Nn as getOrganizationOptions, Pn as getOrganizationTransactionsOptions, Fn as getOrganizationTransfersOptions, In as getOrganizationTransfersQueryKey, Ln as getOverdueRemindersOptions, Rn as getOverdueRemindersQueryKey, A as getPayables, j as getPayablesId, M as getPayablesIdHistory, zn as getPayablesIdHistoryOptions, Bn as getPayablesIdHistoryQueryKey, N as getPayablesIdLineItems, Vn as getPayablesIdLineItemsOptions, Hn as getPayablesIdLineItemsQueryKey, Un as getPayablesIdOptions, Wn as getPayablesIdQueryKey, Gn as getPayablesIdSuggestionsOptions, Kn as getPayablesOptions, qn as getPayablesQueryKey, P as getPaymentRecords, Jn as getPaymentRecordsOptions, Yn as getPaymentRecordsQueryKey, Xn as getPaymentRemindersOptions, Zn as getPaymentRemindersQueryKey, F as getProducts, Qn as getProductsIdOptions, $n as getProductsIdQueryKey, er as getProductsOptions, tr as getProductsQueryKey, I as getReceipts, nr as getReceiptsIdQueryKey, rr as getReceiptsOptions, ir as getReceiptsQueryKey, L as getReceivables, R as getReceivablesIdHistory, ar as getReceivablesIdHistoryQueryKey, or as getReceivablesIdMailsQueryKey, sr as getReceivablesIdOptions, cr as getReceivablesIdPdfLinkOptions, lr as getReceivablesIdPdfLinkQueryKey, ur as getReceivablesIdQueryKey, dr as getReceivablesOptions, fr as getReceivablesQueryKey, pr as getReceivablesRequiredFieldsOptions, mr as getRecurrencesIdOptions, hr as getRecurrencesIdQueryKey, gr as getRecurrencesOptions, _r as getRecurrencesQueryKey, z as getUsers, vr as getUsersOptions, yr as getUsersQueryKey, br as getVelocityControlsQueryKey, xr as grantBankAccountAccessMutation, Sr as grantExternalBankAccountAccessMutation, hi as hasAnyScope, bi as hasApiErrorCode, ti as invalidateAllClients, ji as isAllPagesResolving, xi as isApiConflictError, Si as isApiForbiddenError, Ci as isApiNotFoundError, wi as isApiUnprocessableError, Jr as isOrganizationOnItsWay, Oi as isScope, Cr as linkExternalBankAccountMutation, B as listDepartments, wr as listDepartmentsOptions, Tr as listDepartmentsQueryKey, V as listLocations, Er as listLocationsOptions, Dr as listLocationsQueryKey, H as listRoles, Or as listRolesQueryKey, U as manageBankAccountAccess, W as manageDebitCardAccess, kr as manageDebitCardAccessMutation, gi as myEntityInvalidationKey, fi as optionalOrganizationHeaders, pi as organizationHeaders, Ar as patchApprovalPoliciesIdMutation, G as patchCounterpartsId, K as patchCounterpartsIdAddressesId, q as patchCounterpartsIdBankAccountsId, J as patchEntitiesIdSettings, Y as patchExpensesId, jr as patchLedgerAccountsIdMutation, X as patchMeasureUnitsId, Z as patchPayablesId, Q as patchProductsId, Mr as patchReceiptsIdMutation, $ as patchReceivablesId, ee as patchRecurrencesId, Wi as personDisclosure, Nr as postApprovalPoliciesMutation, te as postApprovalRequestsIdApprove, ne as postApprovalRequestsIdReject, re as postBankDetails, ie as postCounterparts, ae as postCounterpartsIdAddresses, oe as postCounterpartsIdBankAccounts, se as postExpensesIdApprove, ce as postExpensesIdReject, le as postExpensesIdReopen, ue as postExpensesIdSubmit, de as postFiles, Pr as postLedgerAccountsMutation, fe as postMeasureUnits, pe as postOverdueReminders, me as postPayables, he as postPayablesIdApprovePaymentOperation, ge as postPayablesIdAttachFile, _e as postPayablesIdCancel, ve as postPayablesIdDuplicatesIdConfirm, ye as postPayablesIdDuplicatesIdDismiss, be as postPayablesIdMarkAsPaid, xe as postPayablesIdReject, Se as postPayablesIdReopen, Ce as postPayablesIdSchedulePayment, we as postPayablesIdSubmitForApproval, Te as postPayablesIdValidate, Ee as postPayablesUploadFromFile, De as postPaymentIntentsIdCancel, Oe as postPaymentRecords, ke as postPaymentReminders, Ae as postProducts, Fr as postReceiptsUploadFromFileMutation, je as postReceivables, Me as postReceivablesIdAccept, Ne as postReceivablesIdCancel, Pe as postReceivablesIdClone, Fe as postReceivablesIdDecline, Ie as postReceivablesIdIssue, Le as postReceivablesIdMarkAsPaid, Re as postReceivablesIdMarkAsUncollectible, ze as postReceivablesIdSend, Be as postRecurrences, Ve as postRecurrencesIdCancel, He as postRecurrencesIdPause, Ue as postRecurrencesIdResume, We as putEntitiesIdLogo, Ir as putExpensesValidationsMutation, Ge as putPayablesIdLineItems, ni as registerQueryClient, ri as removeInactiveFromAllClients, Ke as resendUserInvitation, ii as resetAllClients, ai as setAllClientsQueriesData, Lr as setDebitCardLockStatusMutation, Rr as submitApplicationMutation, zr as unlinkExternalBankAccountMutation, oi as unregisterQueryClient, Br as updateApplicationMutation, Vr as updateBankAccountMutation, Hr as updateDebitCardMutation, qe as updateDepartment, Ur as updateExternalBankAccountMutation, Je as updateLocation, Ye as updateUser, Gi as useAcceptWidgetDisclosures, Ni as useAllBankAccountsQuery, Pi as useAllDebitCardsQuery, Fi as useAllExternalBankAccountsQuery, Li as useAllLedgerAccountsQuery, Ii as useAllMerchantCategoryGroupsQuery, Vi as useAllOrganizationRolesQuery, Ui as useAllOrganizationUsersQuery, Mi as useAutoFetchNextPage, _i as useCurrentUserQuery, Ki as useDisclosuresQuery, di as useEmbedApi, Ti as useGetUserDataQuery, Ri as useLedgerAccountsQuery, yi as useMailboxAddress, vi as useMyEntityQuery, Yi as useOrganizationApplicationStatus, Ji as useOrganizationOnboardingSuppression, Bi as useOrganizationQuery, zi as usePaymentTermsQuery, Hi as useRolePermissionsQueries, Ei as useUpsertUserDataMutation, Wr as validateExternalBankAccountMutation, Gr as verifyDebitCardMutation, Kr as widgetTokenCacheId, Yr as withAuthEpoch, Xr as withAuthEpochInfinite };
@@ -16,10 +16,10 @@ function n(t) {
16
16
  function r(e, t) {
17
17
  return e === t || e === String(t);
18
18
  }
19
- function i(i, a) {
20
- if (r(n(i), a)) return !0;
21
- if (!e(i)) return !1;
22
- for (let e of t) if (r(n(i[e]), a)) return !0;
23
- return !1;
19
+ function i(e, t) {
20
+ return a(e, (e) => r(n(e), t));
24
21
  }
25
- export { i as hasApiStatus, e as isRecord };
22
+ function a(n, r) {
23
+ return r(n) ? !0 : e(n) ? t.some((e) => r(n[e])) : !1;
24
+ }
25
+ export { i as hasApiStatus, e as isRecord, a as someApiBody };
@@ -0,0 +1,6 @@
1
+ import { isRecord as e, someApiBody as t } from "./apiErrorStatus.js";
2
+ // ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/hasApiErrorCode.js
3
+ function n(n, r) {
4
+ return t(n, (t) => e(t) && t.errorCode === r);
5
+ }
6
+ export { n as hasApiErrorCode };
@@ -1,5 +1,5 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.11.260", n = "6745b617dac274874639a31b29340821c6778ffd", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.263", n = "0c259ea207f363cb44fe5c5e3e70bdd24d5415c4", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.11.260",
3
+ "version": "0.11.263",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [