@tesouro/embedded-components-react 0.4.19 → 0.4.20

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.
Files changed (22) hide show
  1. package/dist/index.css +11 -0
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +23 -14
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +49 -50
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +0 -1
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +254 -250
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +71 -65
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +5 -9
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +3 -4
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +11 -11
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +4 -4
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +1 -2
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +1 -6
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +3 -4
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +3 -2
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +1 -0
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +142 -137
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +2 -2
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +1 -0
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +52 -47
  21. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  22. package/package.json +1 -1
@@ -25,122 +25,126 @@ import { UnsavedBillDialog as pe } from "../../ui/dist/index102.js";
25
25
  import "../../ui/dist/index.js";
26
26
  import { usePayableDuplicateReview as me } from "./index12.js";
27
27
  import "./index13.js";
28
- import { canReadCounterpartBankAccounts as he } from "./index18.js";
29
- import { resolveAmountDueMinorUnits as ge } from "./index19.js";
30
- import { usePayableAchInstructions as _e } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
28
+ import { canOverrideApprovalPolicy as he, canReadCounterpartBankAccounts as ge } from "./index18.js";
29
+ import { resolveAmountDueMinorUnits as _e } from "./index19.js";
30
+ import { usePayableAchInstructions as ve } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
31
31
  import "../../../shared/counterpart-management/feature/dist/index.js";
32
- import { PayBillFlow as ve } from "./index25.js";
32
+ import { PayBillFlow as ye } from "./index25.js";
33
33
  import "./index26.js";
34
- import { useMarkAsPaidFlow as ye } from "./index16.js";
34
+ import { useMarkAsPaidFlow as be } from "./index16.js";
35
35
  import "./index17.js";
36
- import { BILL_CREATE_MESSAGE_LABELS_EN as be, mergeBillCreateScreenCopy as xe } from "./index43.js";
37
- import { useBillCreateController as Se } from "./index52.js";
38
- import { useBillForm as Ce } from "./index54.js";
39
- import { buildPaymentHistory as we } from "./index3.js";
40
- import { useApprovalPolicyCardView as Te } from "./index32.js";
41
- import { useCurrentApprovalRequestId as Ee } from "./index33.js";
42
- import { usePayableDetailActions as De } from "./index34.js";
43
- import { useScheduledPayment as Oe } from "./index35.js";
44
- import { isEditablePayableStatus as ke } from "./index36.js";
45
- import { useDraftDelete as Ae } from "./index37.js";
46
- import { buildBillDetailView as je } from "./index39.js";
47
- import { buildBillHistory as Me } from "./index40.js";
48
- import { SourceDocumentContainer as Ne } from "./index44.js";
49
- import { useVendorSectionProps as Pe } from "./index47.js";
50
- import { usePaymentInstructionsForm as Fe } from "./index48.js";
36
+ import { BILL_CREATE_MESSAGE_LABELS_EN as xe, mergeBillCreateScreenCopy as Se } from "./index43.js";
37
+ import { useBillCreateController as Ce } from "./index52.js";
38
+ import { useBillForm as we } from "./index54.js";
39
+ import { buildPaymentHistory as Te } from "./index3.js";
40
+ import { useApprovalPolicyCardView as Ee } from "./index32.js";
41
+ import { useCurrentApprovalRequestId as De } from "./index33.js";
42
+ import { usePayableDetailActions as Oe } from "./index34.js";
43
+ import { useScheduledPayment as ke } from "./index35.js";
44
+ import { isEditablePayableStatus as Ae } from "./index36.js";
45
+ import { useDraftDelete as je } from "./index37.js";
46
+ import { buildBillDetailView as Me } from "./index39.js";
47
+ import { buildBillHistory as Ne } from "./index40.js";
48
+ import { SourceDocumentContainer as Pe } from "./index44.js";
49
+ import { useVendorSectionProps as Fe } from "./index47.js";
50
+ import { usePaymentInstructionsForm as Ie } from "./index48.js";
51
51
  import { billCreateTestIds as r } from "./index55.js";
