@tesouro/embedded-components-react 0.4.15 → 0.4.16

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 (120) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +5 -4
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +47 -21
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +20 -77
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +75 -24
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +36 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +2 -2
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +64 -48
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +10 -2
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +141 -118
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +93 -93
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +83 -67
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +235 -218
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +5 -5
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +9 -6
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +17 -17
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +2 -2
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +39 -39
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +2 -10
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +8 -50
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +52 -2
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +2 -0
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +26 -49
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +19 -306
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +154 -2
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +2 -9
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +60 -45
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +251 -1
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +2 -18
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +7 -48
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +49 -2
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +2 -23
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +15 -337
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +50 -2
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +2 -16
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +21 -118
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +340 -2
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +2 -12
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +10 -97
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +99 -2
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -12
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +11 -57
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +58 -1
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +1 -54
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +52 -10
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +10 -179
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +181 -1
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +2 -4
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +2 -39
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +41 -2
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -7
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +5 -90
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +92 -2
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -4
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +2 -14
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +16 -2
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -87
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +83 -291
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +292 -9
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +13 -1
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +1 -8
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +6 -37
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +39 -2
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +2 -39
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +36 -9
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +10 -199
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +201 -3
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +3 -17
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +15 -345
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +345 -8
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +6 -4
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +6 -91
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +93 -0
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -127
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +124 -25
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +26 -87
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +89 -2
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -7
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +5 -28
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +30 -2
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -7
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +5 -32
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +34 -2
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -12
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +10 -104
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +105 -1
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +2 -17
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +15 -123
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +125 -2
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +2 -18
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +14 -6
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +7 -167
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +170 -2
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +2 -14
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +11 -105
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +108 -2
  107. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +8 -8
  108. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +4 -4
  109. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +5 -5
  110. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +19 -19
  111. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +39 -33
  112. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +15 -15
  113. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +9 -9
  114. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +7 -7
  115. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +37 -37
  116. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +15 -15
  117. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js +7 -7
  118. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  119. package/package.json +1 -1
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +0 -2
@@ -1,309 +1,22 @@
1
- import { Badge as e, Button as t, Skeleton as n, cn as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ErrorState as i } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
3
- import "../../../shared/ui/dist/index.js";
4
- import { ApprovalPolicyCard as a } from "./index13.js";
5
- import "./index14.js";
6
- import { BillStatusBadge as o } from "./index18.js";
7
- import "./index19.js";
8
- import { DueDateValue as s } from "./index21.js";
9
- import "./index22.js";
10
- import { PaymentHistoryList as c } from "./index23.js";
11
- import "./index24.js";
12
- import { mergeBillDetailBodyLabels as l } from "./index25.js";
13
- import { BillActionButtons as u, NO_BILL_ACTIONS as d } from "./index15.js";
14
- import { AchFieldGroup as f } from "../../../shared/counterpart-management/ui/dist/index5.js";
1
+ import { ACH_FIELD_GROUP_LABELS_EN as e } from "../../../shared/counterpart-management/ui/dist/index2.js";
15
2
  import "../../../shared/counterpart-management/ui/dist/index.js";
