@tesouro/embedded-components-react 0.2.327 → 0.2.328

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 (133) hide show
  1. package/dist/index.css +3 -0
  2. package/dist/index.d.ts +59 -59
  3. package/dist/index.js +1 -1
  4. package/dist/lib/BillPayWidget.js +1 -1
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +10 -10
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +119 -33
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +50 -21
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +39 -17
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +17 -12
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +10 -10
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +2 -2
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +45 -17
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +4 -21
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +9 -24
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +42 -9
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +25 -50
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +49 -5
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +91 -63
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +20 -49
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +52 -7
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +5 -35
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +67 -113
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +46 -53
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +80 -205
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +32 -192
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +117 -62
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +54 -45
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +205 -31
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +184 -143
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +63 -33
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +46 -100
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +32 -7
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +146 -182
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +38 -4
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +102 -24
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +10 -80
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +200 -78
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +2 -1
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +27 -2
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +78 -41
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +132 -1
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +3 -53
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +2 -9
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +43 -16
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +1 -8
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +50 -77
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +8 -145
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +18 -5
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +6 -6
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +78 -7
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +138 -75
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +2 -0
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +6 -6
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +7 -113
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +85 -1
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +2 -24
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +8 -0
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +115 -0
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +1 -0
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +25 -0
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +2 -2
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +33 -25
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +13 -12
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +58 -13
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +2 -24
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +22 -2
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +23 -31
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +1 -262
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +15 -2
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +23 -6
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +2 -49
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +41 -1
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +271 -20
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +2 -286
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +9 -2
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +47 -14
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +2 -120
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +22 -2
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +284 -8
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +2 -96
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +16 -2
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +118 -11
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +1 -57
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +10 -2
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +93 -51
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +1 -138
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +12 -1
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +56 -5
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +2 -44
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +53 -1
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +137 -2
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +2 -16
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +7 -2
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +42 -59
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +2 -238
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +2 -202
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +61 -8
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +2 -8
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +2 -91
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +16 -0
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +1 -1
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +67 -4
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +248 -25
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +204 -2
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +6 -3
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +6 -32
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +93 -2
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +1 -105
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +7 -2
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +28 -16
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +2 -10
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +4 -167
  114. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +34 -2
  115. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +2 -14
  116. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +10 -87
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +105 -1
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +2 -0
  119. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +18 -0
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +10 -0
  121. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +170 -0
  122. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +2 -0
  123. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +14 -0
  124. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +89 -0
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +2 -0
  126. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +20 -20
  127. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/index.js +4 -4
  128. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +21 -21
  129. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +142 -102
  130. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  131. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -1
  132. package/package.json +1 -1
  133. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +0 -12
