@tesouro/embedded-components-react 0.5.280 → 0.5.282
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.css +8 -0
- package/dist/index.d.ts +2 -2
- package/dist/lib/BankAccountOnboardingWidget.d.ts +2 -2
- package/dist/lib/WidgetSuite.d.ts +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index18.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index13.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index14.js +7 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index15.js +8 -160
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index16.js +20 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index17.js +148 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index18.js +21 -96
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index19.js +37 -79
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index20.js +98 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index21.js +83 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +3 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +54 -184
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +108 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +181 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +74 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +27 -412
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +88 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index29.js +413 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index30.js +13 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +77 -226
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +78 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +216 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +44 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +233 -611
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +25 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +647 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +4 -243
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +42 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +250 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +2 -66
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +5 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +67 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index12.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +47 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/invalidatePayableQueries/invalidatePayableQueries.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/invalidatePayableQueries/reconcileCancelledPaymentQueries.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/BillsTab.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/data-access/dist/index4.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +1 -0
- 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/ui/dist/lib/OnboardingShell/OnboardingShell.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/labels.js +2 -2
- package/package.json +1 -1
|
@@ -1,243 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { buildPayableAuditHistory as e, hasUnattributedAuditRows as ee } from "../../../../shared/util/dist/lib/auditHistory/buildPayableAuditHistory.js";
|
|
6
|
-
import { hasAnyScope as t } from "../../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
7
|
-
import { Scope as n } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
8
|
-
import { useAllLedgerAccountsQuery as te } from "../../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
|
|
9
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { useWidgetConfig as ne } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
|
-
import { useOrganizationUserNames as re } from "../../../../shared/feature/dist/lib/user/useOrganizationUserNames.js";
|
|
12
|
-
import { useLocalCalendarDay as ie } from "../../../../shared/feature/dist/lib/calendar/useLocalCalendarDay.js";
|
|
13
|
-
import "../../../../shared/feature/dist/index.js";
|
|
14
|
-
import { mergeDecisionDialogCopy as ae, mergePaymentHistoryMethodLabels as r } from "../../../util/dist/lib/billDetailLabels.js";
|
|
15
|
-
import { formatScheduledDateLabel as i } from "../../../util/dist/lib/formatScheduledDateLabel.js";
|
|
16
|
-
import { hasSuspectedPayableDuplicate as a } from "../../../util/dist/lib/payableDuplicates.js";
|
|
17
|
-
import { mapPayableToBillDetails as o } from "./index18.js";
|
|
18
|
-
import { BillDecisionDialog as s } from "../../../ui/dist/index4.js";
|
|
19
|
-
import "../../../ui/dist/index.js";
|
|
20
|
-
import { BillDetailsSheet as c } from "../../ui/dist/index34.js";
|
|
21
|
-
import { BillDuplicateNotice as l } from "../../ui/dist/index37.js";
|
|
22
|
-
import "../../ui/dist/index.js";
|
|
23
|
-
import { usePayableApprovalRequestsQuery as u } from "../../data-access/dist/index2.js";
|
|
24
|
-
import { usePayableHistoryQuery as d } from "../../data-access/dist/index3.js";
|
|
25
|
-
import { useAllPayableLineItemsQuery as f } from "../../data-access/dist/index4.js";
|
|
26
|
-
import { usePayableQuery as p } from "../../data-access/dist/index21.js";
|
|
27
|
-
import "../../data-access/dist/index.js";
|
|
28
|
-
import { buildPaymentHistory as oe } from "./index2.js";
|
|
29
|
-
import { currentApprovalRound as se } from "./index3.js";
|
|
30
|
-
import { canOverrideApprovalPolicy as ce, canReadCounterpartBankAccounts as le } from "./index7.js";
|
|
31
|
-
import { usePayableApprovalRoundStart as ue } from "./index11.js";
|
|
32
|
-
import { useApprovalPolicyCardView as de } from "./index12.js";
|
|
33
|
-
import { resolveBillRejectionNotice as fe } from "./index13.js";
|
|
34
|
-
import { useCurrentApprovalRequestId as pe } from "./index14.js";
|
|
35
|
-
import { usePayableDetailActions as me } from "./index15.js";
|
|
36
|
-
import { useScheduledPayment as he } from "./index16.js";
|
|
37
|
-
import { usePayableAchInstructions as ge } from "../../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
|
|
38
|
-
import "../../../../shared/counterpart-management/feature/dist/index.js";
|
|
39
|
-
import { BILL_DETAILS_LABELS_EN as m } from "./index37.js";
|
|
40
|
-
import { useMemo as h, useRef as _e, useState as ve } from "react";
|
|
41
|
-
import { Fragment as ye, jsx as g, jsxs as be } from "react/jsx-runtime";
|
|
42
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js
|
|
43
|
-
function _({ open: _, onOpenChange: xe, payableId: v, onClose: y, onExpand: b, onEdit: x, testId: S, labels: C, renderPaymentFlows: w }) {
|
|
44
|
-
let T = h(() => ({
|
|
45
|
-
...m,
|
|
46
|
-
...C,
|
|
47
|
-
sheet: {
|
|
48
|
-
...m.sheet,
|
|
49
|
-
...C?.sheet,
|
|
50
|
-
statusBadge: {
|
|
51
|
-
...m.sheet.statusBadge,
|
|
52
|
-
...C?.sheet?.statusBadge
|
|
53
|
-
},
|
|
54
|
-
approvalPolicy: {
|
|
55
|
-
...m.sheet.approvalPolicy,
|
|
56
|
-
...C?.sheet?.approvalPolicy
|
|
57
|
-
},
|
|
58
|
-
dueDate: {
|
|
59
|
-
...m.sheet.dueDate,
|
|
60
|
-
...C?.sheet?.dueDate
|
|
61
|
-
},
|
|
62
|
-
auditHistory: {
|
|
63
|
-
...m.sheet.auditHistory,
|
|
64
|
-
...C?.sheet?.auditHistory
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
decisionDialog: ae(m.decisionDialog, C?.decisionDialog),
|
|
68
|
-
approvalPolicyCopy: {
|
|
69
|
-
...m.approvalPolicyCopy,
|
|
70
|
-
...C?.approvalPolicyCopy
|
|
71
|
-
},
|
|
72
|
-
history: {
|
|
73
|
-
...m.history,
|
|
74
|
-
...C?.history
|
|
75
|
-
},
|
|
76
|
-
scheduledRelativeDay: {
|
|
77
|
-
...m.scheduledRelativeDay,
|
|
78
|
-
...C?.scheduledRelativeDay
|
|
79
|
-
},
|
|
80
|
-
actionSuccess: {
|
|
81
|
-
...m.actionSuccess,
|
|
82
|
-
...C?.actionSuccess
|
|
83
|
-
},
|
|
84
|
-
paymentHistoryMethodLabels: r(C?.paymentHistoryMethodLabels)
|
|
85
|
-
}), [C]), E = p(v), D = f(v), O = te(), { initResponse: k } = ne(), A = E.data, j = _e(null), [M, Se] = ve(!1), N = pe({
|
|
86
|
-
payableId: v,
|
|
87
|
-
status: A?.status
|
|
88
|
-
}), Ce = A?.status === "rejected", we = t(k?.scopes, [n.ApprovalRequestReadOrg]), P = Ce && we, F = ue({
|
|
89
|
-
payableId: v,
|
|
90
|
-
enabled: P
|
|
91
|
-
}), I = u(v, { enabled: P }), L = t(k?.scopes, [n.UserReadOrg]), { userNames: R, isError: Te, isResolving: Ee } = re({ enabled: L }), z = h(() => se(I.data?.data, F.roundStartedAt), [I.data, F.roundStartedAt]), B = h(() => fe({
|
|
92
|
-
payableStatus: A?.status,
|
|
93
|
-
approvalRequests: z,
|
|
94
|
-
userNames: R,
|
|
95
|
-
payableUpdatedAt: A?.updated_at,
|
|
96
|
-
labels: T
|
|
97
|
-
}), [
|
|
98
|
-
A?.status,
|
|
99
|
-
A?.updated_at,
|
|
100
|
-
z,
|
|
101
|
-
R,
|
|
102
|
-
T
|
|
103
|
-
]), V = de({
|
|
104
|
-
payableId: v,
|
|
105
|
-
approvalPolicyId: A?.approval_policy_id,
|
|
106
|
-
copy: T.approvalPolicyCopy
|
|
107
|
-
}), H = ce({
|
|
108
|
-
status: A?.status,
|
|
109
|
-
scopes: k?.scopes,
|
|
110
|
-
arePendingApproversUnknown: V.isLoading,
|
|
111
|
-
hasApprovalPolicy: !!A?.approval_policy_id,
|
|
112
|
-
hasWaitingRequest: N.hasWaitingRequest
|
|
113
|
-
}), U = !!N.id, W = N.isLoading || V.isLoading, G = h(() => V.pendingApprovers.length ? V.pendingApprovers.flatMap((e) => e.names) : void 0, [V.pendingApprovers]), K = he({
|
|
114
|
-
payableId: v,
|
|
115
|
-
scheduledPaymentDate: A?.scheduled_payment_date
|
|
116
|
-
}), q = le(k?.scopes), J = ge({
|
|
117
|
-
counterpartId: A?.counterpart_id,
|
|
118
|
-
currency: A?.currency,
|
|
119
|
-
currentBankAccountId: A?.counterpart_bank_account_id,
|
|
120
|
-
enabled: q
|
|
121
|
-
}), { actions: De, decisionDialog: Oe } = me({
|
|
122
|
-
payableId: A ? v : void 0,
|
|
123
|
-
status: A?.status,
|
|
124
|
-
currentApprovalRequestId: N.id,
|
|
125
|
-
hasScheduledPayment: K.hasScheduledPayment,
|
|
126
|
-
scheduledPaymentIntentId: K.scheduledPaymentIntentId,
|
|
127
|
-
isScheduledPaymentUnknown: K.isResolving,
|
|
128
|
-
isPayabilityUnknown: J.isLoading,
|
|
129
|
-
hasApprovalPolicy: !!A?.approval_policy_id,
|
|
130
|
-
hasWaitingRequest: N.hasWaitingRequest,
|
|
131
|
-
pendingApprovers: V.pendingApprovers,
|
|
132
|
-
arePendingApproversUnknown: V.isLoading,
|
|
133
|
-
labels: {
|
|
134
|
-
edit: T.sheet.editButton,
|
|
135
|
-
payBill: T.sheet.payButton,
|
|
136
|
-
markAsPaid: T.sheet.markAsPaidButton,
|
|
137
|
-
reject: T.sheet.rejectButton,
|
|
138
|
-
approve: T.sheet.approveButton,
|
|
139
|
-
cancel: T.sheet.cancelButton,
|
|
140
|
-
cancelScheduledPayment: T.sheet.cancelScheduledPaymentButton,
|
|
141
|
-
reopen: T.sheet.reopenButton,
|
|
142
|
-
forceApprove: T.sheet.forceApproveButton,
|
|
143
|
-
forceReject: T.sheet.forceRejectButton,
|
|
144
|
-
policyOverridesHeading: T.sheet.policyOverridesGroup,
|
|
145
|
-
decisionDialog: T.decisionDialog,
|
|
146
|
-
actionError: T.actionError,
|
|
147
|
-
actionSuccess: T.actionSuccess
|
|
148
|
-
},
|
|
149
|
-
isMarkAsPaidPending: M,
|
|
150
|
-
onMarkAsPaidSelect: () => j.current?.openMarkAsPaid(),
|
|
151
|
-
onPayBillSelect: () => j.current?.openPayBill(),
|
|
152
|
-
onEditSelect: x,
|
|
153
|
-
onActionSucceeded: (e) => {
|
|
154
|
-
e === "reopen" && x?.();
|
|
155
|
-
}
|
|
156
|
-
}), Y = ie(), X = h(() => K.hasScheduledPayment && K.scheduledDate ? i(K.scheduledDate, T.scheduledRelativeDay, Y) : void 0, [
|
|
157
|
-
K.hasScheduledPayment,
|
|
158
|
-
K.scheduledDate,
|
|
159
|
-
T.scheduledRelativeDay,
|
|
160
|
-
Y
|
|
161
|
-
]), ke = X ? T.scheduledSummary(X.label) : void 0, Z = a(A) ? /* @__PURE__ */ g(l, { onOpenFullScreen: b }) : void 0, Q = d(v), $ = h(() => e(Q.data?.data ?? [], R, T.history), [
|
|
162
|
-
Q.data,
|
|
163
|
-
R,
|
|
164
|
-
T.history
|
|
165
|
-
]), Ae = L && Te && ee(Q.data?.data ?? [], $, R), je = h(() => oe({
|
|
166
|
-
records: K.paymentRecords,
|
|
167
|
-
events: Q.data?.data ?? [],
|
|
168
|
-
currencyCode: A?.currency,
|
|
169
|
-
labels: T
|
|
170
|
-
}), [
|
|
171
|
-
K.paymentRecords,
|
|
172
|
-
Q.data,
|
|
173
|
-
A?.currency,
|
|
174
|
-
T
|
|
175
|
-
]), Me = h(() => A ? o({
|
|
176
|
-
payable: A,
|
|
177
|
-
lineItems: D.lineItems,
|
|
178
|
-
ledgerAccounts: O.data?.data ?? [],
|
|
179
|
-
labels: T,
|
|
180
|
-
hasScheduledPayment: K.hasScheduledPayment,
|
|
181
|
-
rejection: B,
|
|
182
|
-
achInstructions: J.achInstructions,
|
|
183
|
-
achInstructionsReadable: q && !J.isLoading && !J.isError
|
|
184
|
-
}) : void 0, [
|
|
185
|
-
A,
|
|
186
|
-
D.lineItems,
|
|
187
|
-
O.data,
|
|
188
|
-
T,
|
|
189
|
-
K.hasScheduledPayment,
|
|
190
|
-
B,
|
|
191
|
-
J.achInstructions,
|
|
192
|
-
J.isError,
|
|
193
|
-
J.isLoading,
|
|
194
|
-
q
|
|
195
|
-
]), Ne = E.isLoading || D.isResolving || O.isResolving || J.isLoading, Pe = E.isError || D.isError || O.isError;
|
|
196
|
-
return /* @__PURE__ */ be(ye, { children: [
|
|
197
|
-
/* @__PURE__ */ g(c, {
|
|
198
|
-
open: _,
|
|
199
|
-
onOpenChange: xe,
|
|
200
|
-
details: Me,
|
|
201
|
-
actions: De,
|
|
202
|
-
approvalPolicy: V.view,
|
|
203
|
-
showApprovalOverrideNotice: !W && H && !U,
|
|
204
|
-
awaitingApprovalNotice: !W && !U && !H && A?.status === "approve_in_progress" && A?.approval_policy_id ? G ? T.awaitingApprovalNotice(G) : T.awaitingApprovalUnknownNotice : void 0,
|
|
205
|
-
scheduledSummary: ke,
|
|
206
|
-
scheduledSummaryDate: X?.absoluteLabel,
|
|
207
|
-
auditHistory: $,
|
|
208
|
-
auditHistoryError: Q.isError,
|
|
209
|
-
auditHistoryLoading: Q.isLoading || Ee,
|
|
210
|
-
auditHistoryNamesError: Ae,
|
|
211
|
-
paymentHistory: je,
|
|
212
|
-
paymentHistoryError: K.isError || Q.isError,
|
|
213
|
-
paymentHistoryLoading: K.isResolving || Q.isLoading,
|
|
214
|
-
isLoading: Ne,
|
|
215
|
-
isError: Pe,
|
|
216
|
-
notice: Z,
|
|
217
|
-
onClose: y,
|
|
218
|
-
onExpand: b,
|
|
219
|
-
testId: S,
|
|
220
|
-
labels: T.sheet
|
|
221
|
-
}),
|
|
222
|
-
/* @__PURE__ */ g(s, {
|
|
223
|
-
...Oe,
|
|
224
|
-
labels: { cancelButton: T.decisionDialog.cancelButton },
|
|
225
|
-
testId: S ? `${S}-decision-dialog` : void 0,
|
|
226
|
-
confirmTestId: S ? `${S}-decision-confirm` : void 0,
|
|
227
|
-
reasonTestId: S ? `${S}-decision-reason` : void 0,
|
|
228
|
-
reasonFieldId: S ? `${S}-decision-reason-field` : void 0
|
|
229
|
-
}),
|
|
230
|
-
w?.({
|
|
231
|
-
ref: j,
|
|
232
|
-
payable: A,
|
|
233
|
-
payableId: v,
|
|
234
|
-
isPayBillEnabled: !0,
|
|
235
|
-
hasScheduledPayment: K.hasScheduledPayment,
|
|
236
|
-
onMissingAchInstructions: b,
|
|
237
|
-
onMarkAsPaidPendingChange: Se,
|
|
238
|
-
testId: S
|
|
239
|
-
})
|
|
240
|
-
] });
|
|
241
|
-
}
|
|
242
|
-
//#endregion
|
|
243
|
-
export { _ as BillDetailsContainer, _ as default };
|
|
1
|
+
import "./index25.js";
|
|
2
|
+
import "./index33.js";
|
|
3
|
+
import "./index35.js";
|
|
4
|
+
import "./index37.js";
|
|
@@ -1,3 +1,42 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
1
|
+
import { AWAITING_APPROVAL_LABEL_EN as e, AWAITING_APPROVAL_UNKNOWN_LABEL_EN as t, BILL_DETAIL_ACTIONS_LABELS_EN as n, PAYMENT_HISTORY_LABELS_EN as r, SCHEDULED_RELATIVE_DAY_LABELS_EN as i, SCHEDULED_STATUS_BADGE_LABEL_EN as a, SCHEDULED_SUMMARY_LABEL_EN as o } from "../../../util/dist/lib/billDetailLabels.js";
|
|
2
|
+
import { APPROVAL_POLICY_RULE_COPY_EN as s } from "./index8.js";
|
|
3
|
+
import { PAYABLE_AUDIT_HISTORY_LABELS_EN as c } from "./index23.js";
|
|
4
|
+
import { BILL_DETAILS_SHEET_LABELS_EN as l } from "../../ui/dist/index33.js";
|
|
5
|
+
import "../../ui/dist/index.js";
|
|
6
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js
|
|
7
|
+
var u = {
|
|
8
|
+
subtitle: "Accounts payable",
|
|
9
|
+
vendorRow: "Vendor",
|
|
10
|
+
bankAccountRow: "ACH bank account",
|
|
11
|
+
bankAccountValue: (e) => `Account ending in ${e}`,
|
|
12
|
+
...r,
|
|
13
|
+
invoiceNumberRow: "Number",
|
|
14
|
+
issueDateRow: "Issue date",
|
|
15
|
+
dueDateRow: "Due date",
|
|
16
|
+
poNumberRow: "PO number",
|
|
17
|
+
notProvided: "Not provided",
|
|
18
|
+
glCodeMissing: "GL code not specified",
|
|
19
|
+
quantityValue: (e, t) => `${e} x ${t}`,
|
|
20
|
+
quantityOnlyValue: (e) => e,
|
|
21
|
+
subtotalRow: "Subtotal",
|
|
22
|
+
discountsRow: "Discounts",
|
|
23
|
+
taxRow: "Tax",
|
|
24
|
+
totalRow: "Total",
|
|
25
|
+
actionError: n.actionError,
|
|
26
|
+
actionSuccess: n.actionSuccess,
|
|
27
|
+
scheduledRelativeDay: i,
|
|
28
|
+
scheduledSummary: o,
|
|
29
|
+
scheduledStatusBadge: a,
|
|
30
|
+
awaitingApprovalNotice: e,
|
|
31
|
+
awaitingApprovalUnknownNotice: t,
|
|
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: l,
|
|
37
|
+
history: c,
|
|
38
|
+
decisionDialog: n.decisionDialog,
|
|
39
|
+
approvalPolicyCopy: s
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { u as BILL_DETAILS_LABELS_EN };
|
|
@@ -1,5 +1,252 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { buildPayableAuditHistory as e, hasUnattributedAuditRows as t } from "../../../../shared/util/dist/lib/auditHistory/buildPayableAuditHistory.js";
|
|
6
|
+
import { hasAnyScope as n } from "../../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
7
|
+
import { Scope as r } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
8
|
+
import { useAllLedgerAccountsQuery as ee } from "../../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
|
|
9
|
+
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { useWidgetConfig as i } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
|
+
import { useOrganizationUserNames as a } from "../../../../shared/feature/dist/lib/user/useOrganizationUserNames.js";
|
|
12
|
+
import { useLocalCalendarDay as o } from "../../../../shared/feature/dist/lib/calendar/useLocalCalendarDay.js";
|
|
13
|
+
import "../../../../shared/feature/dist/index.js";
|
|
14
|
+
import { mergeDecisionDialogCopy as s, mergePaymentHistoryMethodLabels as c } from "../../../util/dist/lib/billDetailLabels.js";
|
|
15
|
+
import { formatScheduledDateLabel as l } from "../../../util/dist/lib/formatScheduledDateLabel.js";
|
|
16
|
+
import { hasSuspectedPayableDuplicate as u } from "../../../util/dist/lib/payableDuplicates.js";
|
|
17
|
+
import { mapPayableToBillDetails as d } from "./index20.js";
|
|
18
|
+
import { BillDecisionDialog as f } from "../../../ui/dist/index4.js";
|
|
19
|
+
import "../../../ui/dist/index.js";
|
|
20
|
+
import { BillDetailsSheet as p } from "../../ui/dist/index34.js";
|
|
21
|
+
import { BillDuplicateNotice as m } from "../../ui/dist/index37.js";
|
|
22
|
+
import "../../ui/dist/index.js";
|
|
23
|
+
import { usePayableApprovalRequestsQuery as h } from "../../data-access/dist/index2.js";
|
|
24
|
+
import { usePayableHistoryQuery as te } from "../../data-access/dist/index3.js";
|
|
25
|
+
import { useAllPayableLineItemsQuery as ne } from "../../data-access/dist/index4.js";
|
|
26
|
+
import { usePayableQuery as re } from "../../data-access/dist/index21.js";
|
|
27
|
+
import "../../data-access/dist/index.js";
|
|
28
|
+
import { buildPaymentHistory as ie } from "./index2.js";
|
|
29
|
+
import { currentApprovalRound as ae } from "./index3.js";
|
|
30
|
+
import { canOverrideApprovalPolicy as oe, canReadCounterpartBankAccounts as se } from "./index7.js";
|
|
31
|
+
import { usePayableApprovalRoundStart as ce } from "./index11.js";
|
|
32
|
+
import { useApprovalPolicyCardView as le } from "./index12.js";
|
|
33
|
+
import { resolveApprovalNotices as ue } from "./index13.js";
|
|
34
|
+
import { resolveBillRejectionNotice as de } from "./index15.js";
|
|
35
|
+
import { useCurrentApprovalRequestId as fe } from "./index16.js";
|
|
36
|
+
import { usePayableDetailActions as g } from "./index17.js";
|
|
37
|
+
import { useScheduledPayment as pe } from "./index18.js";
|
|
38
|
+
import { usePayableAchInstructions as me } from "../../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
|
|
39
|
+
import "../../../../shared/counterpart-management/feature/dist/index.js";
|
|
40
|
+
import { BILL_DETAILS_LABELS_EN as _ } from "./index39.js";
|
|
41
|
+
import { useMemo as v, useRef as he, useState as ge } from "react";
|
|
42
|
+
import { Fragment as _e, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
2
43
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js
|
|
3
|
-
|
|
44
|
+
function x({ open: x, onOpenChange: S, payableId: C, onClose: w, onExpand: T, onEdit: E, testId: D, labels: O, renderPaymentFlows: k }) {
|
|
45
|
+
let A = v(() => ({
|
|
46
|
+
..._,
|
|
47
|
+
...O,
|
|
48
|
+
sheet: {
|
|
49
|
+
..._.sheet,
|
|
50
|
+
...O?.sheet,
|
|
51
|
+
statusBadge: {
|
|
52
|
+
..._.sheet.statusBadge,
|
|
53
|
+
...O?.sheet?.statusBadge
|
|
54
|
+
},
|
|
55
|
+
approvalPolicy: {
|
|
56
|
+
..._.sheet.approvalPolicy,
|
|
57
|
+
...O?.sheet?.approvalPolicy
|
|
58
|
+
},
|
|
59
|
+
dueDate: {
|
|
60
|
+
..._.sheet.dueDate,
|
|
61
|
+
...O?.sheet?.dueDate
|
|
62
|
+
},
|
|
63
|
+
auditHistory: {
|
|
64
|
+
..._.sheet.auditHistory,
|
|
65
|
+
...O?.sheet?.auditHistory
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
decisionDialog: s(_.decisionDialog, O?.decisionDialog),
|
|
69
|
+
approvalPolicyCopy: {
|
|
70
|
+
..._.approvalPolicyCopy,
|
|
71
|
+
...O?.approvalPolicyCopy
|
|
72
|
+
},
|
|
73
|
+
history: {
|
|
74
|
+
..._.history,
|
|
75
|
+
...O?.history
|
|
76
|
+
},
|
|
77
|
+
scheduledRelativeDay: {
|
|
78
|
+
..._.scheduledRelativeDay,
|
|
79
|
+
...O?.scheduledRelativeDay
|
|
80
|
+
},
|
|
81
|
+
actionSuccess: {
|
|
82
|
+
..._.actionSuccess,
|
|
83
|
+
...O?.actionSuccess
|
|
84
|
+
},
|
|
85
|
+
paymentHistoryMethodLabels: c(O?.paymentHistoryMethodLabels)
|
|
86
|
+
}), [O]), j = re(C), M = ne(C), N = ee(), { initResponse: P } = i(), F = j.data, I = he(null), [ve, ye] = ge(!1), L = fe({
|
|
87
|
+
payableId: C,
|
|
88
|
+
status: F?.status
|
|
89
|
+
}), be = F?.status === "rejected", xe = n(P?.scopes, [r.ApprovalRequestReadOrg]), R = be && xe, z = ce({
|
|
90
|
+
payableId: C,
|
|
91
|
+
enabled: R
|
|
92
|
+
}), B = h(C, { enabled: R }), V = n(P?.scopes, [r.UserReadOrg]), { userNames: H, isError: Se, isResolving: Ce } = a({ enabled: V }), U = v(() => ae(B.data?.data, z.roundStartedAt), [B.data, z.roundStartedAt]), W = v(() => de({
|
|
93
|
+
payableStatus: F?.status,
|
|
94
|
+
approvalRequests: U,
|
|
95
|
+
userNames: H,
|
|
96
|
+
payableUpdatedAt: F?.updated_at,
|
|
97
|
+
labels: A
|
|
98
|
+
}), [
|
|
99
|
+
F?.status,
|
|
100
|
+
F?.updated_at,
|
|
101
|
+
U,
|
|
102
|
+
H,
|
|
103
|
+
A
|
|
104
|
+
]), G = le({
|
|
105
|
+
payableId: C,
|
|
106
|
+
approvalPolicyId: F?.approval_policy_id,
|
|
107
|
+
copy: A.approvalPolicyCopy
|
|
108
|
+
}), we = oe({
|
|
109
|
+
status: F?.status,
|
|
110
|
+
scopes: P?.scopes,
|
|
111
|
+
arePendingApproversUnknown: G.isLoading,
|
|
112
|
+
hasApprovalPolicy: !!F?.approval_policy_id,
|
|
113
|
+
hasWaitingRequest: L.hasWaitingRequest
|
|
114
|
+
}), K = ue({
|
|
115
|
+
isCapabilityUnknown: L.isLoading || G.isLoading,
|
|
116
|
+
canApproveNow: !!L.id,
|
|
117
|
+
canOverridePolicy: we,
|
|
118
|
+
status: F?.status,
|
|
119
|
+
hasApprovalPolicy: !!F?.approval_policy_id,
|
|
120
|
+
pendingApproverNames: G.pendingApprovers.flatMap((e) => e.names),
|
|
121
|
+
labels: A
|
|
122
|
+
}), q = pe({
|
|
123
|
+
payableId: C,
|
|
124
|
+
scheduledPaymentDate: F?.scheduled_payment_date
|
|
125
|
+
}), J = se(P?.scopes), Y = me({
|
|
126
|
+
counterpartId: F?.counterpart_id,
|
|
127
|
+
currency: F?.currency,
|
|
128
|
+
currentBankAccountId: F?.counterpart_bank_account_id,
|
|
129
|
+
enabled: J
|
|
130
|
+
}), { actions: Te, decisionDialog: Ee } = g({
|
|
131
|
+
payableId: F ? C : void 0,
|
|
132
|
+
status: F?.status,
|
|
133
|
+
currentApprovalRequestId: L.id,
|
|
134
|
+
hasScheduledPayment: q.hasScheduledPayment,
|
|
135
|
+
scheduledPaymentIntentId: q.scheduledPaymentIntentId,
|
|
136
|
+
isScheduledPaymentUnknown: q.isResolving,
|
|
137
|
+
isPayabilityUnknown: Y.isLoading,
|
|
138
|
+
hasApprovalPolicy: !!F?.approval_policy_id,
|
|
139
|
+
hasWaitingRequest: L.hasWaitingRequest,
|
|
140
|
+
pendingApprovers: G.pendingApprovers,
|
|
141
|
+
arePendingApproversUnknown: G.isLoading,
|
|
142
|
+
labels: {
|
|
143
|
+
edit: A.sheet.editButton,
|
|
144
|
+
payBill: A.sheet.payButton,
|
|
145
|
+
markAsPaid: A.sheet.markAsPaidButton,
|
|
146
|
+
reject: A.sheet.rejectButton,
|
|
147
|
+
approve: A.sheet.approveButton,
|
|
148
|
+
cancel: A.sheet.cancelButton,
|
|
149
|
+
cancelScheduledPayment: A.sheet.cancelScheduledPaymentButton,
|
|
150
|
+
reopen: A.sheet.reopenButton,
|
|
151
|
+
forceApprove: A.sheet.forceApproveButton,
|
|
152
|
+
forceReject: A.sheet.forceRejectButton,
|
|
153
|
+
policyOverridesHeading: A.sheet.policyOverridesGroup,
|
|
154
|
+
decisionDialog: A.decisionDialog,
|
|
155
|
+
actionError: A.actionError,
|
|
156
|
+
actionSuccess: A.actionSuccess
|
|
157
|
+
},
|
|
158
|
+
isMarkAsPaidPending: ve,
|
|
159
|
+
onMarkAsPaidSelect: () => I.current?.openMarkAsPaid(),
|
|
160
|
+
onPayBillSelect: () => I.current?.openPayBill(),
|
|
161
|
+
onEditSelect: E,
|
|
162
|
+
onActionSucceeded: (e) => {
|
|
163
|
+
e === "reopen" && E?.();
|
|
164
|
+
}
|
|
165
|
+
}), X = o(), Z = v(() => q.hasScheduledPayment && q.scheduledDate ? l(q.scheduledDate, A.scheduledRelativeDay, X) : void 0, [
|
|
166
|
+
q.hasScheduledPayment,
|
|
167
|
+
q.scheduledDate,
|
|
168
|
+
A.scheduledRelativeDay,
|
|
169
|
+
X
|
|
170
|
+
]), De = Z ? A.scheduledSummary(Z.label) : void 0, Oe = u(F) ? /* @__PURE__ */ y(m, { onOpenFullScreen: T }) : void 0, Q = te(C), $ = v(() => e(Q.data?.data ?? [], H, A.history), [
|
|
171
|
+
Q.data,
|
|
172
|
+
H,
|
|
173
|
+
A.history
|
|
174
|
+
]), ke = V && Se && t(Q.data?.data ?? [], $, H), Ae = v(() => ie({
|
|
175
|
+
records: q.paymentRecords,
|
|
176
|
+
events: Q.data?.data ?? [],
|
|
177
|
+
currencyCode: F?.currency,
|
|
178
|
+
labels: A
|
|
179
|
+
}), [
|
|
180
|
+
q.paymentRecords,
|
|
181
|
+
Q.data,
|
|
182
|
+
F?.currency,
|
|
183
|
+
A
|
|
184
|
+
]), je = v(() => F ? d({
|
|
185
|
+
payable: F,
|
|
186
|
+
lineItems: M.lineItems,
|
|
187
|
+
ledgerAccounts: N.data?.data ?? [],
|
|
188
|
+
labels: A,
|
|
189
|
+
hasScheduledPayment: q.hasScheduledPayment,
|
|
190
|
+
rejection: W,
|
|
191
|
+
achInstructions: Y.achInstructions,
|
|
192
|
+
achInstructionsReadable: J && !Y.isLoading && !Y.isError
|
|
193
|
+
}) : void 0, [
|
|
194
|
+
F,
|
|
195
|
+
M.lineItems,
|
|
196
|
+
N.data,
|
|
197
|
+
A,
|
|
198
|
+
q.hasScheduledPayment,
|
|
199
|
+
W,
|
|
200
|
+
Y.achInstructions,
|
|
201
|
+
Y.isError,
|
|
202
|
+
Y.isLoading,
|
|
203
|
+
J
|
|
204
|
+
]), Me = j.isLoading || M.isResolving || N.isResolving || Y.isLoading, Ne = j.isError || M.isError || N.isError;
|
|
205
|
+
return /* @__PURE__ */ b(_e, { children: [
|
|
206
|
+
/* @__PURE__ */ y(p, {
|
|
207
|
+
open: x,
|
|
208
|
+
onOpenChange: S,
|
|
209
|
+
details: je,
|
|
210
|
+
actions: Te,
|
|
211
|
+
approvalPolicy: G.view,
|
|
212
|
+
showApprovalOverrideNotice: K.showApprovalOverrideNotice,
|
|
213
|
+
awaitingApprovalNotice: K.awaitingApprovalNotice,
|
|
214
|
+
scheduledSummary: De,
|
|
215
|
+
scheduledSummaryDate: Z?.absoluteLabel,
|
|
216
|
+
auditHistory: $,
|
|
217
|
+
auditHistoryError: Q.isError,
|
|
218
|
+
auditHistoryLoading: Q.isLoading || Ce,
|
|
219
|
+
auditHistoryNamesError: ke,
|
|
220
|
+
paymentHistory: Ae,
|
|
221
|
+
paymentHistoryError: q.isError || Q.isError,
|
|
222
|
+
paymentHistoryLoading: q.isResolving || Q.isLoading,
|
|
223
|
+
isLoading: Me,
|
|
224
|
+
isError: Ne,
|
|
225
|
+
notice: Oe,
|
|
226
|
+
onClose: w,
|
|
227
|
+
onExpand: T,
|
|
228
|
+
testId: D,
|
|
229
|
+
labels: A.sheet
|
|
230
|
+
}),
|
|
231
|
+
/* @__PURE__ */ y(f, {
|
|
232
|
+
...Ee,
|
|
233
|
+
labels: { cancelButton: A.decisionDialog.cancelButton },
|
|
234
|
+
testId: D ? `${D}-decision-dialog` : void 0,
|
|
235
|
+
confirmTestId: D ? `${D}-decision-confirm` : void 0,
|
|
236
|
+
reasonTestId: D ? `${D}-decision-reason` : void 0,
|
|
237
|
+
reasonFieldId: D ? `${D}-decision-reason-field` : void 0
|
|
238
|
+
}),
|
|
239
|
+
k?.({
|
|
240
|
+
ref: I,
|
|
241
|
+
payable: F,
|
|
242
|
+
payableId: C,
|
|
243
|
+
isPayBillEnabled: !0,
|
|
244
|
+
hasScheduledPayment: q.hasScheduledPayment,
|
|
245
|
+
onMissingAchInstructions: T,
|
|
246
|
+
onMarkAsPaidPendingChange: ye,
|
|
247
|
+
testId: D
|
|
248
|
+
})
|
|
249
|
+
] });
|
|
250
|
+
}
|
|
4
251
|
//#endregion
|
|
5
|
-
export {
|
|
252
|
+
export { x as BillDetailsContainer, x as default };
|
|
@@ -1,67 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { useAnalyticsTrack as e } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
6
|
-
import { WidgetProvider as t } from "../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
7
|
-
import "../../../../shared/feature/dist/index.js";
|
|
8
|
-
import { BillCreateDialog as n } from "./index35.js";
|
|
9
|
-
import "./index36.js";
|
|
10
|
-
import { BillDetailsContainer as r } from "./index38.js";
|
|
1
|
+
import "./index20.js";
|
|
11
2
|
import "./index39.js";
|
|
12
|
-
import
|
|
13
|
-
import { useEffect as o } from "react";
|
|
14
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
15
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js
|
|
16
|
-
function c() {
|
|
17
|
-
let t = e();
|
|
18
|
-
o(() => {
|
|
19
|
-
t(i.Mounted);
|
|
20
|
-
}, [t]);
|
|
21
|
-
}
|
|
22
|
-
function l(e) {
|
|
23
|
-
return c(), /* @__PURE__ */ s(n, { ...e });
|
|
24
|
-
}
|
|
25
|
-
function u(e) {
|
|
26
|
-
return c(), /* @__PURE__ */ s(r, { ...e });
|
|
27
|
-
}
|
|
28
|
-
function d({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: o, linkComponent: c, implementation: u, uiFramework: d, errorFallback: f, onError: p, analytics: m, disclosuresAcceptance: h, providerLabels: g, ..._ }) {
|
|
29
|
-
return /* @__PURE__ */ s(t, {
|
|
30
|
-
widgetName: a,
|
|
31
|
-
baseUrl: e,
|
|
32
|
-
widgetToken: n,
|
|
33
|
-
organizationId: r,
|
|
34
|
-
configClient: i,
|
|
35
|
-
gatewayRouting: o,
|
|
36
|
-
linkComponent: c,
|
|
37
|
-
implementation: u,
|
|
38
|
-
uiFramework: d,
|
|
39
|
-
errorFallback: f,
|
|
40
|
-
onError: p,
|
|
41
|
-
analytics: m,
|
|
42
|
-
disclosuresAcceptance: h,
|
|
43
|
-
providerLabels: g,
|
|
44
|
-
children: /* @__PURE__ */ s(l, { ..._ })
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
function f({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: o, linkComponent: c, implementation: l, uiFramework: d, errorFallback: f, onError: p, analytics: m, disclosuresAcceptance: h, providerLabels: g, ..._ }) {
|
|
48
|
-
return /* @__PURE__ */ s(t, {
|
|
49
|
-
widgetName: a,
|
|
50
|
-
baseUrl: e,
|
|
51
|
-
widgetToken: n,
|
|
52
|
-
organizationId: r,
|
|
53
|
-
configClient: i,
|
|
54
|
-
gatewayRouting: o,
|
|
55
|
-
linkComponent: c,
|
|
56
|
-
implementation: l,
|
|
57
|
-
uiFramework: d,
|
|
58
|
-
errorFallback: f,
|
|
59
|
-
onError: p,
|
|
60
|
-
analytics: m,
|
|
61
|
-
disclosuresAcceptance: h,
|
|
62
|
-
providerLabels: g,
|
|
63
|
-
children: /* @__PURE__ */ s(u, { ..._ })
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
//#endregion
|
|
67
|
-
export { d as BillCreateWidget, f as BillDetailsWidget };
|
|
3
|
+
import "./index40.js";
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import { BILL_PAY_WIDGET_NAME as e } from "../../../util/dist/lib/widgetName.js";
|
|
2
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js
|
|
3
|
+
var t = `${e}.bill_detail`, n = { Mounted: `${t}.mounted` };
|
|
4
|
+
//#endregion
|
|
5
|
+
export { n as BillDetailWidgetAnalyticsEvent, t as WIDGET_NAME };
|