@tesouro/embedded-components-react 0.4.22 → 0.4.23

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 (58) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/BillPayWidget.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +8 -8
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +24 -24
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +45 -44
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +3 -49
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +47 -119
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +119 -33
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +33 -186
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +186 -75
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +75 -21
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +22 -232
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +223 -210
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +202 -103
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +121 -13
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +12 -47
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +47 -31
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +27 -198
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +198 -30
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +30 -234
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +240 -19
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +19 -414
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +427 -4
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +4 -38
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +34 -210
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +221 -3
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +3 -4
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +2 -44
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +46 -1
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -8
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +6 -10
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +10 -110
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +112 -3
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +3 -127
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +124 -8
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +8 -7
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +8 -46
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +43 -18
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +20 -28
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +27 -82
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +83 -47
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +47 -250
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +239 -101
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +107 -202
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +209 -3
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +4 -8
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +6 -113
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +115 -1
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +0 -24
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +25 -0
  51. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +1 -1
  52. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/client.config.js +2 -2
  53. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/finopsApiVersion.js +4 -0
  54. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  55. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  56. package/package.json +33 -1
  57. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/api-version.js +0 -3
  58. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/api-version.json.js +0 -4
@@ -1,4 +1,427 @@
1
- import "./index44.js";
2
- import "./index53.js";
3
- import "./index55.js";
4
- import "./index57.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
6
+ import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
7
+ import { useAllLedgerAccountsQuery as ee } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
8
+ import { useAllOrganizationUsersQuery as te } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
9
+ import "../../../shared/data-access/dist/index.js";
10
+ import { formatCalendarDate as ne } from "../../../shared/util/dist/lib/formatCalendarDate.js";
11
+ import { useWidgetConfig as re } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
12
+ import "../../../shared/feature/dist/index.js";
13
+ import { usePayableApprovalRequestsQuery as ie } from "../../data-access/dist/index8.js";
14
+ import { usePayableHistoryQuery as ae } from "../../data-access/dist/index9.js";
15
+ import { useAllPayableLineItemsQuery as oe } from "../../data-access/dist/index10.js";
16
+ import { usePayableQuery as se } from "../../data-access/dist/index16.js";
17
+ import "../../data-access/dist/index.js";
18
+ import { hasUnpaidBalance as ce } from "./index7.js";
19
+ import { resolveVendor as le } from "./index8.js";
20
+ import { BillCreateScreen as ue } from "../../ui/dist/index50.js";
21
+ import { BillDecisionDialog as n } from "../../ui/dist/index56.js";
22
+ import { BillDuplicateNotice as de } from "../../ui/dist/index66.js";
23
+ import { BillRejectedBanner as fe } from "../../ui/dist/index69.js";
24
+ import { ExtractionNotice as pe } from "../../ui/dist/index87.js";
25
+ import { MarkAsPaidDialog as me } from "../../ui/dist/index96.js";
26
+ import { UnsavedBillDialog as he } from "../../ui/dist/index106.js";
27
+ import "../../ui/dist/index.js";
28
+ import { usePayableDuplicateReview as ge } from "./index13.js";
29
+ import "./index14.js";
30
+ import { canOverrideApprovalPolicy as _e, canReadCounterpartBankAccounts as ve } from "./index19.js";
31
+ import { resolveAmountDueMinorUnits as ye } from "./index20.js";
32
+ import { usePayableAchInstructions as be } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
33
+ import "../../../shared/counterpart-management/feature/dist/index.js";
34
+ import { PayBillFlow as xe } from "./index26.js";
35
+ import "./index27.js";
36
+ import { useMarkAsPaidFlow as Se } from "./index17.js";
37
+ import "./index18.js";
38
+ import { BILL_CREATE_MESSAGE_LABELS_EN as Ce, mergeBillCreateScreenCopy as we } from "./index45.js";
39
+ import { useBillCreateController as Te } from "./index54.js";
40
+ import { useBillForm as Ee } from "./index56.js";
41
+ import { buildPaymentHistory as De } from "./index3.js";
42
+ import { currentApprovalRound as Oe } from "./index4.js";
43
+ import { usePayableApprovalRoundStart as ke } from "./index31.js";
44
+ import { useApprovalPolicyCardView as Ae } from "./index32.js";
45
+ import { resolveBillRejectionNotice as je } from "./index33.js";
46
+ import { useCurrentApprovalRequestId as Me } from "./index34.js";
47
+ import { usePayableDetailActions as Ne } from "./index35.js";
48
+ import { useScheduledPayment as Pe } from "./index36.js";
49
+ import { isEditablePayableStatus as Fe } from "./index37.js";
50
+ import { useDraftDelete as Ie } from "./index38.js";
51
+ import { buildBillDetailView as Le } from "./index40.js";
52
+ import { resolveEditorDismissal as Re } from "./index41.js";
53
+ import { buildBillHistory as ze } from "./index42.js";
54
+ import { SourceDocumentContainer as Be } from "./index46.js";
55
+ import { useVendorSectionProps as Ve } from "./index49.js";
56
+ import { usePaymentInstructionsForm as He } from "./index50.js";
57
+ import { billCreateTestIds as r } from "./index57.js";
58
+ import { useCallback as i, useEffect as Ue, useMemo as a, useRef as We, useState as o } from "react";
59
+ import { Fragment as Ge, jsx as s, jsxs as Ke } from "react/jsx-runtime";
60
+ import { Trash2Icon as qe } from "lucide-react";
61
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js
62
+ function c({ open: c, onOpenChange: l, payableId: Je, readOnly: u = !1, copy: Ye, onCollapse: Xe, poweredByBankName: Ze }) {
63
+ let d = a(() => we(Ye), [Ye]), [f, Qe] = o(), [p, $e] = o(!1), [et, tt] = o(!1), [m, h] = o(!1), [nt, rt] = o(), g = Je ?? nt, _ = se(g, { pollWhileOcrProcessing: !0 }), v = oe(g), { initResponse: y } = re(), it = !!y, b = e(y?.scopes, [t.AccountingConfigReadOrg]), x = ee({ enabled: b }), S = _.data, C = !g || !!S, w = !u && C && !!g && S?.status !== "draft", at = !u && !!S && !Fe(S?.status), T = u || at, E = Ee({
64
+ payable: S,
65
+ lineItems: v.lineItems
66
+ }), D = S?.counterpart_id;
67
+ Ue(() => {
68
+ p || D && (Qe(D), $e(!0));
69
+ }, [p, D]);
70
+ let ot = i((e) => {
71
+ $e(!0), Qe(e);
72
+ }, []), O = Ve({
73
+ payableId: u ? void 0 : g,
74
+ counterpartId: u ? void 0 : f,
75
+ payableCounterpartId: D,
76
+ isVendorKnown: !u && C,
77
+ onCounterpartChange: ot,
78
+ requiredError: E.errors?.vendor,
79
+ payableCounterpartBankAccountId: S?.counterpart_bank_account_id ?? void 0,
80
+ extractedVendor: S?.counterpart_raw_data ?? void 0
81
+ }), st = !!(g && p) && !f, ct = _.refetch, lt = i(async () => {
82
+ let { data: e } = await ct();
83
+ return e?.status ?? void 0;
84
+ }, [ct]), ut = a(() => w ? { draftSaved: Ce.submittedSaved } : void 0, [w]), k = Te({
85
+ payableId: Je,
86
+ form: E,
87
+ labels: ut,
88
+ counterpartId: f,
89
+ clearCounterpart: st,
90
+ prepareVendorForSave: O.savePaymentInstructions,
91
+ onPayableCreated: rt,
92
+ onSaved: rt,
93
+ onDraftSaved: () => l(!1),
94
+ onFinalized: () => l(!1),
95
+ readSavedStatus: w ? lt : void 0
96
+ }), A = !!(k.isSavingDraft || k.isFinalizing), j = u ? g : void 0, M = Me({
97
+ payableId: j,
98
+ status: S?.status
99
+ }), dt = We(null), N = Pe({
100
+ payableId: g,
101
+ scheduledPaymentDate: S?.scheduled_payment_date,
102
+ enabled: u || w
103
+ }), ft = le(S), P = ve(y?.scopes), F = be({
104
+ counterpartId: u ? D : void 0,
105
+ currency: S?.currency,
106
+ currentBankAccountId: u ? S?.counterpart_bank_account_id ?? void 0 : void 0,
107
+ enabled: P && u
108
+ }), I = He({
109
+ payableId: j,
110
+ counterpartId: u ? D : void 0,
111
+ currentBankAccountId: S?.counterpart_bank_account_id ?? void 0,
112
+ canReadCounterpartBankAccounts: P,
113
+ saveErrorMessage: d.detail.paymentInstructionsSaveError,
114
+ linkErrorMessage: d.detail.paymentInstructionsLinkError
115
+ }), pt = e(y?.scopes, [t.PayableWriteOrg]), L = e(y?.scopes, [t.CounterpartWriteOrg]) && pt, mt = L && ce(S?.status) && !N.hasScheduledPayment && !N.isResolving, R = Se({
116
+ payableId: j,
117
+ amountDueMinorUnits: ye(S) ?? 0,
118
+ amountToPayMinorUnits: S?.amount_to_pay ?? void 0,
119
+ currencyCode: S?.currency ?? void 0,
120
+ dueDate: S?.due_date,
121
+ hasScheduledPayment: N.hasScheduledPayment,
122
+ labels: d.markAsPaid
123
+ }), z = Ae({
124
+ payableId: j,
125
+ approvalPolicyId: S?.approval_policy_id,
126
+ enabled: u,
127
+ copy: d.approvalPolicyCopy
128
+ }), ht = _e({
129
+ status: S?.status,
130
+ scopes: y?.scopes,
131
+ hasWaitingRequest: M.hasWaitingRequest,
132
+ arePendingApproversUnknown: z.isLoading
133
+ }), { actions: B, decisionDialog: gt, isActionPending: _t } = Ne({
134
+ payableId: u || w ? g : void 0,
135
+ status: S?.status,
136
+ currentApprovalRequestId: M.id,
137
+ hasWaitingRequest: M.hasWaitingRequest,
138
+ arePendingApproversUnknown: z.isLoading,
139
+ hasScheduledPayment: N.hasScheduledPayment,
140
+ scheduledPaymentIntentId: N.scheduledPaymentIntentId,
141
+ isScheduledPaymentUnknown: N.isResolving,
142
+ isPayabilityUnknown: F.isLoading,
143
+ pendingApprovers: z.pendingApprovers,
144
+ labels: d.actions,
145
+ isMarkAsPaidPending: R.isPending,
146
+ onMarkAsPaidSelect: R.open,
147
+ onPayBillSelect: () => dt.current?.open(),
148
+ onActionSucceeded: w ? () => l(!1) : void 0
149
+ }), V = Ie({
150
+ payableId: g,
151
+ status: S?.status,
152
+ enabled: !u,
153
+ labels: d.deleteDraft,
154
+ onDeleted: () => l(!1)
155
+ }), H = A || _t, U = _.isLoading || v.isResolving || x.isResolving || F.isLoading, W = _.isError || v.isError || x.isError, vt = a(() => [...V.menuItems, ...w || u && !U && !W ? B.menu.map((e) => ({
156
+ id: e.id,
157
+ label: e.label,
158
+ onSelect: e.onSelect,
159
+ disabled: e.disabled,
160
+ icon: e.icon,
161
+ sectionHeading: e.sectionHeading
162
+ })) : []], [
163
+ B.menu,
164
+ V.menuItems,
165
+ w,
166
+ u,
167
+ U,
168
+ W
169
+ ]), G = a(() => (x.data?.data ?? []).map((e) => ({
170
+ value: e.id,
171
+ label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
172
+ })), [x.data]), K;
173
+ it && (b ? x.isError ? K = d.lineItemsGlCodeUnavailable.loadError : !x.isResolving && G.length === 0 && (K = d.lineItemsGlCodeUnavailable.empty) : K = d.lineItemsGlCodeUnavailable.noAccess);
174
+ let yt = !it || !!K || x.isResolving, bt = b && !x.isResolving && !x.isError, q = ae(j), xt = S?.status === "rejected" || !u && w, St = e(y?.scopes, [t.ApprovalRequestReadOrg]), Ct = xt && St, wt = e(y?.scopes, [t.UserReadOrg]), J = te({ enabled: (u || xt) && wt }), Tt = a(() => ze(q.data?.data ?? [], J.data?.data ?? [], d.history), [
175
+ q.data,
176
+ J.data,
177
+ d.history
178
+ ]), Et = ke({
179
+ payableId: g,
180
+ enabled: Ct
181
+ }), Dt = ie(g, { enabled: Ct }), Ot = a(() => Oe(Dt.data?.data, Et.roundStartedAt), [Dt.data, Et.roundStartedAt]), Y = a(() => je({
182
+ payableStatus: S?.status,
183
+ approvalRequests: Ot,
184
+ users: J.data?.data ?? [],
185
+ payableUpdatedAt: S?.updated_at,
186
+ labels: d.detail
187
+ }), [
188
+ S?.status,
189
+ S?.updated_at,
190
+ Ot,
191
+ J.data,
192
+ d.detail
193
+ ]), kt = a(() => De({
194
+ records: N.paymentRecords,
195
+ events: q.data?.data ?? [],
196
+ currencyCode: S?.currency,
197
+ labels: d.detail
198
+ }), [
199
+ N.paymentRecords,
200
+ q.data,
201
+ S?.currency,
202
+ d.detail
203
+ ]), At = a(() => u && S ? Le({
204
+ payable: S,
205
+ lineItems: v.lineItems,
206
+ glCodeOptions: G,
207
+ glCodeRosterAvailable: bt,
208
+ history: Tt,
209
+ paymentHistory: kt,
210
+ approvalPolicy: z.view,
211
+ labels: d.detail,
212
+ hasScheduledPayment: N.hasScheduledPayment,
213
+ rejection: Y,
214
+ payableAchInstructions: F.achInstructions,
215
+ payableAchInstructionsReadable: P && !F.isError
216
+ }) : void 0, [
217
+ N.hasScheduledPayment,
218
+ z.view,
219
+ P,
220
+ d.detail,
221
+ G,
222
+ bt,
223
+ Tt,
224
+ v.lineItems,
225
+ S,
226
+ F.achInstructions,
227
+ F.isError,
228
+ kt,
229
+ u,
230
+ Y
231
+ ]), jt = S?.source_of_payable_data === "ocr", X = ft?.name, Mt = u ? X ? d.viewTitle(X) : d.readOnlyTitle : X && (jt || w) ? d.extractedTitle(X) : d.newTitle, Nt = u && S?.created_at ? d.addedOn(ne(S.created_at.slice(0, 10))) : void 0, Z = i(() => {
232
+ let e = E.isDirty || O.hasUnsavedVendorChanges || !!k.stagedFile || k.isFileDeletionPending;
233
+ switch (Re({
234
+ isUnsavedPromptOpen: m,
235
+ isLocked: T,
236
+ isDirty: e
237
+ })) {
238
+ case "dismiss-prompt":
239
+ h(!1);
240
+ return;
241
+ case "prompt":
242
+ h(!0);
243
+ return;
244
+ default: l(!1);
245
+ }
246
+ }, [
247
+ k.isFileDeletionPending,
248
+ k.stagedFile,
249
+ E.isDirty,
250
+ T,
251
+ m,
252
+ l,
253
+ O.hasUnsavedVendorChanges
254
+ ]), Pt = i(() => {
255
+ h(!1), l(!1);
256
+ }, [l]), Q = v.isResolving || O.mode === "creating", Ft = i(async () => {
257
+ if (Q) return;
258
+ let e = await k.saveDraft();
259
+ h(!1), e && l(!1);
260
+ }, [
261
+ k,
262
+ Q,
263
+ l
264
+ ]), $ = ge({
265
+ payable: S,
266
+ onRemoved: () => l(!1),
267
+ canManage: pt
268
+ }), It = i((e) => {
269
+ if (!(H || $.isBusy)) return e ? l(!0) : Z();
270
+ }, [
271
+ $.isBusy,
272
+ H,
273
+ Z,
274
+ l
275
+ ]), Lt = $.isPossibleDuplicate, Rt = !u && jt && !et, zt = !u && !!Y, Bt = zt || Lt || Rt ? /* @__PURE__ */ Ke(Ge, { children: [
276
+ zt && Y ? /* @__PURE__ */ s(fe, {
277
+ ...Y,
278
+ labels: d.rejectedBanner
279
+ }) : null,
280
+ Lt ? /* @__PURE__ */ s(de, {
281
+ onNotADuplicate: $.onNotADuplicate,
282
+ onRemoveBill: $.onRemoveBill,
283
+ isActionDisabled: $.isBusy,
284
+ labels: $.removeBillLabel ? { removeBillButton: $.removeBillLabel } : void 0,
285
+ testId: r.duplicateNotice
286
+ }) : null,
287
+ Rt ? /* @__PURE__ */ s(pe, { onDismiss: () => tt(!0) }) : null
288
+ ] }) : void 0;
289
+ return /* @__PURE__ */ Ke(Ge, { children: [
290
+ /* @__PURE__ */ s(ue, {
291
+ open: c,
292
+ onOpenChange: It,
293
+ title: Mt,
294
+ subtitle: Nt,
295
+ notice: Bt,
296
+ vendor: {
297
+ ...O,
298
+ testId: r.vendorSection
299
+ },
300
+ values: E.values,
301
+ errors: E.errors,
302
+ onChange: E.onChange,
303
+ lineItems: {
304
+ items: E.lineItemRows,
305
+ glCodeOptions: G,
306
+ glCodeDisabled: yt,
307
+ glCodeUnavailableMessage: K,
308
+ discount: E.discount,
309
+ onDiscountChange: E.onDiscountChange,
310
+ tax: E.tax,
311
+ onTaxChange: E.onTaxChange,
312
+ total: E.total,
313
+ onTotalChange: E.onTotalChange,
314
+ onAddLineItem: E.onAddLineItem,
315
+ errors: E.lineItemErrors,
316
+ totalsErrors: E.totalsErrors,
317
+ testId: r.lineItems
318
+ },
319
+ documentPanel: /* @__PURE__ */ s(Be, {
320
+ payableId: g,
321
+ readOnly: T,
322
+ isDocumentPending: !!g && !S?.file && (_.isLoading || S?.ocr_status === "processing"),
323
+ file: S?.file ? {
324
+ id: S.file.id,
325
+ name: S.file.name,
326
+ url: S.file.url,
327
+ mimetype: S.file.mimetype
328
+ } : void 0,
329
+ staging: {
330
+ stagedFile: k.stagedFile,
331
+ onFileStaged: k.stageFile,
332
+ onClearStagedFile: k.clearStagedFile,
333
+ isSaving: A
334
+ },
335
+ deletion: {
336
+ isPending: k.isFileDeletionPending,
337
+ onRequest: k.requestFileDeletion,
338
+ onDetachNow: k.detachFileNow,
339
+ isDeleting: k.isDeletingFile,
340
+ hasFailed: k.hasFileDeletionFailed
341
+ }
342
+ }),
343
+ menuItems: vt,
344
+ readOnly: T,
345
+ detail: u ? {
346
+ view: At,
347
+ actions: B,
348
+ scheduledSummary: N.hasScheduledPayment && N.scheduledDateLabel ? d.scheduledSummary(N.scheduledDateLabel) : void 0,
349
+ showApprovalOverrideNotice: ht,
350
+ onEditPaymentInstructions: D && mt ? I.open : void 0,
351
+ paymentInstructionsForm: D && (mt || L && S?.status === "rejected") ? {
352
+ isOpen: I.isOpen,
353
+ values: I.values,
354
+ errors: I.errors,
355
+ isSaving: I.isSaving,
356
+ onOpen: I.open,
357
+ onCancel: I.close,
358
+ onChange: I.onChange,
359
+ onSave: I.save
360
+ } : void 0,
361
+ hideMissingPaymentInstructions: S?.status === "paid" || S?.status === "canceled",
362
+ isLoading: U,
363
+ isError: W,
364
+ paymentHistoryError: N.isError || q.isError,
365
+ paymentHistoryLoading: N.isResolving || q.isLoading
366
+ } : void 0,
367
+ isLineItemsLoading: v.isResolving,
368
+ isSaving: H,
369
+ isSavingDraft: k.isSavingDraft,
370
+ isSubmitting: k.isFinalizing,
371
+ onCancel: Z,
372
+ onCollapse: u ? Xe : void 0,
373
+ onSaveDraft: k.saveDraft,
374
+ onFinalize: k.finalize,
375
+ scrollToErrorToken: k.scrollToErrorToken,
376
+ showSubmit: !T && C,
377
+ testId: r.dialog
378
+ }),
379
+ /* @__PURE__ */ s(he, {
380
+ open: m,
381
+ onSaveDraft: Ft,
382
+ onDiscard: Pt,
383
+ onCancel: () => h(!1),
384
+ isSaving: k.isSavingDraft,
385
+ isSaveDraftDisabled: Q,
386
+ labels: d.unsavedChanges,
387
+ testId: r.unsavedDialog,
388
+ saveDraftTestId: r.unsavedSaveDraft,
389
+ discardTestId: r.unsavedDiscard,
390
+ closeTestId: r.unsavedClose
391
+ }),
392
+ /* @__PURE__ */ s(n, {
393
+ ...gt,
394
+ labels: { cancelButton: d.actions.decisionDialog.cancelButton },
395
+ testId: r.decisionDialog,
396
+ confirmTestId: r.decisionConfirm,
397
+ reasonTestId: r.decisionReason
398
+ }),
399
+ /* @__PURE__ */ s(n, {
400
+ ...V.dialog,
401
+ labels: { cancelButton: d.actions.decisionDialog.cancelButton },
402
+ testId: r.deleteDraftDialog,
403
+ confirmTestId: r.deleteDraftConfirm
404
+ }),
405
+ /* @__PURE__ */ s(n, {
406
+ open: $.removeConfirmation.open,
407
+ copy: $.removeConfirmation.copy,
408
+ onConfirm: $.removeConfirmation.onConfirm,
409
+ onCancel: $.removeConfirmation.onCancel,
410
+ isPending: $.removeConfirmation.isPending,
411
+ confirmIcon: /* @__PURE__ */ s(qe, {}),
412
+ labels: { cancelButton: $.removeConfirmation.cancelButtonLabel },
413
+ testId: r.duplicateRemoveDialog,
414
+ confirmTestId: r.duplicateRemoveConfirm
415
+ }),
416
+ /* @__PURE__ */ s(me, { ...R.dialogProps }),
417
+ u && S ? /* @__PURE__ */ s(xe, {
418
+ ref: dt,
419
+ payable: S,
420
+ onMissingAchInstructions: L ? I.open : void 0,
421
+ poweredByBankName: Ze,
422
+ labels: d.payBill
423
+ }) : null
424
+ ] });
425
+ }
426
+ //#endregion
427
+ export { c as BillCreateDialog, c as default };
@@ -1,38 +1,4 @@
1
- import { BILL_DETAILS_SHEET_LABELS_EN as e } from "../../ui/dist/index61.js";
2
- import "../../ui/dist/index.js";
3
- import { MARK_AS_PAID_FLOW_LABELS_EN as t } from "./index15.js";
4
- import "./index18.js";
5
- import { APPROVAL_POLICY_RULE_COPY_EN as n } from "./index28.js";
6
- import { BILL_DETAIL_ACTIONS_LABELS_EN as r, PAYMENT_HISTORY_LABELS_EN as i, SCHEDULED_SUMMARY_LABEL_EN as a } from "./index42.js";
7
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js
8
- var o = {
9
- subtitle: "Accounts payable",
10
- vendorRow: "Vendor",
11
- bankAccountRow: "ACH bank account",
12
- bankAccountValue: (e) => `Account ending in ${e}`,
13
- ...i,
14
- invoiceNumberRow: "Number",
15
- issueDateRow: "Issue date",
16
- dueDateRow: "Due date",
17
- poNumberRow: "PO number",
18
- notProvided: "Not provided",
19
- glCodeMissing: "GL code not specified",
20
- quantityValue: (e, t) => `${e} x ${t}`,
21
- subtotalRow: "Subtotal",
22
- discountsRow: "Discounts",
23
- taxRow: "Tax",
24
- totalRow: "Total",
25
- actionError: r.actionError,
26
- actionSuccess: r.actionSuccess,
27
- scheduledSummary: a,
28
- paidOnLabel: (e) => `Paid on ${e}`,
29
- rejectedByOn: (e, t) => `Rejected by ${e} on ${t}`,
30
- rejectedOn: (e) => `Rejected on ${e}`,
31
- rejectionMessage: (e) => `"${e}"`,
32
- sheet: e,
33
- decisionDialog: r.decisionDialog,
34
- approvalPolicyCopy: n,
35
- markAsPaid: t
36
- };
37
- //#endregion
38
- export { o as BILL_DETAILS_LABELS_EN };
1
+ import "./index45.js";
2
+ import "./index54.js";
3
+ import "./index56.js";
4
+ import "./index58.js";