@@ -1,13 +1,120 @@
1
- import { VENDOR_SUMMARY_CARD_LABELS_EN as e } from "./index25.js";
2
- import "./index27.js";
3
- import { VENDOR_SEARCH_COMBOBOX_LABELS_EN as t } from "./index28.js";
4
- import "./index30.js";
1
+ import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { AchFieldGroup as t } from "../../../shared/counterpart-management/ui/dist/index5.js";
3
+ import "../../../shared/counterpart-management/ui/dist/index.js";
4
+ import { VENDOR_SUMMARY_CARD_LABELS_EN as n } from "./index30.js";
5
+ import { useState as r } from "react";
6
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
7
+ import { Eye as s, EyeOff as c, Pencil as l, Plus as u, X as d } from "lucide-react";
5
8
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js
6
- var n = {
7
- heading: "Who are you paying?",
8
- summaryCard: e,
9
- search: t,
10
- noVendorPlaceholder: "No vendor selected"
11
- };
9
+ function f({ field: e, labels: t }) {
10
+ let [n, i] = r(!1), l = !!e.maskedValue, u = l && !n ? e.maskedValue : e.value;
11
+ return /* @__PURE__ */ o("div", {
12
+ className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-sm",
13
+ children: [
14
+ /* @__PURE__ */ a("span", {
15
+ className: "ttw:w-44 ttw:shrink-0 ttw:text-muted-foreground",
16
+ children: e.label
17
+ }),
18
+ /* @__PURE__ */ a("span", {
19
+ className: "ttw:text-foreground",
20
+ children: u
21
+ }),
22
+ l ? /* @__PURE__ */ a("button", {
23
+ type: "button",
24
+ onClick: () => i((e) => !e),
25
+ "aria-label": n ? t.hideField(e.label) : t.revealField(e.label),
26
+ className: "ttw:text-muted-foreground ttw:hover:text-foreground",
27
+ children: a(n ? c : s, { className: "ttw:size-4" })
28
+ }) : null
29
+ ]
30
+ });
31
+ }
32
+ function p({ summary: r, onEdit: s, onClear: c, paymentInstructions: p, testId: m, labels: h }) {
33
+ let g = {
34
+ ...n,
35
+ ...h,
36
+ ach: {
37
+ ...n.ach,
38
+ ...h?.ach
39
+ }
40
+ };
41
+ return /* @__PURE__ */ o("div", {
42
+ className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-muted/30 ttw:p-4",
43
+ "data-testid": m,
44
+ children: [/* @__PURE__ */ o("div", {
45
+ className: "ttw:flex ttw:items-start ttw:justify-between",
46
+ children: [/* @__PURE__ */ o("div", {
47
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
48
+ children: [
49
+ /* @__PURE__ */ a("span", {
50
+ className: "ttw:text-xs ttw:text-muted-foreground",
51
+ children: g.payToHeading
52
+ }),
53
+ /* @__PURE__ */ a("span", {
54
+ className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
55
+ children: r.name
56
+ }),
57
+ /* @__PURE__ */ a("span", {
58
+ className: "ttw:text-sm ttw:text-muted-foreground",
59
+ children: r.email
60
+ })
61
+ ]
62
+ }), /* @__PURE__ */ o("div", {
63
+ className: "ttw:flex ttw:items-center ttw:gap-1",
64
+ children: [s ? /* @__PURE__ */ a(e, {
65
+ type: "button",
66
+ variant: "ghost",
67
+ size: "icon",
68
+ "aria-label": g.editAction,
69
+ onClick: s,
70
+ children: /* @__PURE__ */ a(l, { className: "ttw:size-4" })
71
+ }) : null, c ? /* @__PURE__ */ a(e, {
72
+ type: "button",
73
+ variant: "ghost",
74
+ size: "icon",
75
+ "aria-label": g.clearAction,
76
+ onClick: c,
77
+ children: /* @__PURE__ */ a(d, { className: "ttw:size-4" })
78
+ }) : null]
79
+ })]
80
+ }), r.fields.length ? /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a("p", {
81
+ className: "ttw:mt-3 ttw:text-xs ttw:text-muted-foreground",
82
+ children: r.methodLabel
83
+ }), /* @__PURE__ */ a("div", {
84
+ className: "ttw:mt-2 ttw:flex ttw:flex-col ttw:gap-1",
85
+ children: r.fields.map((e) => /* @__PURE__ */ a(f, {
86
+ field: e,
87
+ labels: g
88
+ }, `${e.label}:${e.value}:${e.maskedValue ?? ""}`))
89
+ })] }) : /* @__PURE__ */ o("div", {
90
+ className: "ttw:mt-4 ttw:flex ttw:flex-col ttw:gap-3",
91
+ children: [/* @__PURE__ */ o("div", {
92
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
93
+ children: [/* @__PURE__ */ a("p", {
94
+ className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
95
+ children: g.paymentInstructionsHeading
96
+ }), /* @__PURE__ */ a("p", {
97
+ className: "ttw:text-sm ttw:text-muted-foreground",
98
+ children: g.paymentInstructionsDescription
99
+ })]
100
+ }), p?.isOpen ? /* @__PURE__ */ a(t, {
101
+ idPrefix: "vendor-summary-ach",
102
+ values: p.values,
103
+ errors: p.errors,
104
+ onChange: p.onChange,
105
+ labels: g.ach
106
+ }) : p ? /* @__PURE__ */ o(e, {
107
+ type: "button",
108
+ variant: "link",
109
+ className: "ttw:w-fit ttw:px-0",
110
+ onClick: p.onOpen,
111
+ children: [/* @__PURE__ */ a(u, { className: "ttw:size-4" }), g.addPaymentInstructions]
112
+ }) : /* @__PURE__ */ a("p", {
113
+ className: "ttw:text-sm ttw:text-muted-foreground",
114
+ children: r.methodLabel
115
+ })]
116
+ })]
117
+ });
118
+ }
12
119
  //#endregion
