@tesouro/embedded-components-react 0.5.17 → 0.5.19
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 +22 -21
- package/dist/index.css +18 -0
- package/dist/index.d.ts +29 -6
- package/dist/lib/CardDetailsWidget.d.ts +20 -2
- package/dist/lib/CreditCardsWidget.d.ts +29 -6
- package/dist/lib/DebitCardsWidget.d.ts +29 -6
- package/dist/lib/WidgetSuite.d.ts +29 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +8 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +34 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +85 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +186 -179
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +152 -149
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index3.js +8 -11
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index7.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index9.js +81 -79
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js +39 -38
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/AddressLine.js +23 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js +142 -118
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardFace.js +24 -14
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/labels.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/PerTransactionMaximumControl.js +17 -16
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/SpendLimitControl.js +25 -24
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/limitDecimalPlaces.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/SetupView.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +4 -1
- 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/feature/dist/lib/card/cardPresentation.js +1 -1
- package/package.json +1 -1
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import { InputGroup as e, InputGroupAddon as t, InputGroupInput as n } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { formatAmountAriaLabel as r } from "./labels.js";
|
|
3
3
|
import { CardControlRow as i } from "./CardControlRow.js";
|
|
4
|
-
import {
|
|
4
|
+
import { limitDecimalPlaces as a } from "./limitDecimalPlaces.js";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
6
|
//#region ../../libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/PerTransactionMaximumControl.js
|
|
6
|
-
function
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
title:
|
|
9
|
-
description:
|
|
10
|
-
checked:
|
|
11
|
-
onCheckedChange:
|
|
12
|
-
children: /* @__PURE__ */
|
|
7
|
+
function c({ labels: c, currencySymbol: l, isEnabled: u, onEnabledChange: d, amount: f, onAmountChange: p }) {
|
|
8
|
+
return /* @__PURE__ */ o(i, {
|
|
9
|
+
title: c.title,
|
|
10
|
+
description: c.description,
|
|
11
|
+
checked: u,
|
|
12
|
+
onCheckedChange: d,
|
|
13
|
+
children: /* @__PURE__ */ s(e, {
|
|
13
14
|
className: "ttw:h-9 ttw:max-w-48 ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:has-[:focus-visible]:border-ring ttw:has-[:focus-visible]:ring-[3px] ttw:has-[:focus-visible]:ring-ring/50",
|
|
14
|
-
children: [/* @__PURE__ */
|
|
15
|
+
children: [/* @__PURE__ */ o(t, {
|
|
15
16
|
align: "inline-start",
|
|
16
17
|
"aria-hidden": !0,
|
|
17
|
-
children:
|
|
18
|
-
}), /* @__PURE__ */
|
|
18
|
+
children: l
|
|
19
|
+
}), /* @__PURE__ */ o(n, {
|
|
19
20
|
"data-has-start-addon": !0,
|
|
20
21
|
inputMode: "decimal",
|
|
21
|
-
value:
|
|
22
|
-
onChange: (e) =>
|
|
23
|
-
placeholder:
|
|
24
|
-
"aria-label": r(
|
|
22
|
+
value: f,
|
|
23
|
+
onChange: (e) => p(a(e.target.value)),
|
|
24
|
+
placeholder: c.amountPlaceholder,
|
|
25
|
+
"aria-label": r(c.amountAriaLabel, l),
|
|
25
26
|
className: "ttw:rounded-md ttw:border-0 ttw:shadow-none ttw:focus-visible:ring-0"
|
|
26
27
|
})]
|
|
27
28
|
})
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
31
|
//#endregion
|
|
31
|
-
export {
|
|
32
|
+
export { c as PerTransactionMaximumControl };
|
|
@@ -1,63 +1,64 @@
|
|
|
1
1
|
import { Alert as e, AlertDescription as t, InputGroup as n, InputGroupAddon as r, InputGroupInput as i, Tabs as a, TabsContent as o, TabsList as s, TabsTrigger as c } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { formatAmountAriaLabel as l } from "./labels.js";
|
|
3
3
|
import { CardControlRow as u } from "./CardControlRow.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { limitDecimalPlaces as d } from "./limitDecimalPlaces.js";
|
|
5
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
6
|
+
import { InfoIcon as m, TriangleAlertIcon as h } from "lucide-react";
|
|
6
7
|
//#region ../../libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/SpendLimitControl.js
|
|
7
|
-
function
|
|
8
|
+
function g({ notice: n }) {
|
|
8
9
|
if (!n) return null;
|
|
9
10
|
let r = n.variant === "warning";
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ p(e, {
|
|
11
12
|
className: r ? "ttw:border-destructive/30 ttw:bg-destructive/5 ttw:text-destructive" : "ttw:border-border ttw:bg-muted ttw:text-foreground",
|
|
12
|
-
children: [/* @__PURE__ */
|
|
13
|
+
children: [/* @__PURE__ */ f(r ? h : m, { "aria-hidden": !0 }), /* @__PURE__ */ f(t, {
|
|
13
14
|
className: "ttw:text-current",
|
|
14
|
-
children: /* @__PURE__ */
|
|
15
|
+
children: /* @__PURE__ */ p("p", { children: [n.title ? /* @__PURE__ */ p("span", {
|
|
15
16
|
className: "ttw:font-semibold",
|
|
16
17
|
children: [n.title, " "]
|
|
17
18
|
}) : null, n.description] })
|
|
18
19
|
})]
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
function _({ labels: e, currencySymbol: t, isEnabled: m, onEnabledChange: h, amount: _, onAmountChange: v, periodOptions: y, selectedPeriod: b, onPeriodSelect: x, periodNotices: S }) {
|
|
23
|
+
return /* @__PURE__ */ f(u, {
|
|
23
24
|
title: e.title,
|
|
24
25
|
description: e.description,
|
|
25
|
-
checked:
|
|
26
|
-
onCheckedChange:
|
|
27
|
-
children: /* @__PURE__ */
|
|
28
|
-
value:
|
|
29
|
-
onValueChange:
|
|
30
|
-
children: [/* @__PURE__ */
|
|
26
|
+
checked: m,
|
|
27
|
+
onCheckedChange: h,
|
|
28
|
+
children: /* @__PURE__ */ p(a, {
|
|
29
|
+
value: b ?? "",
|
|
30
|
+
onValueChange: x,
|
|
31
|
+
children: [/* @__PURE__ */ p("div", {
|
|
31
32
|
className: "ttw:flex ttw:min-w-0 ttw:flex-wrap ttw:items-center ttw:gap-3",
|
|
32
|
-
children: [/* @__PURE__ */
|
|
33
|
+
children: [/* @__PURE__ */ p(n, {
|
|
33
34
|
className: "ttw:h-9 ttw:min-w-0 ttw:flex-1 ttw:basis-36 ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:has-[:focus-visible]:border-ring ttw:has-[:focus-visible]:ring-[3px] ttw:has-[:focus-visible]:ring-ring/50",
|
|
34
|
-
children: [/* @__PURE__ */
|
|
35
|
+
children: [/* @__PURE__ */ f(r, {
|
|
35
36
|
align: "inline-start",
|
|
36
37
|
"aria-hidden": !0,
|
|
37
38
|
children: t
|
|
38
|
-
}), /* @__PURE__ */
|
|
39
|
+
}), /* @__PURE__ */ f(i, {
|
|
39
40
|
"data-has-start-addon": !0,
|
|
40
41
|
inputMode: "decimal",
|
|
41
|
-
value:
|
|
42
|
-
onChange: (e) =>
|
|
42
|
+
value: _,
|
|
43
|
+
onChange: (e) => v(d(e.target.value)),
|
|
43
44
|
placeholder: e.amountPlaceholder,
|
|
44
45
|
"aria-label": l(e.amountAriaLabel, t),
|
|
45
46
|
className: "ttw:rounded-md ttw:border-0 ttw:shadow-none ttw:focus-visible:ring-0"
|
|
46
47
|
})]
|
|
47
|
-
}),
|
|
48
|
+
}), y.length > 0 ? /* @__PURE__ */ f(s, {
|
|
48
49
|
className: "ttw:max-w-full",
|
|
49
|
-
children:
|
|
50
|
+
children: y.map((e) => /* @__PURE__ */ f(c, {
|
|
50
51
|
value: e.value,
|
|
51
52
|
children: e.label
|
|
52
53
|
}, e.value))
|
|
53
54
|
}) : null]
|
|
54
|
-
}),
|
|
55
|
+
}), y.map((e) => /* @__PURE__ */ f(o, {
|
|
55
56
|
value: e.value,
|
|
56
57
|
className: "ttw:mt-4",
|
|
57
|
-
children: /* @__PURE__ */
|
|
58
|
+
children: /* @__PURE__ */ f(g, { notice: S?.find((t) => t.value === e.value) })
|
|
58
59
|
}, e.value))]
|
|
59
60
|
})
|
|
60
61
|
});
|
|
61
62
|
}
|
|
62
63
|
//#endregion
|
|
63
|
-
export {
|
|
64
|
+
export { _ as SpendLimitControl };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/limitDecimalPlaces.js
|
|
2
|
+
function e(e, t = 2) {
|
|
3
|
+
let n = e.indexOf(".");
|
|
4
|
+
return n === -1 ? e : e.slice(0, n + 1 + t);
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { e as limitDecimalPlaces };
|
|
@@ -131,7 +131,7 @@ function v({ cardArtSrc: v, labels: y, cardholderOptions: b, selectedCardholder:
|
|
|
131
131
|
})]
|
|
132
132
|
})]
|
|
133
133
|
}), R ? /* @__PURE__ */ g("div", {
|
|
134
|
-
className: "ttw:rounded-md ttw:border ttw:border-border ttw:bg-background ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-foreground",
|
|
134
|
+
className: "ttw:cursor-default ttw:rounded-md ttw:border ttw:border-border ttw:bg-background ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-foreground",
|
|
135
135
|
children: L
|
|
136
136
|
}) : null]
|
|
137
137
|
}), /* @__PURE__ */ _("div", {
|
|
@@ -130,7 +130,10 @@ function b(e) {
|
|
|
130
130
|
return t.find((e) => e.is_default_for_currency) ?? t[0];
|
|
131
131
|
}
|
|
132
132
|
function x(e, t = "USD", n) {
|
|
133
|
-
|
|
133
|
+
let r = n && (e ?? []).find((e) => e.id === n && R(e));
|
|
134
|
+
if (r) return r;
|
|
135
|
+
let i = (e ?? []).filter((e) => e.currency === t && !!e.account_holder_name && !!e.routing_number && !!e.account_number);
|
|
136
|
+
return i.find((e) => e.is_default_for_currency) ?? i[0];
|
|
134
137
|
}
|
|
135
138
|
function S(e, t = {}) {
|
|
136
139
|
let n = e.line2.trim();
|
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.5.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.5.19", n = "7326b6a7fb424fea2279f91a4e57f51df8ef0812", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|