@tesouro/embedded-components-react 0.9.22 → 0.9.25
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 +82 -55
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index10.js +14 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index11.js +59 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index12.js +10 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index13.js +9 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index14.js +7 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index15.js +9 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index16.js +29 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index17.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index18.js +14 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index19.js +155 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index20.js +13 -157
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index21.js +18 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +32 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +99 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +69 -85
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +3 -85
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +57 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +114 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +190 -111
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index29.js +75 -187
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index3.js +35 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index30.js +67 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +111 -69
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +461 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +102 -452
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +12 -116
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +85 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +67 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +231 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +38 -232
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +245 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +169 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +21 -252
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +534 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +4 -542
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +43 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +236 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +3 -240
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +63 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +1 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +82 -225
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index6.js +45 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index7.js +4 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index8.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index9.js +8 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index36.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +138 -155
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +48 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +219 -207
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index4.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index6.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index7.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +1 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +278 -322
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/mocks/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +18 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index10.js +2 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index11.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +39 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +2 -78
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +78 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +25 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +28 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +2 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +7 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +34 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index6.js +31 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +1 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index8.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index9.js +52 -2
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/themeTokens.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +4696 -4681
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index49.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +0 -29
|
@@ -1,231 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { toast as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import { formatCalendarDate as t } from "../../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
7
|
-
import { formatMoneyExact as n } from "../../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
8
|
-
import "../../../../shared/util/dist/index.js";
|
|
9
|
-
import "../../../../shared/ui/dist/index.js";
|
|
10
|
-
import { DuplicateVerdict as r } from "../../../util/dist/lib/duplicateVerdict.js";
|
|
11
|
-
import { suspectedPayableDuplicates as i } from "../../../util/dist/lib/payableDuplicates.js";
|
|
12
|
-
import { duplicateVerdictMatches as a, groupSuspectedDuplicates as o, resolveDuplicateOriginalId as s } from "../../../util/dist/lib/groupDuplicates.js";
|
|
13
|
-
import { isEditablePayableStatus as c } from "../../../util/dist/lib/isEditablePayableStatus.js";
|
|
14
|
-
import { payableRemoval as l } from "../../../util/dist/lib/payableRemoval.js";
|
|
15
|
-
import { resolveVendorName as u } from "../../../util/dist/lib/resolveVendor.js";
|
|
1
|
+
import { hasAnyScope as e } from "../../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
2
|
+
import { Scope as t } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
3
|
+
import "../../../../shared/data-access/dist/index.js";
|
|
4
|
+
import { isEditablePayableStatus as n } from "../../../util/dist/lib/isEditablePayableStatus.js";
|
|
16
5
|
import "../../../util/dist/index.js";
|
|
17
|
-
import {
|
|
18
|
-
import { useApplyDuplicateVerdictsMutation as f } from "../../../data-access/dist/lib/useApplyDuplicateVerdictsMutation.js";
|
|
19
|
-
import "../../../data-access/dist/index.js";
|
|
20
|
-
import { usePayablesByIdsQueries as p } from "../../data-access/dist/index22.js";
|
|
21
|
-
import "../../data-access/dist/index.js";
|
|
22
|
-
import { duplicateRemovalPrompt as m } from "./index3.js";
|
|
23
|
-
import { DUPLICATE_BILLS_LABELS_EN as h } from "./index4.js";
|
|
24
|
-
import { useCallback as g, useMemo as _, useState as v } from "react";
|
|
25
|
-
import { BanIcon as y, FileCheckIcon as b, Trash2Icon as x } from "lucide-react";
|
|
6
|
+
import { BanIcon as r, CalendarXIcon as i, RotateCcwIcon as a, ThumbsDownIcon as o, ThumbsUpIcon as s } from "lucide-react";
|
|
26
7
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return t ? o(e).map(({ members: e }) => e).find((e) => e.some((e) => e.id === t)) ?? [] : [];
|
|
8
|
+
function c(n) {
|
|
9
|
+
return e(n, [t.CounterpartReadOrg]);
|
|
30
10
|
}
|
|
31
|
-
function
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
U,
|
|
75
|
-
T,
|
|
76
|
-
W.toast
|
|
77
|
-
]), K = _(() => ({
|
|
78
|
-
delete: {
|
|
79
|
-
action: O.deleteAction,
|
|
80
|
-
title: O.deleteConfirmTitle,
|
|
81
|
-
description: O.deleteConfirmDescription,
|
|
82
|
-
confirmButton: O.deleteConfirmButton,
|
|
83
|
-
backButton: O.deleteConfirmBackButton,
|
|
84
|
-
toast: O.deletedToast
|
|
85
|
-
},
|
|
86
|
-
cancel: {
|
|
87
|
-
action: O.cancelAction,
|
|
88
|
-
title: O.cancelConfirmTitle,
|
|
89
|
-
description: O.cancelConfirmDescription,
|
|
90
|
-
confirmButton: O.cancelConfirmButton,
|
|
91
|
-
backButton: O.cancelConfirmBackButton,
|
|
92
|
-
toast: O.cancelledToast
|
|
93
|
-
},
|
|
94
|
-
confirm: {
|
|
95
|
-
action: O.confirmAction,
|
|
96
|
-
title: O.confirmDuplicateTitle,
|
|
97
|
-
description: O.confirmDuplicateDescription,
|
|
98
|
-
confirmButton: O.confirmBillButton,
|
|
99
|
-
backButton: O.cancelConfirmBackButton,
|
|
100
|
-
toast: O.confirmedToast
|
|
101
|
-
}
|
|
102
|
-
}), [O]), q = K[L?.removeBy ?? "cancel"], J = g(async () => {
|
|
103
|
-
L && (await H(L.payable, r.Remove, K[L.removeBy].toast, L.payable.id === j ? T : void 0), R(void 0));
|
|
104
|
-
}, [
|
|
105
|
-
H,
|
|
106
|
-
T,
|
|
107
|
-
j,
|
|
108
|
-
L,
|
|
109
|
-
K
|
|
110
|
-
]), Y = g(async () => {
|
|
111
|
-
z && (await H(z.payable, r.Keep, O.dismissedToast, void 0, z.originalPayableId), B(void 0));
|
|
112
|
-
}, [
|
|
113
|
-
H,
|
|
114
|
-
O.dismissedToast,
|
|
115
|
-
z
|
|
116
|
-
]), X = w && !!(A && j), Z = X && !!V, Q = _(() => {
|
|
117
|
-
let e = new Map(N.flatMap((e) => e.data ? [[e.data.id, e.data]] : []));
|
|
118
|
-
o?.id && e.set(o.id, o);
|
|
119
|
-
let r = C([...e.values()], j);
|
|
120
|
-
if (r.length < 2) return [];
|
|
121
|
-
let a = s(r), f = (e) => {
|
|
122
|
-
let t = e.total_amount ?? e.amount_due;
|
|
123
|
-
return t == null ? "" : n(t / 100, { currencyCode: e.currency ?? "USD" });
|
|
124
|
-
};
|
|
125
|
-
return r.map((e) => {
|
|
126
|
-
let n = e.status ? d({
|
|
127
|
-
apiStatus: e.status,
|
|
128
|
-
dueDate: e.due_date,
|
|
129
|
-
scheduledPaymentDate: e.scheduled_payment_date
|
|
130
|
-
}) : void 0, r = e.id === a, o = e.id === j, s = w && i(e).length > 0, p = u(e), m = l(e.status);
|
|
131
|
-
return {
|
|
132
|
-
id: e.id,
|
|
133
|
-
roleLabel: p,
|
|
134
|
-
badges: [...r ? [O.originalBillBadge] : [], ...o ? [O.currentBillBadge] : []],
|
|
135
|
-
invoiceNumberLabel: e.document_id ?? "",
|
|
136
|
-
roleTone: r ? void 0 : "warning",
|
|
137
|
-
amountLabel: f(e),
|
|
138
|
-
addedOnLabel: t(e.created_at?.slice(0, 10)),
|
|
139
|
-
dueDateLabel: t(e.due_date),
|
|
140
|
-
status: n?.status,
|
|
141
|
-
statusTone: n?.tone,
|
|
142
|
-
onOpen: !o && E ? () => E(e.id, c(e.status ?? void 0)) : void 0,
|
|
143
|
-
menu: s ? {
|
|
144
|
-
triggerLabel: O.openRow({
|
|
145
|
-
vendorLabel: p,
|
|
146
|
-
invoiceNumberLabel: "",
|
|
147
|
-
addedOnLabel: t(e.created_at?.slice(0, 10))
|
|
148
|
-
}),
|
|
149
|
-
items: [{
|
|
150
|
-
id: "not-duplicate",
|
|
151
|
-
label: O.notDuplicateAction,
|
|
152
|
-
icon: b,
|
|
153
|
-
disabled: P.isPending,
|
|
154
|
-
onSelect: () => B({
|
|
155
|
-
payable: e,
|
|
156
|
-
originalPayableId: r ? void 0 : a
|
|
157
|
-
})
|
|
158
|
-
}, ...m ? [{
|
|
159
|
-
id: "cancel-duplicate",
|
|
160
|
-
label: K[m].action,
|
|
161
|
-
icon: m === "delete" ? x : y,
|
|
162
|
-
disabled: P.isPending,
|
|
163
|
-
onSelect: () => R({
|
|
164
|
-
payable: e,
|
|
165
|
-
removeBy: m
|
|
166
|
-
})
|
|
167
|
-
}] : []]
|
|
168
|
-
} : void 0
|
|
169
|
-
};
|
|
11
|
+
function l({ status: n, scopes: r, arePendingApproversUnknown: i, hasApprovalPolicy: a = !0, hasWaitingRequest: o }) {
|
|
12
|
+
let s = e(r, [t.PayableApproveOrg]);
|
|
13
|
+
return !!(n === "approve_in_progress" && s);
|
|
14
|
+
}
|
|
15
|
+
function u({ status: u, scopes: d, canDecideApprovalRequest: f, hasScheduledPayment: p, scheduledPaymentIntentId: m, arePendingApproversUnknown: h, hasApprovalPolicy: g, hasWaitingRequest: _, isPayabilityUnknown: v, canEdit: y, labels: b }) {
|
|
16
|
+
let x = e(d, [t.PayablePayOrg]), S = e(d, [t.BankAccountReadOrg]), C = c(d), w = e(d, [t.PaymentRailAch]), T = e(d, [t.PayableWriteOrg]), E = x, D = [];
|
|
17
|
+
if (y && n(u) && T && D.push({
|
|
18
|
+
id: "edit",
|
|
19
|
+
label: b.edit,
|
|
20
|
+
variant: "default",
|
|
21
|
+
surface: "row"
|
|
22
|
+
}), u === "approve_in_progress" && f && (D.push({
|
|
23
|
+
id: "approve",
|
|
24
|
+
label: b.approve,
|
|
25
|
+
variant: "default",
|
|
26
|
+
surface: "row"
|
|
27
|
+
}), D.push({
|
|
28
|
+
id: "reject",
|
|
29
|
+
label: b.reject,
|
|
30
|
+
variant: "ghost",
|
|
31
|
+
surface: "row"
|
|
32
|
+
})), l({
|
|
33
|
+
status: u,
|
|
34
|
+
scopes: d,
|
|
35
|
+
arePendingApproversUnknown: h,
|
|
36
|
+
hasApprovalPolicy: g,
|
|
37
|
+
hasWaitingRequest: _
|
|
38
|
+
})) {
|
|
39
|
+
let e = g === !1 ? void 0 : b.policyOverridesHeading;
|
|
40
|
+
D.push({
|
|
41
|
+
id: "forceApprove",
|
|
42
|
+
label: b.forceApprove,
|
|
43
|
+
variant: "ghost",
|
|
44
|
+
surface: "menu",
|
|
45
|
+
icon: s,
|
|
46
|
+
sectionHeading: e
|
|
47
|
+
}), D.push({
|
|
48
|
+
id: "forceReject",
|
|
49
|
+
label: b.forceReject,
|
|
50
|
+
variant: "ghost",
|
|
51
|
+
surface: "menu",
|
|
52
|
+
icon: o,
|
|
53
|
+
sectionHeading: e
|
|
170
54
|
});
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
onConfirm: () => void J(),
|
|
203
|
-
onCancel: () => R(void 0),
|
|
204
|
-
isPending: P.isPending,
|
|
205
|
-
cancelButtonLabel: q.backButton
|
|
206
|
-
},
|
|
207
|
-
keepRowConfirmation: {
|
|
208
|
-
open: !!z,
|
|
209
|
-
copy: {
|
|
210
|
-
title: O.notDuplicateConfirmTitle,
|
|
211
|
-
description: O.notDuplicateConfirmDescription,
|
|
212
|
-
confirmButton: O.notDuplicateConfirmButton,
|
|
213
|
-
presentation: {
|
|
214
|
-
alignment: "center",
|
|
215
|
-
icon: b,
|
|
216
|
-
actionWidth: "equal"
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
onConfirm: () => void Y(),
|
|
220
|
-
onCancel: () => B(void 0),
|
|
221
|
-
isPending: P.isPending,
|
|
222
|
-
cancelButtonLabel: O.notDuplicateConfirmBackButton
|
|
223
|
-
},
|
|
224
|
-
isBusy: P.isPending,
|
|
225
|
-
rows: Q,
|
|
226
|
-
collapsedRowCount: S,
|
|
227
|
-
showMoreLabel: Q.length > S ? O.showMoreRows(Q.length - S) : void 0
|
|
228
|
-
};
|
|
55
|
+
}
|
|
56
|
+
let O = u === "waiting_to_be_paid" && x && !p, k = u === "waiting_to_be_paid" && x && S && C && w && !p && !v;
|
|
57
|
+
return O && D.push({
|
|
58
|
+
id: "markAsPaid",
|
|
59
|
+
label: b.markAsPaid,
|
|
60
|
+
variant: "outline",
|
|
61
|
+
surface: "row"
|
|
62
|
+
}), k && D.push({
|
|
63
|
+
id: "payBill",
|
|
64
|
+
label: b.payBill,
|
|
65
|
+
variant: "default",
|
|
66
|
+
surface: "row"
|
|
67
|
+
}), u === "new" && T && D.push({
|
|
68
|
+
id: "cancel",
|
|
69
|
+
label: b.cancel,
|
|
70
|
+
variant: "ghost",
|
|
71
|
+
surface: "menu",
|
|
72
|
+
icon: r
|
|
73
|
+
}), (u === "rejected" || u === "waiting_to_be_paid" && !p) && T && D.push({
|
|
74
|
+
id: "reopen",
|
|
75
|
+
label: b.reopen,
|
|
76
|
+
variant: "ghost",
|
|
77
|
+
surface: "menu",
|
|
78
|
+
icon: a
|
|
79
|
+
}), u === "waiting_to_be_paid" && p && m && E && D.push({
|
|
80
|
+
id: "cancelScheduledPayment",
|
|
81
|
+
label: b.cancelScheduledPayment,
|
|
82
|
+
variant: "ghost",
|
|
83
|
+
surface: "menu",
|
|
84
|
+
icon: i
|
|
85
|
+
}), D;
|
|
229
86
|
}
|
|
230
87
|
//#endregion
|
|
231
|
-
export {
|
|
88
|
+
export { l as canOverrideApprovalPolicy, c as canReadCounterpartBankAccounts, u as getBillDetailActions };
|
|
@@ -1,88 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "../../../../shared/
|
|
4
|
-
import {
|
|
5
|
-
import "
|
|
6
|
-
import { BanIcon as r, CalendarXIcon as i, RotateCcwIcon as a, ThumbsDownIcon as o, ThumbsUpIcon as s } from "lucide-react";
|
|
1
|
+
import { ApprovalPoliciesSettingsDefaultLabels as e } from "../../../../shared/approval-policy/feature/dist/lib/labels.js";
|
|
2
|
+
import { parseApprovalPolicyScript as t } from "../../../../shared/approval-policy/util/dist/lib/policyScript.js";
|
|
3
|
+
import { parseApprovalPolicyTrigger as n } from "../../../../shared/approval-policy/util/dist/lib/policyTrigger.js";
|
|
4
|
+
import { buildPolicySentence as r, buildPolicyTitle as i } from "../../../../shared/approval-policy/feature/dist/lib/policyViewModel.js";
|
|
5
|
+
import "../../../../shared/approval-policy/feature/dist/index.js";
|
|
7
6
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index6.js
|
|
8
|
-
|
|
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
|
-
arePendingApproversUnknown: h,
|
|
36
|
-
hasApprovalPolicy: g,
|
|
37
|
-
hasWaitingRequest: _
|
|
38
|
-
})) {
|
|
39
|
-
let e = g === !1 ? void 0 : b.policyOverridesHeading;
|
|
40
|
-
D.push({
|
|
41
|
-
id: "forceApprove",
|
|
42
|
-
label: b.forceApprove,
|
|
43
|
-
variant: "ghost",
|
|
44
|
-
surface: "menu",
|
|
45
|
-
icon: s,
|
|
46
|
-
sectionHeading: e
|
|
47
|
-
}), D.push({
|
|
48
|
-
id: "forceReject",
|
|
49
|
-
label: b.forceReject,
|
|
50
|
-
variant: "ghost",
|
|
51
|
-
surface: "menu",
|
|
52
|
-
icon: o,
|
|
53
|
-
sectionHeading: e
|
|
7
|
+
var a = {
|
|
8
|
+
ruleTitleRange: e.ruleTitleRange,
|
|
9
|
+
ruleTitleUpTo: e.ruleTitleUpTo,
|
|
10
|
+
ruleTitleFrom: e.ruleTitleFrom,
|
|
11
|
+
ruleTitleAny: e.ruleTitleAny,
|
|
12
|
+
ruleSentenceRange: e.ruleSentenceRange,
|
|
13
|
+
ruleSentenceUpTo: e.ruleSentenceUpTo,
|
|
14
|
+
ruleSentenceFrom: e.ruleSentenceFrom,
|
|
15
|
+
ruleSentenceAny: e.ruleSentenceAny
|
|
16
|
+
};
|
|
17
|
+
function o({ policy: a, lookup: o, approvedUserIds: s, approvedRoleIds: c, copy: l }) {
|
|
18
|
+
let u = t(a.script);
|
|
19
|
+
if (!u.groups.length || !u.isSupported) return;
|
|
20
|
+
let d = [];
|
|
21
|
+
for (let [e, t] of u.groups.entries()) {
|
|
22
|
+
let n = [];
|
|
23
|
+
for (let e of [...t.roleIds, ...t.userIds]) {
|
|
24
|
+
let t = o.get(e);
|
|
25
|
+
t && n.push({
|
|
26
|
+
id: e,
|
|
27
|
+
label: t.label,
|
|
28
|
+
approved: t.kind === "user" ? s.has(e) : !!c?.has(e)
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
n.length && d.push({
|
|
32
|
+
id: `group-${e + 1}`,
|
|
33
|
+
chips: n
|
|
54
34
|
});
|
|
55
35
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
id: "cancel",
|
|
69
|
-
label: b.cancel,
|
|
70
|
-
variant: "ghost",
|
|
71
|
-
surface: "menu",
|
|
72
|
-
icon: r
|
|
73
|
-
}), (u === "rejected" || u === "waiting_to_be_paid" && !p) && T && D.push({
|
|
74
|
-
id: "reopen",
|
|
75
|
-
label: b.reopen,
|
|
76
|
-
variant: "ghost",
|
|
77
|
-
surface: "menu",
|
|
78
|
-
icon: a
|
|
79
|
-
}), u === "waiting_to_be_paid" && p && m && E && D.push({
|
|
80
|
-
id: "cancelScheduledPayment",
|
|
81
|
-
label: b.cancelScheduledPayment,
|
|
82
|
-
variant: "ghost",
|
|
83
|
-
surface: "menu",
|
|
84
|
-
icon: i
|
|
85
|
-
}), D;
|
|
36
|
+
if (!d.length) return;
|
|
37
|
+
let { condition: f, hasKnownAmountBounds: p } = n(a.trigger);
|
|
38
|
+
if (!p) return;
|
|
39
|
+
let m = {
|
|
40
|
+
...e,
|
|
41
|
+
...l
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
title: i(f, m),
|
|
45
|
+
sentence: r(f, m),
|
|
46
|
+
steps: d
|
|
47
|
+
};
|
|
86
48
|
}
|
|
87
49
|
//#endregion
|
|
88
|
-
export {
|
|
50
|
+
export { a as APPROVAL_POLICY_RULE_COPY_EN, o as buildApprovalPolicyCardView };
|
|
@@ -1,50 +1,7 @@
|
|
|
1
|
-
import { ApprovalPoliciesSettingsDefaultLabels as e } from "../../../../shared/approval-policy/feature/dist/lib/labels.js";
|
|
2
|
-
import { parseApprovalPolicyScript as t } from "../../../../shared/approval-policy/util/dist/lib/policyScript.js";
|
|
3
|
-
import { parseApprovalPolicyTrigger as n } from "../../../../shared/approval-policy/util/dist/lib/policyTrigger.js";
|
|
4
|
-
import { buildPolicySentence as r, buildPolicyTitle as i } from "../../../../shared/approval-policy/feature/dist/lib/policyViewModel.js";
|
|
5
|
-
import "../../../../shared/approval-policy/feature/dist/index.js";
|
|
6
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index7.js
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
ruleTitleFrom: e.ruleTitleFrom,
|
|
11
|
-
ruleTitleAny: e.ruleTitleAny,
|
|
12
|
-
ruleSentenceRange: e.ruleSentenceRange,
|
|
13
|
-
ruleSentenceUpTo: e.ruleSentenceUpTo,
|
|
14
|
-
ruleSentenceFrom: e.ruleSentenceFrom,
|
|
15
|
-
ruleSentenceAny: e.ruleSentenceAny
|
|
16
|
-
};
|
|
17
|
-
function o({ policy: a, lookup: o, approvedUserIds: s, approvedRoleIds: c, copy: l }) {
|
|
18
|
-
let u = t(a.script);
|
|
19
|
-
if (!u.groups.length || !u.isSupported) return;
|
|
20
|
-
let d = [];
|
|
21
|
-
for (let [e, t] of u.groups.entries()) {
|
|
22
|
-
let n = [];
|
|
23
|
-
for (let e of [...t.roleIds, ...t.userIds]) {
|
|
24
|
-
let t = o.get(e);
|
|
25
|
-
t && n.push({
|
|
26
|
-
id: e,
|
|
27
|
-
label: t.label,
|
|
28
|
-
approved: t.kind === "user" ? s.has(e) : !!c?.has(e)
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
n.length && d.push({
|
|
32
|
-
id: `group-${e + 1}`,
|
|
33
|
-
chips: n
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
if (!d.length) return;
|
|
37
|
-
let { condition: f, hasKnownAmountBounds: p } = n(a.trigger);
|
|
38
|
-
if (!p) return;
|
|
39
|
-
let m = {
|
|
40
|
-
...e,
|
|
41
|
-
...l
|
|
42
|
-
};
|
|
43
|
-
return {
|
|
44
|
-
title: i(f, m),
|
|
45
|
-
sentence: r(f, m),
|
|
46
|
-
steps: d
|
|
47
|
-
};
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
let n = e ?? [];
|
|
4
|
+
return t ? n.filter((e) => !e.created_at || e.created_at >= t) : n.slice(0, 1);
|
|
48
5
|
}
|
|
49
6
|
//#endregion
|
|
50
|
-
export {
|
|
7
|
+
export { e as currentApprovalRound };
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
import { currentApprovalRound as e } from "./index7.js";
|
|
1
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index8.js
|
|
2
|
-
function
|
|
3
|
-
let
|
|
4
|
-
|
|
3
|
+
function t({ requestsNewestFirst: t, roundStartedAt: n, lookup: r }) {
|
|
4
|
+
let i = e(t, n), a = [];
|
|
5
|
+
for (let e of i) {
|
|
6
|
+
if (e.status !== "waiting") continue;
|
|
7
|
+
let t = [...e.role_ids ?? [], ...e.user_ids ?? []].map((e) => r.get(e)?.label).filter((e) => !!e);
|
|
8
|
+
t.length && a.push({
|
|
9
|
+
id: e.id,
|
|
10
|
+
names: t
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
return a;
|
|
5
14
|
}
|
|
6
15
|
//#endregion
|
|
7
|
-
export {
|
|
16
|
+
export { t as buildPendingApproverGroups };
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { currentApprovalRound as e } from "./index8.js";
|
|
2
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index9.js
|
|
3
|
-
function
|
|
4
|
-
let
|
|
5
|
-
for (let
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
names: t
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
return a;
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = [];
|
|
4
|
+
for (let n of e.steps) n.chips.some((e) => e.approved) || t.push({
|
|
5
|
+
id: n.id,
|
|
6
|
+
names: n.chips.map((e) => e.label)
|
|
7
|
+
});
|
|
8
|
+
return t;
|
|
14
9
|
}
|
|
15
10
|
//#endregion
|
|
16
|
-
export {
|
|
11
|
+
export { e as buildPendingApproverGroupsFromCardView };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js
CHANGED
|
@@ -5,7 +5,7 @@ import { VENDOR_SUMMARY_CARD_LABELS_EN as i } from "./index11.js";
|
|
|
5
5
|
import "./index13.js";
|
|
6
6
|
import { BILL_STATUS_BADGE_LABELS_EN as a } from "../../../../shared/document-status/ui/dist/index2.js";
|
|
7
7
|
import "../../../../shared/document-status/ui/dist/index.js";
|
|
8
|
-
import { DUE_DATE_VALUE_LABELS_EN as o } from "../../../ui/dist/
|
|
8
|
+
import { DUE_DATE_VALUE_LABELS_EN as o } from "../../../ui/dist/index19.js";
|
|
9
9
|
import "../../../ui/dist/index.js";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js
|
|
11
11
|
var s = {
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js
CHANGED
|
@@ -12,7 +12,7 @@ import "./index13.js";
|
|
|
12
12
|
import { BillStatusBadge as f } from "../../../../shared/document-status/ui/dist/index4.js";
|
|
13
13
|
import "../../../../shared/document-status/ui/dist/index.js";
|
|
14
14
|
import { BillActionButtons as p, NO_BILL_ACTIONS as m } from "../../../ui/dist/index2.js";
|
|
15
|
-
import { DueDateValue as h } from "../../../ui/dist/
|
|
15
|
+
import { DueDateValue as h } from "../../../ui/dist/index20.js";
|
|
16
16
|
import "../../../ui/dist/index.js";
|
|
17
17
|
import { mergeBillDetailBodyLabels as g } from "./index14.js";
|
|
18
18
|
import { ScheduledSummaryBadge as _ } from "./index5.js";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogHeader as i, DialogTitle as a, DropdownMenu as o, DropdownMenuContent as s, DropdownMenuGroup as c, DropdownMenuItem as l, DropdownMenuLabel as ee, DropdownMenuSeparator as u, DropdownMenuTrigger as d, RequiredFieldsLegend as f } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { InlineErrorAlert as te } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
3
3
|
import "../../../../shared/ui/dist/index.js";
|
|
4
|
-
import { groupBySectionHeading as p } from "../../../ui/dist/
|
|
4
|
+
import { groupBySectionHeading as p } from "../../../ui/dist/index8.js";
|
|
5
5
|
import "../../../ui/dist/index.js";
|
|
6
6
|
import { BillDetailBody as m } from "./index15.js";
|
|
7
7
|
import "./index16.js";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js
CHANGED
|
@@ -2,7 +2,7 @@ import { APPROVAL_POLICY_CARD_LABELS_EN as e } from "./index2.js";
|
|
|
2
2
|
import "./index4.js";
|
|
3
3
|
import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../../../shared/document-status/ui/dist/index2.js";
|
|
4
4
|
import "../../../../shared/document-status/ui/dist/index.js";
|
|
5
|
-
import { DUE_DATE_VALUE_LABELS_EN as n } from "../../../ui/dist/
|
|
5
|
+
import { DUE_DATE_VALUE_LABELS_EN as n } from "../../../ui/dist/index19.js";
|
|
6
6
|
import "../../../ui/dist/index.js";
|
|
7
7
|
import { BILL_AUDIT_HISTORY_SECTION_LABELS_EN as r } from "./index14.js";
|
|
8
8
|
import "./index16.js";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js
CHANGED
|
@@ -8,8 +8,8 @@ import "./index9.js";
|
|
|
8
8
|
import { BillStatusBadge as m } from "../../../../shared/document-status/ui/dist/index4.js";
|
|
9
9
|
import "../../../../shared/document-status/ui/dist/index.js";
|
|
10
10
|
import { BillActionButtons as h, NO_BILL_ACTIONS as g } from "../../../ui/dist/index2.js";
|
|
11
|
-
import { BillOverflowMenu as _ } from "../../../ui/dist/
|
|
12
|
-
import { DueDateValue as v } from "../../../ui/dist/
|
|
11
|
+
import { BillOverflowMenu as _ } from "../../../ui/dist/index9.js";
|
|
12
|
+
import { DueDateValue as v } from "../../../ui/dist/index20.js";
|
|
13
13
|
import "../../../ui/dist/index.js";
|
|
14
14
|
import { ScheduledSummaryBadge as y } from "./index5.js";
|
|
15
15
|
import { BILL_DETAILS_SHEET_LABELS_EN as b } from "./index33.js";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index36.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index36.js
|
|
2
2
|
var e = {
|
|
3
3
|
message: "This bill is a possible duplicate.",
|
|
4
|
-
|
|
5
|
-
invoiceNumberColumn: "Invoice number",
|
|
6
|
-
amountColumn: "Amount",
|
|
7
|
-
addedOnColumn: "Added on",
|
|
4
|
+
createdOnColumn: "Created on",
|
|
8
5
|
dueDateColumn: "Due date",
|
|
6
|
+
amountColumn: "Amount",
|
|
9
7
|
statusColumn: "Status",
|
|
8
|
+
loadingRows: "Loading possible duplicates",
|
|
9
|
+
question: "Is this bill a duplicate?",
|
|
10
10
|
openFullScreenButton: "Review duplicate in full screen",
|
|
11
11
|
notADuplicateButton: "Not a duplicate",
|
|
12
|
-
removeBillButton: "
|
|
12
|
+
removeBillButton: "Cancel this bill"
|
|
13
13
|
};
|
|
14
14
|
//#endregion
|
|
15
15
|
export { e as BILL_DUPLICATE_NOTICE_LABELS_EN };
|