52
- import { useCallback as i, useEffect as Ie, useMemo as a, useRef as Le, useState as o } from "react";
53
- import { Fragment as Re, jsx as s, jsxs as c } from "react/jsx-runtime";
54
- import { Trash2Icon as ze } from "lucide-react";
52
+ import { useCallback as i, useEffect as Le, useMemo as a, useRef as Re, useState as o } from "react";
53
+ import { Fragment as ze, jsx as s, jsxs as Be } from "react/jsx-runtime";
54
+ import { Trash2Icon as Ve } from "lucide-react";
55
55
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js
56
- function l({ open: l, onOpenChange: u, payableId: Be, readOnly: d = !1, copy: f, onCollapse: Ve, poweredByBankName: He }) {
57
- let p = a(() => xe(f), [f]), [m, Ue] = o(), [h, g] = o(!1), [We, Ge] = o(!1), [Ke, _] = o(!1), [qe, v] = o(), y = Be ?? qe, b = oe(y, { pollWhileOcrProcessing: !0 }), x = ae(y), { initResponse: S } = re(), Je = !!S, C = e(S?.scopes, [t.AccountingConfigReadOrg]), w = ee({ enabled: C }), T = b.data, E = !y || !!T, D = !d && E && !!y && T?.status !== "draft", Ye = !d && !!T && !ke(T?.status), O = d || Ye, k = Ce({
58
- payable: T,
59
- lineItems: x.lineItems
60
- }), A = T?.counterpart_id;
61
- Ie(() => {
62
- h || A && (Ue(A), g(!0));
63
- }, [h, A]);
64
- let Xe = i((e) => {
65
- g(!0), Ue(e);
66
- }, []), j = Pe({
67
- payableId: d ? void 0 : y,
56
+ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f, onCollapse: He, poweredByBankName: Ue }) {
57
+ let p = a(() => Se(f), [f]), [m, We] = o(), [h, g] = o(!1), [Ge, Ke] = o(!1), [qe, _] = o(!1), [Je, Ye] = o(), v = u ?? Je, y = oe(v, { pollWhileOcrProcessing: !0 }), b = ae(v), { initResponse: x } = re(), Xe = !!x, S = e(x?.scopes, [t.AccountingConfigReadOrg]), C = ee({ enabled: S }), w = y.data, Ze = !v || !!w, T = !d && Ze && !!v && w?.status !== "draft", Qe = !d && !!w && !Ae(w?.status), E = d || Qe, D = we({
58
+ payable: w,
59
+ lineItems: b.lineItems
60
+ }), O = w?.counterpart_id;
61
+ Le(() => {
62
+ h || O && (We(O), g(!0));
63
+ }, [h, O]);
64
+ let $e = i((e) => {
65
+ g(!0), We(e);
66
+ }, []), k = Fe({
67
+ payableId: d ? void 0 : v,
68
68
  counterpartId: d ? void 0 : m,
69
- payableCounterpartId: A,
70
- onCounterpartChange: Xe,
71
- requiredError: k.errors?.vendor,
72
- payableCounterpartBankAccountId: T?.counterpart_bank_account_id ?? void 0,
73
- extractedVendor: T?.counterpart_raw_data ?? void 0
74
- }), Ze = !!(y && h) && !m, Qe = a(() => D ? { saveDraftButton: p.submittedSaveButton } : void 0, [p.submittedSaveButton, D]), $e = a(() => D ? { draftSaved: be.submittedSaved } : void 0, [D]), et = b.refetch, tt = i(async () => {
75
- let { data: e } = await et();
69
+ payableCounterpartId: O,
70
+ onCounterpartChange: $e,
71
+ requiredError: D.errors?.vendor,
72
+ payableCounterpartBankAccountId: w?.counterpart_bank_account_id ?? void 0,
73
+ extractedVendor: w?.counterpart_raw_data ?? void 0
74
+ }), et = !!(v && h) && !m, A = y.refetch, tt = i(async () => {
75
+ let { data: e } = await A();
76
76
  return e?.status ?? void 0;
77
- }, [et]), M = Se({
78
- payableId: Be,
79
- form: k,
80
- labels: $e,
77
+ }, [A]), nt = a(() => T ? { draftSaved: xe.submittedSaved } : void 0, [T]), j = Ce({
78
+ payableId: u,
79
+ form: D,
80
+ labels: nt,
81
81
  counterpartId: m,
82
- clearCounterpart: Ze,
83
- prepareVendorForSave: j.savePaymentInstructions,
84
- onPayableCreated: v,
85
- onSaved: v,
86
- onDraftSaved: () => u(!1),
87
- onFinalized: () => u(!1),
88
- readSavedStatus: D ? tt : void 0
89
- }), nt = !!(M.isSavingDraft || M.isFinalizing), N = d ? y : void 0, P = Ee({
90
- payableId: N,
91
- status: T?.status
92
- }), F = Le(null), I = Oe({
93
- payableId: y,
94
- scheduledPaymentDate: T?.scheduled_payment_date,
95
- enabled: d || D
96
- }), rt = ce(T), L = he(S?.scopes), R = _e({
97
- counterpartId: d ? A : void 0,
98
- currency: T?.currency,
99
- currentBankAccountId: d ? T?.counterpart_bank_account_id ?? void 0 : void 0,
100
- enabled: L && d
101
- }), z = Fe({
102
- payableId: N,
103
- counterpartId: d ? A : void 0,
104
- currentBankAccountId: T?.counterpart_bank_account_id ?? void 0,
105
- canReadCounterpartBankAccounts: L,
82
+ clearCounterpart: et,
83
+ prepareVendorForSave: k.savePaymentInstructions,
84
+ onPayableCreated: Ye,
85
+ onSaved: Ye,
86
+ onDraftSaved: () => l(!1),
87
+ onFinalized: () => l(!1),
88
+ readSavedStatus: T ? tt : void 0
89
+ }), rt = !!(j.isSavingDraft || j.isFinalizing), M = d ? v : void 0, N = De({
90
+ payableId: M,
91
+ status: w?.status
92
+ }), P = Re(null), F = ke({
93
+ payableId: v,
94
+ scheduledPaymentDate: w?.scheduled_payment_date,
95
+ enabled: d || T
96
+ }), it = ce(w), I = ge(x?.scopes), L = ve({
97
+ counterpartId: d ? O : void 0,
98
+ currency: w?.currency,
99
+ currentBankAccountId: d ? w?.counterpart_bank_account_id ?? void 0 : void 0,
100
+ enabled: I && d
101
+ }), R = Ie({
102
+ payableId: M,
103
+ counterpartId: d ? O : void 0,
104
+ currentBankAccountId: w?.counterpart_bank_account_id ?? void 0,
105
+ canReadCounterpartBankAccounts: I,
106
106
  saveErrorMessage: p.detail.paymentInstructionsSaveError,
107
107
  linkErrorMessage: p.detail.paymentInstructionsLinkError
108
- }), it = e(S?.scopes, [t.PayableWriteOrg]), at = e(S?.scopes, [t.CounterpartWriteOrg]) && it, ot = at && se(T?.status) && !I.hasScheduledPayment && !I.isResolving, B = ye({
109
- payableId: N,
110
- amountDueMinorUnits: ge(T) ?? 0,
111
- amountToPayMinorUnits: T?.amount_to_pay ?? void 0,
112
- currencyCode: T?.currency ?? void 0,
113
- dueDate: T?.due_date,
114
- hasScheduledPayment: I.hasScheduledPayment,
108
+ }), at = e(x?.scopes, [t.PayableWriteOrg]), ot = e(x?.scopes, [t.CounterpartWriteOrg]) && at, st = ot && se(w?.status) && !F.hasScheduledPayment && !F.isResolving, z = be({
109
+ payableId: M,
110
+ amountDueMinorUnits: _e(w) ?? 0,
111
+ amountToPayMinorUnits: w?.amount_to_pay ?? void 0,
112
+ currencyCode: w?.currency ?? void 0,
113
+ dueDate: w?.due_date,
114
+ hasScheduledPayment: F.hasScheduledPayment,
115
115
  labels: p.markAsPaid
116
- }), V = Te({
117
- payableId: N,
118
- approvalPolicyId: T?.approval_policy_id,
116
+ }), B = Ee({
117
+ payableId: M,
118
+ approvalPolicyId: w?.approval_policy_id,
119
119
  enabled: d,
120
120
  copy: p.approvalPolicyCopy
121
- }), { actions: H, decisionDialog: st, isActionPending: ct } = De({
122
- payableId: d || D ? y : void 0,
123
- status: T?.status,
124
- currentApprovalRequestId: P.id,
125
- isPolicyApprover: P.isPolicyApprover,
126
- hasWaitingRequest: P.hasWaitingRequest,
127
- arePendingApproversUnknown: V.isLoading,
128
- hasScheduledPayment: I.hasScheduledPayment,
129
- scheduledPaymentIntentId: I.scheduledPaymentIntentId,
130
- isScheduledPaymentUnknown: I.isResolving,
131
- pendingApprovers: V.pendingApprovers,
121
+ }), ct = he({
122
+ status: w?.status,
123
+ scopes: x?.scopes,
124
+ hasWaitingRequest: N.hasWaitingRequest,
125
+ arePendingApproversUnknown: B.isLoading
126
+ }), { actions: V, decisionDialog: lt, isActionPending: ut } = Oe({
127
+ payableId: d || T ? v : void 0,
128
+ status: w?.status,
129
+ currentApprovalRequestId: N.id,
130
+ hasWaitingRequest: N.hasWaitingRequest,
131
+ arePendingApproversUnknown: B.isLoading,
132
+ hasScheduledPayment: F.hasScheduledPayment,
133
+ scheduledPaymentIntentId: F.scheduledPaymentIntentId,
134
+ isScheduledPaymentUnknown: F.isResolving,
135
+ pendingApprovers: B.pendingApprovers,
132
136
  labels: p.actions,
133
- isMarkAsPaidPending: B.isPending,
134
- onMarkAsPaidSelect: B.open,
135
- onPayBillSelect: () => F.current?.open(),
136
- onActionSucceeded: D ? () => u(!1) : void 0
137
- }), U = Ae({
138
- payableId: y,
139
- status: T?.status,
137
+ isMarkAsPaidPending: z.isPending,
138
+ onMarkAsPaidSelect: z.open,
139
+ onPayBillSelect: () => P.current?.open(),
140
+ onActionSucceeded: T ? () => l(!1) : void 0
141
+ }), H = je({
142
+ payableId: v,
143
+ status: w?.status,
140
144
  enabled: !d,
141
145
  labels: p.deleteDraft,
142
- onDeleted: () => u(!1)
143
- }), W = nt || ct, G = b.isLoading || x.isResolving || w.isResolving || R.isLoading, K = b.isError || x.isError || w.isError, lt = a(() => [...U.menuItems, ...D || d && !G && !K ? H.menu.map((e) => ({
146
+ onDeleted: () => l(!1)
147
+ }), U = rt || ut, W = y.isLoading || b.isResolving || C.isResolving || L.isLoading, G = y.isError || b.isError || C.isError, dt = a(() => [...H.menuItems, ...T || d && !W && !G ? V.menu.map((e) => ({
144
148
  id: e.id,
145
149
  label: e.label,
146
150
  onSelect: e.onSelect,
@@ -148,194 +152,194 @@ function l({ open: l, onOpenChange: u, payableId: Be, readOnly: d = !1, copy: f,
148
152
  icon: e.icon,
149
153
  sectionHeading: e.sectionHeading
150
154
  })) : []], [
151
- H.menu,
152
- U.menuItems,
153
- D,
155
+ V.menu,
156
+ H.menuItems,
157
+ T,
154
158
  d,
155
- G,
156
- K
157
- ]), q = a(() => (w.data?.data ?? []).map((e) => ({
159
+ W,
160
+ G
161
+ ]), K = a(() => (C.data?.data ?? []).map((e) => ({
158
162
  value: e.id,
159
163
  label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
160
- })), [w.data]), J;
161
- Je && (C ? w.isError ? J = p.lineItemsGlCodeUnavailable.loadError : !w.isResolving && q.length === 0 && (J = p.lineItemsGlCodeUnavailable.empty) : J = p.lineItemsGlCodeUnavailable.noAccess);
162
- let ut = !Je || !!J || w.isResolving, dt = C && !w.isResolving && !w.isError, Y = ie(N), ft = e(S?.scopes, [t.UserReadOrg]), pt = te({ enabled: d && ft }), mt = a(() => Me(Y.data?.data ?? [], pt.data?.data ?? [], p.history), [
163
- Y.data,
164
- pt.data,
164
+ })), [C.data]), q;
165
+ Xe && (S ? C.isError ? q = p.lineItemsGlCodeUnavailable.loadError : !C.isResolving && K.length === 0 && (q = p.lineItemsGlCodeUnavailable.empty) : q = p.lineItemsGlCodeUnavailable.noAccess);
166
+ let ft = !Xe || !!q || C.isResolving, pt = S && !C.isResolving && !C.isError, J = ie(M), mt = e(x?.scopes, [t.UserReadOrg]), ht = te({ enabled: d && mt }), gt = a(() => Ne(J.data?.data ?? [], ht.data?.data ?? [], p.history), [
167
+ J.data,
168
+ ht.data,
165
169
  p.history
166
- ]), ht = a(() => we({
167
- records: I.paymentRecords,
168
- events: Y.data?.data ?? [],
169
- currencyCode: T?.currency,
170
+ ]), _t = a(() => Te({
171
+ records: F.paymentRecords,
172
+ events: J.data?.data ?? [],
173
+ currencyCode: w?.currency,
170
174
  labels: p.detail
171
175
  }), [
172
- I.paymentRecords,
173
- Y.data,
174
- T?.currency,
176
+ F.paymentRecords,
177
+ J.data,
178
+ w?.currency,
175
179
  p.detail
176
- ]), gt = a(() => d && T ? je({
177
- payable: T,
178
- lineItems: x.lineItems,
179
- glCodeOptions: q,
180
- glCodeRosterAvailable: dt,
181
- history: mt,
182
- paymentHistory: ht,
183
- approvalPolicy: V.view,
180
+ ]), vt = a(() => d && w ? Me({
181
+ payable: w,
182
+ lineItems: b.lineItems,
183
+ glCodeOptions: K,
184
+ glCodeRosterAvailable: pt,
185
+ history: gt,
186
+ paymentHistory: _t,
187
+ approvalPolicy: B.view,
184
188
  labels: p.detail,
185
- hasScheduledPayment: I.hasScheduledPayment,
186
- payableAchInstructions: R.achInstructions,
187
- payableAchInstructionsReadable: L && !R.isError
189
+ hasScheduledPayment: F.hasScheduledPayment,
190
+ payableAchInstructions: L.achInstructions,
191
+ payableAchInstructionsReadable: I && !L.isError
188
192
  }) : void 0, [
189
- I.hasScheduledPayment,
190
- V.view,
191
- L,
193
+ F.hasScheduledPayment,
194
+ B.view,
195
+ I,
192
196
  p.detail,
193
- q,
194
- dt,
195
- mt,
196
- x.lineItems,
197
- T,
198
- R.achInstructions,
199
- R.isError,
200
- ht,
197
+ K,
198
+ pt,
199
+ gt,
200
+ b.lineItems,
201
+ w,
202
+ L.achInstructions,
203
+ L.isError,
204
+ _t,
201
205
  d
202
- ]), _t = T?.source_of_payable_data === "ocr", X = rt?.name, vt = d ? X ? p.viewTitle(X) : p.readOnlyTitle : X && (_t || D) ? p.extractedTitle(X) : p.newTitle, yt = d && T?.created_at ? p.addedOn(ne(T.created_at.slice(0, 10))) : void 0, Z = i(() => {
203
- let e = k.isDirty || j.hasUnsavedVendorChanges || !!M.stagedFile || M.isFileDeletionPending;
204
- if (!O && e) {
206
+ ]), Y = w?.source_of_payable_data === "ocr", X = it?.name, yt = d ? X ? p.viewTitle(X) : p.readOnlyTitle : X && (Y || T) ? p.extractedTitle(X) : p.newTitle, bt = d && w?.created_at ? p.addedOn(ne(w.created_at.slice(0, 10))) : void 0, Z = i(() => {
207
+ let e = D.isDirty || k.hasUnsavedVendorChanges || !!j.stagedFile || j.isFileDeletionPending;
208
+ if (!E && e) {
205
209
  _(!0);
206
210
  return;
207
211
  }
208
- u(!1);
212
+ l(!1);
209
213
  }, [
210
- M.isFileDeletionPending,
211
- M.stagedFile,
212
- k.isDirty,
213
- O,
214
- u,
215
- j.hasUnsavedVendorChanges
216
- ]), bt = i(() => {
217
- _(!1), u(!1);
218
- }, [u]), Q = x.isResolving || j.mode === "creating", xt = i(async () => {
214
+ j.isFileDeletionPending,
215
+ j.stagedFile,
216
+ D.isDirty,
217
+ E,
218
+ l,
219
+ k.hasUnsavedVendorChanges
220
+ ]), xt = i(() => {
221
+ _(!1), l(!1);
222
+ }, [l]), Q = b.isResolving || k.mode === "creating", St = i(async () => {
219
223
  if (Q) return;
220
- let e = await M.saveDraft();
221
- _(!1), e && u(!1);
224
+ let e = await j.saveDraft();
225
+ _(!1), e && l(!1);
222
226
  }, [
223
- M,
227
+ j,
224
228
  Q,
225
- u
229
+ l
226
230
  ]), $ = me({
227
- payable: T,
228
- onRemoved: () => u(!1),
229
- canManage: it
230
- }), St = i((e) => {
231
- if (!(W || $.isBusy)) return e ? u(!0) : Z();
231
+ payable: w,
232
+ onRemoved: () => l(!1),
233
+ canManage: at
234
+ }), Ct = i((e) => {
235
+ if (!(U || $.isBusy)) return e ? l(!0) : Z();
232
236
  }, [
233
237
  $.isBusy,
234
- W,
238
+ U,
235
239
  Z,
236
- u
237
- ]), Ct = $.isPossibleDuplicate, wt = !d && _t && !We, Tt = Ct || wt ? /* @__PURE__ */ c(Re, { children: [Ct ? /* @__PURE__ */ s(ue, {
240
+ l
241
+ ]), wt = $.isPossibleDuplicate, Tt = !d && Y && !Ge, Et = wt || Tt ? /* @__PURE__ */ Be(ze, { children: [wt ? /* @__PURE__ */ s(ue, {
238
242
  onNotADuplicate: $.onNotADuplicate,
239
243
  onRemoveBill: $.onRemoveBill,
240
244
  isActionDisabled: $.isBusy,
241
245
  labels: $.removeBillLabel ? { removeBillButton: $.removeBillLabel } : void 0,
242
246
  testId: r.duplicateNotice
243
- }) : null, wt ? /* @__PURE__ */ s(de, { onDismiss: () => Ge(!0) }) : null] }) : void 0;
244
- return /* @__PURE__ */ c(Re, { children: [
247
+ }) : null, Tt ? /* @__PURE__ */ s(de, { onDismiss: () => Ke(!0) }) : null] }) : void 0;
248
+ return /* @__PURE__ */ Be(ze, { children: [
245
249
  /* @__PURE__ */ s(le, {
246
- open: l,
247
- onOpenChange: St,
248
- title: vt,
249
- subtitle: yt,
250
- notice: Tt,
250
+ open: c,
251
+ onOpenChange: Ct,
252
+ title: yt,
253
+ subtitle: bt,
254
+ notice: Et,
251
255
  vendor: {
252
- ...j,
256
+ ...k,
253
257
  testId: r.vendorSection
254
258
  },
255
- values: k.values,
256
- errors: k.errors,
257
- onChange: k.onChange,
259
+ values: D.values,
260
+ errors: D.errors,
261
+ onChange: D.onChange,
258
262
  lineItems: {
259
- items: k.lineItemRows,
260
- glCodeOptions: q,
261
- glCodeDisabled: ut,
262
- glCodeUnavailableMessage: J,
263
- discount: k.discount,
264
- onDiscountChange: k.onDiscountChange,
265
- tax: k.tax,
266
- onTaxChange: k.onTaxChange,
267
- total: k.total,
268
- onTotalChange: k.onTotalChange,
269
- onAddLineItem: k.onAddLineItem,
270
- errors: k.lineItemErrors,
271
- totalsErrors: k.totalsErrors,
263
+ items: D.lineItemRows,
264
+ glCodeOptions: K,
265
+ glCodeDisabled: ft,
266
+ glCodeUnavailableMessage: q,
267
+ discount: D.discount,
268
+ onDiscountChange: D.onDiscountChange,
269
+ tax: D.tax,
270
+ onTaxChange: D.onTaxChange,
271
+ total: D.total,
272
+ onTotalChange: D.onTotalChange,
273
+ onAddLineItem: D.onAddLineItem,
274
+ errors: D.lineItemErrors,
275
+ totalsErrors: D.totalsErrors,
272
276
  testId: r.lineItems
273
277
  },
274
- documentPanel: /* @__PURE__ */ s(Ne, {
275
- payableId: y,
276
- readOnly: O,
277
- isDocumentPending: !!y && !T?.file && (b.isLoading || T?.ocr_status === "processing"),
278
- file: T?.file ? {
279
- id: T.file.id,
280
- name: T.file.name,
281
- url: T.file.url,
282
- mimetype: T.file.mimetype
278
+ documentPanel: /* @__PURE__ */ s(Pe, {
279
+ payableId: v,
280
+ readOnly: E,
281
+ isDocumentPending: !!v && !w?.file && (y.isLoading || w?.ocr_status === "processing"),
282
+ file: w?.file ? {
283
+ id: w.file.id,
284
+ name: w.file.name,
285
+ url: w.file.url,
286
+ mimetype: w.file.mimetype
283
287
  } : void 0,
284
288
  staging: {
285
- stagedFile: M.stagedFile,
286
- onFileStaged: M.stageFile,
287
- onClearStagedFile: M.clearStagedFile,
288
- isSaving: nt
289
+ stagedFile: j.stagedFile,
290
+ onFileStaged: j.stageFile,
291
+ onClearStagedFile: j.clearStagedFile,
292
+ isSaving: rt
289
293
  },
290
294
  deletion: {
291
- isPending: M.isFileDeletionPending,
292
- onRequest: M.requestFileDeletion,
293
- onDetachNow: M.detachFileNow,
294
- isDeleting: M.isDeletingFile,
295
- hasFailed: M.hasFileDeletionFailed
295
+ isPending: j.isFileDeletionPending,
296
+ onRequest: j.requestFileDeletion,
297
+ onDetachNow: j.detachFileNow,
298
+ isDeleting: j.isDeletingFile,
299
+ hasFailed: j.hasFileDeletionFailed
296
300
  }
297
301
  }),
298
- menuItems: lt,
299
- readOnly: O,
302
+ menuItems: dt,
303
+ readOnly: E,
300
304
  detail: d ? {
301
- view: gt,
302
- actions: H,
303
- scheduledSummary: I.hasScheduledPayment && I.scheduledDateLabel ? p.scheduledSummary(I.scheduledDateLabel) : void 0,
304
- onEditPaymentInstructions: A && ot ? z.open : void 0,
305
- paymentInstructionsForm: A && ot ? {
306
- isOpen: z.isOpen,
307
- values: z.values,
308
- errors: z.errors,
309
- isSaving: z.isSaving,
310
- onOpen: z.open,
311
- onCancel: z.close,
312
- onChange: z.onChange,
313
- onSave: z.save
305
+ view: vt,
306
+ actions: V,
307
+ scheduledSummary: F.hasScheduledPayment && F.scheduledDateLabel ? p.scheduledSummary(F.scheduledDateLabel) : void 0,
308
+ showApprovalOverrideNotice: ct,
309
+ onEditPaymentInstructions: O && st ? R.open : void 0,
310
+ paymentInstructionsForm: O && st ? {
311
+ isOpen: R.isOpen,
312
+ values: R.values,
313
+ errors: R.errors,
314
+ isSaving: R.isSaving,
315
+ onOpen: R.open,
316
+ onCancel: R.close,
317
+ onChange: R.onChange,
318
+ onSave: R.save
314
319
  } : void 0,
315
- isLoading: G,
316
- isError: K,
317
- paymentHistoryError: I.isError || Y.isError,
318
- paymentHistoryLoading: I.isResolving || Y.isLoading
320
+ isLoading: W,
321
+ isError: G,
322
+ paymentHistoryError: F.isError || J.isError,
323
+ paymentHistoryLoading: F.isResolving || J.isLoading
319
324
  } : void 0,
320
- isLineItemsLoading: x.isResolving,
321
- isSaving: W,
322
- isSavingDraft: M.isSavingDraft,
323
- isFinalizing: M.isFinalizing,
325
+ isLineItemsLoading: b.isResolving,
326
+ isSaving: U,
327
+ isSavingDraft: j.isSavingDraft,
328
+ isSubmitting: j.isFinalizing,
324
329
  onCancel: Z,
325
- onCollapse: d ? Ve : void 0,
326
- onSaveDraft: M.saveDraft,
327
- onFinalize: M.finalize,
328
- scrollToErrorToken: M.scrollToErrorToken,
329
- showFinalize: !D && E,
330
- labels: Qe,
330
+ onCollapse: d ? He : void 0,
331
+ onSaveDraft: j.saveDraft,
332
+ onFinalize: j.finalize,
333
+ scrollToErrorToken: j.scrollToErrorToken,
334
+ showSubmit: !E && Ze,
331
335
  testId: r.dialog
332
336
  }),
333
337
  /* @__PURE__ */ s(pe, {
334
- open: Ke,
335
- onSaveDraft: xt,
336
- onDiscard: bt,
338
+ open: qe,
339
+ onSaveDraft: St,
340
+ onDiscard: xt,
337
341
  onCancel: () => _(!1),
338
- isSaving: M.isSavingDraft,
342
+ isSaving: j.isSavingDraft,
339
343
  isSaveDraftDisabled: Q,
340
344
  labels: p.unsavedChanges,
341
345
  testId: r.unsavedDialog,
@@ -344,14 +348,14 @@ function l({ open: l, onOpenChange: u, payableId: Be, readOnly: d = !1, copy: f,
344
348
  closeTestId: r.unsavedClose
345
349
  }),
346
350
  /* @__PURE__ */ s(n, {
347
- ...st,
351
+ ...lt,
348
352
  labels: { cancelButton: p.actions.decisionDialog.cancelButton },
349
353
  testId: r.decisionDialog,
350
354
  confirmTestId: r.decisionConfirm,
351
355
  reasonTestId: r.decisionReason
352
356
  }),
353
357
  /* @__PURE__ */ s(n, {
354
- ...U.dialog,
358
+ ...H.dialog,
355
359
  labels: { cancelButton: p.actions.decisionDialog.cancelButton },
356
360
  testId: r.deleteDraftDialog,
357
361
  confirmTestId: r.deleteDraftConfirm
@@ -362,20 +366,20 @@ function l({ open: l, onOpenChange: u, payableId: Be, readOnly: d = !1, copy: f,
362
366
  onConfirm: $.removeConfirmation.onConfirm,
363
367
  onCancel: $.removeConfirmation.onCancel,
364
368
  isPending: $.removeConfirmation.isPending,
365
- confirmIcon: /* @__PURE__ */ s(ze, {}),
369
+ confirmIcon: /* @__PURE__ */ s(Ve, {}),
366
370
  labels: { cancelButton: $.removeConfirmation.cancelButtonLabel },
367
371
  testId: r.duplicateRemoveDialog,
368
372
  confirmTestId: r.duplicateRemoveConfirm
369
373
  }),
370
- /* @__PURE__ */ s(fe, { ...B.dialogProps }),
371
- d && T ? /* @__PURE__ */ s(ve, {
372
- ref: F,
373
- payable: T,
374
- onMissingAchInstructions: at ? z.open : void 0,
375
- poweredByBankName: He,
374
+ /* @__PURE__ */ s(fe, { ...z.dialogProps }),
375
+ d && w ? /* @__PURE__ */ s(ye, {
376
+ ref: P,
377
+ payable: w,
378
+ onMissingAchInstructions: ot ? R.open : void 0,
379
+ poweredByBankName: Ue,
376
380
  labels: p.payBill
377
381
  }) : null
378
382
  ] });
379
383
  }
380
384
  //#endregion
381
- export { l as BillCreateDialog, l as default };
385
+ export { c as BillCreateDialog, c as default };