@tesouro/embedded-components-react 0.11.188 → 0.11.190

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 (55) hide show
  1. package/README.md +12 -8
  2. package/dist/fixtures/index.d.ts +13 -46
  3. package/dist/index.css +3 -0
  4. package/dist/index.d.ts +18 -1
  5. package/dist/index.js +40 -39
  6. package/dist/lib/BankAccountsWidget.d.ts +2 -0
  7. package/dist/lib/BillPayWidget.d.ts +16 -1
  8. package/dist/lib/BillPayWidget.js +3 -1
  9. package/dist/lib/WidgetSuite.d.ts +2 -0
  10. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/feature/dist/lib/BalanceHistoryWidget/BalanceHistoryWidgetFeature.js +2 -2
  11. package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/lib/BalancesWidget/BalancesWidgetContext.js +2 -2
  12. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index2.js +17 -14
  13. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/formatters.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/labels.js +2 -0
  15. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/useBankAccountsWidget.js +9 -3
  16. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/AccountCard.js +76 -58
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +4 -4
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +8 -8
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +180 -180
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +62 -62
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +32 -32
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +7 -7
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +20 -20
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +5 -5
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +16 -16
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +7 -7
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index.js +3 -1
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index10.js +101 -58
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index11.js +19 -17
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +2 -0
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index15.js +169 -138
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +227 -204
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +208 -204
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index19.js +1 -0
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index21.js +10 -10
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index23.js +212 -212
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index9.js +9 -5
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +3 -1
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +43 -39
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +66 -64
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/index.js +1 -0
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index8.js +1 -1
  44. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +9 -9
  45. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +5 -5
  46. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +21 -21
  47. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +20 -20
  48. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +17 -17
  49. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +4 -4
  50. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  51. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/TransfersWidgetInner.js +77 -77
  52. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/transferViews.js +2 -2
  53. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/useTransferMoneyModalController.js +129 -122
  54. package/dist/packages/shared-ui-shadcn/dist/index.js +1 -1
  55. package/package.json +1 -1
@@ -2,84 +2,102 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Skeleton as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { formatOpenAccountAriaLabel as t } from "./labels.js";
7
- import { MaskedAccountNumber as n } from "../../../../shared/ui/dist/lib/MaskedAccountNumber/MaskedAccountNumber.js";
5
+ import { Badge as e, Skeleton as t, Tooltip as n, TooltipContent as r, TooltipTrigger as i, cn as a } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { formatOpenAccountAriaLabel as o } from "./labels.js";
7
+ import { MaskedAccountNumber as s } from "../../../../shared/ui/dist/lib/MaskedAccountNumber/MaskedAccountNumber.js";
8
8
  import "../../../../shared/ui/dist/index.js";
9
- import { IconActionButton as r } from "../../../account-details/ui/dist/index2.js";
9
+ import { IconActionButton as c } from "../../../account-details/ui/dist/index2.js";
10
10
  import "../../../account-details/ui/dist/index.js";
11
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
12
- import { CheckIcon as o, CopyIcon as s, EyeIcon as c, EyeOffIcon as l } from "lucide-react";
11
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
12
+ import { CheckIcon as d, CopyIcon as f, EyeIcon as p, EyeOffIcon as m } from "lucide-react";
13
13
  // ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/AccountCard.js
