@tesouro/embedded-components-react 0.3.35 → 0.3.36

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.
@@ -12,17 +12,18 @@ import { useEffect as a, useMemo as o } from "react";
12
12
  import { useInfiniteQuery as s } from "@tanstack/react-query";
13
13
  //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js
14
14
  var c = 100, l = ["ACTIVE", "INVITED"];
15
- function u(l, u) {
16
- let { client: d, organizationId: f, authEpoch: p } = e(), m = t(f), h = r({
17
- client: d,
18
- headers: m,
15
+ function u(l, u, d) {
16
+ let { client: f, organizationId: p, authEpoch: m } = e(), h = t(p), g = d?.length ? { Permissions: d } : {}, _ = r({
17
+ client: f,
18
+ headers: h,
19
19
  query: {
20
20
  Status: l,
21
- Limit: c
21
+ Limit: c,
22
+ ...g
22
23
  }
23
- }), g = s({
24
+ }), v = s({
24
25
  queryKey: [
25
- ...i(h, p).queryKey,
26
+ ...i(_, m).queryKey,
26
27
  "all",
27
28
  l
28
29
  ],
@@ -30,11 +31,12 @@ function u(l, u) {
30
31
  initialPageParam: void 0,
31
32
  queryFn: async ({ signal: e, pageParam: t }) => {
32
33
  let { data: r } = await n({
33
- client: d,
34
- headers: m,
34
+ client: f,
35
+ headers: h,
35
36
  query: {
36
37
  Status: l,
37
38
  Limit: c,
39
+ ...g,
38
40
  ...t ? { PaginationToken: t } : {}
39
41
  },
40
42
  signal: e,
@@ -48,31 +50,31 @@ function u(l, u) {
48
50
  }
49
51
  });
50
52
  a(() => {
51
- !u || !g.hasNextPage || g.isFetchingNextPage || g.isError || g.fetchNextPage();
53
+ !u || !v.hasNextPage || v.isFetchingNextPage || v.isError || v.fetchNextPage();
52
54
  }, [
53
55
  u,
54
- g.hasNextPage,
55
- g.isFetchingNextPage,
56
- g.isError,
57
- g.fetchNextPage
56
+ v.hasNextPage,
57
+ v.isFetchingNextPage,
58
+ v.isError,
59
+ v.fetchNextPage
58
60
  ]);
59
- let _ = o(() => {
60
- if (g.data) return {
61
- data: g.data.pages.flatMap((e) => e.data ?? []),
61
+ let y = o(() => {
62
+ if (v.data) return {
63
+ data: v.data.pages.flatMap((e) => e.data ?? []),
62
64
  nextPaginationToken: null,
63
65
  prevPaginationToken: null
64
66
  };
65
- }, [g.data]);
67
+ }, [v.data]);
66
68
  return {
67
- ...g,
68
- data: _
69
+ ...v,
70
+ data: y
69
71
  };
70
72
  }
71
- function d({ enabled: t } = {}) {
72
- let { organizationId: n, widgetToken: r } = e(), i = !!(n && r) && (t === !0 || t === void 0), a = u("ACTIVE", i), s = u("INVITED", i), c = o(() => {
73
+ function d({ enabled: t, permissions: n } = {}) {
74
+ let { organizationId: r, widgetToken: i } = e(), a = !!(r && i) && (t === !0 || t === void 0), s = u("ACTIVE", a, n), c = u("INVITED", a, n), d = o(() => {
73
75
  let e = /* @__PURE__ */ new Map();
74
76
  for (let t of l) {
75
- let n = t === "ACTIVE" ? a.data?.data ?? [] : s.data?.data ?? [];
77
+ let n = t === "ACTIVE" ? s.data?.data ?? [] : c.data?.data ?? [];
76
78
  for (let t of n) e.set(t.id, t);
77
79
  }
78
80
  return {
@@ -80,15 +82,15 @@ function d({ enabled: t } = {}) {
80
82
  nextPaginationToken: null,
81
83
  prevPaginationToken: null
82
84
  };
83
- }, [a.data, s.data]), d = a.isLoading || s.isLoading, f = a.isFetchingNextPage || s.isFetchingNextPage, p = a.hasNextPage || s.hasNextPage, m = a.isError || s.isError;
85
+ }, [s.data, c.data]), f = s.isLoading || c.isLoading, p = s.isFetchingNextPage || c.isFetchingNextPage, m = s.hasNextPage || c.hasNextPage, h = s.isError || c.isError;
84
86
  return {
85
- ...a,
86
- data: c,
87
- isLoading: d,
88
- isFetchingNextPage: f,
89
- hasNextPage: p,
90
- isError: m,
91
- isSuccess: a.isSuccess && s.isSuccess
87
+ ...s,
88
+ data: d,
89
+ isLoading: f,
90
+ isFetchingNextPage: p,
91
+ hasNextPage: m,
92
+ isError: h,
93
+ isSuccess: s.isSuccess && c.isSuccess
92
94
  };
93
95
  }
94
96
  //#endregion
@@ -26,25 +26,21 @@ function r(e, n) {
26
26
  if (r) return e.find((e) => e.key.toLowerCase() === r.toLowerCase())?.description;
27
27
  }
28
28
  function i(e) {
29
- let t = e?.trim().toLowerCase() ?? "", n = t.includes(":") ? t.slice(t.lastIndexOf(":") + 1) : t;
30
- return n === "admin" || n === "administrator";
31
- }
32
- function a(e) {
33
29
  return e.trim() ? e.split("_").filter(Boolean).map((e) => e.length <= 3 && e === e.toUpperCase() ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join(" ") : "";
34
30
  }
35
- function o(e, o) {
31
+ function a(e, a, o) {
36
32
  return e.map((e) => {
37
- let s = e.role ?? "", c = t(o, s) || s.trim(), l = n(o, s) || a(c), u = r(o, s) ?? "";
33
+ let s = e.role ?? "", c = t(a, s) || s.trim(), l = n(a, s) || i(c), u = r(a, s) ?? "";
38
34
  return {
39
35
  id: e.id,
40
36
  name: e.name,
41
37
  role: l,
42
38
  roleDescription: u,
43
- locked: i(c) || i(s)
39
+ locked: o.has(e.id)
44
40
  };
45
41
  });
46
42
  }
47
- function s(e, { selectedUserIds: t, disabled: n, fallbackTooltip: r, onUserToggle: i }) {
43
+ function o(e, { selectedUserIds: t, disabled: n, fallbackTooltip: r, onUserToggle: i }) {
48
44
  return e.map((e) => ({
49
45
  key: e.id,
50
46
  name: e.name,
@@ -58,4 +54,4 @@ function s(e, { selectedUserIds: t, disabled: n, fallbackTooltip: r, onUserToggl
58
54
  }));
59
55
  }
60
56
  //#endregion
61
- export { i as isAdminRoleKey, r as resolveOrganizationRoleDescription, n as resolveOrganizationRoleDisplayName, t as resolveOrganizationRoleKey, s as toAccessRows, e as toOrganizationRoleOptions, o as toTeamMembers };
57
+ export { r as resolveOrganizationRoleDescription, n as resolveOrganizationRoleDisplayName, t as resolveOrganizationRoleKey, o as toAccessRows, e as toOrganizationRoleOptions, a as toTeamMembers };
@@ -3,53 +3,55 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { useAllBankAccountsQuery as t } from "../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
7
- import { useAllOrganizationRolesQuery as n } from "../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
6
+ import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
7
+ import { useAllBankAccountsQuery as n } from "../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
8
+ import { useAllOrganizationRolesQuery as r } from "../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
9
+ import "../../../shared/data-access/dist/index.js";
8
10
  import "../../../shared/ui/dist/index.js";
9
- import { useAnalyticsTrack as r } from "../../../shared/feature/dist/lib/analytics/hooks.js";
10
- import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as ee, emitWidgetDomEvent as te } from "../../../shared/util/dist/lib/widgetDomEvents.js";
11
- import { useWidgetConfig as ne, useWidgetError as re, useWidgetLoading as ie } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
11
+ import { useAnalyticsTrack as ee } from "../../../shared/feature/dist/lib/analytics/hooks.js";
12
+ import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as te, emitWidgetDomEvent as ne } from "../../../shared/util/dist/lib/widgetDomEvents.js";
13
+ import { useWidgetConfig as re, useWidgetError as ie, useWidgetLoading as ae } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
12
14
  import "../../../shared/feature/dist/index.js";
13
15
  import { BankAccountsWidgetAnalyticsEvent as i } from "./index2.js";
14
- import { copyTextToClipboard as ae, formatAmountLabel as a, formatTotalAvailableBalanceLabel as oe, maskAccountNumber as o } from "./index3.js";
15
- import { DEFAULT_FEATURE_LABELS as se } from "./index4.js";
16
- import { getBankAccountsPermissions as ce } from "./index5.js";
17
- import { toAccessRows as le, toOrganizationRoleOptions as ue, toTeamMembers as de } from "./index6.js";
18
- import { DEFAULT_LABELS as fe } from "../../ui/dist/lib/labels.js";
16
+ import { copyTextToClipboard as oe, formatAmountLabel as a, formatTotalAvailableBalanceLabel as se, maskAccountNumber as o } from "./index3.js";
17
+ import { DEFAULT_FEATURE_LABELS as ce } from "./index4.js";
18
+ import { getBankAccountsPermissions as le } from "./index5.js";
19
+ import { toAccessRows as ue, toOrganizationRoleOptions as de, toTeamMembers as fe } from "./index6.js";
20
+ import { DEFAULT_LABELS as pe } from "../../ui/dist/lib/labels.js";
19
21
  import "../../ui/dist/index.js";
20
- import { useCreateBankAccountMutation as pe } from "../../data-access/dist/index3.js";
21
- import { useGrantBankAccountAccessMutation as me } from "../../data-access/dist/index4.js";
22
- import { useAllOrganizationUsersQuery as he } from "../../data-access/dist/index5.js";
22
+ import { useCreateBankAccountMutation as me } from "../../data-access/dist/index3.js";
23
+ import { useGrantBankAccountAccessMutation as he } from "../../data-access/dist/index4.js";
24
+ import { useAllOrganizationUsersQuery as s } from "../../data-access/dist/index5.js";
23
25
  import "../../data-access/dist/index.js";
24
26
  import { filterRolesForOrganization as ge } from "../../../../shared/util-validation/dist/index6.js";
25
- import { useCallback as _e, useEffect as s, useMemo as c, useRef as ve, useState as l } from "react";
26
- import { useControllableState as ye } from "@radix-ui/react-use-controllable-state";
27
+ import { useCallback as _e, useEffect as ve, useMemo as c, useRef as ye, useState as l } from "react";
28
+ import { useControllableState as be } from "@radix-ui/react-use-controllable-state";
27
29
  //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js
28
- var u = { nickname: "" };
30
+ var u = { nickname: "" }, xe = t.BankAccountWriteOrg;
29
31
  function d(e, t) {
30
32
  return e !== void 0 && t !== void 0 && e !== t;
31
33
  }
32
- function f({ labels: a, featureLabels: o, isBankingTaglineVisible: f = !0, bankLogoSrc: xe, bankLogoAlt: Se, depositAgreementUrl: Ce, selectedAccountId: we, defaultSelectedAccountId: Te, onSelectedAccountIdChange: Ee, "data-testid": De } = {}) {
33
- let Oe = {
34
- ...fe,
35
- ...a
34
+ function f({ labels: t, featureLabels: a, isBankingTaglineVisible: o = !0, bankLogoSrc: f, bankLogoAlt: Ce, depositAgreementUrl: we, selectedAccountId: Te, defaultSelectedAccountId: Ee, onSelectedAccountIdChange: De, "data-testid": Oe } = {}) {
35
+ let ke = {
36
+ ...pe,
37
+ ...t
36
38
  }, p = {
37
- ...se,
38
- ...o
39
- }, m = r(), { organizationId: h, widgetToken: ke, initResponse: g } = ne(), Ae = ie(), _ = !!re(), v = !!(h && ke), y = c(() => ce(g?.scopes), [g?.scopes]), je = v && y.canRead && !!g, b = g?.userId ?? void 0, [x, Me] = l(h);
40
- h !== void 0 && h !== x && Me(h);
41
- let [S, Ne] = l(b);
42
- b !== void 0 && b !== S && Ne(b);
43
- let [Pe, C] = ye({
44
- prop: we,
45
- defaultProp: Te ?? null,
46
- onChange: Ee,
39
+ ...ce,
40
+ ...a
41
+ }, m = ee(), { organizationId: h, widgetToken: Ae, initResponse: g } = re(), je = ae(), _ = !!ie(), v = !!(h && Ae), y = c(() => le(g?.scopes), [g?.scopes]), Me = v && y.canRead && !!g, b = g?.userId ?? void 0, [x, Ne] = l(h);
42
+ h !== void 0 && h !== x && Ne(h);
43
+ let [S, Pe] = l(b);
44
+ b !== void 0 && b !== S && Pe(b);
45
+ let [Fe, C] = be({
46
+ prop: Te,
47
+ defaultProp: Ee ?? null,
48
+ onChange: De,
47
49
  caller: "BankAccountsWidget"
48
- }), w = ve({
50
+ }), w = ye({
49
51
  organizationId: x,
50
52
  userId: S
51
- }), Fe = d(w.current.organizationId, x) || d(w.current.userId, S);
52
- s(() => {
53
+ }), Ie = d(w.current.organizationId, x) || d(w.current.userId, S);
54
+ ve(() => {
53
55
  let e = w.current;
54
56
  w.current = {
55
57
  organizationId: x,
@@ -60,63 +62,67 @@ function f({ labels: a, featureLabels: o, isBankingTaglineVisible: f = !0, bankL
60
62
  S,
61
63
  C
62
64
  ]);
63
- let T = Fe ? null : Pe, E = je && !T, D = _e((e) => {
65
+ let T = Ie ? null : Fe, E = Me && !T, D = _e((e) => {
64
66
  C(e);
65
- }, [C]), [O, k] = l(!1), [A, j] = l(u), [M, N] = l([]), [Ie, P] = l(!1), [F, I] = l(), [Le, Re] = l({}), [L, R] = l({});
66
- s(() => {
67
+ }, [C]), [O, k] = l(!1), [A, j] = l(u), [M, N] = l([]), [Le, P] = l(!1), [F, I] = l(), [L, Re] = l({}), [R, z] = l({});
68
+ ve(() => {
67
69
  m(i.Mounted);
68
70
  }, [m]);
69
- let z = t({ enabled: E }), B = pe(), V = me(), H = O, U = he({ enabled: H }), W = n({ enabled: H }), G = c(() => {
70
- let e = W.data?.data ?? [], t = h ? ge(e, {
71
+ let B = n({ enabled: E }), V = me(), H = he(), U = O, W = s({ enabled: U }), G = r({ enabled: U }), K = s({
72
+ enabled: U,
73
+ permissions: [xe]
74
+ }), ze = c(() => new Set((K.data?.data ?? []).filter((e) => e.organizationId === h).map((e) => e.id)), [K.data?.data, h]), q = c(() => {
75
+ let e = G.data?.data ?? [], t = h ? ge(e, {
71
76
  organizationId: h,
72
77
  organizationTypes: g?.organizationTypes ?? []
73
78
  }) : e;
74
- return de(U.data?.data ?? [], ue(t));
79
+ return fe(W.data?.data ?? [], de(t), ze);
75
80
  }, [
81
+ ze,
82
+ G.data?.data,
76
83
  W.data?.data,
77
- U.data?.data,
78
84
  h,
79
85
  g?.organizationTypes
80
- ]), K = U.isLoading || U.isFetchingNextPage || !!U.hasNextPage || W.isResolving, q = !K && !U.isError, J = E ? z.data?.data ?? [] : [], Y = [.../* @__PURE__ */ new Set([...G.filter((e) => e.locked).map((e) => e.id), ...M])], X = g?.bankName?.trim() ?? "", ze = g?.vspName?.trim() ?? "", Be = Ce?.trim() || void 0, Z = v && y.canWrite, Q = !z.hasNextPage && !z.isFetchingNextPage, Ve = c(() => Q ? oe(J) : void 0, [J, Q]), He = J.length > 1 && y.canRead && Q, $ = _e(async (t, n, r) => {
81
- await ae(r) && (e.success(n === "account" ? p.copyAccountNumberToast : p.copyRoutingNumberToast), R((e) => ({
86
+ ]), Be = W.isLoading || W.isFetchingNextPage || !!W.hasNextPage || G.isResolving || K.isLoading || K.isFetchingNextPage || !!K.hasNextPage, Ve = !Be && !W.isError && !K.isError, J = E ? B.data?.data ?? [] : [], Y = [.../* @__PURE__ */ new Set([...q.filter((e) => e.locked).map((e) => e.id), ...M])], He = g?.bankName?.trim() ?? "", Ue = g?.vspName?.trim() ?? "", We = we?.trim() || void 0, X = v && y.canWrite, Z = !B.hasNextPage && !B.isFetchingNextPage, Ge = c(() => Z ? se(J) : void 0, [J, Z]), Ke = J.length > 1 && y.canRead && Z, Q = _e(async (t, n, r) => {
87
+ await oe(r) && (e.success(n === "account" ? p.copyAccountNumberToast : p.copyRoutingNumberToast), z((e) => ({
82
88
  ...e,
83
89
  [t]: n
84
90
  })), window.setTimeout(() => {
85
- R((e) => ({
91
+ z((e) => ({
86
92
  ...e,
87
93
  [t]: void 0
88
94
  }));
89
95
  }, 2e3));
90
- }, [p.copyAccountNumberToast, p.copyRoutingNumberToast]), Ue = c(() => J.map((e) => be(e, p, {
91
- isAccountNumberVisible: Le[e.id] ?? !1,
92
- isAccountNumberCopied: L[e.id] === "account",
93
- isRoutingNumberCopied: L[e.id] === "routing",
96
+ }, [p.copyAccountNumberToast, p.copyRoutingNumberToast]), qe = c(() => J.map((e) => Se(e, p, {
97
+ isAccountNumberVisible: L[e.id] ?? !1,
98
+ isAccountNumberCopied: R[e.id] === "account",
99
+ isRoutingNumberCopied: R[e.id] === "routing",
94
100
  onToggleAccountNumberVisibility: () => Re((t) => ({
95
101
  ...t,
96
102
  [e.id]: !t[e.id]
97
103
  })),
98
- onCopyAccountNumber: () => void $(e.id, "account", e.accountNumber),
99
- onCopyRoutingNumber: () => void $(e.id, "routing", e.routingNumber),
104
+ onCopyAccountNumber: () => void Q(e.id, "account", e.accountNumber),
105
+ onCopyRoutingNumber: () => void Q(e.id, "routing", e.routingNumber),
100
106
  onSelect: () => {
101
107
  D(e.id), m(i.AccountSelected, { accountId: e.id });
102
108
  }
103
109
  })), [
104
110
  J,
105
- Le,
106
111
  L,
112
+ R,
107
113
  p,
108
- $,
114
+ Q,
109
115
  D,
110
116
  m
111
- ]), We = (t) => {
112
- V.mutate({
117
+ ]), Je = (t) => {
118
+ H.mutate({
113
119
  path: { id: t },
114
120
  body: { userIds: Y }
115
121
  }, { onSuccess: () => {
116
- te(ee), e.success(p.createSuccessToast), j(u), N([]), I(void 0), P(!1), k(!1);
122
+ ne(te), e.success(p.createSuccessToast), j(u), N([]), I(void 0), P(!1), k(!1);
117
123
  } });
118
- }, Ge = () => {
119
- if (Z && q) {
124
+ }, Ye = () => {
125
+ if (X && Ve) {
120
126
  if (A.nickname.trim() === "") {
121
127
  P(!0);
122
128
  return;
@@ -126,61 +132,61 @@ function f({ labels: a, featureLabels: o, isBankingTaglineVisible: f = !0, bankL
126
132
  return;
127
133
  }
128
134
  if (F) {
129
- We(F);
135
+ Je(F);
130
136
  return;
131
137
  }
132
- B.mutate({ body: { nickname: A.nickname.trim() } }, { onSuccess: (e) => {
133
- m(i.AccountCreated, { accountId: e?.id }), e?.id && (I(e.id), We(e.id));
138
+ V.mutate({ body: { nickname: A.nickname.trim() } }, { onSuccess: (e) => {
139
+ m(i.AccountCreated, { accountId: e?.id }), e?.id && (I(e.id), Je(e.id));
134
140
  } });
135
141
  }
136
- }, Ke = (e, t) => {
137
- G.find((t) => t.id === e)?.locked || N((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e));
138
- }, qe = (e) => {
139
- e && !Z || (e && (j(u), N([]), I(void 0), P(!1), B.reset(), V.reset()), k(e));
140
- }, Je = B.isPending || V.isPending, Ye = le(G, {
142
+ }, Xe = (e, t) => {
143
+ q.find((t) => t.id === e)?.locked || N((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e));
144
+ }, Ze = (e) => {
145
+ e && !X || (e && (j(u), N([]), I(void 0), P(!1), V.reset(), H.reset()), k(e));
146
+ }, $ = V.isPending || H.isPending, Qe = ue(q, {
141
147
  selectedUserIds: M,
142
- disabled: Je || !y.canWrite,
143
- fallbackTooltip: Oe.teamMemberAccessTooltip,
144
- onUserToggle: Ke
148
+ disabled: $ || !y.canWrite,
149
+ fallbackTooltip: ke.teamMemberAccessTooltip,
150
+ onUserToggle: Xe
145
151
  });
146
152
  return {
147
- "data-testid": De,
153
+ "data-testid": Oe,
148
154
  selectedAccountId: T,
149
- bankDisplayName: X,
150
- bankLogoSrc: xe,
151
- bankLogoAlt: Se,
152
- availableBalanceLabel: Ve,
153
- shouldDisplayAvailableBalance: He,
154
- isBankingTaglineVisible: f,
155
- accountCards: Ue,
155
+ bankDisplayName: He,
156
+ bankLogoSrc: f,
157
+ bankLogoAlt: Ce,
158
+ availableBalanceLabel: Ge,
159
+ shouldDisplayAvailableBalance: Ke,
160
+ isBankingTaglineVisible: o,
161
+ accountCards: qe,
156
162
  shouldDisplayAddAccountCard: y.canWrite,
157
- isLoading: !_ && (!v || Ae && !g || E && (z.isLoading || z.isFetchingNextPage || z.hasNextPage)),
158
- isError: _ || E && z.isError,
163
+ isLoading: !_ && (!v || je && !g || E && (B.isLoading || B.isFetchingNextPage || B.hasNextPage)),
164
+ isError: _ || E && B.isError,
159
165
  isCreateOpen: O,
160
166
  createForm: A,
161
167
  legalCopy: {
162
- bankName: X,
163
- vspName: ze,
164
- agreementUrl: Be
168
+ bankName: He,
169
+ vspName: Ue,
170
+ agreementUrl: We
165
171
  },
166
- accessRows: Ye,
167
- isTeamMembersLoading: K,
168
- isTeamMembersError: U.isError,
169
- isCreateSubmitDisabled: !Z || !q || A.nickname.trim() === "" || Y.length === 0,
170
- isCreateError: B.isError || V.isError,
171
- hasNicknameError: Ie,
172
- isSubmitting: Je,
173
- isCreateDisabled: !Z,
174
- onCreateOpenChange: qe,
172
+ accessRows: Qe,
173
+ isTeamMembersLoading: Be,
174
+ isTeamMembersError: W.isError || K.isError,
175
+ isCreateSubmitDisabled: !X || !Ve || A.nickname.trim() === "" || Y.length === 0,
176
+ isCreateError: V.isError || H.isError,
177
+ hasNicknameError: Le,
178
+ isSubmitting: $,
179
+ isCreateDisabled: !X,
180
+ onCreateOpenChange: Ze,
175
181
  onCreateFormChange: (e) => {
176
182
  P(!1), j(e);
177
183
  },
178
- onCreateSubmit: Ge,
179
- onAddAccountClick: () => qe(!0),
184
+ onCreateSubmit: Ye,
185
+ onAddAccountClick: () => Ze(!0),
180
186
  onSelectAccount: D
181
187
  };
182
188
  }
183
- function be(e, t, n) {
189
+ function Se(e, t, n) {
184
190
  return {
185
191
  id: e.id,
186
192
  name: e.nickname?.trim() || t.accountFallback,
@@ -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.3.35", n = "36cd42c3786678996be4c94f8e69f392fcf48f73", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.3.36", n = "7c0f26289f38325142aacf6107cd730286263bf2", 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.3.35",
3
+ "version": "0.3.36",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {