@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.
Files changed (33) hide show
  1. package/README.md +22 -21
  2. package/dist/index.css +18 -0
  3. package/dist/index.d.ts +29 -6
  4. package/dist/lib/CardDetailsWidget.d.ts +20 -2
  5. package/dist/lib/CreditCardsWidget.d.ts +29 -6
  6. package/dist/lib/DebitCardsWidget.d.ts +29 -6
  7. package/dist/lib/WidgetSuite.d.ts +29 -6
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +8 -14
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -0
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +34 -34
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +85 -80
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +186 -179
  14. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +152 -149
  15. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index3.js +8 -11
  16. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index4.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js +2 -0
  18. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index7.js +4 -4
  19. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index9.js +81 -79
  20. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js +39 -38
  21. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/AddressLine.js +23 -0
  22. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js +142 -118
  23. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardFace.js +24 -14
  24. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/labels.js +4 -1
  25. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +1 -0
  26. package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/PerTransactionMaximumControl.js +17 -16
  27. package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/SpendLimitControl.js +25 -24
  28. package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/limitDecimalPlaces.js +7 -0
  29. package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/SetupView.js +1 -1
  30. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +4 -1
  31. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  32. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/card/cardPresentation.js +1 -1
  33. 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 { jsx as a, jsxs as o } from "react/jsx-runtime";
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 s({ labels: s, currencySymbol: c, isEnabled: l, onEnabledChange: u, amount: d, onAmountChange: f }) {
7
- return /* @__PURE__ */ a(i, {
8
- title: s.title,
9
- description: s.description,
10
- checked: l,
11
- onCheckedChange: u,
12
- children: /* @__PURE__ */ o(e, {
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__ */ a(t, {
15
+ children: [/* @__PURE__ */ o(t, {
15
16
  align: "inline-start",
16
17
  "aria-hidden": !0,
17
- children: c
18
- }), /* @__PURE__ */ a(n, {
18
+ children: l
19
+ }), /* @__PURE__ */ o(n, {
19
20
  "data-has-start-addon": !0,
20
21
  inputMode: "decimal",
21
- value: d,
22
- onChange: (e) => f(e.target.value),
23
- placeholder: s.amountPlaceholder,
24
- "aria-label": r(s.amountAriaLabel, c),
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 { s as PerTransactionMaximumControl };
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 { jsx as d, jsxs as f } from "react/jsx-runtime";
5
- import { InfoIcon as p, TriangleAlertIcon as m } from "lucide-react";
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 h({ notice: n }) {
8
+ function g({ notice: n }) {
8
9
  if (!n) return null;
9
10
  let r = n.variant === "warning";
10
- return /* @__PURE__ */ f(e, {
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__ */ d(r ? m : p, { "aria-hidden": !0 }), /* @__PURE__ */ d(t, {
13
+ children: [/* @__PURE__ */ f(r ? h : m, { "aria-hidden": !0 }), /* @__PURE__ */ f(t, {
13
14
  className: "ttw:text-current",
14
- children: /* @__PURE__ */ f("p", { children: [n.title ? /* @__PURE__ */ f("span", {
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 g({ labels: e, currencySymbol: t, isEnabled: p, onEnabledChange: m, amount: g, onAmountChange: _, periodOptions: v, selectedPeriod: y, onPeriodSelect: b, periodNotices: x }) {
22
- return /* @__PURE__ */ d(u, {
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: p,
26
- onCheckedChange: m,
27
- children: /* @__PURE__ */ f(a, {
28
- value: y ?? "",
29
- onValueChange: b,
30
- children: [/* @__PURE__ */ f("div", {
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__ */ f(n, {
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__ */ d(r, {
35
+ children: [/* @__PURE__ */ f(r, {
35
36
  align: "inline-start",
36
37
  "aria-hidden": !0,
37
38
  children: t
38
- }), /* @__PURE__ */ d(i, {
39
+ }), /* @__PURE__ */ f(i, {
39
40
  "data-has-start-addon": !0,
40
41
  inputMode: "decimal",
41
- value: g,
42
- onChange: (e) => _(e.target.value),
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
- }), v.length > 0 ? /* @__PURE__ */ d(s, {
48
+ }), y.length > 0 ? /* @__PURE__ */ f(s, {
48
49
  className: "ttw:max-w-full",
49
- children: v.map((e) => /* @__PURE__ */ d(c, {
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
- }), v.map((e) => /* @__PURE__ */ d(o, {
55
+ }), y.map((e) => /* @__PURE__ */ f(o, {
55
56
  value: e.value,
56
57
  className: "ttw:mt-4",
57
- children: /* @__PURE__ */ d(h, { notice: x?.find((t) => t.value === e.value) })
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 { g as SpendLimitControl };
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
- return n && (e ?? []).find((e) => e.id === n && R(e)) || (e ?? []).find((e) => e.currency === t && e.is_default_for_currency && !!e.account_holder_name && !!e.routing_number && !!e.account_number);
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();
@@ -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.17", n = "20ab2841da415a30de1c053cd2e7946365966007", r = Object.freeze({
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
@@ -7,7 +7,7 @@ var e = {
7
7
  }, t = {
8
8
  PENDING_ACTIVATION: "Pending activation",
9
9
  ACTIVE: "Active",
10
- LOCKED: "Frozen",
10
+ LOCKED: "Locked",
11
11
  CLOSED: "Closed"
12
12
  }, n = {
13
13
  DIGITAL: "Virtual",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.5.17",
3
+ "version": "0.5.19",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {