@tesouro/embedded-components-react 0.11.169 → 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 (49) hide show
  1. package/README.md +10 -6
  2. package/dist/index.d.ts +15 -4
  3. package/dist/lib/BillPayWidget.d.ts +9 -4
  4. package/dist/lib/ReceivablesWidget.d.ts +6 -0
  5. package/dist/lib/WidgetSuite.d.ts +6 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +75 -66
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +62 -53
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +44 -38
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +331 -326
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +10 -8
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +190 -187
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +12 -19
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +25 -23
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +4 -7
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +23 -24
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +5 -5
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +196 -187
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +8 -5
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index8.js +20 -18
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +11 -15
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +313 -324
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +46 -38
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +2 -2
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +4 -8
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +45 -22
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +5 -27
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +32 -2
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -29
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/index.js +7 -6
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/resolveBillDueDate.js +22 -0
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +116 -98
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +99 -92
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +7 -1
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurringSeries.js +15 -24
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +59 -69
  39. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +7 -5
  41. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/DateDisclosure/DateDisclosure.js +28 -0
  42. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/DueDateText/DueDateText.js +19 -0
  43. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +28 -27
  44. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/dueDateDisplay.js +23 -0
  45. package/package.json +1 -1
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -2
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -6
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +0 -33
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +0 -2
@@ -29,67 +29,75 @@ var C = {
29
29
  Bills: "bills",
30
30
  Vendors: "vendors"
31
31
  }, w = [C.Bills, C.Vendors];
