@tesouro/embedded-components-react 0.4.5 → 0.4.6

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 (40) hide show
  1. package/README.md +37 -37
  2. package/dist/index.d.ts +14 -8
  3. package/dist/lib/CreditCardsWidget.d.ts +4 -2
  4. package/dist/lib/DebitCardsWidget.d.ts +4 -2
  5. package/dist/lib/WidgetSuite.d.ts +14 -8
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +4 -4
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +72 -56
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +77 -48
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +47 -91
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +91 -33
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +33 -167
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +168 -75
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +75 -21
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +23 -210
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +199 -203
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +198 -89
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +105 -13
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +12 -47
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +47 -31
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +27 -198
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +198 -30
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +30 -234
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +240 -19
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +19 -342
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +344 -4
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +4 -33
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +32 -83
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +24 -24
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +1 -1
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +2 -2
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +2 -0
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +28 -3
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -0
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +152 -131
  35. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +84 -87
  36. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js +0 -1
  37. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  38. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +2 -2
  39. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +12 -10
  40. package/package.json +1 -1
@@ -2,135 +2,132 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Button as e, Skeleton as t, Switch as n, Table as r, TableBody as i, TableCell as a, TableHead as o, TableHeader as s, TableRow as c, Typography as l } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { EmptyState as u } from "../../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
7
- import { ErrorState as d } from "../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
8
- import { PaginationFooter as f } from "../../../../../shared/ui/dist/lib/PaginationFooter/PaginationFooter.js";
5
+ import { Button as e, Skeleton as t, Switch as n, Table as r, TableBody as i, TableCell as a, TableHead as o, TableHeader as s, TableRow as c } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { EmptyState as l } from "../../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
7
+ import { ErrorState as u } from "../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
8
+ import { PaginationFooter as d } from "../../../../../shared/ui/dist/lib/PaginationFooter/PaginationFooter.js";
9
9
  import "../../../../../shared/ui/dist/index.js";
10
- import { resolveCardsListLabels as p } from "./labels.js";
11
- import { CardsListRow as m } from "./CardsListRow.js";
12
- import { useId as h, useMemo as g } from "react";
13
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
14
- import { CreditCardIcon as b, PlusIcon as x } from "lucide-react";
10
+ import { resolveCardsListLabels as f } from "./labels.js";
11
+ import { CardsListRow as p } from "./CardsListRow.js";
12
+ import { useId as m, useMemo as h } from "react";
13
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
14
+ import { CreditCardIcon as y, PlusIcon as b } from "lucide-react";
15
15
  //#region ../../libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js
