@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
|
@@ -2,109 +2,72 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { Button as e,
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import "../../../../shared/ui/dist/index.js";
|
|
9
|
-
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
|
-
import { ExternalLinkIcon as p } from "lucide-react";
|
|
5
|
+
import { Button as e, DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i, FieldRequirement as a, FormDialog as o, Input as s, Label as c, Tooltip as l, TooltipContent as u, TooltipProvider as d, TooltipTrigger as f } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
7
|
+
import { MoreVerticalIcon as h } from "lucide-react";
|
|
11
8
|
// ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index5.js
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
9
|
+
var g = "edit-account-nickname", _ = "edit-account-nickname-error";
|
|
10
|
+
function v({ labels: e, open: t, form: n, isSubmitting: r, isAuthPending: i = !1, isError: l, hasNicknameError: u, onOpenChange: d, onFormChange: f, onSubmit: h }) {
|
|
11
|
+
return /* @__PURE__ */ p(o, {
|
|
12
|
+
submitError: l ? e.editErrorTitle : void 0,
|
|
13
|
+
open: t,
|
|
14
|
+
onOpenChange: d,
|
|
15
|
+
title: e.editDialogTitle,
|
|
16
|
+
submitting: r || i,
|
|
17
|
+
onSubmit: h,
|
|
18
|
+
labels: {
|
|
19
|
+
submit: e.editSaveButton,
|
|
20
|
+
cancel: e.editCancelButton,
|
|
21
|
+
close: e.editDialogCloseAriaLabel
|
|
22
|
+
},
|
|
23
|
+
children: /* @__PURE__ */ p("div", {
|
|
24
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
25
|
+
children: /* @__PURE__ */ m("div", {
|
|
26
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ p(c, {
|
|
29
|
+
htmlFor: g,
|
|
30
|
+
requirement: a.Required,
|
|
31
|
+
children: e.editNicknameLabel
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ p(s, {
|
|
34
|
+
id: g,
|
|
35
|
+
value: n.nickname,
|
|
36
|
+
required: !0,
|
|
37
|
+
disabled: r,
|
|
38
|
+
"aria-invalid": u || void 0,
|
|
39
|
+
"aria-describedby": u ? _ : void 0,
|
|
40
|
+
onChange: (e) => f({ nickname: e.target.value })
|
|
41
|
+
}),
|
|
42
|
+
u ? /* @__PURE__ */ p("p", {
|
|
43
|
+
id: _,
|
|
44
|
+
className: "ttw:text-sm ttw:text-destructive",
|
|
45
|
+
children: e.editNicknameRequiredError
|
|
46
|
+
}) : null
|
|
47
|
+
]
|
|
48
|
+
})
|
|
40
49
|
})
|
|
41
50
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
children:
|
|
54
|
-
}),
|
|
55
|
-
/* @__PURE__ */ f(n, { children: [/* @__PURE__ */ d(o, { children: /* @__PURE__ */ f(s, {
|
|
56
|
-
className: "ttw:border-border ttw:bg-muted ttw:hover:bg-muted",
|
|
57
|
-
children: [/* @__PURE__ */ d(a, {
|
|
58
|
-
className: "ttw:h-auto ttw:px-4 ttw:py-3 ttw:font-semibold",
|
|
59
|
-
children: t.statementColumn
|
|
60
|
-
}), /* @__PURE__ */ d(a, {
|
|
61
|
-
className: "ttw:h-auto ttw:px-4 ttw:py-3 ttw:text-right ttw:font-semibold",
|
|
62
|
-
children: /* @__PURE__ */ d("span", {
|
|
63
|
-
className: "ttw:sr-only",
|
|
64
|
-
children: t.statementsActionsColumn
|
|
65
|
-
})
|
|
66
|
-
})]
|
|
67
|
-
}) }), /* @__PURE__ */ d(r, {
|
|
68
|
-
className: "ttw:bg-card",
|
|
69
|
-
children: m ? /* @__PURE__ */ d(g, {}) : u.map((n) => /* @__PURE__ */ f(s, {
|
|
70
|
-
className: "ttw:bg-card ttw:hover:bg-transparent",
|
|
71
|
-
children: [/* @__PURE__ */ d(i, {
|
|
72
|
-
className: "ttw:px-4 ttw:py-3 ttw:align-middle ttw:font-medium ttw:text-foreground",
|
|
73
|
-
children: n.label
|
|
74
|
-
}), /* @__PURE__ */ d(i, {
|
|
75
|
-
className: "ttw:px-4 ttw:py-3 ttw:text-right ttw:align-middle",
|
|
76
|
-
children: /* @__PURE__ */ f(e, {
|
|
77
|
-
type: "button",
|
|
78
|
-
variant: "outline",
|
|
79
|
-
size: "sm",
|
|
80
|
-
"aria-label": n.viewButtonAriaLabel,
|
|
81
|
-
disabled: n.isViewDisabled,
|
|
82
|
-
onClick: n.onView,
|
|
83
|
-
children: [/* @__PURE__ */ d(p, {
|
|
84
|
-
"aria-hidden": !0,
|
|
85
|
-
className: "ttw:size-4"
|
|
86
|
-
}), t.viewStatementButton]
|
|
87
|
-
})
|
|
88
|
-
})]
|
|
89
|
-
}, n.key))
|
|
90
|
-
})] }),
|
|
91
|
-
v && D && /* @__PURE__ */ d(l, {
|
|
92
|
-
pageSize: y,
|
|
93
|
-
pageSizeOptions: b,
|
|
94
|
-
rangeLabel: x,
|
|
95
|
-
isPreviousDisabled: S,
|
|
96
|
-
isNextDisabled: C,
|
|
97
|
-
isDisabled: m,
|
|
98
|
-
onPageSizeChange: D.onPageSizeChange,
|
|
99
|
-
onPreviousPageClick: D.onPreviousPageClick,
|
|
100
|
-
onNextPageClick: D.onNextPageClick,
|
|
101
|
-
labels: {
|
|
102
|
-
rowsPerPageLabel: t.statementsRowsPerPageLabel,
|
|
103
|
-
previousPageButton: t.statementsPreviousPageButton,
|
|
104
|
-
nextPageButton: t.statementsNextPageButton
|
|
105
|
-
}
|
|
51
|
+
}
|
|
52
|
+
function y({ labels: a, canEdit: o, onEditNickname: s }) {
|
|
53
|
+
return o ? /* @__PURE__ */ m(t, { children: [/* @__PURE__ */ p(d, { children: /* @__PURE__ */ m(l, { children: [/* @__PURE__ */ p(f, {
|
|
54
|
+
asChild: !0,
|
|
55
|
+
children: /* @__PURE__ */ p(i, {
|
|
56
|
+
asChild: !0,
|
|
57
|
+
children: /* @__PURE__ */ p(e, {
|
|
58
|
+
type: "button",
|
|
59
|
+
variant: "ghost",
|
|
60
|
+
size: "icon",
|
|
61
|
+
"aria-label": a.moreActionsLabel,
|
|
62
|
+
children: /* @__PURE__ */ p(h, {})
|
|
106
63
|
})
|
|
107
|
-
|
|
108
|
-
})
|
|
64
|
+
})
|
|
65
|
+
}), /* @__PURE__ */ p(u, { children: a.moreActionsLabel })] }) }), /* @__PURE__ */ p(n, {
|
|
66
|
+
align: "end",
|
|
67
|
+
children: /* @__PURE__ */ p(r, {
|
|
68
|
+
onSelect: s,
|
|
69
|
+
children: a.editAccountMenuItem
|
|
70
|
+
})
|
|
71
|
+
})] }) : null;
|
|
109
72
|
}
|
|
110
|
-
export {
|
|
73
|
+
export { y as AccountActionsMenu, v as EditAccountDialog };
|
|
@@ -2,92 +2,65 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import "../../../../shared/ui/dist/index.js";
|
|
8
|
-
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
|
-
import { DownloadIcon as d } from "lucide-react";
|
|
5
|
+
import { DatePicker as e, FieldRequirement as t, FormDialog as n, Label as r } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
10
7
|
// ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index6.js
|
|
11
|
-
function
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})
|
|
29
|
-
}) : /* @__PURE__ */ l("div", {
|
|
30
|
-
className: "ttw:overflow-hidden ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card",
|
|
31
|
-
children: /* @__PURE__ */ u(n, { children: [/* @__PURE__ */ u(o, {
|
|
32
|
-
className: m ? "ttw:[&_tr:first-child]:border-b-0" : void 0,
|
|
33
|
-
children: [m ? /* @__PURE__ */ l(s, {
|
|
34
|
-
className: "ttw:border-b-0 ttw:bg-card ttw:hover:bg-card",
|
|
35
|
-
children: /* @__PURE__ */ l(a, {
|
|
36
|
-
colSpan: 4,
|
|
37
|
-
className: "ttw:h-auto ttw:px-4 ttw:py-3 ttw:text-right",
|
|
38
|
-
children: /* @__PURE__ */ u(e, {
|
|
39
|
-
type: "button",
|
|
40
|
-
variant: "outline",
|
|
41
|
-
size: "sm",
|
|
42
|
-
onClick: h,
|
|
43
|
-
children: [/* @__PURE__ */ l(d, { className: "ttw:size-4" }), f.exportButton]
|
|
44
|
-
})
|
|
45
|
-
})
|
|
46
|
-
}) : null, /* @__PURE__ */ u(s, {
|
|
47
|
-
className: "ttw:border-border ttw:bg-card ttw:hover:bg-card",
|
|
8
|
+
function o({ labels: o, open: s, startDate: c, endDate: l, isDownloading: u, isAuthPending: d = !1, hasRangeError: f, disabledStartDates: p, disabledEndDates: m, onOpenChange: h, onStartDateChange: g, onEndDateChange: _, onDownload: v }) {
|
|
9
|
+
return /* @__PURE__ */ i(n, {
|
|
10
|
+
open: s,
|
|
11
|
+
onOpenChange: h,
|
|
12
|
+
title: o.exportDialogTitle,
|
|
13
|
+
description: o.exportDialogDescription,
|
|
14
|
+
submitting: u || d,
|
|
15
|
+
onSubmit: v,
|
|
16
|
+
labels: {
|
|
17
|
+
submit: o.exportDownloadButton,
|
|
18
|
+
cancel: o.exportCancelButton,
|
|
19
|
+
close: o.exportDialogCloseAriaLabel
|
|
20
|
+
},
|
|
21
|
+
children: /* @__PURE__ */ a("div", {
|
|
22
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
23
|
+
children: [/* @__PURE__ */ a("div", {
|
|
24
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
48
25
|
children: [
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
/* @__PURE__ */ l(a, {
|
|
54
|
-
className: "ttw:h-auto ttw:w-[60%] ttw:px-4 ttw:py-3 ttw:font-semibold",
|
|
55
|
-
children: f.transactionDescriptionColumn
|
|
26
|
+
/* @__PURE__ */ i(r, {
|
|
27
|
+
htmlFor: "export-start-date",
|
|
28
|
+
requirement: t.Required,
|
|
29
|
+
children: o.exportStartDateLabel
|
|
56
30
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
59
|
-
|
|
31
|
+
/* @__PURE__ */ i(e, {
|
|
32
|
+
id: "export-start-date",
|
|
33
|
+
value: c,
|
|
34
|
+
onChange: g,
|
|
35
|
+
placeholder: o.exportStartDatePlaceholder,
|
|
36
|
+
disabled: u,
|
|
37
|
+
disabledDates: p,
|
|
38
|
+
"aria-invalid": f || void 0,
|
|
39
|
+
"aria-describedby": f ? "export-start-date-error" : void 0
|
|
60
40
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
41
|
+
f ? /* @__PURE__ */ i("p", {
|
|
42
|
+
id: "export-start-date-error",
|
|
43
|
+
role: "alert",
|
|
44
|
+
className: "ttw:text-sm ttw:text-destructive",
|
|
45
|
+
children: o.exportRangeError
|
|
46
|
+
}) : null
|
|
65
47
|
]
|
|
48
|
+
}), /* @__PURE__ */ a("div", {
|
|
49
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
50
|
+
children: [/* @__PURE__ */ i(r, {
|
|
51
|
+
htmlFor: "export-end-date",
|
|
52
|
+
requirement: t.Required,
|
|
53
|
+
children: o.exportEndDateLabel
|
|
54
|
+
}), /* @__PURE__ */ i(e, {
|
|
55
|
+
id: "export-end-date",
|
|
56
|
+
value: l,
|
|
57
|
+
onChange: _,
|
|
58
|
+
placeholder: o.exportEndDatePlaceholder,
|
|
59
|
+
disabled: u,
|
|
60
|
+
disabledDates: m
|
|
61
|
+
})]
|
|
66
62
|
})]
|
|
67
|
-
})
|
|
68
|
-
className: "ttw:bg-card",
|
|
69
|
-
children: p.map((e) => /* @__PURE__ */ u(s, {
|
|
70
|
-
className: "ttw:bg-card ttw:hover:bg-transparent",
|
|
71
|
-
children: [
|
|
72
|
-
/* @__PURE__ */ l(i, {
|
|
73
|
-
className: "ttw:px-4 ttw:py-3 ttw:align-top",
|
|
74
|
-
children: e.dateLabel
|
|
75
|
-
}),
|
|
76
|
-
/* @__PURE__ */ l(i, {
|
|
77
|
-
className: "ttw:px-4 ttw:py-3 ttw:align-top ttw:font-medium",
|
|
78
|
-
children: e.descriptionLabel
|
|
79
|
-
}),
|
|
80
|
-
/* @__PURE__ */ l(i, {
|
|
81
|
-
className: `ttw:px-4 ttw:py-3 ttw:text-right ttw:align-top ttw:whitespace-nowrap ${e.amountVariant === "positive" ? "ttw:text-green-700" : "ttw:text-foreground"}`,
|
|
82
|
-
children: e.amountLabel
|
|
83
|
-
}),
|
|
84
|
-
/* @__PURE__ */ l(i, {
|
|
85
|
-
className: "ttw:px-4 ttw:py-3 ttw:text-right ttw:align-top ttw:whitespace-nowrap",
|
|
86
|
-
children: e.balanceLabel
|
|
87
|
-
})
|
|
88
|
-
]
|
|
89
|
-
}, e.key))
|
|
90
|
-
})] })
|
|
63
|
+
})
|
|
91
64
|
});
|
|
92
65
|
}
|
|
93
|
-
export {
|
|
66
|
+
export { o as ExportTransactionsDialog };
|
|
@@ -1,66 +1,91 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { Button as e, DataTable as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { EmptyState as n } from "../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
7
|
+
import { ErrorState as r } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
8
|
+
import "../../../../shared/ui/dist/index.js";
|
|
9
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
10
|
+
import { FileTextIcon as o } from "lucide-react";
|
|
1
11
|
// ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index7.js
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
12
|
+
var s = () => void 0, c = [];
|
|
13
|
+
function l({ labels: l, rows: u, isLoading: d = !1, isError: f = !1, onRetry: p, pagination: m }) {
|
|
14
|
+
if (f) return /* @__PURE__ */ i("div", {
|
|
15
|
+
className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
|
|
16
|
+
children: /* @__PURE__ */ i(r, {
|
|
17
|
+
title: l.statementsErrorTitle,
|
|
18
|
+
retryLabel: l.statementsErrorRetry,
|
|
19
|
+
onRetry: p
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
let h = [{
|
|
23
|
+
id: "statement",
|
|
24
|
+
header: l.statementColumn,
|
|
25
|
+
cell: ({ row: e }) => /* @__PURE__ */ i("span", {
|
|
26
|
+
className: "ttw:font-medium",
|
|
27
|
+
children: e.original.label
|
|
28
|
+
})
|
|
29
|
+
}, {
|
|
30
|
+
id: "actions",
|
|
31
|
+
header: () => /* @__PURE__ */ i("span", {
|
|
32
|
+
className: "ttw:sr-only",
|
|
33
|
+
children: l.statementsActionsColumn
|
|
34
|
+
}),
|
|
35
|
+
cell: ({ row: t }) => /* @__PURE__ */ i("div", {
|
|
36
|
+
className: "ttw:flex ttw:justify-end",
|
|
37
|
+
children: /* @__PURE__ */ i(e, {
|
|
38
|
+
type: "button",
|
|
39
|
+
variant: "outline",
|
|
40
|
+
size: "sm",
|
|
41
|
+
"aria-label": t.original.viewButtonAriaLabel,
|
|
42
|
+
disabled: t.original.isViewDisabled,
|
|
43
|
+
onClick: t.original.onView,
|
|
44
|
+
children: l.viewStatementButton
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
}], g = !d && u.length === 0;
|
|
48
|
+
return /* @__PURE__ */ i(t, {
|
|
49
|
+
columns: h,
|
|
50
|
+
data: u,
|
|
51
|
+
getRowId: (e) => e.key,
|
|
52
|
+
isLoading: d,
|
|
53
|
+
renderCard: (t) => /* @__PURE__ */ a("div", {
|
|
54
|
+
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:text-sm",
|
|
55
|
+
children: [/* @__PURE__ */ i("span", {
|
|
56
|
+
className: "ttw:font-medium",
|
|
57
|
+
children: t.label
|
|
58
|
+
}), /* @__PURE__ */ i(e, {
|
|
59
|
+
type: "button",
|
|
60
|
+
variant: "outline",
|
|
61
|
+
size: "sm",
|
|
62
|
+
"aria-label": t.viewButtonAriaLabel,
|
|
63
|
+
disabled: t.isViewDisabled,
|
|
64
|
+
onClick: t.onView,
|
|
65
|
+
children: l.viewStatementButton
|
|
66
|
+
})]
|
|
67
|
+
}),
|
|
68
|
+
sorting: c,
|
|
69
|
+
onSortingChange: s,
|
|
70
|
+
showPagination: !!m && !g,
|
|
71
|
+
pageSize: m?.pageSize ?? Math.max(u.length, 1),
|
|
72
|
+
pageSizeOptions: m?.pageSizeOptions ?? [],
|
|
73
|
+
pageInfo: m?.rangeLabel,
|
|
74
|
+
hasPrevPage: m ? !m.isPreviousDisabled : !1,
|
|
75
|
+
hasNextPage: m ? !m.isNextDisabled : !1,
|
|
76
|
+
onPageSizeChange: m?.onPageSizeChange ?? s,
|
|
77
|
+
onPrevPage: m?.onPreviousPageClick ?? s,
|
|
78
|
+
onNextPage: m?.onNextPageClick ?? s,
|
|
79
|
+
labels: {
|
|
80
|
+
loading: l.statementsLoadingLabel,
|
|
81
|
+
rowsPerPage: l.statementsRowsPerPageLabel,
|
|
82
|
+
previousPage: l.statementsPreviousPageButton,
|
|
83
|
+
nextPage: l.statementsNextPageButton
|
|
84
|
+
},
|
|
85
|
+
children: /* @__PURE__ */ i(n, {
|
|
86
|
+
icon: /* @__PURE__ */ i(o, {}),
|
|
87
|
+
title: l.noStatementsLabel
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
export { l as StatementsPanel };
|