@tesouro/embedded-components-react 0.5.169 → 0.5.170
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/dist/index.css +39 -17
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +95 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +37 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +13 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +56 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +4 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +6 -115
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +202 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +84 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +3 -84
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +32 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +36 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +167 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +40 -164
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +50 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +11 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +8 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +14 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +59 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +8 -64
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +24 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +150 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +9 -152
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +25 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +19 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +32 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +14 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +8 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +98 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +68 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +3 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +143 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +44 -143
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +114 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +189 -111
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +72 -186
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +31 -76
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +89 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +406 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +12 -411
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +84 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +67 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +222 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +37 -223
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +245 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +5 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +23 -252
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +626 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +4 -586
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +45 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +256 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -263
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +44 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +22 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +11 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +130 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +3 -132
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +129 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +8 -124
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +7 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +82 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +19 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +20 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +28 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +82 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +47 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +260 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +24 -251
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +382 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +294 -144
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +4 -223
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index89.js +112 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +37 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index90.js +1 -114
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index91.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +18 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +126 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +1 -105
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +33 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +7 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +126 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +11 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index107.js +106 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index108.js +2 -181
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index110.js +50 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index111.js +2 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +6 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +8 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +154 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +343 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +5 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +28 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +2 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +7 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +32 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +2 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +12 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +104 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +2 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +31 -2
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +2458 -2284
- package/package.json +2 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index92.js +0 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index112.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index113.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index114.js +0 -52
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index115.js +0 -2
|
@@ -15,6 +15,19 @@ var e = {
|
|
|
15
15
|
cancelConfirmDescription: "You can't undo this action.",
|
|
16
16
|
cancelConfirmButton: "Cancel this bill",
|
|
17
17
|
cancelConfirmBackButton: "Back",
|
|
18
|
+
confirmDuplicateTitle: "Confirm duplicate?",
|
|
19
|
+
confirmDuplicateDescription: "This bill is already cancelled. This records it as a duplicate.",
|
|
20
|
+
notDuplicateAction: "Not a duplicate",
|
|
21
|
+
notDuplicateConfirmTitle: "Mark as not a duplicate?",
|
|
22
|
+
notDuplicateConfirmDescription: "You can't undo this action.",
|
|
23
|
+
notDuplicateConfirmButton: "Not a duplicate",
|
|
24
|
+
notDuplicateConfirmBackButton: "Back",
|
|
25
|
+
deleteAction: "Remove bill",
|
|
26
|
+
cancelAction: "Cancel bill",
|
|
27
|
+
confirmAction: "Confirm duplicate",
|
|
28
|
+
currentBillBadge: "This bill",
|
|
29
|
+
originalBillBadge: "Original bill",
|
|
30
|
+
showMoreRows: (e) => `Show ${e} more`,
|
|
18
31
|
deletedToast: "Duplicate removed",
|
|
19
32
|
cancelledToast: "Duplicate cancelled",
|
|
20
33
|
confirmedToast: "Duplicate confirmed",
|
|
@@ -1,194 +1,80 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useAttachPayableFileMutation as e } from "../../data-access/dist/index13.js";
|
|
6
|
+
import "../../data-access/dist/index.js";
|
|
7
|
+
import { SourceDocumentPanel as t } from "../../ui/dist/index107.js";
|
|
6
8
|
import "../../ui/dist/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import "
|
|
10
|
-
import {
|
|
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_RELATIVE_DAY_LABELS_EN as p, SCHEDULED_STATUS_BADGE_LABEL_EN as m, SCHEDULED_SUMMARY_LABEL_EN as h, mergeBillDetailActionsLabels as g, mergePaymentHistoryMethodLabels as _ } from "./index47.js";
|
|
12
|
-
import { PAYABLE_AUDIT_HISTORY_LABELS_EN as v } from "./index48.js";
|
|
13
|
-
import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as y } from "./index49.js";
|
|
9
|
+
import { createSourceDocumentPreview as n } from "./index48.js";
|
|
10
|
+
import { SOURCE_DOCUMENT_CONTAINER_LABELS_EN as r } from "./index49.js";
|
|
11
|
+
import { useEffect as i, useState as a } from "react";
|
|
12
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
14
13
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
vendorResolutionFailed: "We couldn't create this vendor automatically. Select or add a vendor before submitting.",
|
|
22
|
-
finalizeFailed: "We could not submit this bill. Try again.",
|
|
23
|
-
draftSaved: "Bill saved as a draft.",
|
|
24
|
-
submittedSaved: "Bill updated.",
|
|
25
|
-
submittedDemoted: "Bill updated. It moved back to Drafts because some required details are missing.",
|
|
26
|
-
billFinalized: "Bill submitted for approval.",
|
|
27
|
-
numbersOnly: "Enter numbers only.",
|
|
28
|
-
unreadableMoney: "Enter a valid amount.",
|
|
29
|
-
unusableQuantity: "Enter a quantity greater than 0.",
|
|
30
|
-
lineItemsNeedAttention: "Check the highlighted line items before saving.",
|
|
31
|
-
unreadableDiscount: "Enter a valid discount amount.",
|
|
32
|
-
unreadableTax: "Enter a valid tax amount.",
|
|
33
|
-
unreadableTotal: "Enter a valid total amount.",
|
|
34
|
-
totalNotGreaterThanZero: "Total amount must be greater than $0.",
|
|
35
|
-
poNumberTooLong: "PO number must be 255 characters or fewer.",
|
|
36
|
-
implausibleInvoiceDate: "Enter an invoice date within the last 10 years, no more than 30 days from today.",
|
|
37
|
-
implausibleDueDate: "Enter a due date within the last 10 years and next 5 years.",
|
|
38
|
-
dueBeforeInvoiceDate: "Due date must be on or after the invoice date."
|
|
39
|
-
}, x = {
|
|
40
|
-
paymentInstructionsValue: (e) => `Account ending in ${e}`,
|
|
41
|
-
noMethod: "No payment method on file",
|
|
42
|
-
paymentMethodLoading: "Loading payment method...",
|
|
43
|
-
paymentMethodUnavailable: "We could not load payment methods. Try again.",
|
|
44
|
-
searchFailed: "We could not load vendors. Try again.",
|
|
45
|
-
vendorDetailsFailed: "We could not load this vendor. Try again.",
|
|
46
|
-
pendingVendorDescription: "Will be created when submitted",
|
|
47
|
-
bankAccountSaveFailed: "We could not save these payment instructions. Try again."
|
|
48
|
-
}, S = {
|
|
49
|
-
attachFailed: "We could not attach that file. Try again.",
|
|
50
|
-
deleteFailed: "We could not remove that document. Try again.",
|
|
51
|
-
noDocument: "No document attached to this bill.",
|
|
52
|
-
pendingDeletionNotice: "This document will be removed when you save this bill.",
|
|
53
|
-
preview: y
|
|
54
|
-
}, C = {
|
|
55
|
-
...f,
|
|
56
|
-
notProvided: "Not provided",
|
|
57
|
-
paymentInstructionsValue: (e) => `Account ending in ${e}`,
|
|
58
|
-
paymentInstructionsNotSet: "Not set",
|
|
59
|
-
invoiceDateRow: "Invoice date",
|
|
60
|
-
dueDateRow: "Due date",
|
|
61
|
-
invoiceNumberRow: "Invoice number",
|
|
62
|
-
glCodeMissing: "GL code not specified",
|
|
63
|
-
glCodeUnavailable: "GL code unavailable",
|
|
64
|
-
qtyPriceValue: (e, t) => `${e} x ${t}`,
|
|
65
|
-
qtyOnlyValue: (e) => e,
|
|
66
|
-
subtotalRow: "Subtotal",
|
|
67
|
-
taxRow: "Tax",
|
|
68
|
-
discountRow: "Discounts",
|
|
69
|
-
totalRow: "Total",
|
|
70
|
-
paidOnLabel: (e) => `Paid on ${e}`,
|
|
71
|
-
paymentInstructionsSaveError: "Couldn't save payment instructions. Try again.",
|
|
72
|
-
paymentInstructionsLinkError: "Payment instructions were saved to the vendor, but couldn't be added to this bill. Try again.",
|
|
73
|
-
rejectedByOn: (e, t) => `Rejected by ${e} on ${t}`,
|
|
74
|
-
rejectedOn: (e) => `Rejected on ${e}`,
|
|
75
|
-
rejectionMessage: (e) => `"${e}"`
|
|
76
|
-
}, w = {
|
|
77
|
-
newTitle: "New bill",
|
|
78
|
-
extractedTitle: (e) => `Bill from ${e}`,
|
|
79
|
-
viewTitle: (e) => `Bill from ${e}`,
|
|
80
|
-
readOnlyTitle: "Bill details",
|
|
81
|
-
addedOn: (e) => `Added on ${e}`,
|
|
82
|
-
unsavedChanges: r,
|
|
83
|
-
discardChanges: t,
|
|
84
|
-
scheduledRelativeDay: p,
|
|
85
|
-
scheduledSummary: h,
|
|
86
|
-
scheduledStatusBadge: m,
|
|
87
|
-
awaitingApprovalNotice: l,
|
|
88
|
-
awaitingApprovalUnknownNotice: u,
|
|
89
|
-
actions: d,
|
|
90
|
-
detail: C,
|
|
91
|
-
history: v,
|
|
92
|
-
payBill: i,
|
|
93
|
-
markAsPaid: o,
|
|
94
|
-
approvalPolicyCopy: c,
|
|
95
|
-
deleteDraft: {
|
|
96
|
-
menuItem: "Delete draft",
|
|
97
|
-
dialog: {
|
|
98
|
-
title: "Delete this draft?",
|
|
99
|
-
description: "The draft and anything entered on it are removed. This can't be undone.",
|
|
100
|
-
confirmButton: "Delete draft"
|
|
101
|
-
},
|
|
102
|
-
error: "Couldn't delete this draft. Try again."
|
|
103
|
-
},
|
|
104
|
-
lineItemsGlCodeUnavailable: {
|
|
105
|
-
loadError: "Couldn't load GL codes",
|
|
106
|
-
noAccess: "You don't have access to GL codes",
|
|
107
|
-
empty: "No GL codes set up yet"
|
|
108
|
-
},
|
|
109
|
-
rejectedBanner: n
|
|
110
|
-
};
|
|
111
|
-
function T(e) {
|
|
112
|
-
return {
|
|
113
|
-
...w,
|
|
114
|
-
...e,
|
|
115
|
-
actions: g(e?.actions),
|
|
116
|
-
detail: {
|
|
117
|
-
...w.detail,
|
|
118
|
-
...e?.detail,
|
|
119
|
-
paymentHistoryMethodLabels: _(e?.detail?.paymentHistoryMethodLabels)
|
|
120
|
-
},
|
|
121
|
-
history: {
|
|
122
|
-
...w.history,
|
|
123
|
-
...e?.history
|
|
124
|
-
},
|
|
125
|
-
payBill: a(e?.payBill),
|
|
126
|
-
markAsPaid: s(e?.markAsPaid),
|
|
127
|
-
lineItemsGlCodeUnavailable: {
|
|
128
|
-
...w.lineItemsGlCodeUnavailable,
|
|
129
|
-
...e?.lineItemsGlCodeUnavailable
|
|
130
|
-
},
|
|
131
|
-
unsavedChanges: {
|
|
132
|
-
...w.unsavedChanges,
|
|
133
|
-
...e?.unsavedChanges
|
|
134
|
-
},
|
|
135
|
-
discardChanges: {
|
|
136
|
-
...w.discardChanges,
|
|
137
|
-
...e?.discardChanges
|
|
138
|
-
},
|
|
139
|
-
rejectedBanner: {
|
|
140
|
-
...w.rejectedBanner,
|
|
141
|
-
...e?.rejectedBanner
|
|
142
|
-
},
|
|
143
|
-
approvalPolicyCopy: {
|
|
144
|
-
...w.approvalPolicyCopy,
|
|
145
|
-
...e?.approvalPolicyCopy
|
|
146
|
-
},
|
|
147
|
-
scheduledRelativeDay: {
|
|
148
|
-
...w.scheduledRelativeDay,
|
|
149
|
-
...e?.scheduledRelativeDay
|
|
150
|
-
},
|
|
151
|
-
deleteDraft: {
|
|
152
|
-
...w.deleteDraft,
|
|
153
|
-
...e?.deleteDraft,
|
|
154
|
-
dialog: (() => {
|
|
155
|
-
let t = {
|
|
156
|
-
...w.deleteDraft.dialog,
|
|
157
|
-
...e?.deleteDraft?.dialog
|
|
158
|
-
};
|
|
159
|
-
return delete t.reason, t;
|
|
160
|
-
})()
|
|
14
|
+
function s(e) {
|
|
15
|
+
let [t, n] = a();
|
|
16
|
+
return i(() => {
|
|
17
|
+
if (!e) {
|
|
18
|
+
n(void 0);
|
|
19
|
+
return;
|
|
161
20
|
}
|
|
162
|
-
|
|
21
|
+
let t = URL.createObjectURL(e);
|
|
22
|
+
return n(t), () => URL.revokeObjectURL(t);
|
|
23
|
+
}, [e]), t;
|
|
163
24
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
25
|
+
function c({ payableId: i, file: a, isDocumentPending: c, pendingFileName: l, readOnly: u, staging: d, deletion: f, labels: p }) {
|
|
26
|
+
let { stagedFile: m, onFileStaged: h, onClearStagedFile: g, isSaving: _ } = d ?? {}, { isPending: v, onRequest: y, onDetachNow: b, isDeleting: x, hasFailed: S } = f ?? {}, C = {
|
|
27
|
+
...r,
|
|
28
|
+
...p,
|
|
29
|
+
preview: {
|
|
30
|
+
...r.preview,
|
|
31
|
+
...p?.preview
|
|
32
|
+
}
|
|
33
|
+
}, w = e(), T = s(m), E = !!(a && !v || m);
|
|
34
|
+
if (!E && (c || w.isPending)) return /* @__PURE__ */ o(t, {
|
|
35
|
+
mode: "loading",
|
|
36
|
+
fileName: l
|
|
37
|
+
});
|
|
38
|
+
if (!E && u) return /* @__PURE__ */ o("div", {
|
|
39
|
+
className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4 ttw:text-sm ttw:text-muted-foreground",
|
|
40
|
+
children: C.noDocument
|
|
41
|
+
});
|
|
42
|
+
if (!E) return /* @__PURE__ */ o(t, {
|
|
43
|
+
mode: "upload",
|
|
44
|
+
uploadStatus: w.isPending || x ? "uploading" : "idle",
|
|
45
|
+
uploadErrorMessage: w.isError ? C.attachFailed : S ? C.deleteFailed : void 0,
|
|
46
|
+
noticeMessage: v && !S ? C.pendingDeletionNotice : void 0,
|
|
47
|
+
onFilesSelected: (e) => {
|
|
48
|
+
let [t] = e;
|
|
49
|
+
if (t) {
|
|
50
|
+
if (i) {
|
|
51
|
+
let e = () => w.mutate({
|
|
52
|
+
path: { payable_id: i },
|
|
53
|
+
file: t
|
|
54
|
+
});
|
|
55
|
+
if (v && b) {
|
|
56
|
+
b().then(e, () => void 0);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
e();
|
|
60
|
+
} else h?.(t);
|
|
189
61
|
}
|
|
190
62
|
}
|
|
191
|
-
};
|
|
63
|
+
});
|
|
64
|
+
let D = a?.name ?? m?.name ?? "", O = n(a || {
|
|
65
|
+
name: D,
|
|
66
|
+
url: T ?? "",
|
|
67
|
+
mimetype: m?.type ?? ""
|
|
68
|
+
}, C.preview);
|
|
69
|
+
return /* @__PURE__ */ o(t, {
|
|
70
|
+
mode: "document",
|
|
71
|
+
fileName: D,
|
|
72
|
+
preview: O,
|
|
73
|
+
isDeleting: x,
|
|
74
|
+
deleteErrorMessage: S ? C.deleteFailed : void 0,
|
|
75
|
+
onDownload: a ? () => window.open(a.url, "_blank", "noopener,noreferrer") : void 0,
|
|
76
|
+
onDelete: u ? void 0 : a && i ? y : _ ? void 0 : g
|
|
77
|
+
});
|
|
192
78
|
}
|
|
193
79
|
//#endregion
|
|
194
|
-
export {
|
|
80
|
+
export { c as SourceDocumentContainer, c as default };
|
|
@@ -1,80 +1,35 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { useAttachPayableFileMutation as e } from "../../data-access/dist/index13.js";
|
|
6
|
-
import "../../data-access/dist/index.js";
|
|
7
|
-
import { SourceDocumentPanel as t } from "../../ui/dist/index111.js";
|
|
8
|
-
import "../../ui/dist/index.js";
|
|
9
|
-
import { createSourceDocumentPreview as n } from "./index49.js";
|
|
10
|
-
import { SOURCE_DOCUMENT_CONTAINER_LABELS_EN as r } from "./index50.js";
|
|
11
|
-
import { useEffect as i, useState as a } from "react";
|
|
12
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
13
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
return i(() => {
|
|
17
|
-
if (!e) {
|
|
18
|
-
n(void 0);
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
let t = URL.createObjectURL(e);
|
|
22
|
-
return n(t), () => URL.revokeObjectURL(t);
|
|
23
|
-
}, [e]), t;
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e?.trim() ?? "";
|
|
24
4
|
}
|
|
25
|
-
function
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (!
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
file: t
|
|
54
|
-
});
|
|
55
|
-
if (v && b) {
|
|
56
|
-
b().then(e, () => void 0);
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
e();
|
|
60
|
-
} else h?.(t);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
let D = a?.name ?? m?.name ?? "", O = n(a || {
|
|
65
|
-
name: D,
|
|
66
|
-
url: T ?? "",
|
|
67
|
-
mimetype: m?.type ?? ""
|
|
68
|
-
}, C.preview);
|
|
69
|
-
return /* @__PURE__ */ o(t, {
|
|
70
|
-
mode: "document",
|
|
71
|
-
fileName: D,
|
|
72
|
-
preview: O,
|
|
73
|
-
isDeleting: x,
|
|
74
|
-
deleteErrorMessage: S ? C.deleteFailed : void 0,
|
|
75
|
-
onDownload: a ? () => window.open(a.url, "_blank", "noopener,noreferrer") : void 0,
|
|
76
|
-
onDelete: u ? void 0 : a && i ? y : _ ? void 0 : g
|
|
77
|
-
});
|
|
5
|
+
function t(t) {
|
|
6
|
+
let n = e(t);
|
|
7
|
+
return n.length === 2 ? n.toUpperCase() : "";
|
|
8
|
+
}
|
|
9
|
+
function n(t) {
|
|
10
|
+
let n = e(t.bank_account?.routing_number), r = e(t.bank_account?.account_number);
|
|
11
|
+
if (n || r) return {
|
|
12
|
+
accountHolderName: e(t.bank_account?.account_holder_name) || e(t.name),
|
|
13
|
+
routingNumber: n,
|
|
14
|
+
accountNumber: r
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function r(r) {
|
|
18
|
+
if (!r) return;
|
|
19
|
+
let i = {
|
|
20
|
+
legalName: e(r.name),
|
|
21
|
+
email: e(r.email),
|
|
22
|
+
phone: e(r.phone),
|
|
23
|
+
address: {
|
|
24
|
+
line1: e(r.address?.line1),
|
|
25
|
+
line2: e(r.address?.line2),
|
|
26
|
+
city: e(r.address?.city),
|
|
27
|
+
state: t(r.address?.state),
|
|
28
|
+
postalCode: e(r.address?.postal_code)
|
|
29
|
+
},
|
|
30
|
+
bankAccount: n(r)
|
|
31
|
+
};
|
|
32
|
+
return i.legalName || i.email || i.phone || Object.values(i.address).some(Boolean) || i.bankAccount ? i : void 0;
|
|
78
33
|
}
|
|
79
34
|
//#endregion
|
|
80
|
-
export {
|
|
35
|
+
export { r as buildVendorPrefill };
|
|
@@ -1,35 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
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/index52.js";
|
|
11
|
+
import "../../ui/dist/index.js";
|
|
12
|
+
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
13
|
+
import { mergeVendorInlineFormLabels as o } from "./index49.js";
|
|
14
|
+
import { useMemo as s } from "react";
|
|
15
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
1
16
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
function u({ mode: u, values: d, errors: f, onChange: p, onAddressChange: m, sectionsToExpand: h, onAddressExpand: g, onCancel: _, onSave: v, isSaving: y = !1, search: b, paymentInstructions: x, labels: S }) {
|
|
18
|
+
let C = s(() => o(S), [S]), w = s(() => t(), []), T = i(f ?? {});
|
|
19
|
+
return /* @__PURE__ */ l("div", {
|
|
20
|
+
ref: T,
|
|
21
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ c("p", {
|
|
24
|
+
className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
25
|
+
children: u === "edit" ? C.editTitle : C.createTitle
|
|
26
|
+
}),
|
|
27
|
+
u === "edit" && b ? /* @__PURE__ */ c(a, {
|
|
28
|
+
...b,
|
|
29
|
+
labels: { fieldLabel: C.switchVendorFieldLabel }
|
|
30
|
+
}) : null,
|
|
31
|
+
/* @__PURE__ */ c(r, {
|
|
32
|
+
mode: u,
|
|
33
|
+
counterpartMode: "vendor",
|
|
34
|
+
values: d,
|
|
35
|
+
errors: f,
|
|
36
|
+
stateOptions: w,
|
|
37
|
+
onChange: p,
|
|
38
|
+
onAddressChange: m,
|
|
39
|
+
sections: {
|
|
40
|
+
entityType: !0,
|
|
41
|
+
profileHeading: !1,
|
|
42
|
+
title: !1,
|
|
43
|
+
taxId: !1,
|
|
44
|
+
address: "collapsible",
|
|
45
|
+
bankAccount: !1
|
|
46
|
+
},
|
|
47
|
+
sectionsToExpand: h,
|
|
48
|
+
onAddressExpand: g,
|
|
49
|
+
labels: { businessNameLabel: C.nameLabel }
|
|
50
|
+
}),
|
|
51
|
+
x ? /* @__PURE__ */ l("div", {
|
|
52
|
+
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
53
|
+
children: [/* @__PURE__ */ l("div", {
|
|
54
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
55
|
+
children: [/* @__PURE__ */ c("p", {
|
|
56
|
+
className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
|
|
57
|
+
children: C.paymentInstructionsHeading
|
|
58
|
+
}), /* @__PURE__ */ c("p", {
|
|
59
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
60
|
+
children: x.isExtracted ? C.paymentInstructionsExtracted : C.paymentInstructionsDescription
|
|
61
|
+
})]
|
|
62
|
+
}), /* @__PURE__ */ c(n, {
|
|
63
|
+
idPrefix: "vendor-inline-ach",
|
|
64
|
+
values: x.values,
|
|
65
|
+
errors: x.errors,
|
|
66
|
+
onChange: x.onChange,
|
|
67
|
+
labels: C.ach
|
|
68
|
+
})]
|
|
69
|
+
}) : null,
|
|
70
|
+
/* @__PURE__ */ l("div", {
|
|
71
|
+
className: "ttw:flex ttw:justify-end ttw:gap-2",
|
|
72
|
+
children: [/* @__PURE__ */ c(e, {
|
|
73
|
+
type: "button",
|
|
74
|
+
variant: "outline",
|
|
75
|
+
onClick: _,
|
|
76
|
+
"aria-label": C.cancelAriaLabel,
|
|
77
|
+
disabled: y,
|
|
78
|
+
children: C.cancel
|
|
79
|
+
}), v ? /* @__PURE__ */ c(e, {
|
|
80
|
+
type: "button",
|
|
81
|
+
onClick: v,
|
|
82
|
+
"aria-label": C.saveAriaLabel,
|
|
83
|
+
loading: y,
|
|
84
|
+
disabled: y,
|
|
85
|
+
children: C.save
|
|
86
|
+
}) : null]
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
});
|
|
33
90
|
}
|
|
34
91
|
//#endregion
|
|
35
|
-
export {
|
|
92
|
+
export { u as VendorInlineForm, u as default };
|