@tesouro/embedded-components-react 0.11.170 → 0.11.172

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 (43) hide show
  1. package/dist/index.d.ts +6 -0
  2. package/dist/lib/ReceivablesWidget.d.ts +6 -0
  3. package/dist/lib/WidgetSuite.d.ts +6 -0
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +75 -66
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +62 -53
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +44 -38
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +331 -326
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +10 -8
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +190 -187
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +12 -19
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +25 -23
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +4 -7
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +23 -24
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +5 -5
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +196 -187
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +6 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index8.js +20 -17
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +11 -14
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +157 -161
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +4 -8
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +5 -27
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +32 -2
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -29
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/index.js +7 -6
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/resolveBillDueDate.js +22 -0
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +116 -98
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +99 -92
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +7 -1
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurringSeries.js +15 -24
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +59 -69
  33. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  34. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +7 -5
  35. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/DateDisclosure/DateDisclosure.js +28 -0
  36. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/DueDateText/DueDateText.js +19 -0
  37. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +28 -27
  38. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/dueDateDisplay.js +23 -0
  39. package/package.json +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -2
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -6
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +0 -33
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +0 -2
@@ -1,90 +1,76 @@
1
- import { Badge as e, Button as t, DataTable as n, Skeleton as r, Tooltip as i, TooltipContent as a, TooltipProvider as o, TooltipTrigger as s, cn as c } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { EmptyState as l } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
- import { ErrorState as u } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
1
+ import { Badge as e, Button as t, DataTable as n, Skeleton as r, cn as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { EmptyState as a } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
+ import { ErrorState as o } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
4
+ import { DueDateText as s } from "../../../shared/ui/dist/lib/DueDateText/DueDateText.js";
4
5
  import "../../../shared/ui/dist/index.js";
5
- import { ReceivableStatusBadge as d } from "../../../shared/document-status/ui/dist/index7.js";
6
+ import { ReceivableStatusBadge as c } from "../../../shared/document-status/ui/dist/index7.js";
6
7
  import "../../../shared/document-status/ui/dist/index.js";
7
- import { TabRowAction as f } from "./index8.js";
8
- import { RECEIVABLES_SCREEN_LABELS_EN as p } from "./index18.js";
9
- import { ReceivableStatusCards as m } from "./index59.js";
10
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
11
- import { ArrowDownIcon as _, ArrowUpDownIcon as v, ArrowUpIcon as y, LockKeyholeIcon as b } from "lucide-react";
8
+ import { TabRowAction as l } from "./index8.js";
9
+ import { RECEIVABLES_SCREEN_LABELS_EN as u } from "./index18.js";
10
+ import { ReceivableStatusCards as d } from "./index59.js";
11
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
12
+ import { ArrowDownIcon as m, ArrowUpDownIcon as h, ArrowUpIcon as g, LockKeyholeIcon as _ } from "lucide-react";
12
13
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js
13
- var x = [
14
+ var v = [
14
15
  10,
15
16
  25,
16
17
  50,
17
18
  100
18
19
  ];
19
- function S({ label: e, ariaLabel: n, column: r }) {
20
+ function y({ label: e, ariaLabel: n, column: r }) {
20
21
  let i = r.getIsSorted();
21
- return /* @__PURE__ */ g("div", {
22
+ return /* @__PURE__ */ p("div", {
22
23
  className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
23
- children: [e, /* @__PURE__ */ h(t, {
24
+ children: [e, /* @__PURE__ */ f(t, {
24
25
  variant: "ghost",
25
26
  size: "icon-sm",
26
27
  "aria-label": n,
27
28
  onClick: () => r.toggleSorting(i === "asc"),
28
- children: h(i === "asc" ? y : i === "desc" ? _ : v, { className: "ttw:size-4" })
29
+ children: f(i === "asc" ? g : i === "desc" ? m : h, { className: "ttw:size-4" })
29
30
  })]
30
31
  });
31
32
  }
32
- function C({ row: e }) {
33
- return e.dueDateOverdueLabel ? /* @__PURE__ */ h(o, { children: /* @__PURE__ */ g(i, { children: [/* @__PURE__ */ h(s, {
34
- asChild: !0,
35
- children: /* @__PURE__ */ g("span", {
36
- className: "ttw:text-destructive",
37
- children: [/* @__PURE__ */ h("span", {
38
- "aria-hidden": !0,
39
- children: e.dueDateOverdueLabel
40
- }), /* @__PURE__ */ h("span", {
41
- className: "ttw:sr-only",
42
- children: e.dueDateAccessibleLabel
43
- })]
44
- })
45
- }), /* @__PURE__ */ h(a, { children: e.dueDateLabel })] }) }) : e.dueDateLabel;
46
- }
47
- function w({ row: e, statusBadgeLabels: t }) {
48
- return /* @__PURE__ */ h(d, {
33
+ function b({ row: e, statusBadgeLabels: t }) {
34
+ return /* @__PURE__ */ f(c, {
49
35
  status: e.status,
50
36
  variant: "filled",
51
37
  labels: t
52
38
  });
53
39
  }
54
- function T({ row: t }) {
55
- if (t.customerState === "resolving") return /* @__PURE__ */ h(r, { className: "ttw:h-4 ttw:w-full" });
56
- let n = /* @__PURE__ */ h("span", {
57
- className: c("ttw:min-w-0", t.customerState === "missing" && "ttw:opacity-40"),
40
+ function x({ row: t }) {
41
+ if (t.customerState === "resolving") return /* @__PURE__ */ f(r, { className: "ttw:h-4 ttw:w-full" });
42
+ let n = /* @__PURE__ */ f("span", {
43
+ className: i("ttw:min-w-0", t.customerState === "missing" && "ttw:opacity-40"),
58
44
  children: t.customerLabel
59
45
  });
60
- return t.recurringBadgeLabel ? /* @__PURE__ */ g("span", {
46
+ return t.recurringBadgeLabel ? /* @__PURE__ */ p("span", {
61
47
  className: "ttw:flex ttw:items-center ttw:gap-2",
62
- children: [n, /* @__PURE__ */ h(e, {
48
+ children: [n, /* @__PURE__ */ f(e, {
63
49
  tone: "neutral",
64
50
  className: "ttw:shrink-0",
65
51
  children: t.recurringBadgeLabel
66
52
  })]
67
53
  }) : n;
68
54
  }
69
- function E({ rows: e, isLoading: t, isError: r, isAccessRestricted: i, sorting: a, onSortingChange: o, pageSize: s, onPageSizeChange: c, pageSizeOptions: d = x, pageInfo: _, hasNextPage: v, hasPrevPage: y, onNextPage: E, onPrevPage: D, statusCards: O, onStatusCardSelect: k, filterBar: A, isFiltering: j, onCreateClick: M, headerActionContainer: N, onRowClick: P, onRetry: F, labels: I }) {
55
+ function S({ rows: e, isLoading: t, isError: r, isAccessRestricted: i, sorting: c, onSortingChange: m, pageSize: h, onPageSizeChange: g, pageSizeOptions: S = v, pageInfo: C, hasNextPage: w, hasPrevPage: T, onNextPage: E, onPrevPage: D, statusCards: O, onStatusCardSelect: k, filterBar: A, isFiltering: j, onCreateClick: M, headerActionContainer: N, onRowClick: P, onRetry: F, labels: I }) {
70
56
  let L = {
71
- ...p,
57
+ ...u,
72
58
  ...I,
73
59
  statusBadge: {
74
- ...p.statusBadge,
60
+ ...u.statusBadge,
75
61
  ...I?.statusBadge
76
62
  }
77
63
  }, R = [
78
64
  {
79
65
  accessorKey: "customerLabel",
80
66
  header: L.columnCustomer,
81
- cell: ({ row: e }) => /* @__PURE__ */ h(T, { row: e.original }),
67
+ cell: ({ row: e }) => /* @__PURE__ */ f(x, { row: e.original }),
82
68
  minSize: 180
83
69
  },
84
70
  {
85
71
  accessorKey: "documentLabel",
86
72
  enableSorting: !0,
87
- header: ({ column: e }) => /* @__PURE__ */ h(S, {
73
+ header: ({ column: e }) => /* @__PURE__ */ f(y, {
88
74
  column: e,
89
75
  label: L.columnNumber,
90
76
  ariaLabel: L.sortByNumber
@@ -93,12 +79,12 @@ function E({ rows: e, isLoading: t, isError: r, isAccessRestricted: i, sorting:
93
79
  {
94
80
  accessorKey: "status",
95
81
  enableSorting: !0,
96
- header: ({ column: e }) => /* @__PURE__ */ h(S, {
82
+ header: ({ column: e }) => /* @__PURE__ */ f(y, {
97
83
  column: e,
98
84
  label: L.columnStatus,
99
85
  ariaLabel: L.sortByStatus
100
86
  }),
101
- cell: ({ row: e }) => /* @__PURE__ */ h(w, {
87
+ cell: ({ row: e }) => /* @__PURE__ */ f(b, {
102
88
  row: e.original,
103
89
  statusBadgeLabels: L.statusBadge
104
90
  })
@@ -106,7 +92,7 @@ function E({ rows: e, isLoading: t, isError: r, isAccessRestricted: i, sorting:
106
92
  {
107
93
  accessorKey: "issueDateLabel",
108
94
  enableSorting: !0,
109
- header: ({ column: e }) => /* @__PURE__ */ h(S, {
95
+ header: ({ column: e }) => /* @__PURE__ */ f(y, {
110
96
  column: e,
111
97
  label: L.columnIssueDate,
112
98
  ariaLabel: L.sortByIssueDate
@@ -115,50 +101,54 @@ function E({ rows: e, isLoading: t, isError: r, isAccessRestricted: i, sorting:
115
101
  {
116
102
  accessorKey: "dueDateLabel",
117
103
  enableSorting: !0,
118
- header: ({ column: e }) => /* @__PURE__ */ h(S, {
104
+ header: ({ column: e }) => /* @__PURE__ */ f(y, {
119
105
  column: e,
120
106
  label: L.columnDueDate,
121
107
  ariaLabel: L.sortByDueDate
122
108
  }),
123
- cell: ({ row: e }) => /* @__PURE__ */ h(C, { row: e.original })
109
+ cell: ({ row: e }) => /* @__PURE__ */ f(s, {
110
+ label: e.original.dueDateLabel,
111
+ overdueLabel: e.original.dueDateOverdueLabel,
112
+ accessibleLabel: e.original.dueDateAccessibleLabel
113
+ })
124
114
  },
125
115
  {
126
116
  accessorKey: "totalLabel",
127
117
  enableSorting: !0,
128
- header: ({ column: e }) => /* @__PURE__ */ h("div", {
118
+ header: ({ column: e }) => /* @__PURE__ */ f("div", {
129
119
  className: "ttw:flex ttw:justify-end",
130
- children: /* @__PURE__ */ h(S, {
120
+ children: /* @__PURE__ */ f(y, {
131
121
  column: e,
132
122
  label: L.columnAmount,
133
123
  ariaLabel: L.sortByAmount
134
124
  })
135
125
  }),
136
- cell: ({ row: e }) => /* @__PURE__ */ h("div", {
126
+ cell: ({ row: e }) => /* @__PURE__ */ f("div", {
137
127
  className: "ttw:text-right ttw:tabular-nums",
138
128
  children: e.original.totalLabel
139
129
  })
140
130
  },
141
131
  {
142
132
  accessorKey: "balanceDueLabel",
143
- header: () => /* @__PURE__ */ h("div", {
133
+ header: () => /* @__PURE__ */ f("div", {
144
134
  className: "ttw:text-right",
145
135
  children: L.columnBalanceDue
146
136
  }),
147
- cell: ({ row: e }) => /* @__PURE__ */ h("div", {
137
+ cell: ({ row: e }) => /* @__PURE__ */ f("div", {
148
138
  className: "ttw:text-right ttw:tabular-nums",
149
139
  children: e.original.balanceDueLabel
150
140
  })
151
141
  }
152
142
  ], z = !i && !r && !j && e.length === 0;
153
- return /* @__PURE__ */ g("div", {
143
+ return /* @__PURE__ */ p("div", {
154
144
  className: "ttw:flex ttw:flex-col ttw:gap-4",
155
145
  children: [
156
- M && !z && /* @__PURE__ */ h(f, {
146
+ M && !z && /* @__PURE__ */ f(l, {
157
147
  container: N,
158
148
  label: L.createInvoiceButton,
159
149
  onClick: M
160
150
  }),
161
- !i && O && k && /* @__PURE__ */ h(m, {
151
+ !i && O && k && /* @__PURE__ */ f(d, {
162
152
  view: O,
163
153
  onSelect: k,
164
154
  labels: {
@@ -166,33 +156,33 @@ function E({ rows: e, isLoading: t, isError: r, isAccessRestricted: i, sorting:
166
156
  loading: L.statusCardsLoading
167
157
  }
168
158
  }),
169
- i ? /* @__PURE__ */ h(u, {
170
- icon: /* @__PURE__ */ h(b, { className: "ttw:size-8 ttw:text-primary" }),
159
+ i ? /* @__PURE__ */ f(o, {
160
+ icon: /* @__PURE__ */ f(_, { className: "ttw:size-8 ttw:text-primary" }),
171
161
  title: L.accessRestrictedTitle,
172
162
  description: L.accessRestrictedDescription
173
- }) : /* @__PURE__ */ h(n, {
163
+ }) : /* @__PURE__ */ f(n, {
174
164
  columns: R,
175
165
  data: e,
176
166
  isLoading: t,
177
- sorting: a,
178
- onSortingChange: o,
179
- pageSize: s,
180
- onPageSizeChange: c,
181
- pageSizeOptions: d,
182
- pageInfo: _,
183
- hasNextPage: v,
184
- hasPrevPage: y,
167
+ sorting: c,
168
+ onSortingChange: m,
169
+ pageSize: h,
170
+ onPageSizeChange: g,
171
+ pageSizeOptions: S,
172
+ pageInfo: C,
173
+ hasNextPage: w,
174
+ hasPrevPage: T,
185
175
  onNextPage: E,
186
176
  onPrevPage: D,
187
177
  onRowClick: P,
188
178
  rowAriaLabel: (e) => L.openRow(e.documentLabel),
189
179
  filterComponent: A,
190
- children: r && !j ? /* @__PURE__ */ h(u, {
180
+ children: r && !j ? /* @__PURE__ */ f(o, {
191
181
  title: L.errorTitle,
192
182
  description: L.errorDescription,
193
183
  retryLabel: F ? L.errorRetry : void 0,
194
184
  onRetry: F
195
- }) : /* @__PURE__ */ h(l, {
185
+ }) : /* @__PURE__ */ f(a, {
196
186
  title: j ? L.filterEmptyTitle : L.emptyTitle,
197
187
  description: j ? void 0 : L.emptyDescription,
198
188
  actionLabel: j ? void 0 : L.createInvoiceButton,
@@ -202,4 +192,4 @@ function E({ rows: e, isLoading: t, isError: r, isAccessRestricted: i, sorting:
202
192
  ]
203
193
  });
204
194
  }
205
- export { E as ReceivablesScreen, E as default };
195
+ export { S as ReceivablesScreen, S as default };
@@ -1,5 +1,5 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.11.170", n = "075a74c980bed26321ce609b4d91631931fb7898", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.172", n = "e14614d9e4c665d81d7339708489cca1a49d98ff", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -30,8 +30,10 @@ import "./lib/OnboardingShell/OnboardingShellStepper.js";
30
30
  import "./lib/OnboardingShell/OnboardingShellOverlayPortal.js";
31
31
  import { OnboardingShell as E } from "./lib/OnboardingShell/OnboardingShell.js";
32
32
  import { SectionHeading as D } from "./lib/SectionHeading/SectionHeading.js";
33
- import { ConsentBlock as O, ConsentLink as k } from "./lib/ConsentBlock/ConsentBlock.js";
34
- import { FileDropZone as A } from "./lib/FileDropZone/FileDropZone.js";
35
- import { CopyAddress as j } from "./lib/CopyAddress/CopyAddress.js";
36
- import { UploadTray as M } from "./lib/UploadTray/UploadTray.js";
37
- export { m as AddTile, b as AmountInput, O as ConsentBlock, k as ConsentLink, j as CopyAddress, _ as ERROR_STATE_ID, t as EmbeddedToaster, g as EmptyState, v as ErrorState, A as FileDropZone, u as HostIsolationScope, C as InlineErrorAlert, d as Link, x as LoadingRegion, S as MaskedAccountNumber, y as NoAccessState, E as OnboardingShell, w as PAGINATION_FOOTER_LABELS_EN, T as PaginationFooter, D as SectionHeading, h as StatePanel, n as ToastNameMessage, r as UIFramework, a as UIProvider, M as UploadTray, p as WidgetContainer, f as WidgetFrame, o as registerDesignSystemEnsurer, s as registerUIRenderers, i as resolveUIFramework, e as toast, c as useDesignSystemEnsurer, l as useFrameworkRenderer };
33
+ import { DateDisclosure as O } from "./lib/DateDisclosure/DateDisclosure.js";
34
+ import { DueDateText as k } from "./lib/DueDateText/DueDateText.js";
35
+ import { ConsentBlock as A, ConsentLink as j } from "./lib/ConsentBlock/ConsentBlock.js";
36
+ import { FileDropZone as M } from "./lib/FileDropZone/FileDropZone.js";
37
+ import { CopyAddress as N } from "./lib/CopyAddress/CopyAddress.js";
38
+ import { UploadTray as P } from "./lib/UploadTray/UploadTray.js";
39
+ export { m as AddTile, b as AmountInput, A as ConsentBlock, j as ConsentLink, N as CopyAddress, O as DateDisclosure, k as DueDateText, _ as ERROR_STATE_ID, t as EmbeddedToaster, g as EmptyState, v as ErrorState, M as FileDropZone, u as HostIsolationScope, C as InlineErrorAlert, d as Link, x as LoadingRegion, S as MaskedAccountNumber, y as NoAccessState, E as OnboardingShell, w as PAGINATION_FOOTER_LABELS_EN, T as PaginationFooter, D as SectionHeading, h as StatePanel, n as ToastNameMessage, r as UIFramework, a as UIProvider, P as UploadTray, p as WidgetContainer, f as WidgetFrame, o as registerDesignSystemEnsurer, s as registerUIRenderers, i as resolveUIFramework, e as toast, c as useDesignSystemEnsurer, l as useFrameworkRenderer };
@@ -0,0 +1,28 @@
1
+ import { Popover as e, PopoverContent as t, PopoverTrigger as n } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { useState as r } from "react";
3
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
+ // ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/DateDisclosure/DateDisclosure.js
5
+ function o({ children: o, date: s }) {
6
+ let [c, l] = r(!1);
7
+ return /* @__PURE__ */ a(e, {
8
+ open: c,
9
+ onOpenChange: l,
10
+ children: [/* @__PURE__ */ i(n, {
11
+ type: "button",
12
+ className: "ttw:cursor-pointer ttw:outline-none ttw:focus-visible:outline-2 ttw:focus-visible:outline-offset-2 ttw:focus-visible:outline-ring",
13
+ onPointerEnter: (e) => {
14
+ e.pointerType === "mouse" && l(!0);
15
+ },
16
+ onPointerLeave: (e) => {
17
+ e.pointerType === "mouse" && l(!1);
18
+ },
19
+ onClick: (e) => e.stopPropagation(),
20
+ children: o
21
+ }), /* @__PURE__ */ i(t, {
22
+ onOpenAutoFocus: (e) => e.preventDefault(),
23
+ className: "ttw:w-auto ttw:px-3 ttw:py-1.5 ttw:text-xs",
24
+ children: s
25
+ })]
26
+ });
27
+ }
28
+ export { o as DateDisclosure };
@@ -0,0 +1,19 @@
1
+ import { DateDisclosure as e } from "../DateDisclosure/DateDisclosure.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ // ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/DueDateText/DueDateText.js
4
+ function r({ label: r, overdueLabel: i, accessibleLabel: a }) {
5
+ return i ? /* @__PURE__ */ t(e, {
6
+ date: r,
7
+ children: /* @__PURE__ */ n("span", {
8
+ className: "ttw:text-destructive",
9
+ children: [/* @__PURE__ */ t("span", {
10
+ "aria-hidden": !0,
11
+ children: i
12
+ }), /* @__PURE__ */ t("span", {
13
+ className: "ttw:sr-only",
14
+ children: a
15
+ })]
16
+ })
17
+ }) : r;
18
+ }
19
+ export { r as DueDateText };
@@ -2,34 +2,35 @@ import { coerceAmountValueToMinorUnits as e } from "./lib/coerceAmountValueToMin
2
2
  import { createCurrencyFormatter as t } from "./lib/createCurrencyFormatter.js";
3
3
  import { amountOutputToMajorUnits as n, minorExponentForCurrency as r } from "./lib/amountOutputToMajorUnits.js";
4
4
  import { DATE_DISPLAY_LOCALE as i, DATE_DISPLAY_OPTIONS as a } from "./lib/dateDisplay.js";
5
- import { formatCalendarDate as o } from "./lib/formatCalendarDate.js";
6
- import { formatTimestampDate as s } from "./lib/formatTimestampDate.js";
7
- import { formatRejectionDate as c } from "./lib/formatRejectionDate.js";
8
- import { formatAccountingAmount as l } from "./lib/formatAccountingAmount.js";
9
- import { currencySymbolForCode as u, formatMoneyExact as d } from "./lib/formatMoneyExact.js";
10
- import { formatPhoneDisplay as f } from "./lib/formatPhoneDisplay.js";
11
- import { getInitials as p } from "./lib/getInitials.js";
12
- import { isValidAchAccountNumber as m } from "./lib/isValidAchAccountNumber.js";
13
- import { mergeLabelTree as h } from "./lib/mergeLabelTree.js";
14
- import { normalizeAmountOutputCurrencyCode as g } from "./lib/normalizeAmountOutputCurrencyCode.js";
15
- import { parseAmountOutputMajorUnits as _ } from "./lib/parseAmountOutputMajorUnits.js";
16
- import { parseCalendarDate as v, parseDateOrTimestamp as y } from "./lib/parseCalendarDate.js";
17
- import { getRelativeCalendarDay as b } from "./lib/relativeCalendarDay.js";
18
- import { parseDecimalAmountToMinorUnits as x } from "./lib/parseDecimalAmountToMinorUnits.js";
19
- import { sumAmountOutputsMajorUnits as S } from "./lib/sumAmountOutputsMajorUnits.js";
20
- import { US_STATE_NAMES_EN as C, getStateOptions as w, isStateValid as T } from "./lib/usStates.js";
21
- import { createWidgetTokenManager as E } from "./lib/widgetTokenManager.js";
22
- import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as D, TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT as O, emitWidgetDomEvent as k } from "./lib/widgetDomEvents.js";
23
- import { extractApiErrorMessage as A } from "./lib/apiErrors.js";
24
- import { parseApiValidationErrors as j } from "./lib/apiValidationErrors.js";
5
+ import { parseCalendarDate as o, parseDateOrTimestamp as s } from "./lib/parseCalendarDate.js";
6
+ import { resolveDueDateDisplay as c } from "./lib/dueDateDisplay.js";
7
+ import { formatCalendarDate as l } from "./lib/formatCalendarDate.js";
8
+ import { formatTimestampDate as u } from "./lib/formatTimestampDate.js";
9
+ import { formatRejectionDate as d } from "./lib/formatRejectionDate.js";
10
+ import { formatAccountingAmount as f } from "./lib/formatAccountingAmount.js";
11
+ import { currencySymbolForCode as p, formatMoneyExact as m } from "./lib/formatMoneyExact.js";
12
+ import { formatPhoneDisplay as h } from "./lib/formatPhoneDisplay.js";
13
+ import { getInitials as g } from "./lib/getInitials.js";
14
+ import { isValidAchAccountNumber as _ } from "./lib/isValidAchAccountNumber.js";
15
+ import { mergeLabelTree as v } from "./lib/mergeLabelTree.js";
16
+ import { normalizeAmountOutputCurrencyCode as y } from "./lib/normalizeAmountOutputCurrencyCode.js";
17
+ import { parseAmountOutputMajorUnits as b } from "./lib/parseAmountOutputMajorUnits.js";
18
+ import { getRelativeCalendarDay as x } from "./lib/relativeCalendarDay.js";
19
+ import { parseDecimalAmountToMinorUnits as S } from "./lib/parseDecimalAmountToMinorUnits.js";
20
+ import { sumAmountOutputsMajorUnits as C } from "./lib/sumAmountOutputsMajorUnits.js";
21
+ import { US_STATE_NAMES_EN as w, getStateOptions as T, isStateValid as E } from "./lib/usStates.js";
22
+ import { createWidgetTokenManager as D } from "./lib/widgetTokenManager.js";
23
+ import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as O, TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT as k, emitWidgetDomEvent as A } from "./lib/widgetDomEvents.js";
24
+ import { extractApiErrorMessage as j } from "./lib/apiErrors.js";
25
+ import { parseApiValidationErrors as M } from "./lib/apiValidationErrors.js";
25
26
  import "./lib/auditHistory/auditHistoryActor.js";
26
- import { buildReceivableAuditHistory as M } from "./lib/auditHistory/buildReceivableAuditHistory.js";
27
- import { buildPayableAuditHistory as N, hasUnattributedAuditRows as P } from "./lib/auditHistory/buildPayableAuditHistory.js";
27
+ import { buildReceivableAuditHistory as N } from "./lib/auditHistory/buildReceivableAuditHistory.js";
28
+ import { buildPayableAuditHistory as P, hasUnattributedAuditRows as F } from "./lib/auditHistory/buildPayableAuditHistory.js";
28
29
  import "./lib/theme/color.js";
29
- import { THEME_TOKEN_NAMES as F } from "./lib/theme/themeTokens.js";
30
+ import { THEME_TOKEN_NAMES as I } from "./lib/theme/themeTokens.js";
30
31
  import "./lib/theme/toneColors.js";
31
- import { createTheme as I, isThemeDevelopmentBuild as L, readThemeTokens as R, reportThemeIssues as z, themeIssues as B, themeToCss as V } from "./lib/theme/createTheme.js";
32
+ import { createTheme as L, isThemeDevelopmentBuild as R, readThemeTokens as z, reportThemeIssues as B, themeIssues as V, themeToCss as H } from "./lib/theme/createTheme.js";
32
33
  import "./lib/theme/index.js";
33
- import { configureCsp as H, installStyleNonce as U } from "./lib/csp.js";
34
- import { resolvePdfWorkerSrc as W } from "./lib/pdfWorkerSrc.js";
35
- export { i as DATE_DISPLAY_LOCALE, a as DATE_DISPLAY_OPTIONS, D as TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT, O as TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT, F as THEME_TOKEN_NAMES, C as US_STATE_NAMES_EN, n as amountOutputToMajorUnits, N as buildPayableAuditHistory, M as buildReceivableAuditHistory, e as coerceAmountValueToMinorUnits, H as configureCsp, t as createCurrencyFormatter, I as createTheme, E as createWidgetTokenManager, u as currencySymbolForCode, k as emitWidgetDomEvent, A as extractApiErrorMessage, l as formatAccountingAmount, o as formatCalendarDate, d as formatMoneyExact, f as formatPhoneDisplay, c as formatRejectionDate, s as formatTimestampDate, p as getInitials, b as getRelativeCalendarDay, w as getStateOptions, P as hasUnattributedAuditRows, U as installStyleNonce, T as isStateValid, L as isThemeDevelopmentBuild, m as isValidAchAccountNumber, h as mergeLabelTree, r as minorExponentForCurrency, g as normalizeAmountOutputCurrencyCode, _ as parseAmountOutputMajorUnits, j as parseApiValidationErrors, v as parseCalendarDate, y as parseDateOrTimestamp, x as parseDecimalAmountToMinorUnits, R as readThemeTokens, z as reportThemeIssues, W as resolvePdfWorkerSrc, S as sumAmountOutputsMajorUnits, B as themeIssues, V as themeToCss };
34
+ import { configureCsp as U, installStyleNonce as W } from "./lib/csp.js";
35
+ import { resolvePdfWorkerSrc as G } from "./lib/pdfWorkerSrc.js";
36
+ export { i as DATE_DISPLAY_LOCALE, a as DATE_DISPLAY_OPTIONS, O as TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT, k as TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT, I as THEME_TOKEN_NAMES, w as US_STATE_NAMES_EN, n as amountOutputToMajorUnits, P as buildPayableAuditHistory, N as buildReceivableAuditHistory, e as coerceAmountValueToMinorUnits, U as configureCsp, t as createCurrencyFormatter, L as createTheme, D as createWidgetTokenManager, p as currencySymbolForCode, A as emitWidgetDomEvent, j as extractApiErrorMessage, f as formatAccountingAmount, l as formatCalendarDate, m as formatMoneyExact, h as formatPhoneDisplay, d as formatRejectionDate, u as formatTimestampDate, g as getInitials, x as getRelativeCalendarDay, T as getStateOptions, F as hasUnattributedAuditRows, W as installStyleNonce, E as isStateValid, R as isThemeDevelopmentBuild, _ as isValidAchAccountNumber, v as mergeLabelTree, r as minorExponentForCurrency, y as normalizeAmountOutputCurrencyCode, b as parseAmountOutputMajorUnits, M as parseApiValidationErrors, o as parseCalendarDate, s as parseDateOrTimestamp, S as parseDecimalAmountToMinorUnits, z as readThemeTokens, B as reportThemeIssues, c as resolveDueDateDisplay, G as resolvePdfWorkerSrc, C as sumAmountOutputsMajorUnits, V as themeIssues, H as themeToCss };
@@ -0,0 +1,23 @@
1
+ import { parseCalendarDate as e, parseDateOrTimestamp as t } from "./parseCalendarDate.js";
2
+ // ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/dueDateDisplay.js
3
+ var n = 864e5;
4
+ function r(r, i) {
5
+ let a = t(r), o = e(i);
6
+ if (!a || !o) return;
7
+ let s = new Date(a.getFullYear(), a.getMonth(), a.getDate());
8
+ return Math.round((s.getTime() - o.getTime()) / n);
9
+ }
10
+ function i({ dueDate: e, dateLabel: t, today: n, isUnpaid: i, labels: a }) {
11
+ if (!i) return { label: t };
12
+ let o = r(e, n);
13
+ if (o === 0) return { label: a.today };
14
+ if (o === 1) return { label: a.tomorrow };
15
+ if (o === void 0 || o > 0) return { label: t };
16
+ let s = (o === -1 ? a.dayOverdue : a.daysOverdue).replace("{days}", String(-o));
17
+ return {
18
+ label: t,
19
+ overdueLabel: s,
20
+ accessibleLabel: a.overdueAccessibleName.replace("{overdue}", s).replace("{date}", t)
21
+ };
22
+ }
23
+ export { i as resolveDueDateDisplay };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.11.170",
3
+ "version": "0.11.172",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -1,2 +0,0 @@
1
- import "./index21.js";
2
- import "./index22.js";
@@ -1,6 +0,0 @@
1
- // ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js
2
- var e = {
3
- revealValue: "Show value",
4
- hideValue: "Hide value"
5
- };
6
- export { e as REVEALABLE_FIELD_LABELS_EN };
@@ -1,33 +0,0 @@
1
- import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { REVEALABLE_FIELD_LABELS_EN as t } from "./index24.js";
3
- import { useState as n } from "react";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- import { Eye as a, EyeOff as o } from "lucide-react";
6
- // ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js
7
- function s({ field: s, labels: c }) {
8
- let l = {
9
- ...t,
10
- ...c
11
- }, [u, d] = n(!1), f = s.maskedValue && !u ? s.maskedValue : s.value;
12
- return /* @__PURE__ */ i("div", {
13
- className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-3",
14
- children: [/* @__PURE__ */ i("div", {
15
- className: "ttw:min-w-0",
16
- children: [/* @__PURE__ */ r("dt", {
17
- className: "ttw:text-xs ttw:text-muted-foreground",
18
- children: s.label
19
- }), /* @__PURE__ */ r("dd", {
20
- className: "ttw:break-words ttw:text-sm ttw:font-medium",
21
- children: f
22
- })]
23
- }), s.maskedValue ? /* @__PURE__ */ r(e, {
24
- type: "button",
25
- variant: "ghost",
26
- size: "icon",
27
- "aria-label": u ? l.hideValue : l.revealValue,
28
- onClick: () => d((e) => !e),
29
- children: r(u ? o : a, { className: "ttw:size-4" })
30
- }) : null]
31
- });
32
- }
33
- export { s as RevealableField, s as default };
@@ -1,2 +0,0 @@
1
- import "./index24.js";
2
- import "./index25.js";