@tesouro/embedded-components-react 0.2.306 → 0.2.308

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 (20) hide show
  1. package/README.md +7 -4
  2. package/dist/index.css +12 -0
  3. package/dist/index.d.ts +22 -1
  4. package/dist/lib/CardDetailsWidget.d.ts +6 -0
  5. package/dist/lib/CardsWidget.d.ts +6 -0
  6. package/dist/lib/TransfersWidget.d.ts +16 -1
  7. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +132 -110
  8. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/index.js +1 -0
  9. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js +13 -0
  10. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardSuccessView.js +2 -0
  11. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/FieldError.js +1 -0
  12. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/PinField.js +5 -0
  13. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js +80 -70
  14. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/labels.js +5 -0
  15. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/testIds.js +3 -1
  16. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index4.js +174 -164
  18. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index5.js +55 -52
  19. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +6 -3
  20. package/package.json +1 -1
package/README.md CHANGED
@@ -599,10 +599,13 @@ A self-contained banking widget for creating book or ACH transfers and reviewing
599
599
 
600
600
  #### Props
601
601
 
602
- | Prop | Type | Default | Description |
603
- | --------------- | --------------------------------------- | ---------------- | --------------------------------------------------------------------- |
604
- | `labels` | `Partial<TransfersWidgetLabels>` | English labels | Override shell and modal copy. |
605
- | `featureLabels` | `Partial<TransfersWidgetFeatureLabels>` | English defaults | Override routing copy, fallbacks, default currency, and ACH SEC code. |
602
+ | Prop | Type | Default | Description |
603
+ | ---------------------------- | --------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
604
+ | `labels` | `Partial<TransfersWidgetLabels>` | English labels | Override shell and modal copy. |
605
+ | `featureLabels` | `Partial<TransfersWidgetFeatureLabels>` | English defaults | Override routing copy, fallbacks, default currency, and ACH SEC code. |
606
+ | `isTransferMoneyOpen` | `boolean` | Uncontrolled | Whether the transfer money modal is showing. Supplying it makes the modal controlled: the widget reports every open and close and changes nothing until you re-supply a new value. |
607
+ | `defaultIsTransferMoneyOpen` | `boolean` | `false` | The modal's state on first render, for a host that only wants to seed it. Ignored when `isTransferMoneyOpen` is supplied. |
608
+ | `onTransferMoneyOpenChange` | `(open: boolean) => void` | `undefined` | Called on every open and close — the **Transfer money** CTA, the modal's own dismissals (Esc, overlay, close), and the close after a completed transfer. |
606
609
 
607
610
  ### UploadReceiptWidget
608
611
 
package/dist/index.css CHANGED
@@ -216,6 +216,9 @@
216
216
  .ttw\:end-0 {
217
217
  inset-inline-end: calc(var(--ttw-spacing) * 0);
218
218
  }
219
+ .ttw\:end-1 {
220
+ inset-inline-end: calc(var(--ttw-spacing) * 1);
221
+ }
219
222
  .ttw\:\!top-2 {
220
223
  top: calc(var(--ttw-spacing) * 2) !important;
221
224
  }
@@ -225,6 +228,9 @@
225
228
  .ttw\:top-0 {
226
229
  top: 0px;
227
230
  }
231
+ .ttw\:top-1 {
232
+ top: var(--ttw-spacing);
233
+ }
228
234
  .ttw\:top-1\.5 {
229
235
  top: calc(var(--ttw-spacing) * 1.5);
230
236
  }
@@ -1214,6 +1220,9 @@
1214
1220
  .ttw\:w-\[600px\] {
1215
1221
  width: 600px;
1216
1222
  }
1223
+ .ttw\:w-\[616px\] {
1224
+ width: 616px;
1225
+ }
1217
1226
  .ttw\:w-\[672px\] {
1218
1227
  width: 672px;
1219
1228
  }
@@ -2823,6 +2832,9 @@
2823
2832
  .ttw\:py-\[7px\] {
2824
2833
  padding-block: 7px;
2825
2834
  }