32
- function T({ labels: a, initialTab: l = C.Bills, initialView: T, poweredByBankName: E, onSettingsClick: D }) {
33
- let O = i();
32
+ function T(e) {
33
+ return w.includes(e);
34
+ }
35
+ function E({ labels: a, initialTab: l = C.Bills, selectedTab: E, onTabChange: D, initialView: O, poweredByBankName: k, onSettingsClick: A }) {
36
+ let j = i();
34
37
  g(() => {
35
- O(c.Mounted);
36
- }, [O]);
37
- let k = _(() => e(p, a), [a]), { initResponse: A } = o(), j = t(A?.scopes, [n.PayableReadOrg]), M = t(A?.scopes, [n.PayableWriteOrg]), N = t(A?.scopes, [n.ApprovalPolicyWriteOrg]) && t(A?.scopes, [n.PayableWriteOrg]) && t(A?.scopes, [n.RoleReadOrg]) && t(A?.scopes, [n.UserReadOrg]), [P, F] = y(l), [I, L] = y(), R = h((e) => {
38
- F(C.Bills), L(e);
39
- }, []), z = v(null), B = h((e) => z.current?.enqueue(e), []), [V, H] = y(), U = h((e) => {
40
- F(C.Bills), H(e);
41
- }, []), W = s(), [G, K] = y(T === "create"), [q, J] = y(!1);
42
- G && A && !W && (K(!1), M && P === C.Bills && J(!0));
43
- let Y = [{
38
+ j(c.Mounted);
39
+ }, [j]);
40
+ let M = _(() => e(p, a), [a]), { initResponse: N } = o(), P = t(N?.scopes, [n.PayableReadOrg]), F = t(N?.scopes, [n.PayableWriteOrg]), I = t(N?.scopes, [n.ApprovalPolicyWriteOrg]) && t(N?.scopes, [n.PayableWriteOrg]) && t(N?.scopes, [n.RoleReadOrg]) && t(N?.scopes, [n.UserReadOrg]), [ee, te] = y(l), L = E ?? ee, R = h((e) => {
41
+ T(e) && (te(e), D?.(e));
42
+ }, [D]), [z, B] = y(null), [V, H] = y(), U = h((e) => {
43
+ R(C.Bills), H(e);
44
+ }, [R]), W = v(null), G = h((e) => W.current?.enqueue(e), []), [K, q] = y(), J = h((e) => {
45
+ R(C.Bills), q(e);
46
+ }, [R]), Y = s(), [X, Z] = y(O === "create"), [ne, Q] = y(!1);
47
+ X && N && !Y && (Z(!1), F && L === C.Bills && Q(!0));
48
+ let $ = [{
44
49
  id: C.Bills,
45
- label: k.tabs.bills,
50
+ label: M.tabs.bills,
46
51
  content: /* @__PURE__ */ x(f, {
47
- labels: k,
48
- onEnqueueFiles: B,
49
- openPayableId: I,
50
- onOpenPayableHandled: () => L(void 0),
51
- vendorIntent: V,
52
- onVendorIntentHandled: () => H(void 0),
53
- openAddBill: q,
54
- onOpenAddBillHandled: () => J(!1),
55
- poweredByBankName: E,
56
- onSettingsClick: D && N ? D : void 0
52
+ labels: M,
53
+ onEnqueueFiles: G,
54
+ openPayableId: V,
55
+ onOpenPayableHandled: () => H(void 0),
56
+ vendorIntent: K,
57
+ onVendorIntentHandled: () => q(void 0),
58
+ openAddBill: ne,
59
+ onOpenAddBillHandled: () => Q(!1),
60
+ poweredByBankName: k,
61
+ headerActionContainer: z
57
62
  })
58
63
  }, {
59
64
  id: C.Vendors,
60
- label: k.tabs.vendors,
65
+ label: M.tabs.vendors,
61
66
  content: /* @__PURE__ */ x(m, {
62
- ...k.vendors,
67
+ ...M.vendors,
63
68
  counterpartType: "vendor",
64
69
  passThrough: !0,
65
- onViewAllDocuments: j ? (e) => U({
70
+ headerActionContainer: z,
71
+ onViewAllDocuments: P ? (e) => J({
66
72
  vendorId: e.id,
67
73
  vendorName: e.name,
68
74
  action: "viewBills"
69
75
  }) : void 0,
70
- onCreateDocument: M ? (e) => U({
76
+ onCreateDocument: F ? (e) => J({
71
77
  vendorId: e.id,
72
78
  vendorName: e.name,
73
79
  action: "createBill"
74
80
  }) : void 0
75
81
  })
76
- }], X = Y.some((e) => e.id === P) ? P : w.find((e) => Y.some((t) => t.id === e)) ?? Y[0]?.id ?? "";
82
+ }], re = $.some((e) => e.id === L) ? L : w.find((e) => $.some((t) => t.id === e)) ?? $[0]?.id ?? "";
77
83
  return /* @__PURE__ */ S(b, { children: [
78
84
  /* @__PURE__ */ x(r, {}),
79
85
  /* @__PURE__ */ x(u, {
80
- labels: k.widget,
81
- tabs: Y,
82
- selectedTabId: X,
83
- onTabChange: F
86
+ labels: M.widget,
87
+ tabs: $,
88
+ selectedTabId: re,
89
+ onTabChange: R,
90
+ onSettingsClick: A && I ? A : void 0,
91
+ actionContainerRef: B
84
92
  }),
85
93
  /* @__PURE__ */ x(d, {
86
- ref: z,
87
- onOpenBill: R,
88
- labels: k.billUpload
94
+ ref: W,
95
+ onOpenBill: U,
96
+ labels: M.billUpload
89
97
  })
90
98
  ] });
91
99
  }
92
- function E({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: o, uiFramework: s, errorFallback: c, onError: u, analytics: d, disclosuresAcceptance: f, providerLabels: p, ...m }) {
100
+ function D({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: o, uiFramework: s, errorFallback: c, onError: u, analytics: d, disclosuresAcceptance: f, providerLabels: p, ...m }) {
93
101
  return /* @__PURE__ */ x(a, {
94
102
  widgetName: l,
95
103
  baseUrl: e,
@@ -104,8 +112,8 @@ function E({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gat
104
112
  analytics: d,
105
113
  disclosuresAcceptance: f,
106
114
  providerLabels: p,
107
- children: /* @__PURE__ */ x(T, { ...m })
115
+ children: /* @__PURE__ */ x(E, { ...m })
108
116
  });
109
117
  }
110
- var D = E;
111
- export { D as BillPayWidget, D as default, E as BillPayWidgetWithLabels };
118
+ var O = D;
119
+ export { O as BillPayWidget, O as default, D as BillPayWidgetWithLabels };
@@ -18,7 +18,7 @@ import "../../../../pay-bill/feature/dist/index.js";
18
18
  import { useCallback as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
19
19
  import { jsx as p, jsxs as m } from "react/jsx-runtime";
20
20
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js
21
- function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandled: v, vendorIntent: y, onVendorIntentHandled: b, openAddBill: x, onOpenAddBillHandled: S, poweredByBankName: C, onSettingsClick: w }) {
21
+ function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandled: v, vendorIntent: y, onVendorIntentHandled: b, openAddBill: x, onOpenAddBillHandled: S, poweredByBankName: C, headerActionContainer: w }) {
22
22
  let T = d(null), [E, D] = f(), [O, k] = f(), [A, j] = f(!1), [M, N] = f(), [P, F] = f(!1), [I, L] = f(!1), [R, z] = f(null), B = !R || {
23
23
  create: A,
24
24
  details: P,
@@ -88,7 +88,7 @@ function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandle
88
88
  onEnterManually: () => X(),
89
89
  onFilesSelected: g,
90
90
  maxFiles: 10,
91
- onSettingsClick: w
91
+ headerActionContainer: w
92
92
  }),
93
93
  A ? /* @__PURE__ */ p(a, {
94
94
  open: A,
@@ -1,4 +1,4 @@
1
- import { REVEALABLE_FIELD_LABELS_EN as e } from "../../../ui/dist/index24.js";
1
+ import { REVEALABLE_FIELD_LABELS_EN as e } from "../../../ui/dist/index20.js";
2
2
  import "../../../ui/dist/index.js";
3
3
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js
4
4
  var t = {
@@ -1,5 +1,5 @@
1
1
  import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogFooter as i, DialogHeader as a, DialogTitle as o, cn as s } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RevealableField as c } from "../../../ui/dist/index25.js";
2
+ import { RevealableField as c } from "../../../ui/dist/index21.js";
3
3
  import "../../../ui/dist/index.js";
4
4
  import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as l } from "./index5.js";
5
5
  import { jsx as u, jsxs as d } from "react/jsx-runtime";
@@ -15,11 +15,7 @@ import "./index15.js";
15
15
  import { BILL_UPLOAD_DROPZONE_LABELS_EN as c } from "./index16.js";
16
16
  import { BillUploadDropzone as l, getAcceptedBillUploadFiles as u } from "./index17.js";
17
17
  import "./index19.js";
18
- import { DateDisclosure as d } from "./index20.js";
19
- import { DUE_DATE_VALUE_LABELS_EN as f } from "./index21.js";
20
- import { DueDateValue as p } from "./index22.js";
21
- import "./index23.js";
22
- import { REVEALABLE_FIELD_LABELS_EN as m } from "./index24.js";
23
- import { RevealableField as h } from "./index25.js";
24
- import "./index26.js";
25
- export { c as BILL_UPLOAD_DROPZONE_LABELS_EN, e as BillActionButtons, n as BillDecisionDialog, r as BillDuplicateIcon, i as BillDuplicateWarning, o as BillOverflowMenu, s as BillPayWidgetUi, l as BillUploadDropzone, f as DUE_DATE_VALUE_LABELS_EN, d as DateDisclosure, p as DueDateValue, t as NO_BILL_ACTIONS, m as REVEALABLE_FIELD_LABELS_EN, h as RevealableField, u as getAcceptedBillUploadFiles, a as groupBySectionHeading };
18
+ import { REVEALABLE_FIELD_LABELS_EN as d } from "./index20.js";
19
+ import { RevealableField as f } from "./index21.js";
20
+ import "./index22.js";
21
+ export { c as BILL_UPLOAD_DROPZONE_LABELS_EN, e as BillActionButtons, n as BillDecisionDialog, r as BillDuplicateIcon, i as BillDuplicateWarning, o as BillOverflowMenu, s as BillPayWidgetUi, l as BillUploadDropzone, t as NO_BILL_ACTIONS, d as REVEALABLE_FIELD_LABELS_EN, f as RevealableField, u as getAcceptedBillUploadFiles, a as groupBySectionHeading };
@@ -1,3 +1,3 @@
1
1
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js
2
- var e = {};
2
+ var e = { settingsButton: "Bill pay settings" };
3
3
  export { e as DEFAULT_LABELS };
@@ -2,34 +2,57 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Tabs as e, TabsContent as t, TabsList as n, TabsTrigger as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { DEFAULT_LABELS as i } from "./index13.js";
7
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ import { Button as e, Tabs as t, TabsContent as n, TabsList as r, TabsTrigger as i, Tooltip as a, TooltipContent as o, TooltipProvider as s, TooltipTrigger as c } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { DEFAULT_LABELS as l } from "./index13.js";
7
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
8
+ import { SettingsIcon as f } from "lucide-react";
8
9
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js
9
- function s({ labels: s, tabs: c, selectedTabId: l, onTabChange: u }) {
10
- let d = {
11
- ...i,
12
- ...s
10
+ function p({ labels: p, tabs: m, selectedTabId: h, onTabChange: g, onSettingsClick: _, actionContainerRef: v }) {
11
+ let y = {
12
+ ...l,
13
+ ...p
13
14
  };
14
- return /* @__PURE__ */ o("section", {
15
+ return /* @__PURE__ */ d("section", {
15
16
  className: "ttw:w-full ttw:space-y-5",
16
- children: [d.description ? /* @__PURE__ */ a("div", {
17
+ children: [y.description ? /* @__PURE__ */ u("div", {
17
18
  className: "ttw:min-w-0",
18
- children: /* @__PURE__ */ a("p", {
19
+ children: /* @__PURE__ */ u("p", {
19
20
  className: "ttw:text-sm ttw:text-muted-foreground",
20
- children: d.description
21
+ children: y.description
21
22
  })
22
- }) : null, /* @__PURE__ */ o(e, {
23
- value: l,
24
- onValueChange: u,
23
+ }) : null, /* @__PURE__ */ d(t, {
24
+ value: h,
25
+ onValueChange: g,
25
26
  className: "ttw:w-full",
26
- children: [/* @__PURE__ */ a(n, {
27
- variant: "underline",
28
- children: c.map((e) => /* @__PURE__ */ a(r, {
29
- value: e.id,
30
- children: e.label
31
- }, e.id))
32
- }), c.map((e) => /* @__PURE__ */ a(t, {
27
+ children: [/* @__PURE__ */ d("div", {
28
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
29
+ children: [/* @__PURE__ */ u(r, {
30
+ variant: "underline",
31
+ children: m.map((e) => /* @__PURE__ */ u(i, {
32
+ value: e.id,
33
+ children: e.label
34
+ }, e.id))
35
+ }), /* @__PURE__ */ d("div", {
36
+ className: "ttw:flex ttw:items-center ttw:gap-2",
37
+ children: [_ ? /* @__PURE__ */ u(s, { children: /* @__PURE__ */ d(a, { children: [/* @__PURE__ */ u(c, {
38
+ asChild: !0,
39
+ children: /* @__PURE__ */ u(e, {
40
+ type: "button",
41
+ variant: "ghost",
42
+ size: "icon",
43
+ "aria-label": y.settingsButton,
44
+ onClick: _,
45
+ children: /* @__PURE__ */ u(f, {
46
+ className: "ttw:size-4",
47
+ "aria-hidden": !0
48
+ })
49
+ })
50
+ }), /* @__PURE__ */ u(o, { children: y.settingsButton })] }) }) : null, /* @__PURE__ */ u("div", {
51
+ ref: v,
52
+ className: "ttw:contents"
53
+ })]
54
+ })]
55
+ }), m.map((e) => /* @__PURE__ */ u(n, {
33
56
  value: e.id,
34
57
  className: "ttw:mt-6",
35
58
  children: e.content
@@ -37,4 +60,4 @@ function s({ labels: s, tabs: c, selectedTabId: l, onTabChange: u }) {
37
60
  })]
38
61
  });
39
62
  }
40
- export { s as BillPayWidgetUi };
63
+ export { p as BillPayWidgetUi };
@@ -1,28 +1,6 @@
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
1
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.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-default",
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 };
2
+ var e = {
3
+ revealValue: "Show value",
4
+ hideValue: "Hide value"
5
+ };
6
+ export { e as REVEALABLE_FIELD_LABELS_EN };
@@ -1,3 +1,33 @@
1
+ import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { REVEALABLE_FIELD_LABELS_EN as t } from "./index20.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";
1
6
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js
2
- var e = { overdue: "Overdue" };
3
- export { e as DUE_DATE_VALUE_LABELS_EN };
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,29 +1,2 @@
1
- import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { DUE_DATE_VALUE_LABELS_EN as t } from "./index21.js";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
- import { AlertTriangleIcon as i } from "lucide-react";
5
- // ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js
6
- function a({ value: a, tone: o = "default", labels: s, className: c }) {
7
- let l = {
8
- ...t,
9
- ...s
10
- };
11
- return o === "danger" ? /* @__PURE__ */ r("span", {
12
- className: e("ttw:inline-flex ttw:items-center ttw:gap-1 ttw:whitespace-nowrap ttw:font-medium ttw:text-destructive", c),
13
- children: [
14
- /* @__PURE__ */ n(i, {
15
- "aria-hidden": !0,
16
- className: "ttw:size-3.5 ttw:shrink-0"
17
- }),
18
- a,
19
- /* @__PURE__ */ n("span", {
20
- className: "ttw:sr-only",
21
- children: l.overdue
22
- })
23
- ]
24
- }) : /* @__PURE__ */ n("span", {
25
- className: c,
26
- children: a
27
- });
28
- }
29
- export { a as DueDateValue, a as default };
1
+ import "./index20.js";
2
+ import "./index21.js";
@@ -10,9 +10,10 @@ import { maskAccountNumber as S } from "./lib/maskAccountNumber.js";
10
10
  import { payableRemoval as C } from "./lib/payableRemoval.js";
11
11
  import "./lib/payableTotals.js";
12
12
  import { resolveAmountDueMinorUnits as w } from "./lib/resolveAmountDue.js";
13
- import { resolveLineItemAmountMinorUnits as T } from "./lib/resolveLineItemAmount.js";
14
- import { resolveLineItemQuantity as E } from "./lib/resolveLineItemQuantity.js";
15
- import { resolveVendor as D, resolveVendorName as O } from "./lib/resolveVendor.js";
16
- import { BILL_PAY_WIDGET_NAME as k } from "./lib/widgetName.js";
17
- import { buildGroupCollapse as A } from "./lib/groupCollapse.js";
18
- export { e as AWAITING_APPROVAL_LABEL_EN, t as AWAITING_APPROVAL_UNKNOWN_LABEL_EN, n as BILL_DETAIL_ACTIONS_LABELS_EN, k as BILL_PAY_WIDGET_NAME, u as DuplicateVerdict, r as PAYMENT_HISTORY_LABELS_EN, i as SCHEDULED_RELATIVE_DAY_LABELS_EN, a as SCHEDULED_STATUS_BADGE_LABEL_EN, o as SCHEDULED_SUMMARY_LABEL_EN, A as buildGroupCollapse, g as compareByArrival, p as countSuspectedPayableDuplicateGroups, _ as duplicateVerdictMatches, d as formatBillMoney, f as formatScheduledDateLabel, v as groupSuspectedDuplicates, m as hasSuspectedPayableDuplicate, b as isEditablePayableStatus, x as isLiveScheduledPaymentRecord, S as maskAccountNumber, s as mergeBillDetailActionsLabels, c as mergeDecisionDialogCopy, l as mergePaymentHistoryMethodLabels, C as payableRemoval, w as resolveAmountDueMinorUnits, y as resolveDuplicateOriginalId, T as resolveLineItemAmountMinorUnits, E as resolveLineItemQuantity, D as resolveVendor, O as resolveVendorName, h as suspectedPayableDuplicates };
13
+ import { BILL_DUE_DATE_LABELS_EN as T, resolveBillDueDate as E } from "./lib/resolveBillDueDate.js";
14
+ import { resolveLineItemAmountMinorUnits as D } from "./lib/resolveLineItemAmount.js";
15
+ import { resolveLineItemQuantity as O } from "./lib/resolveLineItemQuantity.js";
16
+ import { resolveVendor as k, resolveVendorName as A } from "./lib/resolveVendor.js";
17
+ import { BILL_PAY_WIDGET_NAME as j } from "./lib/widgetName.js";
18
+ import { buildGroupCollapse as M } from "./lib/groupCollapse.js";
19
+ export { e as AWAITING_APPROVAL_LABEL_EN, t as AWAITING_APPROVAL_UNKNOWN_LABEL_EN, n as BILL_DETAIL_ACTIONS_LABELS_EN, T as BILL_DUE_DATE_LABELS_EN, j as BILL_PAY_WIDGET_NAME, u as DuplicateVerdict, r as PAYMENT_HISTORY_LABELS_EN, i as SCHEDULED_RELATIVE_DAY_LABELS_EN, a as SCHEDULED_STATUS_BADGE_LABEL_EN, o as SCHEDULED_SUMMARY_LABEL_EN, M as buildGroupCollapse, g as compareByArrival, p as countSuspectedPayableDuplicateGroups, _ as duplicateVerdictMatches, d as formatBillMoney, f as formatScheduledDateLabel, v as groupSuspectedDuplicates, m as hasSuspectedPayableDuplicate, b as isEditablePayableStatus, x as isLiveScheduledPaymentRecord, S as maskAccountNumber, s as mergeBillDetailActionsLabels, c as mergeDecisionDialogCopy, l as mergePaymentHistoryMethodLabels, C as payableRemoval, w as resolveAmountDueMinorUnits, E as resolveBillDueDate, y as resolveDuplicateOriginalId, D as resolveLineItemAmountMinorUnits, O as resolveLineItemQuantity, k as resolveVendor, A as resolveVendorName, h as suspectedPayableDuplicates };
@@ -0,0 +1,22 @@
1
+ import { resolveDueDateDisplay as e } from "../../../../shared/util/dist/lib/dueDateDisplay.js";
2
+ import { formatCalendarDate as t } from "../../../../shared/util/dist/lib/formatCalendarDate.js";
3
+ import "../../../../shared/util/dist/index.js";
4
+ // ../../libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/resolveBillDueDate.js
5
+ var n = {
6
+ today: "Today",
7
+ tomorrow: "Tomorrow",
8
+ dayOverdue: "{days} day overdue",
9
+ daysOverdue: "{days} days overdue",
10
+ overdueAccessibleName: "{overdue}, due {date}"
11
+ };
12
+ function r({ status: n, dueDate: r, today: i, isScheduled: a = !1, labels: o, emptyLabel: s = "" }) {
13
+ let c = e({
14
+ dueDate: r,
15
+ dateLabel: t(r) || s,
16
+ today: i,
17
+ isUnpaid: n !== "paid" && n !== "canceled",
18
+ labels: o
19
+ });
20
+ return a && c.overdueLabel ? { label: c.label } : c;
21
+ }
22
+ export { n as BILL_DUE_DATE_LABELS_EN, r as resolveBillDueDate };