@tesouro/embedded-components-react 0.3.24 → 0.3.25

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 (80) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +2 -2
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +2 -2
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +1 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +17 -12
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +5 -5
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +1 -0
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +8 -4
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +1 -0
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +2 -2
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +33 -30
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +0 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -40
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +23 -266
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +46 -6
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +273 -45
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +5 -18
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +45 -282
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +19 -13
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +273 -107
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +13 -9
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +113 -92
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +9 -10
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +95 -54
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +9 -50
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +53 -137
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +52 -2
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +138 -37
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -5
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +37 -88
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +5 -2
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +88 -12
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -77
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +11 -253
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +2 -13
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +82 -0
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +264 -8
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +9 -45
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +0 -1
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +7 -36
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +47 -10
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +2 -201
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +39 -3
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +3 -7
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +188 -301
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +3 -10
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +12 -4
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +317 -81
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +10 -0
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +8 -2
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +91 -16
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +1 -1
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +14 -3
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +109 -26
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +3 -3
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +26 -30
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +4 -9
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +30 -102
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +9 -14
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +85 -104
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +10 -11
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +123 -8
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -170
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +18 -2
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +7 -11
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +158 -96
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +1 -1
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +14 -0
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +108 -0
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +2 -0
  78. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  79. package/package.json +1 -1
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +0 -113
@@ -1,58 +1,99 @@
1
- import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { VendorSummaryCard as t } from "./index32.js";
3
- import "./index33.js";
4
- import { VendorSearchCombobox as n } from "./index35.js";
5
- import "./index36.js";
6
- import { VENDOR_SECTION_LABELS_EN as r } from "./index37.js";
7
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
1
+ import { Command as e, CommandGroup as t, CommandInput as n, CommandItem as r, CommandList as i, CommandSeparator as a, Label as o, Popover as s, PopoverContent as c, PopoverTrigger as l, Skeleton as u, cn as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { VENDOR_SEARCH_COMBOBOX_LABELS_EN as f } from "./index37.js";
3
+ import { useId as p, useState as m } from "react";
4
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
5
+ import { ChevronDown as _, Plus as v } from "lucide-react";
8
6
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js
9
- function o(o) {
10
- let { onEdit: s, onClear: c, error: l, testId: u, labels: d, disabled: f } = o, p = {
11
- ...r,
12
- ...d,
13
- summaryCard: {
14
- ...r.summaryCard,
15
- ...d?.summaryCard,
16
- ach: {
17
- ...r.summaryCard.ach,
18
- ...d?.summaryCard?.ach
19
- }
20
- },
21
- search: {
22
- ...r.search,
23
- ...d?.search
24
- }
25
- };
26
- return /* @__PURE__ */ a("section", {
27
- className: "ttw:flex ttw:flex-col ttw:gap-3",
28
- "data-testid": u,
29
- children: [
30
- /* @__PURE__ */ i(e, {
31
- component: "h2",
32
- variant: "h6",
33
- className: "ttw:font-semibold",
34
- children: p.heading
35
- }),
36
- o.mode === "resolved" ? /* @__PURE__ */ i(t, {
37
- summary: o.summary,
38
- onEdit: s,
39
- onClear: c,
40
- paymentInstructions: f ? void 0 : o.paymentInstructions,
41
- labels: p.summaryCard
42
- }) : f ? /* @__PURE__ */ i(e, {
43
- variant: "body2",
44
- className: "ttw:text-muted-foreground",
45
- children: p.noVendorPlaceholder
46
- }) : o.mode === "selecting" ? /* @__PURE__ */ i(n, {
47
- ...o.search,
48
- labels: p.search
49
- }) : o.newVendorForm,
50
- l ? /* @__PURE__ */ i("p", {
51
- className: "ttw:text-sm ttw:text-destructive",
52
- children: l
53
- }) : null
54
- ]
7
+ var y = 5, b = "ttw:min-h-44";
8
+ function x({ query: x, onQueryChange: S, results: C, isLoading: w, onAddVendor: T, testId: E, labels: D }) {
9
+ let O = {
10
+ ...f,
11
+ ...D
12
+ }, k = p(), [A, j] = m(!1);
13
+ return /* @__PURE__ */ g("div", {
14
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
15
+ "data-testid": E,
16
+ children: [/* @__PURE__ */ h(o, {
17
+ htmlFor: k,
18
+ children: O.fieldLabel
19
+ }), /* @__PURE__ */ g(s, {
20
+ open: A,
21
+ onOpenChange: j,
22
+ children: [/* @__PURE__ */ h(l, {
23
+ asChild: !0,
24
+ children: /* @__PURE__ */ g("button", {
25
+ type: "button",
26
+ id: k,
27
+ role: "combobox",
28
+ "aria-expanded": A,
29
+ className: "ttw:flex ttw:h-10 ttw:w-full ttw:items-center ttw:justify-between ttw:gap-2 ttw:rounded-md ttw:border ttw:border-border ttw:bg-background ttw:px-3 ttw:text-left ttw:text-sm ttw:shadow-xs ttw:outline-none ttw:focus-visible:border-ring ttw:focus-visible:ring-[3px] ttw:focus-visible:ring-ring/50",
30
+ children: [/* @__PURE__ */ h("span", {
31
+ className: "ttw:min-w-0 ttw:flex-1 ttw:truncate ttw:text-muted-foreground",
32
+ children: O.triggerPlaceholder
33
+ }), /* @__PURE__ */ h(_, {
34
+ "aria-hidden": !0,
35
+ className: "ttw:size-4 ttw:shrink-0 ttw:opacity-50"
36
+ })]
37
+ })
38
+ }), /* @__PURE__ */ h(c, {
39
+ align: "start",
40
+ className: "ttw:w-[var(--radix-popover-trigger-width)] ttw:p-0",
41
+ children: /* @__PURE__ */ g(e, {
42
+ shouldFilter: !1,
43
+ children: [/* @__PURE__ */ h(n, {
44
+ value: x,
45
+ onValueChange: S,
46
+ placeholder: O.placeholder,
47
+ "aria-label": O.placeholder
48
+ }), /* @__PURE__ */ g(i, {
49
+ className: d("ttw:max-h-72", b),
50
+ children: [
51
+ w ? /* @__PURE__ */ g("div", {
52
+ className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:p-2",
53
+ "aria-busy": "true",
54
+ children: [/* @__PURE__ */ h("span", {
55
+ className: "ttw:sr-only",
56
+ children: O.loading
57
+ }), Array.from({ length: y }).map((e, t) => /* @__PURE__ */ g("div", {
58
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:px-2 ttw:py-1.5",
59
+ children: [/* @__PURE__ */ h(u, {
60
+ height: 14,
61
+ width: "55%"
62
+ }), /* @__PURE__ */ h(u, {
63
+ height: 14,
64
+ width: "30%"
65
+ })]
66
+ }, t))]
67
+ }) : x ? C.length === 0 ? /* @__PURE__ */ h("div", {
68
+ className: d("ttw:flex ttw:items-center ttw:justify-center ttw:py-6 ttw:text-center ttw:text-sm", b),
69
+ children: O.emptyResults
70
+ }) : /* @__PURE__ */ h(t, { children: C.map((e, t) => /* @__PURE__ */ g(r, {
71
+ value: `${e.name} ${e.email} ${t}`,
72
+ onSelect: () => e.onSelect(),
73
+ children: [/* @__PURE__ */ h("span", {
74
+ className: "ttw:text-foreground",
75
+ children: e.name
76
+ }), /* @__PURE__ */ h("span", {
77
+ className: "ttw:ml-auto ttw:text-muted-foreground",
78
+ children: e.email
79
+ })]
80
+ }, `${e.name}:${e.email}:${t}`)) }) : /* @__PURE__ */ h("div", {
81
+ className: d("ttw:flex ttw:items-center ttw:justify-center ttw:py-6 ttw:text-center ttw:text-sm ttw:text-muted-foreground", b),
82
+ children: O.searchHint
83
+ }),
84
+ /* @__PURE__ */ h(a, {}),
85
+ /* @__PURE__ */ g(r, {
86
+ value: "__add_vendor__",
87
+ onSelect: T,
88
+ className: "ttw:sticky ttw:bottom-0 ttw:bg-popover ttw:text-primary",
89
+ children: [/* @__PURE__ */ h(v, { className: "ttw:size-4 ttw:text-primary" }), O.addVendorAction]
90
+ })
91
+ ]
92
+ })]
93
+ })
94
+ })]
95
+ })]
55
96
  });
56
97
  }
57
98
  //#endregion
58
- export { o as VendorSection, o as default };
99
+ export { x as VendorSearchCombobox, x as default };
@@ -1,54 +1,13 @@
1
- import { BILL_DETAIL_BODY_LABELS_EN as e, mergeBillDetailBodyLabels as t } from "./index22.js";
2
- import "./index24.js";
3
- import { BILL_FORM_FIELDS_LABELS_EN as n } from "./index25.js";
4
- import "./index27.js";
5
- import { LINE_ITEMS_SECTION_LABELS_EN as r } from "./index28.js";
6
- import "./index30.js";
7
- import { VENDOR_SECTION_LABELS_EN as i } from "./index37.js";
1
+ import { VENDOR_SUMMARY_CARD_LABELS_EN as e } from "./index34.js";
2
+ import "./index36.js";
3
+ import { VENDOR_SEARCH_COMBOBOX_LABELS_EN as t } from "./index37.js";
8
4
  import "./index39.js";
9
5
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js
10
- var a = {
11
- closeButton: "Close",
12
- menuTrigger: "More actions",
13
- cancelButton: "Cancel",
14
- saveDraftButton: "Save and close",
15
- finalizeButton: "Finalize",
16
- hiddenDescription: "Enter the details of the bill you want to pay.",
17
- vendorSection: i,
18
- detailsFields: n,
19
- lineItems: r,
20
- detailBody: e
6
+ var n = {
7
+ heading: "Who are you paying?",
8
+ summaryCard: e,
9
+ search: t,
10
+ noVendorPlaceholder: "No vendor selected"
21
11
  };
22
- function o(e) {
23
- return {
24
- ...a,
25
- ...e,
26
- vendorSection: {
27
- ...a.vendorSection,
28
- ...e?.vendorSection,
29
- summaryCard: {
30
- ...a.vendorSection.summaryCard,
31
- ...e?.vendorSection?.summaryCard,
32
- ach: {
33
- ...a.vendorSection.summaryCard.ach,
34
- ...e?.vendorSection?.summaryCard?.ach
35
- }
36
- },
37
- search: {
38
- ...a.vendorSection.search,
39
- ...e?.vendorSection?.search
40
- }
41
- },
42
- detailsFields: {
43
- ...a.detailsFields,
44
- ...e?.detailsFields
45
- },
46
- lineItems: {
47
- ...a.lineItems,
48
- ...e?.lineItems
49
- },
50
- detailBody: t(e?.detailBody)
51
- };
52
- }
53
12
  //#endregion
54
- export { a as BILL_CREATE_SCREEN_LABELS_EN, o as mergeBillCreateScreenLabels };
13
+ export { n as VENDOR_SECTION_LABELS_EN };
@@ -1,142 +1,58 @@
1
- import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogHeader as i, DialogTitle as a, DropdownMenu as o, DropdownMenuContent as s, DropdownMenuItem as c, DropdownMenuTrigger as l } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { InlineErrorAlert as u } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
3
- import "../../../shared/ui/dist/index.js";
4
- import { BillDetailBody as d } from "./index23.js";
5
- import "./index24.js";
6
- import { BillFormFields as f } from "./index26.js";
7
- import "./index27.js";
8
- import { LineItemsSection as p } from "./index29.js";
9
- import "./index30.js";
10
- import { VendorSection as m } from "./index38.js";
1
+ import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { VendorSummaryCard as t } from "./index35.js";
3
+ import "./index36.js";
4
+ import { VendorSearchCombobox as n } from "./index38.js";
11
5
  import "./index39.js";
12
- import { mergeBillCreateScreenLabels as h } from "./index40.js";
13
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
14
- import { MoreVertical as y, X as b } from "lucide-react";
6
+ import { VENDOR_SECTION_LABELS_EN as r } from "./index40.js";
7
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
15
8
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js
16
- function x({ open: x, onOpenChange: S, title: C, subtitle: w, notice: T, vendor: E, values: D, errors: O, onChange: k, lineItems: A, documentPanel: j, menuItems: M, readOnly: N, detail: P, isLineItemsLoading: F, isSaving: I, isSavingDraft: L, isFinalizing: R, onCancel: z, onSaveDraft: B, onFinalize: V, testId: H, labels: U }) {
17
- let W = h(U), G = !!(N && P);
18
- return /* @__PURE__ */ _(t, {
19
- open: x,
20
- onOpenChange: S,
21
- children: /* @__PURE__ */ v(n, {
22
- showCloseButton: !1,
23
- className: "ttw:flex ttw:h-[calc(100vh-3rem)] ttw:w-[calc(100vw-3rem)] ttw:max-w-[calc(100vw-3rem)] ttw:flex-col ttw:gap-0 ttw:p-0",
24
- "data-testid": H,
25
- children: [
26
- /* @__PURE__ */ v(i, {
27
- className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:px-6 ttw:py-4",
28
- children: [/* @__PURE__ */ v("div", {
29
- className: "ttw:flex ttw:flex-col ttw:gap-0.5",
30
- children: [
31
- /* @__PURE__ */ _(a, {
32
- className: "ttw:text-xl ttw:font-semibold",
33
- children: C
34
- }),
35
- w ? /* @__PURE__ */ _("p", {
36
- className: "ttw:text-sm ttw:text-muted-foreground",
37
- children: w
38
- }) : null,
39
- /* @__PURE__ */ _(r, {
40
- className: "ttw:sr-only",
41
- children: W.hiddenDescription
42
- })
43
- ]
44
- }), /* @__PURE__ */ v("div", {
45
- className: "ttw:flex ttw:items-center ttw:gap-1",
46
- children: [M && M.length > 0 ? /* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _(l, {
47
- asChild: !0,
48
- children: /* @__PURE__ */ _(e, {
49
- type: "button",
50
- variant: "ghost",
51
- size: "icon",
52
- "aria-label": W.menuTrigger,
53
- disabled: I,
54
- children: /* @__PURE__ */ _(y, { className: "ttw:size-4" })
55
- })
56
- }), /* @__PURE__ */ _(s, {
57
- align: "end",
58
- children: M.map((e) => /* @__PURE__ */ _(c, {
59
- variant: e.destructive ? "destructive" : void 0,
60
- onSelect: e.onSelect,
61
- children: e.label
62
- }, e.id))
63
- })] }) : null, /* @__PURE__ */ _(e, {
64
- type: "button",
65
- variant: "ghost",
66
- size: "icon",
67
- "aria-label": W.closeButton,
68
- disabled: I,
69
- onClick: z,
70
- children: /* @__PURE__ */ _(b, { className: "ttw:size-4" })
71
- })]
72
- })]
73
- }),
74
- /* @__PURE__ */ v("div", {
75
- className: "ttw:grid ttw:flex-1 ttw:grid-cols-2 ttw:overflow-hidden",
76
- children: [/* @__PURE__ */ v("div", {
77
- className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:overflow-y-auto ttw:px-6 ttw:py-6",
78
- children: [
79
- O?.form ? /* @__PURE__ */ _(u, { children: O.form }) : null,
80
- T ? /* @__PURE__ */ _("div", {
81
- className: "ttw:flex ttw:flex-col ttw:gap-3",
82
- children: T
83
- }) : null,
84
- G ? /* @__PURE__ */ _(d, {
85
- ...P,
86
- labels: W.detailBody
87
- }) : /* @__PURE__ */ v(g, { children: [
88
- /* @__PURE__ */ _(m, {
89
- ...E,
90
- onEdit: N ? void 0 : E.onEdit,
91
- onClear: N ? void 0 : E.onClear,
92
- disabled: N,
93
- labels: W.vendorSection
94
- }),
95
- /* @__PURE__ */ _(f, {
96
- values: D,
97
- errors: O,
98
- onChange: k,
99
- disabled: N,
100
- labels: W.detailsFields
101
- }),
102
- /* @__PURE__ */ _(p, {
103
- ...A,
104
- disabled: A.disabled || F || N,
105
- labels: W.lineItems
106
- })
107
- ] })
108
- ]
109
- }), /* @__PURE__ */ _("div", {
110
- className: "ttw:overflow-y-auto ttw:bg-muted/30 ttw:px-6 ttw:py-6",
111
- children: j
112
- })]
113
- }),
114
- G ? null : /* @__PURE__ */ v("div", {
115
- className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:border-t ttw:border-border ttw:px-6 ttw:py-4",
116
- children: [/* @__PURE__ */ _(e, {
117
- type: "button",
118
- variant: "ghost",
119
- disabled: I,
120
- onClick: z,
121
- children: N ? W.closeButton : W.cancelButton
122
- }), N ? null : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(e, {
123
- type: "button",
124
- variant: "secondary",
125
- onClick: B,
126
- loading: L,
127
- disabled: R || F || E.mode === "creating",
128
- children: W.saveDraftButton
129
- }), /* @__PURE__ */ _(e, {
130
- type: "button",
131
- onClick: V,
132
- loading: R,
133
- disabled: L || F || E.mode === "creating",
134
- children: W.finalizeButton
135
- })] })]
136
- })
137
- ]
138
- })
9
+ function o(o) {
10
+ let { onEdit: s, onClear: c, error: l, testId: u, labels: d, disabled: f } = o, p = {
11
+ ...r,
12
+ ...d,
13
+ summaryCard: {
14
+ ...r.summaryCard,
15
+ ...d?.summaryCard,
16
+ ach: {
17
+ ...r.summaryCard.ach,
18
+ ...d?.summaryCard?.ach
19
+ }
20
+ },
21
+ search: {
22
+ ...r.search,
23
+ ...d?.search
24
+ }
25
+ };
26
+ return /* @__PURE__ */ a("section", {
27
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
28
+ "data-testid": u,
29
+ children: [
30
+ /* @__PURE__ */ i(e, {
31
+ component: "h2",
32
+ variant: "h6",
33
+ className: "ttw:font-semibold",
34
+ children: p.heading
35
+ }),
36
+ o.mode === "resolved" ? /* @__PURE__ */ i(t, {
37
+ summary: o.summary,
38
+ onEdit: s,
39
+ onClear: c,
40
+ paymentInstructions: f ? void 0 : o.paymentInstructions,
41
+ labels: p.summaryCard
42
+ }) : f ? /* @__PURE__ */ i(e, {
43
+ variant: "body2",
44
+ className: "ttw:text-muted-foreground",
45
+ children: p.noVendorPlaceholder
46
+ }) : o.mode === "selecting" ? /* @__PURE__ */ i(n, {
47
+ ...o.search,
48
+ labels: p.search
49
+ }) : o.newVendorForm,
50
+ l ? /* @__PURE__ */ i("p", {
51
+ className: "ttw:text-sm ttw:text-destructive",
52
+ children: l
53
+ }) : null
54
+ ]
139
55
  });
140
56
  }
141
57
  //#endregion
142
- export { x as BillCreateScreen, x as default };
58
+ export { o as VendorSection, o as default };
@@ -1,4 +1,54 @@
1
+ import { BILL_DETAIL_BODY_LABELS_EN as e, mergeBillDetailBodyLabels as t } from "./index25.js";
2
+ import "./index27.js";
3
+ import { BILL_FORM_FIELDS_LABELS_EN as n } from "./index28.js";
4
+ import "./index30.js";
5
+ import { LINE_ITEMS_SECTION_LABELS_EN as r } from "./index31.js";
6
+ import "./index33.js";
7
+ import { VENDOR_SECTION_LABELS_EN as i } from "./index40.js";
8
+ import "./index42.js";
1
9
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js
2
- var e = { description: "Review, approve, and pay your bills." };
10
+ var a = {
11
+ closeButton: "Close",
12
+ menuTrigger: "More actions",
13
+ cancelButton: "Cancel",
14
+ saveDraftButton: "Save and close",
15
+ finalizeButton: "Finalize",
16
+ hiddenDescription: "Enter the details of the bill you want to pay.",
17
+ vendorSection: i,
18
+ detailsFields: n,
19
+ lineItems: r,
20
+ detailBody: e
21
+ };
22
+ function o(e) {
23
+ return {
24
+ ...a,
25
+ ...e,
26
+ vendorSection: {
27
+ ...a.vendorSection,
28
+ ...e?.vendorSection,
29
+ summaryCard: {
30
+ ...a.vendorSection.summaryCard,
31
+ ...e?.vendorSection?.summaryCard,
32
+ ach: {
33
+ ...a.vendorSection.summaryCard.ach,
34
+ ...e?.vendorSection?.summaryCard?.ach
35
+ }
36
+ },
37
+ search: {
38
+ ...a.vendorSection.search,
39
+ ...e?.vendorSection?.search
40
+ }
41
+ },
42
+ detailsFields: {
43
+ ...a.detailsFields,
44
+ ...e?.detailsFields
45
+ },
46
+ lineItems: {
47
+ ...a.lineItems,
48
+ ...e?.lineItems
49
+ },
50
+ detailBody: t(e?.detailBody)
51
+ };
52
+ }
3
53
  //#endregion
