@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.
- package/README.md +7 -4
- package/dist/index.css +12 -0
- package/dist/index.d.ts +22 -1
- package/dist/lib/CardDetailsWidget.d.ts +6 -0
- package/dist/lib/CardsWidget.d.ts +6 -0
- package/dist/lib/TransfersWidget.d.ts +16 -1
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +132 -110
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/index.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardSuccessView.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/FieldError.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/PinField.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js +80 -70
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/labels.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/testIds.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index4.js +174 -164
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index5.js +55 -52
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +6 -3
- 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
|
|
603
|
-
|
|
|
604
|
-
| `labels`
|
|
605
|
-
| `featureLabels`
|
|
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 };
|
package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js
CHANGED
|
@@ -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
|
|
15
|
-
import { DEFAULT_FEATURE_LABELS as
|
|
16
|
-
import { getBankAccountsPermissions as
|
|
17
|
-
import { toAccessRows as
|
|
18
|
-
import { DEFAULT_LABELS as
|
|
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
|
|
21
|
-
import { useGrantBankAccountAccessMutation as
|
|
22
|
-
import { useAllOrganizationUsersQuery as
|
|
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
|
|
25
|
-
import { useCallback as
|
|
26
|
-
import { useControllableState as
|
|
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(
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
},
|
|
34
|
-
...
|
|
35
|
-
...
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
}),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
|
74
|
+
return fe(U.data?.data ?? [], de(t));
|
|
53
75
|
}, [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
]),
|
|
59
|
-
await ae(r) && (e.success(n === "account" ?
|
|
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
|
-
|
|
85
|
+
R((e) => ({
|
|
64
86
|
...e,
|
|
65
87
|
[t]: void 0
|
|
66
88
|
}));
|
|
67
89
|
}, 2e3));
|
|
68
|
-
}, [
|
|
69
|
-
isAccountNumberVisible:
|
|
70
|
-
isAccountNumberCopied:
|
|
71
|
-
isRoutingNumberCopied:
|
|
72
|
-
onToggleAccountNumberVisibility: () =>
|
|
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
|
|
77
|
-
onCopyRoutingNumber: () => void
|
|
98
|
+
onCopyAccountNumber: () => void $(e.id, "account", e.accountNumber),
|
|
99
|
+
onCopyRoutingNumber: () => void $(e.id, "routing", e.routingNumber),
|
|
78
100
|
onSelect: () => {
|
|
79
|
-
|
|
101
|
+
O(e.id), h(i.AccountSelected, { accountId: e.id });
|
|
80
102
|
}
|
|
81
103
|
})), [
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
]),
|
|
90
|
-
|
|
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:
|
|
114
|
+
body: { userIds: Y }
|
|
93
115
|
}, { onSuccess: () => {
|
|
94
|
-
te(ee), e.success(
|
|
116
|
+
te(ee), e.success(m.createSuccessToast), j(u), N([]), I(void 0), P(!1), Fe(!1);
|
|
95
117
|
} });
|
|
96
|
-
},
|
|
97
|
-
if (
|
|
98
|
-
if (
|
|
99
|
-
|
|
118
|
+
}, Ge = () => {
|
|
119
|
+
if (Z && q) {
|
|
120
|
+
if (A.nickname.trim() === "") {
|
|
121
|
+
P(!0);
|
|
100
122
|
return;
|
|
101
123
|
}
|
|
102
|
-
if (
|
|
124
|
+
if (Y.length === 0) {
|
|
103
125
|
console.warn("No team members selected on submit");
|
|
104
126
|
return;
|
|
105
127
|
}
|
|
106
|
-
if (
|
|
107
|
-
|
|
128
|
+
if (F) {
|
|
129
|
+
We(F);
|
|
108
130
|
return;
|
|
109
131
|
}
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
},
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
e && !
|
|
118
|
-
},
|
|
119
|
-
selectedUserIds:
|
|
120
|
-
disabled:
|
|
121
|
-
fallbackTooltip:
|
|
122
|
-
onUserToggle:
|
|
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":
|
|
126
|
-
selectedAccountId:
|
|
127
|
-
title:
|
|
128
|
-
bankDisplayName:
|
|
129
|
-
bankLogoSrc:
|
|
130
|
-
bankLogoAlt:
|
|
131
|
-
availableBalanceLabel:
|
|
132
|
-
shouldDisplayAvailableBalance:
|
|
133
|
-
isBankingTaglineVisible:
|
|
134
|
-
accountCards:
|
|
135
|
-
shouldDisplayAddAccountCard:
|
|
136
|
-
isLoading: !
|
|
137
|
-
isError:
|
|
138
|
-
isCreateOpen:
|
|
139
|
-
createForm:
|
|
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:
|
|
142
|
-
vspName:
|
|
143
|
-
agreementUrl:
|
|
163
|
+
bankName: X,
|
|
164
|
+
vspName: ze,
|
|
165
|
+
agreementUrl: Be
|
|
144
166
|
},
|
|
145
|
-
accessRows:
|
|
146
|
-
isTeamMembersLoading:
|
|
147
|
-
isTeamMembersError:
|
|
148
|
-
isCreateSubmitDisabled: !
|
|
149
|
-
isCreateError:
|
|
150
|
-
hasNicknameError:
|
|
151
|
-
isSubmitting:
|
|
152
|
-
isCreateDisabled: !
|
|
153
|
-
onCreateOpenChange:
|
|
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
|
-
|
|
177
|
+
P(!1), j(e);
|
|
156
178
|
},
|
|
157
|
-
onCreateSubmit:
|
|
158
|
-
onAddAccountClick: () =>
|
|
159
|
-
onSelectAccount:
|
|
179
|
+
onCreateSubmit: Ge,
|
|
180
|
+
onAddAccountClick: () => qe(!0),
|
|
181
|
+
onSelectAccount: O
|
|
160
182
|
};
|
|
161
183
|
}
|
|
162
|
-
function
|
|
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:
|
|
190
|
+
maskedAccountNumberLabel: se(e.accountNumber),
|
|
169
191
|
routingNumberLabel: e.routingNumber,
|
|
170
192
|
...n
|
|
171
193
|
};
|
|
172
194
|
}
|
|
173
195
|
//#endregion
|
|
174
|
-
export {
|
|
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 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|