2835
+ .ttw\:pe-10 {
2836
+ padding-inline-end: calc(var(--ttw-spacing) * 10);
2837
+ }
2826
2838
  .ttw\:pt-0 {
2827
2839
  padding-top: 0px;
2828
2840
  }
package/dist/index.d.ts CHANGED
@@ -2060,6 +2060,11 @@ interface CardDetailsFieldLabels {
2060
2060
  copyNicknameAriaLabel: string;
2061
2061
  copyBillingAddressAriaLabel: string;
2062
2062
  }
2063
+ /** Copy for the controls the owner can switch on alongside the details. */
2064
+ interface CardDetailsActionLabels {
2065
+ /** Primary control that opens the Activate Card form. */
2066
+ activateCard: string;
2067
+ }
2063
2068
  /** Copy for the three non-loaded screens. */
2064
2069
  interface CardDetailsStatusScreenLabels {
2065
2070
  /** Accessible name announced while the panel is loading. */
@@ -2074,6 +2079,7 @@ interface CardDetailsPanelLabels {
2074
2079
  header: CardDetailsHeaderLabels;
2075
2080
  cardFace: CardDetailsCardFaceLabels;
2076
2081
  fields: CardDetailsFieldLabels;
2082
+ actions: CardDetailsActionLabels;
2077
2083
  status: CardDetailsStatusScreenLabels;
2078
2084
  }
2079
2085
 
@@ -4703,10 +4709,25 @@ declare const DEFAULT_FEATURE_LABELS: FeatureLabels;
4703
4709
  interface TransfersWidgetPassthroughProps {
4704
4710
  labels?: Partial<TransfersWidgetLabels>;
4705
4711
  featureLabels?: Partial<FeatureLabels>;
4712
+ /**
4713
+ * Whether the transfer money modal is showing. Supplying it makes the modal
4714
+ * controlled: the widget reports every open and close through
4715
+ * `onTransferMoneyOpenChange` and changes nothing on screen until the host
4716
+ * supplies a new value. Omit to let the widget own it.
4717
+ */
4718
+ isTransferMoneyOpen?: boolean;
4719
+ /** The modal's state on first render, for a host that only wants to seed it. */
4720
+ defaultIsTransferMoneyOpen?: boolean;
4721
+ /**
4722
+ * Called on every open and close — the CTA, the modal's own dismissals, and
4723
+ * the close that follows a completed transfer — whether or not the modal is
4724
+ * controlled.
4725
+ */
4726
+ onTransferMoneyOpenChange?: (open: boolean) => void;
4706
4727
  }
4707
4728
  interface TransfersWidgetProps extends WidgetProviderProps, TransfersWidgetPassthroughProps {
4708
4729
  }
4709
- declare function TransfersWidget({ labels, featureLabels, ...widgetProviderProps }: TransfersWidgetProps): React.JSX.Element;
4730
+ declare function TransfersWidget({ labels, featureLabels, isTransferMoneyOpen, defaultIsTransferMoneyOpen, onTransferMoneyOpenChange, ...widgetProviderProps }: TransfersWidgetProps): React.JSX.Element;
4710
4731
 
4711
4732
  /**
4712
4733
  * Public {@link WidgetProvider} — the integrator-facing provider.
@@ -28,6 +28,11 @@ interface CardDetailsFieldLabels {
28
28
  copyNicknameAriaLabel: string;
29
29
  copyBillingAddressAriaLabel: string;
30
30
  }
31
+ /** Copy for the controls the owner can switch on alongside the details. */
32
+ interface CardDetailsActionLabels {
33
+ /** Primary control that opens the Activate Card form. */
34
+ activateCard: string;
35
+ }
31
36
  /** Copy for the three non-loaded screens. */
32
37
  interface CardDetailsStatusScreenLabels {
33
38
  /** Accessible name announced while the panel is loading. */
@@ -42,6 +47,7 @@ interface CardDetailsPanelLabels {
42
47
  header: CardDetailsHeaderLabels;
43
48
  cardFace: CardDetailsCardFaceLabels;
44
49
  fields: CardDetailsFieldLabels;
50
+ actions: CardDetailsActionLabels;
45
51
  status: CardDetailsStatusScreenLabels;
46
52
  }
47
53
 
@@ -754,6 +754,11 @@ interface CardDetailsFieldLabels {
754
754
  copyNicknameAriaLabel: string;
755
755
  copyBillingAddressAriaLabel: string;
756
756
  }
757
+ /** Copy for the controls the owner can switch on alongside the details. */
758
+ interface CardDetailsActionLabels {
759
+ /** Primary control that opens the Activate Card form. */
760
+ activateCard: string;
761
+ }
757
762
  /** Copy for the three non-loaded screens. */
758
763
  interface CardDetailsStatusScreenLabels {
759
764
  /** Accessible name announced while the panel is loading. */
@@ -768,6 +773,7 @@ interface CardDetailsPanelLabels {
768
773
  header: CardDetailsHeaderLabels;
769
774
  cardFace: CardDetailsCardFaceLabels;
770
775
  fields: CardDetailsFieldLabels;
776
+ actions: CardDetailsActionLabels;
771
777
  status: CardDetailsStatusScreenLabels;
772
778
  }
773
779
 
@@ -680,10 +680,25 @@ declare const DEFAULT_FEATURE_LABELS: FeatureLabels;
680
680
  interface TransfersWidgetPassthroughProps {
681
681
  labels?: Partial<TransfersWidgetLabels>;
682
682
  featureLabels?: Partial<FeatureLabels>;
683
+ /**
684
+ * Whether the transfer money modal is showing. Supplying it makes the modal
685
+ * controlled: the widget reports every open and close through
686
+ * `onTransferMoneyOpenChange` and changes nothing on screen until the host
687
+ * supplies a new value. Omit to let the widget own it.
688
+ */
689
+ isTransferMoneyOpen?: boolean;
690
+ /** The modal's state on first render, for a host that only wants to seed it. */
691
+ defaultIsTransferMoneyOpen?: boolean;
692
+ /**
693
+ * Called on every open and close — the CTA, the modal's own dismissals, and
694
+ * the close that follows a completed transfer — whether or not the modal is
695
+ * controlled.
696
+ */
697
+ onTransferMoneyOpenChange?: (open: boolean) => void;
683
698
  }
684
699
  interface TransfersWidgetProps extends WidgetProviderProps, TransfersWidgetPassthroughProps {
685
700
  }
686
- declare function TransfersWidget({ labels, featureLabels, ...widgetProviderProps }: TransfersWidgetProps): React.JSX.Element;
701
+ declare function TransfersWidget({ labels, featureLabels, isTransferMoneyOpen, defaultIsTransferMoneyOpen, onTransferMoneyOpenChange, ...widgetProviderProps }: TransfersWidgetProps): React.JSX.Element;
687
702
 
688
703
  export { DEFAULT_FEATURE_LABELS as TRANSFERS_FEATURE_LABELS_EN, TRANSFERS_WIDGET_LABELS_EN, TransfersWidget };
689
704
  export type { FeatureLabels as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps };
@@ -11,164 +11,186 @@ import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as ee, emitWidg
11
11
  import { useWidgetConfig as ne, useWidgetError as re, useWidgetLoading as ie } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
12
12
  import "../../../shared/feature/dist/index.js";
13
13
  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";
14
+ import { copyTextToClipboard as ae, formatAmountLabel as a, formatTotalAvailableBalanceLabel as oe, maskAccountNumber as se } from "./index3.js";
15
+ import { DEFAULT_FEATURE_LABELS as ce } from "./index4.js";
16
+ import { getBankAccountsPermissions as le } from "./index5.js";
17
+ import { toAccessRows as ue, toOrganizationRoleOptions as de, toTeamMembers as fe } from "./index6.js";
18
+ import { DEFAULT_LABELS as pe } from "../../ui/dist/lib/labels.js";
19
19
  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";
20
+ import { useCreateBankAccountMutation as me } from "../../data-access/dist/index3.js";
21
+ import { useGrantBankAccountAccessMutation as he } from "../../data-access/dist/index4.js";
22
+ import { useAllOrganizationUsersQuery as ge } from "../../data-access/dist/index5.js";
23
23
  import "../../data-access/dist/index.js";
24
- import { filterRolesForOrganization as ge } from "../../../../shared/util-validation/dist/index6.js";
25
- import { useCallback as s, useEffect as _e, useMemo as c, useState as l } from "react";
26
- import { useControllableState as ve } from "@radix-ui/react-use-controllable-state";
24
+ import { filterRolesForOrganization as _e } from "../../../../shared/util-validation/dist/index6.js";
25
+ import { useCallback as o, 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
27
  //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js
28
28
  var u = { nickname: "" };
29
- function d({ labels: a, featureLabels: o, isBankingTaglineVisible: d = !0, bankLogoSrc: be, bankLogoAlt: xe, depositAgreementUrl: Se, selectedAccountId: Ce, defaultSelectedAccountId: we, onSelectedAccountIdChange: Te, "data-testid": Ee }) {
30
- let f = {
31
- ...fe,
29
+ function d(e, t) {
30
+ return e !== void 0 && t !== void 0 && e !== t;
31
+ }
32
+ function f({ labels: a, featureLabels: se, isBankingTaglineVisible: f = !0, bankLogoSrc: xe, bankLogoAlt: Se, depositAgreementUrl: Ce, selectedAccountId: we, defaultSelectedAccountId: Te, onSelectedAccountIdChange: Ee, "data-testid": De } = {}) {
33
+ let p = {
34
+ ...pe,
32
35
  ...a
33
- }, p = {
34
- ...se,
35
- ...o
36
- }, m = r(), { organizationId: h, widgetToken: De, initResponse: g } = ne(), Oe = ie(), _ = !!re(), v = !!(h && De), y = c(() => ce(g?.scopes), [g?.scopes]), ke = v && y.canRead && !!g, [b, x] = ve({
37
- prop: Ce,
38
- defaultProp: we ?? null,
39
- onChange: Te,
36
+ }, m = {
37
+ ...ce,
38
+ ...se
39
+ }, h = r(), { organizationId: g, widgetToken: Oe, initResponse: _ } = ne(), ke = ie(), v = !!re(), y = !!(g && Oe), b = c(() => le(_?.scopes), [_?.scopes]), Ae = y && b.canRead && !!_, x = _?.userId ?? void 0, [S, je] = l(g);
40
+ g !== void 0 && g !== S && je(g);
41
+ let [C, Me] = l(x);
42
+ x !== void 0 && x !== C && Me(x);
43
+ let [Ne, w] = ye({
44
+ prop: we,
45
+ defaultProp: Te ?? null,
46
+ onChange: Ee,
40
47
  caller: "BankAccountsWidget"
41
- }), S = ke && !b, C = s((e) => {
42
- x(e);
43
- }, [x]), [w, T] = l(!1), [E, D] = l(u), [O, k] = l([]), [Ae, A] = l(!1), [j, M] = l(), [N, je] = l({}), [P, F] = l({});
44
- _e(() => {
45
- m(i.Mounted);
46
- }, [m]);
47
- let I = t({ enabled: S }), L = pe(), R = me(), z = w, B = he({ enabled: z }), V = n({ enabled: z }), H = c(() => {
48
- let e = V.data?.data ?? [], t = h ? ge(e, {
49
- organizationId: h,
50
- organizationTypes: g?.organizationTypes ?? []
48
+ }), T = ve({
49
+ organizationId: S,
50
+ userId: C
51
+ }), Pe = d(T.current.organizationId, S) || d(T.current.userId, C);
52
+ s(() => {
53
+ let e = T.current;
54
+ T.current = {
55
+ organizationId: S,
56
+ userId: C
57
+ }, (d(e.organizationId, S) || d(e.userId, C)) && w(null);
58
+ }, [
59
+ S,
60
+ C,
61
+ w
62
+ ]);
63
+ let E = Pe ? null : Ne, D = Ae && !E, O = o((e) => {
64
+ w(e);
65
+ }, [w]), [k, Fe] = 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
+ h(i.Mounted);
68
+ }, [h]);
69
+ let z = t({ enabled: D }), B = me(), V = he(), H = k, U = ge({ enabled: H }), W = n({ enabled: H }), G = c(() => {
70
+ let e = W.data?.data ?? [], t = g ? _e(e, {
71
+ organizationId: g,
72
+ organizationTypes: _?.organizationTypes ?? []
51
73
  }) : e;
52
- return de(B.data?.data ?? [], ue(t));
74
+ return fe(U.data?.data ?? [], de(t));
53
75
  }, [
54
- V.data?.data,
55
- B.data?.data,
56
- h,
57
- g?.organizationTypes
58
- ]), U = B.isLoading || B.isFetchingNextPage || !!B.hasNextPage || V.isResolving, W = !U && !B.isError, G = S ? I.data?.data ?? [] : [], K = [.../* @__PURE__ */ new Set([...H.filter((e) => e.locked).map((e) => e.id), ...O])], q = g?.bankName?.trim() ?? "", Me = g?.vspName?.trim() ?? "", Ne = Se?.trim() || void 0, J = v && y.canWrite, Y = !I.hasNextPage && !I.isFetchingNextPage, Pe = c(() => Y ? oe(G) : void 0, [G, Y]), Fe = G.length > 1 && y.canRead && Y, X = s(async (t, n, r) => {
59
- await ae(r) && (e.success(n === "account" ? p.copyAccountNumberToast : p.copyRoutingNumberToast), F((e) => ({
76
+ W.data?.data,
77
+ U.data?.data,
78
+ g,
79
+ _?.organizationTypes
80
+ ]), K = U.isLoading || U.isFetchingNextPage || !!U.hasNextPage || W.isResolving, q = !K && !U.isError, J = D ? z.data?.data ?? [] : [], Y = [.../* @__PURE__ */ new Set([...G.filter((e) => e.locked).map((e) => e.id), ...M])], X = _?.bankName?.trim() ?? "", ze = _?.vspName?.trim() ?? "", Be = Ce?.trim() || void 0, Z = y && b.canWrite, Q = !z.hasNextPage && !z.isFetchingNextPage, Ve = c(() => Q ? oe(J) : void 0, [J, Q]), He = J.length > 1 && b.canRead && Q, $ = o(async (t, n, r) => {
81
+ await ae(r) && (e.success(n === "account" ? m.copyAccountNumberToast : m.copyRoutingNumberToast), R((e) => ({
60
82
  ...e,
61
83
  [t]: n
62
84
  })), window.setTimeout(() => {
63
- F((e) => ({
85
+ R((e) => ({
64
86
  ...e,
65
87
  [t]: void 0
66
88
  }));
67
89
  }, 2e3));
68
- }, [p.copyAccountNumberToast, p.copyRoutingNumberToast]), Ie = c(() => G.map((e) => ye(e, p, {
69
- isAccountNumberVisible: N[e.id] ?? !1,
70
- isAccountNumberCopied: P[e.id] === "account",
71
- isRoutingNumberCopied: P[e.id] === "routing",
72
- onToggleAccountNumberVisibility: () => je((t) => ({
90
+ }, [m.copyAccountNumberToast, m.copyRoutingNumberToast]), Ue = c(() => J.map((e) => be(e, m, {
91
+ isAccountNumberVisible: Le[e.id] ?? !1,
92
+ isAccountNumberCopied: L[e.id] === "account",
93
+ isRoutingNumberCopied: L[e.id] === "routing",
94
+ onToggleAccountNumberVisibility: () => Re((t) => ({
73
95
  ...t,
74
96
  [e.id]: !t[e.id]
75
97
  })),
76
- onCopyAccountNumber: () => void X(e.id, "account", e.accountNumber),
77
- onCopyRoutingNumber: () => void X(e.id, "routing", e.routingNumber),
98
+ onCopyAccountNumber: () => void $(e.id, "account", e.accountNumber),
99
+ onCopyRoutingNumber: () => void $(e.id, "routing", e.routingNumber),
78
100
  onSelect: () => {
79
- C(e.id), m(i.AccountSelected, { accountId: e.id });
101
+ O(e.id), h(i.AccountSelected, { accountId: e.id });
80
102
  }
81
103
  })), [
82
- G,
83
- N,
84
- P,
85
- p,
86
- X,
87
- C,
88
- m
89
- ]), Z = (t) => {
90
- R.mutate({
104
+ J,
105
+ Le,
106
+ L,
107
+ m,
108
+ $,
109
+ O,
110
+ h
111
+ ]), We = (t) => {
112
+ V.mutate({
91
113
  path: { id: t },
92
- body: { userIds: K }
114
+ body: { userIds: Y }
93
115
  }, { onSuccess: () => {
94
- te(ee), e.success(p.createSuccessToast), D(u), k([]), M(void 0), A(!1), T(!1);
116
+ te(ee), e.success(m.createSuccessToast), j(u), N([]), I(void 0), P(!1), Fe(!1);
95
117
  } });
96
- }, Le = () => {
97
- if (J && W) {
98
- if (E.nickname.trim() === "") {
99
- A(!0);
118
+ }, Ge = () => {
119
+ if (Z && q) {
120
+ if (A.nickname.trim() === "") {
121
+ P(!0);
100
122
  return;
101
123
  }
102
- if (K.length === 0) {
124
+ if (Y.length === 0) {
103
125
  console.warn("No team members selected on submit");
104
126
  return;
105
127
  }
106
- if (j) {
107
- Z(j);
128
+ if (F) {
129
+ We(F);
108
130
  return;
109
131
  }
110
- L.mutate({ body: { nickname: E.nickname.trim() } }, { onSuccess: (e) => {
111
- m(i.AccountCreated, { accountId: e?.id }), e?.id && (M(e.id), Z(e.id));
132
+ B.mutate({ body: { nickname: A.nickname.trim() } }, { onSuccess: (e) => {
133
+ h(i.AccountCreated, { accountId: e?.id }), e?.id && (I(e.id), We(e.id));
112
134
  } });
113
135
  }
114
- }, Re = (e, t) => {
115
- H.find((t) => t.id === e)?.locked || k((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e));
116
- }, Q = (e) => {
117
- e && !J || (e && (D(u), k([]), M(void 0), A(!1), L.reset(), R.reset()), T(e));
118
- }, $ = L.isPending || R.isPending, ze = le(H, {
119
- selectedUserIds: O,
120
- disabled: $ || !y.canWrite,
121
- fallbackTooltip: f.teamMemberAccessTooltip,
122
- onUserToggle: Re
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()), Fe(e));
140
+ }, Je = B.isPending || V.isPending, Ye = ue(G, {
141
+ selectedUserIds: M,
142
+ disabled: Je || !b.canWrite,
143
+ fallbackTooltip: p.teamMemberAccessTooltip,
144
+ onUserToggle: Ke
123
145
  });
124
146
  return {
125
- "data-testid": Ee,
126
- selectedAccountId: b,
127
- title: f.title,
128
- bankDisplayName: q,
129
- bankLogoSrc: be,
130
- bankLogoAlt: xe,
131
- availableBalanceLabel: Pe,
132
- shouldDisplayAvailableBalance: Fe,
133
- isBankingTaglineVisible: d,
134
- accountCards: Ie,
135
- shouldDisplayAddAccountCard: y.canWrite,
136
- isLoading: !_ && (!v || Oe && !g || S && (I.isLoading || I.isFetchingNextPage || I.hasNextPage)),
137
- isError: _ || S && I.isError,
138
- isCreateOpen: w,
139
- createForm: E,
147
+ "data-testid": De,
148
+ selectedAccountId: E,
149
+ title: p.title,
150
+ bankDisplayName: X,
151
+ bankLogoSrc: xe,
152
+ bankLogoAlt: Se,
153
+ availableBalanceLabel: Ve,
154
+ shouldDisplayAvailableBalance: He,
155
+ isBankingTaglineVisible: f,
156
+ accountCards: Ue,
157
+ shouldDisplayAddAccountCard: b.canWrite,
158
+ isLoading: !v && (!y || ke && !_ || D && (z.isLoading || z.isFetchingNextPage || z.hasNextPage)),
159
+ isError: v || D && z.isError,
160
+ isCreateOpen: k,
161
+ createForm: A,
140
162
  legalCopy: {
141
- bankName: q,
142
- vspName: Me,
143
- agreementUrl: Ne
163
+ bankName: X,
164
+ vspName: ze,
165
+ agreementUrl: Be
144
166
  },
145
- accessRows: ze,
146
- isTeamMembersLoading: U,
147
- isTeamMembersError: B.isError,
148
- isCreateSubmitDisabled: !J || !W || E.nickname.trim() === "" || K.length === 0,
149
- isCreateError: L.isError || R.isError,
150
- hasNicknameError: Ae,
151
- isSubmitting: $,
152
- isCreateDisabled: !J,
153
- onCreateOpenChange: Q,
167
+ accessRows: Ye,
168
+ isTeamMembersLoading: K,
169
+ isTeamMembersError: U.isError,
170
+ isCreateSubmitDisabled: !Z || !q || A.nickname.trim() === "" || Y.length === 0,
171
+ isCreateError: B.isError || V.isError,
172
+ hasNicknameError: Ie,
173
+ isSubmitting: Je,
174
+ isCreateDisabled: !Z,
175
+ onCreateOpenChange: qe,
154
176
  onCreateFormChange: (e) => {
155
- A(!1), D(e);
177
+ P(!1), j(e);
156
178
  },
157
- onCreateSubmit: Le,
158
- onAddAccountClick: () => Q(!0),
159
- onSelectAccount: C
179
+ onCreateSubmit: Ge,
180
+ onAddAccountClick: () => qe(!0),
181
+ onSelectAccount: O
160
182
  };
161
183
  }
162
- function ye(e, t, n) {
184
+ function be(e, t, n) {
163
185
  return {
164
186
  id: e.id,
165
187
  name: e.nickname?.trim() || t.accountFallback,
166
188
  balanceLabel: a(e.balance),
167
189
  accountNumberLabel: e.accountNumber,
168
- maskedAccountNumberLabel: o(e.accountNumber),
190
+ maskedAccountNumberLabel: se(e.accountNumber),
169
191
  routingNumberLabel: e.routingNumber,
170
192
  ...n
171
193
  };
172
194
  }
173
195
  //#endregion
174
- export { d as useBankAccountsWidget };
196
+ export { f as useBankAccountsWidget };
@@ -5,4 +5,5 @@ import "./lib/CardDetailsPanel/CardFace.js";
5
5
  import "./lib/CardDetailsPanel/DetailCopyRow.js";
6
6
  import "./lib/CardDetailsPanel/labels.js";
7
7
  import { CardDetailsPanel as e } from "./lib/CardDetailsPanel/CardDetailsPanel.js";
8
+ import "./lib/ActivateCardPanel/ActivateCardPanel.js";
8
9
  export { e as CardDetailsPanel };
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import "../../../../../shared/ui/dist/index.js";
7
+ import "../CardDetailsPanel/CardFace.js";
8
+ import "./ActivateCardSuccessView.js";
9
+ import "./FieldError.js";
10
+ import "./PinField.js";
11
+ import "react";
12
+ import "react/jsx-runtime";
13
+ import "lucide-react";
@@ -0,0 +1,5 @@
1
+ import "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import "./FieldError.js";
3
+ import "react";
4
+ import "react/jsx-runtime";
5
+ import "lucide-react";