16
- var S = [
16
+ var x = [
17
17
  10,
18
18
  25,
19
19
  50
20
- ], C = 5;
21
- function w({ columnCount: e }) {
22
- return /* @__PURE__ */ v(_, { children: Array.from({ length: C }).map((n, r) => /* @__PURE__ */ v(c, {
20
+ ], S = 5;
21
+ function C({ columnCount: e }) {
22
+ return /* @__PURE__ */ _(g, { children: Array.from({ length: S }).map((n, r) => /* @__PURE__ */ _(c, {
23
23
  className: "ttw:h-18",
24
- children: Array.from({ length: e }).map((e, n) => /* @__PURE__ */ v(a, { children: /* @__PURE__ */ v(t, { className: "ttw:h-4 ttw:w-24" }) }, n))
24
+ children: Array.from({ length: e }).map((e, n) => /* @__PURE__ */ _(a, { children: /* @__PURE__ */ _(t, { className: "ttw:h-4 ttw:w-24" }) }, n))
25
25
  }, r)) });
26
26
  }
27
- function T({ rows: t, columns: _, isLoading: C = !1, isError: T = !1, canToggleShowMyCards: E = !1, isShowingMyCards: D = !0, onShowMyCardsChange: O, canCreateCard: k = !1, onCreateCardClick: A, onRetry: j, isPaginationVisible: M = !1, pageSize: N = 10, pageSizeOptions: P = S, rangeLabel: F = "", isPreviousPageDisabled: I = !1, isNextPageDisabled: L = !1, onPageSizeChange: R, onPreviousPageClick: z, onNextPageClick: B, labels: V, testIds: H }) {
28
- let U = h(), W = g(() => p(V), [V]), G = !!(k && A), K = R && z && B ? {
29
- onPageSizeChange: R,
30
- onPreviousPageClick: z,
31
- onNextPageClick: B
32
- } : void 0, q = _.length + 1;
33
- return /* @__PURE__ */ y("section", {
34
- "aria-label": W.regionLabel,
35
- "aria-busy": C || void 0,
36
- "data-testid": H?.root,
27
+ function w({ rows: t, columns: g, isLoading: S = !1, isError: w = !1, canToggleShowMyCards: T = !1, isShowingMyCards: E = !0, onShowMyCardsChange: D, canCreateCard: O = !1, onCreateCardClick: k, onRetry: A, isPaginationVisible: j = !1, pageSize: M = 10, pageSizeOptions: N = x, rangeLabel: P = "", isPreviousPageDisabled: F = !1, isNextPageDisabled: I = !1, onPageSizeChange: L, onPreviousPageClick: R, onNextPageClick: z, labels: B, testIds: V }) {
28
+ let H = m(), U = h(() => f(B), [B]), W = !!(O && k), G = L && R && z ? {
29
+ onPageSizeChange: L,
30
+ onPreviousPageClick: R,
31
+ onNextPageClick: z
32
+ } : void 0, K = g.length + 1;
33
+ return /* @__PURE__ */ v("section", {
34
+ "aria-label": U.regionLabel,
35
+ "aria-busy": S || void 0,
36
+ "data-testid": V?.root,
37
37
  children: [
38
- /* @__PURE__ */ y("header", {
39
- className: "ttw:mb-5 ttw:flex ttw:flex-wrap ttw:items-start ttw:justify-between ttw:gap-4",
40
- children: [/* @__PURE__ */ v(l, {
41
- variant: "h2",
42
- children: W.title
43
- }), G && /* @__PURE__ */ y(e, {
38
+ W && /* @__PURE__ */ _("header", {
39
+ className: "ttw:mb-5 ttw:flex ttw:justify-end",
40
+ children: /* @__PURE__ */ v(e, {
44
41
  size: "sm",
45
- disabled: C,
46
- onClick: A,
47
- children: [/* @__PURE__ */ v(x, {
42
+ disabled: S,
43
+ onClick: k,
44
+ children: [/* @__PURE__ */ _(b, {
48
45
  "aria-hidden": !0,
49
46
  className: "ttw:size-4"
50
- }), W.createCardButton]
51
- })]
47
+ }), U.createCardButton]
48
+ })
52
49
  }),
53
- C && /* @__PURE__ */ v("span", {
50
+ S && /* @__PURE__ */ _("span", {
54
51
  role: "status",
55
52
  className: "ttw:sr-only",
56
- children: W.loadingLabel
53
+ children: U.loadingLabel
57
54
  }),
58
- E && O && /* @__PURE__ */ y("div", {
55
+ T && D && /* @__PURE__ */ v("div", {
59
56
  className: "ttw:mb-4 ttw:flex ttw:items-center ttw:gap-3",
60
- children: [/* @__PURE__ */ v(n, {
61
- checked: D,
62
- disabled: C,
63
- onCheckedChange: O,
64
- "aria-labelledby": U
65
- }), /* @__PURE__ */ v("span", {
66
- id: U,
57
+ children: [/* @__PURE__ */ _(n, {
58
+ checked: E,
59
+ disabled: S,
60
+ onCheckedChange: D,
61
+ "aria-labelledby": H
62
+ }), /* @__PURE__ */ _("span", {
63
+ id: H,
67
64
  className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
68
- children: W.showMyCardsToggle
65
+ children: U.showMyCardsToggle
69
66
  })]
70
67
  }),
71
- /* @__PURE__ */ y("div", {
68
+ /* @__PURE__ */ v("div", {
72
69
  className: "ttw:overflow-hidden ttw:rounded-md ttw:border ttw:border-border ttw:bg-card",
73
- children: [/* @__PURE__ */ y(r, { children: [/* @__PURE__ */ v(s, { children: /* @__PURE__ */ y(c, {
70
+ children: [/* @__PURE__ */ v(r, { children: [/* @__PURE__ */ _(s, { children: /* @__PURE__ */ v(c, {
74
71
  className: "ttw:hover:bg-transparent",
75
- children: [_.map((e) => /* @__PURE__ */ v(o, {
72
+ children: [g.map((e) => /* @__PURE__ */ _(o, {
76
73
  className: "ttw:text-sm",
77
- children: W.columnHeaders[e]
78
- }, e)), /* @__PURE__ */ v(o, {
74
+ children: U.columnHeaders[e]
75
+ }, e)), /* @__PURE__ */ _(o, {
79
76
  className: "ttw:w-[90px]",
80
- children: /* @__PURE__ */ v("span", {
77
+ children: /* @__PURE__ */ _("span", {
81
78
  className: "ttw:sr-only",
82
- children: W.rowActionsColumn
79
+ children: U.rowActionsColumn
83
80
  })
84
81
  })]
85
- }) }), /* @__PURE__ */ v(i, { children: T ? /* @__PURE__ */ v(c, {
82
+ }) }), /* @__PURE__ */ _(i, { children: w ? /* @__PURE__ */ _(c, {
86
83
  className: "ttw:hover:bg-transparent",
87
- children: /* @__PURE__ */ v(a, {
88
- colSpan: q,
84
+ children: /* @__PURE__ */ _(a, {
85
+ colSpan: K,
89
86
  className: "ttw:p-0",
90
- children: /* @__PURE__ */ v(d, {
91
- title: W.errorTitle,
92
- description: W.errorDescription,
93
- retryLabel: W.retryButton,
94
- onRetry: j
87
+ children: /* @__PURE__ */ _(u, {
88
+ title: U.errorTitle,
89
+ description: U.errorDescription,
90
+ retryLabel: U.retryButton,
91
+ onRetry: A
95
92
  })
96
93
  })
97
- }) : C ? /* @__PURE__ */ v(w, { columnCount: q }) : t.length === 0 ? /* @__PURE__ */ v(c, {
94
+ }) : S ? /* @__PURE__ */ _(C, { columnCount: K }) : t.length === 0 ? /* @__PURE__ */ _(c, {
98
95
  className: "ttw:hover:bg-transparent",
99
- children: /* @__PURE__ */ v(a, {
100
- colSpan: q,
96
+ children: /* @__PURE__ */ _(a, {
97
+ colSpan: K,
101
98
  className: "ttw:p-0",
102
- children: /* @__PURE__ */ v(u, {
103
- icon: /* @__PURE__ */ v(b, { className: "ttw:size-6 ttw:text-muted-foreground" }),
104
- title: W.emptyTitle,
105
- description: W.emptyDescription,
106
- actionLabel: G ? W.createCardButton : void 0,
107
- actionIcon: /* @__PURE__ */ v(x, {
99
+ children: /* @__PURE__ */ _(l, {
100
+ icon: /* @__PURE__ */ _(y, { className: "ttw:size-6 ttw:text-muted-foreground" }),
101
+ title: U.emptyTitle,
102
+ description: U.emptyDescription,
103
+ actionLabel: W ? U.createCardButton : void 0,
104
+ actionIcon: /* @__PURE__ */ _(b, {
108
105
  "aria-hidden": !0,
109
106
  className: "ttw:size-4"
110
107
  }),
111
- onAction: G ? A : void 0
108
+ onAction: W ? k : void 0
112
109
  })
113
110
  })
114
- }) : t.map((e) => /* @__PURE__ */ v(m, {
115
- testIds: H?.row,
111
+ }) : t.map((e) => /* @__PURE__ */ _(p, {
112
+ testIds: V?.row,
116
113
  row: e,
117
- columns: _,
118
- labels: W
119
- }, e.key)) })] }), M && K && /* @__PURE__ */ v(f, {
120
- pageSize: N,
121
- pageSizeOptions: P,
122
- rangeLabel: F,
123
- isPreviousDisabled: I,
124
- isNextDisabled: L,
125
- isDisabled: C,
126
- onPageSizeChange: K.onPageSizeChange,
127
- onPreviousPageClick: K.onPreviousPageClick,
128
- onNextPageClick: K.onNextPageClick,
129
- labels: W.pagination
114
+ columns: g,
115
+ labels: U
116
+ }, e.key)) })] }), j && G && /* @__PURE__ */ _(d, {
117
+ pageSize: M,
118
+ pageSizeOptions: N,
119
+ rangeLabel: P,
120
+ isPreviousDisabled: F,
121
+ isNextDisabled: I,
122
+ isDisabled: S,
123
+ onPageSizeChange: G.onPageSizeChange,
124
+ onPreviousPageClick: G.onPreviousPageClick,
125
+ onNextPageClick: G.onNextPageClick,
126
+ labels: U.pagination
130
127
  })]
131
128
  })
132
129
  ]
133
130
  });
134
131
  }
135
132
  //#endregion
136
- export { T as CardsList, T as default };
133
+ export { w as CardsList, w as default };
@@ -2,7 +2,6 @@ import { PAGINATION_FOOTER_LABELS_EN as e } from "../../../../../shared/ui/dist/
2
2
  import "../../../../../shared/ui/dist/index.js";
3
3
  //#region ../../libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js
4
4
  var t = {
5
- title: "Cards",
6
5
  regionLabel: "Cards",
7
6
  columnHeaders: {
8
7
  cardName: "Card name",
@@ -1,5 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.4.5", n = "8e167254e3d8cfa7777a923bbd458c5f8aea8ab0", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.4.6", n = "1b466c8e06929fd3447344fe3c85c6c7b11affd5", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -29,8 +29,8 @@ var t = {
29
29
  sections: {
30
30
  dashboard: {},
31
31
  cards: {
32
- creditCards: { labels: { title: "Credit cards" } },
33
- debitCards: { labels: { title: "Debit cards" } }
32
+ creditCardsTitle: "Credit cards",
33
+ debitCardsTitle: "Debit cards"
34
34
  },
35
35
  expenses: { expensesUnavailable: "Expenses are not available in this suite yet." }
36
36
  }
@@ -6,21 +6,23 @@ import { useWidgetSuiteProvider as e } from "./index6.js";
6
6
  import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
7
7
  import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
8
8
  import "../../../shared/data-access/dist/index.js";
9
- import { CreditCardsWidget as r } from "../../../cards-widget/feature/dist/index10.js";
10
- import { DebitCardsWidget as i } from "../../../cards-widget/feature/dist/index11.js";
9
+ import { SectionHeading as r } from "../../../shared/ui/dist/lib/SectionHeading/SectionHeading.js";
10
+ import "../../../shared/ui/dist/index.js";
11
+ import { CreditCardsWidget as i } from "../../../cards-widget/feature/dist/index10.js";
12
+ import { DebitCardsWidget as a } from "../../../cards-widget/feature/dist/index11.js";
11
13
  import "../../../cards-widget/feature/dist/index.js";
12
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
14
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
13
15
  //#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js
14
- function s() {
15
- let { grantedScopes: s, labels: c } = e();
16
- return /* @__PURE__ */ o("div", {
16
+ function c() {
17
+ let { grantedScopes: c, labels: l } = e(), u = l.sections.cards;
18
+ return /* @__PURE__ */ s("div", {
17
19
  className: "ttw:grid ttw:gap-8",
18
- children: [t(s, [n.CreditCardReadOrg]) && /* @__PURE__ */ a(r, { ...c.sections.cards.creditCards }), t(s, [n.DebitCardReadOrg]) && /* @__PURE__ */ a(i, { ...c.sections.cards.debitCards })]
20
+ children: [t(c, [n.CreditCardReadOrg]) && /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o(r, { children: u.creditCardsTitle }), /* @__PURE__ */ o(i, { ...u.creditCards })] }), t(c, [n.DebitCardReadOrg]) && /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o(r, { children: u.debitCardsTitle }), /* @__PURE__ */ o(a, { ...u.debitCards })] })]
19
21
  });
20
22
  }
21
- var c = {
23
+ var l = {
22
24
  anyOfScopes: [n.CreditCardReadOrg, n.DebitCardReadOrg],
23
- Content: s
25
+ Content: c
24
26
  };
25
27
  //#endregion
26
- export { s as CardsSection, c as cardsSection };
28
+ export { c as CardsSection, l as cardsSection };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {