@tesouro/embedded-components-react 0.5.27 → 0.5.29

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 (121) hide show
  1. package/dist/index.css +18 -6
  2. package/dist/index.js +1 -1
  3. package/dist/lib/BillPayWidget.js +1 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +5 -5
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +2 -44
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +7 -7
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +1 -1
  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/index27.js +2 -2
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +52 -67
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +15 -12
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +57 -62
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +68 -207
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +278 -175
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +13 -126
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +47 -12
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +53 -47
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +204 -49
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +32 -202
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +234 -32
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +21 -240
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +532 -19
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +4 -436
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +42 -4
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +230 -35
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +3 -233
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +4 -3
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +44 -2
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +1 -46
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -1
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +11 -6
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +127 -11
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +3 -129
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +127 -3
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +8 -124
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +7 -8
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +46 -8
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +18 -43
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +28 -20
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +82 -27
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +47 -83
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +250 -47
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +122 -241
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +206 -126
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +3 -213
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +8 -4
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +113 -6
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +1 -115
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +24 -0
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +39 -33
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +10 -11
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +123 -8
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +2 -170
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +18 -2
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +7 -11
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +158 -96
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index107.js +1 -1
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index108.js +11 -7
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js +100 -44
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index111.js +10 -0
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index112.js +52 -0
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index113.js +2 -0
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +1 -1
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +20 -22
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +4 -9
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +103 -146
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +3 -2
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +93 -88
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +15 -16
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +1 -0
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +43 -29
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +55 -51
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +9 -2
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +33 -1
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +2 -8
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +2 -39
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +0 -1
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +6 -2
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +34 -31
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +2 -37
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +34 -10
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -201
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +39 -3
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +3 -8
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +187 -350
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +3 -10
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +13 -5
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +356 -85
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +10 -0
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +9 -2
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +87 -119
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -94
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +125 -2
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +25 -4
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +90 -26
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +3 -3
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +26 -30
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +4 -9
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +30 -102
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +9 -14
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +85 -104
  104. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index128.js +3 -0
  105. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index186.js +1 -1
  106. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index197.js +1 -1
  107. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index495.js +1 -1
  108. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index503.js +291 -351
  109. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index506.js +13 -21
  110. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index507.js +30 -30
  111. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index509.js +2 -2
  112. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index615.js +1 -1
  113. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +5 -5
  114. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +17 -17
  115. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +4 -0
  116. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +92 -87
  117. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  118. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  119. package/package.json +1 -1
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +0 -25
  121. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +0 -28
@@ -1,14 +1,17 @@
1
- import { BILL_REJECTED_BANNER_LABELS_EN as e } from "../../ui/dist/index71.js";
2
- import { UNSAVED_BILL_DIALOG_LABELS_EN as t } from "../../ui/dist/index108.js";
1
+ import { ACH_FIELD_GROUP_LABELS_EN as e } from "../../../shared/counterpart-management/ui/dist/index2.js";
2
+ import "../../../shared/counterpart-management/ui/dist/index.js";
3
+ import { DISCARD_CHANGES_DIALOG_LABELS_EN as t } from "../../ui/dist/index66.js";
4
+ import { BILL_REJECTED_BANNER_LABELS_EN as n } from "../../ui/dist/index74.js";
5
+ import { UNSAVED_BILL_DIALOG_LABELS_EN as r } from "../../ui/dist/index111.js";
3
6
  import "../../ui/dist/index.js";
4
- import { PAY_BILL_FLOW_LABELS_EN as n, mergePayBillFlowLabels as r } from "./index25.js";
5
- import { MARK_AS_PAID_FLOW_LABELS_EN as i, mergeMarkAsPaidFlowLabels as a } from "./index15.js";
7
+ import { PAY_BILL_FLOW_LABELS_EN as i, mergePayBillFlowLabels as a } from "./index25.js";
8
+ import { MARK_AS_PAID_FLOW_LABELS_EN as o, mergeMarkAsPaidFlowLabels as s } from "./index15.js";
6
9
  import "./index18.js";
