@tesouro/embedded-components-react 0.5.126 → 0.5.129

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 (15) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index8.js +91 -91
  2. package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index2.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index3.js +1 -1
  4. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index3.js +1 -1
  5. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js +8 -5
  9. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +10 -10
  10. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +20 -30
  11. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +27 -9
  12. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index2.js +1 -1
  15. package/package.json +1 -1
@@ -11,96 +11,96 @@ import { AccountDetailsWidgetAnalyticsEvent as i } from "./index2.js";
11
11
  import { formatDateParam as a, getDefaultExportDateRange as te, isExportRangeValid as o, startOfLocalDay as s, triggerCsvDownload as c, yesterdayLocal as l } from "./index3.js";
12
12
  import { copyTextToClipboard as ne, formatAmountLabel as u, formatSignedTransactionAmountLabel as re, formatTransactionDateLabel as ie, maskAccountNumber as ae } from "./index4.js";
13
13
  import { DEFAULT_FEATURE_LABELS as oe } from "./index5.js";
14
- import { getBankAccountsPermissions as d } from "./index6.js";
15
- import { interpolateLabel as f } from "./index7.js";
16
- import { useBankAccountDetailsQuery as p } from "../../data-access/dist/index2.js";
17
- import { useBankAccountTransactionsQuery as m } from "../../data-access/dist/index3.js";
18
- import { useDownloadBankAccountTransactionsMutation as h } from "../../data-access/dist/index4.js";
19
- import { useUpdateBankAccountMutation as g } from "../../data-access/dist/index5.js";
14
+ import { getBankAccountsPermissions as se } from "./index6.js";
15
+ import { interpolateLabel as d } from "./index7.js";
16
+ import { useBankAccountDetailsQuery as f } from "../../data-access/dist/index2.js";
17
+ import { useBankAccountTransactionsQuery as p } from "../../data-access/dist/index3.js";
18
+ import { useDownloadBankAccountTransactionsMutation as m } from "../../data-access/dist/index4.js";
19
+ import { useUpdateBankAccountMutation as h } from "../../data-access/dist/index5.js";
20
20
  import "../../data-access/dist/index.js";
21
- import { DEFAULT_LABELS as se } from "../../ui/dist/index7.js";
22
- import { AccountDetailsWidgetUi as ce } from "../../ui/dist/index8.js";
21
+ import { DEFAULT_LABELS as ce } from "../../ui/dist/index7.js";
22
+ import { AccountDetailsWidgetUi as le } from "../../ui/dist/index8.js";
23
23
  import "../../ui/dist/index.js";
24
- import { useCallback as _, useEffect as le, useMemo as v, useState as y } from "react";
25
- import { jsx as ue } from "react/jsx-runtime";
24
+ import { useCallback as g, useEffect as ue, useMemo as _, useState as v } from "react";
25
+ import { jsx as de } from "react/jsx-runtime";
26
26
  //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index8.js
