@tesouro/embedded-components-react 0.5.0 → 0.5.1
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.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +14 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +8 -96
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +91 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +96 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +3 -137
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +49 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +129 -180
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +32 -74
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +186 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +70 -226
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +22 -219
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +221 -109
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +220 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +119 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +13 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +43 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +29 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +186 -222
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +37 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +229 -420
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +21 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +429 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +4 -224
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +38 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +222 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +44 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +6 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +12 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +109 -124
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +3 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +124 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +8 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +8 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +45 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +20 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +28 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +76 -243
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +48 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +239 -196
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +115 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +207 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +3 -114
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +106 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +25 -0
- 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/package.json +1 -1
|
@@ -1,38 +1,52 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { derivePayableStatus as e } from "./index8.js";
|
|
2
|
+
import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../ui/dist/index17.js";
|
|
3
|
+
import "../../ui/dist/index.js";
|
|
2
4
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js
|
|
3
|
-
var n =
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
5
|
+
var n = /* @__PURE__ */ new Set([
|
|
6
|
+
"credit_note_linked",
|
|
7
|
+
"credit_note_unlinked",
|
|
8
|
+
"line_item_added",
|
|
9
|
+
"line_item_updated",
|
|
10
|
+
"line_item_removed",
|
|
11
|
+
"deleted"
|
|
12
|
+
]);
|
|
13
|
+
function r(n, r, i) {
|
|
14
|
+
switch (n) {
|
|
15
|
+
case "payable_created": return r?.source_of_payable_data === "ocr" ? i.billUploaded : i.billAdded;
|
|
16
|
+
case "payable_updated": return i.billUpdated;
|
|
17
|
+
case "file_attached": return i.attachmentAdded;
|
|
18
|
+
case "submitted_for_approval": return i.submittedForApproval;
|
|
19
|
+
case "approval_requested": return i.approvalRequested;
|
|
20
|
+
case "approval_action": {
|
|
21
|
+
let e = r?.action, t = r?.reject_reason;
|
|
22
|
+
return e === "approve" ? i.approved : e === "reject" ? typeof t == "string" && t ? i.rejectedWithReason(t) : i.rejected : void 0;
|
|
23
|
+
}
|
|
24
|
+
case "auto_approved": return i.autoApproved;
|
|
25
|
+
case "reopened": return i.reopened;
|
|
26
|
+
case "marked_as_paid": return i.markedAsPaid;
|
|
27
|
+
case "marked_as_partially_paid": return i.markedAsPartiallyPaid;
|
|
28
|
+
case "payment_reverted": return i.paymentReverted;
|
|
29
|
+
case "status_changed": {
|
|
30
|
+
let n = r?.new_status;
|
|
31
|
+
if (typeof n != "string") return;
|
|
32
|
+
let a = e({ apiStatus: n }).status;
|
|
33
|
+
return i.statusChanged(t[a] ?? t.unknown);
|
|
34
|
+
}
|
|
35
|
+
default: return;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function i(e, t, i) {
|
|
39
|
+
let a = new Map(t.map((e) => [e.id, e.name]));
|
|
40
|
+
return e.filter((e) => !n.has(e.event_type)).map((e) => {
|
|
41
|
+
let t = r(e.event_type, e.event_data, i);
|
|
42
|
+
if (!t) return;
|
|
43
|
+
let n = e.entity_user_id ? a.get(e.entity_user_id) : void 0;
|
|
44
|
+
return {
|
|
45
|
+
id: e.id,
|
|
46
|
+
dateLabel: i.dateLabel(e.timestamp),
|
|
47
|
+
description: n ? i.byActor(t, n) : t
|
|
48
|
+
};
|
|
49
|
+
}).filter((e) => !!e);
|
|
36
50
|
}
|
|
37
51
|
//#endregion
|
|
38
|
-
export {
|
|
52
|
+
export { i as buildBillHistory };
|
|
@@ -1,191 +1,140 @@
|
|
|
1
|
-
import { BILL_REJECTED_BANNER_LABELS_EN as e } from "../../ui/dist/index68.js";
|
|
2
|
-
import { UNSAVED_BILL_DIALOG_LABELS_EN as t } from "../../ui/dist/index105.js";
|
|
3
|
-
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 "./index16.js";
|
|
6
|
-
import "./index19.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 "./index44.js";
|
|
9
|
-
import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as f } from "./index45.js";
|
|
10
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
accountHolder: "Account holder",
|
|
33
|
-
routingNumber: "Routing number",
|
|
34
|
-
accountNumber: "Account number",
|
|
35
|
-
paymentMethodLoading: "Loading payment method...",
|
|
36
|
-
paymentMethodUnavailable: "We could not load payment methods. Try again.",
|
|
37
|
-
searchFailed: "We could not load vendors. Try again.",
|
|
38
|
-
vendorDetailsFailed: "We could not load this vendor. Try again."
|
|
39
|
-
}, h = {
|
|
40
|
-
attachFailed: "We could not attach that file. Try again.",
|
|
41
|
-
deleteFailed: "We could not remove that document. Try again.",
|
|
42
|
-
noDocument: "No document attached to this bill.",
|
|
43
|
-
pendingDeletionNotice: "This document will be removed when you save this bill.",
|
|
44
|
-
preview: f
|
|
45
|
-
}, g = {
|
|
46
|
-
...c,
|
|
47
|
-
notProvided: "Not provided",
|
|
48
|
-
paymentInstructionsValue: (e) => `Account ending in ${e}`,
|
|
49
|
-
paymentInstructionsNotSet: "Not set",
|
|
50
|
-
accountHolderFieldLabel: "Account holder",
|
|
51
|
-
routingNumberFieldLabel: "Routing number",
|
|
52
|
-
accountNumberFieldLabel: "Account number",
|
|
53
|
-
invoiceDateRow: "Invoice date",
|
|
54
|
-
dueDateRow: "Due date",
|
|
55
|
-
invoiceNumberRow: "Invoice number",
|
|
56
|
-
glCodeMissing: "GL code not specified",
|
|
57
|
-
glCodeUnavailable: "GL code unavailable",
|
|
58
|
-
qtyPriceValue: (e, t) => `${e} x ${t}`,
|
|
59
|
-
subtotalRow: "Subtotal",
|
|
60
|
-
taxRow: "Tax",
|
|
61
|
-
discountRow: "Discounts",
|
|
62
|
-
totalRow: "Total",
|
|
63
|
-
paidOnLabel: (e) => `Paid on ${e}`,
|
|
64
|
-
paymentInstructionsSaveError: "Couldn't save payment instructions. Try again.",
|
|
65
|
-
paymentInstructionsLinkError: "Payment instructions were saved to the vendor, but couldn't be added to this bill. Try again.",
|
|
66
|
-
rejectedByOn: (e, t) => `Rejected by ${e} on ${t}`,
|
|
67
|
-
rejectedOn: (e) => `Rejected on ${e}`,
|
|
68
|
-
rejectionMessage: (e) => `"${e}"`
|
|
69
|
-
}, _ = {
|
|
70
|
-
dateLabel: (e) => new Date(e).toLocaleString("en-US", {
|
|
71
|
-
month: "short",
|
|
72
|
-
day: "numeric",
|
|
73
|
-
year: "numeric",
|
|
74
|
-
hour: "numeric",
|
|
75
|
-
minute: "2-digit"
|
|
76
|
-
}),
|
|
77
|
-
byActor: (e, t) => `${e} by ${t}`,
|
|
78
|
-
billAdded: "Bill added",
|
|
79
|
-
billUploaded: "Bill uploaded",
|
|
80
|
-
billUpdated: "Bill updated",
|
|
81
|
-
attachmentAdded: "Attachment added",
|
|
82
|
-
submittedForApproval: "Submitted for approval",
|
|
83
|
-
approvalRequested: "Approval requested",
|
|
84
|
-
approved: "Approved",
|
|
85
|
-
autoApproved: "Approved automatically",
|
|
86
|
-
rejected: "Rejected",
|
|
87
|
-
rejectedWithReason: (e) => `Rejected: ${e}`,
|
|
88
|
-
reopened: "Reopened",
|
|
89
|
-
markedAsPaid: "Marked as paid",
|
|
90
|
-
markedAsPartiallyPaid: "Marked as partially paid",
|
|
91
|
-
paymentReverted: "Payment reverted",
|
|
92
|
-
statusChanged: (e) => `Status changed to ${e}`
|
|
93
|
-
}, v = {
|
|
94
|
-
newTitle: "New bill",
|
|
95
|
-
extractedTitle: (e) => `Bill from ${e}`,
|
|
96
|
-
viewTitle: (e) => `Bill from ${e}`,
|
|
97
|
-
readOnlyTitle: "Bill details",
|
|
98
|
-
addedOn: (e) => `Added on ${e}`,
|
|
99
|
-
unsavedChanges: t,
|
|
100
|
-
scheduledSummary: l,
|
|
101
|
-
actions: s,
|
|
102
|
-
detail: g,
|
|
103
|
-
history: _,
|
|
104
|
-
payBill: n,
|
|
105
|
-
markAsPaid: i,
|
|
106
|
-
approvalPolicyCopy: o,
|
|
107
|
-
deleteDraft: {
|
|
108
|
-
menuItem: "Delete draft",
|
|
109
|
-
dialog: {
|
|
110
|
-
title: "Delete this draft?",
|
|
111
|
-
description: "The draft and anything entered on it are removed. This can't be undone.",
|
|
112
|
-
confirmButton: "Delete draft"
|
|
2
|
+
var e = {
|
|
3
|
+
payBill: "Pay bill",
|
|
4
|
+
markAsPaid: "Mark as paid",
|
|
5
|
+
reject: "Reject",
|
|
6
|
+
approve: "Approve",
|
|
7
|
+
cancel: "Cancel bill",
|
|
8
|
+
cancelScheduledPayment: "Cancel scheduled payment",
|
|
9
|
+
reopen: "Reopen bill",
|
|
10
|
+
forceApprove: "Approve",
|
|
11
|
+
forceReject: "Reject",
|
|
12
|
+
policyOverridesHeading: "Policy overrides",
|
|
13
|
+
decisionDialog: {
|
|
14
|
+
reject: {
|
|
15
|
+
title: "Reject this bill?",
|
|
16
|
+
description: "The bill goes back as rejected and nobody else is asked to approve it.",
|
|
17
|
+
confirmButton: "Reject bill",
|
|
18
|
+
reason: {
|
|
19
|
+
label: "Reason",
|
|
20
|
+
placeholder: "Tell the submitter what needs to change",
|
|
21
|
+
optionalHint: "Optional"
|
|
22
|
+
}
|
|
113
23
|
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
noAccess: "You don't have access to GL codes",
|
|
119
|
-
empty: "No GL codes set up yet"
|
|
120
|
-
},
|
|
121
|
-
rejectedBanner: e
|
|
122
|
-
};
|
|
123
|
-
function y(e) {
|
|
124
|
-
return {
|
|
125
|
-
...v,
|
|
126
|
-
...e,
|
|
127
|
-
actions: u(e?.actions),
|
|
128
|
-
detail: {
|
|
129
|
-
...v.detail,
|
|
130
|
-
...e?.detail,
|
|
131
|
-
paymentHistoryMethodLabels: d(e?.detail?.paymentHistoryMethodLabels)
|
|
24
|
+
cancel: {
|
|
25
|
+
title: "Cancel this bill?",
|
|
26
|
+
description: "Cancelling is permanent. The bill can't be reopened, edited, or paid afterwards.",
|
|
27
|
+
confirmButton: "Cancel bill"
|
|
132
28
|
},
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
29
|
+
cancelScheduledPayment: {
|
|
30
|
+
title: "Cancel this scheduled payment?",
|
|
31
|
+
description: "The payment will not be sent. The bill stays ready to pay, so you can schedule it again for another date.",
|
|
32
|
+
confirmButton: "Cancel payment"
|
|
136
33
|
},
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
34
|
+
forceApprove: {
|
|
35
|
+
title: "Override approval policy?",
|
|
36
|
+
description: "The below people haven't approved this bill yet. Approving now will bypass their required review. This will be recorded in the audit history and can't be undone.",
|
|
37
|
+
confirmButton: "Override and approve",
|
|
38
|
+
noApprovalPolicy: {
|
|
39
|
+
title: "Approve this bill?",
|
|
40
|
+
description: "This bill has no approval policy applied. Approving now will be recorded in the audit history and can't be undone.",
|
|
41
|
+
confirmButton: "Approve bill"
|
|
42
|
+
}
|
|
142
43
|
},
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
44
|
+
forceReject: {
|
|
45
|
+
title: "Override approval policy?",
|
|
46
|
+
description: "The below people haven't approved this bill yet. Rejecting now will bypass their required review. This will be recorded in the audit history and can't be undone.",
|
|
47
|
+
confirmButton: "Override and reject",
|
|
48
|
+
noApprovalPolicy: {
|
|
49
|
+
title: "Reject this bill?",
|
|
50
|
+
description: "This bill has no approval policy applied. Rejecting now will be recorded in the audit history and can't be undone.",
|
|
51
|
+
confirmButton: "Reject bill"
|
|
52
|
+
}
|
|
146
53
|
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
54
|
+
cancelButton: "Cancel"
|
|
55
|
+
},
|
|
56
|
+
actionError: "Couldn't update this bill. Try again.",
|
|
57
|
+
actionSuccess: {
|
|
58
|
+
approve: "Bill approved.",
|
|
59
|
+
reject: "Bill rejected.",
|
|
60
|
+
markAsPaid: "Bill marked as paid.",
|
|
61
|
+
cancel: "Bill canceled.",
|
|
62
|
+
cancelScheduledPayment: "Scheduled payment canceled.",
|
|
63
|
+
reopen: "Bill reopened.",
|
|
64
|
+
forceApprove: "Bill approved, overriding the approval policy.",
|
|
65
|
+
forceReject: "Bill rejected, overriding the approval policy.",
|
|
66
|
+
forceApproveNoApprovalPolicy: "Bill approved.",
|
|
67
|
+
forceRejectNoApprovalPolicy: "Bill rejected."
|
|
68
|
+
}
|
|
69
|
+
}, t = (e) => `Payment scheduled for ${e}`, n = [
|
|
70
|
+
"reject",
|
|
71
|
+
"cancel",
|
|
72
|
+
"cancelScheduledPayment",
|
|
73
|
+
"forceApprove",
|
|
74
|
+
"forceReject"
|
|
75
|
+
];
|
|
76
|
+
function r(e, t) {
|
|
77
|
+
let n = e.reason ? {
|
|
78
|
+
...e.reason,
|
|
79
|
+
...t?.reason
|
|
80
|
+
} : void 0, r = e.noApprovalPolicy ? {
|
|
81
|
+
...e.noApprovalPolicy,
|
|
82
|
+
...t?.noApprovalPolicy
|
|
83
|
+
} : void 0, i = {
|
|
84
|
+
...e,
|
|
85
|
+
...t,
|
|
86
|
+
reason: n,
|
|
87
|
+
noApprovalPolicy: r
|
|
88
|
+
};
|
|
89
|
+
return n || delete i.reason, r || delete i.noApprovalPolicy, i;
|
|
90
|
+
}
|
|
91
|
+
function i(e, t) {
|
|
92
|
+
let i = {
|
|
93
|
+
...e,
|
|
94
|
+
...t
|
|
95
|
+
};
|
|
96
|
+
for (let a of n) i[a] = r(e[a], t?.[a]);
|
|
97
|
+
return i;
|
|
98
|
+
}
|
|
99
|
+
function a(t) {
|
|
100
|
+
let n = e;
|
|
101
|
+
return {
|
|
102
|
+
...n,
|
|
103
|
+
...t,
|
|
104
|
+
decisionDialog: i(n.decisionDialog, t?.decisionDialog),
|
|
105
|
+
actionSuccess: {
|
|
106
|
+
...n.actionSuccess,
|
|
107
|
+
...t?.actionSuccess
|
|
165
108
|
}
|
|
166
109
|
};
|
|
167
110
|
}
|
|
168
|
-
var
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
111
|
+
var o = {
|
|
112
|
+
paymentHistorySentLabel: "Payment sent",
|
|
113
|
+
paymentHistoryScheduledLabel: "Payment scheduled",
|
|
114
|
+
paymentHistoryCanceledLabel: "Payment canceled",
|
|
115
|
+
paymentHistoryOtherLabel: "Payment",
|
|
116
|
+
paymentHistoryMethodSuffix: (e, t) => `${e} via ${t}`,
|
|
117
|
+
paymentHistoryOverpaidLabel: (e) => `+${e} overpaid`,
|
|
118
|
+
paymentHistoryMarkedPaidExternalLabel: "Marked as paid manually",
|
|
119
|
+
paymentHistoryMarkedPaidLabel: "Marked as paid",
|
|
120
|
+
paymentHistoryPartiallyPaidExternalLabel: "Partial payment marked manually",
|
|
121
|
+
paymentHistoryPartiallyPaidLabel: "Partial payment",
|
|
122
|
+
paymentHistoryRevertedLabel: "Payment reverted",
|
|
123
|
+
paymentHistoryMethodLabels: {
|
|
124
|
+
ach: "ACH",
|
|
125
|
+
us_ach: "ACH",
|
|
126
|
+
wire: "Wire",
|
|
127
|
+
check: "Check",
|
|
128
|
+
paper_check: "Check",
|
|
129
|
+
bank_account: "Bank transfer",
|
|
130
|
+
card: "Card"
|
|
131
|
+
}
|
|
189
132
|
};
|
|
133
|
+
function s(e) {
|
|
134
|
+
return {
|
|
135
|
+
...o.paymentHistoryMethodLabels,
|
|
136
|
+
...e
|
|
137
|
+
};
|
|
138
|
+
}
|
|
190
139
|
//#endregion
|
|
191
|
-
export {
|
|
140
|
+
export { e as BILL_DETAIL_ACTIONS_LABELS_EN, o as PAYMENT_HISTORY_LABELS_EN, t as SCHEDULED_SUMMARY_LABEL_EN, a as mergeBillDetailActionsLabels, i as mergeDecisionDialogCopy, s as mergePaymentHistoryMethodLabels };
|
|
@@ -1,80 +1,38 @@
|
|
|
1
|
-
|
|
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/index103.js";
|
|
8
|
-
import "../../ui/dist/index.js";
|
|
9
|
-
import { createSourceDocumentPreview as n } from "./index45.js";
|
|
10
|
-
import { SOURCE_DOCUMENT_CONTAINER_LABELS_EN as r } from "./index46.js";
|
|
11
|
-
import { useEffect as i, useState as a } from "react";
|
|
12
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
13
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
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
|
|
3
|
+
var n = {
|
|
4
|
+
previewUnavailable: "Preview not available for this file type.",
|
|
5
|
+
openFile: "Open file"
|
|
6
|
+
};
|
|
7
|
+
function r(r, i = {}) {
|
|
8
|
+
if (r.mimetype === "application/pdf") return /* @__PURE__ */ e("iframe", {
|
|
9
|
+
src: `${r.url}#toolbar=0&navpanes=0`,
|
|
10
|
+
title: r.name,
|
|
11
|
+
referrerPolicy: "no-referrer",
|
|
12
|
+
className: "ttw:h-full ttw:w-full ttw:border-0"
|
|
41
13
|
});
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
14
|
+
if (r.mimetype.startsWith("image/")) return /* @__PURE__ */ e("img", {
|
|
15
|
+
src: r.url,
|
|
16
|
+
alt: r.name,
|
|
17
|
+
className: "ttw:max-h-full ttw:max-w-full ttw:object-contain"
|
|
63
18
|
});
|
|
64
|
-
let
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
19
|
+
let a = {
|
|
20
|
+
...n,
|
|
21
|
+
...i
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ t("div", {
|
|
24
|
+
className: "ttw:flex ttw:h-full ttw:w-full ttw:flex-col ttw:items-center ttw:justify-center ttw:gap-2 ttw:p-4 ttw:text-center",
|
|
25
|
+
children: [/* @__PURE__ */ e("p", {
|
|
26
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
27
|
+
children: a.previewUnavailable
|
|
28
|
+
}), /* @__PURE__ */ e("a", {
|
|
29
|
+
href: r.url,
|
|
30
|
+
target: "_blank",
|
|
31
|
+
rel: "noreferrer",
|
|
32
|
+
className: "ttw:text-sm ttw:font-medium ttw:text-primary ttw:underline ttw:underline-offset-2",
|
|
33
|
+
children: a.openFile
|
|
34
|
+
})]
|
|
77
35
|
});
|
|
78
36
|
}
|
|
79
37
|
//#endregion
|
|
80
|
-
export {
|
|
38
|
+
export { n as SOURCE_DOCUMENT_PREVIEW_LABELS_EN, r as createSourceDocumentPreview };
|