14
- var u = "ttw:absolute ttw:inset-0 ttw:z-0 ttw:cursor-pointer ttw:rounded-lg ttw:outline-none ttw:focus-visible:outline-solid ttw:focus-visible:outline-2 ttw:focus-visible:outline-offset-2 ttw:focus-visible:outline-ring", d = "ttw:pointer-events-auto ttw:relative ttw:z-10";
15
- function f({ labels: e, card: f, testId: p }) {
16
- let m = f.isAccountNumberCopied ? e.copiedLabel : e.copyAccountNumber, h = f.isRoutingNumberCopied ? e.copiedLabel : e.copyRoutingNumber;
17
- return /* @__PURE__ */ a("article", {
18
- "data-testid": p,
19
- className: "ttw:relative ttw:flex ttw:w-80 ttw:max-w-full ttw:cursor-pointer ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4 ttw:transition-colors ttw:duration-150 ttw:hover:bg-muted",
20
- children: [/* @__PURE__ */ i("button", {
21
- type: "button",
22
- className: u,
23
- "aria-label": t(f.name, e),
24
- onClick: f.onSelect
25
- }), /* @__PURE__ */ a("div", {
14
+ var h = "ttw:absolute ttw:inset-0 ttw:z-0 ttw:cursor-pointer ttw:disabled:cursor-default ttw:rounded-lg ttw:outline-none ttw:focus-visible:outline-solid ttw:focus-visible:outline-2 ttw:focus-visible:outline-offset-2 ttw:focus-visible:outline-ring", g = "ttw:pointer-events-auto ttw:relative ttw:z-10";
15
+ function _({ labels: t, card: _, testId: v }) {
16
+ let y = _.isAccountNumberCopied ? t.copiedLabel : t.copyAccountNumber, b = _.isRoutingNumberCopied ? t.copiedLabel : t.copyRoutingNumber, x = /* @__PURE__ */ l("button", {
17
+ type: "button",
18
+ className: h,
19
+ "aria-label": o(_.name, t),
20
+ onClick: _.onSelect,
21
+ disabled: _.isSelectionDisabled
22
+ });
23
+ return /* @__PURE__ */ u("article", {
24
+ "data-testid": v,
25
+ className: a("ttw:relative ttw:flex ttw:w-80 ttw:max-w-full ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4", !_.isSelectionDisabled && "ttw:cursor-pointer ttw:transition-colors ttw:duration-150 ttw:hover:bg-muted"),
26
+ children: [_.isSelectionDisabled ? /* @__PURE__ */ u(n, { children: [/* @__PURE__ */ l(i, {
27
+ asChild: !0,
28
+ children: /* @__PURE__ */ l("span", {
29
+ className: "ttw:absolute ttw:inset-0",
30
+ children: x
31
+ })
32
+ }), /* @__PURE__ */ l(r, { children: _.statusLabel ?? _.accountNumberLabel })] }) : x, /* @__PURE__ */ u("div", {
26
33
  className: "ttw:pointer-events-none ttw:relative ttw:z-10 ttw:flex ttw:min-h-0 ttw:flex-1 ttw:flex-col ttw:gap-3",
27
34
  children: [
28
- /* @__PURE__ */ a("div", {
35
+ /* @__PURE__ */ u("div", {
29
36
  className: "ttw:space-y-1",
30
- children: [/* @__PURE__ */ i("p", {
31
- className: "ttw:truncate ttw:text-sm ttw:font-semibold ttw:text-foreground",
32
- children: f.name
33
- }), /* @__PURE__ */ i("p", {
34
- className: "ttw:truncate ttw:text-xl ttw:font-semibold ttw:tabular-nums ttw:text-foreground",
35
- children: f.balanceLabel
36
- })]
37
+ children: [
38
+ /* @__PURE__ */ l("p", {
39
+ className: "ttw:truncate ttw:text-sm ttw:font-semibold ttw:text-foreground",
40
+ children: _.name
41
+ }),
42
+ _.statusLabel && /* @__PURE__ */ l(e, {
43
+ tone: _.statusTone ?? "neutral",
44
+ children: _.statusLabel
45
+ }),
46
+ /* @__PURE__ */ l("p", {
47
+ className: "ttw:truncate ttw:text-xl ttw:font-semibold ttw:tabular-nums ttw:text-foreground",
48
+ children: _.balanceLabel
49
+ })
50
+ ]
37
51
  }),
38
- /* @__PURE__ */ a("div", {
52
+ /* @__PURE__ */ u("div", {
39
53
  className: "ttw:space-y-1",
40
- children: [/* @__PURE__ */ i("p", {
54
+ children: [/* @__PURE__ */ l("p", {
41
55
  className: "ttw:text-xs ttw:text-muted-foreground",
42
- children: e.accountNumberLabel
43
- }), /* @__PURE__ */ a("div", {
56
+ children: t.accountNumberLabel
57
+ }), /* @__PURE__ */ u("div", {
44
58
  className: "ttw:flex ttw:items-center ttw:gap-1",
45
59
  children: [
46
- /* @__PURE__ */ i("span", {
60
+ /* @__PURE__ */ l("span", {
47
61
  className: "ttw:text-sm ttw:tabular-nums",
48
- children: f.isAccountNumberVisible ? f.accountNumberLabel : /* @__PURE__ */ i(n, {
49
- last4: f.accountNumberLast4,
50
- labels: { endingIn: e.accountNumberEndingIn }
62
+ children: _.isAccountNumberUnavailable || _.isAccountNumberVisible ? _.accountNumberLabel : /* @__PURE__ */ l(s, {
63
+ last4: _.accountNumberLast4,
64
+ labels: { endingIn: t.accountNumberEndingIn }
51
65
  })
52
66
  }),
53
- /* @__PURE__ */ i(r, {
54
- label: f.isAccountNumberVisible ? e.hideAccountNumber : e.showAccountNumber,
55
- className: d,
56
- onClick: f.onToggleAccountNumberVisibility,
57
- children: f.isAccountNumberVisible ? /* @__PURE__ */ i(l, {}) : /* @__PURE__ */ i(c, {})
67
+ /* @__PURE__ */ l(c, {
68
+ label: _.isAccountNumberVisible ? t.hideAccountNumber : t.showAccountNumber,
69
+ className: g,
70
+ onClick: _.onToggleAccountNumberVisibility,
71
+ disabled: _.isAccountNumberUnavailable,
72
+ disabledDescription: _.accountNumberLabel,
73
+ children: _.isAccountNumberVisible ? /* @__PURE__ */ l(m, {}) : /* @__PURE__ */ l(p, {})
58
74
  }),
59
- /* @__PURE__ */ i(r, {
60
- label: m,
61
- className: d,
62
- onClick: f.onCopyAccountNumber,
63
- children: f.isAccountNumberCopied ? /* @__PURE__ */ i(o, {}) : /* @__PURE__ */ i(s, {})
75
+ /* @__PURE__ */ l(c, {
76
+ label: y,
77
+ className: g,
78
+ onClick: _.onCopyAccountNumber,
79
+ disabled: _.isAccountNumberUnavailable,
80
+ disabledDescription: _.accountNumberLabel,
81
+ children: _.isAccountNumberCopied ? /* @__PURE__ */ l(d, {}) : /* @__PURE__ */ l(f, {})
64
82
  })
65
83
  ]
66
84
  })]
67
85
  }),
68
- /* @__PURE__ */ a("div", {
86
+ /* @__PURE__ */ u("div", {
69
87
  className: "ttw:space-y-1",
70
- children: [/* @__PURE__ */ i("p", {
88
+ children: [/* @__PURE__ */ l("p", {
71
89
  className: "ttw:text-xs ttw:text-muted-foreground",
72
- children: e.routingNumberLabel
73
- }), /* @__PURE__ */ a("div", {
90
+ children: t.routingNumberLabel
91
+ }), /* @__PURE__ */ u("div", {
74
92
  className: "ttw:flex ttw:items-center ttw:gap-1",
75
- children: [/* @__PURE__ */ i("span", {
93
+ children: [/* @__PURE__ */ l("span", {
76
94
  className: "ttw:text-sm ttw:tabular-nums",
77
- children: f.routingNumberLabel
78
- }), /* @__PURE__ */ i(r, {
79
- label: h,
80
- className: d,
81
- onClick: f.onCopyRoutingNumber,
82
- children: f.isRoutingNumberCopied ? /* @__PURE__ */ i(o, {}) : /* @__PURE__ */ i(s, {})
95
+ children: _.routingNumberLabel
96
+ }), /* @__PURE__ */ l(c, {
97
+ label: b,
98
+ className: g,
99
+ onClick: _.onCopyRoutingNumber,
100
+ children: _.isRoutingNumberCopied ? /* @__PURE__ */ l(d, {}) : /* @__PURE__ */ l(f, {})
83
101
  })]
84
102
  })]
85
103
  })
@@ -87,7 +105,7 @@ function f({ labels: e, card: f, testId: p }) {
87
105
  })]
88
106
  });
89
107
  }
90
- function p() {
91
- return /* @__PURE__ */ i(e, { className: "ttw:h-52 ttw:w-80 ttw:max-w-full ttw:rounded-lg" });
108
+ function v() {
109
+ return /* @__PURE__ */ l(t, { className: "ttw:h-52 ttw:w-80 ttw:max-w-full ttw:rounded-lg" });
92
110
  }
93
- export { f as AccountCard, p as AccountCardSkeleton };
111
+ export { _ as AccountCard, v as AccountCardSkeleton };
@@ -6,8 +6,8 @@ import { resolveLineItemAmountMinorUnits as r } from "../../../util/dist/lib/res
6
6
  import { resolveLineItemQuantity as i } from "../../../util/dist/lib/resolveLineItemQuantity.js";
7
7
  import { resolveVendor as a, resolveVendorName as o } from "../../../util/dist/lib/resolveVendor.js";
8
8
  import "../../../util/dist/index.js";
9
- import { formatGlCodeLabel as s } from "./index16.js";
10
- import { derivePayableStatus as c } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
9
+ import { derivePayableStatus as s } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
10
+ import { formatGlCodeLabel as c } from "./index16.js";
11
11
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js
12
12
  function l(e) {
13
13
  return e.total_amount ?? e.amount_due ?? void 0;
@@ -16,7 +16,7 @@ function u(e) {
16
16
  return typeof e == "string" ? e : "";
17
17
  }
18
18
  function d({ payable: d, lineItems: p, ledgerAccounts: m, labels: h, hasScheduledPayment: g, now: _, today: v, rejection: y, achInstructions: b, achInstructionsReadable: x = !1 }) {
19
- let S = d.currency, C = (e) => t(e, S), w = c({
19
+ let S = d.currency, C = (e) => t(e, S), w = s({
20
20
  apiStatus: d.status,
21
21
  dueDate: d.due_date,
22
22
  scheduledPaymentDate: d.scheduled_payment_date,
@@ -55,7 +55,7 @@ function d({ payable: d, lineItems: p, ledgerAccounts: m, labels: h, hasSchedule
55
55
  label: h.poNumberRow,
56
56
  value: u(d.purchase_order_number) || h.notProvided
57
57
  }
58
- ], N = new Map(m.map((e) => [e.id, s(e)])), P = p.map((e) => {
58
+ ], N = new Map(m.map((e) => [e.id, c(e)])), P = p.map((e) => {
59
59
  let t = C(e.unit_price), n = String(i(e));
60
60
  return {
61
61
  id: e.id,
@@ -1,11 +1,11 @@
1
1
  import { AWAITING_APPROVAL_LABEL_EN as e, AWAITING_APPROVAL_UNKNOWN_LABEL_EN as t, BILL_DETAIL_ACTIONS_LABELS_EN as n, PAYMENT_HISTORY_LABELS_EN as r, SCHEDULED_RELATIVE_DAY_LABELS_EN as i, SCHEDULED_STATUS_BADGE_LABEL_EN as a, SCHEDULED_SUMMARY_LABEL_EN as o, mergeBillDetailActionsLabels as s, mergePaymentHistoryMethodLabels as c } from "../../../util/dist/lib/billDetailLabels.js";
2
2
  import { BILL_DUE_DATE_LABELS_EN as l } from "../../../util/dist/lib/resolveBillDueDate.js";
3
3
  import "../../../util/dist/index.js";
4
- import { APPROVAL_POLICY_RULE_COPY_EN as u } from "./index10.js";
5
- import { PAYABLE_AUDIT_HISTORY_LABELS_EN as d } from "./index30.js";
6
- import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as f } from "./index31.js";
7
- import { ACH_FIELD_GROUP_LABELS_EN as p } from "../../../../shared/counterpart-management/ui/dist/index2.js";
4
+ import { ACH_FIELD_GROUP_LABELS_EN as u } from "../../../../shared/counterpart-management/ui/dist/index2.js";
8
5
  import "../../../../shared/counterpart-management/ui/dist/index.js";
6
+ import { APPROVAL_POLICY_RULE_COPY_EN as d } from "./index10.js";
7
+ import { PAYABLE_AUDIT_HISTORY_LABELS_EN as f } from "./index30.js";
8
+ import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as p } from "./index31.js";
9
9
  import { BILL_REJECTED_BANNER_LABELS_EN as m } from "../../ui/dist/index39.js";
10
10
  import { DISCARD_CHANGES_DIALOG_LABELS_EN as h } from "../../ui/dist/index42.js";
11
11
  import { UNSAVED_BILL_DIALOG_LABELS_EN as g } from "../../ui/dist/index51.js";
@@ -51,7 +51,7 @@ var _ = {
51
51
  deleteFailed: "We could not remove that document. Try again.",
52
52
  noDocument: "No document attached to this bill.",
53
53
  pendingDeletionNotice: "This document will be removed when you save this bill.",
54
- preview: f
54
+ preview: p
55
55
  }, b = {
56
56
  ...r,
57
57
  notProvided: "Not provided",
@@ -90,8 +90,8 @@ var _ = {
90
90
  awaitingApprovalUnknownNotice: t,
91
91
  actions: n,
92
92
  detail: b,
93
- history: d,
94
- approvalPolicyCopy: u,
93
+ history: f,
94
+ approvalPolicyCopy: d,
95
95
  deleteDraft: {
96
96
  menuItem: "Delete draft",
97
97
  dialog: {
@@ -182,7 +182,7 @@ var C = {
182
182
  paymentInstructionsHeading: "Payment instructions",
183
183
  paymentInstructionsDescription: "How and where will the money be sent. This information is required to send a payment.",
184
184
  paymentInstructionsExtracted: "We read these from the bill. Check them before saving.",
185
- ach: p
185
+ ach: u
186
186
  };
187
187
  function w(e) {
188
188
  return {
@@ -8,10 +8,10 @@ import "../../../../shared/util/dist/index.js";
8
8
  import { AchFieldGroup as n } from "../../../../shared/counterpart-management/ui/dist/index5.js";
9
9
  import { CounterpartFormFields as r, countErrors as i, useFocusFirstInvalidField as a } from "../../../../shared/counterpart-management/ui/dist/index10.js";
10
10
  import "../../../../shared/counterpart-management/ui/dist/index.js";
11
+ import "../../../../shared/counterpart-management/feature/dist/index.js";
11
12
  import { VendorSearchCombobox as o } from "../../ui/dist/index24.js";
12
13
  import "../../ui/dist/index.js";
13
14
  import { mergeVendorInlineFormLabels as s } from "./index32.js";
14
- import "../../../../shared/counterpart-management/feature/dist/index.js";
15
15
  import { useMemo as c } from "react";
16
16
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
17
17
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js