13
- export { n as VENDOR_SECTION_LABELS_EN };
120
+ export { p as VendorSummaryCard, p as default };
@@ -1,58 +1,2 @@
1
- import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { VendorSummaryCard as t } from "./index26.js";
3
- import "./index27.js";
4
- import { VendorSearchCombobox as n } from "./index29.js";
5
1
  import "./index30.js";
6
- import { VENDOR_SECTION_LABELS_EN as r } from "./index31.js";
7
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
8
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.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
- ]
55
- });
56
- }
57
- //#endregion
58
- export { o as VendorSection, o as default };
2
+ import "./index31.js";
@@ -1,2 +1,10 @@
1
- import "./index31.js";
2
- import "./index32.js";
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js
2
+ var e = {
3
+ fieldLabel: "Select or add vendor",
4
+ placeholder: "Search",
5
+ loading: "Searching vendors...",
6
+ emptyResults: "No vendors found",
7
+ addVendorAction: "Add vendor"
8
+ };
9
+ //#endregion
10
+ export { e as VENDOR_SEARCH_COMBOBOX_LABELS_EN };
@@ -1,54 +1,96 @@
1
- import { BILL_DETAIL_BODY_LABELS_EN as e, mergeBillDetailBodyLabels as t } from "./index16.js";
2
- import "./index18.js";
3
- import { BILL_FORM_FIELDS_LABELS_EN as n } from "./index19.js";
4
- import "./index21.js";
5
- import { LINE_ITEMS_SECTION_LABELS_EN as r } from "./index22.js";
6
- import "./index24.js";
7
- import { VENDOR_SECTION_LABELS_EN as i } from "./index31.js";
8
- import "./index33.js";
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 "./index33.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 { Plus as _, Search as v } from "lucide-react";
9
6
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.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
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
- };
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: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(v, {
31
+ "aria-hidden": !0,
32
+ className: "ttw:size-4 ttw:shrink-0 ttw:opacity-50"
33
+ }), /* @__PURE__ */ h("span", {
34
+ className: d("ttw:min-w-0 ttw:flex-1 ttw:truncate", !x && "ttw:text-muted-foreground"),
35
+ children: x || O.placeholder
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
+ }) : C.length === 0 && x ? /* @__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
+ }) : C.length > 0 ? /* @__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}`)) }) : null,
81
+ w || C.length > 0 || x ? /* @__PURE__ */ h(a, {}) : null,
82
+ /* @__PURE__ */ g(r, {
83
+ value: "__add_vendor__",
84
+ onSelect: T,
85
+ className: "ttw:sticky ttw:bottom-0 ttw:bg-popover ttw:text-primary",
86
+ children: [/* @__PURE__ */ h(_, { className: "ttw:size-4 ttw:text-primary" }), O.addVendorAction]
87
+ })
88
+ ]
89
+ })]
90
+ })
91
+ })]
92
+ })]
93
+ });
52
94
  }
53
95
  //#endregion
54
- export { a as BILL_CREATE_SCREEN_LABELS_EN, o as mergeBillCreateScreenLabels };
96
+ export { x as VendorSearchCombobox, x as default };
@@ -1,139 +1,2 @@
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 "./index17.js";
5
- import "./index18.js";
6
- import { BillFormFields as f } from "./index20.js";
7
- import "./index21.js";
8
- import { LineItemsSection as p } from "./index23.js";
9
- import "./index24.js";
10
- import { VendorSection as m } from "./index32.js";
11
1
  import "./index33.js";
