@tesouro/embedded-components-react 0.11.59 → 0.11.61
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 +37 -37
- package/dist/index.css +77 -230
- package/dist/index.d.ts +69 -23
- package/dist/lib/BankAccountsWidget.d.ts +20 -7
- package/dist/lib/CardDetailsWidget.d.ts +11 -3
- package/dist/lib/CreditCardsWidget.d.ts +19 -6
- package/dist/lib/DebitCardsWidget.d.ts +19 -6
- package/dist/lib/LinkedAccountsWidget.d.ts +30 -10
- package/dist/lib/WidgetSuite.d.ts +69 -23
- 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/card-details-widget/feature/dist/lib/CardDetailsWidget.js +112 -110
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/cardDetailsView.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/index.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js +94 -83
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardSuccessView.js +32 -31
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/labels.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardCredentialRow.js +41 -23
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardCredentialsFace.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsHeader.js +30 -25
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js +162 -190
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardFace.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CopyButton.js +35 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CopyableValue.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/NicknameEditor.js +43 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/cardFaceSurface.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/labels.js +12 -8
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index5.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index8.js +110 -104
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/CreateCardWidget.js +74 -68
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/PreparingView.js +19 -18
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/SetupView.js +110 -108
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/SuccessView.js +33 -42
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/labels.js +10 -7
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/testIds.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/useCardsWidget.js +159 -145
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +255 -112
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListDetailsSheet.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js +4 -4
- 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/card-details-widget/ui/dist/lib/CardDetailsPanel/AddressLine.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/DetailCopyRow.js +0 -28
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/NicknameRow.js +0 -64
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/statusBadge.js +0 -11
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardFaceSwatch.js +0 -11
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListRow.js +0 -103
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/statusBadge.js +0 -11
- 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/cards-widget/ui/dist/lib/CardsList/CardsList.js
CHANGED
|
@@ -2,134 +2,277 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import { EmptyState as
|
|
7
|
-
import { ErrorState as
|
|
8
|
-
import { PaginationFooter as d } from "../../../../../shared/ui/dist/lib/PaginationFooter/PaginationFooter.js";
|
|
5
|
+
import { Badge as e, Button as t, DataTable as n, Switch as r, TablePagination as i, cn as a } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { EmptyState as o } from "../../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
7
|
+
import { ErrorState as s } from "../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
9
8
|
import "../../../../../shared/ui/dist/index.js";
|
|
10
|
-
import { resolveCardsListLabels as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { CreditCardIcon as y, PlusIcon as b } from "lucide-react";
|
|
9
|
+
import { resolveCardsListLabels as c } from "./labels.js";
|
|
10
|
+
import { useId as l, useMemo as u } from "react";
|
|
11
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
+
import { CreditCardIcon as p } from "lucide-react";
|
|
15
13
|
// ../../libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js
|
|
16
|
-
var
|
|
14
|
+
var m = [
|
|
17
15
|
10,
|
|
18
16
|
25,
|
|
19
17
|
50
|
|
20
|
-
],
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
], h = [], g = () => void 0, _ = {
|
|
19
|
+
cardName: 260,
|
|
20
|
+
fundingAccount: 220
|
|
21
|
+
};
|
|
22
|
+
function v({ row: e, labels: t, isClickable: n }) {
|
|
23
|
+
return /* @__PURE__ */ f("span", {
|
|
24
|
+
className: "ttw:flex ttw:min-w-0 ttw:flex-col ttw:gap-0.5",
|
|
25
|
+
children: [/* @__PURE__ */ f("span", {
|
|
26
|
+
className: "ttw:flex ttw:gap-1 ttw:text-sm",
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ d("span", {
|
|
29
|
+
className: a("ttw:truncate ttw:font-medium", n ? "ttw:text-primary" : "ttw:text-foreground"),
|
|
30
|
+
children: e.nickname
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ d("span", {
|
|
33
|
+
className: "ttw:text-muted-foreground",
|
|
34
|
+
"aria-hidden": !0,
|
|
35
|
+
children: t.cardNameSeparator
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ d("span", {
|
|
38
|
+
className: "ttw:font-normal ttw:text-muted-foreground",
|
|
39
|
+
children: e.lastFour
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
}), /* @__PURE__ */ d("span", {
|
|
43
|
+
className: "ttw:truncate ttw:text-xs ttw:font-normal ttw:text-muted-foreground",
|
|
44
|
+
children: e.typeLabel
|
|
45
|
+
})]
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function y({ row: e, labels: t }) {
|
|
49
|
+
return /* @__PURE__ */ f("span", {
|
|
50
|
+
className: "ttw:flex ttw:min-w-0 ttw:items-baseline ttw:gap-1 ttw:text-sm ttw:font-normal",
|
|
51
|
+
children: [/* @__PURE__ */ d("span", {
|
|
52
|
+
className: "ttw:truncate ttw:text-foreground",
|
|
53
|
+
children: e.fundingAccount
|
|
54
|
+
}), e.fundingAccountLastFour && /* @__PURE__ */ f("span", {
|
|
55
|
+
className: "ttw:shrink-0 ttw:text-muted-foreground",
|
|
56
|
+
children: [
|
|
57
|
+
t.cardNameSeparator,
|
|
58
|
+
" ",
|
|
59
|
+
e.fundingAccountLastFour
|
|
60
|
+
]
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function b({ row: e, labels: t }) {
|
|
65
|
+
return e.limit ? /* @__PURE__ */ f("span", {
|
|
66
|
+
className: "ttw:text-sm ttw:tabular-nums",
|
|
67
|
+
children: [/* @__PURE__ */ d("span", {
|
|
68
|
+
className: "ttw:text-foreground",
|
|
69
|
+
children: e.limit
|
|
70
|
+
}), e.limitPeriod && /* @__PURE__ */ f("span", {
|
|
71
|
+
className: "ttw:font-normal ttw:text-muted-foreground",
|
|
72
|
+
children: [" ", e.limitPeriod]
|
|
73
|
+
})]
|
|
74
|
+
}) : /* @__PURE__ */ d("span", {
|
|
75
|
+
className: "ttw:text-sm ttw:font-normal ttw:text-muted-foreground",
|
|
76
|
+
children: t.noLimit
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function x({ row: t }) {
|
|
80
|
+
return /* @__PURE__ */ d(e, {
|
|
81
|
+
tone: t.statusTone,
|
|
82
|
+
children: t.statusLabel
|
|
83
|
+
});
|
|
26
84
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
85
|
+
function S({ row: e, labels: n }) {
|
|
86
|
+
return e.onActivate ? /* @__PURE__ */ d(t, {
|
|
87
|
+
size: "sm",
|
|
88
|
+
variant: "outline",
|
|
89
|
+
"aria-label": `${n.activateButtonForCard} ${e.nickname}`,
|
|
90
|
+
onClick: (t) => {
|
|
91
|
+
t.stopPropagation(), e.onActivate?.();
|
|
92
|
+
},
|
|
93
|
+
children: n.activateButton
|
|
94
|
+
}) : null;
|
|
95
|
+
}
|
|
96
|
+
function C(e, t, n) {
|
|
97
|
+
let r = {
|
|
98
|
+
cardName: (e) => /* @__PURE__ */ d(v, {
|
|
99
|
+
row: e,
|
|
100
|
+
labels: t,
|
|
101
|
+
isClickable: n
|
|
102
|
+
}),
|
|
103
|
+
fundingAccount: (e) => /* @__PURE__ */ d(y, {
|
|
104
|
+
row: e,
|
|
105
|
+
labels: t
|
|
106
|
+
}),
|
|
107
|
+
cardholder: (e) => /* @__PURE__ */ d("span", {
|
|
108
|
+
className: "ttw:text-sm ttw:font-normal ttw:text-foreground",
|
|
109
|
+
children: e.cardholder
|
|
110
|
+
}),
|
|
111
|
+
status: (e) => /* @__PURE__ */ d(x, { row: e }),
|
|
112
|
+
limit: (e) => /* @__PURE__ */ d("div", {
|
|
113
|
+
className: "ttw:text-right",
|
|
114
|
+
children: /* @__PURE__ */ d(b, {
|
|
115
|
+
row: e,
|
|
116
|
+
labels: t
|
|
117
|
+
})
|
|
118
|
+
})
|
|
119
|
+
};
|
|
120
|
+
return [...e.map((e) => ({
|
|
121
|
+
id: e,
|
|
122
|
+
size: _[e],
|
|
123
|
+
header: () => e === "limit" ? /* @__PURE__ */ d("div", {
|
|
124
|
+
className: "ttw:text-right",
|
|
125
|
+
children: t.columnHeaders[e]
|
|
126
|
+
}) : t.columnHeaders[e],
|
|
127
|
+
cell: ({ row: t }) => r[e](t.original)
|
|
128
|
+
})), {
|
|
129
|
+
id: "actions",
|
|
130
|
+
header: () => /* @__PURE__ */ d("span", {
|
|
131
|
+
className: "ttw:sr-only",
|
|
132
|
+
children: t.rowActionsColumn
|
|
133
|
+
}),
|
|
134
|
+
cell: ({ row: e }) => /* @__PURE__ */ d("div", {
|
|
135
|
+
className: "ttw:text-right",
|
|
136
|
+
children: /* @__PURE__ */ d(S, {
|
|
137
|
+
row: e.original,
|
|
138
|
+
labels: t
|
|
139
|
+
})
|
|
140
|
+
})
|
|
141
|
+
}];
|
|
142
|
+
}
|
|
143
|
+
function w({ row: e, columns: t, labels: n, isClickable: r }) {
|
|
144
|
+
return /* @__PURE__ */ f("div", {
|
|
145
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
37
146
|
children: [
|
|
38
|
-
|
|
39
|
-
className: "ttw:
|
|
40
|
-
children: [
|
|
147
|
+
/* @__PURE__ */ f("div", {
|
|
148
|
+
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-2",
|
|
149
|
+
children: [/* @__PURE__ */ d(v, {
|
|
150
|
+
row: e,
|
|
151
|
+
labels: n,
|
|
152
|
+
isClickable: r
|
|
153
|
+
}), t.includes("status") && /* @__PURE__ */ d(x, { row: e })]
|
|
154
|
+
}),
|
|
155
|
+
t.includes("cardholder") && /* @__PURE__ */ d("span", {
|
|
156
|
+
className: "ttw:text-sm ttw:text-foreground",
|
|
157
|
+
children: e.cardholder
|
|
158
|
+
}),
|
|
159
|
+
t.includes("fundingAccount") && /* @__PURE__ */ d(y, {
|
|
160
|
+
row: e,
|
|
161
|
+
labels: n
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ f("div", {
|
|
164
|
+
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
|
|
165
|
+
children: [t.includes("limit") ? /* @__PURE__ */ d(b, {
|
|
166
|
+
row: e,
|
|
167
|
+
labels: n
|
|
168
|
+
}) : null, /* @__PURE__ */ d(S, {
|
|
169
|
+
row: e,
|
|
170
|
+
labels: n
|
|
171
|
+
})]
|
|
172
|
+
})
|
|
173
|
+
]
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
function T({ rows: e, columns: a, isLoading: _ = !1, isError: v = !1, canToggleShowMyCards: y = !1, isShowingMyCards: b = !0, onShowMyCardsChange: x, canCreateCard: S = !1, onCreateCardClick: T, headerStart: E, onRetry: D, isPaginationVisible: O = !1, pageSize: k = 10, pageSizeOptions: A = m, rangeLabel: j = "", isPreviousPageDisabled: M = !1, isNextPageDisabled: N = !1, onPageSizeChange: P, onPreviousPageClick: F, onNextPageClick: I, labels: L, testIds: R }) {
|
|
177
|
+
let z = l(), B = u(() => c(L), [L]), V = e.length > 0 && e.every((e) => e.onSelect !== void 0), H = u(() => C(a, B, V), [
|
|
178
|
+
a,
|
|
179
|
+
B,
|
|
180
|
+
V
|
|
181
|
+
]), U = !!(S && T), W = !_ && !v && e.length === 0, G = U && !W, K = !!(O && P && F && I), q = V ? {
|
|
182
|
+
onRowClick: (e) => e.onSelect?.(),
|
|
183
|
+
rowAriaLabel: (e) => `${B.selectCardButton} ${e.nickname} ${e.lastFour} ${e.typeLabel}`
|
|
184
|
+
} : {};
|
|
185
|
+
return /* @__PURE__ */ f("section", {
|
|
186
|
+
"aria-label": B.regionLabel,
|
|
187
|
+
"aria-busy": _ || void 0,
|
|
188
|
+
"data-testid": R?.root,
|
|
189
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
190
|
+
children: [
|
|
191
|
+
(G || E) && /* @__PURE__ */ f("header", {
|
|
192
|
+
className: "ttw:flex ttw:items-center ttw:gap-4",
|
|
193
|
+
children: [E, G && /* @__PURE__ */ d(t, {
|
|
41
194
|
size: "sm",
|
|
42
|
-
disabled:
|
|
43
|
-
onClick:
|
|
195
|
+
disabled: _,
|
|
196
|
+
onClick: T,
|
|
44
197
|
className: "ttw:ml-auto",
|
|
45
|
-
children:
|
|
46
|
-
"aria-hidden": !0,
|
|
47
|
-
className: "ttw:size-4"
|
|
48
|
-
}), W.createCardButton]
|
|
198
|
+
children: B.createCardButton
|
|
49
199
|
})]
|
|
50
200
|
}),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
disabled: S,
|
|
61
|
-
onCheckedChange: D,
|
|
62
|
-
"aria-labelledby": U
|
|
63
|
-
}), /* @__PURE__ */ _("span", {
|
|
64
|
-
id: U,
|
|
201
|
+
y && x && /* @__PURE__ */ f("div", {
|
|
202
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
203
|
+
children: [/* @__PURE__ */ d(r, {
|
|
204
|
+
checked: b,
|
|
205
|
+
disabled: _,
|
|
206
|
+
onCheckedChange: x,
|
|
207
|
+
"aria-labelledby": z
|
|
208
|
+
}), /* @__PURE__ */ d("span", {
|
|
209
|
+
id: z,
|
|
65
210
|
className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
66
|
-
children:
|
|
211
|
+
children: B.showMyCardsToggle
|
|
67
212
|
})]
|
|
68
213
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
className: "ttw:
|
|
71
|
-
children: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
214
|
+
v || W ? /* @__PURE__ */ f("div", {
|
|
215
|
+
className: "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card",
|
|
216
|
+
children: [v ? /* @__PURE__ */ d(s, {
|
|
217
|
+
title: B.errorTitle,
|
|
218
|
+
description: B.errorDescription,
|
|
219
|
+
retryLabel: B.retryButton,
|
|
220
|
+
onRetry: D,
|
|
221
|
+
testId: R?.error
|
|
222
|
+
}) : /* @__PURE__ */ d(o, {
|
|
223
|
+
icon: /* @__PURE__ */ d(p, {}),
|
|
224
|
+
title: B.emptyTitle,
|
|
225
|
+
description: B.emptyDescription,
|
|
226
|
+
actionLabel: U ? B.createCardButton : void 0,
|
|
227
|
+
onAction: U ? T : void 0,
|
|
228
|
+
testId: R?.empty
|
|
229
|
+
}), !v && K ? /* @__PURE__ */ d(i, {
|
|
230
|
+
pageSize: k,
|
|
231
|
+
pageSizeOptions: A,
|
|
232
|
+
onPageSizeChange: P,
|
|
233
|
+
pageInfo: j || void 0,
|
|
234
|
+
hasPrevPage: !M,
|
|
235
|
+
hasNextPage: !N,
|
|
236
|
+
onPrevPage: F ?? g,
|
|
237
|
+
onNextPage: I ?? g,
|
|
238
|
+
labels: {
|
|
239
|
+
rowsPerPage: B.pagination.rowsPerPageLabel,
|
|
240
|
+
previousPage: B.pagination.previousPageButton,
|
|
241
|
+
nextPage: B.pagination.nextPageButton
|
|
242
|
+
}
|
|
243
|
+
}) : null]
|
|
244
|
+
}) : /* @__PURE__ */ d(n, {
|
|
245
|
+
columns: H,
|
|
246
|
+
data: e,
|
|
247
|
+
getRowId: (e) => e.key,
|
|
248
|
+
rowTestId: R?.row,
|
|
249
|
+
sorting: h,
|
|
250
|
+
onSortingChange: g,
|
|
251
|
+
isLoading: _,
|
|
252
|
+
showPagination: K,
|
|
253
|
+
pageSize: k,
|
|
254
|
+
pageSizeOptions: A,
|
|
255
|
+
onPageSizeChange: P ?? g,
|
|
256
|
+
pageInfo: j || void 0,
|
|
257
|
+
hasPrevPage: !M && !_,
|
|
258
|
+
hasNextPage: !N && !_,
|
|
259
|
+
onPrevPage: F ?? g,
|
|
260
|
+
onNextPage: I ?? g,
|
|
261
|
+
renderCard: (e) => /* @__PURE__ */ d(w, {
|
|
116
262
|
row: e,
|
|
117
|
-
columns:
|
|
118
|
-
labels:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
onNextPageClick: K.onNextPageClick,
|
|
129
|
-
labels: W.pagination
|
|
130
|
-
})]
|
|
263
|
+
columns: a,
|
|
264
|
+
labels: B,
|
|
265
|
+
isClickable: V
|
|
266
|
+
}),
|
|
267
|
+
labels: {
|
|
268
|
+
loading: B.loadingLabel,
|
|
269
|
+
rowsPerPage: B.pagination.rowsPerPageLabel,
|
|
270
|
+
previousPage: B.pagination.previousPageButton,
|
|
271
|
+
nextPage: B.pagination.nextPageButton
|
|
272
|
+
},
|
|
273
|
+
...q
|
|
131
274
|
})
|
|
132
275
|
]
|
|
133
276
|
});
|
|
134
277
|
}
|
|
135
|
-
export {
|
|
278
|
+
export { T as CardsList, T as default };
|
|
@@ -20,7 +20,7 @@ function l({ isOpen: l, onClose: u, labels: d, contentClassName: f, testIds: p,
|
|
|
20
20
|
children: /* @__PURE__ */ c(t, {
|
|
21
21
|
showCloseButton: !1,
|
|
22
22
|
"data-testid": p?.root,
|
|
23
|
-
className: i("ttw
|
|
23
|
+
className: i("ttw:!gap-0", f ?? "ttw:overflow-y-auto"),
|
|
24
24
|
children: [
|
|
25
25
|
/* @__PURE__ */ s(r, {
|
|
26
26
|
className: "ttw:sr-only",
|
package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js
CHANGED
|
@@ -19,10 +19,10 @@ var t = {
|
|
|
19
19
|
cardNameSeparator: "-",
|
|
20
20
|
noLimit: "No limit",
|
|
21
21
|
loadingLabel: "Loading cards",
|
|
22
|
-
emptyTitle: "No cards
|
|
23
|
-
emptyDescription: "
|
|
24
|
-
errorTitle: "
|
|
25
|
-
errorDescription: "
|
|
22
|
+
emptyTitle: "No cards yet",
|
|
23
|
+
emptyDescription: "Create a physical or virtual card to get started.",
|
|
24
|
+
errorTitle: "Couldn't load cards",
|
|
25
|
+
errorDescription: "Check your connection, then try again.",
|
|
26
26
|
retryButton: "Try again",
|
|
27
27
|
pagination: e,
|
|
28
28
|
detailsSheet: {
|
|
@@ -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 };
|
package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/rows.js
CHANGED
|
@@ -1,33 +1,52 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/rows.js
|
|
2
|
-
function e(e, t
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
switch (e) {
|
|
4
|
+
case "UNVERIFIED": return {
|
|
5
|
+
label: t.unverifiedStatus,
|
|
6
|
+
tone: "warning"
|
|
7
|
+
};
|
|
8
|
+
case "VERIFICATION_SENT": return {
|
|
9
|
+
label: t.pendingStatus,
|
|
10
|
+
tone: "info"
|
|
11
|
+
};
|
|
12
|
+
case "FAILED": return {
|
|
13
|
+
label: t.failedStatus,
|
|
14
|
+
tone: "destructive"
|
|
15
|
+
};
|
|
16
|
+
default: return;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function t(t, n, r, i) {
|
|
20
|
+
let { labels: a } = i;
|
|
21
|
+
return t.map((t) => {
|
|
22
|
+
let o = t.verificationStatus === "VERIFIED", s = t.verificationStatus === "VERIFICATION_SENT", c = t.verificationStatus === "FAILED", l = !o && !s && !c, u = t.accountStatus === "ACTIVE", d = t.nickname || n.accountFallback, f;
|
|
23
|
+
s && r.canWrite ? f = {
|
|
24
|
+
label: a.verifyButton,
|
|
25
|
+
onSelect: () => i.onVerifySelect(t.id)
|
|
26
|
+
} : l && r.canMicroDeposit && (f = {
|
|
27
|
+
label: a.verifyButton,
|
|
28
|
+
onSelect: () => i.onSendDepositsSelect(t.id)
|
|
29
|
+
});
|
|
30
|
+
let p = [];
|
|
31
|
+
return r.canWrite && (p.push({
|
|
6
32
|
key: "edit",
|
|
7
|
-
label:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}), c && n.canWrite && u.push({
|
|
33
|
+
label: a.editButton,
|
|
34
|
+
onSelect: () => i.onEditSelect(t.id)
|
|
35
|
+
}), u && p.push({
|
|
11
36
|
key: "unlink",
|
|
12
|
-
label:
|
|
13
|
-
|
|
14
|
-
onSelect: () =>
|
|
15
|
-
}),
|
|
16
|
-
key:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
showBadge: o,
|
|
25
|
-
primaryAction: a && n.canWrite ? {
|
|
26
|
-
label: r.labels.verifyCtaButton,
|
|
27
|
-
onSelect: () => r.onVerifySelect(e.id)
|
|
28
|
-
} : void 0,
|
|
29
|
-
iconActions: u
|
|
37
|
+
label: a.unlinkButton,
|
|
38
|
+
destructive: !0,
|
|
39
|
+
onSelect: () => i.onUnlinkSelect(t.id)
|
|
40
|
+
})), {
|
|
41
|
+
key: t.id,
|
|
42
|
+
title: d,
|
|
43
|
+
subtitle: `${n.accountLabel} ${t.accountNumber}`,
|
|
44
|
+
hint: c ? n.failedVerificationHint : void 0,
|
|
45
|
+
status: e(t.verificationStatus, a),
|
|
46
|
+
task: f,
|
|
47
|
+
menuActions: p,
|
|
48
|
+
menuLabel: `${a.moreActionsLabel}: ${d}`
|
|
30
49
|
};
|
|
31
50
|
});
|
|
32
51
|
}
|
|
33
|
-
export {
|
|
52
|
+
export { t as toAccountRows };
|
|
@@ -14,8 +14,9 @@ function r({ enabled: r, permissionKey: i, organizationId: a }) {
|
|
|
14
14
|
});
|
|
15
15
|
return {
|
|
16
16
|
userIds: n(() => new Set(t(o.data?.data ?? [], a).map((e) => e.id)), [o.data?.data, a]),
|
|
17
|
-
isResolving: o.isResolving,
|
|
18
|
-
isError: o.isError
|
|
17
|
+
isResolving: o.isResolving || o.isError && o.isFetching,
|
|
18
|
+
isError: o.isError && !o.isFetching,
|
|
19
|
+
refetch: () => void o.refetch()
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
22
|
export { r as useAdminEligibleUserIds };
|