@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
package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index14.js
CHANGED
|
@@ -1,129 +1,149 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { Button as e, Skeleton as t, TooltipProvider as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { Link as ee } from "../../../shared/ui/dist/lib/Link/Link.js";
|
|
7
|
+
import { StatePanel as te } from "../../../shared/ui/dist/lib/StatePanel/StatePanel.js";
|
|
8
|
+
import { ErrorState as ne } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
9
|
+
import { LoadingRegion as r } from "../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
|
|
10
|
+
import { WidgetTitleWithIconAndChildren as i } from "../../../shared/ui/dist/lib/WidgetTitleWithIconAndChildren/WidgetTitleWithIconAndChildren.js";
|
|
3
11
|
import "../../../shared/ui/dist/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
12
|
+
import { DEFAULT_LABELS as a } from "./index13.js";
|
|
13
|
+
import { AccountRow as o } from "./index2.js";
|
|
14
|
+
import { linkedAccountsWidgetUiTestIds as s } from "./index6.js";
|
|
15
|
+
import { ConnectAccountDialog as c } from "./index7.js";
|
|
16
|
+
import { EditAccountDialog as l } from "./index8.js";
|
|
17
|
+
import { SendDepositsDialog as u } from "./index10.js";
|
|
18
|
+
import { UnlinkAccountDialog as d } from "./index11.js";
|
|
19
|
+
import { VerifyAccountDialog as f } from "./index12.js";
|
|
20
|
+
import { Fragment as re, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
21
|
+
import { LinkIcon as h } from "lucide-react";
|
|
10
22
|
// ../../libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index14.js
|
|
11
|
-
function
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
children: [
|
|
23
|
-
/* @__PURE__ */ p(u, {
|
|
24
|
-
variant: "success",
|
|
25
|
-
children: /* @__PURE__ */ p(_, { className: "ttw:size-5" })
|
|
26
|
-
}),
|
|
27
|
-
/* @__PURE__ */ p(o, {
|
|
28
|
-
className: "ttw:text-xl",
|
|
29
|
-
"data-testid": l.verifySuccessTitle,
|
|
30
|
-
children: b.verifySuccessTitle
|
|
31
|
-
}),
|
|
32
|
-
/* @__PURE__ */ m(r, { children: [P, F !== void 0 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
33
|
-
className: "ttw:font-medium ttw:text-foreground",
|
|
34
|
-
children: C
|
|
35
|
-
}), F] })] })
|
|
36
|
-
]
|
|
37
|
-
}), /* @__PURE__ */ p(i, {
|
|
38
|
-
className: "ttw:border-t ttw:border-border ttw:px-6 ttw:pb-6 ttw:pt-4",
|
|
39
|
-
children: /* @__PURE__ */ m(e, {
|
|
40
|
-
type: "button",
|
|
41
|
-
variant: "outline",
|
|
42
|
-
className: "ttw:w-full",
|
|
43
|
-
onClick: () => j(!1),
|
|
44
|
-
children: [/* @__PURE__ */ p(h, {}), b.backToTransfersButton]
|
|
45
|
-
})
|
|
46
|
-
})] }) : /* @__PURE__ */ m(f, { children: [
|
|
47
|
-
/* @__PURE__ */ m(a, {
|
|
48
|
-
className: "ttw:px-6 ttw:pb-4 ttw:pt-6 ttw:text-left",
|
|
49
|
-
children: [/* @__PURE__ */ p(o, {
|
|
50
|
-
className: "ttw:text-xl",
|
|
51
|
-
children: b.verifyTitle
|
|
52
|
-
}), /* @__PURE__ */ p(r, { children: b.verifyDescription })]
|
|
53
|
-
}),
|
|
54
|
-
/* @__PURE__ */ m("div", {
|
|
55
|
-
className: "ttw:space-y-4 ttw:border-y ttw:border-border ttw:p-6",
|
|
56
|
-
children: [
|
|
57
|
-
/* @__PURE__ */ p("h3", {
|
|
58
|
-
className: "ttw:text-base ttw:font-semibold ttw:text-primary",
|
|
59
|
-
children: b.verifySectionHeading
|
|
60
|
-
}),
|
|
61
|
-
/* @__PURE__ */ m("div", {
|
|
62
|
-
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:rounded-xl ttw:border ttw:border-border ttw:p-3",
|
|
63
|
-
children: [/* @__PURE__ */ p(c, { children: /* @__PURE__ */ p(v, { className: "ttw:size-5 ttw:text-foreground" }) }), /* @__PURE__ */ m("div", {
|
|
64
|
-
className: "ttw:min-w-0",
|
|
65
|
-
children: [/* @__PURE__ */ p("p", {
|
|
66
|
-
className: "ttw:truncate ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
67
|
-
children: S
|
|
68
|
-
}), /* @__PURE__ */ p("p", {
|
|
69
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
70
|
-
children: `${b.summaryAccountPrefix} (${C ?? ""}) ${b.verifyAccountInProcess}`
|
|
71
|
-
})]
|
|
72
|
-
})]
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ m("p", {
|
|
75
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
76
|
-
children: [
|
|
77
|
-
/* @__PURE__ */ p("span", {
|
|
78
|
-
className: "ttw:font-semibold ttw:text-foreground",
|
|
79
|
-
children: b.verifyExampleLabel
|
|
80
|
-
}),
|
|
81
|
-
" ",
|
|
82
|
-
b.verifyExampleText
|
|
83
|
-
]
|
|
84
|
-
}),
|
|
85
|
-
/* @__PURE__ */ p(d, {
|
|
86
|
-
id: "linked-account-first-amount",
|
|
87
|
-
label: b.firstAmountLabel,
|
|
88
|
-
value: x.firstAmount,
|
|
89
|
-
disabled: E,
|
|
90
|
-
required: !0,
|
|
91
|
-
error: D,
|
|
92
|
-
errorMessage: b.verifyAmountError,
|
|
93
|
-
onChange: (e) => M({
|
|
94
|
-
...x,
|
|
95
|
-
firstAmount: e
|
|
96
|
-
})
|
|
97
|
-
}),
|
|
98
|
-
/* @__PURE__ */ p(d, {
|
|
99
|
-
id: "linked-account-second-amount",
|
|
100
|
-
label: b.secondAmountLabel,
|
|
101
|
-
value: x.secondAmount,
|
|
102
|
-
disabled: E,
|
|
103
|
-
required: !0,
|
|
104
|
-
error: O,
|
|
105
|
-
errorMessage: b.verifyAmountError,
|
|
106
|
-
onChange: (e) => M({
|
|
107
|
-
...x,
|
|
108
|
-
secondAmount: e
|
|
109
|
-
})
|
|
110
|
-
}),
|
|
111
|
-
A && /* @__PURE__ */ p(s, { children: b.actionErrorTitle })
|
|
112
|
-
]
|
|
113
|
-
}),
|
|
114
|
-
/* @__PURE__ */ p(i, {
|
|
115
|
-
className: "ttw:px-6 ttw:pb-6 ttw:pt-4",
|
|
116
|
-
children: /* @__PURE__ */ m(e, {
|
|
117
|
-
type: "button",
|
|
118
|
-
className: "ttw:w-full",
|
|
119
|
-
loading: T,
|
|
120
|
-
disabled: E || k,
|
|
121
|
-
onClick: N,
|
|
122
|
-
children: [b.verifyButton, /* @__PURE__ */ p(g, {})]
|
|
123
|
-
})
|
|
124
|
-
})
|
|
125
|
-
] })
|
|
126
|
-
})
|
|
23
|
+
function g({ labels: g, rows: _, isLoading: v = !1, isError: y = !1, onRetry: b, isConnectOpen: x, isEditOpen: S, isVerifyOpen: C, isUnlinkOpen: w, isSendDepositsOpen: T = !1, isSubmitting: E = !1, isActionDisabled: D = !1, isAuthPending: O = !1, canConnect: k = !0, isConnectError: A = !1, isEditError: j = !1, isVerifyError: M = !1, isUnlinkError: N = !1, isSendDepositsError: P = !1, learnMoreUrl: F, unlinkAccountNumber: I, sendDepositsAccountNumber: L, verifyAccountName: R, verifyAccountNumber: z, connectStep: B, accessRows: V, accessGrantedCount: H, isTeamMembersLoading: U = !1, isTeamMembersError: ie = !1, isConnectRequiredErrorVisible: W = !1, isConnectRoutingNumberInvalid: G = !1, connectErrorMessage: K, isVerifyFirstAmountInvalid: q = !1, isVerifySecondAmountInvalid: J = !1, isVerifyRequiredErrorVisible: Y = !1, connectSummary: ae, connectForm: oe, editForm: se, verifyForm: ce, onConnectOpenChange: X, onEditOpenChange: le, onVerifyOpenChange: ue, onUnlinkOpenChange: de, onSendDepositsOpenChange: fe, onConnectFormChange: pe, onEditFormChange: me, onVerifyFormChange: he, onConnectNext: ge, onConnectBack: _e, onTeamMembersRetry: ve, onEditSubmit: ye, onVerifySubmit: be, onUnlinkConfirm: xe, onSendDepositsConfirm: Se }) {
|
|
24
|
+
let Z = {
|
|
25
|
+
...a,
|
|
26
|
+
...g
|
|
27
|
+
}, Q = !v && !y && _.length === 0, $ = /* @__PURE__ */ p(e, {
|
|
28
|
+
type: "button",
|
|
29
|
+
size: "sm",
|
|
30
|
+
disabled: D,
|
|
31
|
+
"data-testid": s.connectAccountButton,
|
|
32
|
+
onClick: () => X(!0),
|
|
33
|
+
children: Z.connectButton
|
|
127
34
|
});
|
|
35
|
+
return /* @__PURE__ */ m(re, { children: [
|
|
36
|
+
/* @__PURE__ */ p(i, {
|
|
37
|
+
icon: /* @__PURE__ */ p(h, {}),
|
|
38
|
+
title: Z.title,
|
|
39
|
+
headerActions: k && !Q ? $ : void 0,
|
|
40
|
+
children: y ? /* @__PURE__ */ p(ne, {
|
|
41
|
+
title: Z.errorTitle,
|
|
42
|
+
retryLabel: Z.retryButton,
|
|
43
|
+
onRetry: b
|
|
44
|
+
}) : Q ? /* @__PURE__ */ p(te, {
|
|
45
|
+
kind: "empty",
|
|
46
|
+
icon: /* @__PURE__ */ p(h, {}),
|
|
47
|
+
title: Z.emptyTitle,
|
|
48
|
+
description: Z.emptyDescription,
|
|
49
|
+
testId: s.emptyState,
|
|
50
|
+
action: k || F ? /* @__PURE__ */ m("div", {
|
|
51
|
+
className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-3",
|
|
52
|
+
children: [k ? $ : null, F ? /* @__PURE__ */ p(ee, {
|
|
53
|
+
href: F,
|
|
54
|
+
target: "_blank",
|
|
55
|
+
rel: "noopener noreferrer",
|
|
56
|
+
className: "ttw:text-sm ttw:font-medium ttw:text-primary ttw:underline-offset-4 ttw:hover:underline",
|
|
57
|
+
children: Z.learnMoreButton
|
|
58
|
+
}) : null]
|
|
59
|
+
}) : void 0
|
|
60
|
+
}) : /* @__PURE__ */ p(r, {
|
|
61
|
+
isLoading: v,
|
|
62
|
+
loadingLabel: Z.loadingLabel,
|
|
63
|
+
children: v ? /* @__PURE__ */ m("div", {
|
|
64
|
+
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
65
|
+
children: [/* @__PURE__ */ p(t, { className: "ttw:h-11 ttw:w-full" }), /* @__PURE__ */ p(t, { className: "ttw:h-11 ttw:w-full" })]
|
|
66
|
+
}) : /* @__PURE__ */ p(n, { children: /* @__PURE__ */ p("ul", {
|
|
67
|
+
className: "ttw:-my-3 ttw:flex ttw:flex-col ttw:divide-y ttw:divide-border",
|
|
68
|
+
children: _.map((e) => /* @__PURE__ */ p(o, {
|
|
69
|
+
row: e,
|
|
70
|
+
isActionDisabled: D
|
|
71
|
+
}, e.key))
|
|
72
|
+
}) })
|
|
73
|
+
})
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ p(c, {
|
|
76
|
+
open: x,
|
|
77
|
+
labels: Z,
|
|
78
|
+
connectStep: B,
|
|
79
|
+
connectForm: oe,
|
|
80
|
+
accessRows: V,
|
|
81
|
+
accessGrantedCount: H,
|
|
82
|
+
connectSummary: ae,
|
|
83
|
+
isTeamMembersLoading: U,
|
|
84
|
+
isTeamMembersError: ie,
|
|
85
|
+
isSubmitting: E,
|
|
86
|
+
isActionDisabled: D,
|
|
87
|
+
canConnect: k,
|
|
88
|
+
isConnectError: A,
|
|
89
|
+
isConnectRequiredErrorVisible: W,
|
|
90
|
+
isConnectRoutingNumberInvalid: G,
|
|
91
|
+
connectErrorMessage: K,
|
|
92
|
+
onOpenChange: X,
|
|
93
|
+
onConnectFormChange: pe,
|
|
94
|
+
onConnectNext: ge,
|
|
95
|
+
onConnectBack: _e,
|
|
96
|
+
onTeamMembersRetry: ve
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ p(l, {
|
|
99
|
+
open: S,
|
|
100
|
+
labels: Z,
|
|
101
|
+
editForm: se,
|
|
102
|
+
isSubmitting: E,
|
|
103
|
+
isAuthPending: O,
|
|
104
|
+
isActionDisabled: D,
|
|
105
|
+
isEditError: j,
|
|
106
|
+
onOpenChange: le,
|
|
107
|
+
onEditFormChange: me,
|
|
108
|
+
onEditSubmit: ye
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ p(f, {
|
|
111
|
+
open: C,
|
|
112
|
+
labels: Z,
|
|
113
|
+
verifyForm: ce,
|
|
114
|
+
accountName: R,
|
|
115
|
+
accountNumber: z,
|
|
116
|
+
isSubmitting: E,
|
|
117
|
+
isAuthPending: O,
|
|
118
|
+
isActionDisabled: D,
|
|
119
|
+
isVerifyFirstAmountInvalid: q,
|
|
120
|
+
isVerifySecondAmountInvalid: J,
|
|
121
|
+
isRequiredErrorVisible: Y,
|
|
122
|
+
isVerifyError: M,
|
|
123
|
+
onOpenChange: ue,
|
|
124
|
+
onVerifyFormChange: he,
|
|
125
|
+
onVerifySubmit: be
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ p(u, {
|
|
128
|
+
open: T,
|
|
129
|
+
labels: Z,
|
|
130
|
+
accountNumber: L,
|
|
131
|
+
isSubmitting: E,
|
|
132
|
+
isAuthPending: O,
|
|
133
|
+
isError: P,
|
|
134
|
+
onOpenChange: fe,
|
|
135
|
+
onConfirm: Se
|
|
136
|
+
}),
|
|
137
|
+
/* @__PURE__ */ p(d, {
|
|
138
|
+
open: w,
|
|
139
|
+
labels: Z,
|
|
140
|
+
accountNumber: I,
|
|
141
|
+
isSubmitting: E,
|
|
142
|
+
isAuthPending: O,
|
|
143
|
+
isError: N,
|
|
144
|
+
onOpenChange: de,
|
|
145
|
+
onUnlinkConfirm: xe
|
|
146
|
+
})
|
|
147
|
+
] });
|
|
128
148
|
}
|
|
129
|
-
export {
|
|
149
|
+
export { g as LinkedAccountsWidgetUi };
|
package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index2.js
CHANGED
|
@@ -1,12 +1,64 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Badge as e, Button as t, DropdownMenu as n, DropdownMenuContent as r, DropdownMenuItem as i, DropdownMenuSeparator as a, DropdownMenuTrigger as o, Tooltip as s, TooltipContent as c, TooltipTrigger as l } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { Fragment as u } from "react";
|
|
3
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
4
|
+
import { MoreVerticalIcon as p } from "lucide-react";
|
|
2
5
|
// ../../libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index2.js
|
|
3
|
-
function
|
|
4
|
-
return /* @__PURE__ */
|
|
5
|
-
className: "ttw:
|
|
6
|
-
children: [/* @__PURE__ */
|
|
7
|
-
className: "ttw:flex ttw:
|
|
8
|
-
children:
|
|
9
|
-
|
|
6
|
+
function m({ row: m, isActionDisabled: h }) {
|
|
7
|
+
return /* @__PURE__ */ f("li", {
|
|
8
|
+
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-x-3 ttw:gap-y-2 ttw:py-3",
|
|
9
|
+
children: [/* @__PURE__ */ f("div", {
|
|
10
|
+
className: "ttw:flex ttw:min-w-48 ttw:flex-1 ttw:flex-col ttw:gap-0.5",
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ f("div", {
|
|
13
|
+
className: "ttw:flex ttw:min-w-0 ttw:flex-wrap ttw:items-center ttw:gap-2",
|
|
14
|
+
children: [/* @__PURE__ */ d("span", {
|
|
15
|
+
className: "ttw:truncate ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
16
|
+
children: m.title
|
|
17
|
+
}), m.status ? /* @__PURE__ */ d(e, {
|
|
18
|
+
tone: m.status.tone,
|
|
19
|
+
children: m.status.label
|
|
20
|
+
}) : null]
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ d("span", {
|
|
23
|
+
className: "ttw:truncate ttw:text-sm ttw:text-muted-foreground",
|
|
24
|
+
children: m.subtitle
|
|
25
|
+
}),
|
|
26
|
+
m.hint ? /* @__PURE__ */ d("span", {
|
|
27
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
28
|
+
children: m.hint
|
|
29
|
+
}) : null
|
|
30
|
+
]
|
|
31
|
+
}), m.task || m.menuActions.length > 0 ? /* @__PURE__ */ f("div", {
|
|
32
|
+
className: "ttw:ml-auto ttw:flex ttw:shrink-0 ttw:items-center ttw:gap-1",
|
|
33
|
+
children: [m.task ? /* @__PURE__ */ d(t, {
|
|
34
|
+
type: "button",
|
|
35
|
+
variant: "outline",
|
|
36
|
+
size: "sm",
|
|
37
|
+
disabled: h,
|
|
38
|
+
onClick: m.task.onSelect,
|
|
39
|
+
children: m.task.label
|
|
40
|
+
}) : null, m.menuActions.length > 0 ? /* @__PURE__ */ f(n, { children: [/* @__PURE__ */ f(s, { children: [/* @__PURE__ */ d(l, {
|
|
41
|
+
asChild: !0,
|
|
42
|
+
children: /* @__PURE__ */ d(o, {
|
|
43
|
+
asChild: !0,
|
|
44
|
+
children: /* @__PURE__ */ d(t, {
|
|
45
|
+
type: "button",
|
|
46
|
+
variant: "ghost",
|
|
47
|
+
size: "icon-sm",
|
|
48
|
+
"aria-label": m.menuLabel,
|
|
49
|
+
disabled: h,
|
|
50
|
+
children: /* @__PURE__ */ d(p, {})
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
}), /* @__PURE__ */ d(c, { children: m.menuLabel })] }), /* @__PURE__ */ d(r, {
|
|
54
|
+
align: "end",
|
|
55
|
+
children: m.menuActions.map((e, t) => /* @__PURE__ */ f(u, { children: [e.destructive && t > 0 ? /* @__PURE__ */ d(a, {}) : null, /* @__PURE__ */ d(i, {
|
|
56
|
+
variant: e.destructive ? "destructive" : "default",
|
|
57
|
+
onSelect: e.onSelect,
|
|
58
|
+
children: e.label
|
|
59
|
+
})] }, e.key))
|
|
60
|
+
})] }) : null]
|
|
61
|
+
}) : null]
|
|
10
62
|
});
|
|
11
63
|
}
|
|
12
|
-
export {
|
|
64
|
+
export { m as AccountRow };
|
package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index3.js
CHANGED
|
@@ -1,55 +1,82 @@
|
|
|
1
|
-
import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { Button as e, Heading as t, Skeleton as n, Switch as r, Tooltip as i, TooltipContent as a, TooltipProvider as o, TooltipTrigger as s } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { LoadingRegion as c } from "../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
|
|
3
|
+
import { InlineErrorAlert as l } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
4
|
+
import "../../../shared/ui/dist/index.js";
|
|
5
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
6
|
+
import { InfoIcon as f } from "lucide-react";
|
|
5
7
|
// ../../libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index3.js
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
children: /* @__PURE__ */ n(i, { className: "ttw:size-4 ttw:text-foreground" })
|
|
20
|
-
}), /* @__PURE__ */ r("div", {
|
|
21
|
-
className: "ttw:flex ttw:min-w-0 ttw:flex-col",
|
|
22
|
-
children: [/* @__PURE__ */ n("span", {
|
|
23
|
-
className: "ttw:truncate ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
24
|
-
children: a.title
|
|
25
|
-
}), /* @__PURE__ */ n("span", {
|
|
26
|
-
className: "ttw:truncate ttw:text-xs ttw:text-muted-foreground",
|
|
27
|
-
children: a.subtitle
|
|
8
|
+
function p({ labels: p, rows: m, grantedCount: h, isLoading: g, isError: _, onRetry: v }) {
|
|
9
|
+
return /* @__PURE__ */ d("div", {
|
|
10
|
+
className: "ttw:space-y-4",
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ d("div", {
|
|
13
|
+
className: "ttw:space-y-1",
|
|
14
|
+
children: [/* @__PURE__ */ u(t, {
|
|
15
|
+
variant: "subsection",
|
|
16
|
+
level: 3,
|
|
17
|
+
children: `${p.connectStep2Heading} (${h})`
|
|
18
|
+
}), /* @__PURE__ */ u("p", {
|
|
19
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
20
|
+
children: p.connectStep2Description
|
|
28
21
|
})]
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
22
|
+
}),
|
|
23
|
+
g && /* @__PURE__ */ d(c, {
|
|
24
|
+
isLoading: !0,
|
|
25
|
+
loadingLabel: p.teamMembersLoadingLabel,
|
|
26
|
+
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ u(n, { className: "ttw:h-10 ttw:w-full" }),
|
|
29
|
+
/* @__PURE__ */ u(n, { className: "ttw:h-10 ttw:w-full" }),
|
|
30
|
+
/* @__PURE__ */ u(n, { className: "ttw:h-10 ttw:w-full" })
|
|
31
|
+
]
|
|
32
|
+
}),
|
|
33
|
+
!g && _ && /* @__PURE__ */ d(l, {
|
|
34
|
+
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
|
|
35
|
+
children: [/* @__PURE__ */ u("span", { children: p.teamMembersErrorTitle }), v ? /* @__PURE__ */ u(e, {
|
|
43
36
|
type: "button",
|
|
44
|
-
variant: "
|
|
45
|
-
size: "
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
37
|
+
variant: "outline",
|
|
38
|
+
size: "sm",
|
|
39
|
+
onClick: v,
|
|
40
|
+
children: p.retryButton
|
|
41
|
+
}) : null]
|
|
42
|
+
}),
|
|
43
|
+
!g && !_ && m.length === 0 && /* @__PURE__ */ u("p", {
|
|
44
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
45
|
+
children: p.teamMembersEmptyLabel
|
|
46
|
+
}),
|
|
47
|
+
!g && !_ && m.length > 0 && /* @__PURE__ */ u(o, { children: /* @__PURE__ */ u("ul", {
|
|
48
|
+
className: "ttw:-mr-2 ttw:max-h-72 ttw:space-y-1 ttw:overflow-y-auto ttw:pr-2",
|
|
49
|
+
children: m.map((e) => /* @__PURE__ */ d("li", {
|
|
50
|
+
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:py-2",
|
|
51
|
+
children: [/* @__PURE__ */ d("div", {
|
|
52
|
+
className: "ttw:min-w-0",
|
|
53
|
+
children: [/* @__PURE__ */ u("p", {
|
|
54
|
+
className: "ttw:truncate ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
55
|
+
children: e.name
|
|
56
|
+
}), /* @__PURE__ */ d("div", {
|
|
57
|
+
className: "ttw:flex ttw:items-center ttw:gap-1 ttw:text-sm ttw:text-muted-foreground",
|
|
58
|
+
children: [/* @__PURE__ */ u("span", {
|
|
59
|
+
className: "ttw:truncate",
|
|
60
|
+
children: e.role
|
|
61
|
+
}), /* @__PURE__ */ d(i, { children: [/* @__PURE__ */ u(s, {
|
|
62
|
+
type: "button",
|
|
63
|
+
className: "ttw:inline-flex ttw:shrink-0 ttw:cursor-pointer ttw:text-muted-foreground",
|
|
64
|
+
"aria-label": e.roleTooltip,
|
|
65
|
+
children: /* @__PURE__ */ u(f, { className: "ttw:size-4" })
|
|
66
|
+
}), /* @__PURE__ */ u(a, {
|
|
67
|
+
className: "ttw:max-w-60",
|
|
68
|
+
children: e.roleTooltip
|
|
69
|
+
})] })]
|
|
70
|
+
})]
|
|
71
|
+
}), /* @__PURE__ */ u(r, {
|
|
72
|
+
checked: e.checked,
|
|
73
|
+
disabled: e.disabled,
|
|
74
|
+
"aria-label": e.name,
|
|
75
|
+
onCheckedChange: (t) => e.onToggle(t)
|
|
76
|
+
})]
|
|
77
|
+
}, e.key))
|
|
78
|
+
}) })
|
|
79
|
+
]
|
|
53
80
|
});
|
|
54
81
|
}
|
|
55
|
-
export {
|
|
82
|
+
export { p as ConnectStepAccess };
|