@tesouro/embedded-components-react 0.4.5 → 0.4.8
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.d.ts +14 -8
- package/dist/lib/CreditCardsWidget.d.ts +4 -2
- package/dist/lib/DebitCardsWidget.d.ts +4 -2
- package/dist/lib/WidgetSuite.d.ts +14 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +72 -56
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +77 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +47 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +91 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +33 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +168 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +23 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +199 -203
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +198 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +105 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +47 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +27 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +198 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +30 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +240 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +19 -342
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +344 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +4 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +32 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +28 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +152 -131
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +84 -87
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/api-version.json.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +12 -10
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js
CHANGED
|
@@ -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
|
|
6
|
-
import { EmptyState as
|
|
7
|
-
import { ErrorState as
|
|
8
|
-
import { PaginationFooter as
|
|
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
|
|
11
|
-
import { CardsListRow as
|
|
12
|
-
import { useId as
|
|
13
|
-
import { Fragment as
|
|
14
|
-
import { CreditCardIcon as
|
|
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
|
|
16
|
+
var x = [
|
|
17
17
|
10,
|
|
18
18
|
25,
|
|
19
19
|
50
|
|
20
|
-
],
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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
|
|
28
|
-
let
|
|
29
|
-
onPageSizeChange:
|
|
30
|
-
onPreviousPageClick:
|
|
31
|
-
onNextPageClick:
|
|
32
|
-
} : void 0,
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
"aria-label":
|
|
35
|
-
"aria-busy":
|
|
36
|
-
"data-testid":
|
|
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__ */
|
|
39
|
-
className: "ttw:mb-5 ttw:flex ttw:
|
|
40
|
-
children:
|
|
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:
|
|
46
|
-
onClick:
|
|
47
|
-
children: [/* @__PURE__ */
|
|
42
|
+
disabled: S,
|
|
43
|
+
onClick: k,
|
|
44
|
+
children: [/* @__PURE__ */ _(b, {
|
|
48
45
|
"aria-hidden": !0,
|
|
49
46
|
className: "ttw:size-4"
|
|
50
|
-
}),
|
|
51
|
-
})
|
|
47
|
+
}), U.createCardButton]
|
|
48
|
+
})
|
|
52
49
|
}),
|
|
53
|
-
|
|
50
|
+
S && /* @__PURE__ */ _("span", {
|
|
54
51
|
role: "status",
|
|
55
52
|
className: "ttw:sr-only",
|
|
56
|
-
children:
|
|
53
|
+
children: U.loadingLabel
|
|
57
54
|
}),
|
|
58
|
-
|
|
55
|
+
T && D && /* @__PURE__ */ v("div", {
|
|
59
56
|
className: "ttw:mb-4 ttw:flex ttw:items-center ttw:gap-3",
|
|
60
|
-
children: [/* @__PURE__ */
|
|
61
|
-
checked:
|
|
62
|
-
disabled:
|
|
63
|
-
onCheckedChange:
|
|
64
|
-
"aria-labelledby":
|
|
65
|
-
}), /* @__PURE__ */
|
|
66
|
-
id:
|
|
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:
|
|
65
|
+
children: U.showMyCardsToggle
|
|
69
66
|
})]
|
|
70
67
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ v("div", {
|
|
72
69
|
className: "ttw:overflow-hidden ttw:rounded-md ttw:border ttw:border-border ttw:bg-card",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */ v(r, { children: [/* @__PURE__ */ _(s, { children: /* @__PURE__ */ v(c, {
|
|
74
71
|
className: "ttw:hover:bg-transparent",
|
|
75
|
-
children: [
|
|
72
|
+
children: [g.map((e) => /* @__PURE__ */ _(o, {
|
|
76
73
|
className: "ttw:text-sm",
|
|
77
|
-
children:
|
|
78
|
-
}, e)), /* @__PURE__ */
|
|
74
|
+
children: U.columnHeaders[e]
|
|
75
|
+
}, e)), /* @__PURE__ */ _(o, {
|
|
79
76
|
className: "ttw:w-[90px]",
|
|
80
|
-
children: /* @__PURE__ */
|
|
77
|
+
children: /* @__PURE__ */ _("span", {
|
|
81
78
|
className: "ttw:sr-only",
|
|
82
|
-
children:
|
|
79
|
+
children: U.rowActionsColumn
|
|
83
80
|
})
|
|
84
81
|
})]
|
|
85
|
-
}) }), /* @__PURE__ */
|
|
82
|
+
}) }), /* @__PURE__ */ _(i, { children: w ? /* @__PURE__ */ _(c, {
|
|
86
83
|
className: "ttw:hover:bg-transparent",
|
|
87
|
-
children: /* @__PURE__ */
|
|
88
|
-
colSpan:
|
|
84
|
+
children: /* @__PURE__ */ _(a, {
|
|
85
|
+
colSpan: K,
|
|
89
86
|
className: "ttw:p-0",
|
|
90
|
-
children: /* @__PURE__ */
|
|
91
|
-
title:
|
|
92
|
-
description:
|
|
93
|
-
retryLabel:
|
|
94
|
-
onRetry:
|
|
87
|
+
children: /* @__PURE__ */ _(u, {
|
|
88
|
+
title: U.errorTitle,
|
|
89
|
+
description: U.errorDescription,
|
|
90
|
+
retryLabel: U.retryButton,
|
|
91
|
+
onRetry: A
|
|
95
92
|
})
|
|
96
93
|
})
|
|
97
|
-
}) :
|
|
94
|
+
}) : S ? /* @__PURE__ */ _(C, { columnCount: K }) : t.length === 0 ? /* @__PURE__ */ _(c, {
|
|
98
95
|
className: "ttw:hover:bg-transparent",
|
|
99
|
-
children: /* @__PURE__ */
|
|
100
|
-
colSpan:
|
|
96
|
+
children: /* @__PURE__ */ _(a, {
|
|
97
|
+
colSpan: K,
|
|
101
98
|
className: "ttw:p-0",
|
|
102
|
-
children: /* @__PURE__ */
|
|
103
|
-
icon: /* @__PURE__ */
|
|
104
|
-
title:
|
|
105
|
-
description:
|
|
106
|
-
actionLabel:
|
|
107
|
-
actionIcon: /* @__PURE__ */
|
|
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:
|
|
108
|
+
onAction: W ? k : void 0
|
|
112
109
|
})
|
|
113
110
|
})
|
|
114
|
-
}) : t.map((e) => /* @__PURE__ */
|
|
115
|
-
testIds:
|
|
111
|
+
}) : t.map((e) => /* @__PURE__ */ _(p, {
|
|
112
|
+
testIds: V?.row,
|
|
116
113
|
row: e,
|
|
117
|
-
columns:
|
|
118
|
-
labels:
|
|
119
|
-
}, e.key)) })] }),
|
|
120
|
-
pageSize:
|
|
121
|
-
pageSizeOptions:
|
|
122
|
-
rangeLabel:
|
|
123
|
-
isPreviousDisabled:
|
|
124
|
-
isNextDisabled:
|
|
125
|
-
isDisabled:
|
|
126
|
-
onPageSizeChange:
|
|
127
|
-
onPreviousPageClick:
|
|
128
|
-
onNextPageClick:
|
|
129
|
-
labels:
|
|
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 {
|
|
133
|
+
export { w as CardsList, w as default };
|
package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js
CHANGED
|
@@ -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",
|
package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js
CHANGED
|
@@ -1829,6 +1829,7 @@ var ji = e.object({
|
|
|
1829
1829
|
quantity: e.number().gte(0).nullish(),
|
|
1830
1830
|
subtotal: e.int().nullish(),
|
|
1831
1831
|
tax: e.int().gte(0).lte(1e4).nullish(),
|
|
1832
|
+
tax_amount: e.int().nullish(),
|
|
1832
1833
|
total: e.int().nullish(),
|
|
1833
1834
|
unit: e.string().nullish(),
|
|
1834
1835
|
unit_price: e.int().nullish()
|
|
@@ -1847,7 +1848,10 @@ e.object({
|
|
|
1847
1848
|
ledger_account_id: e.uuid().nullish(),
|
|
1848
1849
|
name: e.string().nullish(),
|
|
1849
1850
|
quantity: e.number().gte(0).nullish(),
|
|
1851
|
+
subtotal: e.int().nullish(),
|
|
1850
1852
|
tax: e.int().gte(0).lte(1e4).nullish(),
|
|
1853
|
+
tax_amount: e.int().nullish(),
|
|
1854
|
+
total: e.int().nullish(),
|
|
1851
1855
|
unit: e.string().nullish(),
|
|
1852
1856
|
unit_price: e.int().nullish()
|
|
1853
1857
|
});
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -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.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.4.8", n = "7b3b2592adf2132ec8909b2dee8530e448fd1935", 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
|
-
|
|
33
|
-
|
|
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 {
|
|
10
|
-
import
|
|
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
|
|
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
|
|
15
|
-
let { grantedScopes:
|
|
16
|
-
return /* @__PURE__ */
|
|
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(
|
|
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
|
|
23
|
+
var l = {
|
|
22
24
|
anyOfScopes: [n.CreditCardReadOrg, n.DebitCardReadOrg],
|
|
23
|
-
Content:
|
|
25
|
+
Content: c
|
|
24
26
|
};
|
|
25
27
|
//#endregion
|
|
26
|
-
export {
|
|
28
|
+
export { c as CardsSection, l as cardsSection };
|