@tesouro/embedded-components-react 0.3.31 → 0.3.32
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/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +38 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +83 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +47 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { UNSAVED_BILL_DIALOG_LABELS_EN as e } from "../../ui/dist/index95.js";
|
|
2
|
+
import "../../ui/dist/index.js";
|
|
3
|
+
import { PAY_BILL_FLOW_LABELS_EN as t, mergePayBillFlowLabels as n } from "./index11.js";
|
|
4
|
+
import { MARK_AS_PAID_FLOW_LABELS_EN as r, mergeMarkAsPaidFlowLabels as i } from "./index2.js";
|
|
3
5
|
import "./index5.js";
|
|
4
|
-
import { APPROVAL_POLICY_RULE_COPY_EN as
|
|
5
|
-
import { BILL_DETAIL_ACTIONS_LABELS_EN as
|
|
6
|
-
import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as
|
|
6
|
+
import { APPROVAL_POLICY_RULE_COPY_EN as a } from "./index15.js";
|
|
7
|
+
import { BILL_DETAIL_ACTIONS_LABELS_EN as o, SCHEDULED_SUMMARY_LABEL_EN as s, mergeBillDetailActionsLabels as c } from "./index29.js";
|
|
8
|
+
import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as l } from "./index30.js";
|
|
7
9
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js
|
|
8
|
-
var
|
|
10
|
+
var u = {
|
|
9
11
|
unmappedValidationError: (e, t) => `${e}: ${t}`,
|
|
10
12
|
unknownValidationField: "(unknown field)",
|
|
11
13
|
requiredField: "This field is required.",
|
|
@@ -17,7 +19,7 @@ var l = {
|
|
|
17
19
|
unusableQuantity: "Enter a quantity greater than 0.",
|
|
18
20
|
lineItemsNeedAttention: "Check the highlighted line items before saving.",
|
|
19
21
|
totalsNeedAttention: "Enter valid amounts for discount, tax, and total."
|
|
20
|
-
},
|
|
22
|
+
}, d = {
|
|
21
23
|
achMethod: "via ACH bank transfer",
|
|
22
24
|
noMethod: "No payment method on file",
|
|
23
25
|
accountHolder: "Account holder",
|
|
@@ -27,13 +29,13 @@ var l = {
|
|
|
27
29
|
paymentMethodUnavailable: "We could not load payment methods. Try again.",
|
|
28
30
|
searchFailed: "We could not load vendors. Try again.",
|
|
29
31
|
vendorDetailsFailed: "We could not load this vendor. Try again."
|
|
30
|
-
},
|
|
32
|
+
}, f = {
|
|
31
33
|
attachFailed: "We could not attach that file. Try again.",
|
|
32
34
|
deleteFailed: "We could not remove that document. Try again.",
|
|
33
35
|
noDocument: "No document attached to this bill.",
|
|
34
36
|
pendingDeletionNotice: "This document will be removed when you save this bill.",
|
|
35
|
-
preview:
|
|
36
|
-
},
|
|
37
|
+
preview: l
|
|
38
|
+
}, p = {
|
|
37
39
|
notProvided: "Not provided",
|
|
38
40
|
paymentInstructionsValue: (e) => `Account ending in ${e}`,
|
|
39
41
|
invoiceDateRow: "Invoice date",
|
|
@@ -47,7 +49,7 @@ var l = {
|
|
|
47
49
|
totalRow: "Total",
|
|
48
50
|
paymentInstructionsSaveError: "Couldn't save payment instructions. Try again.",
|
|
49
51
|
paymentInstructionsLinkError: "Payment instructions were saved to the vendor, but couldn't be added to this bill. Try again."
|
|
50
|
-
},
|
|
52
|
+
}, m = {
|
|
51
53
|
dateLabel: (e) => new Date(e).toLocaleString("en-US", {
|
|
52
54
|
month: "short",
|
|
53
55
|
day: "numeric",
|
|
@@ -71,20 +73,20 @@ var l = {
|
|
|
71
73
|
markedAsPartiallyPaid: "Marked as partially paid",
|
|
72
74
|
paymentReverted: "Payment reverted",
|
|
73
75
|
statusChanged: (e) => `Status changed to ${e}`
|
|
74
|
-
},
|
|
76
|
+
}, h = {
|
|
75
77
|
newTitle: "New bill",
|
|
76
78
|
extractedTitle: (e) => `Bill from ${e}`,
|
|
77
79
|
viewTitle: (e) => `Bill from ${e}`,
|
|
78
80
|
readOnlyTitle: "Bill details",
|
|
79
81
|
addedOn: (e) => `Added on ${e}`,
|
|
80
|
-
|
|
81
|
-
scheduledSummary:
|
|
82
|
-
actions:
|
|
83
|
-
detail:
|
|
84
|
-
history:
|
|
85
|
-
payBill:
|
|
86
|
-
markAsPaid:
|
|
87
|
-
approvalPolicyCopy:
|
|
82
|
+
unsavedChanges: e,
|
|
83
|
+
scheduledSummary: s,
|
|
84
|
+
actions: o,
|
|
85
|
+
detail: p,
|
|
86
|
+
history: m,
|
|
87
|
+
payBill: t,
|
|
88
|
+
markAsPaid: r,
|
|
89
|
+
approvalPolicyCopy: a,
|
|
88
90
|
deleteDraft: {
|
|
89
91
|
menuItem: "Delete draft",
|
|
90
92
|
dialog: {
|
|
@@ -95,31 +97,35 @@ var l = {
|
|
|
95
97
|
error: "Couldn't delete this draft. Try again."
|
|
96
98
|
}
|
|
97
99
|
};
|
|
98
|
-
function
|
|
100
|
+
function g(e) {
|
|
99
101
|
return {
|
|
100
|
-
...
|
|
102
|
+
...h,
|
|
101
103
|
...e,
|
|
102
|
-
actions:
|
|
104
|
+
actions: c(e?.actions),
|
|
103
105
|
detail: {
|
|
104
|
-
...
|
|
106
|
+
...h.detail,
|
|
105
107
|
...e?.detail
|
|
106
108
|
},
|
|
107
109
|
history: {
|
|
108
|
-
...
|
|
110
|
+
...h.history,
|
|
109
111
|
...e?.history
|
|
110
112
|
},
|
|
111
|
-
payBill:
|
|
112
|
-
markAsPaid:
|
|
113
|
+
payBill: n(e?.payBill),
|
|
114
|
+
markAsPaid: i(e?.markAsPaid),
|
|
115
|
+
unsavedChanges: {
|
|
116
|
+
...h.unsavedChanges,
|
|
117
|
+
...e?.unsavedChanges
|
|
118
|
+
},
|
|
113
119
|
approvalPolicyCopy: {
|
|
114
|
-
...
|
|
120
|
+
...h.approvalPolicyCopy,
|
|
115
121
|
...e?.approvalPolicyCopy
|
|
116
122
|
},
|
|
117
123
|
deleteDraft: {
|
|
118
|
-
...
|
|
124
|
+
...h.deleteDraft,
|
|
119
125
|
...e?.deleteDraft,
|
|
120
126
|
dialog: (() => {
|
|
121
127
|
let t = {
|
|
122
|
-
...
|
|
128
|
+
...h.deleteDraft.dialog,
|
|
123
129
|
...e?.deleteDraft?.dialog
|
|
124
130
|
};
|
|
125
131
|
return delete t.reason, t;
|
|
@@ -127,7 +133,7 @@ function h(e) {
|
|
|
127
133
|
}
|
|
128
134
|
};
|
|
129
135
|
}
|
|
130
|
-
var
|
|
136
|
+
var _ = {
|
|
131
137
|
createTitle: "New vendor",
|
|
132
138
|
editTitle: "Edit vendor",
|
|
133
139
|
close: "Close the vendor form",
|
|
@@ -146,4 +152,4 @@ var g = {
|
|
|
146
152
|
save: "Save vendor"
|
|
147
153
|
};
|
|
148
154
|
//#endregion
|
|
149
|
-
export {
|
|
155
|
+
export { u as BILL_CREATE_MESSAGE_LABELS_EN, h as BILL_CREATE_SCREEN_LABELS_EN, p as BILL_DETAIL_VIEW_LABELS_EN, m as BILL_HISTORY_LABELS_EN, f as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, _ as VENDOR_INLINE_FORM_LABELS_EN, d as VENDOR_SECTION_PROPS_LABELS_EN, g as mergeBillCreateScreenCopy };
|
|
@@ -104,9 +104,10 @@ function x({ payableId: _, form: v, counterpartId: x, clearCounterpart: S, prepa
|
|
|
104
104
|
let t = await C?.();
|
|
105
105
|
if (t && !t.ok) return;
|
|
106
106
|
let n = await Y(t?.counterpartBankAccountId);
|
|
107
|
-
v.setErrors(void 0), w?.(n), E?.(n), e.success(k.draftSaved);
|
|
107
|
+
return v.setErrors(void 0), w?.(n), E?.(n), e.success(k.draftSaved), n;
|
|
108
108
|
} catch {
|
|
109
109
|
v.setErrors({ form: k.saveFailed });
|
|
110
|
+
return;
|
|
110
111
|
} finally {
|
|
111
112
|
B(void 0), V.current = !1;
|
|
112
113
|
}
|
|
@@ -9,7 +9,10 @@ var e = {
|
|
|
9
9
|
decisionConfirm: "bill-pay-bill-decision-confirm",
|
|
10
10
|
decisionReason: "bill-pay-bill-decision-reason",
|
|
11
11
|
deleteDraftDialog: "bill-pay-bill-delete-draft-dialog",
|
|
12
|
-
deleteDraftConfirm: "bill-pay-bill-delete-draft-confirm"
|
|
12
|
+
deleteDraftConfirm: "bill-pay-bill-delete-draft-confirm",
|
|
13
|
+
unsavedDialog: "bill-pay-bill-unsaved-dialog",
|
|
14
|
+
unsavedSaveDraft: "bill-pay-bill-unsaved-save-draft",
|
|
15
|
+
unsavedDiscard: "bill-pay-bill-unsaved-discard"
|
|
13
16
|
};
|
|
14
17
|
//#endregion
|
|
15
18
|
export { e as billCreateTestIds };
|
|
@@ -17,54 +17,55 @@ import { BillDecisionDialog as n } from "../../ui/dist/index50.js";
|
|
|
17
17
|
import { BillDuplicateNotice as se } from "../../ui/dist/index60.js";
|
|
18
18
|
import { ExtractionNotice as ce } from "../../ui/dist/index77.js";
|
|
19
19
|
import { MarkAsPaidDialog as le } from "../../ui/dist/index86.js";
|
|
20
|
+
import { UnsavedBillDialog as ue } from "../../ui/dist/index96.js";
|
|
20
21
|
import "../../ui/dist/index.js";
|
|
21
|
-
import { usePayableHistoryQuery as
|
|
22
|
-
import { useAllPayableLineItemsQuery as
|
|
23
|
-
import { usePayableQuery as
|
|
22
|
+
import { usePayableHistoryQuery as de } from "../../data-access/dist/index6.js";
|
|
23
|
+
import { useAllPayableLineItemsQuery as fe } from "../../data-access/dist/index7.js";
|
|
24
|
+
import { usePayableQuery as pe } from "../../data-access/dist/index13.js";
|
|
24
25
|
import "../../data-access/dist/index.js";
|
|
25
|
-
import { PayBillFlow as
|
|
26
|
+
import { PayBillFlow as me } from "./index13.js";
|
|
26
27
|
import "./index14.js";
|
|
27
|
-
import { useMarkAsPaidFlow as
|
|
28
|
+
import { useMarkAsPaidFlow as he } from "./index4.js";
|
|
28
29
|
import "./index5.js";
|
|
29
|
-
import { mergeBillCreateScreenCopy as
|
|
30
|
-
import { useBillCreateController as
|
|
31
|
-
import { useBillForm as
|
|
32
|
-
import { useApprovalPolicyCardView as
|
|
33
|
-
import { useCurrentApprovalRequestId as
|
|
34
|
-
import { usePayableDetailActions as
|
|
35
|
-
import { useScheduledPayment as
|
|
36
|
-
import { useDraftDelete as
|
|
37
|
-
import { buildBillDetailView as
|
|
38
|
-
import { buildBillHistory as
|
|
39
|
-
import { SourceDocumentContainer as
|
|
40
|
-
import { useVendorSectionProps as
|
|
41
|
-
import { usePaymentInstructionsForm as
|
|
30
|
+
import { mergeBillCreateScreenCopy as ge } from "./index31.js";
|
|
31
|
+
import { useBillCreateController as _e } from "./index40.js";
|
|
32
|
+
import { useBillForm as ve } from "./index42.js";
|
|
33
|
+
import { useApprovalPolicyCardView as ye } from "./index19.js";
|
|
34
|
+
import { useCurrentApprovalRequestId as be } from "./index20.js";
|
|
35
|
+
import { usePayableDetailActions as xe } from "./index22.js";
|
|
36
|
+
import { useScheduledPayment as Se } from "./index23.js";
|
|
37
|
+
import { useDraftDelete as Ce } from "./index24.js";
|
|
38
|
+
import { buildBillDetailView as we } from "./index27.js";
|
|
39
|
+
import { buildBillHistory as Te } from "./index28.js";
|
|
40
|
+
import { SourceDocumentContainer as Ee } from "./index32.js";
|
|
41
|
+
import { useVendorSectionProps as De } from "./index35.js";
|
|
42
|
+
import { usePaymentInstructionsForm as Oe } from "./index36.js";
|
|
42
43
|
import { billCreateTestIds as r } from "./index43.js";
|
|
43
|
-
import { useCallback as i, useEffect as
|
|
44
|
+
import { useCallback as i, useEffect as ke, useMemo as a, useRef as Ae, useState as o } from "react";
|
|
44
45
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
45
46
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js
|
|
46
|
-
function
|
|
47
|
+
function je(e) {
|
|
47
48
|
return !!(e?.bank_account?.account_holder_name && e.bank_account.routing_number && e.bank_account.account_number);
|
|
48
49
|
}
|
|
49
|
-
function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m, poweredByBankName:
|
|
50
|
-
let h = a(() =>
|
|
50
|
+
function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m, poweredByBankName: Me, isPossibleDuplicate: Ne }) {
|
|
51
|
+
let h = a(() => ge(m), [m]), [g, _] = o(), [v, y] = o(!1), [Pe, Fe] = o(!1), [Ie, b] = o(!1), [Le, x] = o(!1), [Re, S] = o(), C = f ?? Re, w = pe(C, { pollWhileOcrProcessing: !0 }), T = fe(C), E = ee(), D = w.data, O = ve({
|
|
51
52
|
payable: D,
|
|
52
53
|
lineItems: T.lineItems
|
|
53
54
|
}), k = D?.counterpart_id;
|
|
54
|
-
|
|
55
|
+
ke(() => {
|
|
55
56
|
v || k && (_(k), y(!0));
|
|
56
57
|
}, [v, k]);
|
|
57
|
-
let
|
|
58
|
+
let ze = i((e) => {
|
|
58
59
|
y(!0), _(e);
|
|
59
|
-
}, []), A =
|
|
60
|
+
}, []), A = De({
|
|
60
61
|
payableId: p ? void 0 : C,
|
|
61
62
|
counterpartId: p ? void 0 : g,
|
|
62
63
|
payableCounterpartId: k,
|
|
63
|
-
onCounterpartChange:
|
|
64
|
+
onCounterpartChange: ze,
|
|
64
65
|
requiredError: O.errors?.vendor,
|
|
65
66
|
payableCounterpartBankAccountId: D?.counterpart_bank_account_id ?? void 0,
|
|
66
67
|
extractedVendor: D?.counterpart_raw_data ?? void 0
|
|
67
|
-
}), j =
|
|
68
|
+
}), j = _e({
|
|
68
69
|
payableId: f,
|
|
69
70
|
form: O,
|
|
70
71
|
counterpartId: g,
|
|
@@ -74,19 +75,19 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
|
|
|
74
75
|
onSaved: S,
|
|
75
76
|
onDraftSaved: () => d(!1),
|
|
76
77
|
onFinalized: () => d(!1)
|
|
77
|
-
}), M = !!(j.isSavingDraft || j.isFinalizing), N = p ? C : void 0, P =
|
|
78
|
+
}), M = !!(j.isSavingDraft || j.isFinalizing), N = p ? C : void 0, P = be({
|
|
78
79
|
payableId: N,
|
|
79
80
|
status: D?.status
|
|
80
|
-
}), F =
|
|
81
|
+
}), F = Ae(null), I = Se({
|
|
81
82
|
payableId: C,
|
|
82
83
|
scheduledPaymentDate: D?.scheduled_payment_date,
|
|
83
84
|
enabled: p
|
|
84
|
-
}), L = ae(D), R =
|
|
85
|
+
}), L = ae(D), R = Oe({
|
|
85
86
|
payableId: N,
|
|
86
87
|
counterpartId: p ? k : void 0,
|
|
87
88
|
saveErrorMessage: h.detail.paymentInstructionsSaveError,
|
|
88
89
|
linkErrorMessage: h.detail.paymentInstructionsLinkError
|
|
89
|
-
}), { initResponse: z } = re(), B = e(z?.scopes, [t.CounterpartWriteOrg]) && e(z?.scopes, [t.PayableWriteOrg]), V =
|
|
90
|
+
}), { initResponse: z } = re(), B = e(z?.scopes, [t.CounterpartWriteOrg]) && e(z?.scopes, [t.PayableWriteOrg]), V = he({
|
|
90
91
|
payableId: N,
|
|
91
92
|
amountDueMinorUnits: ie(D) ?? 0,
|
|
92
93
|
amountToPayMinorUnits: D?.amount_to_pay ?? void 0,
|
|
@@ -94,12 +95,12 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
|
|
|
94
95
|
dueDate: D?.due_date,
|
|
95
96
|
hasScheduledPayment: I.hasScheduledPayment,
|
|
96
97
|
labels: h.markAsPaid
|
|
97
|
-
}), H =
|
|
98
|
+
}), H = ye({
|
|
98
99
|
payableId: N,
|
|
99
100
|
approvalPolicyId: D?.approval_policy_id,
|
|
100
101
|
enabled: p,
|
|
101
102
|
copy: h.approvalPolicyCopy
|
|
102
|
-
}), { actions:
|
|
103
|
+
}), { actions: Be, decisionDialog: Ve } = xe({
|
|
103
104
|
payableId: N,
|
|
104
105
|
status: D?.status,
|
|
105
106
|
currentApprovalRequestId: P.id,
|
|
@@ -112,8 +113,8 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
|
|
|
112
113
|
labels: h.actions,
|
|
113
114
|
isMarkAsPaidPending: V.isPending,
|
|
114
115
|
onMarkAsPaidSelect: V.open,
|
|
115
|
-
onPayBillSelect: () =>
|
|
116
|
-
}), U =
|
|
116
|
+
onPayBillSelect: () => je(L) || !B ? F.current?.open() : R.open()
|
|
117
|
+
}), U = Ce({
|
|
117
118
|
payableId: C,
|
|
118
119
|
status: D?.status,
|
|
119
120
|
enabled: !p,
|
|
@@ -122,11 +123,11 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
|
|
|
122
123
|
}), W = a(() => (E.data?.data ?? []).map((e) => ({
|
|
123
124
|
value: e.id,
|
|
124
125
|
label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
|
|
125
|
-
})), [E.data]), G =
|
|
126
|
+
})), [E.data]), G = de(N), He = e(z?.scopes, [t.UserReadOrg]), K = te({ enabled: p && He }), q = a(() => Te(G.data?.data ?? [], K.data?.data ?? [], h.history), [
|
|
126
127
|
G.data,
|
|
127
128
|
K.data,
|
|
128
129
|
h.history
|
|
129
|
-
]),
|
|
130
|
+
]), Ue = a(() => p && D ? we({
|
|
130
131
|
payable: D,
|
|
131
132
|
lineItems: T.lineItems,
|
|
132
133
|
glCodeOptions: W,
|
|
@@ -143,35 +144,48 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
|
|
|
143
144
|
T.lineItems,
|
|
144
145
|
D,
|
|
145
146
|
p
|
|
146
|
-
]), J = D?.source_of_payable_data === "ocr", Y = L?.name,
|
|
147
|
+
]), J = D?.source_of_payable_data === "ocr", Y = L?.name, We = p ? Y ? h.viewTitle(Y) : h.readOnlyTitle : J && Y ? h.extractedTitle(Y) : h.newTitle, Ge = p && D?.created_at ? h.addedOn(ne(D.created_at.slice(0, 10))) : void 0, X = i(() => {
|
|
147
148
|
let e = O.isDirty || A.hasUnsavedVendorChanges || !!j.stagedFile || j.isFileDeletionPending;
|
|
148
|
-
!p && e
|
|
149
|
+
if (!p && e) {
|
|
150
|
+
x(!0);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
d(!1);
|
|
149
154
|
}, [
|
|
150
155
|
j.isFileDeletionPending,
|
|
151
156
|
j.stagedFile,
|
|
152
|
-
h.discardConfirm,
|
|
153
157
|
O.isDirty,
|
|
154
158
|
d,
|
|
155
159
|
p,
|
|
156
160
|
A.hasUnsavedVendorChanges
|
|
157
|
-
]),
|
|
158
|
-
|
|
161
|
+
]), Ke = i(() => {
|
|
162
|
+
x(!1), d(!1);
|
|
163
|
+
}, [d]), Z = T.isResolving || A.mode === "creating", qe = i(async () => {
|
|
164
|
+
if (Z) return;
|
|
165
|
+
let e = await j.saveDraft();
|
|
166
|
+
x(!1), e && d(!1);
|
|
159
167
|
}, [
|
|
168
|
+
j,
|
|
160
169
|
Z,
|
|
170
|
+
d
|
|
171
|
+
]), Je = i((e) => {
|
|
172
|
+
if (!M) return e ? d(!0) : X();
|
|
173
|
+
}, [
|
|
174
|
+
X,
|
|
161
175
|
M,
|
|
162
176
|
d
|
|
163
|
-
]), Q = !!
|
|
164
|
-
onNotADuplicate: p ? void 0 : () =>
|
|
165
|
-
onRemoveBill: p ? void 0 : () =>
|
|
177
|
+
]), Q = !!Ne && !Ie, $ = !p && J && !Pe, Ye = Q || $ ? /* @__PURE__ */ l(s, { children: [Q ? /* @__PURE__ */ c(se, {
|
|
178
|
+
onNotADuplicate: p ? void 0 : () => b(!0),
|
|
179
|
+
onRemoveBill: p ? void 0 : () => b(!0),
|
|
166
180
|
testId: r.duplicateNotice
|
|
167
|
-
}) : null, $ ? /* @__PURE__ */ c(ce, { onDismiss: () =>
|
|
181
|
+
}) : null, $ ? /* @__PURE__ */ c(ce, { onDismiss: () => Fe(!0) }) : null] }) : void 0;
|
|
168
182
|
return /* @__PURE__ */ l(s, { children: [
|
|
169
183
|
/* @__PURE__ */ c(oe, {
|
|
170
184
|
open: u,
|
|
171
|
-
onOpenChange:
|
|
172
|
-
title:
|
|
173
|
-
subtitle:
|
|
174
|
-
notice:
|
|
185
|
+
onOpenChange: Je,
|
|
186
|
+
title: We,
|
|
187
|
+
subtitle: Ge,
|
|
188
|
+
notice: Ye,
|
|
175
189
|
vendor: {
|
|
176
190
|
...A,
|
|
177
191
|
testId: r.vendorSection
|
|
@@ -192,7 +206,7 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
|
|
|
192
206
|
errors: O.lineItemErrors,
|
|
193
207
|
testId: r.lineItems
|
|
194
208
|
},
|
|
195
|
-
documentPanel: /* @__PURE__ */ c(
|
|
209
|
+
documentPanel: /* @__PURE__ */ c(Ee, {
|
|
196
210
|
payableId: C,
|
|
197
211
|
readOnly: p,
|
|
198
212
|
isDocumentPending: !!C && !D?.file && (w.isLoading || D?.ocr_status === "processing"),
|
|
@@ -219,8 +233,8 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
|
|
|
219
233
|
menuItems: U.menuItems,
|
|
220
234
|
readOnly: p,
|
|
221
235
|
detail: p ? {
|
|
222
|
-
view:
|
|
223
|
-
actions:
|
|
236
|
+
view: Ue,
|
|
237
|
+
actions: Be,
|
|
224
238
|
scheduledSummary: I.hasScheduledPayment && I.scheduledDateLabel ? h.scheduledSummary(I.scheduledDateLabel) : void 0,
|
|
225
239
|
paymentInstructionsForm: k && B ? {
|
|
226
240
|
isOpen: R.isOpen,
|
|
@@ -239,13 +253,25 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
|
|
|
239
253
|
isSaving: M,
|
|
240
254
|
isSavingDraft: j.isSavingDraft,
|
|
241
255
|
isFinalizing: j.isFinalizing,
|
|
242
|
-
onCancel:
|
|
256
|
+
onCancel: X,
|
|
243
257
|
onSaveDraft: j.saveDraft,
|
|
244
258
|
onFinalize: j.finalize,
|
|
245
259
|
testId: r.dialog
|
|
246
260
|
}),
|
|
261
|
+
/* @__PURE__ */ c(ue, {
|
|
262
|
+
open: Le,
|
|
263
|
+
onSaveDraft: qe,
|
|
264
|
+
onDiscard: Ke,
|
|
265
|
+
onCancel: () => x(!1),
|
|
266
|
+
isSaving: j.isSavingDraft,
|
|
267
|
+
isSaveDraftDisabled: Z,
|
|
268
|
+
labels: h.unsavedChanges,
|
|
269
|
+
testId: r.unsavedDialog,
|
|
270
|
+
saveDraftTestId: r.unsavedSaveDraft,
|
|
271
|
+
discardTestId: r.unsavedDiscard
|
|
272
|
+
}),
|
|
247
273
|
/* @__PURE__ */ c(n, {
|
|
248
|
-
...
|
|
274
|
+
...Ve,
|
|
249
275
|
labels: { cancelButton: h.actions.decisionDialog.cancelButton },
|
|
250
276
|
testId: r.decisionDialog,
|
|
251
277
|
confirmTestId: r.decisionConfirm,
|
|
@@ -258,10 +284,10 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
|
|
|
258
284
|
confirmTestId: r.deleteDraftConfirm
|
|
259
285
|
}),
|
|
260
286
|
/* @__PURE__ */ c(le, { ...V.dialogProps }),
|
|
261
|
-
p && D ? /* @__PURE__ */ c(
|
|
287
|
+
p && D ? /* @__PURE__ */ c(me, {
|
|
262
288
|
ref: F,
|
|
263
289
|
payable: D,
|
|
264
|
-
poweredByBankName:
|
|
290
|
+
poweredByBankName: Me,
|
|
265
291
|
labels: h.payBill
|
|
266
292
|
}) : null
|
|
267
293
|
] });
|
|
@@ -82,4 +82,7 @@ import "./index91.js";
|
|
|
82
82
|
import "./index92.js";
|
|
83
83
|
import { SourceDocumentPanel as b } from "./index93.js";
|
|
84
84
|
import "./index94.js";
|
|
85
|
-
|
|
85
|
+
import { UNSAVED_BILL_DIALOG_LABELS_EN as x } from "./index95.js";
|
|
86
|
+
import { UnsavedBillDialog as S } from "./index96.js";
|
|
87
|
+
import "./index97.js";
|
|
88
|
+
export { e as AddBillDialog, a as BILL_DETAILS_SHEET_LABELS_EN, t as BILL_STATUS_BADGE_LABELS_EN, l as BillColumn, n as BillCreateScreen, i as BillDecisionDialog, o as BillDetailsSheet, s as BillDuplicateNotice, r as BillPayWidgetUi, d as BillUploadStatusTray, c as BillsFilterField, u as BillsScreen, f as DuplicateBillsDialog, p as ExtractionNotice, g as MARK_AS_PAID_DIALOG_LABELS_EN, _ as MarkAsPaidDialog, m as REVIEW_TRANSACTION_DIALOG_LABELS_EN, h as ReviewTransactionDialog, v as SCHEDULE_PAYMENT_DIALOG_LABELS_EN, y as SchedulePaymentDialog, b as SourceDocumentPanel, x as UNSAVED_BILL_DIALOG_LABELS_EN, S as UnsavedBillDialog };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js
|
|
2
|
+
var e = {
|
|
3
|
+
title: "Save this bill as a draft?",
|
|
4
|
+
description: "This bill has changes that have not been saved. Save it as a draft to finish later, or discard the changes.",
|
|
5
|
+
saveDraftButton: "Save as draft",
|
|
6
|
+
discardButton: "Discard changes",
|
|
7
|
+
cancelButton: "Keep editing"
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { e as UNSAVED_BILL_DIALOG_LABELS_EN };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { UNSAVED_BILL_DIALOG_LABELS_EN as s } from "./index95.js";
|
|
3
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js
|
|
5
|
+
function u({ open: u, onSaveDraft: d, onDiscard: f, onCancel: p, isSaving: m, isSaveDraftDisabled: h, labels: g, testId: _, saveDraftTestId: v, discardTestId: y }) {
|
|
6
|
+
let b = {
|
|
7
|
+
...s,
|
|
8
|
+
...g
|
|
9
|
+
};
|
|
10
|
+
return /* @__PURE__ */ c(e, {
|
|
11
|
+
open: u,
|
|
12
|
+
onOpenChange: (e) => {
|
|
13
|
+
!e && !m && p();
|
|
14
|
+
},
|
|
15
|
+
children: /* @__PURE__ */ l(t, {
|
|
16
|
+
"data-testid": _,
|
|
17
|
+
children: [/* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: b.title }), /* @__PURE__ */ c(n, { children: b.description })] }), /* @__PURE__ */ l(r, { children: [
|
|
18
|
+
/* @__PURE__ */ c(o, {
|
|
19
|
+
type: "button",
|
|
20
|
+
variant: "outline",
|
|
21
|
+
onClick: p,
|
|
22
|
+
disabled: m,
|
|
23
|
+
children: b.cancelButton
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ c(o, {
|
|
26
|
+
type: "button",
|
|
27
|
+
variant: "outline",
|
|
28
|
+
onClick: f,
|
|
29
|
+
disabled: m,
|
|
30
|
+
"data-testid": y,
|
|
31
|
+
children: b.discardButton
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ c(o, {
|
|
34
|
+
type: "button",
|
|
35
|
+
variant: "default",
|
|
36
|
+
loading: m,
|
|
37
|
+
disabled: m || h,
|
|
38
|
+
onClick: d,
|
|
39
|
+
"data-testid": v,
|
|
40
|
+
children: b.saveDraftButton
|
|
41
|
+
})
|
|
42
|
+
] })]
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { u as UnsavedBillDialog, u as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.3.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.3.32", n = "6a92ea681ef941e7afc722fdb2a2c34c98f58900", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|