7
- import { APPROVAL_POLICY_RULE_COPY_EN as o } from "./index29.js";
8
- import { BILL_DETAIL_ACTIONS_LABELS_EN as s, PAYMENT_HISTORY_LABELS_EN as c, SCHEDULED_SUMMARY_LABEL_EN as l, mergeBillDetailActionsLabels as u, mergePaymentHistoryMethodLabels as d } from "./index46.js";
9
- import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as f } from "./index47.js";
10
+ import { APPROVAL_POLICY_RULE_COPY_EN as c } from "./index29.js";
11
+ import { AWAITING_APPROVAL_LABEL_EN as l, AWAITING_APPROVAL_UNKNOWN_LABEL_EN as u, BILL_DETAIL_ACTIONS_LABELS_EN as d, PAYMENT_HISTORY_LABELS_EN as f, SCHEDULED_STATUS_BADGE_LABEL_EN as p, SCHEDULED_SUMMARY_LABEL_EN as m, mergeBillDetailActionsLabels as h, mergePaymentHistoryMethodLabels as g } from "./index46.js";
12
+ import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as _ } from "./index47.js";
10
13
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js
11
- var p = {
14
+ var v = {
12
15
  unmappedValidationError: (e, t) => `${e}: ${t}`,
13
16
  unknownValidationField: "(unknown field)",
14
17
  requiredField: "This field is required.",
@@ -27,30 +30,24 @@ var p = {
27
30
  unreadableTax: "Enter a valid tax amount.",
28
31
  unreadableTotal: "Enter a valid total amount.",
29
32
  totalNotGreaterThanZero: "Total amount must be greater than $0."
30
- }, m = {
31
- achMethod: "via ACH bank transfer",
33
+ }, y = {
34
+ paymentInstructionsValue: (e) => `Account ending in ${e}`,
32
35
  noMethod: "No payment method on file",
33
- accountHolder: "Account holder",
34
- routingNumber: "Routing number",
35
- accountNumber: "Account number",
36
36
  paymentMethodLoading: "Loading payment method...",
37
37
  paymentMethodUnavailable: "We could not load payment methods. Try again.",
38
38
  searchFailed: "We could not load vendors. Try again.",
39
39
  vendorDetailsFailed: "We could not load this vendor. Try again."
40
- }, h = {
40
+ }, b = {
41
41
  attachFailed: "We could not attach that file. Try again.",
42
42
  deleteFailed: "We could not remove that document. Try again.",
43
43
  noDocument: "No document attached to this bill.",
44
44
  pendingDeletionNotice: "This document will be removed when you save this bill.",
45
- preview: f
46
- }, g = {
47
- ...c,
45
+ preview: _
46
+ }, x = {
47
+ ...f,
48
48
  notProvided: "Not provided",
49
49
  paymentInstructionsValue: (e) => `Account ending in ${e}`,
50
50
  paymentInstructionsNotSet: "Not set",
51
- accountHolderFieldLabel: "Account holder",
52
- routingNumberFieldLabel: "Routing number",
53
- accountNumberFieldLabel: "Account number",
54
51
  invoiceDateRow: "Invoice date",
55
52
  dueDateRow: "Due date",
56
53
  invoiceNumberRow: "Invoice number",
@@ -68,7 +65,7 @@ var p = {
68
65
  rejectedByOn: (e, t) => `Rejected by ${e} on ${t}`,
69
66
  rejectedOn: (e) => `Rejected on ${e}`,
70
67
  rejectionMessage: (e) => `"${e}"`
71
- }, _ = {
68
+ }, S = {
72
69
  dateLabel: (e) => new Date(e).toLocaleString("en-US", {
73
70
  month: "short",
74
71
  day: "numeric",
@@ -92,20 +89,24 @@ var p = {
92
89
  markedAsPartiallyPaid: "Marked as partially paid",
93
90
  paymentReverted: "Payment reverted",
94
91
  statusChanged: (e) => `Status changed to ${e}`
95
- }, v = {
92
+ }, C = {
96
93
  newTitle: "New bill",
97
94
  extractedTitle: (e) => `Bill from ${e}`,
98
95
  viewTitle: (e) => `Bill from ${e}`,
99
96
  readOnlyTitle: "Bill details",
100
97
  addedOn: (e) => `Added on ${e}`,
101
- unsavedChanges: t,
102
- scheduledSummary: l,
103
- actions: s,
104
- detail: g,
105
- history: _,
106
- payBill: n,
107
- markAsPaid: i,
108
- approvalPolicyCopy: o,
98
+ unsavedChanges: r,
99
+ discardChanges: t,
100
+ scheduledSummary: m,
101
+ scheduledStatusBadge: p,
102
+ awaitingApprovalNotice: l,
103
+ awaitingApprovalUnknownNotice: u,
104
+ actions: d,
105
+ detail: x,
106
+ history: S,
107
+ payBill: i,
108
+ markAsPaid: o,
109
+ approvalPolicyCopy: c,
109
110
  deleteDraft: {
110
111
  menuItem: "Delete draft",
111
112
  dialog: {
@@ -120,46 +121,50 @@ var p = {
120
121
  noAccess: "You don't have access to GL codes",
121
122
  empty: "No GL codes set up yet"
122
123
  },
123
- rejectedBanner: e
124
+ rejectedBanner: n
124
125
  };
125
- function y(e) {
126
+ function w(e) {
126
127
  return {
127
- ...v,
128
+ ...C,
128
129
  ...e,
129
- actions: u(e?.actions),
130
+ actions: h(e?.actions),
130
131
  detail: {
131
- ...v.detail,
132
+ ...C.detail,
132
133
  ...e?.detail,
133
- paymentHistoryMethodLabels: d(e?.detail?.paymentHistoryMethodLabels)
134
+ paymentHistoryMethodLabels: g(e?.detail?.paymentHistoryMethodLabels)
134
135
  },
135
136
  history: {
136
- ...v.history,
137
+ ...C.history,
137
138
  ...e?.history
138
139
  },
139
- payBill: r(e?.payBill),
140
- markAsPaid: a(e?.markAsPaid),
140
+ payBill: a(e?.payBill),
141
+ markAsPaid: s(e?.markAsPaid),
141
142
  lineItemsGlCodeUnavailable: {
142
- ...v.lineItemsGlCodeUnavailable,
143
+ ...C.lineItemsGlCodeUnavailable,
143
144
  ...e?.lineItemsGlCodeUnavailable
144
145
  },
145
146
  unsavedChanges: {
146
- ...v.unsavedChanges,
147
+ ...C.unsavedChanges,
147
148
  ...e?.unsavedChanges
148
149
  },
150
+ discardChanges: {
151
+ ...C.discardChanges,
152
+ ...e?.discardChanges
153
+ },
149
154
  rejectedBanner: {
150
- ...v.rejectedBanner,
155
+ ...C.rejectedBanner,
151
156
  ...e?.rejectedBanner
152
157
  },
153
158
  approvalPolicyCopy: {
154
- ...v.approvalPolicyCopy,
159
+ ...C.approvalPolicyCopy,
155
160
  ...e?.approvalPolicyCopy
156
161
  },
157
162
  deleteDraft: {
158
- ...v.deleteDraft,
163
+ ...C.deleteDraft,
159
164
  ...e?.deleteDraft,
160
165
  dialog: (() => {
161
166
  let t = {
162
- ...v.deleteDraft.dialog,
167
+ ...C.deleteDraft.dialog,
163
168
  ...e?.deleteDraft?.dialog
164
169
  };
165
170
  return delete t.reason, t;
@@ -167,27 +172,17 @@ function y(e) {
167
172
  }
168
173
  };
169
174
  }
170
- var b = {
175
+ var T = {
171
176
  createTitle: "New vendor",
172
177
  editTitle: "Edit vendor",
173
- close: "Close the vendor form",
178
+ switchVendorFieldLabel: "Switch to a different vendor",
174
179
  nameLabel: "Name",
180
+ addPaymentInstructions: "Add payment instructions",
181
+ cancelPaymentInstructions: "Cancel",
182
+ ach: e,
175
183
  addAddress: "Add address (optional)",
176
- paymentMethodsHeading: "Accepted payment methods",
177
- paymentMethodsDescription: "How and where will the money be sent. Don't have these yet? No problem. You can save this vendor and add their payment details later — you just won't be able to send payments until you do.",
178
- achTitle: "ACH bank transfer",
179
- achDescription: "Fast, direct deposit to the vendor's bank. Arrives in 1–3 business days.",
180
- addBankAccount: "Add bank account",
181
- accountHolderNameLabel: "Account holder name",
182
- routingNumberLabel: "Routing number",
183
- accountNumberLabel: "Account number",
184
- achHelp: "Ask your vendor for this — it's usually on their invoice, W-9, or a payment instructions email they send you.",
185
184
  cancel: "Cancel",
186
- save: "Save vendor",
187
- discardConfirmTitle: "Discard unsaved changes?",
188
- discardConfirmDescription: "You've made changes to this vendor that haven't been saved. If you leave now, they'll be lost.",
189
- keepEditingAction: "Keep editing",
190
- discardChangesAction: "Discard changes"
185
+ cancelAriaLabel: "Cancel vendor"
191
186
  };
192
187
  //#endregion
193
- export { p as BILL_CREATE_MESSAGE_LABELS_EN, v as BILL_CREATE_SCREEN_LABELS_EN, g as BILL_DETAIL_VIEW_LABELS_EN, _ as BILL_HISTORY_LABELS_EN, h as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, b as VENDOR_INLINE_FORM_LABELS_EN, m as VENDOR_SECTION_PROPS_LABELS_EN, y as mergeBillCreateScreenCopy };
188
+ export { v as BILL_CREATE_MESSAGE_LABELS_EN, C as BILL_CREATE_SCREEN_LABELS_EN, x as BILL_DETAIL_VIEW_LABELS_EN, S as BILL_HISTORY_LABELS_EN, b as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, T as VENDOR_INLINE_FORM_LABELS_EN, y as VENDOR_SECTION_PROPS_LABELS_EN, w as mergeBillCreateScreenCopy };
@@ -4,7 +4,7 @@
4
4
  "use client";
5
5
  import { useAttachPayableFileMutation as e } from "../../data-access/dist/index13.js";
6
6
  import "../../data-access/dist/index.js";
7
- import { SourceDocumentPanel as t } from "../../ui/dist/index106.js";
7
+ import { SourceDocumentPanel as t } from "../../ui/dist/index109.js";
8
8
  import "../../ui/dist/index.js";
9
9
  import { createSourceDocumentPreview as n } from "./index47.js";
10
10
  import { SOURCE_DOCUMENT_CONTAINER_LABELS_EN as r } from "./index48.js";
@@ -2,130 +2,48 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- 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";
6
- import { getStateOptions as s } from "../../../shared/util/dist/lib/usStates.js";
7
- import { AchFieldGroup as ee } from "../../../shared/counterpart-management/ui/dist/index5.js";
8
- import { CounterpartFormFields as c, useFocusFirstInvalidField as l } from "../../../shared/counterpart-management/ui/dist/index9.js";
9
- import { COUNTERPART_MESSAGE_LABELS_EN as u } from "../../../shared/counterpart-management/feature/dist/lib/labels.js";
10
- import { useCounterpartForm as d } from "../../../shared/counterpart-management/feature/dist/lib/useCounterpartForm.js";
5
+ import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { getStateOptions as t } from "../../../shared/util/dist/lib/usStates.js";
7
+ import { AchFieldGroup as n } from "../../../shared/counterpart-management/ui/dist/index5.js";
8
+ import { CounterpartFormFields as r, useFocusFirstInvalidField as i } from "../../../shared/counterpart-management/ui/dist/index9.js";
9
+ import "../../../shared/counterpart-management/ui/dist/index.js";
10
+ import { VendorSearchCombobox as a } from "../../ui/dist/index43.js";
11
+ import "../../ui/dist/index.js";
11
12
  import "../../../shared/counterpart-management/feature/dist/index.js";
12
- import { VENDOR_INLINE_FORM_LABELS_EN as f } from "./index48.js";
13
- import { useCallback as p, useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
14
- import { Fragment as te, jsx as v, jsxs as y } from "react/jsx-runtime";
15
- import { Landmark as b, Plus as ne, X as x } from "lucide-react";
13
+ import { VENDOR_INLINE_FORM_LABELS_EN as o } from "./index48.js";
14
+ import { useMemo as s } from "react";
15
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
16
+ import { Plus as u } from "lucide-react";
16
17
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js
17
- function S({ mode: S, counterpart: C, primaryAddress: w, bankAccounts: T, isBankAccountsLoading: E, isBankAccountsError: D, initialName: O, initialValues: k, onSaved: A, onCancel: j, onDirtyChange: M, labels: N }) {
18
- let P = {
19
- ...f,
20
- ...N
21
- }, [F, I] = _("none"), [L, R] = _(C?.id), [z, B] = _(!1), [V, H] = _(!1), [U, W] = _(!1);
22
- m(() => {
23
- M?.(V);
24
- }, [V, M]);
25
- let G = h(() => s(), []), K = g(F), q = g(!1), J = d({
26
- view: F,
27
- setView: I,
28
- selectedId: L,
29
- setSelectedId: R,
30
- messages: u,
31
- counterpartType: "vendor",
32
- counterpart: C,
33
- primaryAddress: w,
34
- bankAccounts: T,
35
- isBankAccountsLoading: E,
36
- isBankAccountsError: D
37
- }), { openCreate: Y, openEdit: X, setValues: Z, expandAddress: Q } = J, re = l(J.errors);
38
- m(() => {
39
- S === "edit" ? X() : Y();
40
- }, [
41
- S,
42
- Y,
43
- X
44
- ]), m(() => {
45
- K.current !== "none" && F === "none" && L && A(L), K.current = F;
46
- }, [
47
- F,
48
- L,
49
- A
50
- ]), m(() => {
51
- S !== "create" || q.current || (q.current = !0, Z((e) => ({
52
- ...e,
53
- entityType: "organization",
54
- legalName: O?.trim() || k?.legalName || e.legalName,
55
- email: k?.email || e.email,
56
- phone: k?.phone || e.phone,
57
- address: k?.address ?? e.address
58
- })), k?.address && Object.values(k.address).some(Boolean) && Q());
59
- }, [
60
- S,
61
- O,
62
- k,
63
- Z,
64
- Q
65
- ]), m(() => {
66
- S === "edit" && (J.values.bankAccount.routingNumber || J.values.bankAccount.accountNumber) && B(!0);
67
- }, [
68
- S,
69
- J.values.bankAccount.accountNumber,
70
- J.values.bankAccount.routingNumber
71
- ]), m(() => {
72
- J.sectionsToExpand.bankAccount && B(!0);
73
- }, [J.sectionsToExpand.bankAccount]);
74
- let $ = p(() => {
75
- if (V) {
76
- W(!0);
77
- return;
18
+ function d({ mode: d, values: f, errors: p, onChange: m, onAddressChange: h, sectionsToExpand: g, onAddressExpand: _, onCancel: v, paymentInstructions: y, search: b, labels: x }) {
19
+ let S = {
20
+ ...o,
21
+ ...x,
22
+ ach: {
23
+ ...o.ach,
24
+ ...x?.ach
78
25
  }
79
- j();
80
- }, [V, j]), ie = p((e) => {
81
- H(!0), Z((t) => e.entityType === "individual" && t.entityType !== "individual" ? {
82
- ...t,
83
- ...e,
84
- firstName: t.firstName || t.legalName,
85
- legalName: t.legalName
86
- } : e.entityType === "organization" && t.entityType !== "organization" ? {
87
- ...t,
88
- ...e,
89
- legalName: t.legalName || [t.firstName, t.lastName].filter(Boolean).join(" ")
90
- } : {
91
- ...t,
92
- ...e
93
- });
94
- }, [Z]);
95
- return /* @__PURE__ */ y("div", {
96
- ref: re,
26
+ }, C = s(() => t(), []), w = i(p ?? {});
27
+ return /* @__PURE__ */ l("div", {
28
+ ref: w,
97
29
  className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
98
30
  children: [
99
- /* @__PURE__ */ y("div", {
100
- className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-2",
101
- children: [/* @__PURE__ */ v("p", {
102
- className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
103
- children: S === "edit" ? P.editTitle : P.createTitle
104
- }), /* @__PURE__ */ v(o, {
105
- type: "button",
106
- variant: "ghost",
107
- size: "icon",
108
- "aria-label": P.close,
109
- onClick: $,
110
- children: /* @__PURE__ */ v(x, { className: "ttw:size-4" })
111
- })]
31
+ /* @__PURE__ */ c("p", {
32
+ className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
33
+ children: d === "edit" ? S.editTitle : S.createTitle
112
34
  }),
113
- /* @__PURE__ */ v(c, {
114
- mode: S,
35
+ d === "edit" && b ? /* @__PURE__ */ c(a, {
36
+ ...b,
37
+ labels: { fieldLabel: S.switchVendorFieldLabel }
38
+ }) : null,
39
+ /* @__PURE__ */ c(r, {
40
+ mode: d,
115
41
  counterpartMode: "vendor",
116
- values: J.values,
117
- errors: J.errors,
118
- stateOptions: G,
119
- onChange: ie,
120
- onAddressChange: (e) => {
121
- H(!0), Z((t) => ({
122
- ...t,
123
- address: {
124
- ...t.address,
125
- ...e
126
- }
127
- }));
128
- },
42
+ values: f,
43
+ errors: p,
44
+ stateOptions: C,
45
+ onChange: m,
46
+ onAddressChange: h,
129
47
  sections: {
130
48
  entityType: !0,
131
49
  profileHeading: !1,
@@ -134,103 +52,46 @@ function S({ mode: S, counterpart: C, primaryAddress: w, bankAccounts: T, isBank
134
52
  address: "collapsible",
135
53
  bankAccount: !1
136
54
  },
137
- sectionsToExpand: J.sectionsToExpand,
138
- onAddressExpand: J.expandAddress,
139
- labels: { businessNameLabel: P.nameLabel }
55
+ sectionsToExpand: g,
56
+ onAddressExpand: _,
57
+ labels: { businessNameLabel: S.nameLabel }
140
58
  }),
141
- /* @__PURE__ */ y("div", {
142
- className: "ttw:flex ttw:flex-col ttw:gap-1",
143
- children: [/* @__PURE__ */ v("p", {
144
- className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
145
- children: P.paymentMethodsHeading
146
- }), /* @__PURE__ */ v("p", {
147
- className: "ttw:text-sm ttw:text-muted-foreground",
148
- children: P.paymentMethodsDescription
149
- })]
150
- }),
151
- /* @__PURE__ */ y("div", {
152
- className: "ttw:flex ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-border ttw:p-3",
153
- children: [/* @__PURE__ */ v("span", {
154
- className: "ttw:flex ttw:size-8 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-md ttw:bg-primary",
155
- children: /* @__PURE__ */ v(b, {
156
- "aria-hidden": !0,
157
- className: "ttw:size-4 ttw:text-white"
158
- })
159
- }), /* @__PURE__ */ y("div", {
160
- className: "ttw:flex ttw:flex-1 ttw:flex-col ttw:gap-3",
161
- children: [/* @__PURE__ */ y("div", {
162
- className: "ttw:flex ttw:flex-col ttw:gap-0.5",
163
- children: [/* @__PURE__ */ v("p", {
164
- className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
165
- children: P.achTitle
166
- }), /* @__PURE__ */ v("p", {
167
- className: "ttw:text-sm ttw:text-muted-foreground",
168
- children: P.achDescription
169
- })]
170
- }), z ? /* @__PURE__ */ y(te, { children: [/* @__PURE__ */ v(ee, {
171
- idPrefix: "vendor-inline-ach",
172
- values: J.values.bankAccount,
173
- errors: J.errors?.bankAccount,
174
- onChange: (e) => {
175
- H(!0), Z((t) => ({
176
- ...t,
177
- bankAccount: {
178
- ...t.bankAccount,
179
- ...e
180
- }
181
- }));
182
- },
183
- labels: {
184
- accountHolderName: P.accountHolderNameLabel,
185
- routingNumber: P.routingNumberLabel,
186
- accountNumber: P.accountNumberLabel
187
- }
188
- }), /* @__PURE__ */ v("p", {
189
- className: "ttw:text-sm ttw:text-muted-foreground",
190
- children: P.achHelp
191
- })] }) : /* @__PURE__ */ y(o, {
59
+ y ? y.isOpen ? /* @__PURE__ */ l("div", {
60
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
61
+ children: [/* @__PURE__ */ c(n, {
62
+ idPrefix: "vendor-inline-ach",
63
+ values: y.values,
64
+ errors: y.errors,
65
+ onChange: y.onChange,
66
+ labels: S.ach
67
+ }), /* @__PURE__ */ c("div", {
68
+ className: "ttw:flex ttw:justify-end",
69
+ children: /* @__PURE__ */ c(e, {
192
70
  type: "button",
193
- variant: "link",
194
- className: "ttw:w-fit ttw:px-0",
195
- onClick: () => B(!0),
196
- children: [/* @__PURE__ */ v(ne, { className: "ttw:size-4" }), P.addBankAccount]
197
- })]
198
- })]
199
- }),
200
- /* @__PURE__ */ y("div", {
201
- className: "ttw:flex ttw:justify-end ttw:gap-2",
202
- children: [/* @__PURE__ */ v(o, {
203
- type: "button",
204
- variant: "outline",
205
- onClick: $,
206
- children: P.cancel
207
- }), /* @__PURE__ */ v(o, {
208
- type: "button",
209
- onClick: J.submit,
210
- loading: J.isSubmitting,
211
- disabled: J.isSubmitting,
212
- children: P.save
71
+ variant: "outline",
72
+ onClick: y.onCancel,
73
+ children: S.cancelPaymentInstructions
74
+ })
213
75
  })]
214
- }),
215
- /* @__PURE__ */ v(e, {
216
- open: U,
217
- onOpenChange: W,
218
- children: /* @__PURE__ */ y(t, { children: [/* @__PURE__ */ y(i, { children: [/* @__PURE__ */ v(a, { children: P.discardConfirmTitle }), /* @__PURE__ */ v(n, { children: P.discardConfirmDescription })] }), /* @__PURE__ */ y(r, { children: [/* @__PURE__ */ v(o, {
76
+ }) : /* @__PURE__ */ l(e, {
77
+ type: "button",
78
+ variant: "link",
79
+ className: "ttw:w-fit ttw:px-0",
80
+ onClick: y.onOpen,
81
+ children: [/* @__PURE__ */ c(u, { className: "ttw:size-4" }), S.addPaymentInstructions]
82
+ }) : null,
83
+ /* @__PURE__ */ c("div", {
84
+ className: "ttw:flex ttw:justify-end",
85
+ children: /* @__PURE__ */ c(e, {
219
86
  type: "button",
220
87
  variant: "outline",
221
- onClick: () => W(!1),
222
- children: P.keepEditingAction
223
- }), /* @__PURE__ */ v(o, {
224
- type: "button",
225
- variant: "destructive",
226
- onClick: () => {
227
- W(!1), j();
228
- },
229
- children: P.discardChangesAction
230
- })] })] })
88
+ onClick: v,
89
+ "aria-label": S.cancelAriaLabel,
90
+ children: S.cancel
91
+ })
231
92
  })
232
93
  ]
233
94
  });
234
95
  }
235
96
  //#endregion
236
- export { S as VendorInlineForm, S as default };
97
+ export { d as VendorInlineForm, d as default };