4
- export { e as DEFAULT_LABELS };
54
+ export { a as BILL_CREATE_SCREEN_LABELS_EN, o as mergeBillCreateScreenLabels };
@@ -1,41 +1,142 @@
1
- "use client";
2
- "use client";
3
- "use client";
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 "./index43.js";
7
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
1
+ import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogHeader as i, DialogTitle as a, DropdownMenu as o, DropdownMenuContent as s, DropdownMenuItem as c, DropdownMenuTrigger as l } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { InlineErrorAlert as u } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
3
+ import "../../../shared/ui/dist/index.js";
4
+ import { BillDetailBody as d } from "./index26.js";
5
+ import "./index27.js";
6
+ import { BillFormFields as f } from "./index29.js";
7
+ import "./index30.js";
8
+ import { LineItemsSection as p } from "./index32.js";
9
+ import "./index33.js";
10
+ import { VendorSection as m } from "./index41.js";
11
+ import "./index42.js";
12
+ import { mergeBillCreateScreenLabels as h } from "./index43.js";
13
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
14
+ import { MoreVertical as y, X as b } from "lucide-react";
8
15
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js
9
- function s({ labels: s, tabs: c, selectedTabId: l, onTabChange: u }) {
10
- let d = {
11
- ...i,
12
- ...s
13
- };
14
- return /* @__PURE__ */ o("section", {
15
- className: "ttw:w-full ttw:space-y-5",
16
- children: [/* @__PURE__ */ a("div", {
17
- className: "ttw:min-w-0",
18
- children: /* @__PURE__ */ a("p", {
19
- className: "ttw:text-sm ttw:text-muted-foreground",
20
- children: d.description
21
- })
22
- }), /* @__PURE__ */ o(e, {
23
- value: l,
24
- onValueChange: u,
25
- className: "ttw:w-full",
26
- children: [/* @__PURE__ */ a(n, {
27
- variant: "line",
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, {
33
- value: e.id,
34
- className: "ttw:mt-6",
35
- children: e.content
36
- }, e.id))]
37
- })]
16
+ function x({ open: x, onOpenChange: S, title: C, subtitle: w, notice: T, vendor: E, values: D, errors: O, onChange: k, lineItems: A, documentPanel: j, menuItems: M, readOnly: N, detail: P, isLineItemsLoading: F, isSaving: I, isSavingDraft: L, isFinalizing: R, onCancel: z, onSaveDraft: B, onFinalize: V, testId: H, labels: U }) {
17
+ let W = h(U), G = !!(N && P);
18
+ return /* @__PURE__ */ _(t, {
19
+ open: x,
20
+ onOpenChange: S,
21
+ children: /* @__PURE__ */ v(n, {
22
+ showCloseButton: !1,
23
+ className: "ttw:flex ttw:h-[calc(100vh-3rem)] ttw:w-[calc(100vw-3rem)] ttw:max-w-[calc(100vw-3rem)] ttw:flex-col ttw:gap-0 ttw:p-0",
24
+ "data-testid": H,
25
+ children: [
26
+ /* @__PURE__ */ v(i, {
27
+ className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:px-6 ttw:py-4",
28
+ children: [/* @__PURE__ */ v("div", {
29
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
30
+ children: [
31
+ /* @__PURE__ */ _(a, {
32
+ className: "ttw:text-xl ttw:font-semibold",
33
+ children: C
34
+ }),
35
+ w ? /* @__PURE__ */ _("p", {
36
+ className: "ttw:text-sm ttw:text-muted-foreground",
37
+ children: w
38
+ }) : null,
39
+ /* @__PURE__ */ _(r, {
40
+ className: "ttw:sr-only",
41
+ children: W.hiddenDescription
42
+ })
43
+ ]
44
+ }), /* @__PURE__ */ v("div", {
45
+ className: "ttw:flex ttw:items-center ttw:gap-1",
46
+ children: [M && M.length > 0 ? /* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _(l, {
47
+ asChild: !0,
48
+ children: /* @__PURE__ */ _(e, {
49
+ type: "button",
50
+ variant: "ghost",
51
+ size: "icon",
52
+ "aria-label": W.menuTrigger,
53
+ disabled: I,
54
+ children: /* @__PURE__ */ _(y, { className: "ttw:size-4" })
55
+ })
56
+ }), /* @__PURE__ */ _(s, {
57
+ align: "end",
58
+ children: M.map((e) => /* @__PURE__ */ _(c, {
59
+ variant: e.destructive ? "destructive" : void 0,
60
+ onSelect: e.onSelect,
61
+ children: e.label
62
+ }, e.id))
63
+ })] }) : null, /* @__PURE__ */ _(e, {
64
+ type: "button",
65
+ variant: "ghost",
66
+ size: "icon",
67
+ "aria-label": W.closeButton,
68
+ disabled: I,
69
+ onClick: z,
70
+ children: /* @__PURE__ */ _(b, { className: "ttw:size-4" })
71
+ })]
72
+ })]
73
+ }),
74
+ /* @__PURE__ */ v("div", {
75
+ className: "ttw:grid ttw:flex-1 ttw:grid-cols-2 ttw:overflow-hidden",
76
+ children: [/* @__PURE__ */ v("div", {
77
+ className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:overflow-y-auto ttw:px-6 ttw:py-6",
78
+ children: [
79
+ O?.form ? /* @__PURE__ */ _(u, { children: O.form }) : null,
80
+ T ? /* @__PURE__ */ _("div", {
81
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
82
+ children: T
83
+ }) : null,
84
+ G ? /* @__PURE__ */ _(d, {
85
+ ...P,
86
+ labels: W.detailBody
87
+ }) : /* @__PURE__ */ v(g, { children: [
88
+ /* @__PURE__ */ _(m, {
89
+ ...E,
90
+ onEdit: N ? void 0 : E.onEdit,
91
+ onClear: N ? void 0 : E.onClear,
92
+ disabled: N,
93
+ labels: W.vendorSection
94
+ }),
95
+ /* @__PURE__ */ _(f, {
96
+ values: D,
97
+ errors: O,
98
+ onChange: k,
99
+ disabled: N,
100
+ labels: W.detailsFields
101
+ }),
102
+ /* @__PURE__ */ _(p, {
103
+ ...A,
104
+ disabled: A.disabled || F || N,
105
+ labels: W.lineItems
106
+ })
107
+ ] })
108
+ ]
109
+ }), /* @__PURE__ */ _("div", {
110
+ className: "ttw:overflow-y-auto ttw:bg-muted/30 ttw:px-6 ttw:py-6",
111
+ children: j
112
+ })]
113
+ }),
114
+ G ? null : /* @__PURE__ */ v("div", {
115
+ className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:border-t ttw:border-border ttw:px-6 ttw:py-4",
116
+ children: [/* @__PURE__ */ _(e, {
117
+ type: "button",
118
+ variant: "ghost",
119
+ disabled: I,
120
+ onClick: z,
121
+ children: N ? W.closeButton : W.cancelButton
122
+ }), N ? null : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(e, {
123
+ type: "button",
124
+ variant: "secondary",
125
+ onClick: B,
126
+ loading: L,
127
+ disabled: R || F || E.mode === "creating",
128
+ children: W.saveDraftButton
129
+ }), /* @__PURE__ */ _(e, {
130
+ type: "button",
131
+ onClick: V,
132
+ loading: R,
133
+ disabled: L || F || E.mode === "creating",
134
+ children: W.finalizeButton
135
+ })] })]
136
+ })
137
+ ]
138
+ })
38
139
  });
39
140
  }
40
141
  //#endregion
41
- export { s as BillPayWidgetUi };
142
+ export { x as BillCreateScreen, x as default };