@tesouro/embedded-components-react 0.5.123 → 0.5.125

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 (47) hide show
  1. package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index3.js +1 -1
  2. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +2 -2
  3. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index7.js +1 -1
  4. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +1 -1
  5. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +1 -1
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +3 -3
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +3 -3
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index3.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index9.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index3.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index4.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index7.js +2 -2
  23. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index8.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +3 -3
  28. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index223.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index396.js +1 -1
  30. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index465.js +1 -1
  31. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index547.js +2 -2
  32. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index90.js +6 -6
  33. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/useRemoteCheckCaptureWidget.js +1 -1
  34. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index4.js +1 -1
  35. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index16.js +1 -1
  36. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +1 -1
  37. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApproverOptions.js +1 -1
  38. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +1 -1
  39. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useDeleteController.js +1 -1
  41. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +28 -30
  42. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +11 -6
  43. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/widgetInitChannel.js +2 -2
  44. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  45. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/traceId.js +1 -1
  46. package/dist/packages/shared-ui-shadcn/dist/index.js +108 -29
  47. package/package.json +12 -12
@@ -25,7 +25,7 @@ var h = u({
25
25
  isRowClickable: !1,
26
26
  onViewAllAccountsClicked: () => {}
27
27
  }), g = () => f(h), _ = ({ children: u, maxAccounts: f, onBalanceRowClick: g, onViewAllAccountsClick: _ }) => {
28
- let { data: v, isLoading: y, isError: b, refetch: x, hasNextPage: S, isFetchingNextPage: C } = t(), { initResponse: w } = s(), T = l(), E = c(), D = o(), O = T || y, k = !!E || b, A = d(() => {
28
+ let { data: v, isLoading: y, isError: b, refetch: x, hasNextPage: S, isFetchingNextPage: C } = t(), { initResponse: w } = s(), T = l(), E = c(), D = o(), O = T && !w || y, k = !!E || b, A = d(() => {
29
29
  D(), E || x();
30
30
  }, [
31
31
  D,
@@ -122,7 +122,7 @@ function Ee({ onEmbeddedOnboardingCompletedSuccessfully: u, onNavigateToDashboar
122
122
  S(() => () => it.current?.abort(), []);
123
123
  let at = C(() => ee(P.businessDetails.naicsTitles), [P.businessDetails.naicsTitles]), ot = C(() => d(P.businessDetails.stateTitles), [P.businessDetails.stateTitles]), st = C(() => d(P.personalDetails.stateTitles), [P.personalDetails.stateTitles]), ct = C(() => d(P.additionalOwners.stateTitles), [P.additionalOwners.stateTitles]), X = q || Ye !== null, lt = F?.status === "ACTIVE" || F?.status === "INACTIVE", ut = F?.status === "INVITED", Z = !!F && !X && (lt || ut || rt.isSuppressed), Q = Z ? lt ? o.UserAlreadyOnboarded : ut ? o.UserInvitedToOrganization : rt.reason : null;
124
124
  S(() => {
125
- !Z || !Q || (M(se.Suppressed, { reason: Q }), console.info(`[onboarding] not shown: ${Q}`));
125
+ Z && Q && (M(se.Suppressed, { reason: Q }), console.info(`[onboarding] not shown: ${Q}`));
126
126
  }, [
127
127
  Z,
128
128
  Q,
@@ -380,7 +380,7 @@ var A = { canRender: !1 };
380
380
  function j(e) {
381
381
  let { authEpoch: t } = r(), { applicationId: n, clientSecret: i, isResolved: a } = x(), { application: o, isResolved: s, isUnavailable: c } = _e(n, i), [l, u] = w(null);
382
382
  if (S(() => {
383
- if (!(l?.canRender === !0 || !a || !s)) {
383
+ if (l?.canRender !== !0 && a && s) {
384
384
  if (c) {
385
385
  u(A);
386
386
  return;
@@ -10,7 +10,7 @@ function r(e, t) {
10
10
  var i = "SOLE_PROPRIETORSHIP";
11
11
  function a(e) {
12
12
  let { companyStructure: t, taxIdOnFileLast4: n, taxIdOnFileStructure: r } = e;
13
- if (!(!n || !r)) return r === i == (t === i) ? n : void 0;
13
+ if (n && r) return r === i == (t === i) ? n : void 0;
14
14
  }
15
15
  function o(t, n) {
16
16
  return t ? {
@@ -50,7 +50,7 @@ function u(l, u, d) {
50
50
  }
51
51
  });
52
52
  a(() => {
53
- !u || !v.hasNextPage || v.isFetchingNextPage || v.isError || v.fetchNextPage();
53
+ u && v.hasNextPage && !v.isFetchingNextPage && !v.isError && v.fetchNextPage();
54
54
  }, [
55
55
  u,
56
56
  v.hasNextPage,
@@ -142,7 +142,7 @@ function f({ labels: t, featureLabels: a, isBankingTaglineVisible: o = !0, bankL
142
142
  }, Xe = (e, t) => {
143
143
  q.find((t) => t.id === e)?.locked || N((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e));
144
144
  }, Ze = (e) => {
145
- e && !X || (e && (j(u), N([]), I(void 0), P(!1), V.reset(), H.reset()), k(e));
145
+ (!e || X) && (e && (j(u), N([]), I(void 0), P(!1), V.reset(), H.reset()), k(e));
146
146
  }, $ = V.isPending || H.isPending, Qe = ie(q, {
147
147
  selectedUserIds: M,
148
148
  disabled: $ || !y.canWrite,
@@ -185,7 +185,7 @@ function A() {
185
185
  organizationId: t,
186
186
  payableId: a,
187
187
  includeApprovalRequests: !0
188
- }), !(!o || !i) && b({
188
+ }), o && i && b({
189
189
  client: e,
190
190
  organizationId: t,
191
191
  payableId: a,
@@ -138,7 +138,7 @@ async function z({ client: e, organizationId: n, payableId: r, watch: i }) {
138
138
  headers: s(n),
139
139
  path: { payable_id: r }
140
140
  });
141
- c = !!(i?.status && !D.has(i.status));
141
+ c = !(!i?.status || D.has(i.status));
142
142
  } catch {}
143
143
  if (!c) {
144
144
  let t = await i.poll();
@@ -93,7 +93,7 @@ function g() {
93
93
  });
94
94
  },
95
95
  onError: async (e) => {
96
- !(e instanceof m) || !h(e.applied) || await o({
96
+ e instanceof m && h(e.applied) && await o({
97
97
  client: c,
98
98
  organizationId: l,
99
99
  payableIds: e.applied.payableIds,
@@ -37,7 +37,7 @@ async function m({ client: e, organizationId: t, payableId: n, requestStatus: r
37
37
  client: e,
38
38
  organizationId: t,
39
39
  payableId: n
40
- }), !(!n || !i) && u({
40
+ }), n && i && u({
41
41
  client: e,
42
42
  organizationId: t,
43
43
  payableId: n,
@@ -15,7 +15,7 @@ function l({ payable: l, canManage: u = !0, onRemoved: d, labels: f }) {
15
15
  ...t,
16
16
  ...f
17
17
  }), [f]), m = r(l), [h] = m, g = l?.id, _ = i(), [v, y] = c(!1), b = a(l?.status), x = o(async (t, n, r) => {
18
- if (!(!m.length || !g)) try {
18
+ if (m.length && g) try {
19
19
  await _.mutateAsync({
20
20
  verdict: t,
21
21
  targets: m.map((e) => ({
@@ -37,7 +37,7 @@ function d({ payableId: d, amountDueMinorUnits: f, amountToPayMinorUnits: p, cur
37
37
  onDateChange: w,
38
38
  onCommentChange: E,
39
39
  onConfirm: () => {
40
- !d || !C || b.isPending || g || b.mutate({
40
+ d && C && !b.isPending && !g && b.mutate({
41
41
  path: { payable_id: d },
42
42
  body: {
43
43
  paid_at: `${a(C)}T12:00:00.000Z`,
@@ -52,7 +52,7 @@ function p({ payableId: d, status: f, currentApprovalRequestId: p, arePendingApp
52
52
  isPending: F.isPending,
53
53
  run: () => {
54
54
  let e = H?.scheduledPaymentIntentId;
55
- !d || !e || F.mutate({
55
+ d && e && F.mutate({
56
56
  path: { payment_intent_id: e },
57
57
  payableId: d
58
58
  }, W("cancelScheduledPayment"));
@@ -75,7 +75,7 @@ function p({ payableId: d, status: f, currentApprovalRequestId: p, arePendingApp
75
75
  disabled: z,
76
76
  loading: e.id === "markAsPaid" ? C : G[e.id]?.isPending ?? !1,
77
77
  onSelect: () => {
78
- if (!(z || !d)) {
78
+ if (!z && d) {
79
79
  if (e.id === "payBill") {
80
80
  D();
81
81
  return;
@@ -118,7 +118,7 @@ function p({ payableId: d, status: f, currentApprovalRequestId: p, arePendingApp
118
118
  z || V(void 0);
119
119
  },
120
120
  onConfirm: (e) => {
121
- !H || z || (G[H.id]?.run(e), V(void 0));
121
+ H && !z && (G[H.id]?.run(e), V(void 0));
122
122
  }
123
123
  }
124
124
  };
@@ -30,7 +30,7 @@ function o({ payableId: o, status: s, enabled: c = !0, labels: l, onDeleted: u }
30
30
  f.isPending || m(!1);
31
31
  },
32
32
  onConfirm: () => {
33
- !g || !o || f.isPending || f.mutate({ path: { payable_id: o } }, {
33
+ g && o && !f.isPending && f.mutate({ path: { payable_id: o } }, {
34
34
  onError: () => e.error(l.error),
35
35
  onSuccess: () => {
36
36
  m(!1), u();
@@ -8,7 +8,7 @@ function t(t) {
8
8
  }
9
9
  function n(t) {
10
10
  let n = e(t.bank_account?.routing_number), r = e(t.bank_account?.account_number);
11
- if (!(!n && !r)) return {
11
+ if (n || r) return {
12
12
  accountHolderName: e(t.bank_account?.account_holder_name) || e(t.name),
13
13
  routingNumber: n,
14
14
  accountNumber: r
@@ -87,11 +87,11 @@ function S({ rows: S, isLoading: C, isError: w, sorting: Se, onSortingChange: Ce
87
87
  ...W?.dueDate
88
88
  }
89
89
  }), [W]), [Pe, J] = le(!1), Y = !!L, X = (e) => Array.from(e.dataTransfer.types).includes("Files"), Z = (e) => {
90
- !Y || !X(e) || (e.preventDefault(), J(!0));
90
+ Y && X(e) && (e.preventDefault(), J(!0));
91
91
  }, Fe = (e) => {
92
- !Y || !X(e) || (e.preventDefault(), e.dataTransfer.dropEffect = "copy", J(!0));
92
+ Y && X(e) && (e.preventDefault(), e.dataTransfer.dropEffect = "copy", J(!0));
93
93
  }, Ie = (e) => {
94
- e.currentTarget.contains(e.relatedTarget) || !Y || J(!1);
94
+ !e.currentTarget.contains(e.relatedTarget) && Y && J(!1);
95
95
  }, Le = (e) => {
96
96
  if (!Y) return;
97
97
  e.preventDefault(), J(!1);
@@ -17,7 +17,7 @@ function g({ open: g, onOpenChange: _, groups: v, isLoading: y, isError: b, expa
17
17
  return /* @__PURE__ */ p(i, {
18
18
  open: g,
19
19
  onOpenChange: (e) => {
20
- C && !e || _(e);
20
+ (!C || e) && _(e);
21
21
  },
22
22
  children: /* @__PURE__ */ m(a, {
23
23
  className: "ttw:flex ttw:flex-col ttw:gap-8 ttw:overflow-hidden ttw:max-h-[90vh] ttw:sm:max-w-240",
@@ -128,7 +128,7 @@ function C({ cardId: r, cardProgram: d, onClose: C, labels: w, activateLabels: h
128
128
  w,
129
129
  N.revealNotPermittedDescription
130
130
  ]), $ = y(() => {
131
- if (!(W !== "revealed" || !U.data)) return {
131
+ if (W === "revealed" && U.data) return {
132
132
  cardNumber: p(U.data.pan),
133
133
  expirationDate: m(U.data.expirationDate),
134
134
  securityCode: U.data.cvv
@@ -38,7 +38,7 @@ function o(e) {
38
38
  function s(e) {
39
39
  if (!e) return;
40
40
  let t = e.address1?.trim() || void 0, n = o([e.address2, e.address3]).join(" ") || void 0, r = o([e.city, e.state]).join(", ") || void 0, i = e.postalCode?.trim() || void 0;
41
- if (!(!t && !n && !r && !i)) return {
41
+ if (t || n || r || i) return {
42
42
  addressLine1: t,
43
43
  addressLine2: n,
44
44
  cityState: r,
@@ -46,7 +46,7 @@ function v({ cardId: v, cardProgram: y, card: b, scopes: x, currentUserId: S, co
46
46
  }));
47
47
  }, []);
48
48
  h(() => {
49
- !w || z || O !== "succeeded" && O !== "submitting" && (e.error(C), W());
49
+ w && !z && O !== "succeeded" && O !== "submitting" && (e.error(C), W());
50
50
  }, [
51
51
  z,
52
52
  W,
@@ -23,7 +23,7 @@ function i(e) {
23
23
  };
24
24
  }
25
25
  function a(e) {
26
- if (!(!e.street.trim() || !e.city.trim() || !e.state.trim() || !e.zip.trim())) return {
26
+ if (e.street.trim() && e.city.trim() && e.state.trim() && e.zip.trim()) return {
27
27
  address1: e.street.trim(),
28
28
  city: e.city.trim(),
29
29
  state: e.state.trim(),
@@ -13,7 +13,7 @@ function i(t) {
13
13
  }
14
14
  function a({ cardId: e, amount: t, period: n, id: a, name: o }) {
15
15
  let s = i(t);
16
- if (!(!s || !r(n))) return {
16
+ if (s && r(n)) return {
17
17
  id: a,
18
18
  name: o,
19
19
  amountLimit: s,
@@ -31,7 +31,7 @@ function T({ counterpartType: T, detailsLabels: E, messageLabels: D }) {
31
31
  }), [D]), N = C(() => ({
32
32
  ...oe,
33
33
  ...E
34
- }), [E]), P = T === "customer", F = C(() => e(), []), I = C(() => ie(O?.scopes), [O?.scopes]), L = !!(k && !O && !j) || A && !O, [R, z] = w(), [B, V] = w("none"), H = I.canRead ? R : void 0;
34
+ }), [E]), P = T === "customer", F = C(() => e(), []), I = C(() => ie(O?.scopes), [O?.scopes]), L = !(!k || O || j) || A && !O, [R, z] = w(), [B, V] = w("none"), H = I.canRead ? R : void 0;
35
35
  S(() => {
36
36
  I.canRead || (z(void 0), V("none"));
37
37
  }, [I.canRead]);
@@ -152,7 +152,7 @@ function T({ counterpartType: T, detailsLabels: E, messageLabels: D }) {
152
152
  address: le,
153
153
  del: ue,
154
154
  handleRowClick: x((e) => {
155
- !I.canRead || s() || (z(e.id), V("none"));
155
+ I.canRead && !s() && (z(e.id), V("none"));
156
156
  }, [I.canRead]),
157
157
  closeDetails: x(() => z(void 0), [])
158
158
  };
@@ -108,7 +108,7 @@ function _({ counterpartType: t, pageSizeOptions: s = c, onViewAllDocuments: _,
108
108
  counterpart: M,
109
109
  isLoading: j.isLoading,
110
110
  isError: j.isError,
111
- canEdit: N.canUpdate && !(t === "vendor" && (j.isBankAccountsLoading || j.isBankAccountsError)),
111
+ canEdit: N.canUpdate && (t !== "vendor" || !j.isBankAccountsLoading && !j.isBankAccountsError),
112
112
  canDelete: N.canDelete,
113
113
  onEdit: F.openEdit,
114
114
  onDelete: R.requestDeleteCounterpart,
@@ -130,7 +130,7 @@ function S({ mode: n, counterparts: r, isLoading: i, isError: a, sorting: o, onS
130
130
  isLoading: e.original.isDueOrOwedAmountLoading
131
131
  })
132
132
  }
133
- ], W = B ? z.customersEmptyTitle : z.vendorsEmptyTitle, G = B ? z.customersEmptyDescription : z.vendorsEmptyDescription, K = B ? z.customersEmptyAction : z.vendorsEmptyAction, q = B ? z.customersFilterEmptyTitle : z.vendorsFilterEmptyTitle, J = !A && !E && !r.length && !i, Y = !!(j && !M), X = !!(!A && Y), Z = B ? z.createButton : z.vendorsCreateButton;
133
+ ], W = B ? z.customersEmptyTitle : z.vendorsEmptyTitle, G = B ? z.customersEmptyDescription : z.vendorsEmptyDescription, K = B ? z.customersEmptyAction : z.vendorsEmptyAction, q = B ? z.customersFilterEmptyTitle : z.vendorsFilterEmptyTitle, J = !A && !E && !r.length && !i, Y = !(!j || M), X = !(A || !Y), Z = B ? z.createButton : z.vendorsCreateButton;
134
134
  return /* @__PURE__ */ f("div", {
135
135
  className: "ttw:flex ttw:flex-col ttw:gap-4",
136
136
  children: M ? /* @__PURE__ */ f(u, {
@@ -28,7 +28,7 @@ var g = u({
28
28
  let { initResponse: b } = r(), x = a(), S = i(), C = n(), w = p(() => c(b?.scopes), [b?.scopes]), { canReadBankAccounts: T, canReadExternalBankAccounts: E } = p(() => l(b?.scopes), [b?.scopes]), D = p(() => ({
29
29
  ...o,
30
30
  ...y
31
- }), [y]), [O, k] = m("active"), [A, j] = m(!1), M = _ !== void 0, N = M ? f : A, P = M ? _ : j, { dismissedIds: F, isLoading: I, refetch: L, dismissInsight: R } = s(), { data: z, isLoading: B, isError: V, refetch: H } = e({ enabled: T }), { data: U, isLoading: W, isError: G, refetch: K } = t({ enabled: E }), q = z?.data, J = U?.data, Y = x || B || W || I || !((!T || q !== void 0 || V) && (!E || J !== void 0 || G)) && !S, X = !!S || (T || E) && !(T && !V) && !(E && !G), Z = d(() => (C(), Promise.all([
31
+ }), [y]), [O, k] = m("active"), [A, j] = m(!1), M = _ !== void 0, N = M ? f : A, P = M ? _ : j, { dismissedIds: F, isLoading: I, refetch: L, dismissInsight: R } = s(), { data: z, isLoading: B, isError: V, refetch: H } = e({ enabled: T }), { data: U, isLoading: W, isError: G, refetch: K } = t({ enabled: E }), q = z?.data, J = U?.data, Y = x || B || W || I || (!!T && q === void 0 && !V || !!E && J === void 0 && !G) && !S, X = !!S || (T || E) && !(T && !V) && !(E && !G), Z = d(() => (C(), Promise.all([
32
32
  T ? H() : void 0,
33
33
  E ? K() : void 0,
34
34
  L()
@@ -335,7 +335,7 @@ function E({ values: e, originalLineItems: t }) {
335
335
  }
336
336
  }];
337
337
  }), o = t.filter((e) => !r.has(e.id)).map((e) => e.id);
338
- if (!(!i.length && !a.length && !o.length)) return {
338
+ if (i.length || a.length || o.length) return {
339
339
  ...i.length ? { add: i } : {},
340
340
  ...a.length ? { replace: a } : {},
341
341
  ...o.length ? { remove: o } : {}
@@ -147,13 +147,13 @@ function p({ labels: t, featureLabels: l }) {
147
147
  }, lt = (e, t) => {
148
148
  X.find((t) => t.id === e)?.locked || w((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e));
149
149
  }, ut = (e) => {
150
- e && !_ || e && !v.canWrite || (e && (S(1), F(de), w([]), E(void 0), D(void 0), V.reset(), H.reset(), G.reset()), Ue(e));
150
+ (!e || _) && (!e || v.canWrite) && (e && (S(1), F(de), w([]), E(void 0), D(void 0), V.reset(), H.reset(), G.reset()), Ue(e));
151
151
  }, dt = (e) => {
152
152
  if (!_ || !v.canWrite) return;
153
153
  let t = Z.find((t) => t.id === e);
154
154
  Ve(e), L(ve(t)), k(!0);
155
155
  }, ft = (e) => {
156
- e && !_ || e && !v.canWrite || k(e);
156
+ (!e || _) && (!e || v.canWrite) && k(e);
157
157
  }, pt = () => {
158
158
  if (!_ || !v.canWrite || !b) return;
159
159
  let t = Z.find((e) => e.id === b), n = ye(I, t);
@@ -166,7 +166,7 @@ function p({ labels: t, featureLabels: l }) {
166
166
  }, mt = (e) => {
167
167
  _ && v.canWrite && (Ve(e), z(pe), j(!1), A(!1), Je(!0));
168
168
  }, ht = (e) => {
169
- e && !_ || e && !v.canWrite || (e || (j(!1), A(!1)), Je(e));
169
+ (!e || _) && (!e || v.canWrite) && (e || (j(!1), A(!1)), Je(e));
170
170
  }, gt = (e) => {
171
171
  K.reset(), j(!1), z(e);
172
172
  }, _t = () => {
@@ -57,7 +57,7 @@ var f = ({ defaultCurrency: f, isInclusivePricing: p }) => {
57
57
  T.current && (E.current = !1);
58
58
  });
59
59
  }, [S.length, T]), o(() => {
60
- !T.current || D || !_("line_items")?.length && !E.current && (x({
60
+ T.current && !D && !_("line_items")?.length && !E.current && (x({
61
61
  ..._(),
62
62
  line_items: [H()]
63
63
  }), O(!0));
@@ -69,7 +69,7 @@ var S = ({ ref: e, ...t }) => /* @__PURE__ */ l(r, { children: /* @__PURE__ */ l
69
69
  U,
70
70
  z
71
71
  ]), c(() => {
72
- !Q || !Z || V("counterpart").isTouched || z("counterpart", Z.id);
72
+ Q && Z && (V("counterpart").isTouched || z("counterpart", Z.id));
73
73
  }, [
74
74
  Z,
75
75
  V,
@@ -63,7 +63,7 @@ var D = ({ disabled: D, canCreateCounterpart: O, isEditCustomerOpen: k, handleOp
63
63
  let e = Q.current;
64
64
  e !== Z && (Q.current = Z, e && $());
65
65
  }, [Z, $]), _(() => {
66
- if (B?.data?.length && !(!j || j.id !== I)) {
66
+ if (B?.data?.length && j && j.id === I) {
67
67
  if (!R) {
68
68
  let e = j.default_billing_address_id || (B.data.length === 1 ? B.data[0].id : "");
69
69
  P("default_billing_address_id", e);
@@ -77,7 +77,7 @@ var D = (e) => /* @__PURE__ */ w(l, { children: /* @__PURE__ */ w(O, { ...e }, e
77
77
  counterpart_country: ct?.country,
78
78
  counterpart_id: F,
79
79
  counterpart_type: L?.id === F && L?.type || void 0
80
- }), ht = ft?.entity?.tax_id?.required, gt = !!(P?.type === "invoice" && (P.payment_reminder_id || P.overdue_reminder_id)), B = !!F && R || dt || ut || mt || pt, { data: _t } = Se(l, P?.type === "invoice"), vt = _t?.file_url, { data: V, isLoading: yt } = Ce(P?.type === "invoice" ? P?.recurrence_id : void 0), { data: bt, isLoading: xt } = xe(P?.id), { data: St } = me(P?.type === "invoice" ? P?.payment_reminder_id : void 0), { data: Ct } = he(P?.type === "invoice" ? P?.overdue_reminder_id : void 0), { bankAccounts: wt, isIncomplete: Tt } = pe(M), H = P?.type === "invoice" ? P.bank_account_id : void 0, Et = x(() => M ? {
80
+ }), ht = ft?.entity?.tax_id?.required, gt = !(P?.type !== "invoice" || !P.payment_reminder_id && !P.overdue_reminder_id), B = !!F && R || dt || ut || mt || pt, { data: _t } = Se(l, P?.type === "invoice"), vt = _t?.file_url, { data: V, isLoading: yt } = Ce(P?.type === "invoice" ? P?.recurrence_id : void 0), { data: bt, isLoading: xt } = xe(P?.id), { data: St } = me(P?.type === "invoice" ? P?.payment_reminder_id : void 0), { data: Ct } = he(P?.type === "invoice" ? P?.overdue_reminder_id : void 0), { bankAccounts: wt, isIncomplete: Tt } = pe(M), H = P?.type === "invoice" ? P.bank_account_id : void 0, Et = x(() => M ? {
81
81
  account: wt.find((e) => e.id === H),
82
82
  isListIncomplete: Tt
83
83
  } : void 0, [
@@ -86,7 +86,7 @@ var D = (e) => /* @__PURE__ */ w(l, { children: /* @__PURE__ */ w(O, { ...e }, e
86
86
  H,
87
87
  Tt
88
88
  ]), [Dt, Ot] = S(["attachments"]), [U, W] = S(!1), [kt, G] = S("edit"), [K, q] = S(null), [At, jt] = S(!1), [Mt, Nt] = S(!1), [Pt, Ft] = S(!1), [It, Lt] = S(!1), [Rt, zt] = S(!1), J = fe(), Bt = J.has(e.InvoiceReadOrg), Vt = J.has(e.InvoiceWriteOrg), Ht = J.has(e.CounterpartReadOrg), Ut = J.has(e.CounterpartWriteOrg), { mutateAsync: Y, isPending: Wt } = Ae(), { mutate: Gt, isPending: Kt } = be(nt), { mutate: qt, isPending: Jt } = Ie(V?.id ?? "", l), { mutate: Yt, isPending: Xt } = Le(V?.id ?? "", l), Zt = D && !U, Qt = Bt && !ot && !yt && !!P && P.type === "invoice", X = x(() => {
89
- if (!(!P || P.type !== "invoice")) return ge(P, V, bt?.data ?? [], {
89
+ if (P && P.type === "invoice") return ge(P, V, bt?.data ?? [], {
90
90
  i18n: A,
91
91
  formatCurrencyToDisplay: N,
92
92
  locale: j
@@ -32,7 +32,7 @@ var p = ({ hasExistingBankAccount: p, isLoading: m, isStandalone: h, handleCance
32
32
  name: "accountHolderName",
33
33
  control: v,
34
34
  render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ s(r, {
35
- "data-invalid": !!(!e.value && p),
35
+ "data-invalid": !(e.value || !p),
36
36
  children: /* @__PURE__ */ c(i, { children: [
37
37
  /* @__PURE__ */ s(o, {
38
38
  htmlFor: e.name,
@@ -43,7 +43,7 @@ var p = ({ hasExistingBankAccount: p, isLoading: m, isStandalone: h, handleCance
43
43
  ...e,
44
44
  className: "ttw:bg-white",
45
45
  disabled: m,
46
- "aria-invalid": !!(!e.value && p) || !!n || void 0
46
+ "aria-invalid": !(e.value || !p) || !!n || void 0
47
47
  }),
48
48
  /* @__PURE__ */ s(a, { errors: [n] })
49
49
  ] })
@@ -55,7 +55,7 @@ var p = ({ hasExistingBankAccount: p, isLoading: m, isStandalone: h, handleCance
55
55
  name: "routingNumber",
56
56
  control: v,
57
57
  render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ s(r, {
58
- "data-invalid": !!(!e.value && p),
58
+ "data-invalid": !(e.value || !p),
59
59
  children: /* @__PURE__ */ c(i, { children: [
60
60
  /* @__PURE__ */ s(o, {
61
61
  htmlFor: e.name,
@@ -67,7 +67,7 @@ var p = ({ hasExistingBankAccount: p, isLoading: m, isStandalone: h, handleCance
67
67
  placeholder: _._("e.g., 123456789"),
68
68
  className: "ttw:bg-white",
69
69
  disabled: m,
70
- "aria-invalid": !!(!e.value && p) || !!n || void 0
70
+ "aria-invalid": !(e.value || !p) || !!n || void 0
71
71
  }),
72
72
  /* @__PURE__ */ s(a, { errors: [n] })
73
73
  ] })
@@ -76,7 +76,7 @@ var p = ({ hasExistingBankAccount: p, isLoading: m, isStandalone: h, handleCance
76
76
  name: "accountNumber",
77
77
  control: v,
78
78
  render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ s(r, {
79
- "data-invalid": !!(!e.value && p),
79
+ "data-invalid": !(e.value || !p),
80
80
  children: /* @__PURE__ */ c(i, { children: [
81
81
  /* @__PURE__ */ s(o, {
82
82
  htmlFor: e.name,
@@ -88,7 +88,7 @@ var p = ({ hasExistingBankAccount: p, isLoading: m, isStandalone: h, handleCance
88
88
  placeholder: _._("e.g., 12345678"),
89
89
  className: "ttw:bg-white",
90
90
  disabled: m,
91
- "aria-invalid": !!(!e.value && p) || !!n || void 0
91
+ "aria-invalid": !(e.value || !p) || !!n || void 0
92
92
  }),
93
93
  /* @__PURE__ */ s(a, { errors: [n] })
94
94
  ] })
@@ -133,7 +133,7 @@ function me({ labels: n, onDepositComplete: r } = {}) {
133
133
  } : null, Z = () => {
134
134
  x(m.Details), C(u.Front), T(""), D(""), k(null), j(null), N(null), F(""), L(null), W.reset();
135
135
  }, Q = (e) => {
136
- !e && W.isPending || (he(e), e || Z());
136
+ (e || !W.isPending) && (he(e), e || Z());
137
137
  }, Se = () => {
138
138
  h(c.CollectPaymentClicked), Z(), he(!0);
139
139
  }, Ce = () => {
@@ -21,7 +21,7 @@ function C({ labels: C, testIds: w, customerOptions: T, selectedCustomerIndex: E
21
21
  e.preventDefault(), !G && W();
22
22
  }, Q = m(null), $ = m(null);
23
23
  return p(() => {
24
- $.current === null || !Q.current || (Q.current.setSelectionRange($.current, $.current), $.current = null);
24
+ $.current !== null && Q.current && (Q.current.setSelectionRange($.current, $.current), $.current = null);
25
25
  }, [z]), /* @__PURE__ */ g("section", {
26
26
  className: "ttw:flex ttw:h-full ttw:w-full ttw:flex-col ttw:bg-background ttw:p-6",
27
27
  children: [/* @__PURE__ */ g("header", {
@@ -63,7 +63,7 @@ function d({ canDeactivate: a, canResendInvite: c, members: l, featureLabels: d,
63
63
  openResendConfirmation: v.open,
64
64
  onResendOpenChange: v.onOpenChange,
65
65
  onResendConfirm: () => {
66
- !c || !v.member || h.mutate({
66
+ c && v.member && h.mutate({
67
67
  name: v.member.name,
68
68
  email: v.member.email,
69
69
  redirectUri: s(f)
@@ -8,7 +8,7 @@ import { useEffect as n, useRef as r, useState as i } from "react";
8
8
  function a(a) {
9
9
  let { canRead: o, canWrite: s, directory: c, directoryReady: l, assignedAvatarsByGroupId: u, useListQuery: d, useEditMembers: f, useMutations: p, panelLabels: m, drawerLabels: h, countLabels: g, saveFailedMessage: _, deleteFailedMessage: v } = a, y = d(), b = p(), [x, S] = i("closed"), [C, w] = i(), [T, E] = i(""), [D, O] = i(""), [k, A] = i([]), [j, M] = i(), [N, P] = i(), [F, I] = i(), L = f(x === "edit" ? C : void 0), R = (L.data?.members?.data ?? []).map((e) => e.id), z = o ? y.data?.data ?? [] : [], B = l && (x !== "edit" || !!L.data), V = r(void 0);
10
10
  n(() => {
11
- x !== "edit" || !C || V.current !== C && (!L.data || !l || (V.current = C, A(R.map((e) => c.idToOption.get(e)).filter((e) => !!e))));
11
+ x === "edit" && C && V.current !== C && L.data && l && (V.current = C, A(R.map((e) => c.idToOption.get(e)).filter((e) => !!e)));
12
12
  }, [
13
13
  x,
14
14
  C,
@@ -41,7 +41,7 @@ function s() {
41
41
  kind: "user"
42
42
  });
43
43
  let a = i.get(r.role?.trim().toLowerCase() ?? "");
44
- !a || !n(a.id) || e.push({
44
+ a && n(a.id) && e.push({
45
45
  id: r.id,
46
46
  label: r.name,
47
47
  sublabel: a.name,
@@ -19,7 +19,7 @@ function S({ option: e, isSelected: n, isDisabled: r, reason: i, onToggle: s })
19
19
  /* @__PURE__ */ g(t, {
20
20
  checked: n,
21
21
  onCheckedChange: () => {
22
- r && !n || s();
22
+ (!r || n) && s();
23
23
  }
24
24
  }),
25
25
  /* @__PURE__ */ g("span", {
@@ -11,7 +11,7 @@ import { useMemo as a } from "react";
11
11
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js
12
12
  function o({ selectedId: o, enabled: s = !0 }) {
13
13
  let c = s ? o : void 0, l = e(c), u = l.data, d = u?.type === "organization", f = c ?? null, p = n(f), m = t(f), h = p.data?.data, g = a(() => {
14
- if (!(!h || h.length === 0)) {
14
+ if (h && h.length !== 0) {
15
15
  if (u?.default_billing_address_id) {
16
16
  let e = h.find((e) => e.id === u.default_billing_address_id);
17
17
  if (e) return e;
@@ -12,7 +12,7 @@ function i({ selectedId: i, setSelectedId: a, detailsView: o, messages: s }) {
12
12
  return {
13
13
  target: u,
14
14
  requestDeleteCounterpart: n(() => {
15
- !i || !o || d({
15
+ i && o && d({
16
16
  kind: "counterpart",
17
17
  id: i,
18
18
  label: o.name
@@ -4,32 +4,30 @@
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 { useEmbedApi as n } from "../EmbedApiContext.js";
8
- import { organizationHeaders as r } from "../organizationHeaders.js";
9
- import { getAllPagesNextPageParam as i, useAutoFetchNextPage as a } from "../allPages.js";
10
- import { useMemo as o } from "react";
11
- import { useInfiniteQuery as s } from "@tanstack/react-query";
7
+ import { useAuthEpochPlaceholder as n } from "../withAuthEpoch.js";
8
+ import { useEmbedApi as r } from "../EmbedApiContext.js";
9
+ import { organizationHeaders as i } from "../organizationHeaders.js";
10
+ import { getAllPagesNextPageParam as a, useAutoFetchNextPage as o } from "../allPages.js";
11
+ import { useMemo as s } from "react";
12
+ import { useInfiniteQuery as c } from "@tanstack/react-query";
12
13
  //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js
13
- var c = 100;
14
- function l({ enabled: l } = {}) {
15
- let { client: u, organizationId: d, widgetToken: f, authEpoch: p } = n(), m = r(d), h = !!(d && f) && (l === !0 || l === void 0), g = t({
16
- client: u,
17
- headers: m,
18
- query: { limit: c }
19
- }), _ = s({
20
- queryKey: [
21
- ...g.queryKey,
22
- "all",
23
- { authEpoch: p }
24
- ],
25
- enabled: h,
14
+ var l = 100;
15
+ function u({ enabled: u } = {}) {
16
+ let { client: d, organizationId: f, widgetToken: p, authEpoch: m } = r(), h = i(f), g = !!(f && p) && (u === !0 || u === void 0), _ = [...t({
17
+ client: d,
18
+ headers: h,
19
+ query: { limit: l }
20
+ }).queryKey, "all"], v = n(f ? _ : void 0), y = c({
21
+ queryKey: [..._, { authEpoch: m }],
22
+ placeholderData: v,
23
+ enabled: g,
26
24
  initialPageParam: void 0,
27
25
  queryFn: async ({ signal: t, pageParam: n }) => {
28
26
  let { data: r } = await e({
29
- client: u,
30
- headers: m,
27
+ client: d,
28
+ headers: h,
31
29
  query: {
32
- limit: c,
30
+ limit: l,
33
31
  ...n ? { pagination_token: n } : {}
34
32
  },
35
33
  signal: t,
@@ -37,20 +35,20 @@ function l({ enabled: l } = {}) {
37
35
  });
38
36
  return r;
39
37
  },
40
- getNextPageParam: i
38
+ getNextPageParam: a
41
39
  });
42
- a(_, h);
43
- let v = o(() => {
44
- if (_.data) return {
45
- data: _.data.pages.flatMap((e) => e.data ?? []),
40
+ o(y, g);
41
+ let b = s(() => {
42
+ if (y.data) return {
43
+ data: y.data.pages.flatMap((e) => e.data ?? []),
46
44
  nextPaginationToken: null,
47
45
  prevPaginationToken: null
48
46
  };
49
- }, [_.data]);
47
+ }, [y.data]);
50
48
  return {
51
- ..._,
52
- data: v
49
+ ...y,
50
+ data: b
53
51
  };
54
52
  }
55
53
  //#endregion
56
- export { l as useAllBankAccountsQuery };
54
+ export { u as useAllBankAccountsQuery };
@@ -1,11 +1,16 @@
1
+ import { useMemo as e } from "react";
1
2
  //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js
2
- var e = (e) => e;
3
- function t(t, n) {
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]);
7
+ }
8
+ function r(e, n) {
4
9
  return {
5
- placeholderData: e,
6
- ...t,
7
- queryKey: [...t.queryKey, { authEpoch: n }]
10
+ placeholderData: t,
11
+ ...e,
12
+ queryKey: [...e.queryKey, { authEpoch: n }]
8
13
  };
9
14
  }
10
15
  //#endregion
11
- export { t as withAuthEpoch };
16
+ export { n as useAuthEpochPlaceholder, r as withAuthEpoch };
@@ -18,8 +18,8 @@ function l() {
18
18
  c(r, e) || (r = e, n.forEach((t) => t(e)));
19
19
  }
20
20
  function u(e) {
21
- if (!(i || !e)) {
22
- for (let n of t.values()) if (!(!n.widgetToken || n.widgetToken === e)) {
21
+ if (!i && e) {
22
+ for (let n of t.values()) if (n.widgetToken && n.widgetToken !== e) {
23
23
  i = !0, console.warn("[tesouro-embedded] Two top-level widget providers are mounted with different `widgetToken`s. getGlobalWidgetInitState() reports the earliest-mounted one only. Read the other subtree inside React with useWidgetConfig(), which resolves per provider level.");
24
24
  return;
25
25
  }
@@ -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.123", n = "e92880e7f411d0e09b599e39a5bd3d28d319b2eb", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.125", n = "1c2d5f60f2fc1903e53970b963fc5bfdd4508b70", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -24,7 +24,7 @@ function o(t) {
24
24
  }
25
25
  }
26
26
  function s(e) {
27
- if (!(typeof e != "object" || !e)) try {
27
+ if (typeof e == "object" && e) try {
28
28
  let t = Object.getOwnPropertyDescriptor(e, "traceId");
29
29
  return !t || !("value" in t) ? void 0 : i(t.value);
30
30
  } catch {
@@ -2120,7 +2120,7 @@ function Ri(t) {
2120
2120
  return Ai(h, t, e, h === "h" ? o : c, !0);
2121
2121
  }, []), l = e.useCallback(function(e) {
2122
2122
  var t = e;
2123
- if (!(!Li.length || Li[Li.length - 1] !== o)) {
2123
+ if (Li.length && Li[Li.length - 1] === o) {
2124
2124
  var r = "deltaY" in t ? Mi(t) : ji(t), i = n.current.filter(function(e) {
2125
2125
  return e.name === t.type && (e.target === t.target || t.target === e.shadowParent) && Pi(e.delta, r);
2126
2126
  })[0];
@@ -2199,11 +2199,11 @@ var Hi = function(e) {
2199
2199
  var i = Ji(t, Array.isArray(e) ? e : [e]);
2200
2200
  Gi[n] || (Gi[n] = /* @__PURE__ */ new WeakMap());
2201
2201
  var a = Gi[n], o = [], s = /* @__PURE__ */ new Set(), c = new Set(i), l = function(e) {
2202
- !e || s.has(e) || (s.add(e), l(e.parentNode));
2202
+ e && !s.has(e) && (s.add(e), l(e.parentNode));
2203
2203
  };
2204
2204
  i.forEach(l);
2205
2205
  var u = function(e) {
2206
- !e || c.has(e) || Array.prototype.forEach.call(e.children, function(e) {
2206
+ e && !c.has(e) && Array.prototype.forEach.call(e.children, function(e) {
2207
2207
  if (s.has(e)) u(e);
2208
2208
  else try {
2209
2209
  var t = e.getAttribute(r), i = t !== null && t !== "false", c = (Ui.get(e) || 0) + 1, l = (a.get(e) || 0) + 1;
@@ -4083,14 +4083,14 @@ var Dl = typeof wl == "function" ? El : Cl, Ol = Object.defineProperty, kl = (e,
4083
4083
  }, "RovingFocusGroupImpl")), Hl = "RovingFocusGroupItem", Ul = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ kl(function(t, n) {
4084
4084
  let { __scopeRovingFocusGroup: r, focusable: i = !0, active: a = !1, tabStopId: o, children: s, ...c } = t, l = Bt(), u = o || l, d = zl(Hl, r), f = d.currentTabStopId === u, p = Pl(r), { onFocusableItemAdd: m, onFocusableItemRemove: h, currentTabStopId: g } = d, v = Dl();
4085
4085
  return V(() => {
4086
- if (!(!v || !i)) return m(), () => h();
4086
+ if (v && i) return m(), () => h();
4087
4087
  }, [
4088
4088
  v,
4089
4089
  i,
4090
4090
  m,
4091
4091
  h
4092
4092
  ]), e.useEffect(() => {
4093
- if (!(v || !i)) return m(), () => h();
4093
+ if (!v && i) return m(), () => h();
4094
4094
  }, [
4095
4095
  v,
4096
4096
  i,
@@ -6641,8 +6641,8 @@ var pg = (e, t) => {
6641
6641
  return a = o, (...e) => a(Hg(...e));
6642
6642
  }, Gg = [], Kg = (e) => {
6643
6643
  let t = (t) => t[e] || Gg;
6644
- return t.isThemeGetter = !0, t;
6645
- }, qg = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Jg = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Yg = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Xg = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Zg = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Qg = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, $g = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, e_ = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, t_ = (e) => Yg.test(e), W = (e) => !!e && !Number.isNaN(Number(e)), n_ = (e) => !!e && Number.isInteger(Number(e)), r_ = (e) => e.endsWith("%") && W(e.slice(0, -1)), i_ = (e) => Xg.test(e), a_ = () => !0, o_ = (e) => Zg.test(e) && !Qg.test(e), s_ = () => !1, c_ = (e) => $g.test(e), l_ = (e) => e_.test(e), u_ = (e) => !G(e) && !K(e), d_ = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), f_ = (e) => D_(e, j_, s_), G = (e) => qg.test(e), p_ = (e) => D_(e, M_, o_), m_ = (e) => D_(e, N_, W), h_ = (e) => D_(e, F_, a_), g_ = (e) => D_(e, P_, s_), __ = (e) => D_(e, k_, s_), v_ = (e) => D_(e, A_, l_), y_ = (e) => D_(e, I_, c_), K = (e) => Jg.test(e), b_ = (e) => O_(e, M_), x_ = (e) => O_(e, P_), S_ = (e) => O_(e, k_), C_ = (e) => O_(e, j_), w_ = (e) => O_(e, A_), T_ = (e) => O_(e, I_, !0), E_ = (e) => O_(e, F_, !0), D_ = (e, t, n) => {
6644
+ return t.isThemeGetter = !0, t.themeKey = e, t;
6645
+ }, qg = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Jg = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Yg = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Xg = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Zg = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Qg = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/, $g = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, e_ = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, t_ = (e) => Yg.test(e), W = (e) => !!e && !Number.isNaN(Number(e)), n_ = (e) => !!e && Number.isInteger(Number(e)), r_ = (e) => e.endsWith("%") && W(e.slice(0, -1)), i_ = (e) => Xg.test(e), a_ = () => !0, o_ = (e) => Zg.test(e) && !Qg.test(e), s_ = () => !1, c_ = (e) => $g.test(e), l_ = (e) => e_.test(e), u_ = (e) => !G(e) && !K(e), d_ = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), f_ = (e) => D_(e, j_, s_), G = (e) => qg.test(e), p_ = (e) => D_(e, M_, o_), m_ = (e) => D_(e, N_, W), h_ = (e) => D_(e, F_, a_), g_ = (e) => D_(e, P_, s_), __ = (e) => D_(e, k_, s_), v_ = (e) => D_(e, A_, l_), y_ = (e) => D_(e, I_, c_), K = (e) => Jg.test(e), b_ = (e) => O_(e, M_), x_ = (e) => O_(e, P_), S_ = (e) => O_(e, k_), C_ = (e) => O_(e, j_), w_ = (e) => O_(e, A_), T_ = (e) => O_(e, I_, !0), E_ = (e) => O_(e, F_, !0), D_ = (e, t, n) => {
6646
6646
  let r = qg.exec(e);
6647
6647
  return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
6648
6648
  }, O_ = (e, t, n = !1) => {
@@ -6757,6 +6757,7 @@ var pg = (e, t) => {
6757
6757
  "fit",
6758
6758
  ...w()
6759
6759
  ], N = () => [
6760
+ s,
6760
6761
  t_,
6761
6762
  "screen",
6762
6763
  "full",
@@ -6952,6 +6953,7 @@ var pg = (e, t) => {
6952
6953
  "container-named": [d_],
6953
6954
  columns: [{ columns: [
6954
6955
  W,
6956
+ "auto",
6955
6957
  G,
6956
6958
  K,
6957
6959
  s
@@ -7200,6 +7202,7 @@ var pg = (e, t) => {
7200
7202
  "max-h": [{ "max-h": [
7201
7203
  "screen",
7202
7204
  "lh",
7205
+ "none",
7203
7206
  ...M()
7204
7207
  ] }],
7205
7208
  "font-size": [{ text: [
@@ -7251,7 +7254,11 @@ var pg = (e, t) => {
7251
7254
  K,
7252
7255
  m_
7253
7256
  ] }],
7254
- leading: [{ leading: [a, ...w()] }],
7257
+ leading: [{ leading: [
7258
+ "none",
7259
+ a,
7260
+ ...w()
7261
+ ] }],
7255
7262
  "list-image": [{ "list-image": [
7256
7263
  "none",
7257
7264
  K,
@@ -7403,6 +7410,7 @@ var pg = (e, t) => {
7403
7410
  G
7404
7411
  ],
7405
7412
  conic: [
7413
+ "",
7406
7414
  n_,
7407
7415
  K,
7408
7416
  G
@@ -7489,6 +7497,7 @@ var pg = (e, t) => {
7489
7497
  "outline-color": [{ outline: P() }],
7490
7498
  shadow: [{ shadow: [
7491
7499
  "",
7500
+ "inner",
7492
7501
  "none",
7493
7502
  u,
7494
7503
  T_,
@@ -7956,8 +7965,18 @@ var pg = (e, t) => {
7956
7965
  "bottom",
7957
7966
  "left"
7958
7967
  ],
7959
- "inset-x": ["right", "left"],
7960
- "inset-y": ["top", "bottom"],
7968
+ "inset-x": [
7969
+ "start",
7970
+ "end",
7971
+ "right",
7972
+ "left"
7973
+ ],
7974
+ "inset-y": [
7975
+ "inset-bs",
7976
+ "inset-be",
7977
+ "top",
7978
+ "bottom"
7979
+ ],
7961
7980
  flex: [
7962
7981
  "basis",
7963
7982
  "grow",
@@ -7976,8 +7995,18 @@ var pg = (e, t) => {
7976
7995
  "pb",
7977
7996
  "pl"
7978
7997
  ],
7979
- px: ["pr", "pl"],
7980
- py: ["pt", "pb"],
7998
+ px: [
7999
+ "ps",
8000
+ "pe",
8001
+ "pr",
8002
+ "pl"
8003
+ ],
8004
+ py: [
8005
+ "pbs",
8006
+ "pbe",
8007
+ "pt",
8008
+ "pb"
8009
+ ],
7981
8010
  m: [
7982
8011
  "mx",
7983
8012
  "my",
@@ -7990,8 +8019,18 @@ var pg = (e, t) => {
7990
8019
  "mb",
7991
8020
  "ml"
7992
8021
  ],
7993
- mx: ["mr", "ml"],
7994
- my: ["mt", "mb"],
8022
+ mx: [
8023
+ "ms",
8024
+ "me",
8025
+ "mr",
8026
+ "ml"
8027
+ ],
8028
+ my: [
8029
+ "mbs",
8030
+ "mbe",
8031
+ "mt",
8032
+ "mb"
8033
+ ],
7995
8034
  size: ["w", "h"],
7996
8035
  "font-size": ["leading"],
7997
8036
  "fvn-normal": [
@@ -8042,8 +8081,18 @@ var pg = (e, t) => {
8042
8081
  "border-w-b",
8043
8082
  "border-w-l"
8044
8083
  ],
8045
- "border-w-x": ["border-w-r", "border-w-l"],
8046
- "border-w-y": ["border-w-t", "border-w-b"],
8084
+ "border-w-x": [
8085
+ "border-w-s",
8086
+ "border-w-e",
8087
+ "border-w-r",
8088
+ "border-w-l"
8089
+ ],
8090
+ "border-w-y": [
8091
+ "border-w-bs",
8092
+ "border-w-be",
8093
+ "border-w-t",
8094
+ "border-w-b"
8095
+ ],
8047
8096
  "border-color": [
8048
8097
  "border-color-x",
8049
8098
  "border-color-y",
@@ -8056,8 +8105,18 @@ var pg = (e, t) => {
8056
8105
  "border-color-b",
8057
8106
  "border-color-l"
8058
8107
  ],
8059
- "border-color-x": ["border-color-r", "border-color-l"],
8060
- "border-color-y": ["border-color-t", "border-color-b"],
8108
+ "border-color-x": [
8109
+ "border-color-s",
8110
+ "border-color-e",
8111
+ "border-color-r",
8112
+ "border-color-l"
8113
+ ],
8114
+ "border-color-y": [
8115
+ "border-color-bs",
8116
+ "border-color-be",
8117
+ "border-color-t",
8118
+ "border-color-b"
8119
+ ],
8061
8120
  translate: [
8062
8121
  "translate-x",
8063
8122
  "translate-y",
@@ -8081,8 +8140,18 @@ var pg = (e, t) => {
8081
8140
  "scroll-mb",
8082
8141
  "scroll-ml"
8083
8142
  ],
8084
- "scroll-mx": ["scroll-mr", "scroll-ml"],
8085
- "scroll-my": ["scroll-mt", "scroll-mb"],
8143
+ "scroll-mx": [
8144
+ "scroll-ms",
8145
+ "scroll-me",
8146
+ "scroll-mr",
8147
+ "scroll-ml"
8148
+ ],
8149
+ "scroll-my": [
8150
+ "scroll-mbs",
8151
+ "scroll-mbe",
8152
+ "scroll-mt",
8153
+ "scroll-mb"
8154
+ ],
8086
8155
  "scroll-p": [
8087
8156
  "scroll-px",
8088
8157
  "scroll-py",
@@ -8095,8 +8164,18 @@ var pg = (e, t) => {
8095
8164
  "scroll-pb",
8096
8165
  "scroll-pl"
8097
8166
  ],
8098
- "scroll-px": ["scroll-pr", "scroll-pl"],
8099
- "scroll-py": ["scroll-pt", "scroll-pb"],
8167
+ "scroll-px": [
8168
+ "scroll-ps",
8169
+ "scroll-pe",
8170
+ "scroll-pr",
8171
+ "scroll-pl"
8172
+ ],
8173
+ "scroll-py": [
8174
+ "scroll-pbs",
8175
+ "scroll-pbe",
8176
+ "scroll-pt",
8177
+ "scroll-pb"
8178
+ ],
8100
8179
  touch: [
8101
8180
  "touch-x",
8102
8181
  "touch-y",
@@ -11805,13 +11884,13 @@ var Xb = Yb(), Zb = (e) => {
11805
11884
  "experimentalParseClassName"
11806
11885
  ]) t[e] !== void 0 && n[e] === void 0 && (n[e] = t[e]);
11807
11886
  let r = {};
11808
- if (Object.keys(n).length > 0 && (r.extend = n), t.override != null && !Ab(t.override) && (r.override = t.override), !(!r.extend && !r.override)) return r;
11887
+ if (Object.keys(n).length > 0 && (r.extend = n), t.override != null && !Ab(t.override) && (r.override = t.override), r.extend || r.override) return r;
11809
11888
  }, dC = (e) => {
11810
11889
  let t = lC(uC(e));
11811
11890
  return (e) => t.mergeString(e);
11812
11891
  }, fC, pC = () => (fC ||= lC(), fC), mC = () => ((!Xb.cachedTwMerge || Xb.didTwMergeConfigChange) && (Xb.didTwMergeConfigChange = !1, Xb.cachedTwMerge = dC(Xb.cachedTwMergeConfig)), Xb.cachedTwMerge), hC = (e) => {
11813
11892
  let t = e?.twMergeConfig;
11814
- !t || Ab(t) || jb(t, Xb.cachedTwMergeConfig) || (Xb.cachedTwMergeConfig = t, Xb.didTwMergeConfigChange = !0);
11893
+ t && !Ab(t) && (jb(t, Xb.cachedTwMergeConfig) || (Xb.cachedTwMergeConfig = t, Xb.didTwMergeConfigChange = !0));
11815
11894
  }, gC = (e) => Cb(e);
11816
11895
  (() => {
11817
11896
  let e = /* @__PURE__ */ Error();
@@ -13417,7 +13496,7 @@ OT.yearFirstLocales = /* @__PURE__ */ new Set([
13417
13496
  ]);
13418
13497
  var kT = new OT(), AT = class {
13419
13498
  constructor(e, t, n = kT) {
13420
- this.date = e, this.displayMonth = t, this.outside = !!(t && !n.isSameMonth(e, t)), this.dateLib = n, this.isoDate = n.format(e, "yyyy-MM-dd"), this.displayMonthId = n.format(t, "yyyy-MM"), this.dateMonthId = n.format(e, "yyyy-MM");
13499
+ this.date = e, this.displayMonth = t, this.outside = !(!t || n.isSameMonth(e, t)), this.dateLib = n, this.isoDate = n.format(e, "yyyy-MM-dd"), this.displayMonthId = n.format(t, "yyyy-MM"), this.dateMonthId = n.format(e, "yyyy-MM");
13421
13500
  }
13422
13501
  isEqualTo(e) {
13423
13502
  return this.dateLib.isSameDay(e.date, this.date) && this.dateLib.isSameMonth(e.displayMonth, this.displayMonth);
@@ -13675,7 +13754,7 @@ function yE(e, t, n, r, i) {
13675
13754
  [RT.today]: []
13676
13755
  }, b = {};
13677
13756
  for (let t of e) {
13678
- let { date: e, displayMonth: n } = t, r = !!(n && !f(e, n)), p = !!(_ && m(e, _)), h = !!(v && g(e, v)), x = !!(a && vE(e, a, i)), S = !!(o && vE(e, o, i)) || p || h || !l && !c && r || l && c === !1 && r, C = d(e, u);
13757
+ let { date: e, displayMonth: n } = t, r = !(!n || f(e, n)), p = !!(_ && m(e, _)), h = !!(v && g(e, v)), x = !!(a && vE(e, a, i)), S = !!(o && vE(e, o, i)) || p || h || !l && !c && r || l && c === !1 && r, C = d(e, u);
13679
13758
  r && y.outside.push(t), x && y.disabled.push(t), S && y.hidden.push(t), C && y.today.push(t), s && Object.keys(s).forEach((n) => {
13680
13759
  let r = s?.[n];
13681
13760
  r && vE(e, r, i) && (b[n] ? b[n].push(t) : b[n] = [t]);
@@ -14182,7 +14261,7 @@ function DD(e, t, n, r, i) {
14182
14261
  moveFocus: (n, r) => {
14183
14262
  if (!l) return;
14184
14263
  let a = ED(n, r, l, t.navStart, t.navEnd, e, i);
14185
- a && (e.disableNavigation && !t.days.some((e) => e.isEqualTo(a)) || (t.goToDay(a), u(a)));
14264
+ a && (!e.disableNavigation || t.days.some((e) => e.isEqualTo(a))) && (t.goToDay(a), u(a));
14186
14265
  }
14187
14266
  };
14188
14267
  }
@@ -15064,7 +15143,7 @@ var AO = "DismissableLayer", jO = "dismissableLayer.update", MO = "dismissableLa
15064
15143
  }), IO = e.forwardRef((t, n) => {
15065
15144
  let { disableOutsidePointerEvents: r = !1, onEscapeKeyDown: i, onPointerDownOutside: a, onFocusOutside: o, onInteractOutside: s, onDismiss: c, ...l } = t, u = e.useContext(FO), [d, f] = e.useState(null), p = d?.ownerDocument ?? globalThis?.document, [, m] = e.useState({}), h = sO(n, (e) => f(e)), g = Array.from(u.layers), [v] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), y = g.indexOf(v), b = d ? g.indexOf(d) : -1, x = u.layersWithOutsidePointerEventsDisabled.size > 0, S = b >= y, C = zO((e) => {
15066
15145
  let t = e.target, n = [...u.branches].some((e) => e.contains(t));
15067
- !S || n || (a?.(e), s?.(e), e.defaultPrevented || c?.());
15146
+ S && !n && (a?.(e), s?.(e), e.defaultPrevented || c?.());
15068
15147
  }, p), w = BO((e) => {
15069
15148
  let t = e.target;
15070
15149
  [...u.branches].some((e) => e.contains(t)) || (o?.(e), s?.(e), e.defaultPrevented || c?.());
@@ -15974,7 +16053,7 @@ var fA = [
15974
16053
  ], t.keywords), u = wA(), d = VA((e) => e.value && e.value === l.current), f = VA((e) => c || o.filter() === !1 ? !0 : !e.search || e.filtered.items.get(r) > 0);
15975
16054
  e.useEffect(() => {
15976
16055
  let e = i.current;
15977
- if (!(!e || t.disabled)) return e.addEventListener(vA, p), () => e.removeEventListener(vA, p);
16056
+ if (e && !t.disabled) return e.addEventListener(vA, p), () => e.removeEventListener(vA, p);
15978
16057
  }, [
15979
16058
  f,
15980
16059
  t.onSelect,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.5.123",
3
+ "version": "0.5.125",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {
@@ -193,17 +193,17 @@
193
193
  }
194
194
  },
195
195
  "devDependencies": {
196
- "postcss": "^8.5.26"
196
+ "postcss": "^8.5.28"
197
197
  },
198
198
  "dependencies": {
199
- "@base-ui/react": "^1.7.0",
199
+ "@base-ui/react": "^1.8.0",
200
200
  "@emotion/cache": "^11.13.0",
201
201
  "@emotion/react": "^11.13.0",
202
202
  "@emotion/styled": "^11.13.0",
203
203
  "@hookform/resolvers": "^5.9.1",
204
- "@lingui/core": "^6.6.0",
205
- "@lingui/message-utils": "^6.6.0",
206
- "@lingui/react": "^6.6.0",
204
+ "@lingui/core": "^6.7.0",
205
+ "@lingui/message-utils": "^6.7.0",
206
+ "@lingui/react": "^6.7.0",
207
207
  "@mui/icons-material": "^6.5.0",
208
208
  "@mui/material": "^6.5.0",
209
209
  "@mui/utils": "^6.4.9",
@@ -237,21 +237,21 @@
237
237
  "radix-ui": "^1.6.7",
238
238
  "react-confetti": "^6.4.0",
239
239
  "react-day-picker": "^9.14.0",
240
- "react-error-boundary": "^6.1.4",
241
- "react-hook-form": "^7.87.0",
240
+ "react-error-boundary": "^6.1.5",
241
+ "react-hook-form": "^7.88.0",
242
242
  "react-hot-toast": "^2.6.0",
243
243
  "react-pdf": "^10.5.0",
244
244
  "react-script-hook": "^1.7.2",
245
245
  "react-use": "^17.6.1",
246
246
  "react-webcam": "^7.2.0",
247
247
  "sonner": "^2.0.8",
248
- "tailwind-merge": "^3.6.0",
248
+ "tailwind-merge": "^3.7.0",
249
249
  "tailwind-variants": "^3.3.1",
250
250
  "type-fest": "^4.41.0",
251
- "zod": "^4.5.4"
251
+ "zod": "^4.6.5"
252
252
  },
253
253
  "peerDependencies": {
254
- "react": "^19.2.8",
255
- "react-dom": "^19.2.8"
254
+ "react": "^19.3.0",
255
+ "react-dom": "^19.3.0"
256
256
  }
257
257
  }