@tesouro/embedded-components-react 0.7.37 → 0.7.41
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 +2 -2
- package/dist/fixtures/index.d.ts +1 -1
- package/dist/index.d.ts +21 -14
- package/dist/lib/CounterpartsWidget.d.ts +16 -14
- package/dist/lib/CounterpartsWidgetPublic.d.ts +16 -14
- package/dist/lib/CustomersWidget.d.ts +16 -14
- package/dist/lib/TransfersWidget.d.ts +5 -0
- package/dist/lib/WidgetSuite.d.ts +5 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldInput/formatPhoneNumberInput.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/mocks/bankAccounts.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +30 -29
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/constants.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsTable.js +143 -95
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsWidget.js +60 -48
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/mocks/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +22 -15
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +137 -135
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +106 -108
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +50 -50
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +22 -22
- 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/data-access/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index3.js +6 -7
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +14 -34
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index7.js +16 -13
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index8.js +4 -10
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/TransfersWidgetInner.js +99 -75
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/featureLabels.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/useTransfersPageState.js +49 -0
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/mocks/labels.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/mocks/transfers.js +103 -85
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransfersWidget.js +73 -61
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/labels.js +3 -0
- package/package.json +1 -1
|
@@ -1,117 +1,129 @@
|
|
|
1
1
|
import { Button as e, Skeleton as t, Typography as n } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { PaginationFooter as r } from "../../../../../shared/ui/dist/lib/PaginationFooter/PaginationFooter.js";
|
|
3
|
+
import { WidgetTitleWithIconAndChildren as i } from "../../../../../shared/ui/dist/lib/WidgetTitleWithIconAndChildren/WidgetTitleWithIconAndChildren.js";
|
|
3
4
|
import "../../../../../shared/ui/dist/index.js";
|
|
4
|
-
import { TRANSFERS_WIDGET_LABELS_EN as
|
|
5
|
-
import { TransferMoneyModal as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { ArrowDownToLine as
|
|
5
|
+
import { TRANSFERS_WIDGET_LABELS_EN as a } from "./labels.js";
|
|
6
|
+
import { TransferMoneyModal as o } from "../TransferMoneyModal/TransferMoneyModal.js";
|
|
7
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
import { ArrowDownToLine as u, ArrowDownUp as d, ArrowUpFromLine as f } from "lucide-react";
|
|
8
9
|
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransfersWidget.js
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
...
|
|
12
|
-
...
|
|
13
|
-
},
|
|
10
|
+
function p({ transferRows: p, isLoading: m, isError: h, onRetry: g, showTransferMoneyCta: _, isTransferMoneyCtaDisabled: v = !1, onTransferMoneyClick: y, transferMoneyModal: b, pagination: x, labels: S, testIds: C }) {
|
|
11
|
+
let w = {
|
|
12
|
+
...a,
|
|
13
|
+
...S
|
|
14
|
+
}, T = x ? /* @__PURE__ */ c(r, {
|
|
15
|
+
...x,
|
|
16
|
+
labels: {
|
|
17
|
+
rowsPerPageLabel: w.paginationRowsPerPage,
|
|
18
|
+
previousPageButton: w.paginationPreviousPage,
|
|
19
|
+
nextPageButton: w.paginationNextPage
|
|
20
|
+
}
|
|
21
|
+
}) : null, E = _ && !m ? /* @__PURE__ */ c("span", {
|
|
14
22
|
className: "ttw:inline-flex ttw:shrink-0",
|
|
15
|
-
title:
|
|
16
|
-
children: /* @__PURE__ */
|
|
23
|
+
title: v ? w.transferMoneyCtaDisabledTooltip : void 0,
|
|
24
|
+
children: /* @__PURE__ */ l(e, {
|
|
17
25
|
type: "button",
|
|
18
26
|
size: "sm",
|
|
19
27
|
variant: "default",
|
|
20
28
|
className: "ttw:inline-flex ttw:shrink-0 ttw:gap-2 ttw:whitespace-nowrap",
|
|
21
|
-
disabled:
|
|
22
|
-
onClick:
|
|
23
|
-
"data-testid":
|
|
24
|
-
children: [/* @__PURE__ */
|
|
29
|
+
disabled: v,
|
|
30
|
+
onClick: v ? void 0 : y,
|
|
31
|
+
"data-testid": C?.transferMoneyButton,
|
|
32
|
+
children: [/* @__PURE__ */ c(u, {
|
|
25
33
|
className: "ttw:size-4",
|
|
26
34
|
"aria-hidden": !0
|
|
27
|
-
}),
|
|
35
|
+
}), w.transferMoneyCta]
|
|
28
36
|
})
|
|
29
37
|
}) : void 0;
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
icon: /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(i, {
|
|
39
|
+
icon: /* @__PURE__ */ c(d, {
|
|
32
40
|
className: "ttw:size-[18px] ttw:shrink-0 ttw:text-primary",
|
|
33
41
|
"aria-hidden": !0
|
|
34
42
|
}),
|
|
35
|
-
title:
|
|
36
|
-
headerActions:
|
|
37
|
-
children:
|
|
38
|
-
"data-testid":
|
|
43
|
+
title: w.widgetTitle,
|
|
44
|
+
headerActions: E,
|
|
45
|
+
children: m ? /* @__PURE__ */ c(t, {
|
|
46
|
+
"data-testid": C?.skeleton,
|
|
39
47
|
height: 120,
|
|
40
48
|
width: "100%",
|
|
41
49
|
className: "ttw:rounded-md"
|
|
42
|
-
}) :
|
|
50
|
+
}) : h ? /* @__PURE__ */ l("div", {
|
|
43
51
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
44
|
-
"data-testid":
|
|
52
|
+
"data-testid": C?.error,
|
|
45
53
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ c(n, {
|
|
47
55
|
component: "p",
|
|
48
56
|
variant: "body1",
|
|
49
57
|
className: "ttw:font-semibold",
|
|
50
|
-
children:
|
|
58
|
+
children: w.loadErrorTitle
|
|
51
59
|
}),
|
|
52
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ c(n, {
|
|
53
61
|
component: "p",
|
|
54
62
|
variant: "body2",
|
|
55
63
|
color: "muted",
|
|
56
|
-
children:
|
|
64
|
+
children: w.loadErrorDescription
|
|
57
65
|
}),
|
|
58
|
-
|
|
66
|
+
g ? /* @__PURE__ */ c(e, {
|
|
59
67
|
type: "button",
|
|
60
68
|
variant: "outline",
|
|
61
69
|
size: "sm",
|
|
62
70
|
className: "ttw:self-start ttw:cursor-pointer",
|
|
63
|
-
onClick:
|
|
64
|
-
"data-testid":
|
|
65
|
-
children:
|
|
71
|
+
onClick: g,
|
|
72
|
+
"data-testid": C?.retry,
|
|
73
|
+
children: w.loadErrorRetry
|
|
66
74
|
}) : null
|
|
67
75
|
]
|
|
68
|
-
}) :
|
|
76
|
+
}) : p.length === 0 ? /* @__PURE__ */ l("div", {
|
|
69
77
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
70
|
-
"data-testid":
|
|
71
|
-
children: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
"data-testid": C?.empty,
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ c(n, {
|
|
81
|
+
variant: "body1",
|
|
82
|
+
className: "ttw:font-semibold",
|
|
83
|
+
children: w.emptyTitle
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ c(n, {
|
|
86
|
+
variant: "body2",
|
|
87
|
+
color: "muted",
|
|
88
|
+
component: "p",
|
|
89
|
+
children: w.emptyDescription
|
|
90
|
+
}),
|
|
91
|
+
x && !x.isPreviousDisabled ? T : null
|
|
92
|
+
]
|
|
93
|
+
}) : /* @__PURE__ */ l("div", {
|
|
82
94
|
className: "ttw:max-w-full ttw:overflow-x-auto ttw:rounded-md ttw:border ttw:border-border",
|
|
83
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ c("div", {
|
|
84
96
|
className: "ttw:min-w-[24rem] ttw:max-h-96 ttw:overflow-y-auto",
|
|
85
|
-
children: /* @__PURE__ */
|
|
97
|
+
children: /* @__PURE__ */ c("ul", {
|
|
86
98
|
className: "ttw:m-0 ttw:list-none ttw:divide-y ttw:divide-border ttw:p-0",
|
|
87
|
-
children:
|
|
99
|
+
children: p.map((e) => /* @__PURE__ */ l("li", {
|
|
88
100
|
title: e.detailLabel,
|
|
89
|
-
"data-testid":
|
|
101
|
+
"data-testid": C?.transferRow,
|
|
90
102
|
className: "ttw:grid ttw:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] ttw:items-center ttw:gap-3 ttw:px-4 ttw:py-4",
|
|
91
103
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ l("div", {
|
|
93
105
|
className: "ttw:flex ttw:min-w-0 ttw:items-center ttw:gap-3",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ c("div", {
|
|
95
107
|
className: "ttw:flex ttw:size-9 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-primary/10",
|
|
96
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ c(f, {
|
|
97
109
|
className: "ttw:size-4 ttw:text-primary",
|
|
98
110
|
"aria-hidden": !0
|
|
99
111
|
})
|
|
100
|
-
}), /* @__PURE__ */
|
|
112
|
+
}), /* @__PURE__ */ c(n, {
|
|
101
113
|
variant: "body2",
|
|
102
114
|
component: "p",
|
|
103
115
|
className: "ttw:min-w-0 ttw:truncate ttw:font-medium",
|
|
104
116
|
children: e.accountsRouteLabel
|
|
105
117
|
})]
|
|
106
118
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ c(n, {
|
|
108
120
|
variant: "body2",
|
|
109
121
|
component: "p",
|
|
110
122
|
color: "muted",
|
|
111
123
|
className: "ttw:shrink-0 ttw:text-center",
|
|
112
124
|
children: e.dateLabel
|
|
113
125
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ c(n, {
|
|
115
127
|
variant: "body2",
|
|
116
128
|
component: "p",
|
|
117
129
|
className: "ttw:justify-self-end ttw:shrink-0 ttw:font-semibold ttw:tabular-nums",
|
|
@@ -120,12 +132,12 @@ function f({ transferRows: f, isLoading: p, isError: m, onRetry: h, showTransfer
|
|
|
120
132
|
]
|
|
121
133
|
}, e.rowKey))
|
|
122
134
|
})
|
|
123
|
-
})
|
|
135
|
+
}), T]
|
|
124
136
|
})
|
|
125
|
-
}), /* @__PURE__ */
|
|
126
|
-
...
|
|
127
|
-
labels:
|
|
137
|
+
}), /* @__PURE__ */ c(o, {
|
|
138
|
+
...b,
|
|
139
|
+
labels: w
|
|
128
140
|
})] });
|
|
129
141
|
}
|
|
130
142
|
//#endregion
|
|
131
|
-
export {
|
|
143
|
+
export { a as TRANSFERS_WIDGET_LABELS_EN, p as TransfersWidget };
|
|
@@ -12,6 +12,9 @@ var e = {
|
|
|
12
12
|
loadErrorRetry: "Try again",
|
|
13
13
|
emptyTitle: "No transfers yet",
|
|
14
14
|
emptyDescription: "When you move money between accounts, your transfers will show up here.",
|
|
15
|
+
paginationRowsPerPage: "Rows per page",
|
|
16
|
+
paginationPreviousPage: "Previous page",
|
|
17
|
+
paginationNextPage: "Next page",
|
|
15
18
|
modalTitle: "Transfer Money",
|
|
16
19
|
modalAccountsSubtitle: "ACH transfers take 1–2 business days to settle.",
|
|
17
20
|
modalFromAccountPlaceholder: "From Account",
|