@tesouro/embedded-components-react 0.11.60 → 0.11.62
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 +21 -21
- package/dist/index.css +37 -160
- package/dist/index.d.ts +50 -17
- package/dist/lib/BankAccountsWidget.d.ts +20 -7
- package/dist/lib/LinkedAccountsWidget.d.ts +30 -10
- package/dist/lib/WidgetSuite.d.ts +50 -17
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +21 -26
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +18 -16
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index5.js +22 -35
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index6.js +29 -14
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index7.js +20 -24
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index8.js +31 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index10.js +296 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index12.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index5.js +5 -10
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index9.js +42 -281
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index.js +5 -3
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index10.js +180 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index2.js +16 -184
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index3.js +9 -93
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index4.js +136 -81
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index5.js +64 -101
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index6.js +54 -81
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index7.js +90 -65
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js +108 -183
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index9.js +76 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/BankAccountsWidget/BankAccountsWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/labels.js +6 -8
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/useBankAccountsWidget.js +137 -120
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/mocks/labels.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/AccountCard.js +47 -60
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +71 -72
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankingHeader.js +22 -37
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/CreateAccountDialog.js +119 -133
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js +12 -8
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/LinkedAccountsWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/labels.js +9 -7
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/rows.js +46 -27
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useAdminEligibleUserIds.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useLinkedAccountsWidget.js +248 -224
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/mocks/labels.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index10.js +22 -36
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index11.js +23 -70
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index12.js +91 -27
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index13.js +80 -63
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index14.js +145 -125
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index2.js +61 -9
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index3.js +77 -50
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index4.js +180 -65
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index5.js +22 -178
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index6.js +6 -75
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index7.js +48 -11
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index8.js +45 -7
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index9.js +8 -82
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +15 -14
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/AddTile/AddTile.js +17 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +3603 -3518
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index11.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index15.js +0 -67
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index16.js +0 -138
|
@@ -2,84 +2,83 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { TooltipProvider as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { DEFAULT_LABELS as t } from "./labels.js";
|
|
7
|
+
import { AddTile as n } from "../../../../shared/ui/dist/lib/AddTile/AddTile.js";
|
|
8
|
+
import { EmptyState as r } from "../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
9
|
+
import { ErrorState as i } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
10
|
+
import { LoadingRegion as a } from "../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
|
|
9
11
|
import "../../../../shared/ui/dist/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
+
import { AccountCard as o, AccountCardSkeleton as s } from "./AccountCard.js";
|
|
13
|
+
import { BankingHeader as c } from "./BankingHeader.js";
|
|
14
|
+
import { CreateAccountDialog as l } from "./CreateAccountDialog.js";
|
|
15
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
16
|
+
import { LandmarkIcon as p } from "lucide-react";
|
|
12
17
|
// ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js
|
|
13
|
-
function
|
|
14
|
-
let
|
|
15
|
-
...
|
|
16
|
-
...
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
function m({ labels: m, "data-testid": h, bankDisplayName: g, bankLogoSrc: _, bankLogoAlt: v, availableBalanceLabel: y, shouldDisplayAvailableBalance: b, isBankingTaglineVisible: x, accountCards: S, accountCardTestId: C, shouldDisplayAddAccountCard: w, isLoading: T, isError: E, onRetry: D, isCreateOpen: O, createForm: k, legalCopy: A, accessRows: j, isTeamMembersLoading: M, isTeamMembersError: N, isCreateError: P, hasNicknameError: F, hasTeamAccessError: I, isSubmitting: L, isAuthPending: R = !1, isCreateDisabled: z, onCreateOpenChange: B, onCreateFormChange: V, onCreateSubmit: H, onTeamMembersRetry: U, onAddAccountClick: W }) {
|
|
19
|
+
let G = {
|
|
20
|
+
...t,
|
|
21
|
+
...m
|
|
22
|
+
}, K = !T && !E && S.length === 0, q = w ? /* @__PURE__ */ d(n, {
|
|
23
|
+
label: G.addAccountButton,
|
|
24
|
+
disabled: z,
|
|
25
|
+
onClick: W,
|
|
26
|
+
className: "ttw:w-80 ttw:max-w-full ttw:min-h-52"
|
|
27
|
+
}) : null;
|
|
28
|
+
return /* @__PURE__ */ f("section", {
|
|
29
|
+
className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-6",
|
|
30
|
+
"data-testid": h,
|
|
21
31
|
children: [
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
labels:
|
|
24
|
-
open:
|
|
25
|
-
form:
|
|
26
|
-
legalCopy:
|
|
27
|
-
accessRows:
|
|
28
|
-
isTeamMembersLoading:
|
|
29
|
-
isTeamMembersError:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
isError:
|
|
33
|
-
hasNicknameError:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
/* @__PURE__ */ d(l, {
|
|
33
|
+
labels: G,
|
|
34
|
+
open: O,
|
|
35
|
+
form: k,
|
|
36
|
+
legalCopy: A,
|
|
37
|
+
accessRows: j,
|
|
38
|
+
isTeamMembersLoading: M,
|
|
39
|
+
isTeamMembersError: N,
|
|
40
|
+
isSubmitting: L,
|
|
41
|
+
isAuthPending: R,
|
|
42
|
+
isError: P,
|
|
43
|
+
hasNicknameError: F,
|
|
44
|
+
hasTeamAccessError: I,
|
|
45
|
+
onOpenChange: B,
|
|
46
|
+
onFormChange: V,
|
|
47
|
+
onSubmit: H,
|
|
48
|
+
onTeamMembersRetry: U
|
|
37
49
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
labels:
|
|
40
|
-
bankDisplayName:
|
|
41
|
-
bankLogoSrc:
|
|
42
|
-
bankLogoAlt:
|
|
43
|
-
availableBalanceLabel:
|
|
44
|
-
shouldDisplayAvailableBalance:
|
|
45
|
-
isBankingTaglineVisible:
|
|
50
|
+
/* @__PURE__ */ d(c, {
|
|
51
|
+
labels: G,
|
|
52
|
+
bankDisplayName: g,
|
|
53
|
+
bankLogoSrc: _,
|
|
54
|
+
bankLogoAlt: v,
|
|
55
|
+
availableBalanceLabel: y,
|
|
56
|
+
shouldDisplayAvailableBalance: b,
|
|
57
|
+
isBankingTaglineVisible: x
|
|
46
58
|
}),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
className: "ttw:flex ttw:flex-wrap ttw:gap-
|
|
53
|
-
children:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
children: L.emptyAccountsLabel
|
|
69
|
-
}) : null,
|
|
70
|
-
b ? null : _.map((e) => /* @__PURE__ */ s(t, {
|
|
71
|
-
labels: L,
|
|
72
|
-
card: e,
|
|
73
|
-
testId: v
|
|
74
|
-
}, e.id)),
|
|
75
|
-
!b && y ? /* @__PURE__ */ s(n, {
|
|
76
|
-
labels: L,
|
|
77
|
-
disabled: M,
|
|
78
|
-
onClick: I
|
|
79
|
-
}) : null
|
|
80
|
-
]
|
|
59
|
+
E ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(i, {
|
|
60
|
+
title: G.errorTitle,
|
|
61
|
+
retryLabel: G.retryButton,
|
|
62
|
+
onRetry: D
|
|
63
|
+
}), q ? /* @__PURE__ */ d("div", {
|
|
64
|
+
className: "ttw:flex ttw:flex-wrap ttw:gap-4",
|
|
65
|
+
children: q
|
|
66
|
+
}) : null] }) : K ? /* @__PURE__ */ d(r, {
|
|
67
|
+
icon: /* @__PURE__ */ d(p, {}),
|
|
68
|
+
title: G.emptyAccountsLabel,
|
|
69
|
+
actionLabel: w ? G.addAccountButton : void 0,
|
|
70
|
+
onAction: w && !z ? W : void 0
|
|
71
|
+
}) : /* @__PURE__ */ d(a, {
|
|
72
|
+
isLoading: T,
|
|
73
|
+
loadingLabel: G.loadingLabel,
|
|
74
|
+
className: "ttw:flex ttw:flex-wrap ttw:gap-4",
|
|
75
|
+
children: T ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(s, {}), /* @__PURE__ */ d(s, {})] }) : /* @__PURE__ */ f(e, { children: [S.map((e) => /* @__PURE__ */ d(o, {
|
|
76
|
+
labels: G,
|
|
77
|
+
card: e,
|
|
78
|
+
testId: C
|
|
79
|
+
}, e.id)), q] })
|
|
81
80
|
})
|
|
82
81
|
]
|
|
83
82
|
});
|
|
84
83
|
}
|
|
85
|
-
export {
|
|
84
|
+
export { m as BankAccountsWidgetUi };
|
|
@@ -2,51 +2,36 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import { jsx as
|
|
7
|
-
import {
|
|
5
|
+
import { DisplayAmount as e, Tooltip as t, TooltipContent as n, TooltipProvider as r, TooltipTrigger as i } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
import { InfoIcon as s } from "lucide-react";
|
|
8
8
|
// ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankingHeader.js
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
variant: "body1",
|
|
17
|
-
color: "muted",
|
|
18
|
-
children: e.bankingTaglinePrefix
|
|
19
|
-
}), u ? /* @__PURE__ */ o("img", {
|
|
9
|
+
function c({ labels: c, bankDisplayName: l, bankLogoSrc: u, bankLogoAlt: d, availableBalanceLabel: f, shouldDisplayAvailableBalance: p, isBankingTaglineVisible: m }) {
|
|
10
|
+
let h = m && !!l, g = p && !!f;
|
|
11
|
+
return !h && !g ? null : /* @__PURE__ */ o("header", {
|
|
12
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
13
|
+
children: [h ? /* @__PURE__ */ o("div", {
|
|
14
|
+
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-1 ttw:text-sm ttw:text-muted-foreground",
|
|
15
|
+
children: [/* @__PURE__ */ a("span", { children: c.bankingTaglinePrefix }), u ? /* @__PURE__ */ a("img", {
|
|
20
16
|
src: u,
|
|
21
17
|
alt: d ?? l,
|
|
22
18
|
className: "ttw:block ttw:h-auto ttw:max-w-[120px]"
|
|
23
|
-
}) : /* @__PURE__ */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
children: l
|
|
28
|
-
})]
|
|
29
|
-
}) : null, p && f ? /* @__PURE__ */ s("div", {
|
|
30
|
-
className: "ttw:mt-4",
|
|
31
|
-
children: [/* @__PURE__ */ s("div", {
|
|
19
|
+
}) : /* @__PURE__ */ a("span", { children: l })]
|
|
20
|
+
}) : null, g && f ? /* @__PURE__ */ o("div", {
|
|
21
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
22
|
+
children: [/* @__PURE__ */ o("div", {
|
|
32
23
|
className: "ttw:flex ttw:items-center ttw:gap-1 ttw:text-sm ttw:text-muted-foreground",
|
|
33
|
-
children: [/* @__PURE__ */
|
|
24
|
+
children: [/* @__PURE__ */ a("span", { children: c.availableBalanceLabel }), /* @__PURE__ */ a(r, { children: /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ a(i, {
|
|
34
25
|
type: "button",
|
|
35
|
-
className: "ttw:inline-flex ttw:cursor-
|
|
36
|
-
"aria-label":
|
|
37
|
-
children: /* @__PURE__ */
|
|
38
|
-
}), /* @__PURE__ */
|
|
26
|
+
className: "ttw:inline-flex ttw:cursor-pointer",
|
|
27
|
+
"aria-label": c.availableBalanceTooltip,
|
|
28
|
+
children: /* @__PURE__ */ a(s, { className: "ttw:size-4" })
|
|
29
|
+
}), /* @__PURE__ */ a(n, {
|
|
39
30
|
className: "ttw:max-w-xs",
|
|
40
|
-
children:
|
|
31
|
+
children: c.availableBalanceTooltip
|
|
41
32
|
})] }) })]
|
|
42
|
-
}), /* @__PURE__ */
|
|
43
|
-
className: "ttw:text-3xl ttw:font-bold ttw:text-primary",
|
|
44
|
-
children: f
|
|
45
|
-
})]
|
|
33
|
+
}), /* @__PURE__ */ a(e, { children: f })]
|
|
46
34
|
}) : null]
|
|
47
35
|
});
|
|
48
36
|
}
|
|
49
|
-
|
|
50
|
-
return /* @__PURE__ */ o(e, { className: "ttw:h-[214px] ttw:w-80 ttw:rounded-xl" });
|
|
51
|
-
}
|
|
52
|
-
export { u as AccountCardSkeleton, l as BankingHeader };
|
|
37
|
+
export { c as BankingHeader };
|
|
@@ -2,164 +2,150 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { Button as e,
|
|
6
|
-
import { InlineErrorAlert as
|
|
5
|
+
import { Button as e, FieldRequirement as t, FormDialog as n, Heading as r, Input as i, Label as a, Separator as o, Skeleton as s, Switch as c, Tooltip as l, TooltipContent as u, TooltipProvider as d, TooltipTrigger as f } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { InlineErrorAlert as p } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
7
7
|
import "../../../../shared/ui/dist/index.js";
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import { jsx as
|
|
10
|
-
import {
|
|
8
|
+
import { Fragment as m } from "react";
|
|
9
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
10
|
+
import { InfoIcon as _ } from "lucide-react";
|
|
11
11
|
// ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/CreateAccountDialog.js
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var v = "bank-account-nickname", y = "bank-account-nickname-error";
|
|
13
|
+
function b(e, t, n, r) {
|
|
14
|
+
return e.split(/(\{bankName\}|\{vspName\}|\{agreementLink\})/g).map((e, i) => e === "{bankName}" ? t : e === "{vspName}" ? n : e === "{agreementLink}" ? /* @__PURE__ */ h(m, { children: r }, i) : e);
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
let
|
|
16
|
+
function x({ labels: m, open: x, form: S, legalCopy: C, accessRows: w, isTeamMembersLoading: T, isTeamMembersError: E, isSubmitting: D, isAuthPending: O = !1, isError: k, hasNicknameError: A, hasTeamAccessError: j, onOpenChange: M, onFormChange: N, onSubmit: P, onTeamMembersRetry: F }) {
|
|
17
|
+
let I = C.agreementUrl, L = I ? m.createLegalTemplate : m.createLegalTemplateWithoutAgreement, R = I ? /* @__PURE__ */ h(e, {
|
|
17
18
|
variant: "link",
|
|
18
19
|
asChild: !0,
|
|
19
20
|
className: "ttw:inline ttw:h-auto ttw:p-0 ttw:text-sm ttw:font-normal",
|
|
20
|
-
children: /* @__PURE__ */
|
|
21
|
-
href:
|
|
21
|
+
children: /* @__PURE__ */ h("a", {
|
|
22
|
+
href: I,
|
|
22
23
|
target: "_blank",
|
|
23
24
|
rel: "noopener noreferrer",
|
|
24
|
-
children:
|
|
25
|
+
children: m.createLegalAgreementLink
|
|
25
26
|
})
|
|
26
27
|
}) : null;
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
|
|
28
|
+
return /* @__PURE__ */ h(n, {
|
|
29
|
+
submitError: k ? m.createErrorTitle : void 0,
|
|
30
|
+
open: x,
|
|
29
31
|
onOpenChange: M,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
title: m.createDialogTitle,
|
|
33
|
+
description: m.createDialogSubtitle,
|
|
34
|
+
submitting: D || T || O,
|
|
35
|
+
onSubmit: P,
|
|
36
|
+
labels: {
|
|
37
|
+
submit: m.createSubmitButton,
|
|
38
|
+
cancel: m.createCancelButton,
|
|
39
|
+
close: m.createDialogCloseAriaLabel
|
|
40
|
+
},
|
|
41
|
+
children: /* @__PURE__ */ g("div", {
|
|
42
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
33
43
|
children: [
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
className: "ttw:
|
|
44
|
+
/* @__PURE__ */ g("div", {
|
|
45
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
36
46
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
47
|
+
/* @__PURE__ */ h(a, {
|
|
48
|
+
htmlFor: v,
|
|
49
|
+
requirement: t.Required,
|
|
50
|
+
children: m.createNicknameLabel
|
|
40
51
|
}),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
|
|
43
|
-
|
|
52
|
+
/* @__PURE__ */ h(i, {
|
|
53
|
+
id: v,
|
|
54
|
+
value: S.nickname,
|
|
55
|
+
required: !0,
|
|
56
|
+
disabled: D,
|
|
57
|
+
"aria-invalid": A || void 0,
|
|
58
|
+
"aria-describedby": A ? y : void 0,
|
|
59
|
+
onChange: (e) => N({ nickname: e.target.value })
|
|
44
60
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"aria-label": g.createDialogCloseAriaLabel,
|
|
51
|
-
disabled: k,
|
|
52
|
-
onClick: () => M(!1),
|
|
53
|
-
children: /* @__PURE__ */ _(b, { className: "ttw:size-4" })
|
|
54
|
-
})
|
|
61
|
+
A ? /* @__PURE__ */ h("p", {
|
|
62
|
+
id: y,
|
|
63
|
+
className: "ttw:text-sm ttw:text-destructive",
|
|
64
|
+
children: m.createNicknameRequiredError
|
|
65
|
+
}) : null
|
|
55
66
|
]
|
|
56
67
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
className: "ttw:
|
|
68
|
+
/* @__PURE__ */ h("p", {
|
|
69
|
+
className: "ttw:rounded-lg ttw:bg-muted ttw:p-3 ttw:text-sm ttw:text-muted-foreground",
|
|
70
|
+
children: b(L, C.bankName, C.vspName, R)
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ g("div", {
|
|
73
|
+
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
59
74
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
htmlFor: "bank-account-nickname",
|
|
65
|
-
children: [
|
|
66
|
-
g.createNicknameLabel,
|
|
67
|
-
" ",
|
|
68
|
-
/* @__PURE__ */ _("span", {
|
|
69
|
-
className: "ttw:text-destructive",
|
|
70
|
-
children: "*"
|
|
71
|
-
})
|
|
72
|
-
]
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ _(s, {
|
|
75
|
-
id: "bank-account-nickname",
|
|
76
|
-
value: C.nickname,
|
|
77
|
-
disabled: k,
|
|
78
|
-
"aria-invalid": j,
|
|
79
|
-
onChange: (e) => N({ nickname: e.target.value })
|
|
80
|
-
}),
|
|
81
|
-
j ? /* @__PURE__ */ _("p", {
|
|
82
|
-
className: "ttw:text-sm ttw:text-destructive",
|
|
83
|
-
children: g.createNicknameRequiredError
|
|
84
|
-
}) : null
|
|
85
|
-
]
|
|
86
|
-
}),
|
|
87
|
-
/* @__PURE__ */ _("div", {
|
|
88
|
-
className: "ttw:rounded-xl ttw:bg-muted/40 ttw:p-3 ttw:text-sm ttw:text-muted-foreground",
|
|
89
|
-
children: x(I, w.bankName, w.vspName, L)
|
|
75
|
+
/* @__PURE__ */ h(r, {
|
|
76
|
+
variant: "subsection",
|
|
77
|
+
level: 3,
|
|
78
|
+
children: m.createTeamAccessHeading
|
|
90
79
|
}),
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
80
|
+
/* @__PURE__ */ h(o, {}),
|
|
81
|
+
T ? /* @__PURE__ */ g("div", {
|
|
82
|
+
"aria-busy": !0,
|
|
83
|
+
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
93
84
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
|
|
96
|
-
|
|
85
|
+
/* @__PURE__ */ h("span", {
|
|
86
|
+
role: "status",
|
|
87
|
+
className: "ttw:sr-only",
|
|
88
|
+
children: m.teamMembersLoadingLabel
|
|
97
89
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
|
|
100
|
-
"aria-label": g.teamMembersLoadingLabel,
|
|
101
|
-
className: "ttw:space-y-3",
|
|
102
|
-
children: [/* @__PURE__ */ _(l, { className: "ttw:h-10 ttw:w-full" }), /* @__PURE__ */ _(l, { className: "ttw:h-10 ttw:w-full" })]
|
|
103
|
-
}) : null,
|
|
104
|
-
!E && D ? /* @__PURE__ */ _(h, { children: g.teamMembersErrorTitle }) : null,
|
|
105
|
-
!E && !D && T.length === 0 ? /* @__PURE__ */ _("p", {
|
|
106
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
107
|
-
children: g.teamMembersEmptyLabel
|
|
108
|
-
}) : null,
|
|
109
|
-
!E && !D && T.length > 0 ? /* @__PURE__ */ _(p, { children: /* @__PURE__ */ _("ul", {
|
|
110
|
-
className: "ttw:-mr-2 ttw:max-h-72 ttw:space-y-1 ttw:overflow-y-auto ttw:pr-2",
|
|
111
|
-
children: T.map((e) => /* @__PURE__ */ v("li", {
|
|
112
|
-
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:py-2",
|
|
113
|
-
children: [/* @__PURE__ */ v("div", {
|
|
114
|
-
className: "ttw:min-w-0",
|
|
115
|
-
children: [/* @__PURE__ */ _("p", {
|
|
116
|
-
className: "ttw:truncate ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
117
|
-
children: e.name
|
|
118
|
-
}), /* @__PURE__ */ v("div", {
|
|
119
|
-
className: "ttw:flex ttw:items-center ttw:gap-1 ttw:text-sm ttw:text-muted-foreground",
|
|
120
|
-
children: [/* @__PURE__ */ _("span", {
|
|
121
|
-
className: "ttw:truncate",
|
|
122
|
-
children: e.role
|
|
123
|
-
}), /* @__PURE__ */ v(d, { children: [/* @__PURE__ */ _(m, {
|
|
124
|
-
type: "button",
|
|
125
|
-
className: "ttw:inline-flex ttw:shrink-0 ttw:cursor-help ttw:text-muted-foreground",
|
|
126
|
-
"aria-label": e.roleTooltip,
|
|
127
|
-
children: /* @__PURE__ */ _(y, { className: "ttw:size-4" })
|
|
128
|
-
}), /* @__PURE__ */ _(f, {
|
|
129
|
-
className: "ttw:max-w-60",
|
|
130
|
-
children: e.roleTooltip
|
|
131
|
-
})] })]
|
|
132
|
-
})]
|
|
133
|
-
}), /* @__PURE__ */ _(u, {
|
|
134
|
-
checked: e.checked,
|
|
135
|
-
disabled: e.disabled,
|
|
136
|
-
"aria-label": e.name,
|
|
137
|
-
onCheckedChange: (t) => e.onToggle(t)
|
|
138
|
-
})]
|
|
139
|
-
}, e.key))
|
|
140
|
-
}) }) : null
|
|
90
|
+
/* @__PURE__ */ h(s, { className: "ttw:h-10 ttw:w-full" }),
|
|
91
|
+
/* @__PURE__ */ h(s, { className: "ttw:h-10 ttw:w-full" })
|
|
141
92
|
]
|
|
142
|
-
}),
|
|
143
|
-
|
|
93
|
+
}) : null,
|
|
94
|
+
!T && E ? /* @__PURE__ */ g(p, {
|
|
95
|
+
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
|
|
96
|
+
children: [/* @__PURE__ */ h("span", { children: m.teamMembersErrorTitle }), /* @__PURE__ */ h(e, {
|
|
97
|
+
type: "button",
|
|
98
|
+
variant: "outline",
|
|
99
|
+
size: "sm",
|
|
100
|
+
onClick: F,
|
|
101
|
+
children: m.retryButton
|
|
102
|
+
})]
|
|
103
|
+
}) : null,
|
|
104
|
+
!T && !E && w.length === 0 ? /* @__PURE__ */ h("p", {
|
|
105
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
106
|
+
children: m.teamMembersEmptyLabel
|
|
107
|
+
}) : null,
|
|
108
|
+
!T && !E && w.length > 0 ? /* @__PURE__ */ h(d, { children: /* @__PURE__ */ h("ul", {
|
|
109
|
+
className: "ttw:-mr-2 ttw:max-h-72 ttw:space-y-1 ttw:overflow-y-auto ttw:pr-2",
|
|
110
|
+
children: w.map((e) => /* @__PURE__ */ g("li", {
|
|
111
|
+
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:py-2",
|
|
112
|
+
children: [/* @__PURE__ */ g("div", {
|
|
113
|
+
className: "ttw:min-w-0",
|
|
114
|
+
children: [/* @__PURE__ */ h("p", {
|
|
115
|
+
className: "ttw:truncate ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
116
|
+
children: e.name
|
|
117
|
+
}), /* @__PURE__ */ g("div", {
|
|
118
|
+
className: "ttw:flex ttw:items-center ttw:gap-1 ttw:text-sm ttw:text-muted-foreground",
|
|
119
|
+
children: [/* @__PURE__ */ h("span", {
|
|
120
|
+
className: "ttw:truncate",
|
|
121
|
+
children: e.role
|
|
122
|
+
}), /* @__PURE__ */ g(l, { children: [/* @__PURE__ */ h(f, {
|
|
123
|
+
type: "button",
|
|
124
|
+
className: "ttw:inline-flex ttw:shrink-0 ttw:cursor-pointer ttw:text-muted-foreground",
|
|
125
|
+
"aria-label": e.roleTooltip,
|
|
126
|
+
children: /* @__PURE__ */ h(_, { className: "ttw:size-4" })
|
|
127
|
+
}), /* @__PURE__ */ h(u, {
|
|
128
|
+
className: "ttw:max-w-60",
|
|
129
|
+
children: e.roleTooltip
|
|
130
|
+
})] })]
|
|
131
|
+
})]
|
|
132
|
+
}), /* @__PURE__ */ h(c, {
|
|
133
|
+
checked: e.checked,
|
|
134
|
+
disabled: e.disabled,
|
|
135
|
+
"aria-label": e.name,
|
|
136
|
+
onCheckedChange: (t) => e.onToggle(t)
|
|
137
|
+
})]
|
|
138
|
+
}, e.key))
|
|
139
|
+
}) }) : null,
|
|
140
|
+
j ? /* @__PURE__ */ h("p", {
|
|
141
|
+
role: "alert",
|
|
142
|
+
className: "ttw:text-sm ttw:text-destructive",
|
|
143
|
+
children: m.createTeamAccessRequiredError
|
|
144
|
+
}) : null
|
|
144
145
|
]
|
|
145
|
-
}),
|
|
146
|
-
/* @__PURE__ */ v(i, {
|
|
147
|
-
className: "ttw:p-6 ttw:pt-4",
|
|
148
|
-
children: [/* @__PURE__ */ _(e, {
|
|
149
|
-
type: "button",
|
|
150
|
-
variant: "outline",
|
|
151
|
-
disabled: k,
|
|
152
|
-
onClick: () => M(!1),
|
|
153
|
-
children: g.createCancelButton
|
|
154
|
-
}), /* @__PURE__ */ _(e, {
|
|
155
|
-
type: "button",
|
|
156
|
-
disabled: O || k,
|
|
157
|
-
onClick: P,
|
|
158
|
-
children: g.createSubmitButton
|
|
159
|
-
})]
|
|
160
146
|
})
|
|
161
147
|
]
|
|
162
148
|
})
|
|
163
149
|
});
|
|
164
150
|
}
|
|
165
|
-
export {
|
|
151
|
+
export { x as CreateAccountDialog };
|
package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js
|
|
2
2
|
var e = {
|
|
3
|
-
bankingTaglinePrefix: "Business
|
|
3
|
+
bankingTaglinePrefix: "Business banking provided by",
|
|
4
4
|
availableBalanceLabel: "Available balance",
|
|
5
|
-
availableBalanceTooltip: "
|
|
5
|
+
availableBalanceTooltip: "What you can spend, withdraw or transfer right now.",
|
|
6
6
|
accountNumberLabel: "Account number",
|
|
7
7
|
routingNumberLabel: "Routing number",
|
|
8
8
|
addAccountButton: "Add account",
|
|
9
|
-
emptyAccountsLabel: "No accounts
|
|
9
|
+
emptyAccountsLabel: "No accounts yet",
|
|
10
10
|
createDialogTitle: "Create an account",
|
|
11
|
-
createDialogSubtitle: "
|
|
11
|
+
createDialogSubtitle: "The account gets its own account number.",
|
|
12
12
|
createNicknameLabel: "Account nickname",
|
|
13
|
-
createNicknameRequiredError: "
|
|
13
|
+
createNicknameRequiredError: "Enter a nickname.",
|
|
14
14
|
createLegalTemplate: "The bank services are provided by {bankName}. By opening a {vspName} deposit account, you agree to {bankName}'s {agreementLink}.",
|
|
15
15
|
createLegalTemplateWithoutAgreement: "The bank services are provided by {bankName}.",
|
|
16
16
|
createLegalAgreementLink: "Deposit Agreement",
|
|
@@ -18,17 +18,21 @@ var e = {
|
|
|
18
18
|
createDialogCloseAriaLabel: "Close",
|
|
19
19
|
createCancelButton: "Cancel",
|
|
20
20
|
createSubmitButton: "Create account",
|
|
21
|
+
createErrorTitle: "Couldn't create account. Try again.",
|
|
22
|
+
createTeamAccessRequiredError: "Give at least one team member access.",
|
|
21
23
|
teamMembersLoadingLabel: "Loading team members",
|
|
22
|
-
teamMembersErrorTitle: "
|
|
24
|
+
teamMembersErrorTitle: "Couldn't load team members",
|
|
23
25
|
teamMembersEmptyLabel: "No team members found.",
|
|
24
26
|
teamMemberAccessTooltip: "Role information",
|
|
25
|
-
|
|
27
|
+
showAccountNumber: "Show account number",
|
|
28
|
+
hideAccountNumber: "Hide account number",
|
|
26
29
|
copyAccountNumber: "Copy account number",
|
|
27
30
|
copyRoutingNumber: "Copy routing number",
|
|
28
31
|
copiedLabel: "Copied",
|
|
29
32
|
openAccountAriaLabel: "Open account details",
|
|
30
33
|
loadingLabel: "Loading accounts",
|
|
31
|
-
errorTitle: "
|
|
34
|
+
errorTitle: "Couldn't load accounts",
|
|
35
|
+
retryButton: "Try again"
|
|
32
36
|
};
|
|
33
37
|
function t(t, n = e) {
|
|
34
38
|
return `${n.openAccountAriaLabel}: ${t}`;
|
|
@@ -7,7 +7,7 @@ import "../../../../shared/ui/dist/index.js";
|
|
|
7
7
|
import { WidgetProvider as t } from "../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
8
8
|
import "../../../../shared/feature/dist/index.js";
|
|
9
9
|
import { WIDGET_NAME as n } from "./analytics/events.js";
|
|
10
|
-
import { LinkedAccountsWidgetUi as r } from "../../../ui/dist/
|
|
10
|
+
import { LinkedAccountsWidgetUi as r } from "../../../ui/dist/index14.js";
|
|
11
11
|
import "../../../ui/dist/index.js";
|
|
12
12
|
import { useLinkedAccountsWidget as i } from "./useLinkedAccountsWidget.js";
|
|
13
13
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/labels.js
|
|
2
2
|
var e = {
|
|
3
|
-
accountFallback: "External
|
|
3
|
+
accountFallback: "External account",
|
|
4
4
|
accountLabel: "Account #:",
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
editSuccessToast: "Linked account updated",
|
|
6
|
+
unlinkSuccessToast: "Account unlinked",
|
|
7
|
+
verifySuccessToast: "Account verified",
|
|
8
|
+
sendDepositsSuccessToast: "Deposits sent",
|
|
8
9
|
personalCheckingType: "personal checking",
|
|
9
10
|
personalSavingsType: "personal savings",
|
|
10
11
|
businessCheckingType: "business checking",
|
|
11
12
|
businessSavingsType: "business savings",
|
|
12
13
|
summaryDescription: "We sent two small deposits to your {type} account ending in {last4}.",
|
|
13
|
-
summaryAccountAddedDescription: "Your {type} account ending in {last4} was added.
|
|
14
|
+
summaryAccountAddedDescription: "Your {type} account ending in {last4} was added. It needs to be verified before it can be used for transfers, which someone with permission to send verification deposits can start by choosing Verify on it.",
|
|
14
15
|
summaryCheckBankTitle: "Check your bank account ending in {last4}",
|
|
15
|
-
summaryCheckBankDescription: "Look for two small deposits
|
|
16
|
+
summaryCheckBankDescription: "Look for two small deposits in its transaction activity.",
|
|
16
17
|
summaryVerifyTitle: "Verify the amounts",
|
|
17
|
-
summaryVerifyDescription: "
|
|
18
|
+
summaryVerifyDescription: "Choose Verify on this account and enter both amounts. Then you can use it for transfers.",
|
|
19
|
+
failedVerificationHint: "Verification failed. Check the account and routing numbers; if either is wrong, unlink this account and link it again."
|
|
18
20
|
};
|
|
19
21
|
export { e as DEFAULT_FEATURE_LABELS };
|