@tesouro/embedded-components-react 0.5.58 → 0.5.59
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.
- package/README.md +9 -9
- package/dist/index.d.ts +5 -3
- package/dist/lib/CounterpartsWidget.d.ts +5 -3
- package/dist/lib/ReceivablesWidget.d.ts +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +53 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +42 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +288 -226
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +104 -101
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +313 -285
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +12 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +41 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useDeleteController.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +121 -115
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index6.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -342,15 +342,15 @@ A self-contained widget for managing an organization's customers or vendors with
|
|
|
342
342
|
| `pageSizeOptions` | `number[]` | `[10, 25, 50, 100]` | Page-size choices shown by the table. |
|
|
343
343
|
| `onViewAllDocuments` | `() => void` | `undefined` | Reveals a "View all" action beside the recent-bills/invoices heading in the details sheet. Omit when the host has no document list to navigate to; the action stays hidden rather than dead. |
|
|
344
344
|
|
|
345
|
-
| Prop | Type
|
|
346
|
-
| ------------------- |
|
|
347
|
-
| `screenLabels` | `Partial<CounterpartsScreenLabels>`
|
|
348
|
-
| `formLabels` | `Partial<CounterpartFormSheetLabels>`
|
|
349
|
-
| `detailsLabels` | `Partial<CounterpartDetailsSheetLabels>`
|
|
350
|
-
| `bankAccountLabels` | `
|
|
351
|
-
| `addressLabels` | `Partial<AddressFormSheetLabels>`
|
|
352
|
-
| `deleteLabels` | `Partial<ConfirmDeleteDialogLabels>`
|
|
353
|
-
| `messageLabels` | `Partial<CounterpartMessageLabels>`
|
|
345
|
+
| Prop | Type | Description |
|
|
346
|
+
| ------------------- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
347
|
+
| `screenLabels` | `Partial<CounterpartsScreenLabels>` | Table title, columns, search/filter, empty, error, access-restricted, and row-action copy. |
|
|
348
|
+
| `formLabels` | `Partial<CounterpartFormSheetLabels>` | Create/edit counterpart form copy. |
|
|
349
|
+
| `detailsLabels` | `Partial<CounterpartDetailsSheetLabels>` | Details sheet sections, summary labels, subtitle/entity/reminder/payment-method labels, row labels, and actions. |
|
|
350
|
+
| `bankAccountLabels` | `PartialDeep<BankAccountFormSheetLabels>` | Vendor payment-method form copy, including nested field-marker labels. |
|
|
351
|
+
| `addressLabels` | `Partial<AddressFormSheetLabels>` | Address form copy. |
|
|
352
|
+
| `deleteLabels` | `Partial<ConfirmDeleteDialogLabels>` | Delete-dialog copy. |
|
|
353
|
+
| `messageLabels` | `Partial<CounterpartMessageLabels>` | Validation, API failure, and delete-prompt messages produced by feature logic. |
|
|
354
354
|
|
|
355
355
|
### ExpenseManagementWidget
|
|
356
356
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3323,6 +3323,7 @@ interface BankAccountFormSheetLabels {
|
|
|
3323
3323
|
cancelButton: string;
|
|
3324
3324
|
createButton: string;
|
|
3325
3325
|
saveButton: string;
|
|
3326
|
+
fieldMarkers: LabelLabels;
|
|
3326
3327
|
}
|
|
3327
3328
|
interface AddressFormSheetLabels {
|
|
3328
3329
|
title: string;
|
|
@@ -3423,7 +3424,6 @@ interface CounterpartMessageLabels {
|
|
|
3423
3424
|
cityRequired: string;
|
|
3424
3425
|
stateRequired: string;
|
|
3425
3426
|
postalCodeRequired: string;
|
|
3426
|
-
bankAccountNameRequired: string;
|
|
3427
3427
|
bankAccountIdentifierRequired: string;
|
|
3428
3428
|
bankAccountCurrencyRequired: string;
|
|
3429
3429
|
accountHolderNameRequired: string;
|
|
@@ -3434,8 +3434,10 @@ interface CounterpartMessageLabels {
|
|
|
3434
3434
|
genericError: string;
|
|
3435
3435
|
/** Delete confirmation title; `{name}` is replaced with the entity name. */
|
|
3436
3436
|
deleteTitle: string;
|
|
3437
|
+
/** Delete confirmation title for a bank account; `{account}` is display-ready. */
|
|
3438
|
+
deleteBankAccountTitle: string;
|
|
3437
3439
|
deleteCounterpartMessage: string;
|
|
3438
|
-
|
|
3440
|
+
deleteBankAccountMessage: string;
|
|
3439
3441
|
}
|
|
3440
3442
|
|
|
3441
3443
|
/**
|
|
@@ -3722,7 +3724,7 @@ interface CounterpartsWidgetOwnProps {
|
|
|
3722
3724
|
screenLabels?: Partial<CounterpartsScreenLabels>;
|
|
3723
3725
|
formLabels?: PartialDeep<CounterpartFormSheetLabels>;
|
|
3724
3726
|
detailsLabels?: Partial<CounterpartDetailsSheetLabels>;
|
|
3725
|
-
bankAccountLabels?:
|
|
3727
|
+
bankAccountLabels?: PartialDeep<BankAccountFormSheetLabels>;
|
|
3726
3728
|
addressLabels?: Partial<AddressFormSheetLabels>;
|
|
3727
3729
|
deleteLabels?: Partial<ConfirmDeleteDialogLabels>;
|
|
3728
3730
|
/** Overrides for validation / error / delete-prompt messages. */
|
|
@@ -753,6 +753,7 @@ interface BankAccountFormSheetLabels {
|
|
|
753
753
|
cancelButton: string;
|
|
754
754
|
createButton: string;
|
|
755
755
|
saveButton: string;
|
|
756
|
+
fieldMarkers: LabelLabels;
|
|
756
757
|
}
|
|
757
758
|
interface AddressFormSheetLabels {
|
|
758
759
|
title: string;
|
|
@@ -783,7 +784,6 @@ interface CounterpartMessageLabels {
|
|
|
783
784
|
cityRequired: string;
|
|
784
785
|
stateRequired: string;
|
|
785
786
|
postalCodeRequired: string;
|
|
786
|
-
bankAccountNameRequired: string;
|
|
787
787
|
bankAccountIdentifierRequired: string;
|
|
788
788
|
bankAccountCurrencyRequired: string;
|
|
789
789
|
accountHolderNameRequired: string;
|
|
@@ -794,8 +794,10 @@ interface CounterpartMessageLabels {
|
|
|
794
794
|
genericError: string;
|
|
795
795
|
/** Delete confirmation title; `{name}` is replaced with the entity name. */
|
|
796
796
|
deleteTitle: string;
|
|
797
|
+
/** Delete confirmation title for a bank account; `{account}` is display-ready. */
|
|
798
|
+
deleteBankAccountTitle: string;
|
|
797
799
|
deleteCounterpartMessage: string;
|
|
798
|
-
|
|
800
|
+
deleteBankAccountMessage: string;
|
|
799
801
|
}
|
|
800
802
|
|
|
801
803
|
/**
|
|
@@ -920,7 +922,7 @@ interface CounterpartsWidgetOwnProps {
|
|
|
920
922
|
screenLabels?: Partial<CounterpartsScreenLabels>;
|
|
921
923
|
formLabels?: PartialDeep<CounterpartFormSheetLabels>;
|
|
922
924
|
detailsLabels?: Partial<CounterpartDetailsSheetLabels>;
|
|
923
|
-
bankAccountLabels?:
|
|
925
|
+
bankAccountLabels?: PartialDeep<BankAccountFormSheetLabels>;
|
|
924
926
|
addressLabels?: Partial<AddressFormSheetLabels>;
|
|
925
927
|
deleteLabels?: Partial<ConfirmDeleteDialogLabels>;
|
|
926
928
|
/** Overrides for validation / error / delete-prompt messages. */
|
|
@@ -761,7 +761,6 @@ interface CounterpartMessageLabels {
|
|
|
761
761
|
cityRequired: string;
|
|
762
762
|
stateRequired: string;
|
|
763
763
|
postalCodeRequired: string;
|
|
764
|
-
bankAccountNameRequired: string;
|
|
765
764
|
bankAccountIdentifierRequired: string;
|
|
766
765
|
bankAccountCurrencyRequired: string;
|
|
767
766
|
accountHolderNameRequired: string;
|
|
@@ -772,8 +771,10 @@ interface CounterpartMessageLabels {
|
|
|
772
771
|
genericError: string;
|
|
773
772
|
/** Delete confirmation title; `{name}` is replaced with the entity name. */
|
|
774
773
|
deleteTitle: string;
|
|
774
|
+
/** Delete confirmation title for a bank account; `{account}` is display-ready. */
|
|
775
|
+
deleteBankAccountTitle: string;
|
|
775
776
|
deleteCounterpartMessage: string;
|
|
776
|
-
|
|
777
|
+
deleteBankAccountMessage: string;
|
|
777
778
|
}
|
|
778
779
|
|
|
779
780
|
interface ProductFormSheetLabels {
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
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";
|
|
1
|
+
import { DISCARD_CHANGES_DIALOG_LABELS_EN as e } from "../../ui/dist/index66.js";
|
|
2
|
+
import { BILL_REJECTED_BANNER_LABELS_EN as t } from "../../ui/dist/index74.js";
|
|
3
|
+
import { UNSAVED_BILL_DIALOG_LABELS_EN as n } from "../../ui/dist/index111.js";
|
|
6
4
|
import "../../ui/dist/index.js";
|
|
7
|
-
import { PAY_BILL_FLOW_LABELS_EN as
|
|
8
|
-
import { MARK_AS_PAID_FLOW_LABELS_EN as
|
|
5
|
+
import { PAY_BILL_FLOW_LABELS_EN as r, mergePayBillFlowLabels as i } from "./index25.js";
|
|
6
|
+
import { MARK_AS_PAID_FLOW_LABELS_EN as a, mergeMarkAsPaidFlowLabels as o } from "./index15.js";
|
|
9
7
|
import "./index18.js";
|
|
10
|
-
import { APPROVAL_POLICY_RULE_COPY_EN as
|
|
11
|
-
import { AWAITING_APPROVAL_LABEL_EN as
|
|
12
|
-
import { PAYABLE_AUDIT_HISTORY_LABELS_EN as
|
|
13
|
-
import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as
|
|
8
|
+
import { APPROVAL_POLICY_RULE_COPY_EN as s } from "./index29.js";
|
|
9
|
+
import { AWAITING_APPROVAL_LABEL_EN as c, AWAITING_APPROVAL_UNKNOWN_LABEL_EN as l, BILL_DETAIL_ACTIONS_LABELS_EN as u, PAYMENT_HISTORY_LABELS_EN as d, SCHEDULED_STATUS_BADGE_LABEL_EN as f, SCHEDULED_SUMMARY_LABEL_EN as p, mergeBillDetailActionsLabels as m, mergePaymentHistoryMethodLabels as h } from "./index46.js";
|
|
10
|
+
import { PAYABLE_AUDIT_HISTORY_LABELS_EN as g } from "./index47.js";
|
|
11
|
+
import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as _ } from "./index48.js";
|
|
14
12
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js
|
|
15
|
-
var
|
|
13
|
+
var v = {
|
|
16
14
|
unmappedValidationError: (e, t) => `${e}: ${t}`,
|
|
17
15
|
unknownValidationField: "(unknown field)",
|
|
18
16
|
requiredField: "This field is required.",
|
|
19
17
|
saveFailed: "We could not save this bill. Try again.",
|
|
20
18
|
discountTaxBlockedByLineItems: "Discount and Tax can't be saved on a bill with line items. Remove them, then save again.",
|
|
19
|
+
vendorResolutionFailed: "We couldn't create this vendor automatically. Select or add a vendor before submitting.",
|
|
21
20
|
finalizeFailed: "We could not submit this bill. Try again.",
|
|
22
21
|
draftSaved: "Bill saved as a draft.",
|
|
23
22
|
submittedSaved: "Bill updated.",
|
|
@@ -32,21 +31,23 @@ var y = {
|
|
|
32
31
|
unreadableTotal: "Enter a valid total amount.",
|
|
33
32
|
totalNotGreaterThanZero: "Total amount must be greater than $0.",
|
|
34
33
|
poNumberTooLong: "PO number must be 255 characters or fewer."
|
|
35
|
-
},
|
|
34
|
+
}, y = {
|
|
36
35
|
paymentInstructionsValue: (e) => `Account ending in ${e}`,
|
|
37
36
|
noMethod: "No payment method on file",
|
|
38
37
|
paymentMethodLoading: "Loading payment method...",
|
|
39
38
|
paymentMethodUnavailable: "We could not load payment methods. Try again.",
|
|
40
39
|
searchFailed: "We could not load vendors. Try again.",
|
|
41
|
-
vendorDetailsFailed: "We could not load this vendor. Try again."
|
|
42
|
-
|
|
40
|
+
vendorDetailsFailed: "We could not load this vendor. Try again.",
|
|
41
|
+
pendingVendorDescription: "Will be created when submitted",
|
|
42
|
+
bankAccountSaveFailed: "We could not save these payment instructions. Try again."
|
|
43
|
+
}, b = {
|
|
43
44
|
attachFailed: "We could not attach that file. Try again.",
|
|
44
45
|
deleteFailed: "We could not remove that document. Try again.",
|
|
45
46
|
noDocument: "No document attached to this bill.",
|
|
46
47
|
pendingDeletionNotice: "This document will be removed when you save this bill.",
|
|
47
|
-
preview:
|
|
48
|
-
},
|
|
49
|
-
...
|
|
48
|
+
preview: _
|
|
49
|
+
}, x = {
|
|
50
|
+
...d,
|
|
50
51
|
historyDateTime: (e, t) => `${e}, ${t}`,
|
|
51
52
|
historyWithMeta: (e, t) => `${e} · ${t}`,
|
|
52
53
|
notProvided: "Not provided",
|
|
@@ -69,24 +70,24 @@ var y = {
|
|
|
69
70
|
rejectedByOn: (e, t) => `Rejected by ${e} on ${t}`,
|
|
70
71
|
rejectedOn: (e) => `Rejected on ${e}`,
|
|
71
72
|
rejectionMessage: (e) => `"${e}"`
|
|
72
|
-
},
|
|
73
|
+
}, S = {
|
|
73
74
|
newTitle: "New bill",
|
|
74
75
|
extractedTitle: (e) => `Bill from ${e}`,
|
|
75
76
|
viewTitle: (e) => `Bill from ${e}`,
|
|
76
77
|
readOnlyTitle: "Bill details",
|
|
77
78
|
addedOn: (e) => `Added on ${e}`,
|
|
78
|
-
unsavedChanges:
|
|
79
|
-
discardChanges:
|
|
80
|
-
scheduledSummary:
|
|
81
|
-
scheduledStatusBadge:
|
|
82
|
-
awaitingApprovalNotice:
|
|
83
|
-
awaitingApprovalUnknownNotice:
|
|
84
|
-
actions:
|
|
85
|
-
detail:
|
|
86
|
-
history:
|
|
87
|
-
payBill:
|
|
88
|
-
markAsPaid:
|
|
89
|
-
approvalPolicyCopy:
|
|
79
|
+
unsavedChanges: n,
|
|
80
|
+
discardChanges: e,
|
|
81
|
+
scheduledSummary: p,
|
|
82
|
+
scheduledStatusBadge: f,
|
|
83
|
+
awaitingApprovalNotice: c,
|
|
84
|
+
awaitingApprovalUnknownNotice: l,
|
|
85
|
+
actions: u,
|
|
86
|
+
detail: x,
|
|
87
|
+
history: g,
|
|
88
|
+
payBill: r,
|
|
89
|
+
markAsPaid: a,
|
|
90
|
+
approvalPolicyCopy: s,
|
|
90
91
|
deleteDraft: {
|
|
91
92
|
menuItem: "Delete draft",
|
|
92
93
|
dialog: {
|
|
@@ -101,50 +102,50 @@ var y = {
|
|
|
101
102
|
noAccess: "You don't have access to GL codes",
|
|
102
103
|
empty: "No GL codes set up yet"
|
|
103
104
|
},
|
|
104
|
-
rejectedBanner:
|
|
105
|
+
rejectedBanner: t
|
|
105
106
|
};
|
|
106
|
-
function
|
|
107
|
+
function C(e) {
|
|
107
108
|
return {
|
|
108
|
-
...
|
|
109
|
+
...S,
|
|
109
110
|
...e,
|
|
110
|
-
actions:
|
|
111
|
+
actions: m(e?.actions),
|
|
111
112
|
detail: {
|
|
112
|
-
...
|
|
113
|
+
...S.detail,
|
|
113
114
|
...e?.detail,
|
|
114
|
-
paymentHistoryMethodLabels:
|
|
115
|
+
paymentHistoryMethodLabels: h(e?.detail?.paymentHistoryMethodLabels)
|
|
115
116
|
},
|
|
116
117
|
history: {
|
|
117
|
-
...
|
|
118
|
+
...S.history,
|
|
118
119
|
...e?.history
|
|
119
120
|
},
|
|
120
|
-
payBill:
|
|
121
|
-
markAsPaid:
|
|
121
|
+
payBill: i(e?.payBill),
|
|
122
|
+
markAsPaid: o(e?.markAsPaid),
|
|
122
123
|
lineItemsGlCodeUnavailable: {
|
|
123
|
-
...
|
|
124
|
+
...S.lineItemsGlCodeUnavailable,
|
|
124
125
|
...e?.lineItemsGlCodeUnavailable
|
|
125
126
|
},
|
|
126
127
|
unsavedChanges: {
|
|
127
|
-
...
|
|
128
|
+
...S.unsavedChanges,
|
|
128
129
|
...e?.unsavedChanges
|
|
129
130
|
},
|
|
130
131
|
discardChanges: {
|
|
131
|
-
...
|
|
132
|
+
...S.discardChanges,
|
|
132
133
|
...e?.discardChanges
|
|
133
134
|
},
|
|
134
135
|
rejectedBanner: {
|
|
135
|
-
...
|
|
136
|
+
...S.rejectedBanner,
|
|
136
137
|
...e?.rejectedBanner
|
|
137
138
|
},
|
|
138
139
|
approvalPolicyCopy: {
|
|
139
|
-
...
|
|
140
|
+
...S.approvalPolicyCopy,
|
|
140
141
|
...e?.approvalPolicyCopy
|
|
141
142
|
},
|
|
142
143
|
deleteDraft: {
|
|
143
|
-
...
|
|
144
|
+
...S.deleteDraft,
|
|
144
145
|
...e?.deleteDraft,
|
|
145
146
|
dialog: (() => {
|
|
146
147
|
let t = {
|
|
147
|
-
...
|
|
148
|
+
...S.deleteDraft.dialog,
|
|
148
149
|
...e?.deleteDraft?.dialog
|
|
149
150
|
};
|
|
150
151
|
return delete t.reason, t;
|
|
@@ -152,17 +153,16 @@ function w(e) {
|
|
|
152
153
|
}
|
|
153
154
|
};
|
|
154
155
|
}
|
|
155
|
-
var
|
|
156
|
+
var w = {
|
|
156
157
|
createTitle: "New vendor",
|
|
157
158
|
editTitle: "Edit vendor",
|
|
158
159
|
switchVendorFieldLabel: "Switch to a different vendor",
|
|
159
160
|
nameLabel: "Name",
|
|
160
|
-
addPaymentInstructions: "Add payment instructions",
|
|
161
|
-
cancelPaymentInstructions: "Cancel",
|
|
162
|
-
ach: e,
|
|
163
161
|
addAddress: "Add address (optional)",
|
|
164
162
|
cancel: "Cancel",
|
|
165
|
-
|
|
163
|
+
save: "Save",
|
|
164
|
+
cancelAriaLabel: "Cancel vendor",
|
|
165
|
+
saveAriaLabel: "Save vendor"
|
|
166
166
|
};
|
|
167
167
|
//#endregion
|
|
168
|
-
export {
|
|
168
|
+
export { v as BILL_CREATE_MESSAGE_LABELS_EN, S as BILL_CREATE_SCREEN_LABELS_EN, x as BILL_DETAIL_VIEW_LABELS_EN, b as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, w as VENDOR_INLINE_FORM_LABELS_EN, y as VENDOR_SECTION_PROPS_LABELS_EN, C as mergeBillCreateScreenCopy };
|
|
@@ -4,46 +4,39 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
6
|
import { getStateOptions as t } from "../../../shared/util/dist/lib/usStates.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import "../../../shared/counterpart-management/ui/dist/index.js";
|
|
10
|
-
import { VendorSearchCombobox as a } from "../../ui/dist/index43.js";
|
|
7
|
+
import { CounterpartFormFields as n, useFocusFirstInvalidField as r } from "../../../shared/counterpart-management/ui/dist/index9.js";
|
|
8
|
+
import { VendorSearchCombobox as i } from "../../ui/dist/index43.js";
|
|
11
9
|
import "../../ui/dist/index.js";
|
|
12
10
|
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
13
|
-
import { VENDOR_INLINE_FORM_LABELS_EN as
|
|
14
|
-
import { useMemo as
|
|
15
|
-
import { jsx as
|
|
16
|
-
import { Plus as u } from "lucide-react";
|
|
11
|
+
import { VENDOR_INLINE_FORM_LABELS_EN as a } from "./index49.js";
|
|
12
|
+
import { useMemo as o } from "react";
|
|
13
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
17
14
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js
|
|
18
|
-
function
|
|
19
|
-
let
|
|
20
|
-
...
|
|
21
|
-
...
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
}, C = s(() => t(), []), w = i(p ?? {});
|
|
27
|
-
return /* @__PURE__ */ l("div", {
|
|
28
|
-
ref: w,
|
|
15
|
+
function l({ mode: l, values: u, errors: d, onChange: f, onAddressChange: p, sectionsToExpand: m, onAddressExpand: h, onCancel: g, onSave: _, isSaving: v = !1, search: y, labels: b }) {
|
|
16
|
+
let x = {
|
|
17
|
+
...a,
|
|
18
|
+
...b
|
|
19
|
+
}, S = o(() => t(), []), C = r(d ?? {});
|
|
20
|
+
return /* @__PURE__ */ c("div", {
|
|
21
|
+
ref: C,
|
|
29
22
|
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
|
|
30
23
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ s("p", {
|
|
32
25
|
className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
33
|
-
children:
|
|
26
|
+
children: l === "edit" ? x.editTitle : x.createTitle
|
|
34
27
|
}),
|
|
35
|
-
|
|
36
|
-
...
|
|
37
|
-
labels: { fieldLabel:
|
|
28
|
+
l === "edit" && y ? /* @__PURE__ */ s(i, {
|
|
29
|
+
...y,
|
|
30
|
+
labels: { fieldLabel: x.switchVendorFieldLabel }
|
|
38
31
|
}) : null,
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
mode:
|
|
32
|
+
/* @__PURE__ */ s(n, {
|
|
33
|
+
mode: l,
|
|
41
34
|
counterpartMode: "vendor",
|
|
42
|
-
values:
|
|
43
|
-
errors:
|
|
44
|
-
stateOptions:
|
|
45
|
-
onChange:
|
|
46
|
-
onAddressChange:
|
|
35
|
+
values: u,
|
|
36
|
+
errors: d,
|
|
37
|
+
stateOptions: S,
|
|
38
|
+
onChange: f,
|
|
39
|
+
onAddressChange: p,
|
|
47
40
|
sections: {
|
|
48
41
|
entityType: !0,
|
|
49
42
|
profileHeading: !1,
|
|
@@ -52,46 +45,30 @@ function d({ mode: d, values: f, errors: p, onChange: m, onAddressChange: h, sec
|
|
|
52
45
|
address: "collapsible",
|
|
53
46
|
bankAccount: !1
|
|
54
47
|
},
|
|
55
|
-
sectionsToExpand:
|
|
56
|
-
onAddressExpand:
|
|
57
|
-
labels: { businessNameLabel:
|
|
48
|
+
sectionsToExpand: m,
|
|
49
|
+
onAddressExpand: h,
|
|
50
|
+
labels: { businessNameLabel: x.nameLabel }
|
|
58
51
|
}),
|
|
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, {
|
|
70
|
-
type: "button",
|
|
71
|
-
variant: "outline",
|
|
72
|
-
onClick: y.onCancel,
|
|
73
|
-
children: S.cancelPaymentInstructions
|
|
74
|
-
})
|
|
75
|
-
})]
|
|
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
52
|
/* @__PURE__ */ c("div", {
|
|
84
|
-
className: "ttw:flex ttw:justify-end",
|
|
85
|
-
children: /* @__PURE__ */
|
|
53
|
+
className: "ttw:flex ttw:justify-end ttw:gap-2",
|
|
54
|
+
children: [/* @__PURE__ */ s(e, {
|
|
86
55
|
type: "button",
|
|
87
56
|
variant: "outline",
|
|
88
|
-
onClick:
|
|
89
|
-
"aria-label":
|
|
90
|
-
|
|
91
|
-
|
|
57
|
+
onClick: g,
|
|
58
|
+
"aria-label": x.cancelAriaLabel,
|
|
59
|
+
disabled: v,
|
|
60
|
+
children: x.cancel
|
|
61
|
+
}), _ ? /* @__PURE__ */ s(e, {
|
|
62
|
+
type: "button",
|
|
63
|
+
onClick: _,
|
|
64
|
+
"aria-label": x.saveAriaLabel,
|
|
65
|
+
loading: v,
|
|
66
|
+
disabled: v,
|
|
67
|
+
children: x.save
|
|
68
|
+
}) : null]
|
|
92
69
|
})
|
|
93
70
|
]
|
|
94
71
|
});
|
|
95
72
|
}
|
|
96
73
|
//#endregion
|
|
97
|
-
export {
|
|
74
|
+
export { l as VendorInlineForm, l as default };
|