@tesouro/embedded-components-react 0.11.60 → 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.
Files changed (65) hide show
  1. package/README.md +21 -21
  2. package/dist/index.css +37 -160
  3. package/dist/index.d.ts +50 -17
  4. package/dist/lib/BankAccountsWidget.d.ts +20 -7
  5. package/dist/lib/LinkedAccountsWidget.d.ts +30 -10
  6. package/dist/lib/WidgetSuite.d.ts +50 -17
  7. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index.js +5 -5
  8. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +21 -26
  9. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +18 -16
  10. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index5.js +22 -35
  11. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index6.js +29 -14
  12. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index7.js +20 -24
  13. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index8.js +31 -0
  14. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index.js +2 -2
  15. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index10.js +296 -0
  16. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index12.js +1 -0
  17. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index5.js +5 -10
  18. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index9.js +42 -281
  19. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index.js +5 -3
  20. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index10.js +180 -0
  21. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index2.js +16 -184
  22. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index3.js +9 -93
  23. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index4.js +136 -81
  24. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index5.js +64 -101
  25. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index6.js +54 -81
  26. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index7.js +90 -65
  27. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js +108 -183
  28. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index9.js +76 -0
  29. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/BankAccountsWidget/BankAccountsWidget.js +1 -1
  30. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/labels.js +6 -8
  31. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/useBankAccountsWidget.js +137 -120
  32. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/mocks/labels.js +5 -5
  33. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/AccountCard.js +47 -60
  34. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +71 -72
  35. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankingHeader.js +22 -37
  36. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/CreateAccountDialog.js +119 -133
  37. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js +12 -8
  38. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/LinkedAccountsWidget.js +1 -1
  39. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/labels.js +9 -7
  40. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/rows.js +46 -27
  41. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useAdminEligibleUserIds.js +3 -2
  42. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useLinkedAccountsWidget.js +248 -224
  43. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/mocks/labels.js +5 -5
  44. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index.js +2 -2
  45. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index10.js +22 -36
  46. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index11.js +23 -70
  47. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index12.js +91 -27
  48. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index13.js +80 -63
  49. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index14.js +145 -125
  50. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index2.js +61 -9
  51. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index3.js +77 -50
  52. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index4.js +180 -65
  53. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index5.js +22 -178
  54. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index6.js +6 -75
  55. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index7.js +48 -11
  56. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index8.js +45 -7
  57. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index9.js +8 -82
  58. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  59. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +15 -14
  60. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/AddTile/AddTile.js +17 -0
  61. package/dist/packages/shared-ui-shadcn/dist/index.js +3603 -3518
  62. package/package.json +1 -1
  63. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index11.js +0 -1
  64. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index15.js +0 -67
  65. 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, Skeleton as t, Table as n, TableBody as r, TableCell as i, TableHead as a, TableHeader as o, TableRow as s } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { ErrorState as c } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