12
- import { mergeBillCreateScreenLabels as h } from "./index34.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";
15
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.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,
81
- G ? /* @__PURE__ */ _(d, {
82
- ...P,
83
- labels: W.detailBody
84
- }) : /* @__PURE__ */ v(g, { children: [
85
- /* @__PURE__ */ _(m, {
86
- ...E,
87
- onEdit: N ? void 0 : E.onEdit,
88
- onClear: N ? void 0 : E.onClear,
89
- disabled: N,
90
- labels: W.vendorSection
91
- }),
92
- /* @__PURE__ */ _(f, {
93
- values: D,
94
- errors: O,
95
- onChange: k,
96
- disabled: N,
97
- labels: W.detailsFields
98
- }),
99
- /* @__PURE__ */ _(p, {
100
- ...A,
101
- disabled: A.disabled || F || N,
102
- labels: W.lineItems
103
- })
104
- ] })
105
- ]
106
- }), /* @__PURE__ */ _("div", {
107
- className: "ttw:overflow-y-auto ttw:bg-muted/30 ttw:px-6 ttw:py-6",
108
- children: j
109
- })]
110
- }),
111
- G ? null : /* @__PURE__ */ v("div", {
112
- className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:border-t ttw:border-border ttw:px-6 ttw:py-4",
113
- children: [/* @__PURE__ */ _(e, {
114
- type: "button",
115
- variant: "ghost",
116
- disabled: I,
117
- onClick: z,
118
- children: N ? W.closeButton : W.cancelButton
119
- }), N ? null : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(e, {
120
- type: "button",
121
- variant: "secondary",
122
- onClick: B,
123
- loading: L,
124
- disabled: R || F || E.mode === "creating",
125
- children: W.saveDraftButton
126
- }), /* @__PURE__ */ _(e, {
127
- type: "button",
128
- onClick: V,
129
- loading: R,
130
- disabled: L || F || E.mode === "creating",
131
- children: W.finalizeButton
132
- })] })]
133
- })
134
- ]
135
- })
136
- });
137
- }
138
- //#endregion
139
- export { x as BillCreateScreen, x as default };
2
+ import "./index34.js";
@@ -1,2 +1,13 @@
1
- import "./index34.js";
1
+ import { VENDOR_SUMMARY_CARD_LABELS_EN as e } from "./index30.js";
2
+ import "./index32.js";
3
+ import { VENDOR_SEARCH_COMBOBOX_LABELS_EN as t } from "./index33.js";
2
4
  import "./index35.js";
5
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js
6
+ var n = {
7
+ heading: "Who are you paying?",
8
+ summaryCard: e,
9
+ search: t,
10
+ noVendorPlaceholder: "No vendor selected"
11
+ };
12
+ //#endregion
13
+ export { n as VENDOR_SECTION_LABELS_EN };
@@ -1,7 +1,58 @@
1
+ import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { VendorSummaryCard as t } from "./index31.js";
3
+ import "./index32.js";
4
+ import { VendorSearchCombobox as n } from "./index34.js";
5
+ import "./index35.js";
6
+ import { VENDOR_SECTION_LABELS_EN as r } from "./index36.js";
7
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
1
8
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js
2
- var e = {
3
- title: "Bill pay",
4
- description: "Review, approve, and pay your bills."
5
- };
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
+ ]
55
+ });
56
+ }
6
57
  //#endregion
7
- export { e as DEFAULT_LABELS };
58
+ export { o as VendorSection, o as default };
@@ -1,44 +1,2 @@
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 "./index37.js";
7
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.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__ */ o("div", {
17
- className: "ttw:min-w-0",
18
- children: [/* @__PURE__ */ a("h2", {
19
- className: "ttw:text-xl ttw:font-semibold ttw:text-foreground",
20
- children: d.title
21
- }), /* @__PURE__ */ a("p", {
22
- className: "ttw:mt-1 ttw:text-sm ttw:text-muted-foreground",
23
- children: d.description
24
- })]
25
- }), /* @__PURE__ */ o(e, {
26
- value: l,
27
- onValueChange: u,
28
- className: "ttw:w-full",
29
- children: [/* @__PURE__ */ a(n, {
30
- variant: "line",
31
- children: c.map((e) => /* @__PURE__ */ a(r, {
32
- value: e.id,
33
- children: e.label
34
- }, e.id))
35
- }), c.map((e) => /* @__PURE__ */ a(t, {
36
- value: e.id,
37
- className: "ttw:mt-6",
38
- children: e.content
39
- }, e.id))]
40
- })]
41
- });
42
- }
43
- //#endregion
44
- export { s as BillPayWidgetUi };
1
+ import "./index36.js";
2
+ import "./index37.js";
@@ -1,2 +1,54 @@
1
- import "./index37.js";
1
+ import { BILL_DETAIL_BODY_LABELS_EN as e, mergeBillDetailBodyLabels as t } from "./index21.js";
2
+ import "./index23.js";
3
+ import { BILL_FORM_FIELDS_LABELS_EN as n } from "./index24.js";
4
+ import "./index26.js";
5
+ import { LINE_ITEMS_SECTION_LABELS_EN as r } from "./index27.js";
6
+ import "./index29.js";
7
+ import { VENDOR_SECTION_LABELS_EN as i } from "./index36.js";
2
8
  import "./index38.js";
9
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.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
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
+ }
53
+ //#endregion
54
+ export { a as BILL_CREATE_SCREEN_LABELS_EN, o as mergeBillCreateScreenLabels };