@tesouro/embedded-components-react 0.11.41 → 0.11.42
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/expense-management-widget/data-access/dist/lib/useTrackReceiptMatching.js +25 -22
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/lib/useUploadReceiptMutation.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/ExpenseManagementWidget.js +178 -178
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -62,38 +62,41 @@ function y({ intervalMs: y = m, maxAttempts: b = h } = {}) {
|
|
|
62
62
|
stillProcessing: 0
|
|
63
63
|
};
|
|
64
64
|
if (n.length === 0) return i;
|
|
65
|
-
let a = new Set(n), s = C.current?.signal ?? new AbortController().signal;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
65
|
+
let a = new Set(n), s = C.current?.signal ?? new AbortController().signal, c = [], u = [];
|
|
66
|
+
try {
|
|
67
|
+
for (let t = 0; t < b && a.size > 0; t++) {
|
|
68
|
+
if (s.aborted) throw new DOMException("Aborted", "AbortError");
|
|
69
|
+
let { data: n } = await e({
|
|
70
|
+
client: x,
|
|
71
|
+
headers: r(S),
|
|
72
|
+
query: {
|
|
73
|
+
id__in: [...a],
|
|
74
|
+
limit: g
|
|
75
|
+
},
|
|
76
|
+
signal: s,
|
|
77
|
+
throwOnError: !0
|
|
78
|
+
});
|
|
79
|
+
for (let e of n?.data ?? []) {
|
|
80
|
+
if (!a.has(e.id)) continue;
|
|
81
|
+
let t = _(e);
|
|
82
|
+
t && (a.delete(e.id), i[t] += 1, c.push(e.id), t === "matched" && e.transaction_id && u.push(e.transaction_id));
|
|
83
|
+
}
|
|
84
|
+
a.size > 0 && t < b - 1 && await v(y, s);
|
|
83
85
|
}
|
|
84
|
-
|
|
86
|
+
} finally {
|
|
87
|
+
await Promise.all([
|
|
85
88
|
w(),
|
|
86
|
-
...
|
|
89
|
+
...c.map((e) => t(o({
|
|
87
90
|
client: x,
|
|
88
91
|
organizationId: S,
|
|
89
92
|
receiptId: e
|
|
90
93
|
}))),
|
|
91
|
-
...
|
|
94
|
+
...u.map((e) => t(l({
|
|
92
95
|
client: x,
|
|
93
96
|
organizationId: S,
|
|
94
97
|
transactionId: e
|
|
95
98
|
})))
|
|
96
|
-
])
|
|
99
|
+
]);
|
|
97
100
|
}
|
|
98
101
|
return {
|
|
99
102
|
...i,
|
|
@@ -10,20 +10,20 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { analyticsReceiptsInvalidationKey as i, receiptsInvalidationKey as a } from "./queryKeys.js";
|
|
11
11
|
import { useMutation as o } from "@tanstack/react-query";
|
|
12
12
|
// ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/lib/useUploadReceiptMutation.js
|
|
13
|
-
function s() {
|
|
14
|
-
let { client:
|
|
13
|
+
function s({ invalidateOnSuccess: s = !0 } = {}) {
|
|
14
|
+
let { client: c, organizationId: l } = n();
|
|
15
15
|
return o({
|
|
16
16
|
...e({
|
|
17
|
-
client:
|
|
18
|
-
headers: r(
|
|
17
|
+
client: c,
|
|
18
|
+
headers: r(l)
|
|
19
19
|
}),
|
|
20
20
|
onSuccess: async () => {
|
|
21
|
-
await Promise.all([t(a({
|
|
22
|
-
client:
|
|
23
|
-
organizationId:
|
|
21
|
+
s && await Promise.all([t(a({
|
|
22
|
+
client: c,
|
|
23
|
+
organizationId: l
|
|
24
24
|
})), t(i({
|
|
25
|
-
client:
|
|
26
|
-
organizationId:
|
|
25
|
+
client: c,
|
|
26
|
+
organizationId: l
|
|
27
27
|
}))]);
|
|
28
28
|
}
|
|
29
29
|
});
|
|
@@ -8,8 +8,8 @@ import { useAllOrganizationUsersQuery as n } from "../../../../../shared/data-ac
|
|
|
8
8
|
import "../../../../../shared/data-access/dist/index.js";
|
|
9
9
|
import "../../../../../shared/ui/dist/index.js";
|
|
10
10
|
import { useAnalyticsTrack as r } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
11
|
-
import { WidgetProvider as
|
|
12
|
-
import { useOptionalWidgetToken as
|
|
11
|
+
import { WidgetProvider as i } from "../../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
12
|
+
import { useOptionalWidgetToken as ee } from "../../../../../shared/feature/dist/lib/WidgetProvider/useWidgetToken.js";
|
|
13
13
|
import { useWidgetConfig as a, useWidgetInitStaleForToken as o, useWidgetLoading as s } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
14
14
|
import "../../../../../shared/feature/dist/index.js";
|
|
15
15
|
import { EXPENSE_STATUS_BADGE_LABELS_EN as c } from "../expenseStatus.js";
|
|
@@ -30,218 +30,158 @@ import "../../../../receipt-match/feature/dist/index.js";
|
|
|
30
30
|
import { TransactionDetailsFeature as oe } from "../TransactionDetails/TransactionDetailsFeature.js";
|
|
31
31
|
import { ExpenseManagementWidgetAnalyticsEvent as se, WIDGET_NAME as v } from "./analytics/events.js";
|
|
32
32
|
import { useExpensesTransactions as y } from "./useExpensesTransactions.js";
|
|
33
|
-
import { useExpenseActionItems as
|
|
34
|
-
import { useExpenseTabBadgeCounts as
|
|
35
|
-
import { UploadReceiptWidget as
|
|
33
|
+
import { useExpenseActionItems as b } from "./useExpenseActionItems.js";
|
|
34
|
+
import { useExpenseTabBadgeCounts as ce } from "./useExpenseTabBadgeCounts.js";
|
|
35
|
+
import { UploadReceiptWidget as le } from "../../../../../upload-receipt-widget/feature/dist/lib/UploadReceiptWidget.js";
|
|
36
36
|
import "../../../../../upload-receipt-widget/feature/dist/index.js";
|
|
37
|
-
import { useEffect as
|
|
38
|
-
import { Fragment as
|
|
37
|
+
import { useEffect as ue, useMemo as x, useRef as S, useState as C } from "react";
|
|
38
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
39
39
|
// ../../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/ExpenseManagementWidget.js
|
|
40
|
-
var
|
|
41
|
-
function
|
|
42
|
-
let
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}, [
|
|
46
|
-
let { initResponse:
|
|
47
|
-
userId:
|
|
48
|
-
enabled: !
|
|
49
|
-
}),
|
|
50
|
-
|
|
40
|
+
var de = ".pdf,.png,.jpg,.jpeg,.gif,.svg";
|
|
41
|
+
function D({ screenLabels: i, headerLabels: v, transactionsTableLabels: D, filterBarLabels: O, actionItemsLabels: k, statusBadgeLabels: A, transactionDetailsLabels: fe, transactionDetailsCardLabels: pe, transactionDetailsActionsLabels: me, fileViewerLabels: he, receiptUpload: ge, bankDisplayName: _e, bankLogoSrc: ve, bankLogoAlt: ye, isBankingTaglineVisible: be, onSettingsClick: xe }) {
|
|
42
|
+
let j = r();
|
|
43
|
+
ue(() => {
|
|
44
|
+
j(se.Mounted);
|
|
45
|
+
}, [j]);
|
|
46
|
+
let { initResponse: M, organizationId: Se } = a(), N = s(), Ce = o(), P = M?.scopes, F = re(P), { hasDirectReports: we, isLoading: Te } = te({
|
|
47
|
+
userId: M?.userId ?? void 0,
|
|
48
|
+
enabled: !N && !F
|
|
49
|
+
}), I = F || we, L = !F && Te, Ee = N && !M, De = ee()?.state.status === "loading" && !M, Oe = Ee || De || L, R = `${Se ?? ""}:${M?.userId ?? ""}`, [z, B] = C("my-transactions"), V = S(null), H = S(null), ke = (e) => {
|
|
50
|
+
V.current = R, B(e);
|
|
51
51
|
};
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
ue(() => {
|
|
53
|
+
N || L || H.current === R || (H.current = R, V.current !== R && B(I ? "team-transactions" : "my-transactions"));
|
|
54
54
|
}, [
|
|
55
|
-
|
|
55
|
+
N,
|
|
56
|
+
L,
|
|
56
57
|
I,
|
|
57
|
-
|
|
58
|
-
L
|
|
58
|
+
R
|
|
59
59
|
]);
|
|
60
|
-
let
|
|
60
|
+
let Ae = z === "team-transactions" && !I ? "my-transactions" : z, { data: U } = n({ enabled: I }), je = x(() => (U?.data ?? []).map((e) => ({
|
|
61
61
|
value: e.id,
|
|
62
62
|
label: e.name || e.email || e.id
|
|
63
|
-
})), [
|
|
63
|
+
})), [U]), W = x(() => {
|
|
64
64
|
let e = /* @__PURE__ */ new Map();
|
|
65
|
-
for (let t of
|
|
65
|
+
for (let t of U?.data ?? []) e.set(t.id, t.name || t.email || t.id);
|
|
66
66
|
return e;
|
|
67
|
-
}, [
|
|
67
|
+
}, [U]), G = x(() => ({
|
|
68
68
|
...c,
|
|
69
|
-
...
|
|
70
|
-
}), [
|
|
69
|
+
...A
|
|
70
|
+
}), [A]), K = y({
|
|
71
71
|
scope: "mine",
|
|
72
|
-
statusBadgeLabels:
|
|
73
|
-
}),
|
|
72
|
+
statusBadgeLabels: G
|
|
73
|
+
}), q = y({
|
|
74
74
|
scope: "team",
|
|
75
|
-
cardholderByUserId:
|
|
76
|
-
enabled:
|
|
77
|
-
statusBadgeLabels:
|
|
78
|
-
}), [
|
|
79
|
-
e.length !== 0 &&
|
|
80
|
-
},
|
|
81
|
-
onReviewNewTransactions:
|
|
82
|
-
onReviewRejectedTransactions:
|
|
83
|
-
onReviewPendingApproval:
|
|
75
|
+
cardholderByUserId: W,
|
|
76
|
+
enabled: I,
|
|
77
|
+
statusBadgeLabels: G
|
|
78
|
+
}), [J, Y] = C(null), [Me, X] = C(!1), Z = (e) => {
|
|
79
|
+
e.length !== 0 && Y({ transactionIds: e });
|
|
80
|
+
}, Ne = {
|
|
81
|
+
onReviewNewTransactions: Z,
|
|
82
|
+
onReviewRejectedTransactions: Z,
|
|
83
|
+
onReviewPendingApproval: Z,
|
|
84
84
|
onReviewUnmatchedReceipts: () => {
|
|
85
|
-
|
|
85
|
+
X(!0);
|
|
86
86
|
}
|
|
87
|
-
},
|
|
87
|
+
}, Pe = b({
|
|
88
88
|
scope: "mine",
|
|
89
|
-
...
|
|
90
|
-
}),
|
|
89
|
+
...Ne
|
|
90
|
+
}), Fe = b({
|
|
91
91
|
scope: "team",
|
|
92
|
-
isTeamVisible:
|
|
93
|
-
...
|
|
94
|
-
}), { mailboxAddress:
|
|
92
|
+
isTeamVisible: I,
|
|
93
|
+
...Ne
|
|
94
|
+
}), { mailboxAddress: Ie } = t({
|
|
95
95
|
relatedObjectType: "receipt",
|
|
96
|
-
enabled: _(
|
|
97
|
-
}),
|
|
98
|
-
let t = await
|
|
99
|
-
return t.id &&
|
|
100
|
-
},
|
|
101
|
-
let e =
|
|
102
|
-
return
|
|
103
|
-
},
|
|
104
|
-
Q.current = e,
|
|
105
|
-
},
|
|
96
|
+
enabled: _(P) && !Ce
|
|
97
|
+
}), Le = _(P) ? Ie : void 0, { onFileUpload: Re, onAwaitMatching: ze, ...Be } = ge ?? {}, Ve = h(), He = h({ invalidateOnSuccess: !!ze }), Ue = m(), We = S(null), Q = S(null), [Ge, Ke] = C(null), $ = ie(P), { trackBatch: qe, trackAttachedReceipt: Je } = g(), Ye = S([]), { myTransactionsCount: Xe, teamTransactionsCount: Ze } = ce({ isTeamVisible: I }), Qe = async (e) => {
|
|
98
|
+
let t = await He.mutateAsync({ body: { file: e } });
|
|
99
|
+
return t.id && Ye.current.push(t.id), t;
|
|
100
|
+
}, $e = () => {
|
|
101
|
+
let e = Ye.current.splice(0);
|
|
102
|
+
return qe(e);
|
|
103
|
+
}, et = (e) => {
|
|
104
|
+
Q.current = e, We.current?.click();
|
|
105
|
+
}, tt = async (t) => {
|
|
106
106
|
let n = Q.current;
|
|
107
107
|
if (Q.current = null, n) {
|
|
108
|
-
|
|
108
|
+
Ke(n);
|
|
109
109
|
try {
|
|
110
|
-
let e = await
|
|
110
|
+
let e = await Ve.mutateAsync({ body: { file: t } });
|
|
111
111
|
if (!e.id) throw Error("Receipt upload returned no id");
|
|
112
|
-
await
|
|
112
|
+
await Ue.mutateAsync({
|
|
113
113
|
path: { receipt_id: e.id },
|
|
114
114
|
body: { transaction_id: n }
|
|
115
|
-
}),
|
|
115
|
+
}), Je({
|
|
116
116
|
receiptId: e.id,
|
|
117
117
|
transactionId: n
|
|
118
118
|
}).catch(() => void 0);
|
|
119
119
|
} catch {
|
|
120
120
|
e.error(l.receiptUploadFailed);
|
|
121
121
|
} finally {
|
|
122
|
-
|
|
122
|
+
Ke(null);
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
},
|
|
126
|
-
emailAddress:
|
|
127
|
-
isUploading:
|
|
128
|
-
...
|
|
129
|
-
onFileUpload:
|
|
130
|
-
onAwaitMatching:
|
|
131
|
-
}),
|
|
132
|
-
open:
|
|
133
|
-
onClose: () =>
|
|
134
|
-
selectedTransactionId:
|
|
135
|
-
actionItemIds:
|
|
136
|
-
cardholderByUserId:
|
|
137
|
-
detailsLabels:
|
|
138
|
-
cardLabels:
|
|
139
|
-
actionsLabels:
|
|
140
|
-
statusBadgeLabels:
|
|
141
|
-
fileViewerLabels:
|
|
125
|
+
}, nt = /* @__PURE__ */ T(le, {
|
|
126
|
+
emailAddress: Le,
|
|
127
|
+
isUploading: Ve.isPending || He.isPending,
|
|
128
|
+
...Be,
|
|
129
|
+
onFileUpload: Re ?? Qe,
|
|
130
|
+
onAwaitMatching: ze ?? (Re ? void 0 : $e)
|
|
131
|
+
}), rt = /* @__PURE__ */ T(oe, {
|
|
132
|
+
open: J !== null,
|
|
133
|
+
onClose: () => Y(null),
|
|
134
|
+
selectedTransactionId: J?.transactionId,
|
|
135
|
+
actionItemIds: J?.transactionIds,
|
|
136
|
+
cardholderByUserId: W,
|
|
137
|
+
detailsLabels: fe,
|
|
138
|
+
cardLabels: pe,
|
|
139
|
+
actionsLabels: me,
|
|
140
|
+
statusBadgeLabels: A,
|
|
141
|
+
fileViewerLabels: he
|
|
142
142
|
});
|
|
143
|
-
return /* @__PURE__ */
|
|
144
|
-
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
isOpen:
|
|
147
|
-
onClose: () =>
|
|
143
|
+
return /* @__PURE__ */ E(w, { children: [
|
|
144
|
+
rt,
|
|
145
|
+
/* @__PURE__ */ T(ae, {
|
|
146
|
+
isOpen: Me,
|
|
147
|
+
onClose: () => X(!1)
|
|
148
148
|
}),
|
|
149
|
-
$ && /* @__PURE__ */
|
|
150
|
-
ref:
|
|
149
|
+
$ && /* @__PURE__ */ T("input", {
|
|
150
|
+
ref: We,
|
|
151
151
|
type: "file",
|
|
152
|
-
accept:
|
|
152
|
+
accept: de,
|
|
153
153
|
className: "ttw:hidden",
|
|
154
154
|
"aria-hidden": !0,
|
|
155
155
|
tabIndex: -1,
|
|
156
156
|
onChange: (e) => {
|
|
157
157
|
let t = e.target.files?.[0];
|
|
158
|
-
e.target.value = "", t &&
|
|
158
|
+
e.target.value = "", t && tt(t);
|
|
159
159
|
}
|
|
160
160
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
labels:
|
|
161
|
+
/* @__PURE__ */ T(p, {
|
|
162
|
+
labels: i,
|
|
163
163
|
headerLabels: v,
|
|
164
164
|
header: {
|
|
165
|
-
bankDisplayName:
|
|
166
|
-
bankLogoSrc:
|
|
167
|
-
bankLogoAlt:
|
|
168
|
-
isBankingTaglineVisible:
|
|
169
|
-
onSettingsClick: ne(
|
|
170
|
-
actions:
|
|
165
|
+
bankDisplayName: _e,
|
|
166
|
+
bankLogoSrc: ve,
|
|
167
|
+
bankLogoAlt: ye,
|
|
168
|
+
isBankingTaglineVisible: be,
|
|
169
|
+
onSettingsClick: ne(P) ? xe : void 0,
|
|
170
|
+
actions: nt
|
|
171
171
|
},
|
|
172
|
-
activeTab:
|
|
173
|
-
onActiveTabChange:
|
|
174
|
-
isLoading:
|
|
175
|
-
myTransactionsCount:
|
|
176
|
-
teamTransactionsCount:
|
|
177
|
-
myTransactionsContent: /* @__PURE__ */
|
|
178
|
-
labels:
|
|
179
|
-
items:
|
|
180
|
-
}), /* @__PURE__ */
|
|
181
|
-
onRowClick: (e) =>
|
|
182
|
-
onAddReceiptClick: $ ?
|
|
183
|
-
uploadingReceiptId:
|
|
184
|
-
labels:
|
|
185
|
-
rows: G.rows,
|
|
186
|
-
isLoading: G.isLoading,
|
|
187
|
-
sorting: G.sorting,
|
|
188
|
-
onSortingChange: G.onSortingChange,
|
|
189
|
-
pageSize: G.pageSize,
|
|
190
|
-
onPageSizeChange: G.onPageSizeChange,
|
|
191
|
-
pageSizeOptions: G.pageSizeOptions,
|
|
192
|
-
hasNextPage: G.hasNextPage,
|
|
193
|
-
hasPrevPage: G.hasPrevPage,
|
|
194
|
-
onNextPage: G.onNextPage,
|
|
195
|
-
onPrevPage: G.onPrevPage,
|
|
196
|
-
showCardholderColumn: G.showCardholderColumn,
|
|
197
|
-
showDepartmentColumn: G.showDepartmentColumn,
|
|
198
|
-
filterComponent: /* @__PURE__ */ w(f, {
|
|
199
|
-
labels: D,
|
|
200
|
-
searchValue: G.searchValue,
|
|
201
|
-
onSearchChange: G.onSearchChange,
|
|
202
|
-
activeFilterCount: G.activeFilterCount,
|
|
203
|
-
activeChips: G.activeChips,
|
|
204
|
-
onDismissChip: G.onDismissChip,
|
|
205
|
-
onClearAll: G.onClearAll,
|
|
206
|
-
allPresets: G.allPresets,
|
|
207
|
-
selectedDatePreset: G.selectedDatePreset,
|
|
208
|
-
dateFrom: G.dateFrom,
|
|
209
|
-
dateTo: G.dateTo,
|
|
210
|
-
onDateRangeChange: G.onDateRangeChange,
|
|
211
|
-
onDatePresetChange: G.onDatePresetChange,
|
|
212
|
-
paymentStatusOptions: G.paymentStatusOptions,
|
|
213
|
-
selectedPaymentStatus: G.selectedPaymentStatus,
|
|
214
|
-
onPaymentStatusChange: G.onPaymentStatusChange,
|
|
215
|
-
approvalStatusOptions: G.approvalStatusOptions,
|
|
216
|
-
selectedApprovalStatus: G.selectedApprovalStatus,
|
|
217
|
-
onApprovalStatusChange: G.onApprovalStatusChange,
|
|
218
|
-
typeOptions: G.typeOptions,
|
|
219
|
-
selectedTypes: G.selectedTypes,
|
|
220
|
-
onTypeChange: G.onTypeChange,
|
|
221
|
-
amountMode: G.amountMode,
|
|
222
|
-
onAmountModeChange: G.onAmountModeChange,
|
|
223
|
-
amountMin: G.amountMin,
|
|
224
|
-
amountMax: G.amountMax,
|
|
225
|
-
onAmountMinChange: G.onAmountMinChange,
|
|
226
|
-
onAmountMaxChange: G.onAmountMaxChange,
|
|
227
|
-
amountFlowDirection: G.amountFlowDirection,
|
|
228
|
-
onAmountFlowDirectionChange: G.onAmountFlowDirectionChange,
|
|
229
|
-
teamMemberOptions: [],
|
|
230
|
-
selectedTeamMembers: G.selectedTeamMembers,
|
|
231
|
-
onTeamMembersChange: G.onTeamMembersChange,
|
|
232
|
-
cardOnly: G.cardOnly,
|
|
233
|
-
onCardToggle: G.onCardToggle,
|
|
234
|
-
showTeamMemberFilter: !1
|
|
235
|
-
})
|
|
236
|
-
})] }),
|
|
237
|
-
teamTransactionsContent: F ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(u, {
|
|
238
|
-
labels: O,
|
|
239
|
-
items: Ie
|
|
240
|
-
}), /* @__PURE__ */ w(d, {
|
|
241
|
-
onRowClick: (e) => J({ transactionId: e }),
|
|
242
|
-
onAddReceiptClick: $ ? $e : void 0,
|
|
243
|
-
uploadingReceiptId: Ve ?? void 0,
|
|
244
|
-
labels: E,
|
|
172
|
+
activeTab: Ae,
|
|
173
|
+
onActiveTabChange: ke,
|
|
174
|
+
isLoading: Oe,
|
|
175
|
+
myTransactionsCount: Xe,
|
|
176
|
+
teamTransactionsCount: I ? Ze : void 0,
|
|
177
|
+
myTransactionsContent: /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(u, {
|
|
178
|
+
labels: k,
|
|
179
|
+
items: Pe
|
|
180
|
+
}), /* @__PURE__ */ T(d, {
|
|
181
|
+
onRowClick: (e) => Y({ transactionId: e }),
|
|
182
|
+
onAddReceiptClick: $ ? et : void 0,
|
|
183
|
+
uploadingReceiptId: Ge ?? void 0,
|
|
184
|
+
labels: D,
|
|
245
185
|
rows: K.rows,
|
|
246
186
|
isLoading: K.isLoading,
|
|
247
187
|
sorting: K.sorting,
|
|
@@ -255,8 +195,8 @@ function E({ screenLabels: ee, headerLabels: v, transactionsTableLabels: E, filt
|
|
|
255
195
|
onPrevPage: K.onPrevPage,
|
|
256
196
|
showCardholderColumn: K.showCardholderColumn,
|
|
257
197
|
showDepartmentColumn: K.showDepartmentColumn,
|
|
258
|
-
filterComponent: /* @__PURE__ */
|
|
259
|
-
labels:
|
|
198
|
+
filterComponent: /* @__PURE__ */ T(f, {
|
|
199
|
+
labels: O,
|
|
260
200
|
searchValue: K.searchValue,
|
|
261
201
|
onSearchChange: K.onSearchChange,
|
|
262
202
|
activeFilterCount: K.activeFilterCount,
|
|
@@ -286,26 +226,86 @@ function E({ screenLabels: ee, headerLabels: v, transactionsTableLabels: E, filt
|
|
|
286
226
|
onAmountMaxChange: K.onAmountMaxChange,
|
|
287
227
|
amountFlowDirection: K.amountFlowDirection,
|
|
288
228
|
onAmountFlowDirectionChange: K.onAmountFlowDirectionChange,
|
|
289
|
-
teamMemberOptions:
|
|
229
|
+
teamMemberOptions: [],
|
|
290
230
|
selectedTeamMembers: K.selectedTeamMembers,
|
|
291
231
|
onTeamMembersChange: K.onTeamMembersChange,
|
|
292
232
|
cardOnly: K.cardOnly,
|
|
293
|
-
onCardToggle: K.onCardToggle
|
|
233
|
+
onCardToggle: K.onCardToggle,
|
|
234
|
+
showTeamMemberFilter: !1
|
|
235
|
+
})
|
|
236
|
+
})] }),
|
|
237
|
+
teamTransactionsContent: I ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(u, {
|
|
238
|
+
labels: k,
|
|
239
|
+
items: Fe
|
|
240
|
+
}), /* @__PURE__ */ T(d, {
|
|
241
|
+
onRowClick: (e) => Y({ transactionId: e }),
|
|
242
|
+
onAddReceiptClick: $ ? et : void 0,
|
|
243
|
+
uploadingReceiptId: Ge ?? void 0,
|
|
244
|
+
labels: D,
|
|
245
|
+
rows: q.rows,
|
|
246
|
+
isLoading: q.isLoading,
|
|
247
|
+
sorting: q.sorting,
|
|
248
|
+
onSortingChange: q.onSortingChange,
|
|
249
|
+
pageSize: q.pageSize,
|
|
250
|
+
onPageSizeChange: q.onPageSizeChange,
|
|
251
|
+
pageSizeOptions: q.pageSizeOptions,
|
|
252
|
+
hasNextPage: q.hasNextPage,
|
|
253
|
+
hasPrevPage: q.hasPrevPage,
|
|
254
|
+
onNextPage: q.onNextPage,
|
|
255
|
+
onPrevPage: q.onPrevPage,
|
|
256
|
+
showCardholderColumn: q.showCardholderColumn,
|
|
257
|
+
showDepartmentColumn: q.showDepartmentColumn,
|
|
258
|
+
filterComponent: /* @__PURE__ */ T(f, {
|
|
259
|
+
labels: O,
|
|
260
|
+
searchValue: q.searchValue,
|
|
261
|
+
onSearchChange: q.onSearchChange,
|
|
262
|
+
activeFilterCount: q.activeFilterCount,
|
|
263
|
+
activeChips: q.activeChips,
|
|
264
|
+
onDismissChip: q.onDismissChip,
|
|
265
|
+
onClearAll: q.onClearAll,
|
|
266
|
+
allPresets: q.allPresets,
|
|
267
|
+
selectedDatePreset: q.selectedDatePreset,
|
|
268
|
+
dateFrom: q.dateFrom,
|
|
269
|
+
dateTo: q.dateTo,
|
|
270
|
+
onDateRangeChange: q.onDateRangeChange,
|
|
271
|
+
onDatePresetChange: q.onDatePresetChange,
|
|
272
|
+
paymentStatusOptions: q.paymentStatusOptions,
|
|
273
|
+
selectedPaymentStatus: q.selectedPaymentStatus,
|
|
274
|
+
onPaymentStatusChange: q.onPaymentStatusChange,
|
|
275
|
+
approvalStatusOptions: q.approvalStatusOptions,
|
|
276
|
+
selectedApprovalStatus: q.selectedApprovalStatus,
|
|
277
|
+
onApprovalStatusChange: q.onApprovalStatusChange,
|
|
278
|
+
typeOptions: q.typeOptions,
|
|
279
|
+
selectedTypes: q.selectedTypes,
|
|
280
|
+
onTypeChange: q.onTypeChange,
|
|
281
|
+
amountMode: q.amountMode,
|
|
282
|
+
onAmountModeChange: q.onAmountModeChange,
|
|
283
|
+
amountMin: q.amountMin,
|
|
284
|
+
amountMax: q.amountMax,
|
|
285
|
+
onAmountMinChange: q.onAmountMinChange,
|
|
286
|
+
onAmountMaxChange: q.onAmountMaxChange,
|
|
287
|
+
amountFlowDirection: q.amountFlowDirection,
|
|
288
|
+
onAmountFlowDirectionChange: q.onAmountFlowDirectionChange,
|
|
289
|
+
teamMemberOptions: je,
|
|
290
|
+
selectedTeamMembers: q.selectedTeamMembers,
|
|
291
|
+
onTeamMembersChange: q.onTeamMembersChange,
|
|
292
|
+
cardOnly: q.cardOnly,
|
|
293
|
+
onCardToggle: q.onCardToggle
|
|
294
294
|
})
|
|
295
295
|
})] }) : void 0
|
|
296
296
|
})
|
|
297
297
|
] });
|
|
298
298
|
}
|
|
299
|
-
function
|
|
300
|
-
return /* @__PURE__ */
|
|
299
|
+
function O({ screenLabels: e, headerLabels: t, transactionsTableLabels: n, filterBarLabels: r, actionItemsLabels: ee, statusBadgeLabels: a, transactionDetailsLabels: o, transactionDetailsCardLabels: s, transactionDetailsActionsLabels: c, fileViewerLabels: l, receiptUpload: u, bankDisplayName: d, bankLogoSrc: f, bankLogoAlt: p, isBankingTaglineVisible: m, onSettingsClick: h, ...g }) {
|
|
300
|
+
return /* @__PURE__ */ T(i, {
|
|
301
301
|
...g,
|
|
302
302
|
widgetName: v,
|
|
303
|
-
children: /* @__PURE__ */
|
|
303
|
+
children: /* @__PURE__ */ T(D, {
|
|
304
304
|
screenLabels: e,
|
|
305
305
|
headerLabels: t,
|
|
306
306
|
transactionsTableLabels: n,
|
|
307
307
|
filterBarLabels: r,
|
|
308
|
-
actionItemsLabels:
|
|
308
|
+
actionItemsLabels: ee,
|
|
309
309
|
statusBadgeLabels: a,
|
|
310
310
|
transactionDetailsLabels: o,
|
|
311
311
|
transactionDetailsCardLabels: s,
|
|
@@ -320,4 +320,4 @@ function D({ screenLabels: e, headerLabels: t, transactionsTableLabels: n, filte
|
|
|
320
320
|
})
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
|
-
export {
|
|
323
|
+
export { O as ExpenseManagementWidget, O as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.11.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.11.42", n = "a179d457290b335208bc647d31e28cc6d0a17a31", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|