7
- import { PaginationFooter as l } from "../../../../shared/ui/dist/lib/PaginationFooter/PaginationFooter.js";
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 m = 3, h = 2;
13
- function g() {
14
- return /* @__PURE__ */ d(u, { children: Array.from({ length: m }).map((e, n) => /* @__PURE__ */ d(s, {
15
- className: "ttw:bg-card ttw:hover:bg-card",
16
- children: Array.from({ length: h }).map((e, n) => /* @__PURE__ */ d(i, {
17
- className: "ttw:px-4 ttw:py-3",
18
- children: /* @__PURE__ */ d(t, { className: "ttw:h-4 ttw:w-24" })
19
- }, n))
20
- }, n)) });
21
- }
22
- function _({ labels: t, rows: u, isLoading: m = !1, isError: h = !1, onRetry: _, isPaginationVisible: v = !1, pageSize: y = 10, pageSizeOptions: b = [
23
- 10,
24
- 25,
25
- 50
26
- ], rangeLabel: x = "", isPreviousPageDisabled: S = !1, isNextPageDisabled: C = !1, onPageSizeChange: w, onPreviousPageClick: T, onNextPageClick: E }) {
27
- if (h) return /* @__PURE__ */ d("div", {
28
- className: "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card",
29
- children: /* @__PURE__ */ d(c, {
30
- title: t.statementsErrorTitle,
31
- retryLabel: _ ? t.statementsErrorRetry : void 0,
32
- onRetry: _
33
- })
34
- });
35
- if (!m && u.length === 0) return /* @__PURE__ */ d("div", {
36
- className: "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
37
- children: /* @__PURE__ */ d("p", {
38
- className: "ttw:text-muted-foreground",
39
- children: t.noStatementsLabel
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
- let D = w && T && E ? {
43
- onPageSizeChange: w,
44
- onPreviousPageClick: T,
45
- onNextPageClick: E
46
- } : void 0;
47
- return /* @__PURE__ */ f("div", {
48
- className: "ttw:overflow-hidden ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card",
49
- children: [
50
- m && /* @__PURE__ */ d("span", {
51
- role: "status",
52
- className: "ttw:sr-only",
53
- children: t.statementsLoadingLabel
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 { _ as StatementsPanel };
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 { Button as e, Skeleton as t, Table as n, TableBody as r, TableCell as i, TableHead as a, TableHeader as o, TableRow as s } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { ErrorState as c } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
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 f({ labels: f, rows: p, showExport: m = !1, onExportClick: h, isError: g = !1, onRetry: _, isLoading: v = !1 }) {
12
- return g ? /* @__PURE__ */ l("div", {
13
- className: "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card",
14
- children: /* @__PURE__ */ l(c, {
15
- title: f.transactionsErrorTitle,
16
- retryLabel: _ ? f.transactionsErrorRetry : void 0,
17
- onRetry: _
18
- })
19
- }) : v ? /* @__PURE__ */ l("div", {
20
- className: "ttw:space-y-3 ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
21
- "aria-label": f.transactionsLoadingLabel,
22
- children: Array.from({ length: 3 }).map((e, n) => /* @__PURE__ */ l(t, { className: "ttw:h-5 ttw:w-full" }, n))
23
- }) : p.length === 0 ? /* @__PURE__ */ l("div", {
24
- className: "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
25
- children: /* @__PURE__ */ l("p", {
26
- className: "ttw:text-muted-foreground",
27
- children: f.noTransactionsLabel
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__ */ l(a, {
50
- className: "ttw:h-auto ttw:w-[15%] ttw:px-4 ttw:py-3 ttw:font-semibold",
51
- children: f.transactionDateColumn
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__ */ l(a, {
58
- className: "ttw:h-auto ttw:w-[12%] ttw:px-4 ttw:py-3 ttw:text-right ttw:font-semibold",
59
- children: f.transactionAmountColumn
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__ */ l(a, {
62
- className: "ttw:h-auto ttw:w-[13%] ttw:px-4 ttw:py-3 ttw:text-right ttw:font-semibold",
63
- children: f.transactionBalanceColumn
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
- }), /* @__PURE__ */ l(r, {
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 { f as TransactionsTable };
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 e = {
3
- backToAccounts: "Back to Accounts",
4
- bankingTaglinePrefix: "Business banking provided by",
5
- availableBalanceLabel: "Available balance",
6
- availableBalanceTooltip: "Available balance is the amount of money you can currently spend, withdraw, or transfer.",
7
- transactionsTab: "Transactions",
8
- statementsTab: "Statements",
9
- detailsTab: "Details",
10
- noTransactionsLabel: "No transactions found",
11
- transactionsErrorTitle: "Unable to load transactions.",
12
- transactionsErrorRetry: "Retry",
13
- transactionsLoadingLabel: "Loading transactions",
14
- transactionDateColumn: "Date",
15
- transactionDescriptionColumn: "Description",
16
- transactionAmountColumn: "Amount",
17
- transactionBalanceColumn: "Balance",
18
- exportButton: "Export",
19
- exportDialogTitle: "Export",
20
- exportDialogDescription: "Includes date, description and amount - ready to import into QuickBooks or other ERP software.",
21
- exportDialogCloseAriaLabel: "Close",
22
- exportStartDateLabel: "Start date",
23
- exportEndDateLabel: "End date",
24
- exportStartDatePlaceholder: "Pick a date",
25
- exportEndDatePlaceholder: "Pick a date",
26
- exportCancelButton: "Cancel",
27
- exportDownloadButton: "Download file",
28
- noStatementsLabel: "No statements available",
29
- statementColumn: "Statement",
30
- statementsActionsColumn: "Actions",
31
- viewStatementButton: "View",
32
- viewStatementButtonAriaLabel: "Open {date} statement",
33
- statementsRowsPerPageLabel: "Rows per page",
34
- statementsPreviousPageButton: "Previous page",
35
- statementsNextPageButton: "Next page",
36
- statementsLoadingLabel: "Loading statements",
37
- statementsErrorTitle: "No statements available",
38
- statementsErrorRetry: "Retry",
39
- editAccountMenuItem: "Edit account nickname",
40
- editDialogTitle: "Edit account settings",
41
- editNicknameLabel: "Account nickname",
42
- editDialogCloseAriaLabel: "Close",
43
- editCancelButton: "Cancel",
44
- editSaveButton: "Save account",
45
- editErrorTitle: "Unable to update account.",
46
- detailsSectionTitle: "Account Details",
47
- receiveMoneySectionTitle: "Receive Money",
48
- domesticWireTitle: "Domestic Wire",
49
- domesticWireIntro: "To receive an incoming domestic wire transfer to your {bankName} account, please provide the following information to the individual or business that is sending the wire:",
50
- domesticWireNote: "Note: To ensure the payment arrives successfully, it is very important the payments are made to either the business name, beneficial owner(s), or any doing business as (DBA) as it appears in {bankName}.",
51
- wireDetailsSectionTitle: "Account details",
52
- bankNameLabel: "Bank name (if required)",
53
- bankAddressLabel: "Bank address (if required)",
54
- thingsToKnowHeading: "Things to know:",
55
- thingsToKnowBody: "You will not be charged to receive wires with {bankName}.",
56
- supportQuestionsPrefix: "Questions? Get in touch with our",
57
- supportTeamLink: "Support Team",
58
- routingNumberLabel: "Routing number",
59
- accountNumberLabel: "Account number",
60
- copyLabel: "Copy",
61
- copiedLabel: "Copied",
62
- toggleAccountNumberVisibility: "Toggle account number visibility",
63
- loadingLabel: "Loading account details",
64
- errorTitle: "Unable to load account details."
65
- };
66
- export { e as DEFAULT_LABELS };
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 };