@tesouro/embedded-components-react 0.5.303 → 0.5.305
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/bill-detail/feature/dist/index.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index12.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index13.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index14.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index15.js +7 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index16.js +8 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index17.js +24 -157
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index18.js +20 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index19.js +13 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index20.js +153 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index21.js +17 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +23 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +42 -55
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +93 -107
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +77 -185
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +3 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +55 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +111 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index29.js +184 -463
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index3.js +14 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index30.js +78 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +61 -74
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +115 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +449 -216
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +116 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +11 -249
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +85 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +80 -648
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +240 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +44 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +38 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +242 -240
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +25 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +538 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +3 -66
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +42 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +239 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +67 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index49.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +227 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index6.js +82 -224
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index7.js +45 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index8.js +4 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index29.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/BillsTab.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -1,229 +1,87 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
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/ui/dist/index.js";
|
|
9
|
-
import { derivePayableStatus as r } from "../../../util/dist/lib/derivePayableStatus.js";
|
|
10
|
-
import { DuplicateVerdict as i } from "../../../util/dist/lib/duplicateVerdict.js";
|
|
11
|
-
import { suspectedPayableDuplicates as a } from "../../../util/dist/lib/payableDuplicates.js";
|
|
12
|
-
import { duplicateVerdictMatches as o, groupSuspectedDuplicates as s, resolveDuplicateOriginalId as c } from "../../../util/dist/lib/groupDuplicates.js";
|
|
13
|
-
import { isEditablePayableStatus as l } from "../../../util/dist/lib/isEditablePayableStatus.js";
|
|
14
|
-
import { payableRemoval as u } from "../../../util/dist/lib/payableRemoval.js";
|
|
15
|
-
import { resolveVendorName as d } from "../../../util/dist/lib/resolveVendor.js";
|
|
16
|
-
import { useApplyDuplicateVerdictsMutation as f } from "../../../data-access/dist/lib/useApplyDuplicateVerdictsMutation.js";
|
|
17
|
-
import "../../../data-access/dist/index.js";
|
|
18
|
-
import { usePayablesByIdsQueries as p } from "../../data-access/dist/index22.js";
|
|
19
|
-
import "../../data-access/dist/index.js";
|
|
20
|
-
import { duplicateRemovalPrompt as m } from "./index4.js";
|
|
21
|
-
import { DUPLICATE_BILLS_LABELS_EN as h } from "./index5.js";
|
|
22
|
-
import { useCallback as g, useMemo as _, useState as v } from "react";
|
|
23
|
-
import { BanIcon as y, FileCheckIcon as b, Trash2Icon as x } from "lucide-react";
|
|
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";
|
|
5
|
+
import { BanIcon as r, CalendarXIcon as i, RotateCcwIcon as a, ThumbsDownIcon as o, ThumbsUpIcon as s } from "lucide-react";
|
|
24
6
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index6.js
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return t ? s(e).map(({ members: e }) => e).find((e) => e.some((e) => e.id === t)) ?? [] : [];
|
|
7
|
+
function c(n) {
|
|
8
|
+
return e(n, [t.CounterpartReadOrg]);
|
|
28
9
|
}
|
|
29
|
-
function
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
U,
|
|
73
|
-
T,
|
|
74
|
-
W.toast
|
|
75
|
-
]), K = _(() => ({
|
|
76
|
-
delete: {
|
|
77
|
-
action: O.deleteAction,
|
|
78
|
-
title: O.deleteConfirmTitle,
|
|
79
|
-
description: O.deleteConfirmDescription,
|
|
80
|
-
confirmButton: O.deleteConfirmButton,
|
|
81
|
-
backButton: O.deleteConfirmBackButton,
|
|
82
|
-
toast: O.deletedToast
|
|
83
|
-
},
|
|
84
|
-
cancel: {
|
|
85
|
-
action: O.cancelAction,
|
|
86
|
-
title: O.cancelConfirmTitle,
|
|
87
|
-
description: O.cancelConfirmDescription,
|
|
88
|
-
confirmButton: O.cancelConfirmButton,
|
|
89
|
-
backButton: O.cancelConfirmBackButton,
|
|
90
|
-
toast: O.cancelledToast
|
|
91
|
-
},
|
|
92
|
-
confirm: {
|
|
93
|
-
action: O.confirmAction,
|
|
94
|
-
title: O.confirmDuplicateTitle,
|
|
95
|
-
description: O.confirmDuplicateDescription,
|
|
96
|
-
confirmButton: O.confirmBillButton,
|
|
97
|
-
backButton: O.cancelConfirmBackButton,
|
|
98
|
-
toast: O.confirmedToast
|
|
99
|
-
}
|
|
100
|
-
}), [O]), q = K[L?.removeBy ?? "cancel"], J = g(async () => {
|
|
101
|
-
L && (await H(L.payable, i.Remove, K[L.removeBy].toast, L.payable.id === j ? T : void 0), R(void 0));
|
|
102
|
-
}, [
|
|
103
|
-
H,
|
|
104
|
-
T,
|
|
105
|
-
j,
|
|
106
|
-
L,
|
|
107
|
-
K
|
|
108
|
-
]), Y = g(async () => {
|
|
109
|
-
z && (await H(z.payable, i.Keep, O.dismissedToast, void 0, z.originalPayableId), B(void 0));
|
|
110
|
-
}, [
|
|
111
|
-
H,
|
|
112
|
-
O.dismissedToast,
|
|
113
|
-
z
|
|
114
|
-
]), X = w && !!(A && j), Z = X && !!V, Q = _(() => {
|
|
115
|
-
let e = new Map(N.flatMap((e) => e.data ? [[e.data.id, e.data]] : []));
|
|
116
|
-
s?.id && e.set(s.id, s);
|
|
117
|
-
let i = C([...e.values()], j);
|
|
118
|
-
if (i.length < 2) return [];
|
|
119
|
-
let o = c(i), f = (e) => {
|
|
120
|
-
let t = e.total_amount ?? e.amount_due;
|
|
121
|
-
return t == null ? "" : n(t / 100, { currencyCode: e.currency ?? "USD" });
|
|
122
|
-
};
|
|
123
|
-
return i.map((e) => {
|
|
124
|
-
let n = e.status ? r({
|
|
125
|
-
apiStatus: e.status,
|
|
126
|
-
dueDate: e.due_date,
|
|
127
|
-
scheduledPaymentDate: e.scheduled_payment_date
|
|
128
|
-
}) : void 0, i = e.id === o, s = e.id === j, c = w && a(e).length > 0, p = d(e), m = u(e.status);
|
|
129
|
-
return {
|
|
130
|
-
id: e.id,
|
|
131
|
-
roleLabel: p,
|
|
132
|
-
badges: [...i ? [O.originalBillBadge] : [], ...s ? [O.currentBillBadge] : []],
|
|
133
|
-
invoiceNumberLabel: e.document_id ?? "",
|
|
134
|
-
roleTone: i ? void 0 : "warning",
|
|
135
|
-
amountLabel: f(e),
|
|
136
|
-
addedOnLabel: t(e.created_at?.slice(0, 10)),
|
|
137
|
-
dueDateLabel: t(e.due_date),
|
|
138
|
-
status: n?.status,
|
|
139
|
-
statusTone: n?.tone,
|
|
140
|
-
onOpen: !s && E ? () => E(e.id, l(e.status ?? void 0)) : void 0,
|
|
141
|
-
menu: c ? {
|
|
142
|
-
triggerLabel: O.openRow({
|
|
143
|
-
vendorLabel: p,
|
|
144
|
-
invoiceNumberLabel: "",
|
|
145
|
-
addedOnLabel: t(e.created_at?.slice(0, 10))
|
|
146
|
-
}),
|
|
147
|
-
items: [{
|
|
148
|
-
id: "not-duplicate",
|
|
149
|
-
label: O.notDuplicateAction,
|
|
150
|
-
icon: b,
|
|
151
|
-
disabled: P.isPending,
|
|
152
|
-
onSelect: () => B({
|
|
153
|
-
payable: e,
|
|
154
|
-
originalPayableId: i ? void 0 : o
|
|
155
|
-
})
|
|
156
|
-
}, ...m ? [{
|
|
157
|
-
id: "cancel-duplicate",
|
|
158
|
-
label: K[m].action,
|
|
159
|
-
icon: m === "delete" ? x : y,
|
|
160
|
-
disabled: P.isPending,
|
|
161
|
-
onSelect: () => R({
|
|
162
|
-
payable: e,
|
|
163
|
-
removeBy: m
|
|
164
|
-
})
|
|
165
|
-
}] : []]
|
|
166
|
-
} : void 0
|
|
167
|
-
};
|
|
10
|
+
function l({ status: n, scopes: r, arePendingApproversUnknown: i, hasApprovalPolicy: a = !0, hasWaitingRequest: o }) {
|
|
11
|
+
let s = e(r, [t.PayableApproveOrg]);
|
|
12
|
+
return !!(n === "approve_in_progress" && s);
|
|
13
|
+
}
|
|
14
|
+
function u({ status: u, scopes: d, canDecideApprovalRequest: f, hasScheduledPayment: p, scheduledPaymentIntentId: m, arePendingApproversUnknown: h, hasApprovalPolicy: g, hasWaitingRequest: _, isPayabilityUnknown: v, canEdit: y, labels: b }) {
|
|
15
|
+
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 = [];
|
|
16
|
+
if (y && n(u) && T && D.push({
|
|
17
|
+
id: "edit",
|
|
18
|
+
label: b.edit,
|
|
19
|
+
variant: "default",
|
|
20
|
+
surface: "row"
|
|
21
|
+
}), u === "approve_in_progress" && f && (D.push({
|
|
22
|
+
id: "approve",
|
|
23
|
+
label: b.approve,
|
|
24
|
+
variant: "default",
|
|
25
|
+
surface: "row"
|
|
26
|
+
}), D.push({
|
|
27
|
+
id: "reject",
|
|
28
|
+
label: b.reject,
|
|
29
|
+
variant: "ghost",
|
|
30
|
+
surface: "row"
|
|
31
|
+
})), l({
|
|
32
|
+
status: u,
|
|
33
|
+
scopes: d,
|
|
34
|
+
arePendingApproversUnknown: h,
|
|
35
|
+
hasApprovalPolicy: g,
|
|
36
|
+
hasWaitingRequest: _
|
|
37
|
+
})) {
|
|
38
|
+
let e = g === !1 ? void 0 : b.policyOverridesHeading;
|
|
39
|
+
D.push({
|
|
40
|
+
id: "forceApprove",
|
|
41
|
+
label: b.forceApprove,
|
|
42
|
+
variant: "ghost",
|
|
43
|
+
surface: "menu",
|
|
44
|
+
icon: s,
|
|
45
|
+
sectionHeading: e
|
|
46
|
+
}), D.push({
|
|
47
|
+
id: "forceReject",
|
|
48
|
+
label: b.forceReject,
|
|
49
|
+
variant: "ghost",
|
|
50
|
+
surface: "menu",
|
|
51
|
+
icon: o,
|
|
52
|
+
sectionHeading: e
|
|
168
53
|
});
|
|
169
|
-
}
|
|
170
|
-
|
|
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
|
-
onConfirm: () => void J(),
|
|
201
|
-
onCancel: () => R(void 0),
|
|
202
|
-
isPending: P.isPending,
|
|
203
|
-
cancelButtonLabel: q.backButton
|
|
204
|
-
},
|
|
205
|
-
keepRowConfirmation: {
|
|
206
|
-
open: !!z,
|
|
207
|
-
copy: {
|
|
208
|
-
title: O.notDuplicateConfirmTitle,
|
|
209
|
-
description: O.notDuplicateConfirmDescription,
|
|
210
|
-
confirmButton: O.notDuplicateConfirmButton,
|
|
211
|
-
presentation: {
|
|
212
|
-
alignment: "center",
|
|
213
|
-
icon: b,
|
|
214
|
-
actionWidth: "equal"
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
onConfirm: () => void Y(),
|
|
218
|
-
onCancel: () => B(void 0),
|
|
219
|
-
isPending: P.isPending,
|
|
220
|
-
cancelButtonLabel: O.notDuplicateConfirmBackButton
|
|
221
|
-
},
|
|
222
|
-
isBusy: P.isPending,
|
|
223
|
-
rows: Q,
|
|
224
|
-
collapsedRowCount: S,
|
|
225
|
-
showMoreLabel: Q.length > S ? O.showMoreRows(Q.length - S) : void 0
|
|
226
|
-
};
|
|
54
|
+
}
|
|
55
|
+
let O = u === "waiting_to_be_paid" && x && !p, k = u === "waiting_to_be_paid" && x && S && C && w && !p && !v;
|
|
56
|
+
return O && D.push({
|
|
57
|
+
id: "markAsPaid",
|
|
58
|
+
label: b.markAsPaid,
|
|
59
|
+
variant: "outline",
|
|
60
|
+
surface: "row"
|
|
61
|
+
}), k && D.push({
|
|
62
|
+
id: "payBill",
|
|
63
|
+
label: b.payBill,
|
|
64
|
+
variant: "default",
|
|
65
|
+
surface: "row"
|
|
66
|
+
}), u === "new" && T && D.push({
|
|
67
|
+
id: "cancel",
|
|
68
|
+
label: b.cancel,
|
|
69
|
+
variant: "ghost",
|
|
70
|
+
surface: "menu",
|
|
71
|
+
icon: r
|
|
72
|
+
}), (u === "rejected" || u === "waiting_to_be_paid" && !p) && T && D.push({
|
|
73
|
+
id: "reopen",
|
|
74
|
+
label: b.reopen,
|
|
75
|
+
variant: "ghost",
|
|
76
|
+
surface: "menu",
|
|
77
|
+
icon: a
|
|
78
|
+
}), u === "waiting_to_be_paid" && p && m && E && D.push({
|
|
79
|
+
id: "cancelScheduledPayment",
|
|
80
|
+
label: b.cancelScheduledPayment,
|
|
81
|
+
variant: "ghost",
|
|
82
|
+
surface: "menu",
|
|
83
|
+
icon: i
|
|
84
|
+
}), D;
|
|
227
85
|
}
|
|
228
86
|
//#endregion
|
|
229
|
-
export {
|
|
87
|
+
export { l as canOverrideApprovalPolicy, c as canReadCounterpartBankAccounts, u as getBillDetailActions };
|
|
@@ -1,87 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "../../../../shared/
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
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
6
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index7.js
|
|
7
|
-
|
|
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
|
-
arePendingApproversUnknown: h,
|
|
35
|
-
hasApprovalPolicy: g,
|
|
36
|
-
hasWaitingRequest: _
|
|
37
|
-
})) {
|
|
38
|
-
let e = g === !1 ? void 0 : b.policyOverridesHeading;
|
|
39
|
-
D.push({
|
|
40
|
-
id: "forceApprove",
|
|
41
|
-
label: b.forceApprove,
|
|
42
|
-
variant: "ghost",
|
|
43
|
-
surface: "menu",
|
|
44
|
-
icon: s,
|
|
45
|
-
sectionHeading: e
|
|
46
|
-
}), D.push({
|
|
47
|
-
id: "forceReject",
|
|
48
|
-
label: b.forceReject,
|
|
49
|
-
variant: "ghost",
|
|
50
|
-
surface: "menu",
|
|
51
|
-
icon: o,
|
|
52
|
-
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
|
|
53
34
|
});
|
|
54
35
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
id: "cancel",
|
|
68
|
-
label: b.cancel,
|
|
69
|
-
variant: "ghost",
|
|
70
|
-
surface: "menu",
|
|
71
|
-
icon: r
|
|
72
|
-
}), (u === "rejected" || u === "waiting_to_be_paid" && !p) && T && D.push({
|
|
73
|
-
id: "reopen",
|
|
74
|
-
label: b.reopen,
|
|
75
|
-
variant: "ghost",
|
|
76
|
-
surface: "menu",
|
|
77
|
-
icon: a
|
|
78
|
-
}), u === "waiting_to_be_paid" && p && m && E && D.push({
|
|
79
|
-
id: "cancelScheduledPayment",
|
|
80
|
-
label: b.cancelScheduledPayment,
|
|
81
|
-
variant: "ghost",
|
|
82
|
-
surface: "menu",
|
|
83
|
-
icon: i
|
|
84
|
-
}), 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
|
+
};
|
|
85
48
|
}
|
|
86
49
|
//#endregion
|
|
87
|
-
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/index8.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,4 +1,4 @@
|
|
|
1
|
-
import { currentApprovalRound as e } from "./
|
|
1
|
+
import { currentApprovalRound as e } from "./index8.js";
|
|
2
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index9.js
|
|
3
3
|
function t({ requestsNewestFirst: t, roundStartedAt: n, lookup: r }) {
|
|
4
4
|
let i = e(t, n), a = [];
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import "./index26.js";
|
|
|
24
24
|
import "./index27.js";
|
|
25
25
|
import "./index28.js";
|
|
26
26
|
import "./index29.js";
|
|
27
|
-
import {
|
|
27
|
+
import { BillDialogScreen as t } from "./index31.js";
|
|
28
28
|
import "./index32.js";
|
|
29
29
|
import { BILL_DETAILS_SHEET_LABELS_EN as n } from "./index33.js";
|
|
30
30
|
import { BillDetailsSheet as r } from "./index34.js";
|
|
@@ -47,4 +47,4 @@ import "./index50.js";
|
|
|
47
47
|
import { UNSAVED_BILL_DIALOG_LABELS_EN as d } from "./index51.js";
|
|
48
48
|
import { UnsavedBillDialog as f } from "./index52.js";
|
|
49
49
|
import "./index53.js";
|
|
50
|
-
export { n as BILL_DETAILS_SHEET_LABELS_EN, a as BILL_REJECTED_BANNER_LABELS_EN,
|
|
50
|
+
export { n as BILL_DETAILS_SHEET_LABELS_EN, a as BILL_REJECTED_BANNER_LABELS_EN, r as BillDetailsSheet, t as BillDialogScreen, i as BillDuplicateNotice, o as BillRejectedBanner, s as DISCARD_CHANGES_DIALOG_LABELS_EN, c as DiscardChangesDialog, l as ExtractionNotice, u as SourceDocumentPanel, d as UNSAVED_BILL_DIALOG_LABELS_EN, f as UnsavedBillDialog, e as VendorSearchCombobox };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js
CHANGED
|
@@ -11,7 +11,7 @@ import { LineItemsSection as g } from "./index21.js";
|
|
|
11
11
|
import "./index22.js";
|
|
12
12
|
import { VendorSection as _ } from "./index27.js";
|
|
13
13
|
import "./index28.js";
|
|
14
|
-
import {
|
|
14
|
+
import { mergeBillDialogScreenLabels as v } from "./index29.js";
|
|
15
15
|
import { useFocusFirstInvalidField as y } from "./index30.js";
|
|
16
16
|
import { Fragment as b, useId as x } from "react";
|
|
17
17
|
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
@@ -194,4 +194,4 @@ function D({ open: D, onOpenChange: O, title: k, subtitle: A, notice: j, vendor:
|
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
//#endregion
|
|
197
|
-
export { D as
|
|
197
|
+
export { D as BillDialogScreen, D as default };
|
|
@@ -8,7 +8,7 @@ import "../../../../../shared/data-access/dist/index.js";
|
|
|
8
8
|
import { useWidgetConfig as n } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
9
9
|
import "../../../../../shared/feature/dist/index.js";
|
|
10
10
|
import { billsTabTestIds as r } from "./testIds.js";
|
|
11
|
-
import {
|
|
11
|
+
import { BillDetailsWidget as i, BillDialogWidget as a } from "../../../../bill-detail/feature/dist/index48.js";
|
|
12
12
|
import "../../../../bill-detail/feature/dist/index.js";
|
|
13
13
|
import "../../../../bill-upload/feature/dist/index.js";
|
|
14
14
|
import { BillsListWidget as o } from "../../../../bills-list/feature/dist/index20.js";
|
|
@@ -88,16 +88,16 @@ function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandle
|
|
|
88
88
|
maxFiles: 10,
|
|
89
89
|
onSettingsClick: S
|
|
90
90
|
}),
|
|
91
|
-
O ? /* @__PURE__ */ p(
|
|
91
|
+
O ? /* @__PURE__ */ p(a, {
|
|
92
92
|
open: O,
|
|
93
93
|
onOpenChange: k,
|
|
94
94
|
payableId: w,
|
|
95
95
|
initialCounterpartId: E,
|
|
96
96
|
onOpenBill: W,
|
|
97
97
|
renderPaymentFlows: B.create,
|
|
98
|
-
copy: h?.
|
|
98
|
+
copy: h?.billDialog
|
|
99
99
|
}, w) : null,
|
|
100
|
-
M ? /* @__PURE__ */ p(
|
|
100
|
+
M ? /* @__PURE__ */ p(i, {
|
|
101
101
|
open: M,
|
|
102
102
|
onOpenChange: N,
|
|
103
103
|
payableId: A,
|
|
@@ -108,7 +108,7 @@ function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandle
|
|
|
108
108
|
renderPaymentFlows: B.details,
|
|
109
109
|
labels: h?.billDetails
|
|
110
110
|
}) : null,
|
|
111
|
-
P ? /* @__PURE__ */ p(
|
|
111
|
+
P ? /* @__PURE__ */ p(a, {
|
|
112
112
|
open: P,
|
|
113
113
|
onOpenChange: F,
|
|
114
114
|
payableId: A,
|
|
@@ -117,7 +117,7 @@ function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandle
|
|
|
117
117
|
onEdit: q,
|
|
118
118
|
onOpenBill: W,
|
|
119
119
|
renderPaymentFlows: B.view,
|
|
120
|
-
copy: h?.
|
|
120
|
+
copy: h?.billDialog
|
|
121
121
|
}, A) : null
|
|
122
122
|
]
|
|
123
123
|
});
|
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.305", n = "1a3169257f1a7bd17210433f843b54daf7a07790", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|