@tesouro/embedded-components-react 0.5.9 → 0.5.12
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/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +4 -78
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +84 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +3 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +30 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +37 -166
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +164 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +48 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +1 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +45 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +13 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +8 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +7 -59
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +64 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +8 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +18 -139
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +144 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +24 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +91 -84
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +92 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +133 -129
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +20 -10
- package/package.json +1 -1
|
@@ -7,81 +7,81 @@ import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
|
7
7
|
import { useAllLedgerAccountsQuery as ee } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
|
|
8
8
|
import { useAllOrganizationUsersQuery as te } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
|
|
9
9
|
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { useWidgetConfig as
|
|
10
|
+
import { useWidgetConfig as ne } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
11
|
import "../../../shared/feature/dist/index.js";
|
|
12
|
-
import { usePayableApprovalRequestsQuery as
|
|
13
|
-
import { usePayableHistoryQuery as
|
|
14
|
-
import { useAllPayableLineItemsQuery as
|
|
15
|
-
import { usePayableQuery as
|
|
12
|
+
import { usePayableApprovalRequestsQuery as re } from "../../data-access/dist/index8.js";
|
|
13
|
+
import { usePayableHistoryQuery as n } from "../../data-access/dist/index9.js";
|
|
14
|
+
import { useAllPayableLineItemsQuery as r } from "../../data-access/dist/index10.js";
|
|
15
|
+
import { usePayableQuery as i } from "../../data-access/dist/index17.js";
|
|
16
16
|
import "../../data-access/dist/index.js";
|
|
17
|
-
import { BillDecisionDialog as
|
|
18
|
-
import { BillDetailsSheet as
|
|
19
|
-
import { BillDuplicateNotice as
|
|
20
|
-
import { MarkAsPaidDialog as
|
|
17
|
+
import { BillDecisionDialog as a } from "../../ui/dist/index56.js";
|
|
18
|
+
import { BillDetailsSheet as o } from "../../ui/dist/index62.js";
|
|
19
|
+
import { BillDuplicateNotice as s } from "../../ui/dist/index66.js";
|
|
20
|
+
import { MarkAsPaidDialog as c } from "../../ui/dist/index96.js";
|
|
21
21
|
import "../../ui/dist/index.js";
|
|
22
|
-
import { usePayableDuplicateReview as
|
|
22
|
+
import { usePayableDuplicateReview as l } from "./index13.js";
|
|
23
23
|
import "./index14.js";
|
|
24
|
-
import { canOverrideApprovalPolicy as
|
|
25
|
-
import { resolveAmountDueMinorUnits as
|
|
26
|
-
import { usePayableAchInstructions as
|
|
24
|
+
import { canOverrideApprovalPolicy as u, canReadCounterpartBankAccounts as d } from "./index20.js";
|
|
25
|
+
import { resolveAmountDueMinorUnits as f } from "./index21.js";
|
|
26
|
+
import { usePayableAchInstructions as p } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
|
|
27
27
|
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
28
|
-
import { PayBillFlow as
|
|
29
|
-
import "./
|
|
30
|
-
import { mapPayableToBillDetails as
|
|
31
|
-
import { mergeMarkAsPaidFlowLabels as
|
|
32
|
-
import { useMarkAsPaidFlow as
|
|
28
|
+
import { PayBillFlow as m } from "./index27.js";
|
|
29
|
+
import "./index28.js";
|
|
30
|
+
import { mapPayableToBillDetails as h } from "./index41.js";
|
|
31
|
+
import { mergeMarkAsPaidFlowLabels as g } from "./index15.js";
|
|
32
|
+
import { useMarkAsPaidFlow as ie } from "./index17.js";
|
|
33
33
|
import "./index18.js";
|
|
34
|
-
import { mergeDecisionDialogCopy as
|
|
35
|
-
import { buildPaymentHistory as
|
|
36
|
-
import { currentApprovalRound as
|
|
37
|
-
import { usePayableApprovalRoundStart as
|
|
38
|
-
import { useApprovalPolicyCardView as
|
|
39
|
-
import { resolveBillRejectionNotice as
|
|
40
|
-
import { useCurrentApprovalRequestId as
|
|
41
|
-
import { usePayableDetailActions as
|
|
42
|
-
import { useScheduledPayment as
|
|
43
|
-
import { BILL_DETAILS_LABELS_EN as
|
|
44
|
-
import { useMemo as
|
|
45
|
-
import { Fragment as
|
|
34
|
+
import { mergeDecisionDialogCopy as ae, mergePaymentHistoryMethodLabels as oe } from "./index45.js";
|
|
35
|
+
import { buildPaymentHistory as se } from "./index3.js";
|
|
36
|
+
import { currentApprovalRound as ce } from "./index4.js";
|
|
37
|
+
import { usePayableApprovalRoundStart as le } from "./index32.js";
|
|
38
|
+
import { useApprovalPolicyCardView as ue } from "./index33.js";
|
|
39
|
+
import { resolveBillRejectionNotice as de } from "./index34.js";
|
|
40
|
+
import { useCurrentApprovalRequestId as fe } from "./index35.js";
|
|
41
|
+
import { usePayableDetailActions as pe } from "./index36.js";
|
|
42
|
+
import { useScheduledPayment as me } from "./index37.js";
|
|
43
|
+
import { BILL_DETAILS_LABELS_EN as _ } from "./index62.js";
|
|
44
|
+
import { useMemo as v, useRef as he } from "react";
|
|
45
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
46
46
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js
|
|
47
|
-
function
|
|
48
|
-
let j =
|
|
49
|
-
...
|
|
47
|
+
function S({ open: S, onOpenChange: C, payableId: w, onClose: T, onExpand: E, onEdit: D, testId: O, labels: k, poweredByBankName: A }) {
|
|
48
|
+
let j = v(() => ({
|
|
49
|
+
..._,
|
|
50
50
|
...k,
|
|
51
51
|
sheet: {
|
|
52
|
-
...
|
|
52
|
+
..._.sheet,
|
|
53
53
|
...k?.sheet,
|
|
54
54
|
statusBadge: {
|
|
55
|
-
...
|
|
55
|
+
..._.sheet.statusBadge,
|
|
56
56
|
...k?.sheet?.statusBadge
|
|
57
57
|
},
|
|
58
58
|
approvalPolicy: {
|
|
59
|
-
...
|
|
59
|
+
..._.sheet.approvalPolicy,
|
|
60
60
|
...k?.sheet?.approvalPolicy
|
|
61
61
|
},
|
|
62
62
|
dueDate: {
|
|
63
|
-
...
|
|
63
|
+
..._.sheet.dueDate,
|
|
64
64
|
...k?.sheet?.dueDate
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
-
decisionDialog:
|
|
67
|
+
decisionDialog: ae(_.decisionDialog, k?.decisionDialog),
|
|
68
68
|
approvalPolicyCopy: {
|
|
69
|
-
...
|
|
69
|
+
..._.approvalPolicyCopy,
|
|
70
70
|
...k?.approvalPolicyCopy
|
|
71
71
|
},
|
|
72
|
-
markAsPaid:
|
|
72
|
+
markAsPaid: g(k?.markAsPaid),
|
|
73
73
|
actionSuccess: {
|
|
74
|
-
...
|
|
74
|
+
..._.actionSuccess,
|
|
75
75
|
...k?.actionSuccess
|
|
76
76
|
},
|
|
77
|
-
paymentHistoryMethodLabels:
|
|
78
|
-
}), [k]), M =
|
|
79
|
-
payableId:
|
|
77
|
+
paymentHistoryMethodLabels: oe(k?.paymentHistoryMethodLabels)
|
|
78
|
+
}), [k]), M = i(w), N = r(w), P = ee(), { initResponse: F } = ne(), I = M.data, L = he(null), R = fe({
|
|
79
|
+
payableId: w,
|
|
80
80
|
status: I?.status
|
|
81
|
-
}), z = I?.status === "rejected",
|
|
82
|
-
payableId:
|
|
81
|
+
}), z = I?.status === "rejected", ge = e(F?.scopes, [t.ApprovalRequestReadOrg]), B = z && ge, V = le({
|
|
82
|
+
payableId: w,
|
|
83
83
|
enabled: B
|
|
84
|
-
}), H =
|
|
84
|
+
}), H = re(w, { enabled: B }), _e = e(F?.scopes, [t.UserReadOrg]), U = te({ enabled: z && _e }), W = v(() => ce(H.data?.data, V.roundStartedAt), [H.data, V.roundStartedAt]), G = v(() => de({
|
|
85
85
|
payableStatus: I?.status,
|
|
86
86
|
approvalRequests: W,
|
|
87
87
|
users: U.data?.data ?? [],
|
|
@@ -93,45 +93,46 @@ function C({ open: C, onOpenChange: w, payableId: T, onClose: E, onExpand: D, te
|
|
|
93
93
|
W,
|
|
94
94
|
U.data,
|
|
95
95
|
j
|
|
96
|
-
]), K =
|
|
97
|
-
payableId:
|
|
96
|
+
]), K = ue({
|
|
97
|
+
payableId: w,
|
|
98
98
|
approvalPolicyId: I?.approval_policy_id,
|
|
99
99
|
copy: j.approvalPolicyCopy
|
|
100
|
-
}),
|
|
100
|
+
}), ve = u({
|
|
101
101
|
status: I?.status,
|
|
102
102
|
scopes: F?.scopes,
|
|
103
103
|
arePendingApproversUnknown: K.isLoading,
|
|
104
104
|
hasApprovalPolicy: !!I?.approval_policy_id,
|
|
105
105
|
hasWaitingRequest: R.hasWaitingRequest
|
|
106
|
-
}), q =
|
|
107
|
-
payableId:
|
|
106
|
+
}), q = me({
|
|
107
|
+
payableId: w,
|
|
108
108
|
scheduledPaymentDate: I?.scheduled_payment_date
|
|
109
|
-
}),
|
|
109
|
+
}), ye = p({
|
|
110
110
|
counterpartId: I?.counterpart_id,
|
|
111
111
|
currency: I?.currency,
|
|
112
|
-
enabled:
|
|
113
|
-
}), J =
|
|
114
|
-
payableId:
|
|
115
|
-
amountDueMinorUnits:
|
|
112
|
+
enabled: d(F?.scopes)
|
|
113
|
+
}), J = ie({
|
|
114
|
+
payableId: w,
|
|
115
|
+
amountDueMinorUnits: f(I) ?? 0,
|
|
116
116
|
amountToPayMinorUnits: I?.amount_to_pay ?? void 0,
|
|
117
117
|
currencyCode: I?.currency ?? void 0,
|
|
118
118
|
dueDate: I?.due_date,
|
|
119
119
|
hasScheduledPayment: q.hasScheduledPayment,
|
|
120
120
|
testId: O,
|
|
121
121
|
labels: j.markAsPaid
|
|
122
|
-
}), { actions:
|
|
123
|
-
payableId: I ?
|
|
122
|
+
}), { actions: be, decisionDialog: xe } = pe({
|
|
123
|
+
payableId: I ? w : void 0,
|
|
124
124
|
status: I?.status,
|
|
125
125
|
currentApprovalRequestId: R.id,
|
|
126
126
|
hasScheduledPayment: q.hasScheduledPayment,
|
|
127
127
|
scheduledPaymentIntentId: q.scheduledPaymentIntentId,
|
|
128
128
|
isScheduledPaymentUnknown: q.isResolving,
|
|
129
|
-
isPayabilityUnknown:
|
|
129
|
+
isPayabilityUnknown: ye.isLoading,
|
|
130
130
|
hasApprovalPolicy: !!I?.approval_policy_id,
|
|
131
131
|
hasWaitingRequest: R.hasWaitingRequest,
|
|
132
132
|
pendingApprovers: K.pendingApprovers,
|
|
133
133
|
arePendingApproversUnknown: K.isLoading,
|
|
134
134
|
labels: {
|
|
135
|
+
edit: j.sheet.editButton,
|
|
135
136
|
payBill: j.sheet.payButton,
|
|
136
137
|
markAsPaid: j.sheet.markAsPaidButton,
|
|
137
138
|
reject: j.sheet.rejectButton,
|
|
@@ -148,27 +149,31 @@ function C({ open: C, onOpenChange: w, payableId: T, onClose: E, onExpand: D, te
|
|
|
148
149
|
},
|
|
149
150
|
isMarkAsPaidPending: J.isPending,
|
|
150
151
|
onMarkAsPaidSelect: J.open,
|
|
151
|
-
onPayBillSelect: () => L.current?.open()
|
|
152
|
-
|
|
152
|
+
onPayBillSelect: () => L.current?.open(),
|
|
153
|
+
onEditSelect: D,
|
|
154
|
+
onActionSucceeded: (e) => {
|
|
155
|
+
e === "reopen" && D?.();
|
|
156
|
+
}
|
|
157
|
+
}), Y = q.hasScheduledPayment && q.scheduledDateLabel ? /* @__PURE__ */ b("p", {
|
|
153
158
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
154
159
|
children: j.scheduledSummary(q.scheduledDateLabel)
|
|
155
|
-
}) : void 0, X =
|
|
160
|
+
}) : void 0, X = l({
|
|
156
161
|
payable: I,
|
|
157
162
|
canManage: e(F?.scopes, [t.PayableWriteOrg])
|
|
158
|
-
}), Z = X.isPossibleDuplicate ? /* @__PURE__ */
|
|
163
|
+
}), Z = X.isPossibleDuplicate ? /* @__PURE__ */ b(s, {
|
|
159
164
|
onNotADuplicate: X.onNotADuplicate,
|
|
160
165
|
isActionDisabled: X.isBusy
|
|
161
|
-
}) : void 0,
|
|
166
|
+
}) : void 0, Q = Z || Y ? /* @__PURE__ */ x(y, { children: [Z, Y] }) : void 0, $ = n(w), Se = v(() => se({
|
|
162
167
|
records: q.paymentRecords,
|
|
163
|
-
events:
|
|
168
|
+
events: $.data?.data ?? [],
|
|
164
169
|
currencyCode: I?.currency,
|
|
165
170
|
labels: j
|
|
166
171
|
}), [
|
|
167
172
|
q.paymentRecords,
|
|
168
|
-
|
|
173
|
+
$.data,
|
|
169
174
|
I?.currency,
|
|
170
175
|
j
|
|
171
|
-
]), Ce =
|
|
176
|
+
]), Ce = v(() => I ? h({
|
|
172
177
|
payable: I,
|
|
173
178
|
lineItems: N.lineItems,
|
|
174
179
|
ledgerAccounts: P.data?.data ?? [],
|
|
@@ -182,42 +187,42 @@ function C({ open: C, onOpenChange: w, payableId: T, onClose: E, onExpand: D, te
|
|
|
182
187
|
j,
|
|
183
188
|
q.hasScheduledPayment,
|
|
184
189
|
G
|
|
185
|
-
]), we = M.isLoading || N.isResolving || P.isResolving,
|
|
186
|
-
return /* @__PURE__ */
|
|
187
|
-
/* @__PURE__ */
|
|
188
|
-
open:
|
|
189
|
-
onOpenChange:
|
|
190
|
+
]), we = M.isLoading || N.isResolving || P.isResolving, Te = M.isError || N.isError || P.isError;
|
|
191
|
+
return /* @__PURE__ */ x(y, { children: [
|
|
192
|
+
/* @__PURE__ */ b(o, {
|
|
193
|
+
open: S,
|
|
194
|
+
onOpenChange: C,
|
|
190
195
|
details: Ce,
|
|
191
|
-
actions:
|
|
196
|
+
actions: be,
|
|
192
197
|
approvalPolicy: K.view,
|
|
193
|
-
showApprovalOverrideNotice:
|
|
198
|
+
showApprovalOverrideNotice: ve && !!I?.approval_policy_id,
|
|
194
199
|
paymentHistory: Se,
|
|
195
|
-
paymentHistoryError: q.isError ||
|
|
196
|
-
paymentHistoryLoading: q.isResolving ||
|
|
200
|
+
paymentHistoryError: q.isError || $.isError,
|
|
201
|
+
paymentHistoryLoading: q.isResolving || $.isLoading,
|
|
197
202
|
isLoading: we,
|
|
198
|
-
isError:
|
|
199
|
-
notice:
|
|
200
|
-
onClose:
|
|
201
|
-
onExpand:
|
|
203
|
+
isError: Te,
|
|
204
|
+
notice: Q,
|
|
205
|
+
onClose: T,
|
|
206
|
+
onExpand: E,
|
|
202
207
|
testId: O,
|
|
203
208
|
labels: j.sheet
|
|
204
209
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
-
...
|
|
210
|
+
/* @__PURE__ */ b(a, {
|
|
211
|
+
...xe,
|
|
207
212
|
labels: { cancelButton: j.decisionDialog.cancelButton },
|
|
208
213
|
testId: O ? `${O}-decision-dialog` : void 0,
|
|
209
214
|
confirmTestId: O ? `${O}-decision-confirm` : void 0,
|
|
210
215
|
reasonTestId: O ? `${O}-decision-reason` : void 0,
|
|
211
216
|
reasonFieldId: O ? `${O}-decision-reason-field` : void 0
|
|
212
217
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
I ? /* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ b(c, { ...J.dialogProps }),
|
|
219
|
+
I ? /* @__PURE__ */ b(m, {
|
|
215
220
|
ref: L,
|
|
216
221
|
payable: I,
|
|
217
|
-
onMissingAchInstructions:
|
|
222
|
+
onMissingAchInstructions: E,
|
|
218
223
|
poweredByBankName: A
|
|
219
224
|
}) : null
|
|
220
225
|
] });
|
|
221
226
|
}
|
|
222
227
|
//#endregion
|
|
223
|
-
export {
|
|
228
|
+
export { S as BillDetailsContainer, S as default };
|
|
@@ -9,7 +9,7 @@ import { usePayablesQuery as r, usePayablesTotalCountQuery as i } from "../../da
|
|
|
9
9
|
import "../../data-access/dist/index.js";
|
|
10
10
|
import { derivePayableStatus as a } from "./index7.js";
|
|
11
11
|
import { resolveVendorName as o } from "./index8.js";
|
|
12
|
-
import { isEditablePayableStatus as s } from "./
|
|
12
|
+
import { isEditablePayableStatus as s } from "./index19.js";
|
|
13
13
|
import { BillQueue as c, DEFAULT_BILL_QUEUE as l, billQueueColumns as u, billQueueHasScheduledPayment as d, billQueueOffersAddPanel as f, billQueueStatuses as p, billSortColumnId as m, billSortField as h } from "./index72.js";
|
|
14
14
|
import { useBillsFilters as g } from "./index80.js";
|
|
15
15
|
import { useCallback as _, useEffect as v, useMemo as y, useState as b } from "react";
|
|
@@ -17,194 +17,198 @@ import { DuplicateBillsContainer as te } from "./index12.js";
|
|
|
17
17
|
import "./index14.js";
|
|
18
18
|
import { BillCreateDialog as s } from "./index60.js";
|
|
19
19
|
import "./index61.js";
|
|
20
|
-
import { BillDetailsContainer as
|
|
20
|
+
import { BillDetailsContainer as ne } from "./index63.js";
|
|
21
21
|
import "./index64.js";
|
|
22
22
|
import "./index70.js";
|
|
23
23
|
import "./index71.js";
|
|
24
|
-
import { BILL_QUEUE_ORDER as
|
|
25
|
-
import { BILLS_TAB_LABELS_EN as
|
|
26
|
-
import { useBillsTable as
|
|
27
|
-
import { copyTextToClipboard as
|
|
28
|
-
import { resolveDuplicateWarning as
|
|
29
|
-
import { billsTabTestIds as
|
|
30
|
-
import { useCallback as
|
|
31
|
-
import { jsx as
|
|
32
|
-
import { CalendarClockIcon as
|
|
24
|
+
import { BILL_QUEUE_ORDER as c, BillQueue as l } from "./index72.js";
|
|
25
|
+
import { BILLS_TAB_LABELS_EN as u } from "./index75.js";
|
|
26
|
+
import { useBillsTable as d } from "./index81.js";
|
|
27
|
+
import { copyTextToClipboard as f } from "./index73.js";
|
|
28
|
+
import { resolveDuplicateWarning as p } from "./index74.js";
|
|
29
|
+
import { billsTabTestIds as m, billsTableCellTestIds as re } from "./index76.js";
|
|
30
|
+
import { useCallback as ie, useEffect as ae, useMemo as h, useState as g } from "react";
|
|
31
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
32
|
+
import { CalendarClockIcon as y, CheckIcon as b, FilePenIcon as x, ListIcon as S, LoaderCircleIcon as C } from "lucide-react";
|
|
33
33
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js
|
|
34
|
-
var
|
|
35
|
-
[
|
|
34
|
+
var w = "bills@business-banking.app", T = {
|
|
35
|
+
[l.Drafts]: /* @__PURE__ */ _(x, {
|
|
36
36
|
className: "ttw:size-4",
|
|
37
37
|
"aria-hidden": !0
|
|
38
38
|
}),
|
|
39
|
-
[
|
|
39
|
+
[l.Pending]: /* @__PURE__ */ _(C, {
|
|
40
40
|
className: "ttw:size-4",
|
|
41
41
|
"aria-hidden": !0
|
|
42
42
|
}),
|
|
43
|
-
[
|
|
43
|
+
[l.Scheduled]: /* @__PURE__ */ _(y, {
|
|
44
44
|
className: "ttw:size-4",
|
|
45
45
|
"aria-hidden": !0
|
|
46
46
|
}),
|
|
47
|
-
[
|
|
47
|
+
[l.Paid]: /* @__PURE__ */ _(b, {
|
|
48
48
|
className: "ttw:size-4",
|
|
49
49
|
"aria-hidden": !0
|
|
50
50
|
}),
|
|
51
|
-
[
|
|
51
|
+
[l.All]: /* @__PURE__ */ _(S, {
|
|
52
52
|
className: "ttw:size-4",
|
|
53
53
|
"aria-hidden": !0
|
|
54
54
|
})
|
|
55
55
|
};
|
|
56
|
-
function
|
|
57
|
-
let
|
|
58
|
-
...d,
|
|
56
|
+
function E({ labels: l, onEnqueueFiles: y, openPayableId: b, onOpenPayableHandled: x, poweredByBankName: S }) {
|
|
57
|
+
let C = h(() => ({
|
|
59
58
|
...u,
|
|
59
|
+
...l,
|
|
60
60
|
queues: {
|
|
61
|
-
...
|
|
62
|
-
...
|
|
61
|
+
...u.queues,
|
|
62
|
+
...l?.queues
|
|
63
63
|
},
|
|
64
64
|
filters: {
|
|
65
|
-
...
|
|
66
|
-
...
|
|
65
|
+
...u.filters,
|
|
66
|
+
...l?.filters,
|
|
67
67
|
presets: {
|
|
68
|
-
...
|
|
69
|
-
...
|
|
68
|
+
...u.filters.presets,
|
|
69
|
+
...l?.filters?.presets
|
|
70
70
|
},
|
|
71
71
|
statuses: {
|
|
72
|
-
...
|
|
73
|
-
...
|
|
72
|
+
...u.filters.statuses,
|
|
73
|
+
...l?.filters?.statuses
|
|
74
74
|
},
|
|
75
75
|
dateFieldNames: {
|
|
76
|
-
...
|
|
77
|
-
...
|
|
76
|
+
...u.filters.dateFieldNames,
|
|
77
|
+
...l?.filters?.dateFieldNames
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
filterBar: {
|
|
81
|
-
...
|
|
82
|
-
...
|
|
81
|
+
...u.filterBar,
|
|
82
|
+
...l?.filterBar
|
|
83
83
|
},
|
|
84
|
-
queueEmptyStates:
|
|
84
|
+
queueEmptyStates: c.reduce((e, t) => ({
|
|
85
85
|
...e,
|
|
86
86
|
[t]: {
|
|
87
|
-
...
|
|
88
|
-
...
|
|
87
|
+
...u.queueEmptyStates[t],
|
|
88
|
+
...l?.queueEmptyStates?.[t]
|
|
89
89
|
}
|
|
90
90
|
}), {})
|
|
91
|
-
}), [
|
|
92
|
-
if (t &&
|
|
93
|
-
|
|
91
|
+
}), [l]), [E, D] = g(!1), [oe, O] = g(), [k, A] = g(!1), [j, M] = g(), [N, P] = g(!1), [F, I] = g(!1), [L, R] = g(!1), { initResponse: z } = ee(), B = r(), V = t(z?.scopes, [n.PayableReadOrg]), H = t(z?.scopes, [n.PayableWriteOrg]), U = !z || V, W = !z || H, G = ie((e, t) => {
|
|
92
|
+
if (t && W) {
|
|
93
|
+
O(e), A(!0);
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
}, [
|
|
98
|
-
enabled:
|
|
99
|
-
canReadVendors:
|
|
100
|
-
isVendorFilterPaused:
|
|
101
|
-
filterLabels:
|
|
102
|
-
onOpenBill:
|
|
103
|
-
duplicateRowNote:
|
|
104
|
-
attachmentLabel:
|
|
105
|
-
}),
|
|
96
|
+
M(e), P(!0);
|
|
97
|
+
}, [W]), K = t(z?.scopes, [n.CounterpartReadOrg]), q = d({
|
|
98
|
+
enabled: U,
|
|
99
|
+
canReadVendors: K,
|
|
100
|
+
isVendorFilterPaused: B,
|
|
101
|
+
filterLabels: C.filters,
|
|
102
|
+
onOpenBill: G,
|
|
103
|
+
duplicateRowNote: C.duplicateRowNote,
|
|
104
|
+
attachmentLabel: C.attachmentIndicator
|
|
105
|
+
}), J = i({ enabled: U }), se = p(J, C), ce = h(() => c.map((e) => ({
|
|
106
106
|
id: e,
|
|
107
|
-
label:
|
|
108
|
-
icon:
|
|
109
|
-
})), [
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
|
|
107
|
+
label: C.queues[e],
|
|
108
|
+
icon: T[e]
|
|
109
|
+
})), [C.queues]), le = (e) => {
|
|
110
|
+
R(!1), M(e), P(!0);
|
|
111
|
+
}, ue = () => {
|
|
112
|
+
P(!1), I(!0);
|
|
113
|
+
}, Y = () => {
|
|
114
|
+
I(!1), P(!0);
|
|
113
115
|
}, X = () => {
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
createButton:
|
|
117
|
-
addBill: { heading:
|
|
118
|
-
}), [
|
|
119
|
-
...
|
|
120
|
-
labels:
|
|
121
|
-
}), [
|
|
122
|
-
|
|
116
|
+
P(!1), I(!1), O(j), A(!0);
|
|
117
|
+
}, de = h(() => ({
|
|
118
|
+
createButton: C.createButton,
|
|
119
|
+
addBill: { heading: C.nonEmptyHeading }
|
|
120
|
+
}), [C.createButton, C.nonEmptyHeading]), fe = h(() => ({
|
|
121
|
+
...q.filterBarProps,
|
|
122
|
+
labels: C.filterBar
|
|
123
|
+
}), [q.filterBarProps, C.filterBar]), Z = () => {
|
|
124
|
+
D(!1), O(void 0), A(!0);
|
|
123
125
|
}, Q = (e) => {
|
|
124
|
-
|
|
126
|
+
D(!1), y?.(e);
|
|
125
127
|
}, $ = async () => {
|
|
126
|
-
await
|
|
128
|
+
await f(w) ? e.success(C.emailCopiedToast) : e.error(C.emailCopyFailedToast);
|
|
127
129
|
};
|
|
128
|
-
return
|
|
129
|
-
|
|
130
|
-
}, [
|
|
131
|
-
"data-testid":
|
|
130
|
+
return ae(() => {
|
|
131
|
+
b && (O(b), A(!0), x?.());
|
|
132
|
+
}, [x, b]), /* @__PURE__ */ v("div", {
|
|
133
|
+
"data-testid": m.root,
|
|
132
134
|
children: [
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
rows:
|
|
135
|
-
isLoading:
|
|
136
|
-
isError:
|
|
137
|
-
onRetry:
|
|
138
|
-
sorting:
|
|
139
|
-
onSortingChange:
|
|
140
|
-
pageSize:
|
|
141
|
-
onPageSizeChange:
|
|
142
|
-
hasNextPage:
|
|
143
|
-
hasPrevPage:
|
|
144
|
-
onNextPage:
|
|
145
|
-
onPrevPage:
|
|
146
|
-
filterTabs:
|
|
147
|
-
selectedFilterTabId:
|
|
148
|
-
onFilterTabChange:
|
|
149
|
-
searchValue:
|
|
150
|
-
onSearchChange:
|
|
151
|
-
filters:
|
|
152
|
-
visibleColumns:
|
|
153
|
-
cellTestIds:
|
|
154
|
-
isSearchActive:
|
|
155
|
-
showAddPanelWhenEmpty:
|
|
156
|
-
emptyState:
|
|
157
|
-
onCreateClick:
|
|
158
|
-
onEnterManually:
|
|
159
|
-
onFilesSelected:
|
|
135
|
+
/* @__PURE__ */ _(o, {
|
|
136
|
+
rows: q.rows,
|
|
137
|
+
isLoading: q.isLoading || !z,
|
|
138
|
+
isError: q.isError,
|
|
139
|
+
onRetry: q.onRetry,
|
|
140
|
+
sorting: q.sorting,
|
|
141
|
+
onSortingChange: q.onSortingChange,
|
|
142
|
+
pageSize: q.pageSize,
|
|
143
|
+
onPageSizeChange: q.onPageSizeChange,
|
|
144
|
+
hasNextPage: q.hasNextPage,
|
|
145
|
+
hasPrevPage: q.hasPrevPage,
|
|
146
|
+
onNextPage: q.onNextPage,
|
|
147
|
+
onPrevPage: q.onPrevPage,
|
|
148
|
+
filterTabs: ce,
|
|
149
|
+
selectedFilterTabId: q.selectedFilterTabId,
|
|
150
|
+
onFilterTabChange: q.onFilterTabChange,
|
|
151
|
+
searchValue: q.searchValue,
|
|
152
|
+
onSearchChange: q.onSearchChange,
|
|
153
|
+
filters: fe,
|
|
154
|
+
visibleColumns: q.visibleColumns,
|
|
155
|
+
cellTestIds: re,
|
|
156
|
+
isSearchActive: q.isSearchActive,
|
|
157
|
+
showAddPanelWhenEmpty: q.showAddPanelWhenEmpty,
|
|
158
|
+
emptyState: C.queueEmptyStates[q.selectedFilterTabId],
|
|
159
|
+
onCreateClick: W ? () => D(!0) : void 0,
|
|
160
|
+
onEnterManually: W ? Z : void 0,
|
|
161
|
+
onFilesSelected: W ? Q : void 0,
|
|
160
162
|
maxFiles: 10,
|
|
161
|
-
emailAddress:
|
|
163
|
+
emailAddress: w,
|
|
162
164
|
onCopyEmail: $,
|
|
163
|
-
duplicateWarning:
|
|
164
|
-
onReviewDuplicates:
|
|
165
|
-
labels:
|
|
165
|
+
duplicateWarning: se,
|
|
166
|
+
onReviewDuplicates: J.isError ? void 0 : () => R(!0),
|
|
167
|
+
labels: de
|
|
166
168
|
}),
|
|
167
|
-
|
|
168
|
-
open:
|
|
169
|
-
onOpenChange:
|
|
170
|
-
enabled:
|
|
171
|
-
canManageDuplicates:
|
|
172
|
-
onOpenBill:
|
|
169
|
+
L ? /* @__PURE__ */ _(te, {
|
|
170
|
+
open: L,
|
|
171
|
+
onOpenChange: R,
|
|
172
|
+
enabled: U,
|
|
173
|
+
canManageDuplicates: W,
|
|
174
|
+
onOpenBill: le
|
|
173
175
|
}) : null,
|
|
174
|
-
|
|
175
|
-
open:
|
|
176
|
-
onOpenChange:
|
|
176
|
+
W ? /* @__PURE__ */ _(a, {
|
|
177
|
+
open: E,
|
|
178
|
+
onOpenChange: D,
|
|
177
179
|
onFilesSelected: Q,
|
|
178
180
|
maxFiles: 10,
|
|
179
181
|
onEnterManually: Z,
|
|
180
|
-
emailAddress:
|
|
182
|
+
emailAddress: w,
|
|
181
183
|
onCopyEmail: $,
|
|
182
|
-
labels: { heading:
|
|
184
|
+
labels: { heading: q.hasAnyBills ? C.nonEmptyHeading : C.emptyHeading }
|
|
183
185
|
}) : null,
|
|
184
|
-
|
|
185
|
-
open:
|
|
186
|
-
onOpenChange:
|
|
187
|
-
payableId:
|
|
186
|
+
k ? /* @__PURE__ */ _(s, {
|
|
187
|
+
open: k,
|
|
188
|
+
onOpenChange: A,
|
|
189
|
+
payableId: oe
|
|
188
190
|
}) : null,
|
|
189
|
-
|
|
190
|
-
open:
|
|
191
|
-
onOpenChange:
|
|
192
|
-
payableId:
|
|
193
|
-
onClose: () =>
|
|
194
|
-
onExpand:
|
|
195
|
-
|
|
196
|
-
|
|
191
|
+
N ? /* @__PURE__ */ _(ne, {
|
|
192
|
+
open: N,
|
|
193
|
+
onOpenChange: P,
|
|
194
|
+
payableId: j,
|
|
195
|
+
onClose: () => P(!1),
|
|
196
|
+
onExpand: ue,
|
|
197
|
+
onEdit: X,
|
|
198
|
+
testId: m.detailsSheet,
|
|
199
|
+
poweredByBankName: S
|
|
197
200
|
}) : null,
|
|
198
|
-
|
|
199
|
-
open:
|
|
200
|
-
onOpenChange:
|
|
201
|
-
payableId:
|
|
201
|
+
F ? /* @__PURE__ */ _(s, {
|
|
202
|
+
open: F,
|
|
203
|
+
onOpenChange: I,
|
|
204
|
+
payableId: j,
|
|
202
205
|
readOnly: !0,
|
|
203
|
-
onCollapse:
|
|
204
|
-
|
|
206
|
+
onCollapse: Y,
|
|
207
|
+
onEdit: X,
|
|
208
|
+
poweredByBankName: S
|
|
205
209
|
}) : null
|
|
206
210
|
]
|
|
207
211
|
});
|
|
208
212
|
}
|
|
209
213
|
//#endregion
|
|
210
|
-
export {
|
|
214
|
+
export { E as BillsTab, E as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.5.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.5.12", n = "9a6783fbd5a0eec701938c3d253c5f3aacdec8d6", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|