@tesouro/embedded-components-react 0.3.22 → 0.3.24
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/data-access/dist/index10.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +31 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +42 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +158 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +33 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +45 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +4 -64
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +13 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +14 -62
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +56 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +18 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +15 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +61 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +130 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +20 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +38 -69
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +48 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +5 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +71 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +48 -139
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +91 -66
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +22 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +34 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +146 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +72 -209
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +21 -103
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +209 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +211 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +104 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +12 -165
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +47 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +29 -99
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +64 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +181 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +34 -243
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +104 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +12 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +267 -81
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +4 -145
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +33 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +82 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +155 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +43 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +1 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +8 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +85 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +3 -59
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +9 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +19 -120
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +56 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +3 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +3 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +116 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +8 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +43 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +19 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +27 -249
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +82 -109
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +47 -206
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +253 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +111 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +6 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +197 -102
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +6 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +114 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +5 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +3 -162
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +9 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +10 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +123 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -170
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +7 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +163 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +108 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +27 -27
- 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/index7.js +1 -1
- package/package.json +1 -1
|
@@ -1,143 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as o } from "./index27.js";
|
|
1
|
+
import { BILL_STATUS_BADGE_LABELS_EN as e } from "../../ui/dist/index18.js";
|
|
2
|
+
import "../../ui/dist/index.js";
|
|
3
|
+
import { derivePayableStatus as t } from "./index25.js";
|
|
5
4
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js
|
|
6
|
-
var
|
|
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
|
-
invoiceDateRow: "Invoice date",
|
|
36
|
-
dueDateRow: "Due date",
|
|
37
|
-
invoiceNumberRow: "Invoice number",
|
|
38
|
-
glCodeMissing: "GL code not specified",
|
|
39
|
-
qtyPriceValue: (e, t) => `${e} x ${t}`,
|
|
40
|
-
subtotalRow: "Subtotal",
|
|
41
|
-
taxRow: "Tax",
|
|
42
|
-
discountRow: "Discounts",
|
|
43
|
-
totalRow: "Total",
|
|
44
|
-
paymentInstructionsSaveError: "Couldn't save payment instructions. Try again.",
|
|
45
|
-
paymentInstructionsLinkError: "Payment instructions were saved to the vendor, but couldn't be added to this bill. Try again."
|
|
46
|
-
}, d = {
|
|
47
|
-
dateLabel: (e) => new Date(e).toLocaleString("en-US", {
|
|
48
|
-
month: "short",
|
|
49
|
-
day: "numeric",
|
|
50
|
-
year: "numeric",
|
|
51
|
-
hour: "numeric",
|
|
52
|
-
minute: "2-digit"
|
|
53
|
-
}),
|
|
54
|
-
byActor: (e, t) => `${e} by ${t}`,
|
|
55
|
-
billAdded: "Bill added",
|
|
56
|
-
billUploaded: "Bill uploaded",
|
|
57
|
-
billUpdated: "Bill updated",
|
|
58
|
-
attachmentAdded: "Attachment added",
|
|
59
|
-
submittedForApproval: "Submitted for approval",
|
|
60
|
-
approvalRequested: "Approval requested",
|
|
61
|
-
approved: "Approved",
|
|
62
|
-
autoApproved: "Approved automatically",
|
|
63
|
-
rejected: "Rejected",
|
|
64
|
-
rejectedWithReason: (e) => `Rejected: ${e}`,
|
|
65
|
-
reopened: "Reopened",
|
|
66
|
-
markedAsPaid: "Marked as paid",
|
|
67
|
-
markedAsPartiallyPaid: "Marked as partially paid",
|
|
68
|
-
paymentReverted: "Payment reverted",
|
|
69
|
-
statusChanged: (e) => `Status changed to ${e}`
|
|
70
|
-
}, f = {
|
|
71
|
-
newTitle: "New bill",
|
|
72
|
-
extractedTitle: (e) => `Bill from ${e}`,
|
|
73
|
-
viewTitle: (e) => `Bill from ${e}`,
|
|
74
|
-
readOnlyTitle: "Bill details",
|
|
75
|
-
addedOn: (e) => `Added on ${e}`,
|
|
76
|
-
discardConfirm: "Discard your changes to this bill?",
|
|
77
|
-
scheduledSummary: i,
|
|
78
|
-
actions: r,
|
|
79
|
-
detail: u,
|
|
80
|
-
history: d,
|
|
81
|
-
payBill: e,
|
|
82
|
-
approvalPolicyCopy: n,
|
|
83
|
-
deleteDraft: {
|
|
84
|
-
menuItem: "Delete draft",
|
|
85
|
-
dialog: {
|
|
86
|
-
title: "Delete this draft?",
|
|
87
|
-
description: "The draft and anything entered on it are removed. This can't be undone.",
|
|
88
|
-
confirmButton: "Delete draft"
|
|
89
|
-
},
|
|
90
|
-
error: "Couldn't delete this draft. Try again."
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
function p(e) {
|
|
94
|
-
return {
|
|
95
|
-
...f,
|
|
96
|
-
...e,
|
|
97
|
-
actions: a(e?.actions),
|
|
98
|
-
detail: {
|
|
99
|
-
...f.detail,
|
|
100
|
-
...e?.detail
|
|
101
|
-
},
|
|
102
|
-
history: {
|
|
103
|
-
...f.history,
|
|
104
|
-
...e?.history
|
|
105
|
-
},
|
|
106
|
-
payBill: t(e?.payBill),
|
|
107
|
-
approvalPolicyCopy: {
|
|
108
|
-
...f.approvalPolicyCopy,
|
|
109
|
-
...e?.approvalPolicyCopy
|
|
110
|
-
},
|
|
111
|
-
deleteDraft: {
|
|
112
|
-
...f.deleteDraft,
|
|
113
|
-
...e?.deleteDraft,
|
|
114
|
-
dialog: (() => {
|
|
115
|
-
let t = {
|
|
116
|
-
...f.deleteDraft.dialog,
|
|
117
|
-
...e?.deleteDraft?.dialog
|
|
118
|
-
};
|
|
119
|
-
return delete t.reason, t;
|
|
120
|
-
})()
|
|
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 = t({ apiStatus: n }).status;
|
|
33
|
+
return i.statusChanged(e[a] ?? e.unknown);
|
|
121
34
|
}
|
|
122
|
-
|
|
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);
|
|
123
50
|
}
|
|
124
|
-
var m = {
|
|
125
|
-
createTitle: "New vendor",
|
|
126
|
-
editTitle: "Edit vendor",
|
|
127
|
-
close: "Close the vendor form",
|
|
128
|
-
nameLabel: "Name",
|
|
129
|
-
addAddress: "Add address (optional)",
|
|
130
|
-
paymentMethodsHeading: "Accepted payment methods",
|
|
131
|
-
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.",
|
|
132
|
-
achTitle: "ACH bank transfer",
|
|
133
|
-
achDescription: "Fast, direct deposit to the vendor's bank. Arrives in 1–3 business days.",
|
|
134
|
-
addBankAccount: "Add bank account",
|
|
135
|
-
accountHolderNameLabel: "Account holder name",
|
|
136
|
-
routingNumberLabel: "Routing number",
|
|
137
|
-
accountNumberLabel: "Account number",
|
|
138
|
-
achHelp: "Ask your vendor for this — it's usually on their invoice, W-9, or a payment instructions email they send you.",
|
|
139
|
-
cancel: "Cancel",
|
|
140
|
-
save: "Save vendor"
|
|
141
|
-
};
|
|
142
51
|
//#endregion
|
|
143
|
-
export {
|
|
52
|
+
export { i as buildBillHistory };
|
|
@@ -1,71 +1,96 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { SourceDocumentPanel as e } from "../../ui/dist/index87.js";
|
|
6
|
-
import "../../ui/dist/index.js";
|
|
7
|
-
import { useAttachPayableFileMutation as t, useDeletePayableFileMutation as n } from "../../data-access/dist/index10.js";
|
|
8
|
-
import "../../data-access/dist/index.js";
|
|
9
|
-
import { createSourceDocumentPreview as r } from "./index27.js";
|
|
10
|
-
import { SOURCE_DOCUMENT_CONTAINER_LABELS_EN as i } from "./index28.js";
|
|
11
|
-
import { useEffect as a, useState as o } from "react";
|
|
12
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
13
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
+
}
|
|
23
|
+
},
|
|
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"
|
|
28
|
+
},
|
|
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"
|
|
33
|
+
},
|
|
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
|
+
},
|
|
39
|
+
forceReject: {
|
|
40
|
+
title: "Override approval policy?",
|
|
41
|
+
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.",
|
|
42
|
+
confirmButton: "Override and reject"
|
|
43
|
+
},
|
|
44
|
+
cancelButton: "Cancel"
|
|
45
|
+
},
|
|
46
|
+
actionError: "Couldn't update this bill. Try again.",
|
|
47
|
+
actionSuccess: {
|
|
48
|
+
approve: "Bill approved.",
|
|
49
|
+
reject: "Bill rejected.",
|
|
50
|
+
markAsPaid: "Bill marked as paid.",
|
|
51
|
+
cancel: "Bill canceled.",
|
|
52
|
+
cancelScheduledPayment: "Scheduled payment canceled.",
|
|
53
|
+
reopen: "Bill reopened.",
|
|
54
|
+
forceApprove: "Bill approved, overriding the approval policy.",
|
|
55
|
+
forceReject: "Bill rejected, overriding the approval policy."
|
|
56
|
+
}
|
|
57
|
+
}, t = (e) => `Payment scheduled for ${e}`, n = [
|
|
58
|
+
"reject",
|
|
59
|
+
"cancel",
|
|
60
|
+
"cancelScheduledPayment",
|
|
61
|
+
"forceApprove",
|
|
62
|
+
"forceReject"
|
|
63
|
+
];
|
|
64
|
+
function r(e, t) {
|
|
65
|
+
let n = e.reason ? {
|
|
66
|
+
...e.reason,
|
|
67
|
+
...t?.reason
|
|
68
|
+
} : void 0, r = {
|
|
69
|
+
...e,
|
|
70
|
+
...t,
|
|
71
|
+
reason: n
|
|
72
|
+
};
|
|
73
|
+
return n || delete r.reason, r;
|
|
24
74
|
}
|
|
25
|
-
function
|
|
26
|
-
let
|
|
27
|
-
...
|
|
28
|
-
...
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (!S) return /* @__PURE__ */ s(e, {
|
|
43
|
-
mode: "upload",
|
|
44
|
-
uploadStatus: y.isPending ? "uploading" : "idle",
|
|
45
|
-
uploadErrorMessage: y.isError ? v.attachFailed : void 0,
|
|
46
|
-
onFilesSelected: (e) => {
|
|
47
|
-
let [t] = e;
|
|
48
|
-
t && (a ? y.mutate({
|
|
49
|
-
path: { payable_id: a },
|
|
50
|
-
file: t
|
|
51
|
-
}) : h?.(t));
|
|
75
|
+
function i(e, t) {
|
|
76
|
+
let i = {
|
|
77
|
+
...e,
|
|
78
|
+
...t
|
|
79
|
+
};
|
|
80
|
+
for (let a of n) i[a] = r(e[a], t?.[a]);
|
|
81
|
+
return i;
|
|
82
|
+
}
|
|
83
|
+
function a(t) {
|
|
84
|
+
let n = e;
|
|
85
|
+
return {
|
|
86
|
+
...n,
|
|
87
|
+
...t,
|
|
88
|
+
decisionDialog: i(n.decisionDialog, t?.decisionDialog),
|
|
89
|
+
actionSuccess: {
|
|
90
|
+
...n.actionSuccess,
|
|
91
|
+
...t?.actionSuccess
|
|
52
92
|
}
|
|
53
|
-
}
|
|
54
|
-
let C = o?.name ?? m?.name ?? "", w = r(o || {
|
|
55
|
-
name: C,
|
|
56
|
-
url: x ?? "",
|
|
57
|
-
mimetype: m?.type ?? ""
|
|
58
|
-
}, v.preview);
|
|
59
|
-
return /* @__PURE__ */ s(e, {
|
|
60
|
-
mode: "document",
|
|
61
|
-
fileName: C,
|
|
62
|
-
preview: w,
|
|
63
|
-
onDownload: o ? () => window.open(o.url, "_blank", "noopener,noreferrer") : void 0,
|
|
64
|
-
onDelete: d ? void 0 : o && a ? () => b.mutate({
|
|
65
|
-
path: { file_id: o.id },
|
|
66
|
-
payableId: a
|
|
67
|
-
}) : _ ? void 0 : g
|
|
68
|
-
});
|
|
93
|
+
};
|
|
69
94
|
}
|
|
70
95
|
//#endregion
|
|
71
|
-
export {
|
|
96
|
+
export { e as BILL_DETAIL_ACTIONS_LABELS_EN, t as SCHEDULED_SUMMARY_LABEL_EN, a as mergeBillDetailActionsLabels, i as mergeDecisionDialogCopy };
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
var e = new Intl.DateTimeFormat("en-CA", {
|
|
3
|
+
timeZone: "America/New_York",
|
|
4
|
+
year: "numeric",
|
|
5
|
+
month: "2-digit",
|
|
6
|
+
day: "2-digit"
|
|
7
|
+
});
|
|
8
|
+
function t(t = /* @__PURE__ */ new Date()) {
|
|
9
|
+
let n = e.formatToParts(t), r = Object.fromEntries(n.map((e) => [e.type, e.value]));
|
|
10
|
+
return `${r.year}-${r.month}-${r.day}`;
|
|
4
11
|
}
|
|
5
|
-
function
|
|
6
|
-
return e
|
|
12
|
+
function n(e) {
|
|
13
|
+
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
14
|
+
}
|
|
15
|
+
function r(e, r = /* @__PURE__ */ new Date()) {
|
|
16
|
+
return n(e) === t(r);
|
|
17
|
+
}
|
|
18
|
+
function i(e = /* @__PURE__ */ new Date()) {
|
|
19
|
+
let [n, r, i] = t(e).split("-").map(Number);
|
|
20
|
+
return new Date(n, r - 1, i);
|
|
21
|
+
}
|
|
22
|
+
function a(e, r = /* @__PURE__ */ new Date()) {
|
|
23
|
+
return n(e) < t(r);
|
|
7
24
|
}
|
|
8
25
|
//#endregion
|
|
9
|
-
export {
|
|
26
|
+
export { n as dateToCalendarKey, i as getDefaultPaymentDate, t as getEasternDateKey, a as isPastEasternDate, r as isTodayInEastern };
|
|
@@ -1,26 +1,38 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
1
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
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"
|
|
13
|
+
});
|
|
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"
|
|
18
|
+
});
|
|
19
|
+
let a = {
|
|
20
|
+
...n,
|
|
21
|
+
...i
|
|
22
22
|
};
|
|
23
|
-
return
|
|
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
|
+
})]
|
|
35
|
+
});
|
|
24
36
|
}
|
|
25
37
|
//#endregion
|
|
26
|
-
export { n as
|
|
38
|
+
export { n as SOURCE_DOCUMENT_PREVIEW_LABELS_EN, r as createSourceDocumentPreview };
|