@tesouro/embedded-components-react 0.3.53 → 0.3.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -20
- package/dist/index.d.ts +2 -22
- package/dist/index.js +44 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +65 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +3 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +30 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +37 -158
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +165 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +48 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +1 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +47 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +4 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +13 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +7 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +54 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +24 -60
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +98 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +51 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +131 -140
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index98.js +47 -29
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +2 -3
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/lib/CreateCardWidget.d.ts +0 -823
- package/dist/lib/CreateCardWidget.js +0 -5
|
@@ -24,16 +24,16 @@ import { UnsavedBillDialog as fe } from "../../ui/dist/index97.js";
|
|
|
24
24
|
import "../../ui/dist/index.js";
|
|
25
25
|
import { usePayableDuplicateReview as pe } from "./index10.js";
|
|
26
26
|
import "./index11.js";
|
|
27
|
-
import { resolveAmountDueMinorUnits as me } from "./
|
|
28
|
-
import { PayBillFlow as he } from "./
|
|
29
|
-
import "./
|
|
27
|
+
import { resolveAmountDueMinorUnits as me } from "./index17.js";
|
|
28
|
+
import { PayBillFlow as he } from "./index23.js";
|
|
29
|
+
import "./index24.js";
|
|
30
30
|
import { useMarkAsPaidFlow as ge } from "./index14.js";
|
|
31
31
|
import "./index15.js";
|
|
32
32
|
import { BILL_CREATE_MESSAGE_LABELS_EN as _e, mergeBillCreateScreenCopy as ve } from "./index40.js";
|
|
33
33
|
import { useBillCreateController as ye } from "./index49.js";
|
|
34
34
|
import { useBillForm as be } from "./index51.js";
|
|
35
|
-
import { useApprovalPolicyCardView as xe } from "./
|
|
36
|
-
import { useCurrentApprovalRequestId as Se } from "./
|
|
35
|
+
import { useApprovalPolicyCardView as xe } from "./index29.js";
|
|
36
|
+
import { useCurrentApprovalRequestId as Se } from "./index30.js";
|
|
37
37
|
import { usePayableDetailActions as Ce } from "./index31.js";
|
|
38
38
|
import { useScheduledPayment as we } from "./index32.js";
|
|
39
39
|
import { isEditablePayableStatus as Te } from "./index33.js";
|
|
@@ -48,55 +48,52 @@ import { useCallback as i, useEffect as Me, useMemo as a, useRef as Ne, useState
|
|
|
48
48
|
import { Fragment as Pe, jsx as s, jsxs as Fe } from "react/jsx-runtime";
|
|
49
49
|
import { Trash2Icon as Ie } from "lucide-react";
|
|
50
50
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js
|
|
51
|
-
function Le
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f, onCollapse: Re, poweredByBankName: ze }) {
|
|
55
|
-
let p = a(() => ve(f), [f]), [m, h] = o(), [g, _] = o(!1), [Be, Ve] = o(!1), [He, v] = o(!1), [Ue, y] = o(), b = u ?? Ue, x = oe(b, { pollWhileOcrProcessing: !0 }), S = ae(b), { initResponse: C } = re(), w = !!C, T = e(C?.scopes, [t.AccountingConfigReadOrg]), E = ee({ enabled: T }), D = x.data, O = !b || !!D, k = !d && O && !!b && D?.status !== "draft", We = !d && !!D && !Te(D?.status), A = d || We, j = be({
|
|
51
|
+
function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f, onCollapse: Le, poweredByBankName: Re }) {
|
|
52
|
+
let p = a(() => ve(f), [f]), [m, h] = o(), [g, _] = o(!1), [ze, Be] = o(!1), [Ve, v] = o(!1), [He, y] = o(), b = u ?? He, x = oe(b, { pollWhileOcrProcessing: !0 }), S = ae(b), { initResponse: C } = re(), w = !!C, T = e(C?.scopes, [t.AccountingConfigReadOrg]), E = ee({ enabled: T }), D = x.data, O = !b || !!D, k = !d && O && !!b && D?.status !== "draft", Ue = !d && !!D && !Te(D?.status), A = d || Ue, j = be({
|
|
56
53
|
payable: D,
|
|
57
54
|
lineItems: S.lineItems
|
|
58
55
|
}), M = D?.counterpart_id;
|
|
59
56
|
Me(() => {
|
|
60
57
|
g || M && (h(M), _(!0));
|
|
61
58
|
}, [g, M]);
|
|
62
|
-
let
|
|
59
|
+
let We = i((e) => {
|
|
63
60
|
_(!0), h(e);
|
|
64
61
|
}, []), N = Ae({
|
|
65
62
|
payableId: d ? void 0 : b,
|
|
66
63
|
counterpartId: d ? void 0 : m,
|
|
67
64
|
payableCounterpartId: M,
|
|
68
|
-
onCounterpartChange:
|
|
65
|
+
onCounterpartChange: We,
|
|
69
66
|
requiredError: j.errors?.vendor,
|
|
70
67
|
payableCounterpartBankAccountId: D?.counterpart_bank_account_id ?? void 0,
|
|
71
68
|
extractedVendor: D?.counterpart_raw_data ?? void 0
|
|
72
|
-
}),
|
|
69
|
+
}), Ge = !!(b && g) && !m, Ke = a(() => k ? { saveDraftButton: p.submittedSaveButton } : void 0, [p.submittedSaveButton, k]), qe = a(() => k ? { draftSaved: _e.submittedSaved } : void 0, [k]), P = x.refetch, Je = i(async () => {
|
|
73
70
|
let { data: e } = await P();
|
|
74
71
|
return e?.status ?? void 0;
|
|
75
72
|
}, [P]), F = ye({
|
|
76
73
|
payableId: u,
|
|
77
74
|
form: j,
|
|
78
|
-
labels:
|
|
75
|
+
labels: qe,
|
|
79
76
|
counterpartId: m,
|
|
80
|
-
clearCounterpart:
|
|
77
|
+
clearCounterpart: Ge,
|
|
81
78
|
prepareVendorForSave: N.savePaymentInstructions,
|
|
82
79
|
onPayableCreated: y,
|
|
83
80
|
onSaved: y,
|
|
84
81
|
onDraftSaved: () => l(!1),
|
|
85
82
|
onFinalized: () => l(!1),
|
|
86
|
-
readSavedStatus: k ?
|
|
83
|
+
readSavedStatus: k ? Je : void 0
|
|
87
84
|
}), I = !!(F.isSavingDraft || F.isFinalizing), L = d ? b : void 0, R = Se({
|
|
88
85
|
payableId: L,
|
|
89
86
|
status: D?.status
|
|
90
|
-
}),
|
|
87
|
+
}), Ye = Ne(null), z = we({
|
|
91
88
|
payableId: b,
|
|
92
89
|
scheduledPaymentDate: D?.scheduled_payment_date,
|
|
93
90
|
enabled: d || k
|
|
94
|
-
}),
|
|
91
|
+
}), Xe = se(D), B = je({
|
|
95
92
|
payableId: L,
|
|
96
93
|
counterpartId: d ? M : void 0,
|
|
97
94
|
saveErrorMessage: p.detail.paymentInstructionsSaveError,
|
|
98
95
|
linkErrorMessage: p.detail.paymentInstructionsLinkError
|
|
99
|
-
}),
|
|
96
|
+
}), Ze = e(C?.scopes, [t.PayableWriteOrg]), Qe = e(C?.scopes, [t.CounterpartWriteOrg]) && Ze, V = ge({
|
|
100
97
|
payableId: L,
|
|
101
98
|
amountDueMinorUnits: me(D) ?? 0,
|
|
102
99
|
amountToPayMinorUnits: D?.amount_to_pay ?? void 0,
|
|
@@ -109,7 +106,7 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
109
106
|
approvalPolicyId: D?.approval_policy_id,
|
|
110
107
|
enabled: d,
|
|
111
108
|
copy: p.approvalPolicyCopy
|
|
112
|
-
}), { actions: U, decisionDialog:
|
|
109
|
+
}), { actions: U, decisionDialog: $e, isActionPending: et } = Ce({
|
|
113
110
|
payableId: d || k ? b : void 0,
|
|
114
111
|
status: D?.status,
|
|
115
112
|
currentApprovalRequestId: R.id,
|
|
@@ -123,7 +120,7 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
123
120
|
labels: p.actions,
|
|
124
121
|
isMarkAsPaidPending: V.isPending,
|
|
125
122
|
onMarkAsPaidSelect: V.open,
|
|
126
|
-
onPayBillSelect: () =>
|
|
123
|
+
onPayBillSelect: () => Ye.current?.open(),
|
|
127
124
|
onActionSucceeded: k ? () => l(!1) : void 0
|
|
128
125
|
}), W = Ee({
|
|
129
126
|
payableId: b,
|
|
@@ -131,7 +128,7 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
131
128
|
enabled: !d,
|
|
132
129
|
labels: p.deleteDraft,
|
|
133
130
|
onDeleted: () => l(!1)
|
|
134
|
-
}), G = I ||
|
|
131
|
+
}), G = I || et, tt = a(() => [...W.menuItems, ...k ? U.menu.map((e) => ({
|
|
135
132
|
id: e.id,
|
|
136
133
|
label: e.label,
|
|
137
134
|
onSelect: e.onSelect,
|
|
@@ -145,16 +142,16 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
145
142
|
label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
|
|
146
143
|
})), [E.data]), q;
|
|
147
144
|
w && (T ? E.isError ? q = p.lineItemsGlCodeUnavailable.loadError : !E.isResolving && K.length === 0 && (q = p.lineItemsGlCodeUnavailable.empty) : q = p.lineItemsGlCodeUnavailable.noAccess);
|
|
148
|
-
let
|
|
149
|
-
|
|
150
|
-
|
|
145
|
+
let nt = !w || !!q || E.isResolving, rt = T && !E.isResolving && !E.isError, it = ie(L), at = e(C?.scopes, [t.UserReadOrg]), ot = te({ enabled: d && at }), J = a(() => Oe(it.data?.data ?? [], ot.data?.data ?? [], p.history), [
|
|
146
|
+
it.data,
|
|
147
|
+
ot.data,
|
|
151
148
|
p.history
|
|
152
|
-
]),
|
|
149
|
+
]), st = a(() => d && D ? De({
|
|
153
150
|
payable: D,
|
|
154
151
|
lineItems: S.lineItems,
|
|
155
152
|
glCodeOptions: K,
|
|
156
|
-
glCodeRosterAvailable:
|
|
157
|
-
history:
|
|
153
|
+
glCodeRosterAvailable: rt,
|
|
154
|
+
history: J,
|
|
158
155
|
approvalPolicy: H.view,
|
|
159
156
|
labels: p.detail,
|
|
160
157
|
hasScheduledPayment: z.hasScheduledPayment
|
|
@@ -163,12 +160,12 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
163
160
|
H.view,
|
|
164
161
|
p.detail,
|
|
165
162
|
K,
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
rt,
|
|
164
|
+
J,
|
|
168
165
|
S.lineItems,
|
|
169
166
|
D,
|
|
170
167
|
d
|
|
171
|
-
]),
|
|
168
|
+
]), ct = D?.source_of_payable_data === "ocr", Y = Xe?.name, lt = d ? Y ? p.viewTitle(Y) : p.readOnlyTitle : Y && (ct || k) ? p.extractedTitle(Y) : p.newTitle, ut = d && D?.created_at ? p.addedOn(ne(D.created_at.slice(0, 10))) : void 0, X = i(() => {
|
|
172
169
|
let e = j.isDirty || N.hasUnsavedVendorChanges || !!F.stagedFile || F.isFileDeletionPending;
|
|
173
170
|
if (!A && e) {
|
|
174
171
|
v(!0);
|
|
@@ -182,9 +179,9 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
182
179
|
A,
|
|
183
180
|
l,
|
|
184
181
|
N.hasUnsavedVendorChanges
|
|
185
|
-
]),
|
|
182
|
+
]), dt = i(() => {
|
|
186
183
|
v(!1), l(!1);
|
|
187
|
-
}, [l]), Z = S.isResolving || N.mode === "creating",
|
|
184
|
+
}, [l]), Z = S.isResolving || N.mode === "creating", ft = i(async () => {
|
|
188
185
|
if (Z) return;
|
|
189
186
|
let e = await F.saveDraft();
|
|
190
187
|
v(!1), e && l(!1);
|
|
@@ -195,28 +192,28 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
195
192
|
]), Q = pe({
|
|
196
193
|
payable: D,
|
|
197
194
|
onRemoved: () => l(!1),
|
|
198
|
-
canManage:
|
|
199
|
-
}),
|
|
195
|
+
canManage: Ze
|
|
196
|
+
}), pt = i((e) => {
|
|
200
197
|
if (!(G || Q.isBusy)) return e ? l(!0) : X();
|
|
201
198
|
}, [
|
|
202
199
|
Q.isBusy,
|
|
203
200
|
G,
|
|
204
201
|
X,
|
|
205
202
|
l
|
|
206
|
-
]),
|
|
203
|
+
]), mt = Q.isPossibleDuplicate, $ = !d && ct && !ze, ht = mt || $ ? /* @__PURE__ */ Fe(Pe, { children: [mt ? /* @__PURE__ */ s(le, {
|
|
207
204
|
onNotADuplicate: Q.onNotADuplicate,
|
|
208
205
|
onRemoveBill: Q.onRemoveBill,
|
|
209
206
|
isActionDisabled: Q.isBusy,
|
|
210
207
|
labels: Q.removeBillLabel ? { removeBillButton: Q.removeBillLabel } : void 0,
|
|
211
208
|
testId: r.duplicateNotice
|
|
212
|
-
}) : null, $ ? /* @__PURE__ */ s(ue, { onDismiss: () =>
|
|
209
|
+
}) : null, $ ? /* @__PURE__ */ s(ue, { onDismiss: () => Be(!0) }) : null] }) : void 0;
|
|
213
210
|
return /* @__PURE__ */ Fe(Pe, { children: [
|
|
214
211
|
/* @__PURE__ */ s(ce, {
|
|
215
212
|
open: c,
|
|
216
|
-
onOpenChange:
|
|
217
|
-
title:
|
|
218
|
-
subtitle:
|
|
219
|
-
notice:
|
|
213
|
+
onOpenChange: pt,
|
|
214
|
+
title: lt,
|
|
215
|
+
subtitle: ut,
|
|
216
|
+
notice: ht,
|
|
220
217
|
vendor: {
|
|
221
218
|
...N,
|
|
222
219
|
testId: r.vendorSection
|
|
@@ -227,7 +224,7 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
227
224
|
lineItems: {
|
|
228
225
|
items: j.lineItemRows,
|
|
229
226
|
glCodeOptions: K,
|
|
230
|
-
glCodeDisabled:
|
|
227
|
+
glCodeDisabled: nt,
|
|
231
228
|
glCodeUnavailableMessage: q,
|
|
232
229
|
discount: j.discount,
|
|
233
230
|
onDiscountChange: j.onDiscountChange,
|
|
@@ -263,13 +260,13 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
263
260
|
hasFailed: F.hasFileDeletionFailed
|
|
264
261
|
}
|
|
265
262
|
}),
|
|
266
|
-
menuItems:
|
|
263
|
+
menuItems: tt,
|
|
267
264
|
readOnly: A,
|
|
268
265
|
detail: d ? {
|
|
269
|
-
view:
|
|
266
|
+
view: st,
|
|
270
267
|
actions: U,
|
|
271
268
|
scheduledSummary: z.hasScheduledPayment && z.scheduledDateLabel ? p.scheduledSummary(z.scheduledDateLabel) : void 0,
|
|
272
|
-
paymentInstructionsForm: M &&
|
|
269
|
+
paymentInstructionsForm: M && Qe ? {
|
|
273
270
|
isOpen: B.isOpen,
|
|
274
271
|
values: B.values,
|
|
275
272
|
errors: B.errors,
|
|
@@ -287,17 +284,17 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
287
284
|
isSavingDraft: F.isSavingDraft,
|
|
288
285
|
isFinalizing: F.isFinalizing,
|
|
289
286
|
onCancel: X,
|
|
290
|
-
onCollapse: d ?
|
|
287
|
+
onCollapse: d ? Le : void 0,
|
|
291
288
|
onSaveDraft: F.saveDraft,
|
|
292
289
|
onFinalize: F.finalize,
|
|
293
290
|
showFinalize: !k && O,
|
|
294
|
-
labels:
|
|
291
|
+
labels: Ke,
|
|
295
292
|
testId: r.dialog
|
|
296
293
|
}),
|
|
297
294
|
/* @__PURE__ */ s(fe, {
|
|
298
|
-
open:
|
|
299
|
-
onSaveDraft:
|
|
300
|
-
onDiscard:
|
|
295
|
+
open: Ve,
|
|
296
|
+
onSaveDraft: ft,
|
|
297
|
+
onDiscard: dt,
|
|
301
298
|
onCancel: () => v(!1),
|
|
302
299
|
isSaving: F.isSavingDraft,
|
|
303
300
|
isSaveDraftDisabled: Z,
|
|
@@ -307,7 +304,7 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
307
304
|
discardTestId: r.unsavedDiscard
|
|
308
305
|
}),
|
|
309
306
|
/* @__PURE__ */ s(n, {
|
|
310
|
-
|
|
307
|
+
...$e,
|
|
311
308
|
labels: { cancelButton: p.actions.decisionDialog.cancelButton },
|
|
312
309
|
testId: r.decisionDialog,
|
|
313
310
|
confirmTestId: r.decisionConfirm,
|
|
@@ -332,9 +329,10 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
332
329
|
}),
|
|
333
330
|
/* @__PURE__ */ s(de, { ...V.dialogProps }),
|
|
334
331
|
d && D ? /* @__PURE__ */ s(he, {
|
|
335
|
-
ref:
|
|
332
|
+
ref: Ye,
|
|
336
333
|
payable: D,
|
|
337
|
-
|
|
334
|
+
onMissingAchInstructions: Qe ? B.open : void 0,
|
|
335
|
+
poweredByBankName: Re,
|
|
338
336
|
labels: p.payBill
|
|
339
337
|
}) : null
|
|
340
338
|
] });
|
|
@@ -2,7 +2,7 @@ import { BILL_DETAILS_SHEET_LABELS_EN as e } from "../../ui/dist/index55.js";
|
|
|
2
2
|
import "../../ui/dist/index.js";
|
|
3
3
|
import { MARK_AS_PAID_FLOW_LABELS_EN as t } from "./index12.js";
|
|
4
4
|
import "./index15.js";
|
|
5
|
-
import { APPROVAL_POLICY_RULE_COPY_EN as n } from "./
|
|
5
|
+
import { APPROVAL_POLICY_RULE_COPY_EN as n } from "./index25.js";
|
|
6
6
|
import { BILL_DETAIL_ACTIONS_LABELS_EN as r, SCHEDULED_SUMMARY_LABEL_EN as i } from "./index38.js";
|
|
7
7
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js
|
|
8
8
|
var a = {
|
|
@@ -11,169 +11,160 @@ import "../../../shared/feature/dist/index.js";
|
|
|
11
11
|
import { useAllPayableLineItemsQuery as i } from "../../data-access/dist/index9.js";
|
|
12
12
|
import { usePayableQuery as a } from "../../data-access/dist/index15.js";
|
|
13
13
|
import "../../data-access/dist/index.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { MarkAsPaidDialog as u } from "../../ui/dist/index87.js";
|
|
14
|
+
import { BillDecisionDialog as o } from "../../ui/dist/index50.js";
|
|
15
|
+
import { BillDetailsSheet as s } from "../../ui/dist/index56.js";
|
|
16
|
+
import { BillDuplicateNotice as c } from "../../ui/dist/index60.js";
|
|
17
|
+
import { MarkAsPaidDialog as l } from "../../ui/dist/index87.js";
|
|
19
18
|
import "../../ui/dist/index.js";
|
|
20
|
-
import { usePayableDuplicateReview as
|
|
19
|
+
import { usePayableDuplicateReview as u } from "./index10.js";
|
|
21
20
|
import "./index11.js";
|
|
22
|
-
import { resolveAmountDueMinorUnits as
|
|
23
|
-
import { PayBillFlow as
|
|
24
|
-
import "./
|
|
25
|
-
import { mergeMarkAsPaidFlowLabels as
|
|
26
|
-
import { useMarkAsPaidFlow as
|
|
21
|
+
import { resolveAmountDueMinorUnits as d } from "./index17.js";
|
|
22
|
+
import { PayBillFlow as f } from "./index23.js";
|
|
23
|
+
import "./index24.js";
|
|
24
|
+
import { mergeMarkAsPaidFlowLabels as p } from "./index12.js";
|
|
25
|
+
import { useMarkAsPaidFlow as m } from "./index14.js";
|
|
27
26
|
import "./index15.js";
|
|
28
|
-
import { mergeDecisionDialogCopy as
|
|
29
|
-
import { useApprovalPolicyCardView as
|
|
30
|
-
import { useCurrentApprovalRequestId as
|
|
31
|
-
import { usePayableDetailActions as
|
|
32
|
-
import { useScheduledPayment as
|
|
33
|
-
import { BILL_DETAILS_LABELS_EN as
|
|
34
|
-
import { mapPayableToBillDetails as
|
|
35
|
-
import { useMemo as
|
|
36
|
-
import { Fragment as
|
|
27
|
+
import { mergeDecisionDialogCopy as h } from "./index38.js";
|
|
28
|
+
import { useApprovalPolicyCardView as g } from "./index29.js";
|
|
29
|
+
import { useCurrentApprovalRequestId as _ } from "./index30.js";
|
|
30
|
+
import { usePayableDetailActions as v } from "./index31.js";
|
|
31
|
+
import { useScheduledPayment as y } from "./index32.js";
|
|
32
|
+
import { BILL_DETAILS_LABELS_EN as b } from "./index55.js";
|
|
33
|
+
import { mapPayableToBillDetails as x } from "./index56.js";
|
|
34
|
+
import { useMemo as S, useRef as C } from "react";
|
|
35
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
37
36
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js
|
|
38
|
-
function O
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
let L = C(() => ({
|
|
43
|
-
...x,
|
|
44
|
-
...F,
|
|
37
|
+
function D({ open: D, onOpenChange: O, payableId: k, onClose: A, onExpand: j, testId: M, labels: N, poweredByBankName: P }) {
|
|
38
|
+
let F = S(() => ({
|
|
39
|
+
...b,
|
|
40
|
+
...N,
|
|
45
41
|
sheet: {
|
|
46
|
-
...
|
|
47
|
-
...
|
|
42
|
+
...b.sheet,
|
|
43
|
+
...N?.sheet,
|
|
48
44
|
statusBadge: {
|
|
49
|
-
...
|
|
50
|
-
...
|
|
45
|
+
...b.sheet.statusBadge,
|
|
46
|
+
...N?.sheet?.statusBadge
|
|
51
47
|
},
|
|
52
48
|
approvalPolicy: {
|
|
53
|
-
...
|
|
54
|
-
...
|
|
49
|
+
...b.sheet.approvalPolicy,
|
|
50
|
+
...N?.sheet?.approvalPolicy
|
|
55
51
|
},
|
|
56
52
|
dueDate: {
|
|
57
|
-
...
|
|
58
|
-
...
|
|
53
|
+
...b.sheet.dueDate,
|
|
54
|
+
...N?.sheet?.dueDate
|
|
59
55
|
}
|
|
60
56
|
},
|
|
61
|
-
decisionDialog:
|
|
57
|
+
decisionDialog: h(b.decisionDialog, N?.decisionDialog),
|
|
62
58
|
approvalPolicyCopy: {
|
|
63
|
-
...
|
|
64
|
-
...
|
|
59
|
+
...b.approvalPolicyCopy,
|
|
60
|
+
...N?.approvalPolicyCopy
|
|
65
61
|
},
|
|
66
|
-
markAsPaid:
|
|
62
|
+
markAsPaid: p(N?.markAsPaid),
|
|
67
63
|
actionSuccess: {
|
|
68
|
-
...
|
|
69
|
-
...
|
|
64
|
+
...b.actionSuccess,
|
|
65
|
+
...N?.actionSuccess
|
|
70
66
|
}
|
|
71
|
-
}), [
|
|
72
|
-
payableId:
|
|
73
|
-
status:
|
|
74
|
-
}),
|
|
75
|
-
payableId:
|
|
76
|
-
approvalPolicyId:
|
|
77
|
-
copy:
|
|
78
|
-
}),
|
|
79
|
-
payableId:
|
|
80
|
-
scheduledPaymentDate:
|
|
81
|
-
}),
|
|
82
|
-
payableId:
|
|
83
|
-
amountDueMinorUnits:
|
|
84
|
-
amountToPayMinorUnits:
|
|
85
|
-
currencyCode:
|
|
86
|
-
dueDate:
|
|
87
|
-
hasScheduledPayment:
|
|
88
|
-
testId:
|
|
89
|
-
labels:
|
|
90
|
-
}), { actions:
|
|
91
|
-
payableId:
|
|
92
|
-
status:
|
|
93
|
-
currentApprovalRequestId:
|
|
94
|
-
isPolicyApprover:
|
|
95
|
-
hasWaitingRequest:
|
|
96
|
-
hasScheduledPayment:
|
|
97
|
-
scheduledPaymentIntentId:
|
|
98
|
-
isScheduledPaymentUnknown:
|
|
99
|
-
pendingApprovers:
|
|
100
|
-
arePendingApproversUnknown:
|
|
67
|
+
}), [N]), I = a(k), L = i(k), R = n(), z = I.data, B = C(null), V = _({
|
|
68
|
+
payableId: k,
|
|
69
|
+
status: z?.status
|
|
70
|
+
}), H = g({
|
|
71
|
+
payableId: k,
|
|
72
|
+
approvalPolicyId: z?.approval_policy_id,
|
|
73
|
+
copy: F.approvalPolicyCopy
|
|
74
|
+
}), U = y({
|
|
75
|
+
payableId: k,
|
|
76
|
+
scheduledPaymentDate: z?.scheduled_payment_date
|
|
77
|
+
}), W = m({
|
|
78
|
+
payableId: k,
|
|
79
|
+
amountDueMinorUnits: d(z) ?? 0,
|
|
80
|
+
amountToPayMinorUnits: z?.amount_to_pay ?? void 0,
|
|
81
|
+
currencyCode: z?.currency ?? void 0,
|
|
82
|
+
dueDate: z?.due_date,
|
|
83
|
+
hasScheduledPayment: U.hasScheduledPayment,
|
|
84
|
+
testId: M,
|
|
85
|
+
labels: F.markAsPaid
|
|
86
|
+
}), { actions: G, decisionDialog: K } = v({
|
|
87
|
+
payableId: z ? k : void 0,
|
|
88
|
+
status: z?.status,
|
|
89
|
+
currentApprovalRequestId: V.id,
|
|
90
|
+
isPolicyApprover: V.isPolicyApprover,
|
|
91
|
+
hasWaitingRequest: V.hasWaitingRequest,
|
|
92
|
+
hasScheduledPayment: U.hasScheduledPayment,
|
|
93
|
+
scheduledPaymentIntentId: U.scheduledPaymentIntentId,
|
|
94
|
+
isScheduledPaymentUnknown: U.isResolving,
|
|
95
|
+
pendingApprovers: H.pendingApprovers,
|
|
96
|
+
arePendingApproversUnknown: H.isLoading,
|
|
101
97
|
labels: {
|
|
102
|
-
payBill:
|
|
103
|
-
markAsPaid:
|
|
104
|
-
reject:
|
|
105
|
-
approve:
|
|
106
|
-
cancel:
|
|
107
|
-
cancelScheduledPayment:
|
|
108
|
-
reopen:
|
|
109
|
-
forceApprove:
|
|
110
|
-
forceReject:
|
|
111
|
-
policyOverridesHeading:
|
|
112
|
-
decisionDialog:
|
|
113
|
-
actionError:
|
|
114
|
-
actionSuccess:
|
|
98
|
+
payBill: F.sheet.payButton,
|
|
99
|
+
markAsPaid: F.sheet.markAsPaidButton,
|
|
100
|
+
reject: F.sheet.rejectButton,
|
|
101
|
+
approve: F.sheet.approveButton,
|
|
102
|
+
cancel: F.sheet.cancelButton,
|
|
103
|
+
cancelScheduledPayment: F.sheet.cancelScheduledPaymentButton,
|
|
104
|
+
reopen: F.sheet.reopenButton,
|
|
105
|
+
forceApprove: F.sheet.forceApproveButton,
|
|
106
|
+
forceReject: F.sheet.forceRejectButton,
|
|
107
|
+
policyOverridesHeading: F.sheet.policyOverridesGroup,
|
|
108
|
+
decisionDialog: F.decisionDialog,
|
|
109
|
+
actionError: F.actionError,
|
|
110
|
+
actionSuccess: F.actionSuccess
|
|
115
111
|
},
|
|
116
|
-
isMarkAsPaidPending:
|
|
117
|
-
onMarkAsPaidSelect:
|
|
118
|
-
onPayBillSelect: () =>
|
|
119
|
-
|
|
120
|
-
N();
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
H.current?.open();
|
|
124
|
-
}
|
|
125
|
-
}), Y = G.hasScheduledPayment && G.scheduledDateLabel ? /* @__PURE__ */ E("p", {
|
|
112
|
+
isMarkAsPaidPending: W.isPending,
|
|
113
|
+
onMarkAsPaidSelect: W.open,
|
|
114
|
+
onPayBillSelect: () => B.current?.open()
|
|
115
|
+
}), q = U.hasScheduledPayment && U.scheduledDateLabel ? /* @__PURE__ */ T("p", {
|
|
126
116
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
127
|
-
children:
|
|
128
|
-
}) : void 0, { initResponse:
|
|
129
|
-
payable:
|
|
130
|
-
canManage: e(
|
|
131
|
-
}),
|
|
132
|
-
onNotADuplicate:
|
|
133
|
-
isActionDisabled:
|
|
134
|
-
}) : void 0,
|
|
135
|
-
payable:
|
|
136
|
-
lineItems:
|
|
137
|
-
ledgerAccounts:
|
|
138
|
-
labels:
|
|
139
|
-
hasScheduledPayment:
|
|
117
|
+
children: F.scheduledSummary(U.scheduledDateLabel)
|
|
118
|
+
}) : void 0, { initResponse: J } = r(), Y = u({
|
|
119
|
+
payable: z,
|
|
120
|
+
canManage: e(J?.scopes, [t.PayableWriteOrg])
|
|
121
|
+
}), X = Y.isPossibleDuplicate ? /* @__PURE__ */ T(c, {
|
|
122
|
+
onNotADuplicate: Y.onNotADuplicate,
|
|
123
|
+
isActionDisabled: Y.isBusy
|
|
124
|
+
}) : void 0, Z = X || q ? /* @__PURE__ */ E(w, { children: [X, q] }) : void 0, Q = S(() => z ? x({
|
|
125
|
+
payable: z,
|
|
126
|
+
lineItems: L.lineItems,
|
|
127
|
+
ledgerAccounts: R.data?.data ?? [],
|
|
128
|
+
labels: F,
|
|
129
|
+
hasScheduledPayment: U.hasScheduledPayment
|
|
140
130
|
}) : void 0, [
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
]),
|
|
147
|
-
return /* @__PURE__ */
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
open:
|
|
150
|
-
onOpenChange:
|
|
151
|
-
details:
|
|
152
|
-
actions:
|
|
153
|
-
approvalPolicy:
|
|
154
|
-
isLoading:
|
|
155
|
-
isError:
|
|
156
|
-
notice:
|
|
157
|
-
onClose:
|
|
158
|
-
onExpand:
|
|
159
|
-
testId:
|
|
160
|
-
labels:
|
|
131
|
+
z,
|
|
132
|
+
L.lineItems,
|
|
133
|
+
R.data,
|
|
134
|
+
F,
|
|
135
|
+
U.hasScheduledPayment
|
|
136
|
+
]), $ = I.isLoading || L.isResolving || R.isResolving, ee = I.isError || L.isError || R.isError;
|
|
137
|
+
return /* @__PURE__ */ E(w, { children: [
|
|
138
|
+
/* @__PURE__ */ T(s, {
|
|
139
|
+
open: D,
|
|
140
|
+
onOpenChange: O,
|
|
141
|
+
details: Q,
|
|
142
|
+
actions: G,
|
|
143
|
+
approvalPolicy: H.view,
|
|
144
|
+
isLoading: $,
|
|
145
|
+
isError: ee,
|
|
146
|
+
notice: Z,
|
|
147
|
+
onClose: A,
|
|
148
|
+
onExpand: j,
|
|
149
|
+
testId: M,
|
|
150
|
+
labels: F.sheet
|
|
161
151
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
...
|
|
164
|
-
labels: { cancelButton:
|
|
165
|
-
testId:
|
|
166
|
-
confirmTestId:
|
|
167
|
-
reasonTestId:
|
|
168
|
-
reasonFieldId:
|
|
152
|
+
/* @__PURE__ */ T(o, {
|
|
153
|
+
...K,
|
|
154
|
+
labels: { cancelButton: F.decisionDialog.cancelButton },
|
|
155
|
+
testId: M ? `${M}-decision-dialog` : void 0,
|
|
156
|
+
confirmTestId: M ? `${M}-decision-confirm` : void 0,
|
|
157
|
+
reasonTestId: M ? `${M}-decision-reason` : void 0,
|
|
158
|
+
reasonFieldId: M ? `${M}-decision-reason-field` : void 0
|
|
169
159
|
}),
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
|
|
172
|
-
ref:
|
|
173
|
-
payable:
|
|
174
|
-
|
|
160
|
+
/* @__PURE__ */ T(l, { ...W.dialogProps }),
|
|
161
|
+
z ? /* @__PURE__ */ T(f, {
|
|
162
|
+
ref: B,
|
|
163
|
+
payable: z,
|
|
164
|
+
onMissingAchInstructions: j,
|
|
165
|
+
poweredByBankName: P
|
|
175
166
|
}) : null
|
|
176
167
|
] });
|
|
177
168
|
}
|
|
178
169
|
//#endregion
|
|
179
|
-
export {
|
|
170
|
+
export { D as BillDetailsContainer, D as default };
|
package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { CreateCardWidget as
|
|
4
|
-
export {
|
|
1
|
+
import "./index3.js";
|
|
2
|
+
import "./index5.js";
|
|
3
|
+
import { CreateCardWidget as e } from "./index8.js";
|
|
4
|
+
export { e as CreateCardWidget };
|