@tesouro/embedded-components-react 0.11.120 → 0.11.123
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/README.md +6 -3
- package/dist/index.css +32 -161
- package/dist/index.d.ts +40 -8
- package/dist/index.js +29 -28
- package/dist/lib/ExpenseManagementWidget.d.ts +11 -2
- package/dist/lib/ReceivablesWidget.d.ts +29 -6
- package/dist/lib/ReceivablesWidget.js +3 -1
- package/dist/lib/WidgetSuite.d.ts +38 -6
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/ExpenseManagementWidget.js +343 -264
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/labels.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/permissions.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/useExpenseTabBadgeCounts.js +34 -19
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/useExpensesTransactions.js +100 -98
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/TransactionDetails/TransactionDetailsActionsFeature.js +27 -24
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/TransactionDetails/TransactionDetailsFeature.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/expenseStatus.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/feature/dist/index2.js +43 -44
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/feature/dist/index4.js +79 -40
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index2.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index3.js +47 -46
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index4.js +78 -84
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index5.js +165 -158
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index6.js +38 -100
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index7.js +77 -54
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js +213 -229
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/ExpenseStatusBadge.js +6 -8
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesScreen/ExpensesScreen.js +66 -73
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/ExpensesTransactionsFilterBar.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsTable/ExpensesTransactionsTable.js +123 -80
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsTable/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/FileViewer.js +83 -74
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/DeleteReceiptDialog/DeleteReceiptDialog.js +22 -30
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/TransactionDetails.js +176 -259
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/labels.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/BulkProgress.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/TransactionDetailsActions.js +112 -121
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableAttachmentsSection.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +342 -295
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/tabs.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +30 -26
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +121 -11
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +100 -11
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +39 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +2 -205
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +11 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +11 -210
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +27 -159
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +203 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +51 -22
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +210 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +154 -111
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +15 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +21 -195
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +116 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +3 -22
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +197 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +2 -78
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +53 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +20 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +8 -41
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +73 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +36 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +17 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +39 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +29 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +18 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +8 -85
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +33 -490
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +15 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +22 -42
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +82 -65
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +475 -426
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +2 -226
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +46 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +69 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +445 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +208 -246
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +22 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +5 -129
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +247 -222
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +125 -242
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +23 -56
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +229 -209
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +3 -47
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +248 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +60 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +194 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +47 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +53 -117
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +9 -99
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +3 -40
- package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/feature/dist/lib/ExpenseRequirementsWidget.js +41 -32
- package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/ui/dist/index3.js +43 -53
- 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/ui/dist/index.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/CopyAddress/CopyAddress.js +55 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/UploadTray/UploadTray.js +84 -0
- package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/feature/dist/lib/UploadReceiptWidget.js +126 -73
- package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/ui/dist/index2.js +14 -1
- package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/ui/dist/index3.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/ui/dist/index4.js +75 -128
- package/dist/packages/shared-ui-shadcn/dist/index.js +1399 -1302
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/badgeTones.js +0 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +0 -27
|
@@ -2,322 +2,401 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import { useMailboxAddress as
|
|
7
|
-
import { useAllOrganizationUsersQuery as
|
|
5
|
+
import { Button as e, toast as t } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { useMailboxAddress as n } from "../../../../../shared/data-access/dist/lib/useMailboxAddress.js";
|
|
7
|
+
import { useAllOrganizationUsersQuery as ee } from "../../../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
|
|
8
8
|
import "../../../../../shared/data-access/dist/index.js";
|
|
9
|
+
import { EmptyState as r } from "../../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
10
|
+
import { ErrorState as i } from "../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
11
|
+
import { NoAccessState as a } from "../../../../../shared/ui/dist/lib/StatePanel/NoAccessState.js";
|
|
12
|
+
import { InlineErrorAlert as o } from "../../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
9
13
|
import "../../../../../shared/ui/dist/index.js";
|
|
10
|
-
import { useAnalyticsTrack as
|
|
11
|
-
import { WidgetProvider as
|
|
12
|
-
import { useOptionalWidgetToken as
|
|
13
|
-
import { useWidgetConfig as
|
|
14
|
+
import { useAnalyticsTrack as te } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
15
|
+
import { WidgetProvider as s } from "../../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
16
|
+
import { useOptionalWidgetToken as c } from "../../../../../shared/feature/dist/lib/WidgetProvider/useWidgetToken.js";
|
|
17
|
+
import { useWidgetConfig as l, useWidgetInitStaleForToken as u, useWidgetLoading as d } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
14
18
|
import "../../../../../shared/feature/dist/index.js";
|
|
15
|
-
import { EXPENSE_STATUS_BADGE_LABELS_EN as
|
|
16
|
-
import { TRANSACTION_DETAILS_FEATURE_LABELS_EN as
|
|
17
|
-
import { ActionItemsList as
|
|
18
|
-
import { ExpensesTransactionsTable as
|
|
19
|
-
import { ExpensesTransactionsFilterBar as
|
|
20
|
-
import { ExpensesScreen as
|
|
19
|
+
import { EXPENSE_STATUS_BADGE_LABELS_EN as f } from "../expenseStatus.js";
|
|
20
|
+
import { TRANSACTION_DETAILS_FEATURE_LABELS_EN as p } from "../TransactionDetails/labels.js";
|
|
21
|
+
import { ActionItemsList as m } from "../../../../ui/dist/lib/ActionItemsList/ActionItemsList.js";
|
|
22
|
+
import { ExpensesTransactionsTable as h } from "../../../../ui/dist/lib/ExpensesTransactionsTable/ExpensesTransactionsTable.js";
|
|
23
|
+
import { ExpensesTransactionsFilterBar as g } from "../../../../ui/dist/lib/ExpensesTransactionsFilterBar/ExpensesTransactionsFilterBar.js";
|
|
24
|
+
import { ExpensesScreen as ne } from "../../../../ui/dist/lib/ExpensesScreen/ExpensesScreen.js";
|
|
21
25
|
import "../../../../ui/dist/index.js";
|
|
22
|
-
import { usePatchReceiptMutation as
|
|
23
|
-
import { useUploadReceiptMutation as
|
|
24
|
-
import { useTrackReceiptMatching as
|
|
25
|
-
import { useHasDirectReportsQuery as
|
|
26
|
+
import { usePatchReceiptMutation as re } from "../../../../data-access/dist/lib/usePatchReceiptMutation.js";
|
|
27
|
+
import { useUploadReceiptMutation as ie } from "../../../../data-access/dist/lib/useUploadReceiptMutation.js";
|
|
28
|
+
import { useTrackReceiptMatching as ae } from "../../../../data-access/dist/lib/useTrackReceiptMatching.js";
|
|
29
|
+
import { useHasDirectReportsQuery as oe } from "../../../../data-access/dist/lib/useHasDirectReportsQuery.js";
|
|
26
30
|
import "../../../../data-access/dist/index.js";
|
|
27
|
-
import { canOpenExpenseSettings as
|
|
28
|
-
import { ReceiptMatchWidget as
|
|
31
|
+
import { canOpenExpenseSettings as se, canReadMailbox as ce, canReadTransactions as _, canViewTeamTransactions as le, canWriteExpenses as ue } from "./permissions.js";
|
|
32
|
+
import { ReceiptMatchWidget as de } from "../../../../receipt-match/feature/dist/index4.js";
|
|
29
33
|
import "../../../../receipt-match/feature/dist/index.js";
|
|
30
|
-
import { TransactionDetailsFeature as
|
|
31
|
-
import { ExpenseManagementWidgetAnalyticsEvent as
|
|
32
|
-
import { useExpensesTransactions as
|
|
33
|
-
import { useExpenseActionItems as
|
|
34
|
-
import { useExpenseTabBadgeCounts as
|
|
35
|
-
import {
|
|
34
|
+
import { TransactionDetailsFeature as fe } from "../TransactionDetails/TransactionDetailsFeature.js";
|
|
35
|
+
import { ExpenseManagementWidgetAnalyticsEvent as pe, WIDGET_NAME as v } from "./analytics/events.js";
|
|
36
|
+
import { useExpensesTransactions as me } from "./useExpensesTransactions.js";
|
|
37
|
+
import { useExpenseActionItems as y } from "./useExpenseActionItems.js";
|
|
38
|
+
import { useExpenseTabBadgeCounts as he } from "./useExpenseTabBadgeCounts.js";
|
|
39
|
+
import { EXPENSE_READ_LABELS as b } from "./labels.js";
|
|
40
|
+
import { UploadReceiptWidget as ge } from "../../../../../upload-receipt-widget/feature/dist/lib/UploadReceiptWidget.js";
|
|
36
41
|
import "../../../../../upload-receipt-widget/feature/dist/index.js";
|
|
37
|
-
import { useEffect as
|
|
38
|
-
import { Fragment as
|
|
42
|
+
import { useEffect as x, useMemo as S, useRef as C, useState as w } from "react";
|
|
43
|
+
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
39
44
|
// ../../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
|
-
|
|
45
|
+
var _e = ".pdf,.png,.jpg,.jpeg,.gif,.svg";
|
|
46
|
+
function O({ screenLabels: s, headerLabels: v, transactionsTableLabels: O, filterBarLabels: k, actionItemsLabels: ve, statusBadgeLabels: A, transactionDetailsLabels: ye, transactionDetailsCardLabels: be, transactionDetailsActionsLabels: xe, fileViewerLabels: Se, receiptUpload: Ce, bankDisplayName: we, bankLogoSrc: Te, bankLogoAlt: Ee, isBankingTaglineVisible: De, onSettingsClick: Oe }) {
|
|
47
|
+
let ke = te();
|
|
48
|
+
x(() => {
|
|
49
|
+
ke(pe.Mounted);
|
|
50
|
+
}, [ke]);
|
|
51
|
+
let { initResponse: j, organizationId: Ae } = l(), M = d(), je = u(), N = j?.scopes, P = le(N), { hasDirectReports: Me, isLoading: Ne } = oe({
|
|
52
|
+
userId: j?.userId ?? void 0,
|
|
53
|
+
enabled: !M && !P
|
|
54
|
+
}), F = P || Me, I = !P && Ne, Pe = M && !j, Fe = c()?.state.status === "loading" && !j, Ie = Pe || Fe || I, L = `${Ae ?? ""}:${j?.userId ?? ""}`, [R, z] = w("my-transactions"), B = C(null), V = C(null), Le = (e) => {
|
|
55
|
+
B.current = L, z(e);
|
|
51
56
|
};
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
x(() => {
|
|
58
|
+
M || I || V.current === L || (V.current = L, B.current !== L && z(F ? "team-transactions" : "my-transactions"));
|
|
54
59
|
}, [
|
|
55
|
-
|
|
56
|
-
L,
|
|
60
|
+
M,
|
|
57
61
|
I,
|
|
58
|
-
|
|
62
|
+
F,
|
|
63
|
+
L
|
|
59
64
|
]);
|
|
60
|
-
let
|
|
65
|
+
let Re = R === "team-transactions" && !F ? "my-transactions" : R, { data: H } = ee({ enabled: F }), ze = S(() => (H?.data ?? []).map((e) => ({
|
|
61
66
|
value: e.id,
|
|
62
67
|
label: e.name || e.email || e.id
|
|
63
|
-
})), [
|
|
68
|
+
})), [H]), U = S(() => {
|
|
64
69
|
let e = /* @__PURE__ */ new Map();
|
|
65
|
-
for (let t of
|
|
70
|
+
for (let t of H?.data ?? []) e.set(t.id, t.name || t.email || t.id);
|
|
66
71
|
return e;
|
|
67
|
-
}, [
|
|
68
|
-
...
|
|
72
|
+
}, [H]), W = S(() => ({
|
|
73
|
+
...f,
|
|
69
74
|
...A
|
|
70
|
-
}), [A]),
|
|
75
|
+
}), [A]), G = me({
|
|
71
76
|
scope: "mine",
|
|
72
|
-
|
|
73
|
-
|
|
77
|
+
enabled: _(N),
|
|
78
|
+
statusBadgeLabels: W
|
|
79
|
+
}), K = me({
|
|
74
80
|
scope: "team",
|
|
75
|
-
cardholderByUserId:
|
|
76
|
-
enabled:
|
|
77
|
-
statusBadgeLabels:
|
|
78
|
-
}), [
|
|
79
|
-
e.length !== 0 &&
|
|
80
|
-
},
|
|
81
|
-
onReviewNewTransactions:
|
|
82
|
-
onReviewRejectedTransactions:
|
|
83
|
-
onReviewPendingApproval:
|
|
81
|
+
cardholderByUserId: U,
|
|
82
|
+
enabled: F,
|
|
83
|
+
statusBadgeLabels: W
|
|
84
|
+
}), [q, J] = w(null), [Be, Ve] = w(!1), Y = (e) => {
|
|
85
|
+
e.length !== 0 && J({ transactionIds: e });
|
|
86
|
+
}, He = {
|
|
87
|
+
onReviewNewTransactions: Y,
|
|
88
|
+
onReviewRejectedTransactions: Y,
|
|
89
|
+
onReviewPendingApproval: Y,
|
|
84
90
|
onReviewUnmatchedReceipts: () => {
|
|
85
|
-
|
|
91
|
+
Ve(!0);
|
|
86
92
|
}
|
|
87
|
-
},
|
|
93
|
+
}, Ue = y({
|
|
88
94
|
scope: "mine",
|
|
89
|
-
...
|
|
90
|
-
}),
|
|
95
|
+
...He
|
|
96
|
+
}), We = y({
|
|
91
97
|
scope: "team",
|
|
92
|
-
isTeamVisible:
|
|
93
|
-
...
|
|
94
|
-
}), { mailboxAddress:
|
|
98
|
+
isTeamVisible: F,
|
|
99
|
+
...He
|
|
100
|
+
}), { mailboxAddress: Ge } = n({
|
|
95
101
|
relatedObjectType: "receipt",
|
|
96
|
-
enabled:
|
|
97
|
-
}),
|
|
98
|
-
let t = await
|
|
99
|
-
return t.id &&
|
|
100
|
-
},
|
|
101
|
-
let e =
|
|
102
|
-
return
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
let n =
|
|
107
|
-
if (
|
|
108
|
-
|
|
102
|
+
enabled: ce(N) && !je
|
|
103
|
+
}), Ke = ce(N) ? Ge : void 0, { onFileUpload: qe, onAwaitMatching: Je, ...Ye } = Ce ?? {}, Xe = ie(), Ze = ie({ invalidateOnSuccess: !!Je }), Qe = re(), $e = C(null), X = C(null), [et, tt] = w(null), Z = ue(N), Q = C(null), [nt, $] = w(!1), { trackBatch: rt, trackAttachedReceipt: it } = ae(), at = C([]), { myTransactionsCount: ot, teamTransactionsCount: st, myCountsFailed: ct, teamCountsFailed: lt, retryMyCounts: ut, retryTeamCounts: dt } = he({ isTeamVisible: F }), ft = async (e) => {
|
|
104
|
+
let t = await Ze.mutateAsync({ body: { file: e } });
|
|
105
|
+
return t.id && at.current.push(t.id), t;
|
|
106
|
+
}, pt = () => {
|
|
107
|
+
let e = at.current.splice(0);
|
|
108
|
+
return rt(e);
|
|
109
|
+
}, mt = (e) => {
|
|
110
|
+
X.current = e, $e.current?.click();
|
|
111
|
+
}, ht = async (e) => {
|
|
112
|
+
let n = X.current;
|
|
113
|
+
if (X.current = null, n) {
|
|
114
|
+
tt(n);
|
|
109
115
|
try {
|
|
110
|
-
let
|
|
111
|
-
if (!
|
|
112
|
-
await
|
|
113
|
-
path: { receipt_id:
|
|
116
|
+
let t = await Xe.mutateAsync({ body: { file: e } });
|
|
117
|
+
if (!t.id) throw Error("Receipt upload returned no id");
|
|
118
|
+
await Qe.mutateAsync({
|
|
119
|
+
path: { receipt_id: t.id },
|
|
114
120
|
body: { transaction_id: n }
|
|
115
|
-
}),
|
|
116
|
-
receiptId:
|
|
121
|
+
}), it({
|
|
122
|
+
receiptId: t.id,
|
|
117
123
|
transactionId: n
|
|
118
124
|
}).catch(() => void 0);
|
|
119
125
|
} catch {
|
|
120
|
-
|
|
126
|
+
t.error(p.receiptUploadFailed);
|
|
121
127
|
} finally {
|
|
122
|
-
|
|
128
|
+
tt(null);
|
|
123
129
|
}
|
|
124
130
|
}
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
131
|
+
}, gt = /* @__PURE__ */ E(ge, {
|
|
132
|
+
ref: Q,
|
|
133
|
+
emailAddress: Ke,
|
|
134
|
+
isUploading: Xe.isPending || Ze.isPending,
|
|
135
|
+
...Ye,
|
|
136
|
+
onFileUpload: qe ?? ft,
|
|
137
|
+
onAwaitMatching: Je ?? (qe ? void 0 : pt)
|
|
138
|
+
}), _t = /* @__PURE__ */ E(fe, {
|
|
139
|
+
open: q !== null,
|
|
140
|
+
onClose: () => J(null),
|
|
141
|
+
selectedTransactionId: q?.transactionId,
|
|
142
|
+
actionItemIds: q?.transactionIds,
|
|
143
|
+
cardholderByUserId: U,
|
|
144
|
+
detailsLabels: ye,
|
|
145
|
+
cardLabels: be,
|
|
146
|
+
actionsLabels: xe,
|
|
140
147
|
statusBadgeLabels: A,
|
|
141
|
-
fileViewerLabels:
|
|
148
|
+
fileViewerLabels: Se
|
|
142
149
|
});
|
|
143
|
-
return /* @__PURE__ */
|
|
144
|
-
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
isOpen:
|
|
147
|
-
onClose: () =>
|
|
150
|
+
return /* @__PURE__ */ D(T, { children: [
|
|
151
|
+
_t,
|
|
152
|
+
/* @__PURE__ */ E(de, {
|
|
153
|
+
isOpen: Be,
|
|
154
|
+
onClose: () => Ve(!1),
|
|
155
|
+
onFilesDropped: Z ? (e) => Q.current?.upload(e) : void 0
|
|
148
156
|
}),
|
|
149
|
-
|
|
150
|
-
ref:
|
|
157
|
+
Z && /* @__PURE__ */ E("input", {
|
|
158
|
+
ref: $e,
|
|
151
159
|
type: "file",
|
|
152
|
-
accept:
|
|
160
|
+
accept: _e,
|
|
153
161
|
className: "ttw:hidden",
|
|
154
162
|
"aria-hidden": !0,
|
|
155
163
|
tabIndex: -1,
|
|
156
164
|
onChange: (e) => {
|
|
157
165
|
let t = e.target.files?.[0];
|
|
158
|
-
e.target.value = "", t &&
|
|
166
|
+
e.target.value = "", t && ht(t);
|
|
159
167
|
}
|
|
160
168
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
bankDisplayName: _e,
|
|
166
|
-
bankLogoSrc: ve,
|
|
167
|
-
bankLogoAlt: ye,
|
|
168
|
-
isBankingTaglineVisible: be,
|
|
169
|
-
onSettingsClick: ne(P) ? xe : void 0,
|
|
170
|
-
actions: nt
|
|
169
|
+
/* @__PURE__ */ D("div", {
|
|
170
|
+
className: "ttw:relative",
|
|
171
|
+
onDragOver: (e) => {
|
|
172
|
+
Z && Array.from(e.dataTransfer.types).includes("Files") && (e.preventDefault(), $(!0));
|
|
171
173
|
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
sorting: K.sorting,
|
|
188
|
-
onSortingChange: K.onSortingChange,
|
|
189
|
-
pageSize: K.pageSize,
|
|
190
|
-
onPageSizeChange: K.onPageSizeChange,
|
|
191
|
-
pageSizeOptions: K.pageSizeOptions,
|
|
192
|
-
hasNextPage: K.hasNextPage,
|
|
193
|
-
hasPrevPage: K.hasPrevPage,
|
|
194
|
-
onNextPage: K.onNextPage,
|
|
195
|
-
onPrevPage: K.onPrevPage,
|
|
196
|
-
showCardholderColumn: K.showCardholderColumn,
|
|
197
|
-
showDepartmentColumn: K.showDepartmentColumn,
|
|
198
|
-
filterComponent: /* @__PURE__ */ T(f, {
|
|
199
|
-
labels: O,
|
|
200
|
-
searchValue: K.searchValue,
|
|
201
|
-
onSearchChange: K.onSearchChange,
|
|
202
|
-
activeFilterCount: K.activeFilterCount,
|
|
203
|
-
activeChips: K.activeChips,
|
|
204
|
-
onDismissChip: K.onDismissChip,
|
|
205
|
-
onClearAll: K.onClearAll,
|
|
206
|
-
allPresets: K.allPresets,
|
|
207
|
-
selectedDatePreset: K.selectedDatePreset,
|
|
208
|
-
dateFrom: K.dateFrom,
|
|
209
|
-
dateTo: K.dateTo,
|
|
210
|
-
onDateRangeChange: K.onDateRangeChange,
|
|
211
|
-
onDatePresetChange: K.onDatePresetChange,
|
|
212
|
-
paymentStatusOptions: K.paymentStatusOptions,
|
|
213
|
-
selectedPaymentStatus: K.selectedPaymentStatus,
|
|
214
|
-
onPaymentStatusChange: K.onPaymentStatusChange,
|
|
215
|
-
approvalStatusOptions: K.approvalStatusOptions,
|
|
216
|
-
selectedApprovalStatus: K.selectedApprovalStatus,
|
|
217
|
-
onApprovalStatusChange: K.onApprovalStatusChange,
|
|
218
|
-
typeOptions: K.typeOptions,
|
|
219
|
-
selectedTypes: K.selectedTypes,
|
|
220
|
-
onTypeChange: K.onTypeChange,
|
|
221
|
-
amountMode: K.amountMode,
|
|
222
|
-
onAmountModeChange: K.onAmountModeChange,
|
|
223
|
-
amountMin: K.amountMin,
|
|
224
|
-
amountMax: K.amountMax,
|
|
225
|
-
onAmountMinChange: K.onAmountMinChange,
|
|
226
|
-
onAmountMaxChange: K.onAmountMaxChange,
|
|
227
|
-
amountFlowDirection: K.amountFlowDirection,
|
|
228
|
-
onAmountFlowDirectionChange: K.onAmountFlowDirectionChange,
|
|
229
|
-
teamMemberOptions: [],
|
|
230
|
-
selectedTeamMembers: K.selectedTeamMembers,
|
|
231
|
-
onTeamMembersChange: K.onTeamMembersChange,
|
|
232
|
-
cardOnly: K.cardOnly,
|
|
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
|
|
174
|
+
onDragLeave: (e) => {
|
|
175
|
+
e.currentTarget.contains(e.relatedTarget) || $(!1);
|
|
176
|
+
},
|
|
177
|
+
onDrop: (e) => {
|
|
178
|
+
Z && Array.from(e.dataTransfer.types).includes("Files") && (e.preventDefault(), $(!1), Q.current?.upload(Array.from(e.dataTransfer.files)));
|
|
179
|
+
},
|
|
180
|
+
children: [nt && /* @__PURE__ */ E("div", {
|
|
181
|
+
role: "status",
|
|
182
|
+
className: "ttw:pointer-events-none ttw:absolute ttw:inset-0 ttw:z-10 ttw:flex ttw:items-center ttw:justify-center ttw:rounded-lg ttw:border-2 ttw:border-dashed ttw:border-primary ttw:bg-background/90",
|
|
183
|
+
children: /* @__PURE__ */ D("div", {
|
|
184
|
+
className: "ttw:rounded-lg ttw:bg-muted ttw:p-4 ttw:text-center",
|
|
185
|
+
children: [/* @__PURE__ */ E("p", { children: b.dropReceipts }), /* @__PURE__ */ E("p", {
|
|
186
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
187
|
+
children: b.dropReceiptRules
|
|
188
|
+
})]
|
|
294
189
|
})
|
|
295
|
-
})
|
|
190
|
+
}), /* @__PURE__ */ E(ne, {
|
|
191
|
+
labels: s,
|
|
192
|
+
headerLabels: v,
|
|
193
|
+
header: {
|
|
194
|
+
bankDisplayName: we,
|
|
195
|
+
bankLogoSrc: Te,
|
|
196
|
+
bankLogoAlt: Ee,
|
|
197
|
+
isBankingTaglineVisible: De,
|
|
198
|
+
onSettingsClick: se(N) ? Oe : void 0,
|
|
199
|
+
actions: Z ? gt : void 0
|
|
200
|
+
},
|
|
201
|
+
activeTab: Re,
|
|
202
|
+
onActiveTabChange: Le,
|
|
203
|
+
isLoading: Ie,
|
|
204
|
+
myTransactionsCount: ot,
|
|
205
|
+
teamTransactionsCount: F ? st : void 0,
|
|
206
|
+
myTransactionsContent: /* @__PURE__ */ D(T, { children: [
|
|
207
|
+
ct && /* @__PURE__ */ D(o, {
|
|
208
|
+
className: "ttw:mb-4 ttw:flex ttw:items-center ttw:gap-2",
|
|
209
|
+
children: [/* @__PURE__ */ E("span", { children: b.countsFailed }), /* @__PURE__ */ E(e, {
|
|
210
|
+
type: "button",
|
|
211
|
+
variant: "link",
|
|
212
|
+
size: "sm",
|
|
213
|
+
className: "ttw:h-auto ttw:p-0",
|
|
214
|
+
onClick: ut,
|
|
215
|
+
children: b.tryAgain
|
|
216
|
+
})]
|
|
217
|
+
}),
|
|
218
|
+
/* @__PURE__ */ E(m, {
|
|
219
|
+
labels: ve,
|
|
220
|
+
items: Ue
|
|
221
|
+
}),
|
|
222
|
+
_(N) ? G.isError ? /* @__PURE__ */ E(i, {
|
|
223
|
+
title: b.listFailed,
|
|
224
|
+
retryLabel: b.tryAgain,
|
|
225
|
+
onRetry: () => void G.retry()
|
|
226
|
+
}) : /* @__PURE__ */ E(h, {
|
|
227
|
+
onRowClick: (e) => J({ transactionId: e }),
|
|
228
|
+
onAddReceiptClick: Z ? mt : void 0,
|
|
229
|
+
uploadingReceiptId: et ?? void 0,
|
|
230
|
+
labels: O,
|
|
231
|
+
rows: G.rows,
|
|
232
|
+
emptyState: /* @__PURE__ */ E(r, {
|
|
233
|
+
title: G.activeFilterCount || G.searchValue ? b.noResults : b.noExpenses,
|
|
234
|
+
actionLabel: G.activeFilterCount || G.searchValue ? b.clearFilters : void 0,
|
|
235
|
+
onAction: G.onClearAll
|
|
236
|
+
}),
|
|
237
|
+
isLoading: G.isLoading,
|
|
238
|
+
sorting: G.sorting,
|
|
239
|
+
onSortingChange: G.onSortingChange,
|
|
240
|
+
pageSize: G.pageSize,
|
|
241
|
+
onPageSizeChange: G.onPageSizeChange,
|
|
242
|
+
pageSizeOptions: G.pageSizeOptions,
|
|
243
|
+
hasNextPage: G.hasNextPage,
|
|
244
|
+
hasPrevPage: G.hasPrevPage,
|
|
245
|
+
onNextPage: G.onNextPage,
|
|
246
|
+
onPrevPage: G.onPrevPage,
|
|
247
|
+
showCardholderColumn: G.showCardholderColumn,
|
|
248
|
+
showDepartmentColumn: G.showDepartmentColumn,
|
|
249
|
+
filterComponent: /* @__PURE__ */ E(g, {
|
|
250
|
+
labels: k,
|
|
251
|
+
searchValue: G.searchValue,
|
|
252
|
+
onSearchChange: G.onSearchChange,
|
|
253
|
+
activeFilterCount: G.activeFilterCount,
|
|
254
|
+
activeChips: G.activeChips,
|
|
255
|
+
onDismissChip: G.onDismissChip,
|
|
256
|
+
onClearAll: G.onClearAll,
|
|
257
|
+
allPresets: G.allPresets,
|
|
258
|
+
selectedDatePreset: G.selectedDatePreset,
|
|
259
|
+
dateFrom: G.dateFrom,
|
|
260
|
+
dateTo: G.dateTo,
|
|
261
|
+
onDateRangeChange: G.onDateRangeChange,
|
|
262
|
+
onDatePresetChange: G.onDatePresetChange,
|
|
263
|
+
paymentStatusOptions: G.paymentStatusOptions,
|
|
264
|
+
selectedPaymentStatus: G.selectedPaymentStatus,
|
|
265
|
+
onPaymentStatusChange: G.onPaymentStatusChange,
|
|
266
|
+
approvalStatusOptions: G.approvalStatusOptions,
|
|
267
|
+
selectedApprovalStatus: G.selectedApprovalStatus,
|
|
268
|
+
onApprovalStatusChange: G.onApprovalStatusChange,
|
|
269
|
+
typeOptions: G.typeOptions,
|
|
270
|
+
selectedTypes: G.selectedTypes,
|
|
271
|
+
onTypeChange: G.onTypeChange,
|
|
272
|
+
amountMode: G.amountMode,
|
|
273
|
+
onAmountModeChange: G.onAmountModeChange,
|
|
274
|
+
amountMin: G.amountMin,
|
|
275
|
+
amountMax: G.amountMax,
|
|
276
|
+
onAmountMinChange: G.onAmountMinChange,
|
|
277
|
+
onAmountMaxChange: G.onAmountMaxChange,
|
|
278
|
+
amountFlowDirection: G.amountFlowDirection,
|
|
279
|
+
onAmountFlowDirectionChange: G.onAmountFlowDirectionChange,
|
|
280
|
+
teamMemberOptions: [],
|
|
281
|
+
selectedTeamMembers: G.selectedTeamMembers,
|
|
282
|
+
onTeamMembersChange: G.onTeamMembersChange,
|
|
283
|
+
cardOnly: G.cardOnly,
|
|
284
|
+
onCardToggle: G.onCardToggle,
|
|
285
|
+
showTeamMemberFilter: !1
|
|
286
|
+
})
|
|
287
|
+
}) : /* @__PURE__ */ E(a, {
|
|
288
|
+
title: b.noAccess,
|
|
289
|
+
description: b.noAccessDescription
|
|
290
|
+
})
|
|
291
|
+
] }),
|
|
292
|
+
teamTransactionsContent: F ? /* @__PURE__ */ D(T, { children: [
|
|
293
|
+
lt && /* @__PURE__ */ D(o, {
|
|
294
|
+
className: "ttw:mb-4 ttw:flex ttw:items-center ttw:gap-2",
|
|
295
|
+
children: [/* @__PURE__ */ E("span", { children: b.countsFailed }), /* @__PURE__ */ E(e, {
|
|
296
|
+
type: "button",
|
|
297
|
+
variant: "link",
|
|
298
|
+
size: "sm",
|
|
299
|
+
className: "ttw:h-auto ttw:p-0",
|
|
300
|
+
onClick: dt,
|
|
301
|
+
children: b.tryAgain
|
|
302
|
+
})]
|
|
303
|
+
}),
|
|
304
|
+
/* @__PURE__ */ E(m, {
|
|
305
|
+
labels: ve,
|
|
306
|
+
items: We
|
|
307
|
+
}),
|
|
308
|
+
K.isError ? /* @__PURE__ */ E(i, {
|
|
309
|
+
title: b.listFailed,
|
|
310
|
+
retryLabel: b.tryAgain,
|
|
311
|
+
onRetry: () => void K.retry()
|
|
312
|
+
}) : /* @__PURE__ */ E(h, {
|
|
313
|
+
onRowClick: (e) => J({ transactionId: e }),
|
|
314
|
+
onAddReceiptClick: Z ? mt : void 0,
|
|
315
|
+
uploadingReceiptId: et ?? void 0,
|
|
316
|
+
labels: O,
|
|
317
|
+
rows: K.rows,
|
|
318
|
+
emptyState: /* @__PURE__ */ E(r, {
|
|
319
|
+
title: K.activeFilterCount || K.searchValue ? b.noResults : b.noExpenses,
|
|
320
|
+
actionLabel: K.activeFilterCount || K.searchValue ? b.clearFilters : void 0,
|
|
321
|
+
onAction: K.onClearAll
|
|
322
|
+
}),
|
|
323
|
+
isLoading: K.isLoading,
|
|
324
|
+
sorting: K.sorting,
|
|
325
|
+
onSortingChange: K.onSortingChange,
|
|
326
|
+
pageSize: K.pageSize,
|
|
327
|
+
onPageSizeChange: K.onPageSizeChange,
|
|
328
|
+
pageSizeOptions: K.pageSizeOptions,
|
|
329
|
+
hasNextPage: K.hasNextPage,
|
|
330
|
+
hasPrevPage: K.hasPrevPage,
|
|
331
|
+
onNextPage: K.onNextPage,
|
|
332
|
+
onPrevPage: K.onPrevPage,
|
|
333
|
+
showCardholderColumn: K.showCardholderColumn,
|
|
334
|
+
showDepartmentColumn: K.showDepartmentColumn,
|
|
335
|
+
filterComponent: /* @__PURE__ */ E(g, {
|
|
336
|
+
labels: k,
|
|
337
|
+
searchValue: K.searchValue,
|
|
338
|
+
onSearchChange: K.onSearchChange,
|
|
339
|
+
activeFilterCount: K.activeFilterCount,
|
|
340
|
+
activeChips: K.activeChips,
|
|
341
|
+
onDismissChip: K.onDismissChip,
|
|
342
|
+
onClearAll: K.onClearAll,
|
|
343
|
+
allPresets: K.allPresets,
|
|
344
|
+
selectedDatePreset: K.selectedDatePreset,
|
|
345
|
+
dateFrom: K.dateFrom,
|
|
346
|
+
dateTo: K.dateTo,
|
|
347
|
+
onDateRangeChange: K.onDateRangeChange,
|
|
348
|
+
onDatePresetChange: K.onDatePresetChange,
|
|
349
|
+
paymentStatusOptions: K.paymentStatusOptions,
|
|
350
|
+
selectedPaymentStatus: K.selectedPaymentStatus,
|
|
351
|
+
onPaymentStatusChange: K.onPaymentStatusChange,
|
|
352
|
+
approvalStatusOptions: K.approvalStatusOptions,
|
|
353
|
+
selectedApprovalStatus: K.selectedApprovalStatus,
|
|
354
|
+
onApprovalStatusChange: K.onApprovalStatusChange,
|
|
355
|
+
typeOptions: K.typeOptions,
|
|
356
|
+
selectedTypes: K.selectedTypes,
|
|
357
|
+
onTypeChange: K.onTypeChange,
|
|
358
|
+
amountMode: K.amountMode,
|
|
359
|
+
onAmountModeChange: K.onAmountModeChange,
|
|
360
|
+
amountMin: K.amountMin,
|
|
361
|
+
amountMax: K.amountMax,
|
|
362
|
+
onAmountMinChange: K.onAmountMinChange,
|
|
363
|
+
onAmountMaxChange: K.onAmountMaxChange,
|
|
364
|
+
amountFlowDirection: K.amountFlowDirection,
|
|
365
|
+
onAmountFlowDirectionChange: K.onAmountFlowDirectionChange,
|
|
366
|
+
teamMemberOptions: ze,
|
|
367
|
+
selectedTeamMembers: K.selectedTeamMembers,
|
|
368
|
+
onTeamMembersChange: K.onTeamMembersChange,
|
|
369
|
+
cardOnly: K.cardOnly,
|
|
370
|
+
onCardToggle: K.onCardToggle
|
|
371
|
+
})
|
|
372
|
+
})
|
|
373
|
+
] }) : void 0
|
|
374
|
+
})]
|
|
296
375
|
})
|
|
297
376
|
] });
|
|
298
377
|
}
|
|
299
|
-
function
|
|
300
|
-
return /* @__PURE__ */
|
|
301
|
-
...
|
|
378
|
+
function k({ screenLabels: e, headerLabels: t, transactionsTableLabels: n, filterBarLabels: ee, actionItemsLabels: r, statusBadgeLabels: i, transactionDetailsLabels: a, transactionDetailsCardLabels: o, transactionDetailsActionsLabels: te, fileViewerLabels: c, receiptUpload: l, bankDisplayName: u, bankLogoSrc: d, bankLogoAlt: f, isBankingTaglineVisible: p, onSettingsClick: m, ...h }) {
|
|
379
|
+
return /* @__PURE__ */ E(s, {
|
|
380
|
+
...h,
|
|
302
381
|
widgetName: v,
|
|
303
|
-
children: /* @__PURE__ */
|
|
382
|
+
children: /* @__PURE__ */ E(O, {
|
|
304
383
|
screenLabels: e,
|
|
305
384
|
headerLabels: t,
|
|
306
385
|
transactionsTableLabels: n,
|
|
307
|
-
filterBarLabels:
|
|
308
|
-
actionItemsLabels:
|
|
309
|
-
statusBadgeLabels:
|
|
310
|
-
transactionDetailsLabels:
|
|
311
|
-
transactionDetailsCardLabels:
|
|
312
|
-
transactionDetailsActionsLabels:
|
|
313
|
-
fileViewerLabels:
|
|
314
|
-
receiptUpload:
|
|
315
|
-
bankDisplayName:
|
|
316
|
-
bankLogoSrc:
|
|
317
|
-
bankLogoAlt:
|
|
318
|
-
isBankingTaglineVisible:
|
|
319
|
-
onSettingsClick:
|
|
386
|
+
filterBarLabels: ee,
|
|
387
|
+
actionItemsLabels: r,
|
|
388
|
+
statusBadgeLabels: i,
|
|
389
|
+
transactionDetailsLabels: a,
|
|
390
|
+
transactionDetailsCardLabels: o,
|
|
391
|
+
transactionDetailsActionsLabels: te,
|
|
392
|
+
fileViewerLabels: c,
|
|
393
|
+
receiptUpload: l,
|
|
394
|
+
bankDisplayName: u,
|
|
395
|
+
bankLogoSrc: d,
|
|
396
|
+
bankLogoAlt: f,
|
|
397
|
+
isBankingTaglineVisible: p,
|
|
398
|
+
onSettingsClick: m
|
|
320
399
|
})
|
|
321
400
|
});
|
|
322
401
|
}
|
|
323
|
-
export {
|
|
402
|
+
export { k as ExpenseManagementWidget, k as default };
|