@tesouro/embedded-components-react 0.2.336 → 0.2.337
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 +22 -0
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +6 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +185 -180
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +98 -97
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +6 -107
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +19 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +57 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +3 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +107 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +8 -159
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +43 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +93 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +180 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +4 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +34 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +1 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +38 -269
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +272 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +2 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +7 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +49 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +2 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +20 -284
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +286 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +13 -117
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +120 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +8 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +96 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +11 -56
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +57 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +1 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +51 -136
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +141 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +5 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +44 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -61
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +63 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +1 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +72 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +251 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +9 -252
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +1 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +6 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +43 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +278 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +8 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +91 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +15 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +101 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +3 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +28 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +2 -170
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +7 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +32 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +2 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +12 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +106 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +170 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +89 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -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/widget-suite/feature/dist/index7.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +1378 -1371
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +0 -34
|
@@ -5,128 +5,129 @@
|
|
|
5
5
|
import { useAllLedgerAccountsQuery as e } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
|
|
6
6
|
import "../../../shared/data-access/dist/index.js";
|
|
7
7
|
import { resolveVendor as t } from "./index3.js";
|
|
8
|
-
import { BillDecisionDialog as n } from "../../ui/dist/
|
|
9
|
-
import { BillDetailsSheet as r } from "../../ui/dist/
|
|
8
|
+
import { BillDecisionDialog as n } from "../../ui/dist/index47.js";
|
|
9
|
+
import { BillDetailsSheet as r } from "../../ui/dist/index53.js";
|
|
10
|
+
import { BillDuplicateNotice as i } from "../../ui/dist/index57.js";
|
|
10
11
|
import "../../ui/dist/index.js";
|
|
11
|
-
import { useAllPayableLineItemsQuery as
|
|
12
|
-
import { usePayableQuery as
|
|
12
|
+
import { useAllPayableLineItemsQuery as a } from "../../data-access/dist/index7.js";
|
|
13
|
+
import { usePayableQuery as o } from "../../data-access/dist/index13.js";
|
|
13
14
|
import "../../data-access/dist/index.js";
|
|
14
|
-
import { PayBillFlow as
|
|
15
|
+
import { PayBillFlow as s } from "./index10.js";
|
|
15
16
|
import "./index11.js";
|
|
16
|
-
import { mergeDecisionDialogCopy as
|
|
17
|
-
import { useApprovalPolicyCardView as
|
|
18
|
-
import { useCurrentApprovalRequestId as
|
|
19
|
-
import { usePayableDetailActions as
|
|
20
|
-
import { useScheduledPayment as
|
|
21
|
-
import { BILL_DETAILS_LABELS_EN as
|
|
22
|
-
import { mapPayableToBillDetails as
|
|
23
|
-
import { useMemo as
|
|
24
|
-
import { Fragment as
|
|
17
|
+
import { mergeDecisionDialogCopy as c } from "./index24.js";
|
|
18
|
+
import { useApprovalPolicyCardView as l } from "./index15.js";
|
|
19
|
+
import { useCurrentApprovalRequestId as u } from "./index16.js";
|
|
20
|
+
import { usePayableDetailActions as d } from "./index18.js";
|
|
21
|
+
import { useScheduledPayment as f } from "./index19.js";
|
|
22
|
+
import { BILL_DETAILS_LABELS_EN as p } from "./index40.js";
|
|
23
|
+
import { mapPayableToBillDetails as m } from "./index41.js";
|
|
24
|
+
import { useMemo as h, useRef as g } from "react";
|
|
25
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
25
26
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js
|
|
26
|
-
function
|
|
27
|
+
function b(e) {
|
|
27
28
|
return !!(e?.bank_account?.account_holder_name && e.bank_account.routing_number && e.bank_account.account_number);
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
-
let
|
|
31
|
-
...
|
|
32
|
-
...
|
|
30
|
+
function x({ open: x, onOpenChange: S, payableId: C, onClose: w, onExpand: T, testId: E, labels: D, poweredByBankName: O, isPossibleDuplicate: k }) {
|
|
31
|
+
let A = h(() => ({
|
|
32
|
+
...p,
|
|
33
|
+
...D,
|
|
33
34
|
sheet: {
|
|
34
|
-
...
|
|
35
|
-
...
|
|
35
|
+
...p.sheet,
|
|
36
|
+
...D?.sheet,
|
|
36
37
|
statusBadge: {
|
|
37
|
-
...
|
|
38
|
-
...
|
|
38
|
+
...p.sheet.statusBadge,
|
|
39
|
+
...D?.sheet?.statusBadge
|
|
39
40
|
},
|
|
40
41
|
approvalPolicy: {
|
|
41
|
-
...
|
|
42
|
-
...
|
|
42
|
+
...p.sheet.approvalPolicy,
|
|
43
|
+
...D?.sheet?.approvalPolicy
|
|
43
44
|
}
|
|
44
45
|
},
|
|
45
|
-
decisionDialog:
|
|
46
|
+
decisionDialog: c(p.decisionDialog, D?.decisionDialog),
|
|
46
47
|
approvalPolicyCopy: {
|
|
47
|
-
...
|
|
48
|
-
...
|
|
48
|
+
...p.approvalPolicyCopy,
|
|
49
|
+
...D?.approvalPolicyCopy
|
|
49
50
|
}
|
|
50
|
-
}), [
|
|
51
|
-
payableId:
|
|
52
|
-
status:
|
|
53
|
-
}),
|
|
54
|
-
payableId:
|
|
55
|
-
approvalPolicyId:
|
|
56
|
-
copy:
|
|
57
|
-
}),
|
|
58
|
-
payableId:
|
|
59
|
-
scheduledPaymentDate:
|
|
60
|
-
}), { actions:
|
|
61
|
-
payableId:
|
|
62
|
-
status:
|
|
63
|
-
currentApprovalRequestId:
|
|
64
|
-
isPolicyApprover:
|
|
65
|
-
hasWaitingRequest:
|
|
66
|
-
hasScheduledPayment:
|
|
67
|
-
isScheduledPaymentUnknown:
|
|
51
|
+
}), [D]), j = o(C), M = a(C), N = e(), P = j.data, F = g(null), I = u({
|
|
52
|
+
payableId: C,
|
|
53
|
+
status: P?.status
|
|
54
|
+
}), L = l({
|
|
55
|
+
payableId: C,
|
|
56
|
+
approvalPolicyId: P?.approval_policy_id,
|
|
57
|
+
copy: A.approvalPolicyCopy
|
|
58
|
+
}), R = f({
|
|
59
|
+
payableId: C,
|
|
60
|
+
scheduledPaymentDate: P?.scheduled_payment_date
|
|
61
|
+
}), { actions: z, decisionDialog: B } = d({
|
|
62
|
+
payableId: P ? C : void 0,
|
|
63
|
+
status: P?.status,
|
|
64
|
+
currentApprovalRequestId: I.id,
|
|
65
|
+
isPolicyApprover: I.isPolicyApprover,
|
|
66
|
+
hasWaitingRequest: I.hasWaitingRequest,
|
|
67
|
+
hasScheduledPayment: R.hasScheduledPayment,
|
|
68
|
+
isScheduledPaymentUnknown: R.isResolving,
|
|
68
69
|
labels: {
|
|
69
|
-
payBill:
|
|
70
|
-
markAsPaid:
|
|
71
|
-
reject:
|
|
72
|
-
approve:
|
|
73
|
-
cancel:
|
|
74
|
-
reopen:
|
|
75
|
-
forceApprove:
|
|
76
|
-
forceReject:
|
|
77
|
-
decisionDialog:
|
|
78
|
-
actionError:
|
|
70
|
+
payBill: A.sheet.payButton,
|
|
71
|
+
markAsPaid: A.sheet.markAsPaidButton,
|
|
72
|
+
reject: A.sheet.rejectButton,
|
|
73
|
+
approve: A.sheet.approveButton,
|
|
74
|
+
cancel: A.sheet.cancelButton,
|
|
75
|
+
reopen: A.sheet.reopenButton,
|
|
76
|
+
forceApprove: A.sheet.forceApproveButton,
|
|
77
|
+
forceReject: A.sheet.forceRejectButton,
|
|
78
|
+
decisionDialog: A.decisionDialog,
|
|
79
|
+
actionError: A.actionError
|
|
79
80
|
},
|
|
80
81
|
onPayBillSelect: () => {
|
|
81
|
-
if (!
|
|
82
|
-
|
|
82
|
+
if (!b(t(P)) && T) {
|
|
83
|
+
T();
|
|
83
84
|
return;
|
|
84
85
|
}
|
|
85
|
-
|
|
86
|
+
F.current?.open();
|
|
86
87
|
}
|
|
87
|
-
}),
|
|
88
|
+
}), V = R.hasScheduledPayment && R.scheduledDateLabel ? /* @__PURE__ */ v("p", {
|
|
88
89
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
89
|
-
children:
|
|
90
|
-
}) : void 0,
|
|
91
|
-
payable:
|
|
92
|
-
lineItems:
|
|
93
|
-
ledgerAccounts:
|
|
94
|
-
labels:
|
|
90
|
+
children: A.scheduledSummary(R.scheduledDateLabel)
|
|
91
|
+
}) : void 0, H = k ? /* @__PURE__ */ v(i, {}) : void 0, U = H || V ? /* @__PURE__ */ y(_, { children: [H, V] }) : void 0, W = h(() => P ? m({
|
|
92
|
+
payable: P,
|
|
93
|
+
lineItems: M.lineItems,
|
|
94
|
+
ledgerAccounts: N.data?.data ?? [],
|
|
95
|
+
labels: A
|
|
95
96
|
}) : void 0, [
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
]),
|
|
101
|
-
return /* @__PURE__ */
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
open:
|
|
104
|
-
onOpenChange:
|
|
105
|
-
details:
|
|
106
|
-
actions:
|
|
107
|
-
approvalPolicy:
|
|
108
|
-
isLoading:
|
|
109
|
-
isError:
|
|
110
|
-
notice:
|
|
111
|
-
onClose:
|
|
112
|
-
onExpand:
|
|
113
|
-
testId:
|
|
114
|
-
labels:
|
|
97
|
+
P,
|
|
98
|
+
M.lineItems,
|
|
99
|
+
N.data,
|
|
100
|
+
A
|
|
101
|
+
]), G = j.isLoading || M.isResolving || N.isResolving, K = j.isError || M.isError || N.isError;
|
|
102
|
+
return /* @__PURE__ */ y(_, { children: [
|
|
103
|
+
/* @__PURE__ */ v(r, {
|
|
104
|
+
open: x,
|
|
105
|
+
onOpenChange: S,
|
|
106
|
+
details: W,
|
|
107
|
+
actions: z,
|
|
108
|
+
approvalPolicy: L.view,
|
|
109
|
+
isLoading: G,
|
|
110
|
+
isError: K,
|
|
111
|
+
notice: U,
|
|
112
|
+
onClose: w,
|
|
113
|
+
onExpand: T,
|
|
114
|
+
testId: E,
|
|
115
|
+
labels: A.sheet
|
|
115
116
|
}),
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
...
|
|
118
|
-
labels: { cancelButton:
|
|
119
|
-
testId:
|
|
120
|
-
confirmTestId:
|
|
121
|
-
reasonTestId:
|
|
122
|
-
reasonFieldId:
|
|
117
|
+
/* @__PURE__ */ v(n, {
|
|
118
|
+
...B,
|
|
119
|
+
labels: { cancelButton: A.decisionDialog.cancelButton },
|
|
120
|
+
testId: E ? `${E}-decision-dialog` : void 0,
|
|
121
|
+
confirmTestId: E ? `${E}-decision-confirm` : void 0,
|
|
122
|
+
reasonTestId: E ? `${E}-decision-reason` : void 0,
|
|
123
|
+
reasonFieldId: E ? `${E}-decision-reason-field` : void 0
|
|
123
124
|
}),
|
|
124
|
-
|
|
125
|
-
ref:
|
|
126
|
-
payable:
|
|
127
|
-
poweredByBankName:
|
|
125
|
+
P ? /* @__PURE__ */ v(s, {
|
|
126
|
+
ref: F,
|
|
127
|
+
payable: P,
|
|
128
|
+
poweredByBankName: O
|
|
128
129
|
}) : null
|
|
129
130
|
] });
|
|
130
131
|
}
|
|
131
132
|
//#endregion
|
|
132
|
-
export {
|
|
133
|
+
export { x as BillDetailsContainer, x as default };
|
|
@@ -1,110 +1,9 @@
|
|
|
1
|
-
import { BillColumn as e } from "../../ui/dist/index53.js";
|
|
2
|
-
import "../../ui/dist/index.js";
|
|
3
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
All: "all"
|
|
10
|
-
}, n = {
|
|
11
|
-
[t.Drafts]: ["draft"],
|
|
12
|
-
[t.Pending]: [
|
|
13
|
-
"new",
|
|
14
|
-
"approve_in_progress",
|
|
15
|
-
"waiting_to_be_paid",
|
|
16
|
-
"partially_paid"
|
|
17
|
-
],
|
|
18
|
-
[t.Scheduled]: [
|
|
19
|
-
"new",
|
|
20
|
-
"approve_in_progress",
|
|
21
|
-
"waiting_to_be_paid",
|
|
22
|
-
"partially_paid"
|
|
23
|
-
],
|
|
24
|
-
[t.Paid]: ["paid"],
|
|
25
|
-
[t.All]: void 0
|
|
26
|
-
}, r = {
|
|
27
|
-
[t.Drafts]: void 0,
|
|
28
|
-
[t.Pending]: !1,
|
|
29
|
-
[t.Scheduled]: !0,
|
|
30
|
-
[t.Paid]: void 0,
|
|
31
|
-
[t.All]: void 0
|
|
2
|
+
var e = {
|
|
3
|
+
duplicateBadge: "Duplicate?",
|
|
4
|
+
existingBadge: "Existing",
|
|
5
|
+
selectRow: ({ vendorLabel: e, designation: t, invoiceNumberLabel: n, addedOnLabel: r }) => `Select bill — ${e}, ${t}, invoice ${n}, added ${r}`,
|
|
6
|
+
openRow: ({ vendorLabel: e, designation: t, invoiceNumberLabel: n, addedOnLabel: r }) => `View bill — ${e}, ${t}, invoice ${n}, added ${r}`
|
|
32
7
|
};
|
|
33
|
-
function i(e) {
|
|
34
|
-
return e === t.Pending || e === t.Drafts;
|
|
35
|
-
}
|
|
36
|
-
var a = t.Pending, o = [
|
|
37
|
-
t.Pending,
|
|
38
|
-
t.Drafts,
|
|
39
|
-
t.Scheduled,
|
|
40
|
-
t.Paid,
|
|
41
|
-
t.All
|
|
42
|
-
], s = {
|
|
43
|
-
[t.Drafts]: [
|
|
44
|
-
e.Vendor,
|
|
45
|
-
e.DueDate,
|
|
46
|
-
e.Status,
|
|
47
|
-
e.AmountDue,
|
|
48
|
-
e.AddedOn
|
|
49
|
-
],
|
|
50
|
-
[t.Pending]: [
|
|
51
|
-
e.Vendor,
|
|
52
|
-
e.DueDate,
|
|
53
|
-
e.Status,
|
|
54
|
-
e.AmountDue,
|
|
55
|
-
e.AddedOn
|
|
56
|
-
],
|
|
57
|
-
[t.Scheduled]: [
|
|
58
|
-
e.Vendor,
|
|
59
|
-
e.DueDate,
|
|
60
|
-
e.ScheduledDate,
|
|
61
|
-
e.Status,
|
|
62
|
-
e.AmountScheduled,
|
|
63
|
-
e.AddedOn
|
|
64
|
-
],
|
|
65
|
-
[t.Paid]: [
|
|
66
|
-
e.Vendor,
|
|
67
|
-
e.PaidDate,
|
|
68
|
-
e.Status,
|
|
69
|
-
e.AmountPaid,
|
|
70
|
-
e.AddedOn
|
|
71
|
-
],
|
|
72
|
-
[t.All]: [
|
|
73
|
-
e.Vendor,
|
|
74
|
-
e.DueDate,
|
|
75
|
-
e.ScheduledDate,
|
|
76
|
-
e.Status,
|
|
77
|
-
e.AmountDue,
|
|
78
|
-
e.AmountPaid,
|
|
79
|
-
e.AddedOn
|
|
80
|
-
]
|
|
81
|
-
};
|
|
82
|
-
function c(e) {
|
|
83
|
-
return s[e];
|
|
84
|
-
}
|
|
85
|
-
function l(e) {
|
|
86
|
-
let t = n[e];
|
|
87
|
-
return t ? [...t] : void 0;
|
|
88
|
-
}
|
|
89
|
-
function u(e) {
|
|
90
|
-
return r[e];
|
|
91
|
-
}
|
|
92
|
-
var d = {
|
|
93
|
-
vendorLabel: "counterpart_name",
|
|
94
|
-
dueDateLabel: "due_date",
|
|
95
|
-
scheduledDateLabel: "scheduled_payment_date",
|
|
96
|
-
addedOnLabel: "created_at"
|
|
97
|
-
}, f = {
|
|
98
|
-
[e.Vendor]: "vendorLabel",
|
|
99
|
-
[e.DueDate]: "dueDateLabel",
|
|
100
|
-
[e.ScheduledDate]: "scheduledDateLabel",
|
|
101
|
-
[e.AddedOn]: "addedOnLabel"
|
|
102
|
-
};
|
|
103
|
-
function p(e) {
|
|
104
|
-
return f[e];
|
|
105
|
-
}
|
|
106
|
-
function m(e) {
|
|
107
|
-
if (e) return d[e];
|
|
108
|
-
}
|
|
109
8
|
//#endregion
|
|
110
|
-
export {
|
|
9
|
+
export { e as DUPLICATE_BILLS_LABELS_EN };
|
|
@@ -1,11 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useCallback as e, useMemo as t, useState as n } from "react";
|
|
1
6
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
function r({ rowIds: r }) {
|
|
8
|
+
let [i, a] = n([]), o = e((e) => {
|
|
9
|
+
a((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
10
|
+
}, []), s = t(() => r.filter((e) => i.includes(e)), [r, i]), c = r.length > 0 && s.length === r.length, l = e(() => {
|
|
11
|
+
a(c ? [] : [...r]);
|
|
12
|
+
}, [c, r]);
|
|
13
|
+
return {
|
|
14
|
+
selectedIds: s,
|
|
15
|
+
isSelected: e((e) => i.includes(e), [i]),
|
|
16
|
+
toggleRow: o,
|
|
17
|
+
toggleAllRows: l,
|
|
18
|
+
selectAllChecked: c ? !0 : s.length > 0 && "indeterminate"
|
|
19
|
+
};
|
|
9
20
|
}
|
|
10
21
|
//#endregion
|
|
11
|
-
export {
|
|
22
|
+
export { r as useDuplicateBillsSelection };
|
|
@@ -1,40 +1,59 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { DuplicateBillsDialog as e } from "../../ui/dist/index67.js";
|
|
6
|
+
import "../../ui/dist/index.js";
|
|
7
|
+
import { DUPLICATE_BILLS_LABELS_EN as t } from "./index51.js";
|
|
8
|
+
import { useDuplicateBillsSelection as n } from "./index52.js";
|
|
9
|
+
import { useMemo as r } from "react";
|
|
10
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
11
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[e.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
12
|
+
var a = [];
|
|
13
|
+
function o({ open: o, onOpenChange: s, bills: c = a, canManageDuplicates: l = !0, onOpenBill: u, labels: d, dialogLabels: f }) {
|
|
14
|
+
let p = r(() => ({
|
|
15
|
+
...t,
|
|
16
|
+
...d
|
|
17
|
+
}), [d]), m = r(() => c.map((e) => e.id), [c]), { selectedIds: h, isSelected: g, toggleRow: _, toggleAllRows: v, selectAllChecked: y } = n({ rowIds: m }), b = r(() => c.map((e) => {
|
|
18
|
+
let t = e.isPossibleDuplicate ? p.duplicateBadge : p.existingBadge, n = {
|
|
19
|
+
vendorLabel: e.vendorLabel,
|
|
20
|
+
designation: t,
|
|
21
|
+
invoiceNumberLabel: e.invoiceNumberLabel,
|
|
22
|
+
addedOnLabel: e.addedOnLabel
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
...e,
|
|
26
|
+
duplicateBadge: {
|
|
27
|
+
label: t,
|
|
28
|
+
tone: e.isPossibleDuplicate ? "warning" : "success"
|
|
29
|
+
},
|
|
30
|
+
selectLabel: p.selectRow(n),
|
|
31
|
+
openLabel: p.openRow(n),
|
|
32
|
+
isSelected: g(e.id),
|
|
33
|
+
onToggleSelected: () => _(e.id),
|
|
34
|
+
onOpen: () => u?.(e.id)
|
|
35
|
+
};
|
|
36
|
+
}), [
|
|
37
|
+
c,
|
|
38
|
+
g,
|
|
39
|
+
p,
|
|
40
|
+
_,
|
|
41
|
+
u
|
|
42
|
+
]), x = () => {
|
|
43
|
+
if (h.length === 0) throw Error("Duplicate review action taken with no bills selected — keep and cancel both need a subject.");
|
|
44
|
+
s(!1);
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ i(e, {
|
|
47
|
+
open: o,
|
|
48
|
+
onOpenChange: s,
|
|
49
|
+
rows: b,
|
|
50
|
+
selectAllChecked: y,
|
|
51
|
+
onToggleAllRows: v,
|
|
52
|
+
onKeepSelected: l ? x : void 0,
|
|
53
|
+
onCancelDuplicates: l ? x : void 0,
|
|
54
|
+
isActionDisabled: h.length === 0,
|
|
55
|
+
labels: f
|
|
56
|
+
});
|
|
57
|
+
}
|
|
39
58
|
//#endregion
|
|
40
|
-
export {
|
|
59
|
+
export { o as DuplicateBillsContainer, o as default };
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
uploadTray: "bill-pay-upload-tray",
|
|
5
|
-
detailsSheet: "bill-pay-details-sheet"
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
export { e as billsTabTestIds };
|
|
1
|
+
import "./index51.js";
|
|
2
|
+
import "./index52.js";
|
|
3
|
+
import "./index53.js";
|