16
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
17
- import { AlertTriangle as h, ChevronRight as g } from "lucide-react";
18
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js
19
- var _ = "ttw:text-base ttw:font-semibold", v = "ttw:px-3 ttw:py-2", y = "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:border-b ttw:border-border ttw:py-3 ttw:last:border-b-0";
20
- function b({ view: b, actions: x = d, scheduledSummary: S, paymentInstructionsForm: C, paymentHistoryError: w, paymentHistoryLoading: T, isLoading: E, isError: D, labels: O }) {
21
- let k = l(O);
22
- if (D) return /* @__PURE__ */ p(i, {
23
- title: k.errorTitle,
24
- description: k.errorDescription
25
- });
26
- if (E || !b) return /* @__PURE__ */ m("div", {
27
- "aria-hidden": !0,
28
- className: "ttw:flex ttw:flex-col ttw:gap-6",
29
- children: [
30
- /* @__PURE__ */ p(n, { className: "ttw:h-40 ttw:w-full" }),
31
- /* @__PURE__ */ p(n, { className: "ttw:h-32 ttw:w-full" }),
32
- /* @__PURE__ */ p(n, { className: "ttw:h-24 ttw:w-full" })
33
- ]
34
- });
35
- let A = !b.payTo.paymentInstructionsLabel && C;
36
- return /* @__PURE__ */ m("div", {
37
- className: "ttw:flex ttw:flex-col ttw:gap-6",
38
- children: [
39
- A ? /* @__PURE__ */ m("div", {
40
- className: "ttw:flex ttw:items-center ttw:gap-3 ttw:rounded-md ttw:border ttw:border-amber-200 ttw:bg-amber-50 ttw:px-3 ttw:py-2.5",
41
- children: [
42
- /* @__PURE__ */ p(h, { className: "ttw:size-4 ttw:shrink-0 ttw:text-amber-800" }),
43
- /* @__PURE__ */ p("p", {
44
- className: "ttw:flex-1 ttw:text-sm ttw:text-foreground",
45
- children: k.missingPaymentInstructionsBanner
46
- }),
47
- /* @__PURE__ */ p(t, {
48
- type: "button",
49
- variant: "outline",
50
- size: "sm",
51
- onClick: C.onOpen,
52
- children: k.addPaymentInstructions
53
- })
54
- ]
55
- }) : null,
56
- /* @__PURE__ */ m("section", {
57
- className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted/50 ttw:p-4",
58
- children: [
59
- b.paidOnLabel ? /* @__PURE__ */ m("div", {
60
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6",
61
- children: [/* @__PURE__ */ m("div", {
62
- className: "ttw:flex ttw:flex-col ttw:gap-1",
63
- children: [/* @__PURE__ */ p("span", {
64
- className: "ttw:text-sm ttw:text-muted-foreground",
65
- children: k.amountDueHeading
66
- }), /* @__PURE__ */ p("span", {
67
- className: "ttw:text-3xl ttw:font-semibold",
68
- children: b.amountDue
69
- })]
70
- }), /* @__PURE__ */ m("div", {
71
- className: "ttw:flex ttw:flex-col ttw:gap-1",
72
- children: [/* @__PURE__ */ p("span", {
73
- className: "ttw:text-sm ttw:text-muted-foreground",
74
- children: k.amountPaidHeading
75
- }), /* @__PURE__ */ p("span", {
76
- className: "ttw:text-3xl ttw:font-semibold ttw:text-emerald-600",
77
- children: b.amountPaid
78
- })]
79
- })]
80
- }) : /* @__PURE__ */ m("div", {
81
- className: "ttw:flex ttw:flex-col ttw:gap-1",
82
- children: [/* @__PURE__ */ p("span", {
83
- className: "ttw:text-sm ttw:text-muted-foreground",
84
- children: k.amountDueHeading
85
- }), /* @__PURE__ */ p("span", {
86
- className: "ttw:text-3xl ttw:font-semibold",
87
- children: b.amountDue
88
- })]
89
- }),
90
- /* @__PURE__ */ p("div", { children: b.paidOnLabel ? /* @__PURE__ */ p(e, {
91
- variant: "outline",
92
- className: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700",
93
- children: b.paidOnLabel
94
- }) : /* @__PURE__ */ p(o, {
95
- status: b.status,
96
- tone: b.statusTone,
97
- labels: k.statusBadge
98
- }) }),
99
- /* @__PURE__ */ m("div", {
100
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6",
101
- children: [/* @__PURE__ */ m("div", {
102
- className: "ttw:flex ttw:flex-col",
103
- children: [/* @__PURE__ */ p("span", {
104
- className: "ttw:text-xs ttw:text-muted-foreground",
105
- children: k.invoiceDateLabel
106
- }), /* @__PURE__ */ p("span", {
107
- className: "ttw:text-sm ttw:font-medium",
108
- children: b.invoiceDateLabel
109
- })]
110
- }), /* @__PURE__ */ m("div", {
111
- className: "ttw:flex ttw:flex-col",
112
- children: [/* @__PURE__ */ p("span", {
113
- className: "ttw:text-xs ttw:text-muted-foreground",
114
- children: k.dueDateLabel
115
- }), /* @__PURE__ */ p(s, {
116
- className: "ttw:text-sm ttw:font-medium",
117
- value: b.dueDateLabel,
118
- tone: b.dueDateTone,
119
- labels: k.dueDate
120
- })]
121
- })]
122
- }),
123
- S ? /* @__PURE__ */ p("div", { children: /* @__PURE__ */ p(e, {
124
- variant: "outline",
125
- className: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700",
126
- children: S
127
- }) }) : x.row.length ? /* @__PURE__ */ p("div", {
128
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
129
- children: /* @__PURE__ */ p(u, { actions: x.row })
130
- }) : null
131
- ]
132
- }),
133
- /* @__PURE__ */ m("section", {
134
- className: "ttw:flex ttw:flex-col ttw:gap-1",
135
- children: [
136
- /* @__PURE__ */ p("h3", {
137
- className: _,
138
- children: b.paidOnLabel ? k.payToHeadingPaid : k.payToHeading
139
- }),
140
- /* @__PURE__ */ m("div", {
141
- className: y,
142
- children: [/* @__PURE__ */ p("span", {
143
- className: "ttw:text-sm ttw:text-muted-foreground",
144
- children: k.vendorRow
145
- }), /* @__PURE__ */ m("div", {
146
- className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-right",
147
- children: [/* @__PURE__ */ m("div", {
148
- className: "ttw:flex ttw:flex-col",
149
- children: [/* @__PURE__ */ p("span", {
150
- className: "ttw:text-sm ttw:font-medium ttw:text-primary",
151
- children: b.payTo.name
152
- }), b.payTo.email ? /* @__PURE__ */ p("span", {
153
- className: "ttw:text-xs ttw:text-muted-foreground",
154
- children: b.payTo.email
155
- }) : null]
156
- }), /* @__PURE__ */ p(g, {
157
- "aria-hidden": !0,
158
- className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground"
159
- })]
160
- })]
161
- }),
162
- /* @__PURE__ */ m("div", {
163
- className: y,
164
- children: [/* @__PURE__ */ p("span", {
165
- className: "ttw:text-sm ttw:text-muted-foreground",
166
- children: k.paymentInstructionsRow
167
- }), /* @__PURE__ */ m("div", {
168
- className: "ttw:flex ttw:items-center ttw:gap-2",
169
- children: [b.payTo.paymentInstructionsLabel ? /* @__PURE__ */ p("span", {
170
- className: "ttw:text-sm ttw:font-medium",
171
- children: b.payTo.paymentInstructionsLabel
172
- }) : C ? /* @__PURE__ */ p("button", {
173
- type: "button",
174
- onClick: C.onOpen,
175
- className: "ttw:text-sm ttw:font-medium ttw:text-destructive",
176
- children: k.addPaymentInstructions
177
- }) : /* @__PURE__ */ p("span", {
178
- className: "ttw:text-sm ttw:font-medium ttw:text-destructive",
179
- children: k.addPaymentInstructions
180
- }), /* @__PURE__ */ p(g, {
181
- "aria-hidden": !0,
182
- className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground"
183
- })]
184
- })]
185
- }),
186
- C?.isOpen ? /* @__PURE__ */ m("div", {
187
- className: "ttw:mt-2 ttw:rounded-lg ttw:border ttw:border-border ttw:p-4",
188
- children: [/* @__PURE__ */ p(f, {
189
- idPrefix: "bill-detail-payment-instructions",
190
- values: C.values,
191
- errors: C.errors,
192
- onChange: C.onChange
193
- }), /* @__PURE__ */ m("div", {
194
- className: "ttw:mt-4 ttw:flex ttw:justify-end ttw:gap-2",
195
- children: [/* @__PURE__ */ p(t, {
196
- type: "button",
197
- variant: "ghost",
198
- onClick: C.onCancel,
199
- children: k.paymentInstructionsCancel
200
- }), /* @__PURE__ */ p(t, {
201
- type: "button",
202
- loading: C.isSaving,
203
- onClick: C.onSave,
204
- children: k.paymentInstructionsSave
205
- })]
206
- })]
207
- }) : null
208
- ]
209
- }),
210
- b.paymentHistory.length || w || T ? /* @__PURE__ */ m("section", {
211
- className: "ttw:flex ttw:flex-col ttw:gap-3",
212
- children: [/* @__PURE__ */ p("h3", {
213
- className: _,
214
- children: k.paymentHistoryHeading
215
- }), w ? /* @__PURE__ */ p("p", {
216
- className: "ttw:text-sm ttw:text-muted-foreground",
217
- children: k.paymentHistoryErrorDescription
218
- }) : T ? /* @__PURE__ */ p(n, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ p(c, { records: b.paymentHistory })]
219
- }) : null,
220
- /* @__PURE__ */ p("dl", {
221
- className: "ttw:flex ttw:flex-col",
222
- children: b.invoiceFields.map((e) => /* @__PURE__ */ m("div", {
223
- className: y,
224
- children: [/* @__PURE__ */ p("dt", {
225
- className: "ttw:text-sm ttw:text-muted-foreground",
226
- children: e.label
227
- }), /* @__PURE__ */ p("dd", {
228
- className: "ttw:text-right ttw:text-sm ttw:font-medium",
229
- children: e.value
230
- })]
231
- }, e.label))
232
- }),
233
- /* @__PURE__ */ p("section", { children: /* @__PURE__ */ m("table", {
234
- className: "ttw:w-full ttw:text-sm",
235
- children: [/* @__PURE__ */ p("thead", { children: /* @__PURE__ */ m("tr", {
236
- className: "ttw:bg-muted/50 ttw:text-xs ttw:text-muted-foreground",
237
- children: [
238
- /* @__PURE__ */ p("th", {
239
- className: r(v, "ttw:text-left ttw:font-normal"),
240
- children: k.descriptionAndGlCodeColumn
241
- }),
242
- /* @__PURE__ */ p("th", {
243
- className: r(v, "ttw:text-right ttw:font-normal"),
244
- children: k.qtyPriceColumn
245
- }),
246
- /* @__PURE__ */ p("th", {
247
- className: r(v, "ttw:text-right ttw:font-normal"),
248
- children: k.amountColumn
249
- })
250
- ]
251
- }) }), /* @__PURE__ */ m("tbody", { children: [b.lineItems.map((e) => /* @__PURE__ */ m("tr", {
252
- className: "ttw:border-b ttw:border-border",
253
- children: [
254
- /* @__PURE__ */ p("td", {
255
- className: v,
256
- children: /* @__PURE__ */ m("div", {
257
- className: "ttw:flex ttw:flex-col",
258
- children: [/* @__PURE__ */ p("span", { children: e.description }), /* @__PURE__ */ p("span", {
259
- className: "ttw:text-xs ttw:text-muted-foreground",
260
- children: e.glCodeLabel
261
- })]
262
- })
263
- }),
264
- /* @__PURE__ */ p("td", {
265
- className: r(v, "ttw:text-right ttw:whitespace-nowrap ttw:text-muted-foreground"),
266
- children: e.qtyPriceLabel
267
- }),
268
- /* @__PURE__ */ p("td", {
269
- className: r(v, "ttw:text-right ttw:whitespace-nowrap"),
270
- children: e.amount
271
- })
272
- ]
273
- }, e.id)), b.amountRows.map((e) => /* @__PURE__ */ m("tr", {
274
- className: r(e.emphasis ? "ttw:font-semibold" : "ttw:text-muted-foreground"),
275
- children: [/* @__PURE__ */ p("td", {
276
- colSpan: 2,
277
- className: v,
278
- children: e.label
279
- }), /* @__PURE__ */ p("td", {
280
- className: r(v, "ttw:text-right ttw:whitespace-nowrap", e.emphasis && "ttw:text-foreground"),
281
- children: e.value
282
- })]
283
- }, e.label))] })]
284
- }) }),
285
- b.approvalPolicy ? /* @__PURE__ */ p(a, {
286
- view: b.approvalPolicy,
287
- labels: k.approvalPolicy
288
- }) : null,
289
- b.history.length ? /* @__PURE__ */ m("section", {
290
- className: "ttw:flex ttw:flex-col ttw:gap-3",
291
- children: [/* @__PURE__ */ p("h3", {
292
- className: _,
293
- children: k.historyHeading
294
- }), /* @__PURE__ */ p("ul", {
295
- className: "ttw:flex ttw:flex-col",
296
- children: b.history.map((e) => /* @__PURE__ */ m("li", {
297
- className: "ttw:flex ttw:gap-6 ttw:border-b ttw:border-border ttw:py-3 ttw:text-sm ttw:last:border-b-0",
298
- children: [/* @__PURE__ */ p("span", {
299
- className: "ttw:w-28 ttw:shrink-0 ttw:text-muted-foreground",
300
- children: e.dateLabel
301
- }), /* @__PURE__ */ p("span", { children: e.description })]
302
- }, e.id))
303
- })]
304
- }) : null
305
- ]
306
- });
307
- }
4
+ var t = {
5
+ payToHeading: "Pay to",
6
+ editAction: "Edit",
7
+ clearAction: "Clear",
8
+ paymentInstructionsHeading: "Payment instructions",
9
+ paymentInstructionsDescription: "How and where will the money be sent. This information is required to send a payment.",
10
+ addPaymentInstructions: "Add payment instructions",
11
+ saveAction: "Save",
12
+ cancelAction: "Cancel",
13
+ discardConfirmTitle: "Discard payment instructions?",
14
+ discardConfirmDescription: "Your changes will be lost if you stop editing now.",
15
+ keepEditingAction: "Keep editing",
16
+ discardChangesAction: "Discard changes",
17
+ ach: e,
18
+ revealField: (e) => `Show ${e.toLowerCase()}`,
19
+ hideField: (e) => `Hide ${e.toLowerCase()}`
20
+ };
308
21
  //#endregion
309
- export { b as BillDetailBody, b as default };
22
+ export { t as VENDOR_SUMMARY_CARD_LABELS_EN };
@@ -1,2 +1,154 @@
1
- import "./index25.js";
2
- import "./index26.js";
1
+ import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { VENDOR_SUMMARY_CARD_LABELS_EN as s } from "./index26.js";
3
+ import { AchEditGroup as c } from "./index25.js";
4
+ import { useMemo as l, useState as u } from "react";
5
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
6
+ import { Eye as m, EyeOff as h, Pencil as g, Plus as _, X as v } from "lucide-react";
7
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js
8
+ function y({ field: e, labels: t }) {
9
+ let [n, r] = u(!1), i = !!e.maskedValue, a = i && !n ? e.maskedValue : e.value;
10
+ return /* @__PURE__ */ p("div", {
11
+ className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-sm",
12
+ children: [
13
+ /* @__PURE__ */ f("span", {
14
+ className: "ttw:w-44 ttw:shrink-0 ttw:text-muted-foreground",
15
+ children: e.label
16
+ }),
17
+ /* @__PURE__ */ f("span", {
18
+ className: "ttw:text-foreground",
19
+ children: a
20
+ }),
21
+ i ? /* @__PURE__ */ f("button", {
22
+ type: "button",
23
+ onClick: () => r((e) => !e),
24
+ "aria-label": n ? t.hideField(e.label) : t.revealField(e.label),
25
+ className: "ttw:text-muted-foreground ttw:hover:text-foreground",
26
+ children: f(n ? h : m, { className: "ttw:size-4" })
27
+ }) : null
28
+ ]
29
+ });
30
+ }
31
+ function b({ summary: m, onEdit: h, onClear: b, paymentInstructions: x, instructionsCollapsed: S, testId: C, labels: w }) {
32
+ let [T, E] = u(!1), D = l(() => ({
33
+ ...s,
34
+ ...w,
35
+ ach: {
36
+ ...s.ach,
37
+ ...w?.ach
38
+ }
39
+ }), [w]);
40
+ return /* @__PURE__ */ p("div", {
41
+ className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-muted/30 ttw:p-4",
42
+ "data-testid": C,
43
+ children: [
44
+ /* @__PURE__ */ p("div", {
45
+ className: "ttw:flex ttw:items-start ttw:justify-between",
46
+ children: [/* @__PURE__ */ p("div", {
47
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
48
+ children: [
49
+ /* @__PURE__ */ f("span", {
50
+ className: "ttw:text-xs ttw:text-muted-foreground",
51
+ children: D.payToHeading
52
+ }),
53
+ /* @__PURE__ */ f("span", {
54
+ className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
55
+ children: m.name
56
+ }),
57
+ /* @__PURE__ */ f("span", {
58
+ className: "ttw:text-sm ttw:text-muted-foreground",
59
+ children: m.email
60
+ })
61
+ ]
62
+ }), /* @__PURE__ */ p("div", {
63
+ className: "ttw:flex ttw:items-center ttw:gap-2",
64
+ children: [
65
+ h && !x?.isOpen ? /* @__PURE__ */ f(o, {
66
+ type: "button",
67
+ variant: "ghost",
68
+ size: "icon",
69
+ "aria-label": D.editAction,
70
+ onClick: h,
71
+ children: /* @__PURE__ */ f(g, { className: "ttw:size-4" })
72
+ }) : null,
73
+ h && !x?.isOpen && b ? /* @__PURE__ */ f("div", {
74
+ "aria-hidden": !0,
75
+ className: "ttw:h-5 ttw:w-px ttw:bg-border"
76
+ }) : null,
77
+ b ? /* @__PURE__ */ f(o, {
78
+ type: "button",
79
+ variant: "ghost",
80
+ size: "icon",
81
+ "aria-label": D.clearAction,
82
+ onClick: b,
83
+ children: /* @__PURE__ */ f(v, { className: "ttw:size-4" })
84
+ }) : null
85
+ ]
86
+ })]
87
+ }),
88
+ m.fields.length ? x?.isOpen ? /* @__PURE__ */ f("div", {
89
+ className: "ttw:mt-3 ttw:flex ttw:flex-col ttw:gap-3",
90
+ children: /* @__PURE__ */ f(c, {
91
+ paymentInstructions: x,
92
+ labels: D,
93
+ onCancel: () => E(!0)
94
+ })
95
+ }) : S ? /* @__PURE__ */ f("p", {
96
+ className: "ttw:mt-3 ttw:text-sm ttw:text-muted-foreground",
97
+ children: m.methodLabel
98
+ }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("p", {
99
+ className: "ttw:mt-3 ttw:text-xs ttw:text-muted-foreground",
100
+ children: m.methodLabel
101
+ }), /* @__PURE__ */ f("div", {
102
+ className: "ttw:mt-2 ttw:flex ttw:flex-col ttw:gap-1",
103
+ children: m.fields.map((e) => /* @__PURE__ */ f(y, {
104
+ field: e,
105
+ labels: D
106
+ }, `${e.label}:${e.value}:${e.maskedValue ?? ""}`))
107
+ })] }) : /* @__PURE__ */ p("div", {
108
+ className: "ttw:mt-4 ttw:flex ttw:flex-col ttw:gap-3",
109
+ children: [/* @__PURE__ */ p("div", {
110
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
111
+ children: [/* @__PURE__ */ f("p", {
112
+ className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
113
+ children: D.paymentInstructionsHeading
114
+ }), /* @__PURE__ */ f("p", {
115
+ className: "ttw:text-sm ttw:text-muted-foreground",
116
+ children: D.paymentInstructionsDescription
117
+ })]
118
+ }), x?.isOpen ? /* @__PURE__ */ f(c, {
119
+ paymentInstructions: x,
120
+ labels: D,
121
+ onCancel: () => E(!0)
122
+ }) : x ? /* @__PURE__ */ p(o, {
123
+ type: "button",
124
+ variant: "link",
125
+ className: "ttw:w-fit ttw:px-0",
126
+ onClick: x.onOpen,
127
+ children: [/* @__PURE__ */ f(_, { className: "ttw:size-4" }), D.addPaymentInstructions]
128
+ }) : /* @__PURE__ */ f("p", {
129
+ className: "ttw:text-sm ttw:text-muted-foreground",
130
+ children: m.methodLabel
131
+ })]
132
+ }),
133
+ /* @__PURE__ */ f(e, {
134
+ open: T,
135
+ onOpenChange: E,
136
+ children: /* @__PURE__ */ p(t, { children: [/* @__PURE__ */ p(i, { children: [/* @__PURE__ */ f(a, { children: D.discardConfirmTitle }), /* @__PURE__ */ f(n, { children: D.discardConfirmDescription })] }), /* @__PURE__ */ p(r, { children: [/* @__PURE__ */ f(o, {
137
+ type: "button",
138
+ variant: "outline",
139
+ onClick: () => E(!1),
140
+ children: D.keepEditingAction
141
+ }), /* @__PURE__ */ f(o, {
142
+ type: "button",
143
+ variant: "destructive",
144
+ onClick: () => {
145
+ E(!1), x?.onCancel?.();
146
+ },
147
+ children: D.discardChangesAction
148
+ })] })] })
149
+ })
150
+ ]
151
+ });
152
+ }
153
+ //#endregion
154
+ export { b as VendorSummaryCard, b as default };
@@ -1,9 +1,2 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js
2
- var e = {
3
- invoiceNumber: "Invoice number",
4
- invoiceDate: "Invoice date",
5
- dueDate: "Due date",
6
- poNumber: "PO number (optional)"
7
- };
8
- //#endregion
9
- export { e as BILL_FORM_FIELDS_LABELS_EN };
1
+ import "./index26.js";
2
+ import "./index27.js";
@@ -1,49 +1,64 @@
1
- import { Input as e, Label as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BILL_FORM_FIELDS_LABELS_EN as n } from "./index28.js";
3
- import { useId as r } from "react";
4
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
1
+ import { APPROVAL_POLICY_CARD_LABELS_EN as e } from "./index12.js";
2
+ import "./index14.js";
3
+ import { BILL_STATUS_BADGE_LABELS_EN as t } from "./index16.js";
4
+ import "./index19.js";
5
+ import { DUE_DATE_VALUE_LABELS_EN as n } from "./index20.js";
6
+ import "./index22.js";
7
+ import { VENDOR_SUMMARY_CARD_LABELS_EN as r } from "./index26.js";
8
+ import "./index28.js";
5
9
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js
6
- function o({ values: o, errors: s, onChange: c, disabled: l, testId: u, labels: d }) {
7
- let f = {
8
- ...n,
9
- ...d
10
- }, p = r(), m = (n, r, u) => {
11
- let d = `${p}-${n}`, f = `${d}-error`, m = s?.[n];
12
- return /* @__PURE__ */ a("div", {
13
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
14
- children: [
15
- /* @__PURE__ */ i(t, {
16
- htmlFor: d,
17
- children: r
18
- }),
19
- /* @__PURE__ */ i(e, {
20
- id: d,
21
- type: u,
22
- value: o[n],
23
- disabled: l,
24
- "aria-invalid": m ? !0 : void 0,
25
- "aria-describedby": m ? f : void 0,
26
- onChange: (e) => c({ [n]: e.target.value })
27
- }),
28
- m ? /* @__PURE__ */ i("p", {
29
- id: f,
30
- className: "ttw:text-sm ttw:text-destructive",
31
- children: m
32
- }) : null
33
- ]
34
- });
10
+ var i = {
11
+ errorTitle: "Couldn't load this bill",
12
+ errorDescription: "Something went wrong. Try again.",
13
+ amountDueHeading: "Amount due",
14
+ amountPaidHeading: "Amount paid",
15
+ invoiceDateLabel: "Invoice date",
16
+ dueDateLabel: "Due date",
17
+ payToHeading: "Pay to",
18
+ payToHeadingPaid: "Paid to",
19
+ vendorRow: "Vendor",
20
+ paymentInstructionsRow: "Payment instructions",
21
+ addPaymentInstructions: "Add payment instructions",
22
+ missingPaymentInstructionsBanner: "Missing payment instructions, which are required to send a payment",
23
+ descriptionAndGlCodeColumn: "Description and GL code",
24
+ qtyPriceColumn: "Qty/Price",
25
+ amountColumn: "Amount",
26
+ paymentHistoryHeading: "Payment history",
27
+ paymentHistoryErrorDescription: "Couldn't load payment history.",
28
+ historyHeading: "Audit history",
29
+ statusBadge: t,
30
+ approvalPolicy: e,
31
+ dueDate: n,
32
+ payToCard: {
33
+ ...r,
34
+ editAction: "Edit payment instructions"
35
+ }
36
+ };
37
+ function a(e) {
38
+ return {
39
+ ...i,
40
+ ...e,
41
+ statusBadge: {
42
+ ...i.statusBadge,
43
+ ...e?.statusBadge
44
+ },
45
+ approvalPolicy: {
46
+ ...i.approvalPolicy,
47
+ ...e?.approvalPolicy
48
+ },
49
+ dueDate: {
50
+ ...i.dueDate,
51
+ ...e?.dueDate
52
+ },
53
+ payToCard: {
54
+ ...i.payToCard,
55
+ ...e?.payToCard,
56
+ ach: {
57
+ ...i.payToCard.ach,
58
+ ...e?.payToCard?.ach
59
+ }
60
+ }
35
61
  };
36
- return /* @__PURE__ */ a("div", {
37
- className: "ttw:flex ttw:flex-col ttw:gap-4",
38
- "data-testid": u,
39
- children: [/* @__PURE__ */ a("div", {
40
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
41
- children: [m("invoiceDate", f.invoiceDate, "date"), m("dueDate", f.dueDate, "date")]
42
- }), /* @__PURE__ */ a("div", {
43
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
44
- children: [m("invoiceNumber", f.invoiceNumber), m("poNumber", f.poNumber)]
45
- })]
46
- });
47
62
  }
48
63
  //#endregion
49
- export { o as BillFormFields, o as default };
64
+ export { i as BILL_DETAIL_BODY_LABELS_EN, a as mergeBillDetailBodyLabels };