@tesouro/embedded-components-react 0.5.141 → 0.5.142
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.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +9 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +21 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +21 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +41 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +16 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +8 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +4 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +98 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +78 -135
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +4 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +139 -109
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +44 -186
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +108 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +188 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +71 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +27 -406
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +88 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +403 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +13 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +77 -221
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +78 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +212 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +44 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +234 -557
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +23 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +581 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +4 -251
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +45 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +261 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +3 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +44 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +1 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +6 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +13 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +126 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +3 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +3 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +124 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +8 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +51 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +19 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +28 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +76 -252
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +48 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +249 -142
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +27 -206
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +160 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +217 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +3 -112
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index89.js +7 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index90.js +104 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index91.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index92.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +48 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +12 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +102 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +2 -128
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +31 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +125 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +29 -177
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index107.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index108.js +178 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js +2 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index110.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index111.js +106 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index112.js +2 -52
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index113.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index114.js +52 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index115.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +26 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +14 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +16 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +19 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +26 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +28 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +1 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +27 -117
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +19 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +123 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +2 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +20 -99
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +2 -79
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +97 -273
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +79 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +273 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +2 -56
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +21 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +52 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +2 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +47 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +2 -374
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +35 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +369 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +2 -96
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +23 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +93 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +1 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +31 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +49 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +53 -194
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +13 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +195 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +2 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +37 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +2 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +19 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +78 -308
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +2 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +311 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +33 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +2 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +1 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +37 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +2 -36
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +34 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +37 -199
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +12 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +199 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +2 -402
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +13 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +413 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +8 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +93 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +2 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +118 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +28 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +92 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +2 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +7 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +28 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +2 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +7 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +32 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +1 -105
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/relativeCalendarDay.js +12 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +0 -125
|
@@ -2,576 +2,253 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import "
|
|
10
|
-
import "../../../shared/ui/dist/index.js";
|
|
11
|
-
import { formatCalendarDate as ee } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
12
|
-
import { buildPayableAuditHistory as te, hasUnattributedAuditRows as ne } from "../../../shared/util/dist/lib/auditHistory/buildPayableAuditHistory.js";
|
|
13
|
-
import { useWidgetConfig as re } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
14
|
-
import { useOrganizationUserNames as ie } from "../../../shared/feature/dist/lib/user/useOrganizationUserNames.js";
|
|
15
|
-
import "../../../shared/feature/dist/index.js";
|
|
16
|
-
import { usePayableApprovalRequestsQuery as ae } from "../../data-access/dist/index8.js";
|
|
17
|
-
import { usePayableHistoryQuery as oe } from "../../data-access/dist/index9.js";
|
|
18
|
-
import { useAllPayableLineItemsQuery as se } from "../../data-access/dist/index10.js";
|
|
19
|
-
import { useUpdatePayableMutation as ce } from "../../data-access/dist/index13.js";
|
|
20
|
-
import { usePayableQuery as le } from "../../data-access/dist/index17.js";
|
|
21
|
-
import "../../data-access/dist/index.js";
|
|
22
|
-
import { hasUnpaidBalance as ue } from "./index7.js";
|
|
23
|
-
import { resolveVendor as de } from "./index8.js";
|
|
24
|
-
import { BillCreateScreen as fe } from "../../ui/dist/index57.js";
|
|
25
|
-
import { BillDecisionDialog as i } from "../../ui/dist/index63.js";
|
|
26
|
-
import { DiscardChangesDialog as pe } from "../../ui/dist/index67.js";
|
|
27
|
-
import { BillDuplicateNotice as me } from "../../ui/dist/index72.js";
|
|
28
|
-
import { BillRejectedBanner as he } from "../../ui/dist/index75.js";
|
|
29
|
-
import { ExtractionNotice as ge } from "../../ui/dist/index93.js";
|
|
30
|
-
import { MarkAsPaidDialog as _e } from "../../ui/dist/index102.js";
|
|
31
|
-
import { UnsavedBillDialog as ve } from "../../ui/dist/index112.js";
|
|
32
|
-
import "../../ui/dist/index.js";
|
|
33
|
-
import { usePayableDuplicateReview as ye } from "./index13.js";
|
|
34
|
-
import "./index14.js";
|
|
35
|
-
import { isEditablePayableStatus as be } from "./index19.js";
|
|
36
|
-
import { canOverrideApprovalPolicy as xe, canReadCounterpartBankAccounts as Se } from "./index20.js";
|
|
37
|
-
import { resolveAmountDueMinorUnits as Ce } from "./index21.js";
|
|
38
|
-
import { usePayableAchInstructions as we } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
|
|
39
|
-
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
40
|
-
import { PayBillFlow as Te } from "./index27.js";
|
|
41
|
-
import "./index28.js";
|
|
42
|
-
import { useMarkAsPaidFlow as Ee } from "./index17.js";
|
|
43
|
-
import "./index18.js";
|
|
44
|
-
import { BILL_CREATE_MESSAGE_LABELS_EN as De, mergeBillCreateScreenCopy as Oe } from "./index48.js";
|
|
45
|
-
import { useBillCreateController as ke } from "./index56.js";
|
|
46
|
-
import { useBillForm as Ae } from "./index58.js";
|
|
47
|
-
import { buildPaymentHistory as je } from "./index3.js";
|
|
48
|
-
import { currentApprovalRound as Me } from "./index4.js";
|
|
49
|
-
import { usePayableApprovalRoundStart as Ne } from "./index32.js";
|
|
50
|
-
import { useApprovalPolicyCardView as Pe } from "./index33.js";
|
|
51
|
-
import { resolveBillRejectionNotice as Fe } from "./index34.js";
|
|
52
|
-
import { useCurrentApprovalRequestId as Ie } from "./index35.js";
|
|
53
|
-
import { usePayableDetailActions as Le } from "./index36.js";
|
|
54
|
-
import { useScheduledPayment as Re } from "./index37.js";
|
|
55
|
-
import { useDraftDelete as ze } from "./index38.js";
|
|
56
|
-
import { buildBillDetailView as Be } from "./index43.js";
|
|
57
|
-
import { resolveEditorDismissal as Ve } from "./index44.js";
|
|
58
|
-
import { SourceDocumentContainer as He } from "./index49.js";
|
|
59
|
-
import { useVendorSectionProps as Ue } from "./index52.js";
|
|
60
|
-
import { billCreateTestIds as a } from "./index59.js";
|
|
61
|
-
import { cloneElement as We, isValidElement as Ge, useCallback as o, useEffect as Ke, useMemo as s, useRef as qe, useState as c } from "react";
|
|
62
|
-
import { Fragment as Je, jsx as l, jsxs as Ye } from "react/jsx-runtime";
|
|
63
|
-
import { Trash2Icon as Xe } from "lucide-react";
|
|
5
|
+
import { BILL_CREATE_MESSAGE_LABELS_EN as e } from "./index50.js";
|
|
6
|
+
import { calculateTotal as t, displayLineAmount as n, normalizeMoneyOnBlur as r, parseMoneyToMinorUnits as i, parseQuantity as a } from "./index56.js";
|
|
7
|
+
import { validateBillTotals as o } from "./index57.js";
|
|
8
|
+
import { emptyLineItem as s, mapPayableToBillForm as c } from "./index59.js";
|
|
9
|
+
import { useCallback as l, useEffect as u, useMemo as d, useRef as f, useState as p } from "react";
|
|
64
10
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
11
|
+
var m = /^[0-9.,-]+$/;
|
|
12
|
+
function h(e) {
|
|
13
|
+
let t = e.trim().replace(/^\$\s*/, "");
|
|
14
|
+
return t ? m.test(t) ? t : null : "";
|
|
68
15
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
16
|
+
var g = [
|
|
17
|
+
"quantity",
|
|
18
|
+
"price",
|
|
19
|
+
"amount"
|
|
20
|
+
];
|
|
21
|
+
function _(e) {
|
|
22
|
+
let t = e.trim(), n = /[.,]$/.test(t) ? t.slice(0, -1) : t;
|
|
23
|
+
return t && !n ? null : n;
|
|
24
|
+
}
|
|
25
|
+
function v(e, t, n) {
|
|
26
|
+
if (t === void 0) return;
|
|
27
|
+
let r = _(t);
|
|
28
|
+
if (r !== null) return o(e === "discount" ? r : "", e === "tax" ? r : "", e === "total" ? r : void 0, n)?.[e];
|
|
29
|
+
}
|
|
30
|
+
function y(e, t) {
|
|
31
|
+
let n = {}, r = {
|
|
32
|
+
price: null,
|
|
33
|
+
amount: null
|
|
34
|
+
};
|
|
35
|
+
for (let a of ["price", "amount"]) {
|
|
36
|
+
let o = _(e[a]);
|
|
37
|
+
o !== null && (r[a] = i(o), o && r[a] === null && (n[a] = t.unreadableMoney));
|
|
38
|
+
}
|
|
39
|
+
let o = _(e.quantity);
|
|
40
|
+
if (o !== null) {
|
|
41
|
+
let e = r.price !== null || r.amount !== null;
|
|
42
|
+
a(o) === null && (o || e) && (n.quantity = t.unusableQuantity);
|
|
43
|
+
}
|
|
44
|
+
return n;
|
|
45
|
+
}
|
|
46
|
+
function b(e, t, r) {
|
|
47
|
+
return i(t) === null ? r : n(e, t);
|
|
48
|
+
}
|
|
49
|
+
function x({ payable: n, lineItems: i, labels: a = e } = {}) {
|
|
50
|
+
let o = d(() => c({
|
|
51
|
+
payable: n ?? {},
|
|
52
|
+
lineItems: i ?? []
|
|
53
|
+
}), [n, i]), [m, _] = p(o.values), [x, S] = p(o.lineItems), [C, w] = p(o.discount), [T, E] = p(o.tax), [D, O] = p(o.total || void 0), [ee, k] = p(), A = f(void 0), te = l((e) => {
|
|
54
|
+
k((t) => {
|
|
55
|
+
let n = typeof e == "function" ? e(t) : e;
|
|
56
|
+
return n?.form !== A.current && (A.current = void 0), n;
|
|
57
|
+
});
|
|
58
|
+
}, []), ne = l((e) => {
|
|
59
|
+
A.current = e, k((t) => ({
|
|
60
|
+
...t,
|
|
61
|
+
form: e
|
|
62
|
+
}));
|
|
63
|
+
}, []), j = l(() => {
|
|
64
|
+
k((e) => {
|
|
65
|
+
if (!e?.form || e.form !== A.current) return e;
|
|
66
|
+
A.current = void 0;
|
|
67
|
+
let t = { ...e };
|
|
68
|
+
return delete t.form, Object.keys(t).length ? t : void 0;
|
|
69
|
+
});
|
|
70
|
+
}, []), [re, M] = p(), [N, P] = p(), [F, I] = p(!1), [L, R] = p(!1), [z, B] = p(!1);
|
|
71
|
+
u(() => {
|
|
72
|
+
F || _(o.values);
|
|
73
|
+
}, [o]), u(() => {
|
|
74
|
+
L || S(o.lineItems);
|
|
75
|
+
}, [o]), u(() => {
|
|
76
|
+
z || (w(o.discount), E(o.tax), O(o.total || void 0));
|
|
77
|
+
}, [o]);
|
|
78
|
+
let ie = l((e) => {
|
|
79
|
+
_((t) => ({
|
|
80
|
+
...t,
|
|
81
|
+
...e
|
|
82
|
+
})), I(!0), k((t) => {
|
|
83
|
+
if (!t) return t;
|
|
84
|
+
let n = { ...t };
|
|
85
|
+
for (let t of Object.keys(e)) delete n[t];
|
|
86
|
+
return Object.keys(n).length ? n : void 0;
|
|
87
|
+
}), j();
|
|
88
|
+
}, [j]), V = l((e, t) => {
|
|
89
|
+
M((n) => {
|
|
90
|
+
if (!n?.[e] && !t) return n;
|
|
91
|
+
let r = {
|
|
92
|
+
...n,
|
|
93
|
+
[e]: t
|
|
94
|
+
};
|
|
95
|
+
return t || delete r[e], Object.keys(r).length ? r : void 0;
|
|
96
|
+
});
|
|
97
|
+
}, []), H = l((e, t) => {
|
|
98
|
+
V(e, v(e, t, a));
|
|
99
|
+
}, [a, V]), U = l(() => {
|
|
100
|
+
O(void 0), H("total", void 0), j();
|
|
101
|
+
}, [H, j]), W = l((e, t = []) => {
|
|
102
|
+
let n = y(e, a);
|
|
103
|
+
P((r) => {
|
|
104
|
+
let i = r?.[e.id], a = { ...i };
|
|
105
|
+
for (let e of [
|
|
106
|
+
"price",
|
|
107
|
+
"amount",
|
|
108
|
+
"quantity"
|
|
109
|
+
]) n[e] ? a[e] = n[e] : delete a[e];
|
|
110
|
+
t.includes("description") && delete a.description;
|
|
111
|
+
let o = Object.keys(a).length > 0;
|
|
112
|
+
if (!i && !o) return r;
|
|
113
|
+
let s = { ...r };
|
|
114
|
+
return o ? s[e.id] = a : delete s[e.id], Object.keys(s).length ? s : void 0;
|
|
115
|
+
});
|
|
116
|
+
}, [a]), G = l((e, t, n) => {
|
|
117
|
+
P((r) => ({
|
|
118
|
+
...r,
|
|
119
|
+
[e]: {
|
|
120
|
+
...r?.[e],
|
|
121
|
+
[t]: n
|
|
146
122
|
}
|
|
147
|
-
})
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
}, [
|
|
155
|
-
P,
|
|
156
|
-
m.detail.paymentInstructionsLinkError,
|
|
157
|
-
m.detail.paymentInstructionsSaveError,
|
|
158
|
-
I,
|
|
159
|
-
w?.counterpart_bank_account_id,
|
|
160
|
-
w?.counterpart_id,
|
|
161
|
-
y,
|
|
162
|
-
F,
|
|
163
|
-
N
|
|
164
|
-
]), B = s(() => P ? N.mode === "creating" && Ge(N.newVendorForm) ? {
|
|
165
|
-
...N,
|
|
166
|
-
newVendorForm: We(N.newVendorForm, {
|
|
167
|
-
onSave: z,
|
|
168
|
-
isSaving: L
|
|
169
|
-
})
|
|
170
|
-
} : N.mode === "resolved" && N.paymentInstructions ? {
|
|
171
|
-
...N,
|
|
172
|
-
paymentInstructions: {
|
|
173
|
-
...N.paymentInstructions,
|
|
174
|
-
onSave: z,
|
|
175
|
-
isSaving: L
|
|
176
|
-
}
|
|
177
|
-
} : N : N, [
|
|
178
|
-
P,
|
|
179
|
-
L,
|
|
180
|
-
z,
|
|
181
|
-
N
|
|
182
|
-
]);
|
|
183
|
-
Ke(() => {
|
|
184
|
-
f && N.isEditingPayTo && !P && N.discardPayToEdits();
|
|
123
|
+
}));
|
|
124
|
+
}, []), K = l((e, t, n = []) => {
|
|
125
|
+
let r = x.find((t) => t.id === e);
|
|
126
|
+
if (!r) return;
|
|
127
|
+
let i = t(r);
|
|
128
|
+
S(x.map((t) => t.id === e ? i : t)), W(i, n), R(!0), U();
|
|
185
129
|
}, [
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
clearCounterpart: St,
|
|
198
|
-
prepareVendorForSave: N.prepareVendorForSave,
|
|
199
|
-
onPayableCreated: ft,
|
|
200
|
-
onSaved: ft,
|
|
201
|
-
onDraftSaved: () => u(!1),
|
|
202
|
-
onFinalized: () => u(!1),
|
|
203
|
-
readSavedStatus: E ? Ct : void 0
|
|
204
|
-
}), Et = !!(V.isSavingDraft || V.isFinalizing || N.isVendorSavePending), H = f ? y : void 0, U = Ie({
|
|
205
|
-
payableId: H,
|
|
206
|
-
status: w?.status
|
|
207
|
-
}), Dt = qe(null), Ot = de(w), W = we({
|
|
208
|
-
counterpartId: f ? k : void 0,
|
|
209
|
-
currency: w?.currency,
|
|
210
|
-
currentBankAccountId: f ? w?.counterpart_bank_account_id ?? void 0 : void 0,
|
|
211
|
-
enabled: j && f
|
|
212
|
-
}), kt = Ee({
|
|
213
|
-
payableId: H,
|
|
214
|
-
amountDueMinorUnits: Ce(w) ?? 0,
|
|
215
|
-
amountToPayMinorUnits: w?.amount_to_pay ?? void 0,
|
|
216
|
-
currencyCode: w?.currency ?? void 0,
|
|
217
|
-
dueDate: w?.due_date,
|
|
218
|
-
hasScheduledPayment: A.hasScheduledPayment,
|
|
219
|
-
labels: m.markAsPaid
|
|
220
|
-
}), G = Pe({
|
|
221
|
-
payableId: H,
|
|
222
|
-
approvalPolicyId: w?.approval_policy_id,
|
|
223
|
-
enabled: f,
|
|
224
|
-
copy: m.approvalPolicyCopy
|
|
225
|
-
}), At = xe({
|
|
226
|
-
status: w?.status,
|
|
227
|
-
scopes: S?.scopes,
|
|
228
|
-
arePendingApproversUnknown: G.isLoading,
|
|
229
|
-
hasApprovalPolicy: !!w?.approval_policy_id,
|
|
230
|
-
hasWaitingRequest: U.hasWaitingRequest
|
|
231
|
-
}), jt = !!U.id, Mt = U.isLoading || G.isLoading, Nt = s(() => Ze(G.pendingApprovers.flatMap((e) => e.names)), [G.pendingApprovers]), Pt = f || E ? y : void 0, Ft = f ? tt : void 0, K = o((e) => {
|
|
232
|
-
let t = () => {
|
|
233
|
-
N.discardPayToEdits(), e?.();
|
|
234
|
-
};
|
|
235
|
-
N.hasUnsavedVendorChanges ? v(t) : t();
|
|
236
|
-
}, [v, N]), { actions: It, decisionDialog: Lt, isActionPending: Rt } = Le({
|
|
237
|
-
payableId: Pt,
|
|
238
|
-
status: w?.status,
|
|
239
|
-
currentApprovalRequestId: U.id,
|
|
240
|
-
arePendingApproversUnknown: G.isLoading,
|
|
241
|
-
hasScheduledPayment: A.hasScheduledPayment,
|
|
242
|
-
scheduledPaymentIntentId: A.scheduledPaymentIntentId,
|
|
243
|
-
isScheduledPaymentUnknown: A.isResolving,
|
|
244
|
-
isPayabilityUnknown: W.isLoading,
|
|
245
|
-
hasApprovalPolicy: !!w?.approval_policy_id,
|
|
246
|
-
hasWaitingRequest: U.hasWaitingRequest,
|
|
247
|
-
pendingApprovers: G.pendingApprovers,
|
|
248
|
-
labels: m.actions,
|
|
249
|
-
isMarkAsPaidPending: kt.isPending,
|
|
250
|
-
onMarkAsPaidSelect: kt.open,
|
|
251
|
-
onPayBillSelect: () => K(() => Dt.current?.open()),
|
|
252
|
-
onEditSelect: Ft,
|
|
253
|
-
onActionSucceeded: (e) => {
|
|
254
|
-
if (e === "reopen") {
|
|
255
|
-
Ft?.();
|
|
130
|
+
U,
|
|
131
|
+
x,
|
|
132
|
+
W
|
|
133
|
+
]), q = l((e, t) => {
|
|
134
|
+
let n = { ...t };
|
|
135
|
+
for (let r of g) {
|
|
136
|
+
let i = t[r];
|
|
137
|
+
if (i === void 0) continue;
|
|
138
|
+
let o = h(i);
|
|
139
|
+
if (o === null) {
|
|
140
|
+
G(e, r, a.numbersOnly);
|
|
256
141
|
return;
|
|
257
142
|
}
|
|
258
|
-
|
|
143
|
+
n[r] = o;
|
|
259
144
|
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
disabled: e.disabled,
|
|
271
|
-
icon: e.icon,
|
|
272
|
-
sectionHeading: e.sectionHeading
|
|
273
|
-
})) : []], [
|
|
274
|
-
It.menu,
|
|
275
|
-
zt.menuItems,
|
|
276
|
-
E,
|
|
277
|
-
f,
|
|
278
|
-
Ut,
|
|
279
|
-
Wt
|
|
280
|
-
]), q = s(() => (C.data?.data ?? []).map((e) => ({
|
|
281
|
-
value: e.id,
|
|
282
|
-
label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
|
|
283
|
-
})), [C.data]), J;
|
|
284
|
-
pt && (mt ? C.isError ? J = m.lineItemsGlCodeUnavailable.loadError : !C.isResolving && q.length === 0 && (J = m.lineItemsGlCodeUnavailable.empty) : J = m.lineItemsGlCodeUnavailable.noAccess);
|
|
285
|
-
let Kt = !pt || !!J || C.isResolving, qt = mt && !C.isResolving && !C.isError, Y = oe(H), Jt = w?.status === "rejected" || !f && E, Yt = t(S?.scopes, [n.ApprovalRequestReadOrg]), Xt = Jt && Yt, Zt = t(S?.scopes, [n.UserReadOrg]), { userNames: X, isError: Qt, isResolving: $t } = ie({ enabled: (f || Jt) && Zt }), en = s(() => te(Y.data?.data ?? [], X, m.history), [
|
|
286
|
-
Y.data,
|
|
287
|
-
X,
|
|
288
|
-
m.history
|
|
289
|
-
]), tn = Zt && Qt && ne(Y.data?.data ?? [], en, X), nn = Ne({
|
|
290
|
-
payableId: y,
|
|
291
|
-
enabled: Xt
|
|
292
|
-
}), rn = ae(y, { enabled: Xt }), an = s(() => Me(rn.data?.data, nn.roundStartedAt), [rn.data, nn.roundStartedAt]), Z = s(() => Fe({
|
|
293
|
-
payableStatus: w?.status,
|
|
294
|
-
approvalRequests: an,
|
|
295
|
-
userNames: X,
|
|
296
|
-
payableUpdatedAt: w?.updated_at,
|
|
297
|
-
labels: m.detail
|
|
298
|
-
}), [
|
|
299
|
-
w?.status,
|
|
300
|
-
w?.updated_at,
|
|
301
|
-
an,
|
|
302
|
-
X,
|
|
303
|
-
m.detail
|
|
304
|
-
]), on = s(() => je({
|
|
305
|
-
records: A.paymentRecords,
|
|
306
|
-
events: Y.data?.data ?? [],
|
|
307
|
-
currencyCode: w?.currency,
|
|
308
|
-
labels: m.detail
|
|
309
|
-
}), [
|
|
310
|
-
A.paymentRecords,
|
|
311
|
-
Y.data,
|
|
312
|
-
w?.currency,
|
|
313
|
-
m.detail
|
|
314
|
-
]), sn = s(() => {
|
|
315
|
-
if (!f || !w) return;
|
|
316
|
-
let e = Be({
|
|
317
|
-
payable: w,
|
|
318
|
-
lineItems: x.lineItems,
|
|
319
|
-
glCodeOptions: q,
|
|
320
|
-
glCodeRosterAvailable: qt,
|
|
321
|
-
history: en,
|
|
322
|
-
paymentHistory: on,
|
|
323
|
-
approvalPolicy: G.view,
|
|
324
|
-
labels: m.detail,
|
|
325
|
-
hasScheduledPayment: A.hasScheduledPayment,
|
|
326
|
-
rejection: Z,
|
|
327
|
-
payableAchInstructions: W.achInstructions,
|
|
328
|
-
payableAchInstructionsReadable: j && !W.isError
|
|
329
|
-
});
|
|
330
|
-
return N.mode === "resolved" && N.summary ? {
|
|
331
|
-
...e,
|
|
332
|
-
payTo: N.summary
|
|
333
|
-
} : e;
|
|
145
|
+
K(e, (e) => {
|
|
146
|
+
let t = {
|
|
147
|
+
...e,
|
|
148
|
+
...n
|
|
149
|
+
};
|
|
150
|
+
return "amount" in n ? t : {
|
|
151
|
+
...t,
|
|
152
|
+
amount: b(t.quantity, t.price, t.amount)
|
|
153
|
+
};
|
|
154
|
+
}, Object.keys(n));
|
|
334
155
|
}, [
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
156
|
+
K,
|
|
157
|
+
a,
|
|
158
|
+
G
|
|
159
|
+
]), J = l((e, t) => {
|
|
160
|
+
S((n) => n.map((n) => n.id === e ? {
|
|
161
|
+
...n,
|
|
162
|
+
[t]: r(n[t])
|
|
163
|
+
} : n));
|
|
164
|
+
}, []), Y = l((e, t) => {
|
|
165
|
+
K(e, (e) => {
|
|
166
|
+
let n = Number.parseFloat(e.quantity), r = String(Math.max(1, (Number.isFinite(n) ? n : 0) + t));
|
|
167
|
+
return {
|
|
168
|
+
...e,
|
|
169
|
+
quantity: r,
|
|
170
|
+
amount: b(r, e.price, e.amount)
|
|
171
|
+
};
|
|
172
|
+
});
|
|
173
|
+
}, [K]), X = l((e) => {
|
|
174
|
+
P((t) => {
|
|
175
|
+
if (!t?.[e]) return t;
|
|
176
|
+
let n = { ...t };
|
|
177
|
+
return delete n[e], Object.keys(n).length ? n : void 0;
|
|
178
|
+
});
|
|
179
|
+
}, []), Z = l((e) => {
|
|
180
|
+
X(e), S((t) => t.length <= 1 ? t : t.filter((t) => t.id !== e)), R(!0), U();
|
|
181
|
+
}, [X, U]), ae = l(() => {
|
|
182
|
+
S((e) => [...e, s()]), R(!0), U();
|
|
183
|
+
}, [U]), Q = l((e, t, n) => {
|
|
184
|
+
let r = h(t);
|
|
185
|
+
if (r === null) {
|
|
186
|
+
V(e, a.numbersOnly);
|
|
354
187
|
return;
|
|
355
188
|
}
|
|
356
|
-
|
|
357
|
-
switch (Ve({
|
|
358
|
-
isUnsavedPromptOpen: h,
|
|
359
|
-
isLocked: D,
|
|
360
|
-
isDirty: e
|
|
361
|
-
})) {
|
|
362
|
-
case "dismiss-prompt":
|
|
363
|
-
g(!1);
|
|
364
|
-
return;
|
|
365
|
-
case "prompt":
|
|
366
|
-
g(!0);
|
|
367
|
-
return;
|
|
368
|
-
default: u(!1);
|
|
369
|
-
}
|
|
189
|
+
n(r), B(!0), U(), H(e, r);
|
|
370
190
|
}, [
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
N.hasUnsavedVendorChanges,
|
|
380
|
-
N.isEditingPayTo
|
|
381
|
-
]), fn = o(() => {
|
|
382
|
-
if (N.isEditingPayTo) {
|
|
383
|
-
K(p);
|
|
191
|
+
U,
|
|
192
|
+
a,
|
|
193
|
+
H,
|
|
194
|
+
V
|
|
195
|
+
]), oe = l((e) => Q("discount", e, w), [Q]), se = l((e) => Q("tax", e, E), [Q]), $ = l(() => w((e) => r(e)), []), ce = l(() => E((e) => r(e)), []), le = l((e) => {
|
|
196
|
+
let t = h(e);
|
|
197
|
+
if (t === null) {
|
|
198
|
+
V("total", a.numbersOnly);
|
|
384
199
|
return;
|
|
385
200
|
}
|
|
386
|
-
|
|
201
|
+
O(t), B(!0), H("total", t), j();
|
|
387
202
|
}, [
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
values: O.values,
|
|
438
|
-
errors: O.errors,
|
|
439
|
-
onChange: O.onChange,
|
|
440
|
-
lineItems: {
|
|
441
|
-
items: O.lineItemRows,
|
|
442
|
-
glCodeOptions: q,
|
|
443
|
-
glCodeDisabled: Kt,
|
|
444
|
-
glCodeUnavailableMessage: J,
|
|
445
|
-
discount: O.discount,
|
|
446
|
-
onDiscountChange: O.onDiscountChange,
|
|
447
|
-
onDiscountBlur: O.onDiscountBlur,
|
|
448
|
-
tax: O.tax,
|
|
449
|
-
onTaxChange: O.onTaxChange,
|
|
450
|
-
onTaxBlur: O.onTaxBlur,
|
|
451
|
-
total: O.total,
|
|
452
|
-
onTotalChange: O.onTotalChange,
|
|
453
|
-
onTotalBlur: O.onTotalBlur,
|
|
454
|
-
onAddLineItem: O.onAddLineItem,
|
|
455
|
-
errors: O.lineItemErrors,
|
|
456
|
-
totalsErrors: O.totalsErrors,
|
|
457
|
-
testId: a.lineItems
|
|
458
|
-
},
|
|
459
|
-
documentPanel: /* @__PURE__ */ l(He, {
|
|
460
|
-
payableId: y,
|
|
461
|
-
readOnly: D,
|
|
462
|
-
isDocumentPending: !!y && !w?.file && (b.isLoading || w?.ocr_status === "processing"),
|
|
463
|
-
file: w?.file ? {
|
|
464
|
-
id: w.file.id,
|
|
465
|
-
name: w.file.name,
|
|
466
|
-
url: w.file.url,
|
|
467
|
-
mimetype: w.file.mimetype
|
|
468
|
-
} : void 0,
|
|
469
|
-
staging: {
|
|
470
|
-
stagedFile: V.stagedFile,
|
|
471
|
-
onFileStaged: V.stageFile,
|
|
472
|
-
onClearStagedFile: V.clearStagedFile,
|
|
473
|
-
isSaving: Et
|
|
474
|
-
},
|
|
475
|
-
deletion: {
|
|
476
|
-
isPending: V.isFileDeletionPending,
|
|
477
|
-
onRequest: V.requestFileDeletion,
|
|
478
|
-
onDetachNow: V.detachFileNow,
|
|
479
|
-
isDeleting: V.isDeletingFile,
|
|
480
|
-
hasFailed: V.hasFileDeletionFailed
|
|
481
|
-
}
|
|
482
|
-
}),
|
|
483
|
-
menuItems: Gt,
|
|
484
|
-
readOnly: D,
|
|
485
|
-
detail: f ? {
|
|
486
|
-
view: sn,
|
|
487
|
-
actions: It,
|
|
488
|
-
scheduledSummary: A.hasScheduledPayment && A.scheduledDateLabel ? m.scheduledSummary(A.scheduledDateLabel) : void 0,
|
|
489
|
-
scheduledStatusLabel: A.hasScheduledPayment && A.scheduledDateLabel ? m.scheduledStatusBadge(A.scheduledDateLabel) : void 0,
|
|
490
|
-
showApprovalOverrideNotice: !Mt && At,
|
|
491
|
-
awaitingApprovalNotice: !Mt && !jt && !At && w?.status === "approve_in_progress" && w?.approval_policy_id ? Nt ? m.awaitingApprovalNotice(Nt) : m.awaitingApprovalUnknownNotice : void 0,
|
|
492
|
-
payTo: {
|
|
493
|
-
onEdit: B.mode === "resolved" ? B.onEdit : void 0,
|
|
494
|
-
paymentInstructions: B.paymentInstructions,
|
|
495
|
-
editForm: B.mode === "creating" ? B.newVendorForm : void 0
|
|
496
|
-
},
|
|
497
|
-
hideMissingPaymentInstructions: w?.status === "paid" || w?.status === "canceled",
|
|
498
|
-
isLoading: Ut,
|
|
499
|
-
isError: Wt,
|
|
500
|
-
paymentHistoryError: A.isError || Y.isError,
|
|
501
|
-
paymentHistoryLoading: A.isResolving || Y.isLoading,
|
|
502
|
-
historyError: Y.isError,
|
|
503
|
-
historyLoading: Y.isLoading || $t,
|
|
504
|
-
historyNamesError: tn
|
|
505
|
-
} : void 0,
|
|
506
|
-
isLineItemsLoading: Ht,
|
|
507
|
-
isSaving: Bt || L,
|
|
508
|
-
isSavingDraft: V.isSavingDraft,
|
|
509
|
-
isSubmitting: V.isFinalizing,
|
|
510
|
-
onCancel: dn,
|
|
511
|
-
onCollapse: f ? fn : void 0,
|
|
512
|
-
onSaveDraft: V.saveDraft,
|
|
513
|
-
onFinalize: V.finalize,
|
|
514
|
-
scrollToErrorToken: V.scrollToErrorToken,
|
|
515
|
-
showSubmit: !D && T,
|
|
516
|
-
testId: a.dialog
|
|
517
|
-
}),
|
|
518
|
-
/* @__PURE__ */ l(ve, {
|
|
519
|
-
open: h,
|
|
520
|
-
onSaveDraft: hn,
|
|
521
|
-
onDiscard: pn,
|
|
522
|
-
onCancel: () => g(!1),
|
|
523
|
-
isSaving: V.isSavingDraft,
|
|
524
|
-
isSaveDraftDisabled: mn,
|
|
525
|
-
labels: m.unsavedChanges,
|
|
526
|
-
testId: a.unsavedDialog,
|
|
527
|
-
saveDraftTestId: a.unsavedSaveDraft,
|
|
528
|
-
discardTestId: a.unsavedDiscard,
|
|
529
|
-
closeTestId: a.unsavedClose
|
|
530
|
-
}),
|
|
531
|
-
/* @__PURE__ */ l(pe, {
|
|
532
|
-
open: !!ut,
|
|
533
|
-
onDiscard: () => {
|
|
534
|
-
let e = ut;
|
|
535
|
-
_(void 0), e?.();
|
|
536
|
-
},
|
|
537
|
-
onKeepEditing: () => _(void 0),
|
|
538
|
-
labels: m.discardChanges,
|
|
539
|
-
testId: a.discardDialog,
|
|
540
|
-
discardTestId: a.discardConfirm
|
|
541
|
-
}),
|
|
542
|
-
/* @__PURE__ */ l(i, {
|
|
543
|
-
...Lt,
|
|
544
|
-
labels: { cancelButton: m.actions.decisionDialog.cancelButton },
|
|
545
|
-
testId: a.decisionDialog,
|
|
546
|
-
confirmTestId: a.decisionConfirm,
|
|
547
|
-
reasonTestId: a.decisionReason
|
|
548
|
-
}),
|
|
549
|
-
/* @__PURE__ */ l(i, {
|
|
550
|
-
...zt.dialog,
|
|
551
|
-
labels: { cancelButton: m.actions.decisionDialog.cancelButton },
|
|
552
|
-
testId: a.deleteDraftDialog,
|
|
553
|
-
confirmTestId: a.deleteDraftConfirm
|
|
554
|
-
}),
|
|
555
|
-
/* @__PURE__ */ l(i, {
|
|
556
|
-
open: $.removeConfirmation.open,
|
|
557
|
-
copy: $.removeConfirmation.copy,
|
|
558
|
-
onConfirm: $.removeConfirmation.onConfirm,
|
|
559
|
-
onCancel: $.removeConfirmation.onCancel,
|
|
560
|
-
isPending: $.removeConfirmation.isPending,
|
|
561
|
-
confirmIcon: /* @__PURE__ */ l(Xe, {}),
|
|
562
|
-
labels: { cancelButton: $.removeConfirmation.cancelButtonLabel },
|
|
563
|
-
testId: a.duplicateRemoveDialog,
|
|
564
|
-
confirmTestId: a.duplicateRemoveConfirm
|
|
565
|
-
}),
|
|
566
|
-
/* @__PURE__ */ l(_e, { ...kt.dialogProps }),
|
|
567
|
-
f && w ? /* @__PURE__ */ l(Te, {
|
|
568
|
-
ref: Dt,
|
|
569
|
-
payable: w,
|
|
570
|
-
onMissingAchInstructions: vt ? N.openPaymentInstructions : void 0,
|
|
571
|
-
poweredByBankName: nt,
|
|
572
|
-
labels: m.payBill
|
|
573
|
-
}) : null
|
|
574
|
-
] });
|
|
203
|
+
j,
|
|
204
|
+
a,
|
|
205
|
+
H,
|
|
206
|
+
V
|
|
207
|
+
]), ue = l(() => {
|
|
208
|
+
O((e) => e === void 0 ? e : r(e));
|
|
209
|
+
}, []), de = d(() => x.map((e) => ({
|
|
210
|
+
...e,
|
|
211
|
+
onChange: (t) => q(e.id, t),
|
|
212
|
+
onBlur: (t) => J(e.id, t),
|
|
213
|
+
onQuantityStep: (t) => Y(e.id, t),
|
|
214
|
+
onRemove: () => Z(e.id)
|
|
215
|
+
})), [
|
|
216
|
+
J,
|
|
217
|
+
x,
|
|
218
|
+
q,
|
|
219
|
+
Z,
|
|
220
|
+
Y
|
|
221
|
+
]), fe = d(() => t(x, T, C), [
|
|
222
|
+
x,
|
|
223
|
+
T,
|
|
224
|
+
C
|
|
225
|
+
]);
|
|
226
|
+
return {
|
|
227
|
+
values: m,
|
|
228
|
+
errors: ee,
|
|
229
|
+
setErrors: te,
|
|
230
|
+
setSaveFailureMessage: ne,
|
|
231
|
+
lineItemErrors: N,
|
|
232
|
+
setLineItemErrors: P,
|
|
233
|
+
totalsErrors: re,
|
|
234
|
+
setTotalsErrors: M,
|
|
235
|
+
onChange: ie,
|
|
236
|
+
lineItems: x,
|
|
237
|
+
lineItemRows: de,
|
|
238
|
+
discount: C,
|
|
239
|
+
onDiscountChange: oe,
|
|
240
|
+
onDiscountBlur: $,
|
|
241
|
+
tax: T,
|
|
242
|
+
onTaxChange: se,
|
|
243
|
+
onTaxBlur: ce,
|
|
244
|
+
total: D ?? fe,
|
|
245
|
+
totalOverride: D,
|
|
246
|
+
onTotalChange: le,
|
|
247
|
+
onTotalBlur: ue,
|
|
248
|
+
onAddLineItem: ae,
|
|
249
|
+
isTotalsDirty: z,
|
|
250
|
+
isDirty: F || L || z
|
|
251
|
+
};
|
|
575
252
|
}
|
|
576
253
|
//#endregion
|
|
577
|
-
export {
|
|
254
|
+
export { x as useBillForm };
|