@tesouro/embedded-components-react 0.5.251 → 0.5.254
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.d.ts +95 -79
- package/dist/lib/ReceivablesWidget.d.ts +25 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +214 -209
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +162 -145
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +32 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/BillPayWidgetNative.js +48 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/BillsTab.js +32 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/labels.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +19 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index10.js +38 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +12 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +11 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +9 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +78 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +2 -78
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +26 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +5 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index6.js +16 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +54 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index8.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index9.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +16 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +15 -11
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +89 -88
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +55 -74
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentRecord.js +71 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +123 -164
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +40 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +91 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +83 -78
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +7 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/receivables.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +15 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +206 -89
- 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 +38 -38
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +8 -7
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +0 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +0 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +0 -2
|
@@ -62,49 +62,54 @@ function qe(e) {
|
|
|
62
62
|
let t = [...new Set(e)];
|
|
63
63
|
return t.length > 0 ? t : void 0;
|
|
64
64
|
}
|
|
65
|
-
function Je({ open: Je, onOpenChange: f, payableId:
|
|
66
|
-
let g = l(() => he(
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
function Je({ open: Je, onOpenChange: f, payableId: Ye, initialCounterpartId: Xe, readOnly: p = !1, copy: m, onCollapse: Ze, onEdit: Qe, onOpenBill: h, renderPaymentFlows: $e }) {
|
|
66
|
+
let g = l(() => he(m), [m]), _ = m?.messages, et = l(() => ({
|
|
67
|
+
...me,
|
|
68
|
+
..._
|
|
69
|
+
}), [_]), tt = Ye ? void 0 : Xe, [nt, rt] = u(tt), [it, at] = u(!!tt), [ot, st] = u(!1), [ct, v] = u(!1), [lt, ut] = u(), y = c((e) => {
|
|
70
|
+
ut(() => e);
|
|
71
|
+
}, []), [dt, ft] = u(), b = Ye ?? dt, x = be(b, { pollWhileOcrProcessing: !0 }), S = ve(b), { initResponse: C } = te(), pt = !!C, mt = i(C?.scopes, [a.AccountingConfigReadOrg]), w = ee({ enabled: mt }), T = x.data, E = !b || !!T, D = !p && E && !!b && T?.status !== "draft", ht = !p && !!T && !oe(T?.status), O = p || ht, k = Se({
|
|
69
72
|
payable: T,
|
|
70
|
-
lineItems: S.lineItems
|
|
73
|
+
lineItems: S.lineItems,
|
|
74
|
+
labels: et
|
|
71
75
|
}), A = T?.counterpart_id ?? void 0;
|
|
72
76
|
He(() => {
|
|
73
|
-
|
|
74
|
-
}, [
|
|
75
|
-
let
|
|
76
|
-
|
|
77
|
+
it || A && (rt(A), at(!0));
|
|
78
|
+
}, [it, A]);
|
|
79
|
+
let gt = c((e) => {
|
|
80
|
+
at(!0), rt(e);
|
|
77
81
|
}, []), j = Ne({
|
|
78
82
|
payableId: b,
|
|
79
83
|
scheduledPaymentDate: T?.scheduled_payment_date,
|
|
80
|
-
enabled:
|
|
81
|
-
}),
|
|
84
|
+
enabled: p || D
|
|
85
|
+
}), _t = re(), M = l(() => j.hasScheduledPayment && j.scheduledDate ? ae(j.scheduledDate, g.scheduledRelativeDay, _t) : void 0, [
|
|
82
86
|
j.hasScheduledPayment,
|
|
83
87
|
j.scheduledDate,
|
|
84
88
|
g.scheduledRelativeDay,
|
|
85
|
-
|
|
86
|
-
]), N = De(C?.scopes),
|
|
89
|
+
_t
|
|
90
|
+
]), N = De(C?.scopes), vt = i(C?.scopes, [a.PayableWriteOrg]), yt = i(C?.scopes, [a.CounterpartWriteOrg]) && vt, P = yt && ie(T?.status) && !j.hasScheduledPayment && !j.isResolving, bt = P && N, xt = P || yt && T?.status === "rejected", St = !p && E && (!b || T?.status === "draft") && !j.hasScheduledPayment && !j.isResolving, F = ze({
|
|
87
91
|
payableId: b,
|
|
88
|
-
counterpartId:
|
|
92
|
+
counterpartId: p ? A : nt,
|
|
89
93
|
payableCounterpartId: A,
|
|
90
|
-
isVendorKnown:
|
|
91
|
-
onCounterpartChange:
|
|
94
|
+
isVendorKnown: p ? !!T : E,
|
|
95
|
+
onCounterpartChange: gt,
|
|
92
96
|
requiredError: k.errors?.vendor,
|
|
93
97
|
payableCounterpartBankAccountId: T?.counterpart_bank_account_id ?? void 0,
|
|
94
98
|
extractedVendor: T?.counterpart_raw_data ?? void 0,
|
|
95
|
-
readOnly:
|
|
96
|
-
canEditVendor: !
|
|
97
|
-
canEditPaymentInstructions: !
|
|
98
|
-
canAddPaymentInstructions: !
|
|
99
|
-
confirmDiscard: y
|
|
100
|
-
|
|
99
|
+
readOnly: p,
|
|
100
|
+
canEditVendor: !p || bt,
|
|
101
|
+
canEditPaymentInstructions: !p || P,
|
|
102
|
+
canAddPaymentInstructions: !p || xt,
|
|
103
|
+
confirmDiscard: y,
|
|
104
|
+
labels: m?.vendorSection
|
|
105
|
+
}), I = F.activePayToOperation === "missingInstructions" ? St || xt : F.activePayToOperation === "existingInstructions" ? St || P : F.activePayToOperation === "vendor" && p ? bt : !1, Ct = !!(b && it) && !nt, L = x.refetch, wt = c(async () => {
|
|
101
106
|
let { data: e } = await L();
|
|
102
107
|
return e?.status ?? void 0;
|
|
103
|
-
}, [L]),
|
|
108
|
+
}, [L]), Tt = ye(), [R, Et] = u(!1), z = Ue(void 0), Dt = c(async () => {
|
|
104
109
|
if (z.current) return z.current;
|
|
105
110
|
let t = (async () => {
|
|
106
111
|
if (I) {
|
|
107
|
-
|
|
112
|
+
Et(!0);
|
|
108
113
|
try {
|
|
109
114
|
let t;
|
|
110
115
|
try {
|
|
@@ -128,10 +133,10 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
128
133
|
}
|
|
129
134
|
};
|
|
130
135
|
try {
|
|
131
|
-
await
|
|
136
|
+
await Tt.mutateAsync(t);
|
|
132
137
|
} catch {
|
|
133
138
|
try {
|
|
134
|
-
await
|
|
139
|
+
await Tt.mutateAsync(t);
|
|
135
140
|
} catch {
|
|
136
141
|
e.error(g.detail.paymentInstructionsLinkError);
|
|
137
142
|
return;
|
|
@@ -142,7 +147,7 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
142
147
|
}
|
|
143
148
|
F.finalizePayToSave(), await L();
|
|
144
149
|
} finally {
|
|
145
|
-
|
|
150
|
+
Et(!1);
|
|
146
151
|
}
|
|
147
152
|
}
|
|
148
153
|
})();
|
|
@@ -156,7 +161,7 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
156
161
|
I,
|
|
157
162
|
g.detail.paymentInstructionsLinkError,
|
|
158
163
|
g.detail.paymentInstructionsSaveError,
|
|
159
|
-
|
|
164
|
+
Tt,
|
|
160
165
|
T?.counterpart_bank_account_id,
|
|
161
166
|
T?.counterpart_id,
|
|
162
167
|
b,
|
|
@@ -165,69 +170,76 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
165
170
|
]), B = l(() => I ? F.mode === "creating" && Ve(F.newVendorForm) ? {
|
|
166
171
|
...F,
|
|
167
172
|
newVendorForm: Be(F.newVendorForm, {
|
|
168
|
-
onSave:
|
|
173
|
+
onSave: Dt,
|
|
169
174
|
isSaving: R
|
|
170
175
|
})
|
|
171
176
|
} : F.mode === "resolved" && F.paymentInstructions ? {
|
|
172
177
|
...F,
|
|
173
178
|
paymentInstructions: {
|
|
174
179
|
...F.paymentInstructions,
|
|
175
|
-
onSave:
|
|
180
|
+
onSave: Dt,
|
|
176
181
|
isSaving: R
|
|
177
182
|
}
|
|
178
183
|
} : F : F, [
|
|
179
184
|
I,
|
|
180
185
|
R,
|
|
181
|
-
|
|
186
|
+
Dt,
|
|
182
187
|
F
|
|
183
188
|
]);
|
|
184
189
|
He(() => {
|
|
185
|
-
|
|
190
|
+
p && F.isEditingPayTo && !I && F.discardPayToEdits();
|
|
186
191
|
}, [
|
|
187
192
|
I,
|
|
188
|
-
|
|
193
|
+
p,
|
|
189
194
|
F.discardPayToEdits,
|
|
190
195
|
F.isEditingPayTo
|
|
191
196
|
]);
|
|
192
|
-
let
|
|
193
|
-
|
|
197
|
+
let Ot = l(() => D ? {
|
|
198
|
+
..._,
|
|
199
|
+
draftSaved: et.submittedSaved
|
|
200
|
+
} : _, [
|
|
201
|
+
D,
|
|
202
|
+
_,
|
|
203
|
+
et.submittedSaved
|
|
204
|
+
]), V = xe({
|
|
205
|
+
payableId: Ye,
|
|
194
206
|
form: k,
|
|
195
|
-
labels:
|
|
196
|
-
counterpartId:
|
|
207
|
+
labels: Ot,
|
|
208
|
+
counterpartId: nt,
|
|
197
209
|
isVendorPending: F.mode === "creating" || F.isPendingVendor,
|
|
198
|
-
clearCounterpart:
|
|
210
|
+
clearCounterpart: Ct,
|
|
199
211
|
prepareVendorForSave: F.prepareVendorForSave,
|
|
200
|
-
onPayableCreated:
|
|
201
|
-
onSaved:
|
|
212
|
+
onPayableCreated: ft,
|
|
213
|
+
onSaved: ft,
|
|
202
214
|
onDraftSaved: () => f(!1),
|
|
203
215
|
onFinalized: () => f(!1),
|
|
204
|
-
readSavedStatus: D ?
|
|
205
|
-
}),
|
|
216
|
+
readSavedStatus: D ? wt : void 0
|
|
217
|
+
}), kt = !!(V.isSavingDraft || V.isFinalizing || F.isVendorSavePending), H = p ? b : void 0, U = je({
|
|
206
218
|
payableId: H,
|
|
207
219
|
status: T?.status
|
|
208
|
-
}),
|
|
209
|
-
counterpartId:
|
|
220
|
+
}), At = Ue(null), [jt, Mt] = u(!1), Nt = se(T), W = Re({
|
|
221
|
+
counterpartId: p ? A : void 0,
|
|
210
222
|
currency: T?.currency,
|
|
211
|
-
currentBankAccountId:
|
|
212
|
-
enabled: N &&
|
|
223
|
+
currentBankAccountId: p ? T?.counterpart_bank_account_id ?? void 0 : void 0,
|
|
224
|
+
enabled: N && p
|
|
213
225
|
}), G = ke({
|
|
214
226
|
payableId: H,
|
|
215
227
|
approvalPolicyId: T?.approval_policy_id,
|
|
216
|
-
enabled:
|
|
228
|
+
enabled: p,
|
|
217
229
|
copy: g.approvalPolicyCopy
|
|
218
|
-
}),
|
|
230
|
+
}), Pt = Ee({
|
|
219
231
|
status: T?.status,
|
|
220
232
|
scopes: C?.scopes,
|
|
221
233
|
arePendingApproversUnknown: G.isLoading,
|
|
222
234
|
hasApprovalPolicy: !!T?.approval_policy_id,
|
|
223
235
|
hasWaitingRequest: U.hasWaitingRequest
|
|
224
|
-
}),
|
|
236
|
+
}), Ft = !!U.id, It = U.isLoading || G.isLoading, Lt = l(() => qe(G.pendingApprovers.flatMap((e) => e.names)), [G.pendingApprovers]), Rt = p || D ? b : void 0, zt = p ? Qe : void 0, K = c((e) => {
|
|
225
237
|
let t = () => {
|
|
226
238
|
F.discardPayToEdits(), e?.();
|
|
227
239
|
};
|
|
228
240
|
F.hasUnsavedVendorChanges ? y(t) : t();
|
|
229
|
-
}, [y, F]), { actions:
|
|
230
|
-
payableId:
|
|
241
|
+
}, [y, F]), { actions: Bt, decisionDialog: Vt, isActionPending: Ht } = Me({
|
|
242
|
+
payableId: Rt,
|
|
231
243
|
status: T?.status,
|
|
232
244
|
currentApprovalRequestId: U.id,
|
|
233
245
|
arePendingApproversUnknown: G.isLoading,
|
|
@@ -239,24 +251,24 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
239
251
|
hasWaitingRequest: U.hasWaitingRequest,
|
|
240
252
|
pendingApprovers: G.pendingApprovers,
|
|
241
253
|
labels: g.actions,
|
|
242
|
-
isMarkAsPaidPending:
|
|
243
|
-
onMarkAsPaidSelect: () =>
|
|
244
|
-
onPayBillSelect: () => K(() =>
|
|
245
|
-
onEditSelect:
|
|
254
|
+
isMarkAsPaidPending: jt,
|
|
255
|
+
onMarkAsPaidSelect: () => At.current?.openMarkAsPaid(),
|
|
256
|
+
onPayBillSelect: () => K(() => At.current?.openPayBill()),
|
|
257
|
+
onEditSelect: zt,
|
|
246
258
|
onActionSucceeded: (e) => {
|
|
247
259
|
if (e === "reopen") {
|
|
248
|
-
|
|
260
|
+
zt?.();
|
|
249
261
|
return;
|
|
250
262
|
}
|
|
251
263
|
D && f(!1);
|
|
252
264
|
}
|
|
253
|
-
}),
|
|
265
|
+
}), Ut = Pe({
|
|
254
266
|
payableId: b,
|
|
255
267
|
status: T?.status,
|
|
256
|
-
enabled: !
|
|
268
|
+
enabled: !p,
|
|
257
269
|
labels: g.deleteDraft,
|
|
258
270
|
onDeleted: () => f(!1)
|
|
259
|
-
}),
|
|
271
|
+
}), Wt = kt || Ht, Gt = T?.ocr_status === "processing", Kt = x.isLoading || S.isResolving || Gt, qt = x.isLoading || S.isResolving || w.isResolving || W.isLoading, Jt = x.isError || S.isError || w.isError, Yt = l(() => [...Ut.menuItems, ...D || p && !qt && !Jt ? Bt.menu.map((e) => ({
|
|
260
272
|
id: e.id,
|
|
261
273
|
label: e.label,
|
|
262
274
|
onSelect: e.onSelect,
|
|
@@ -264,37 +276,37 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
264
276
|
icon: e.icon,
|
|
265
277
|
sectionHeading: e.sectionHeading
|
|
266
278
|
})) : []], [
|
|
267
|
-
|
|
268
|
-
|
|
279
|
+
Bt.menu,
|
|
280
|
+
Ut.menuItems,
|
|
269
281
|
D,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
282
|
+
p,
|
|
283
|
+
qt,
|
|
284
|
+
Jt
|
|
273
285
|
]), q = l(() => (w.data?.data ?? []).map((e) => ({
|
|
274
286
|
value: e.id,
|
|
275
287
|
label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
|
|
276
288
|
})), [w.data]), J;
|
|
277
|
-
|
|
278
|
-
let
|
|
289
|
+
pt && (mt ? w.isError ? J = g.lineItemsGlCodeUnavailable.loadError : !w.isResolving && q.length === 0 && (J = g.lineItemsGlCodeUnavailable.empty) : J = g.lineItemsGlCodeUnavailable.noAccess);
|
|
290
|
+
let Xt = !pt || !!J || w.isResolving, Zt = mt && !w.isResolving && !w.isError, Y = _e(H), Qt = T?.status === "rejected" || !p && D, $t = i(C?.scopes, [a.ApprovalRequestReadOrg]), en = Qt && $t, tn = i(C?.scopes, [a.UserReadOrg]), { userNames: X, isError: nn, isResolving: rn } = ne({ enabled: (p || Qt) && tn }), an = l(() => n(Y.data?.data ?? [], X, g.history), [
|
|
279
291
|
Y.data,
|
|
280
292
|
X,
|
|
281
293
|
g.history
|
|
282
|
-
]),
|
|
294
|
+
]), on = tn && nn && r(Y.data?.data ?? [], an, X), sn = Oe({
|
|
283
295
|
payableId: b,
|
|
284
|
-
enabled:
|
|
285
|
-
}),
|
|
296
|
+
enabled: en
|
|
297
|
+
}), cn = ge(b, { enabled: en }), ln = l(() => we(cn.data?.data, sn.roundStartedAt), [cn.data, sn.roundStartedAt]), Z = l(() => Ae({
|
|
286
298
|
payableStatus: T?.status,
|
|
287
|
-
approvalRequests:
|
|
299
|
+
approvalRequests: ln,
|
|
288
300
|
userNames: X,
|
|
289
301
|
payableUpdatedAt: T?.updated_at,
|
|
290
302
|
labels: g.detail
|
|
291
303
|
}), [
|
|
292
304
|
T?.status,
|
|
293
305
|
T?.updated_at,
|
|
294
|
-
|
|
306
|
+
ln,
|
|
295
307
|
X,
|
|
296
308
|
g.detail
|
|
297
|
-
]),
|
|
309
|
+
]), un = l(() => Ce({
|
|
298
310
|
records: j.paymentRecords,
|
|
299
311
|
events: Y.data?.data ?? [],
|
|
300
312
|
currencyCode: T?.currency,
|
|
@@ -304,15 +316,15 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
304
316
|
Y.data,
|
|
305
317
|
T?.currency,
|
|
306
318
|
g.detail
|
|
307
|
-
]),
|
|
308
|
-
if (!
|
|
319
|
+
]), dn = l(() => {
|
|
320
|
+
if (!p || !T) return;
|
|
309
321
|
let e = Fe({
|
|
310
322
|
payable: T,
|
|
311
323
|
lineItems: S.lineItems,
|
|
312
324
|
glCodeOptions: q,
|
|
313
|
-
glCodeRosterAvailable:
|
|
314
|
-
history:
|
|
315
|
-
paymentHistory:
|
|
325
|
+
glCodeRosterAvailable: Zt,
|
|
326
|
+
history: an,
|
|
327
|
+
paymentHistory: un,
|
|
316
328
|
approvalPolicy: G.view,
|
|
317
329
|
labels: g.detail,
|
|
318
330
|
hasScheduledPayment: j.hasScheduledPayment,
|
|
@@ -330,33 +342,33 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
330
342
|
N,
|
|
331
343
|
g.detail,
|
|
332
344
|
q,
|
|
333
|
-
|
|
334
|
-
|
|
345
|
+
Zt,
|
|
346
|
+
an,
|
|
335
347
|
S.lineItems,
|
|
336
348
|
T,
|
|
337
349
|
W.achInstructions,
|
|
338
350
|
W.isError,
|
|
339
|
-
|
|
340
|
-
|
|
351
|
+
un,
|
|
352
|
+
p,
|
|
341
353
|
Z,
|
|
342
354
|
F.mode,
|
|
343
355
|
F.summary
|
|
344
|
-
]),
|
|
345
|
-
if (
|
|
356
|
+
]), fn = T?.source_of_payable_data === "ocr", Q = Nt?.name, pn = p ? Q ? g.viewTitle(Q) : g.readOnlyTitle : Q && (fn || D) ? g.extractedTitle(Q) : g.newTitle, mn = p && T?.created_at ? g.addedOn(t(T.created_at.slice(0, 10))) : void 0, hn = c(() => {
|
|
357
|
+
if (p && F.isEditingPayTo) {
|
|
346
358
|
K(() => f(!1));
|
|
347
359
|
return;
|
|
348
360
|
}
|
|
349
361
|
let e = k.isDirty || F.hasUnsavedVendorChanges || !!V.stagedFile || V.isFileDeletionPending;
|
|
350
362
|
switch (Ie({
|
|
351
|
-
isUnsavedPromptOpen:
|
|
363
|
+
isUnsavedPromptOpen: ct,
|
|
352
364
|
isLocked: O,
|
|
353
365
|
isDirty: e
|
|
354
366
|
})) {
|
|
355
367
|
case "dismiss-prompt":
|
|
356
|
-
|
|
368
|
+
v(!1);
|
|
357
369
|
return;
|
|
358
370
|
case "prompt":
|
|
359
|
-
|
|
371
|
+
v(!0);
|
|
360
372
|
return;
|
|
361
373
|
default: f(!1);
|
|
362
374
|
}
|
|
@@ -365,16 +377,16 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
365
377
|
V.stagedFile,
|
|
366
378
|
k.isDirty,
|
|
367
379
|
O,
|
|
368
|
-
|
|
380
|
+
ct,
|
|
369
381
|
K,
|
|
370
382
|
f,
|
|
371
|
-
|
|
383
|
+
p,
|
|
372
384
|
F.hasUnsavedVendorChanges,
|
|
373
385
|
F.isEditingPayTo
|
|
374
|
-
]),
|
|
386
|
+
]), gn = c((e, t) => {
|
|
375
387
|
if (!h) return;
|
|
376
388
|
let n = () => h(e, t);
|
|
377
|
-
if (
|
|
389
|
+
if (p && F.isEditingPayTo) {
|
|
378
390
|
K(n);
|
|
379
391
|
return;
|
|
380
392
|
}
|
|
@@ -388,10 +400,10 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
388
400
|
O,
|
|
389
401
|
K,
|
|
390
402
|
h,
|
|
391
|
-
|
|
403
|
+
p,
|
|
392
404
|
F.hasUnsavedVendorChanges,
|
|
393
405
|
F.isEditingPayTo
|
|
394
|
-
]),
|
|
406
|
+
]), _n = c(() => {
|
|
395
407
|
if (F.isEditingPayTo) {
|
|
396
408
|
K(Ze);
|
|
397
409
|
return;
|
|
@@ -401,34 +413,34 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
401
413
|
K,
|
|
402
414
|
Ze,
|
|
403
415
|
F.isEditingPayTo
|
|
404
|
-
]),
|
|
405
|
-
|
|
406
|
-
}, [f]),
|
|
407
|
-
if (
|
|
416
|
+
]), vn = c(() => {
|
|
417
|
+
v(!1), f(!1);
|
|
418
|
+
}, [f]), yn = Kt || F.mode === "creating", bn = c(async () => {
|
|
419
|
+
if (yn) return;
|
|
408
420
|
let e = await V.saveDraft();
|
|
409
|
-
|
|
421
|
+
v(!1), e && f(!1);
|
|
410
422
|
}, [
|
|
411
423
|
V,
|
|
412
|
-
|
|
424
|
+
yn,
|
|
413
425
|
f
|
|
414
426
|
]), $ = Te({
|
|
415
427
|
payable: T,
|
|
416
|
-
onOpenPayable: h ?
|
|
428
|
+
onOpenPayable: h ? gn : void 0,
|
|
417
429
|
onRemoved: () => f(!1),
|
|
418
|
-
canManage:
|
|
419
|
-
}),
|
|
420
|
-
if (!(
|
|
430
|
+
canManage: vt
|
|
431
|
+
}), xn = c((e) => {
|
|
432
|
+
if (!(Wt || $.isBusy)) return e ? f(!0) : hn();
|
|
421
433
|
}, [
|
|
422
434
|
$.isBusy,
|
|
423
|
-
|
|
424
|
-
|
|
435
|
+
Wt,
|
|
436
|
+
hn,
|
|
425
437
|
f
|
|
426
|
-
]),
|
|
427
|
-
|
|
438
|
+
]), Sn = $.isPossibleDuplicate, Cn = !p && fn && !ot, wn = !p && !!Z, Tn = wn || Sn || Cn ? /* @__PURE__ */ Ge(We, { children: [
|
|
439
|
+
wn && Z ? /* @__PURE__ */ d(ue, {
|
|
428
440
|
...Z,
|
|
429
441
|
labels: g.rejectedBanner
|
|
430
442
|
}) : null,
|
|
431
|
-
|
|
443
|
+
Sn ? /* @__PURE__ */ d(le, {
|
|
432
444
|
onNotADuplicate: $.onNotADuplicate,
|
|
433
445
|
onRemoveBill: $.onRemoveBill,
|
|
434
446
|
isActionDisabled: $.isBusy,
|
|
@@ -438,15 +450,18 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
438
450
|
labels: $.removeBillLabel ? { removeBillButton: $.removeBillLabel } : void 0,
|
|
439
451
|
testId: s.duplicateNotice
|
|
440
452
|
}) : null,
|
|
441
|
-
|
|
453
|
+
Cn ? /* @__PURE__ */ d(fe, {
|
|
454
|
+
onDismiss: () => st(!0),
|
|
455
|
+
labels: m?.extractionNotice
|
|
456
|
+
}) : null
|
|
442
457
|
] }) : void 0;
|
|
443
458
|
return /* @__PURE__ */ Ge(We, { children: [
|
|
444
459
|
/* @__PURE__ */ d(ce, {
|
|
445
460
|
open: Je,
|
|
446
|
-
onOpenChange:
|
|
447
|
-
title:
|
|
448
|
-
subtitle:
|
|
449
|
-
notice:
|
|
461
|
+
onOpenChange: xn,
|
|
462
|
+
title: pn,
|
|
463
|
+
subtitle: mn,
|
|
464
|
+
notice: Tn,
|
|
450
465
|
vendor: {
|
|
451
466
|
...B,
|
|
452
467
|
testId: s.vendorSection
|
|
@@ -457,7 +472,7 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
457
472
|
lineItems: {
|
|
458
473
|
items: k.lineItemRows,
|
|
459
474
|
glCodeOptions: q,
|
|
460
|
-
glCodeDisabled:
|
|
475
|
+
glCodeDisabled: Xt,
|
|
461
476
|
glCodeUnavailableMessage: J,
|
|
462
477
|
discount: k.discount,
|
|
463
478
|
onDiscountChange: k.onDiscountChange,
|
|
@@ -487,7 +502,7 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
487
502
|
stagedFile: V.stagedFile,
|
|
488
503
|
onFileStaged: V.stageFile,
|
|
489
504
|
onClearStagedFile: V.clearStagedFile,
|
|
490
|
-
isSaving:
|
|
505
|
+
isSaving: kt
|
|
491
506
|
},
|
|
492
507
|
deletion: {
|
|
493
508
|
isPending: V.isFileDeletionPending,
|
|
@@ -495,18 +510,19 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
495
510
|
onDetachNow: V.detachFileNow,
|
|
496
511
|
isDeleting: V.isDeletingFile,
|
|
497
512
|
hasFailed: V.hasFileDeletionFailed
|
|
498
|
-
}
|
|
513
|
+
},
|
|
514
|
+
labels: m?.sourceDocument
|
|
499
515
|
}),
|
|
500
|
-
menuItems:
|
|
516
|
+
menuItems: Yt,
|
|
501
517
|
readOnly: O,
|
|
502
|
-
detail:
|
|
503
|
-
view:
|
|
504
|
-
actions:
|
|
518
|
+
detail: p ? {
|
|
519
|
+
view: dn,
|
|
520
|
+
actions: Bt,
|
|
505
521
|
scheduledSummary: M ? g.scheduledSummary(M.label) : void 0,
|
|
506
522
|
scheduledSummaryDate: M?.absoluteLabel,
|
|
507
523
|
scheduledStatusLabel: M ? g.scheduledStatusBadge(M.label) : void 0,
|
|
508
|
-
showApprovalOverrideNotice: !
|
|
509
|
-
awaitingApprovalNotice: !
|
|
524
|
+
showApprovalOverrideNotice: !It && Pt,
|
|
525
|
+
awaitingApprovalNotice: !It && !Ft && !Pt && T?.status === "approve_in_progress" && T?.approval_policy_id ? Lt ? g.awaitingApprovalNotice(Lt) : g.awaitingApprovalUnknownNotice : void 0,
|
|
510
526
|
payTo: {
|
|
511
527
|
onEdit: B.mode === "resolved" ? B.onEdit : void 0,
|
|
512
528
|
paymentInstructions: B.paymentInstructions,
|
|
@@ -514,33 +530,34 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
514
530
|
editForm: B.mode === "creating" ? B.newVendorForm : void 0
|
|
515
531
|
},
|
|
516
532
|
hideMissingPaymentInstructions: T?.status === "paid" || T?.status === "canceled",
|
|
517
|
-
isLoading:
|
|
518
|
-
isError:
|
|
533
|
+
isLoading: qt,
|
|
534
|
+
isError: Jt,
|
|
519
535
|
paymentHistoryError: j.isError || Y.isError,
|
|
520
536
|
paymentHistoryLoading: j.isResolving || Y.isLoading,
|
|
521
537
|
historyError: Y.isError,
|
|
522
|
-
historyLoading: Y.isLoading ||
|
|
523
|
-
historyNamesError:
|
|
538
|
+
historyLoading: Y.isLoading || rn,
|
|
539
|
+
historyNamesError: on
|
|
524
540
|
} : void 0,
|
|
525
|
-
isLineItemsLoading:
|
|
526
|
-
isSaving:
|
|
541
|
+
isLineItemsLoading: Kt,
|
|
542
|
+
isSaving: Wt || R,
|
|
527
543
|
isSavingDraft: V.isSavingDraft,
|
|
528
544
|
isSubmitting: V.isFinalizing,
|
|
529
|
-
onCancel:
|
|
530
|
-
onCollapse:
|
|
545
|
+
onCancel: hn,
|
|
546
|
+
onCollapse: p ? _n : void 0,
|
|
531
547
|
onSaveDraft: V.saveDraft,
|
|
532
548
|
onFinalize: V.finalize,
|
|
533
549
|
scrollToErrorToken: V.scrollToErrorToken,
|
|
534
550
|
showSubmit: !O && E,
|
|
535
|
-
testId: s.dialog
|
|
551
|
+
testId: s.dialog,
|
|
552
|
+
labels: m?.screen
|
|
536
553
|
}),
|
|
537
554
|
/* @__PURE__ */ d(pe, {
|
|
538
|
-
open:
|
|
539
|
-
onSaveDraft:
|
|
540
|
-
onDiscard:
|
|
541
|
-
onCancel: () =>
|
|
555
|
+
open: ct,
|
|
556
|
+
onSaveDraft: bn,
|
|
557
|
+
onDiscard: vn,
|
|
558
|
+
onCancel: () => v(!1),
|
|
542
559
|
isSaving: V.isSavingDraft,
|
|
543
|
-
isSaveDraftDisabled:
|
|
560
|
+
isSaveDraftDisabled: yn,
|
|
544
561
|
labels: g.unsavedChanges,
|
|
545
562
|
testId: s.unsavedDialog,
|
|
546
563
|
saveDraftTestId: s.unsavedSaveDraft,
|
|
@@ -548,25 +565,25 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
548
565
|
closeTestId: s.unsavedClose
|
|
549
566
|
}),
|
|
550
567
|
/* @__PURE__ */ d(de, {
|
|
551
|
-
open: !!
|
|
568
|
+
open: !!lt,
|
|
552
569
|
onDiscard: () => {
|
|
553
|
-
let e =
|
|
554
|
-
|
|
570
|
+
let e = lt;
|
|
571
|
+
ut(void 0), e?.();
|
|
555
572
|
},
|
|
556
|
-
onKeepEditing: () =>
|
|
573
|
+
onKeepEditing: () => ut(void 0),
|
|
557
574
|
labels: g.discardChanges,
|
|
558
575
|
testId: s.discardDialog,
|
|
559
576
|
discardTestId: s.discardConfirm
|
|
560
577
|
}),
|
|
561
578
|
/* @__PURE__ */ d(o, {
|
|
562
|
-
...
|
|
579
|
+
...Vt,
|
|
563
580
|
labels: { cancelButton: g.actions.decisionDialog.cancelButton },
|
|
564
581
|
testId: s.decisionDialog,
|
|
565
582
|
confirmTestId: s.decisionConfirm,
|
|
566
583
|
reasonTestId: s.decisionReason
|
|
567
584
|
}),
|
|
568
585
|
/* @__PURE__ */ d(o, {
|
|
569
|
-
...
|
|
586
|
+
...Ut.dialog,
|
|
570
587
|
labels: { cancelButton: g.actions.decisionDialog.cancelButton },
|
|
571
588
|
testId: s.deleteDraftDialog,
|
|
572
589
|
confirmTestId: s.deleteDraftConfirm
|
|
@@ -601,13 +618,13 @@ function Je({ open: Je, onOpenChange: f, payableId: p, initialCounterpartId: Ye,
|
|
|
601
618
|
labels: { cancelButton: $.keepRowConfirmation.cancelButtonLabel }
|
|
602
619
|
}),
|
|
603
620
|
$e?.({
|
|
604
|
-
ref:
|
|
621
|
+
ref: At,
|
|
605
622
|
payable: T,
|
|
606
623
|
payableId: H,
|
|
607
|
-
isPayBillEnabled:
|
|
624
|
+
isPayBillEnabled: p,
|
|
608
625
|
hasScheduledPayment: j.hasScheduledPayment,
|
|
609
|
-
onMissingAchInstructions:
|
|
610
|
-
onMarkAsPaidPendingChange:
|
|
626
|
+
onMissingAchInstructions: yt ? F.openPaymentInstructions : void 0,
|
|
627
|
+
onMarkAsPaidPendingChange: Mt
|
|
611
628
|
})
|
|
612
629
|
] });
|
|
613
630
|
}
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js
CHANGED
|
@@ -3,8 +3,8 @@ import { APPROVAL_POLICY_CARD_LABELS_EN as r } from "./index2.js";
|
|
|
3
3
|
import "./index4.js";
|
|
4
4
|
import { VENDOR_SUMMARY_CARD_LABELS_EN as i } from "./index11.js";
|
|
5
5
|
import "./index13.js";
|
|
6
|
-
import { BILL_STATUS_BADGE_LABELS_EN as a } from "../../../ui/dist/
|
|
7
|
-
import { DUE_DATE_VALUE_LABELS_EN as o } from "../../../ui/dist/
|
|
6
|
+
import { BILL_STATUS_BADGE_LABELS_EN as a } from "../../../ui/dist/index12.js";
|
|
7
|
+
import { DUE_DATE_VALUE_LABELS_EN as o } from "../../../ui/dist/index21.js";
|
|
8
8
|
import "../../../ui/dist/index.js";
|
|
9
9
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js
|
|
10
10
|
var s = {
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js
CHANGED
|
@@ -10,8 +10,8 @@ import "./index9.js";
|
|
|
10
10
|
import { VendorSummaryCard as d } from "./index12.js";
|
|
11
11
|
import "./index13.js";
|
|
12
12
|
import { BillActionButtons as f, NO_BILL_ACTIONS as p } from "../../../ui/dist/index2.js";
|
|
13
|
-
import { BillStatusBadge as m } from "../../../ui/dist/
|
|
14
|
-
import { DueDateValue as h } from "../../../ui/dist/
|
|
13
|
+
import { BillStatusBadge as m } from "../../../ui/dist/index14.js";
|
|
14
|
+
import { DueDateValue as h } from "../../../ui/dist/index22.js";
|
|
15
15
|
import "../../../ui/dist/index.js";
|
|
16
16
|
import { mergeBillDetailBodyLabels as g } from "./index14.js";
|
|
17
17
|
import { ScheduledSummaryBadge as _ } from "./index5.js";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogHeader as i, DialogTitle as a, DropdownMenu as o, DropdownMenuContent as s, DropdownMenuGroup as c, DropdownMenuItem as l, DropdownMenuLabel as ee, DropdownMenuSeparator as u, DropdownMenuTrigger as d, RequiredFieldsLegend as f } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { InlineErrorAlert as te } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
3
3
|
import "../../../../shared/ui/dist/index.js";
|
|
4
|
-
import { groupBySectionHeading as p } from "../../../ui/dist/
|
|
4
|
+
import { groupBySectionHeading as p } from "../../../ui/dist/index6.js";
|
|
5
5
|
import "../../../ui/dist/index.js";
|
|
6
6
|
import { BillDetailBody as m } from "./index15.js";
|
|
7
7
|
import "./index16.js";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { APPROVAL_POLICY_CARD_LABELS_EN as e } from "./index2.js";
|
|
2
2
|
import "./index4.js";
|
|
3
|
-
import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../../ui/dist/
|
|
4
|
-
import { DUE_DATE_VALUE_LABELS_EN as n } from "../../../ui/dist/
|
|
3
|
+
import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../../ui/dist/index12.js";
|
|
4
|
+
import { DUE_DATE_VALUE_LABELS_EN as n } from "../../../ui/dist/index21.js";
|
|
5
5
|
import "../../../ui/dist/index.js";
|
|
6
6
|
import { BILL_AUDIT_HISTORY_SECTION_LABELS_EN as r } from "./index14.js";
|
|
7
7
|
import "./index16.js";
|