@tesouro/embedded-components-react 0.5.27 → 0.5.29

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