27
- var de = 3e3, fe = 5e3, pe = { nickname: "" };
28
- function b({ accountId: b, onBack: me, labels: he, featureLabels: ge, isBankingTaglineVisible: _e = !0, bankLogoSrc: ve, bankLogoAlt: ye, bankAddress: be, supportTeamUrl: xe }) {
29
- let x = {
30
- ...se,
31
- ...he
32
- }, S = {
33
- ...oe,
27
+ var fe = 3e3, pe = 5e3, me = { nickname: "" };
28
+ function y({ accountId: y, onBack: he, labels: ge, featureLabels: _e, isBankingTaglineVisible: ve = !0, bankLogoSrc: ye, bankLogoAlt: be, bankAddress: xe, supportTeamUrl: Se }) {
29
+ let b = {
30
+ ...ce,
34
31
  ...ge
35
- }, C = t(), { organizationId: Se, widgetToken: Ce, initResponse: w } = n(), T = ee(), E = !!r(), D = !!(Se && Ce), O = v(() => d(w?.scopes), [w?.scopes]), k = D && O.canRead && !!w, [A, we] = y("transactions"), [Te, j] = y(!1), [M, N] = y(pe), [Ee, De] = y(!1), [Oe, P] = y(!1), [ke, F] = y(!1), [Ae, je] = y(!1), [Me, I] = y(!1), [L, R] = y(), [z, B] = y();
36
- le(() => {
37
- C(i.Mounted);
38
- }, [C]);
39
- let V = p({
40
- id: b,
32
+ }, x = {
33
+ ...oe,
34
+ ..._e
35
+ }, S = t(), { organizationId: Ce, widgetToken: we, initResponse: C } = n(), w = ee(), T = !!r(), E = !!(Ce && we), D = _(() => se(C?.scopes), [C?.scopes]), O = D.canRead && !!C, k = E && O, [A, Te] = v("transactions"), [Ee, j] = v(!1), [M, N] = v(me), [De, Oe] = v(!1), [ke, P] = v(!1), [Ae, F] = v(!1), [je, Me] = v(!1), [Ne, I] = v(!1), [L, R] = v(), [z, B] = v();
36
+ ue(() => {
37
+ S(i.Mounted);
38
+ }, [S]);
39
+ let V = f({
40
+ id: y,
41
41
  enabled: k
42
- }), H = m({
43
- id: b,
42
+ }), H = p({
43
+ id: y,
44
44
  enabled: k && A === "transactions",
45
45
  limit: 25,
46
46
  sortBy: "DATE",
47
47
  sortOrder: "DESC"
48
- }), Ne = g(), Pe = h(), { mutate: Fe, isPending: Ie, isError: U, reset: W } = Ne, { mutateAsync: G, isPending: Le } = Pe, K = k ? V.data : void 0, q = w?.bankName?.trim() ?? "", J = be?.trim() || void 0, Y = { bankName: q }, Re = v(() => f(x.domesticWireIntro, Y), [x.domesticWireIntro, q]), ze = v(() => f(x.domesticWireNote, Y), [x.domesticWireNote, q]), Be = v(() => f(x.thingsToKnowBody, Y), [x.thingsToKnowBody, q]), X = K?.nickname?.trim() || S.accountFallback, Ve = u(K?.balance), Z = v(() => (H.data?.data ?? []).map((e, t) => ({
48
+ }), Pe = h(), Fe = m(), { mutate: Ie, isPending: Le, isError: U, reset: W } = Pe, { mutateAsync: G, isPending: Re } = Fe, K = O ? V.data : void 0, q = C?.bankName?.trim() ?? "", J = xe?.trim() || void 0, Y = { bankName: q }, ze = _(() => d(b.domesticWireIntro, Y), [b.domesticWireIntro, q]), Be = _(() => d(b.domesticWireNote, Y), [b.domesticWireNote, q]), X = _(() => d(b.thingsToKnowBody, Y), [b.thingsToKnowBody, q]), Ve = K?.nickname?.trim() || x.accountFallback, He = u(K?.balance), Z = _(() => (H.data?.data ?? []).map((e, t) => ({
49
49
  key: `${e.date}-${t}`,
50
50
  descriptionLabel: e.description,
51
51
  dateLabel: ie(e.date),
52
52
  amountLabel: re(e.amount, e.direction),
53
53
  amountVariant: e.direction === "CREDIT" ? "positive" : "default",
54
54
  balanceLabel: u(e.runningBalance)
55
- })), [H.data?.data]), He = O.canRead && Z.length > 0, Ue = !o(L, z), We = v(() => {
55
+ })), [H.data?.data]), Ue = D.canRead && Z.length > 0, We = !o(L, z), Ge = _(() => {
56
56
  let e = [{ after: l() }];
57
57
  return z && e.push({ after: s(z) }), e;
58
- }, [z]), Ge = v(() => {
58
+ }, [z]), Ke = _(() => {
59
59
  let e = [{ after: l() }];
60
60
  return L && e.push({ before: s(L) }), e;
61
- }, [L]), Ke = _((e) => {
61
+ }, [L]), qe = g((e) => {
62
62
  if (e) {
63
63
  let { startDate: e, endDate: t } = te();
64
64
  R(e), B(t);
65
65
  }
66
66
  I(e);
67
- }, []), qe = _(async () => {
68
- if (!D || !O.canRead || !L || !z || !o(L, z)) return;
67
+ }, []), Je = g(async () => {
68
+ if (!E || !D.canRead || !L || !z || !o(L, z)) return;
69
69
  I(!1);
70
- let t = e.loading(S.exportLoadingToast);
70
+ let t = e.loading(x.exportLoadingToast);
71
71
  try {
72
72
  let n = await G({
73
- id: b,
73
+ id: y,
74
74
  startDate: a(L),
75
75
  endDate: a(z)
76
76
  });
77
- c(n.csv, n.filename), e.success(S.exportSuccessToast, {
77
+ c(n.csv, n.filename), e.success(x.exportSuccessToast, {
78
78
  id: t,
79
- duration: de
79
+ duration: fe
80
80
  });
81
81
  } catch {
82
- e.error(S.exportErrorToast, {
82
+ e.error(x.exportErrorToast, {
83
83
  id: t,
84
- duration: fe
84
+ duration: pe
85
85
  });
86
86
  }
87
87
  }, [
88
- b,
88
+ y,
89
89
  G,
90
90
  z,
91
91
  L,
92
- S.exportErrorToast,
93
- S.exportLoadingToast,
94
- S.exportSuccessToast,
95
- D,
96
- O.canRead
97
- ]), Q = _(async (t, n) => {
92
+ x.exportErrorToast,
93
+ x.exportLoadingToast,
94
+ x.exportSuccessToast,
95
+ E,
96
+ D.canRead
97
+ ]), Q = g(async (t, n) => {
98
98
  if (!await ne(t)) return;
99
99
  let r = {
100
- account: S.copyAccountNumberToast,
101
- routing: S.copyRoutingNumberToast,
102
- bankName: S.copyBankNameToast,
103
- bankAddress: S.copyBankAddressToast
100
+ account: x.copyAccountNumberToast,
101
+ routing: x.copyRoutingNumberToast,
102
+ bankName: x.copyBankNameToast,
103
+ bankAddress: x.copyBankAddressToast
104
104
  };
105
105
  if (e.success(r[n]), n === "account") {
106
106
  P(!0), window.setTimeout(() => P(!1), 2e3);
@@ -108,89 +108,89 @@ function b({ accountId: b, onBack: me, labels: he, featureLabels: ge, isBankingT
108
108
  }
109
109
  n === "routing" && (F(!0), window.setTimeout(() => F(!1), 2e3));
110
110
  }, [
111
- S.copyAccountNumberToast,
112
- S.copyBankAddressToast,
113
- S.copyBankNameToast,
114
- S.copyRoutingNumberToast
111
+ x.copyAccountNumberToast,
112
+ x.copyBankAddressToast,
113
+ x.copyBankNameToast,
114
+ x.copyRoutingNumberToast
115
115
  ]), $ = (e) => {
116
116
  e && (N({ nickname: K?.nickname?.trim() ?? "" }), W()), j(e);
117
117
  };
118
- return /* @__PURE__ */ ue(ce, {
119
- labels: x,
120
- title: X,
118
+ return /* @__PURE__ */ de(le, {
119
+ labels: b,
120
+ title: Ve,
121
121
  bankDisplayName: q,
122
- bankLogoSrc: ve,
123
- bankLogoAlt: ye,
124
- balanceLabel: Ve,
122
+ bankLogoSrc: ye,
123
+ bankLogoAlt: be,
124
+ balanceLabel: He,
125
125
  balanceTestId: "bank-accounts-widget-detail-balance",
126
- isBankingTaglineVisible: _e,
126
+ isBankingTaglineVisible: ve,
127
127
  activeTab: A,
128
128
  transactionRows: Z,
129
- showExport: He,
130
- isExportOpen: Me,
129
+ showExport: Ue,
130
+ isExportOpen: Ne,
131
131
  exportStartDate: L,
132
132
  exportEndDate: z,
133
- isExportDownloading: Le,
134
- isExportDownloadDisabled: Ue,
135
- disabledExportStartDates: We,
136
- disabledExportEndDates: Ge,
133
+ isExportDownloading: Re,
134
+ isExportDownloadDisabled: We,
135
+ disabledExportStartDates: Ge,
136
+ disabledExportEndDates: Ke,
137
137
  accountNumberLabel: K?.accountNumber ?? "",
138
138
  maskedAccountNumberLabel: ae(K?.accountNumber ?? ""),
139
139
  accountNumberTestId: "bank-accounts-widget-detail-account-number",
140
140
  wireAccountNumberLabel: K?.accountNumber ?? "",
141
141
  routingNumberLabel: K?.routingNumber ?? "",
142
142
  bankAddressLabel: J,
143
- domesticWireIntroLabel: Re,
144
- domesticWireNoteLabel: ze,
145
- thingsToKnowBodyLabel: Be,
146
- supportTeamHref: xe,
147
- isAccountNumberVisible: Ee,
148
- isAccountNumberCopied: Oe,
149
- isRoutingNumberCopied: ke,
150
- isDomesticWireExpanded: Ae,
151
- isLoading: !E && (!D || T && !w || k && (V.isLoading || A === "transactions" && H.isLoading)),
152
- isError: E || k && (V.isError || A === "transactions" && H.isError),
153
- isEditOpen: Te,
154
- isEditDisabled: !O.canWrite,
143
+ domesticWireIntroLabel: ze,
144
+ domesticWireNoteLabel: Be,
145
+ thingsToKnowBodyLabel: X,
146
+ supportTeamHref: Se,
147
+ isAccountNumberVisible: De,
148
+ isAccountNumberCopied: ke,
149
+ isRoutingNumberCopied: Ae,
150
+ isDomesticWireExpanded: je,
151
+ isLoading: !T && (!E && !(C && K) || w && !C || k && (V.isLoading || A === "transactions" && H.isLoading)),
152
+ isError: T || k && (V.isError || A === "transactions" && H.isError),
153
+ isEditOpen: Ee,
154
+ isEditDisabled: !D.canWrite,
155
155
  isEditError: U,
156
- isSubmitting: Ie,
156
+ isSubmitting: Le,
157
157
  editForm: M,
158
- canEdit: O.canWrite,
159
- onBack: me,
160
- onTabChange: we,
161
- onToggleAccountNumberVisibility: () => De((e) => !e),
158
+ canEdit: D.canWrite,
159
+ onBack: he,
160
+ onTabChange: Te,
161
+ onToggleAccountNumberVisibility: () => Oe((e) => !e),
162
162
  onCopyAccountNumber: () => void Q(K?.accountNumber ?? "", "account"),
163
163
  onCopyRoutingNumber: () => void Q(K?.routingNumber ?? "", "routing"),
164
164
  onCopyBankName: () => void Q(q, "bankName"),
165
165
  onCopyBankAddress: () => void Q(J ?? "", "bankAddress"),
166
- onDomesticWireExpandedChange: je,
166
+ onDomesticWireExpandedChange: Me,
167
167
  onEditOpenChange: $,
168
168
  onEditFormChange: (e) => {
169
169
  U && W(), N(e);
170
170
  },
171
171
  onEditSubmit: () => {
172
- if (!D || !O.canWrite) return;
172
+ if (!E || !D.canWrite) return;
173
173
  let t = M.nickname.trim();
174
- t && Fe({
175
- path: { id: b },
174
+ t && Ie({
175
+ path: { id: y },
176
176
  body: { nickname: t }
177
177
  }, {
178
178
  onSuccess: () => {
179
- C(i.AccountUpdated, { accountId: b }), e.success(S.editSuccessToast), j(!1);
179
+ S(i.AccountUpdated, { accountId: y }), e.success(x.editSuccessToast), j(!1);
180
180
  },
181
181
  onError: () => {
182
- e.error(S.editErrorToast);
182
+ e.error(x.editErrorToast);
183
183
  }
184
184
  });
185
185
  },
186
186
  onEditNicknameClick: () => $(!0),
187
- onExportOpenChange: Ke,
187
+ onExportOpenChange: qe,
188
188
  onExportStartDateChange: R,
189
189
  onExportEndDateChange: B,
190
190
  onExportDownload: () => {
191
- qe();
191
+ Je();
192
192
  }
193
193
  });
194
194
  }
195
195
  //#endregion
196
- export { b as AccountDetailsWidget };
196
+ export { y as AccountDetailsWidget };
@@ -16,7 +16,7 @@ function a({ enabled: a, ...o } = {}) {
16
16
  headers: r(c)
17
17
  });
18
18
  return i({
19
- ...t(d, u),
19
+ ...t(d, u, { carryWithinOrg: !0 }),
20
20
  enabled: !!(c && l) && (a === !0 || a === void 0)
21
21
  });
22
22
  }
@@ -16,7 +16,7 @@ function a({ enabled: a, ...o } = {}) {
16
16
  headers: r(c)
17
17
  });
18
18
  return i({
19
- ...t(d, u),
19
+ ...t(d, u, { carryWithinOrg: !0 }),
20
20
  enabled: !!(c && l) && (a === !0 || a === void 0)
21
21
  });
22
22
  }
@@ -15,7 +15,7 @@ function i({ enabled: i, ...a } = {}) {
15
15
  headers: { "x-organization-id": s ?? "" }
16
16
  });
17
17
  return r({
18
- ...t(d, l),
18
+ ...t(d, l, { carryWithinOrg: !0 }),
19
19
  enabled: u
20
20
  });
21
21
  }
@@ -16,7 +16,7 @@ function l({ enabled: e, ...t } = {}) {
16
16
  query: t
17
17
  });
18
18
  return c({
19
- ...a(f, u),
19
+ ...a(f, u, { carryWithinOrg: !0 }),
20
20
  enabled: d
21
21
  });
22
22
  }
@@ -16,7 +16,7 @@ function a({ enabled: a, ...o } = {}) {
16
16
  headers: r(c)
17
17
  });
18
18
  return i({
19
- ...t(d, u),
19
+ ...t(d, u, { carryWithinOrg: !0 }),
20
20
  enabled: !!(c && l) && (a === !0 || a === void 0)
21
21
  });
22
22
  }
@@ -19,7 +19,7 @@ function p({ enabled: e, ...t } = {}) {
19
19
  headers: c(r)
20
20
  });
21
21
  return f({
22
- ...a(d, l),
22
+ ...a(d, l, { carryWithinOrg: !0 }),
23
23
  enabled: u
24
24
  });
25
25
  }
@@ -7,12 +7,15 @@ function i({ client: t }) {
7
7
  return e({ client: t }).queryKey;
8
8
  }
9
9
  function a({ client: i, widgetToken: a, authEpoch: o }) {
10
- let { queryFn: s, queryKey: c } = e({ client: i });
10
+ let { queryFn: s, queryKey: c } = e({ client: i }), { placeholderData: l } = t({ queryKey: c }, o);
11
11
  return {
12
- ...t({
13
- queryKey: [c[0], { widgetTokenId: n(a) }],
14
- queryFn: s
15
- }, o),
12
+ queryKey: [
13
+ c[0],
14
+ { authEpoch: o },
15
+ { widgetTokenId: n(a) }
16
+ ],
17
+ queryFn: s,
18
+ placeholderData: l,
16
19
  retry: 2,
17
20
  retryDelay: 300,
18
21
  staleTime: r
@@ -4,7 +4,7 @@
4
4
  "use client";
5
5
  import { getBankAccounts as e } from "../rest/sdk.gen.js";
6
6
  import { getBankAccountsOptions as t } from "../rest/@tanstack/react-query.gen.js";
7
- import { useAuthEpochPlaceholder as n } from "../withAuthEpoch.js";
7
+ import { authEpochPlaceholder as n } from "../withAuthEpoch.js";
8
8
  import { useEmbedApi as r } from "../EmbedApiContext.js";
9
9
  import { organizationHeaders as i } from "../organizationHeaders.js";
10
10
  import { getAllPagesNextPageParam as a, useAutoFetchNextPage as o } from "../allPages.js";
@@ -17,9 +17,9 @@ function u({ enabled: u } = {}) {
17
17
  client: d,
18
18
  headers: h,
19
19
  query: { limit: l }
20
- }).queryKey, "all"], v = n(f ? _ : void 0), y = c({
20
+ }).queryKey, "all"], v = c({
21
21
  queryKey: [..._, { authEpoch: m }],
22
- placeholderData: v,
22
+ placeholderData: n(_),
23
23
  enabled: g,
24
24
  initialPageParam: void 0,
25
25
  queryFn: async ({ signal: t, pageParam: n }) => {
@@ -37,17 +37,17 @@ function u({ enabled: u } = {}) {
37
37
  },
38
38
  getNextPageParam: a
39
39
  });
40
- o(y, g);
41
- let b = s(() => {
42
- if (y.data) return {
43
- data: y.data.pages.flatMap((e) => e.data ?? []),
40
+ o(v, g);
41
+ let y = s(() => {
42
+ if (v.data) return {
43
+ data: v.data.pages.flatMap((e) => e.data ?? []),
44
44
  nextPaginationToken: null,
45
45
  prevPaginationToken: null
46
46
  };
47
- }, [y.data]);
47
+ }, [v.data]);
48
48
  return {
49
- ...y,
50
- data: b
49
+ ...v,
50
+ data: y
51
51
  };
52
52
  }
53
53
  //#endregion
@@ -12,44 +12,34 @@ function i(e) {
12
12
  for (let n = 0; n < e.length; n += 1) t ^= e.charCodeAt(n), t = Math.imul(t, 16777619);
13
13
  return (t >>> 0).toString(16);
14
14
  }
15
- function a(e, t) {
16
- return JSON.stringify(e.slice(0, -1)) === JSON.stringify(t);
17
- }
18
- var o = [];
19
- function s(e, t) {
20
- if (e !== void 0 && t !== void 0 && a(t.queryKey, o)) return e;
21
- }
22
- function c({ invitationToken: a, userId: c, enabled: l } = {}) {
23
- let { client: u, widgetToken: d, authEpoch: f } = n(), p = a && c ? {
15
+ function a({ invitationToken: a, userId: o, enabled: s } = {}) {
16
+ let { client: c, widgetToken: l, authEpoch: u } = n(), d = a && o ? {
24
17
  invitationToken: a,
25
- userId: c
26
- } : void 0, m = async ({ signal: t }) => {
18
+ userId: o
19
+ } : void 0, f = async ({ signal: t }) => {
27
20
  let { data: n } = await e({
28
- client: u,
29
- headers: { "X-Widget-Token": d ?? "" },
30
- ...p ? { query: p } : {},
21
+ client: c,
22
+ headers: { "X-Widget-Token": l ?? "" },
23
+ ...d ? { query: d } : {},
31
24
  signal: t,
32
25
  throwOnError: !0
33
26
  });
34
27
  if (!n) throw Error("Unexpected disclosures response from widget gateway");
35
28
  return n;
36
- }, h = ["getDisclosures", {
37
- baseUrl: u.getConfig().baseUrl,
38
- ...c ? { userId: c } : {},
39
- ...p ? { invitationTokenFingerprint: i(p.invitationToken) } : {}
40
- }];
41
- o = h;
42
- let { queryKey: g } = t({
43
- queryKey: h,
44
- queryFn: m,
45
- placeholderData: void 0
46
- }, f);
29
+ }, p = ["getDisclosures", {
30
+ baseUrl: c.getConfig().baseUrl,
31
+ ...o ? { userId: o } : {},
32
+ ...d ? { invitationTokenFingerprint: i(d.invitationToken) } : {}
33
+ }], { queryKey: m, placeholderData: h } = t({
34
+ queryKey: p,
35
+ queryFn: f
36
+ }, u);
47
37
  return r({
48
- queryKey: g,
49
- queryFn: m,
50
- placeholderData: s,
51
- enabled: !!d && (l === !0 || l === void 0)
38
+ queryKey: m,
39
+ queryFn: f,
40
+ placeholderData: h,
41
+ enabled: !!l && (s === !0 || s === void 0)
52
42
  });
53
43
  }
54
44
  //#endregion
55
- export { c as useDisclosuresQuery };
45
+ export { a as useDisclosuresQuery };
@@ -1,16 +1,34 @@
1
- import { useMemo as e } from "react";
2
1
  //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js
3
- var t = (e) => e;
4
- function n(t) {
5
- let n = t && JSON.stringify(t);
6
- return e(() => (e, t) => n === void 0 || t && JSON.stringify(t.queryKey.slice(0, -1)) === n ? e : void 0, [n]);
2
+ var e = "x-organization-id", t = (e) => typeof e == "object" && !!e && !Array.isArray(e), n = (n) => t(n.headers) ? n.headers[e] : void 0, r = ([n, ...r]) => {
3
+ if (!t(n) || !t(n.headers)) return [n, ...r];
4
+ let i = { ...n.headers };
5
+ return delete i[e], [{
6
+ ...n,
7
+ headers: i
8
+ }, ...r];
9
+ }, i = (e) => JSON.stringify(e, (e, n) => t(n) ? Object.fromEntries(Object.keys(n).sort().map((e) => [e, n[e]])) : n);
10
+ function a(e, a, o) {
11
+ let s = o ? r(e) : e, [c] = s;
12
+ return i(a && t(c) ? [c.baseUrl, n(c)] : s);
7
13
  }
8
- function r(e, n) {
14
+ function o(n) {
15
+ let [r] = n;
16
+ return t(r) && t(r.headers) && e in r.headers && !r.headers[e];
17
+ }
18
+ var s = /* @__PURE__ */ new Map(), c = 500;
19
+ function l(e, t) {
20
+ let n = o(e), r = a(e, t, n), i = `${t}:${n}:${e.length}:${r}`, l = s.get(i);
21
+ if (l) return s.delete(i), s.set(i, l), l;
22
+ let u = (i, o) => o && a(o.queryKey.slice(0, e.length), t, n) === r ? i : void 0;
23
+ return s.size >= c && s.delete(s.keys().next().value), s.set(i, u), u;
24
+ }
25
+ var u = (e) => l(e, !1);
26
+ function d(e, t, { carryWithinOrg: n = !1 } = {}) {
9
27
  return {
10
- placeholderData: t,
28
+ placeholderData: l(e.queryKey, n),
11
29
  ...e,
12
- queryKey: [...e.queryKey, { authEpoch: n }]
30
+ queryKey: [...e.queryKey, { authEpoch: t }]
13
31
  };
14
32
  }
15
33
  //#endregion
16
- export { n as useAuthEpochPlaceholder, r as withAuthEpoch };
34
+ export { u as authEpochPlaceholder, d as withAuthEpoch };
@@ -1,5 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.5.126", n = "351a9209eea8cd0856a6804bb3f29134109e3b42", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.129", n = "be19c976cefc2e40777e2dfb87a8b3cd2a50caa8", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -16,7 +16,7 @@ function a({ enabled: a, ...o } = {}) {
16
16
  headers: r(c)
17
17
  });
18
18
  return i({
19
- ...t(f, u),
19
+ ...t(f, u, { carryWithinOrg: !0 }),
20
20
  enabled: d
21
21
  });
22
22
  }
@@ -16,7 +16,7 @@ function a({ enabled: a, ...o } = {}) {
16
16
  headers: r(c)
17
17
  });
18
18
  return i({
19
- ...t(f, u),
19
+ ...t(f, u, { carryWithinOrg: !0 }),
20
20
  enabled: d
21
21
  });
22
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.5.126",
3
+ "version": "0.5.129",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {