@tesouro/embedded-components-react 0.5.187 → 0.5.188
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 +19 -9
- package/dist/index.css +110 -0
- package/dist/index.d.ts +233 -60
- package/dist/index.js +6 -6
- package/dist/lib/ExpenseManagementWidget.d.ts +189 -11
- package/dist/lib/ExpenseManagementWidget.js +1 -1
- package/dist/lib/UploadReceiptWidget.js +1 -1
- package/dist/lib/WidgetSuite.d.ts +213 -16
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index.js +17 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index10.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index11.js +71 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index12.js +39 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index13.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index14.js +110 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index15.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index16.js +19 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index17.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index18.js +28 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index19.js +35 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index20.js +28 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index21.js +164 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index4.js +25 -18
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index5.js +20 -34
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index6.js +16 -20
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index7.js +16 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index8.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index9.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +10 -7
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index10.js +162 -59
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index11.js +64 -16
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index12.js +73 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js +348 -42
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index14.js +42 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index15.js +143 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index16.js +229 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index17.js +196 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index18.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index19.js +91 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index2.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index20.js +39 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index21.js +297 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index22.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index23.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index24.js +256 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index25.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index26.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index27.js +223 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index3.js +2 -254
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index4.js +4 -20
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +262 -8
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js +2 -221
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index7.js +54 -80
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index8.js +24 -254
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/index.js +34 -13
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js +549 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/labels.js +38 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ActionItemsList/ActionItemsList.js +64 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ActionItemsList/labels.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/ExpenseStatusBadge.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/badgeTones.js +16 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/labels.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesHeader/ExpensesHeader.js +37 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesHeader/labels.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesScreen/ExpensesScreen.js +112 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesScreen/labels.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/ExpensesTransactionsFilterBar.js +158 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/labels.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsTable/ExpensesTransactionsTable.js +148 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsTable/labels.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/FileViewer.js +107 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/PdfFileViewer.js +37 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/labels.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/ReceiptMatchLauncher.js +2 -24
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/ReceiptMatchSidebar.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/TransactionsMatchStep.js +62 -65
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/labels.js +1 -4
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/DeleteReceiptDialog/DeleteReceiptDialog.js +31 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/DeleteReceiptDialog/labels.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/TransactionDetails.js +268 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/labels.js +21 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/BulkProgress.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/TransactionDetailsActions.js +142 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/labels.js +20 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/isPdf.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +36 -36
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +268 -206
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +218 -113
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/formatCalendarDate.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index11.js +16 -14
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +1 -2
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/ExpenseManagementWidgetUi.js +0 -71
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/index.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/labels.js +0 -10
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/labels.js
|
|
2
|
+
var e = {
|
|
3
|
+
filePreview: "File preview",
|
|
4
|
+
zoomIn: "Zoom in",
|
|
5
|
+
zoomOut: "Zoom out",
|
|
6
|
+
moreActions: "Attachment actions",
|
|
7
|
+
downloadAttachment: "Download attachment",
|
|
8
|
+
deleteAttachment: "Delete attachment"
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { e as FILE_VIEWER_LABELS_EN };
|
|
@@ -2,27 +2,5 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
8
|
-
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/ReceiptMatchLauncher.js
|
|
9
|
-
function i({ onStart: i, labels: a }) {
|
|
10
|
-
let o = {
|
|
11
|
-
...t,
|
|
12
|
-
...a
|
|
13
|
-
};
|
|
14
|
-
return /* @__PURE__ */ r("div", {
|
|
15
|
-
className: "ttw:flex ttw:flex-col ttw:items-start ttw:gap-2 ttw:py-4",
|
|
16
|
-
children: [/* @__PURE__ */ n("p", {
|
|
17
|
-
className: "ttw:text-muted-foreground ttw:text-sm",
|
|
18
|
-
children: o.Description
|
|
19
|
-
}), /* @__PURE__ */ n(e, {
|
|
20
|
-
onClick: i,
|
|
21
|
-
size: "lg",
|
|
22
|
-
className: "ttw:cursor-pointer",
|
|
23
|
-
children: o.StartButton
|
|
24
|
-
})]
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
export { i as ReceiptMatchLauncher };
|
|
5
|
+
import "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import "react/jsx-runtime";
|
|
@@ -57,7 +57,7 @@ function u({ open: u, onClose: d, step: f, receipts: p, selectedReceiptIds: m, o
|
|
|
57
57
|
onOpenChange: d,
|
|
58
58
|
children: /* @__PURE__ */ l(t, {
|
|
59
59
|
showCloseButton: !1,
|
|
60
|
-
className: `ttw:flex ttw:p-0 ttw:max-w-none ttw:rounded-none ttw:border-0 ttw:fixed ttw:right-0 ttw:top-0 ttw:left-auto ttw:translate-x-0 ttw:translate-y-0 ttw:
|
|
60
|
+
className: `ttw:flex ttw:p-0 ttw:max-w-none ttw:rounded-none ttw:border-0 ttw:fixed ttw:inset-y-0 ttw:right-0 ttw:top-0 ttw:left-auto ttw:h-screen ttw:translate-x-0 ttw:translate-y-0 ttw:transition ttw:ease-in-out ttw:data-[state=open]:duration-500 ttw:data-[state=closed]:duration-300 ttw:data-[state=open]:slide-in-from-right ttw:data-[state=closed]:slide-out-to-right ttw:data-[state=open]:zoom-in-100 ttw:data-[state=closed]:zoom-out-100 ${f === 2 ? "ttw:w-[880px]" : "ttw:w-[440px]"}`,
|
|
61
61
|
children: [
|
|
62
62
|
/* @__PURE__ */ c(r, {
|
|
63
63
|
className: "ttw:sr-only",
|
|
@@ -6,137 +6,138 @@ import { Button as e, Input as t, Skeleton as n } from "../../../../../../../../
|
|
|
6
6
|
import { ErrorState as r } from "../../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
7
7
|
import "../../../../../../shared/ui/dist/index.js";
|
|
8
8
|
import { ReceiptMatchLabels as i } from "./labels.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { isPdf as a } from "../../isPdf.js";
|
|
10
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
11
|
+
import { Check as c, DollarSign as l, Loader2 as u, Search as d, X as f, ZoomIn as p, ZoomOut as m } from "lucide-react";
|
|
11
12
|
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/TransactionsMatchStep.js
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */
|
|
13
|
+
var h = 5;
|
|
14
|
+
function g({ receiptPreviewUrl: n, receiptFileName: a, transactions: g, selectedTransactionIds: y, allowMultipleTransactions: b = !1, searchValue: x, onSearchChange: S, onTransactionSelect: C, onConfirmMatch: w, isConfirming: T = !1, zoom: E = 1, onZoomIn: D, onZoomOut: O, canZoomIn: k = !0, canZoomOut: A = !0, showZoomControls: j = !!(n && (D || O)), onCancel: M, onClose: N, isLoading: P = !1, isError: F = !1, onRetry: I }) {
|
|
15
|
+
return /* @__PURE__ */ s("div", {
|
|
15
16
|
className: "ttw:flex ttw:w-full ttw:h-full",
|
|
16
|
-
children: [/* @__PURE__ */
|
|
17
|
+
children: [/* @__PURE__ */ s("div", {
|
|
17
18
|
className: "ttw:w-110 ttw:ml-auto ttw:bg-muted ttw:relative ttw:flex ttw:items-center ttw:justify-center ttw:overflow-hidden",
|
|
18
|
-
children: [n && /* @__PURE__ */
|
|
19
|
+
children: [n && /* @__PURE__ */ o(v, {
|
|
19
20
|
url: n,
|
|
20
|
-
fileName:
|
|
21
|
+
fileName: a,
|
|
21
22
|
zoom: E
|
|
22
|
-
}), j && /* @__PURE__ */
|
|
23
|
+
}), j && /* @__PURE__ */ s("div", {
|
|
23
24
|
className: "ttw:absolute ttw:bottom-4 ttw:left-4 ttw:flex ttw:items-center ttw:border ttw:rounded-[14px] ttw:border-border ttw:bg-card",
|
|
24
25
|
children: [
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ o(e, {
|
|
26
27
|
variant: "ghost",
|
|
27
28
|
size: "icon-sm",
|
|
28
29
|
onClick: O,
|
|
29
30
|
disabled: !O || !A,
|
|
30
31
|
"aria-label": i.ZoomOut,
|
|
31
32
|
className: "ttw:rounded-none ttw:rounded-tl-[14px] ttw:rounded-bl-[14px]",
|
|
32
|
-
children: /* @__PURE__ */
|
|
33
|
+
children: /* @__PURE__ */ o(m, { className: "ttw:size-4" })
|
|
33
34
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ o("div", { className: "ttw:w-px ttw:self-stretch ttw:bg-border" }),
|
|
36
|
+
/* @__PURE__ */ o(e, {
|
|
36
37
|
variant: "ghost",
|
|
37
38
|
size: "icon-sm",
|
|
38
39
|
onClick: D,
|
|
39
40
|
disabled: !D || !k,
|
|
40
41
|
"aria-label": i.ZoomIn,
|
|
41
42
|
className: "ttw:rounded-none ttw:rounded-tr-[14px] ttw:rounded-br-[14px]",
|
|
42
|
-
children: /* @__PURE__ */
|
|
43
|
+
children: /* @__PURE__ */ o(p, { className: "ttw:size-4" })
|
|
43
44
|
})
|
|
44
45
|
]
|
|
45
46
|
})]
|
|
46
|
-
}), /* @__PURE__ */
|
|
47
|
+
}), /* @__PURE__ */ s("div", {
|
|
47
48
|
className: "ttw:flex ttw:flex-col ttw:w-110 ttw:h-full ttw:border-l ttw:border-border ttw:bg-card",
|
|
48
49
|
children: [
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ s("div", {
|
|
50
51
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:px-6 ttw:pt-5 ttw:pb-2",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
52
|
+
children: [/* @__PURE__ */ o("h2", {
|
|
52
53
|
className: "ttw:text-lg ttw:font-semibold",
|
|
53
54
|
children: i.TransactionsTitle
|
|
54
|
-
}), /* @__PURE__ */
|
|
55
|
+
}), /* @__PURE__ */ o(e, {
|
|
55
56
|
variant: "ghost",
|
|
56
57
|
size: "sm",
|
|
57
58
|
className: "ttw:p-1 ttw:h-auto",
|
|
58
59
|
onClick: N,
|
|
59
60
|
"aria-label": i.Close,
|
|
60
|
-
children: /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ o(f, { size: 18 })
|
|
61
62
|
})]
|
|
62
63
|
}),
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ o("div", {
|
|
64
65
|
className: "ttw:px-6 ttw:py-3",
|
|
65
|
-
children: /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ s("div", {
|
|
66
67
|
className: "ttw:relative",
|
|
67
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ o(d, {
|
|
68
69
|
size: 16,
|
|
69
70
|
className: "ttw:absolute ttw:left-3 ttw:top-1/2 ttw:-translate-y-1/2 ttw:text-muted-foreground"
|
|
70
|
-
}), /* @__PURE__ */
|
|
71
|
+
}), /* @__PURE__ */ o(t, {
|
|
71
72
|
value: x,
|
|
72
73
|
onChange: (e) => S(e.target.value),
|
|
73
74
|
placeholder: i.SearchPlaceholder,
|
|
74
|
-
className: "ttw:pl-9"
|
|
75
|
+
className: "ttw:pl-9!"
|
|
75
76
|
})]
|
|
76
77
|
})
|
|
77
78
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ s("div", {
|
|
79
80
|
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:px-6 ttw:py-2 ttw:bg-muted/40",
|
|
80
81
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ o("span", {
|
|
82
83
|
className: "ttw:w-4 ttw:shrink-0",
|
|
83
84
|
"aria-hidden": !0
|
|
84
85
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ o("span", {
|
|
86
87
|
className: "ttw:flex-1 ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
|
|
87
88
|
children: i.Merchant
|
|
88
89
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ o("span", {
|
|
90
91
|
className: "ttw:w-24 ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
|
|
91
92
|
children: i.Date
|
|
92
93
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ o("span", {
|
|
94
95
|
className: "ttw:w-20 ttw:text-xs ttw:font-medium ttw:text-muted-foreground ttw:text-right",
|
|
95
96
|
children: i.Amount
|
|
96
97
|
})
|
|
97
98
|
]
|
|
98
99
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ s("div", {
|
|
100
101
|
className: "ttw:flex-1 ttw:overflow-y-auto",
|
|
101
102
|
children: [
|
|
102
|
-
P && /* @__PURE__ */
|
|
103
|
+
P && /* @__PURE__ */ s("div", {
|
|
103
104
|
role: "status",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
105
|
+
children: [/* @__PURE__ */ o("span", {
|
|
105
106
|
className: "ttw:sr-only",
|
|
106
107
|
children: i.LoadingTransactions
|
|
107
|
-
}), Array.from({ length:
|
|
108
|
+
}), Array.from({ length: h }).map((e, t) => /* @__PURE__ */ o(_, {}, t))]
|
|
108
109
|
}),
|
|
109
|
-
!P && F && /* @__PURE__ */
|
|
110
|
+
!P && F && /* @__PURE__ */ o(r, {
|
|
110
111
|
title: i.TransactionsErrorTitle,
|
|
111
112
|
description: i.TransactionsErrorSubtitle,
|
|
112
113
|
retryLabel: i.Retry,
|
|
113
114
|
onRetry: I
|
|
114
115
|
}),
|
|
115
|
-
!P && !F &&
|
|
116
|
+
!P && !F && g.length === 0 && /* @__PURE__ */ s("div", {
|
|
116
117
|
className: "ttw:flex ttw:flex-col ttw:items-center ttw:justify-center ttw:gap-3 ttw:h-full ttw:py-12",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ o("div", {
|
|
118
119
|
className: "ttw:w-14 ttw:h-14 ttw:rounded-full ttw:bg-muted ttw:flex ttw:items-center ttw:justify-center",
|
|
119
|
-
children: /* @__PURE__ */
|
|
120
|
+
children: /* @__PURE__ */ o(l, {
|
|
120
121
|
size: 24,
|
|
121
122
|
className: "ttw:text-muted-foreground"
|
|
122
123
|
})
|
|
123
|
-
}), /* @__PURE__ */
|
|
124
|
+
}), /* @__PURE__ */ s("div", {
|
|
124
125
|
className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-1 ttw:text-center ttw:px-6",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ o("span", {
|
|
126
127
|
className: "ttw:text-sm ttw:font-medium",
|
|
127
128
|
children: i.NoTransactionsTitle
|
|
128
|
-
}), /* @__PURE__ */
|
|
129
|
+
}), /* @__PURE__ */ o("span", {
|
|
129
130
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
130
131
|
children: i.NoTransactionsSubtitle
|
|
131
132
|
})]
|
|
132
133
|
})]
|
|
133
134
|
}),
|
|
134
|
-
!P && !F &&
|
|
135
|
+
!P && !F && g.map((e) => {
|
|
135
136
|
let t = y.includes(e.id);
|
|
136
|
-
return /* @__PURE__ */
|
|
137
|
-
className: `ttw:flex ttw:items-center ttw:gap-3 ttw:px-6 ttw:py-3 ttw:cursor-pointer ttw:transition-colors ${t ? "ttw:bg-
|
|
137
|
+
return /* @__PURE__ */ s("label", {
|
|
138
|
+
className: `ttw:flex ttw:items-center ttw:gap-3 ttw:px-6 ttw:py-3 ttw:cursor-pointer ttw:transition-colors ${t ? "ttw:bg-primary/5" : "ttw:hover:bg-muted/50"}`,
|
|
138
139
|
children: [
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ o("input", {
|
|
140
141
|
type: b ? "checkbox" : "radio",
|
|
141
142
|
name: b ? void 0 : "receipt-match-transaction",
|
|
142
143
|
checked: t,
|
|
@@ -149,15 +150,15 @@ function h({ receiptPreviewUrl: n, receiptFileName: h, transactions: _, selected
|
|
|
149
150
|
"aria-label": `Select transaction from ${e.merchantName}`,
|
|
150
151
|
className: "ttw:h-4 ttw:w-4 ttw:border ttw:border-input ttw:accent-primary ttw:cursor-pointer ttw:shrink-0"
|
|
151
152
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ o("span", {
|
|
153
154
|
className: "ttw:flex-1 ttw:text-sm ttw:font-medium ttw:truncate",
|
|
154
155
|
children: e.merchantName
|
|
155
156
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ o("span", {
|
|
157
158
|
className: "ttw:w-24 ttw:text-sm ttw:text-muted-foreground ttw:shrink-0",
|
|
158
159
|
children: e.date
|
|
159
160
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ o("span", {
|
|
161
162
|
className: "ttw:w-20 ttw:text-sm ttw:font-medium ttw:tabular-nums ttw:text-right ttw:shrink-0",
|
|
162
163
|
children: e.formattedAmount
|
|
163
164
|
})
|
|
@@ -166,51 +167,47 @@ function h({ receiptPreviewUrl: n, receiptFileName: h, transactions: _, selected
|
|
|
166
167
|
})
|
|
167
168
|
]
|
|
168
169
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ s("div", {
|
|
170
171
|
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:px-6 ttw:py-4 ttw:border-t ttw:border-border",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ o(e, {
|
|
172
173
|
variant: "outline",
|
|
173
174
|
className: "ttw:flex-1",
|
|
174
175
|
onClick: M,
|
|
175
176
|
children: i.Back
|
|
176
|
-
}), /* @__PURE__ */
|
|
177
|
+
}), /* @__PURE__ */ s(e, {
|
|
177
178
|
className: "ttw:flex-1",
|
|
178
179
|
disabled: y.length === 0 || T,
|
|
179
180
|
onClick: w,
|
|
180
|
-
children: [T ? /* @__PURE__ */
|
|
181
|
+
children: [T ? /* @__PURE__ */ o(u, {
|
|
181
182
|
size: 16,
|
|
182
183
|
className: "ttw:animate-spin"
|
|
183
|
-
}) : /* @__PURE__ */
|
|
184
|
+
}) : /* @__PURE__ */ o(c, { size: 16 }), i.ConfirmMatch]
|
|
184
185
|
})]
|
|
185
186
|
})
|
|
186
187
|
]
|
|
187
188
|
})]
|
|
188
189
|
});
|
|
189
190
|
}
|
|
190
|
-
function
|
|
191
|
-
return /* @__PURE__ */
|
|
191
|
+
function _() {
|
|
192
|
+
return /* @__PURE__ */ s("div", {
|
|
192
193
|
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:px-6 ttw:py-3",
|
|
193
194
|
children: [
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ o(n, { className: "ttw:h-4 ttw:w-4" }),
|
|
196
|
+
/* @__PURE__ */ o(n, { className: "ttw:h-4 ttw:flex-1" }),
|
|
197
|
+
/* @__PURE__ */ o(n, { className: "ttw:h-4 ttw:w-20" }),
|
|
198
|
+
/* @__PURE__ */ o(n, { className: "ttw:h-4 ttw:w-16" })
|
|
198
199
|
]
|
|
199
200
|
});
|
|
200
201
|
}
|
|
201
|
-
function _(e, t) {
|
|
202
|
-
let n = t ?? e.split(/[?#]/)[0];
|
|
203
|
-
return /\.pdf$/i.test(n);
|
|
204
|
-
}
|
|
205
202
|
function v({ url: e, fileName: t, zoom: n }) {
|
|
206
|
-
return
|
|
203
|
+
return a(e, t) ? /* @__PURE__ */ o("iframe", {
|
|
207
204
|
src: `${e}#toolbar=0&navpanes=0&scrollbar=0`,
|
|
208
205
|
title: i.ReceiptPdfPreviewTitle,
|
|
209
206
|
sandbox: "",
|
|
210
207
|
referrerPolicy: "no-referrer",
|
|
211
208
|
className: "ttw:w-full ttw:h-full ttw:border-0 ttw:transition-transform",
|
|
212
209
|
style: { transform: `scale(${n})` }
|
|
213
|
-
}) : /* @__PURE__ */
|
|
210
|
+
}) : /* @__PURE__ */ o("img", {
|
|
214
211
|
src: e,
|
|
215
212
|
alt: i.ReceiptImageAlt,
|
|
216
213
|
className: "ttw:max-h-full ttw:max-w-full ttw:object-contain ttw:transition-transform",
|
|
@@ -218,4 +215,4 @@ function v({ url: e, fileName: t, zoom: n }) {
|
|
|
218
215
|
});
|
|
219
216
|
}
|
|
220
217
|
//#endregion
|
|
221
|
-
export {
|
|
218
|
+
export { g as TransactionsMatchStep };
|
|
@@ -47,9 +47,6 @@ var e = {
|
|
|
47
47
|
ZoomIn: "Zoom in",
|
|
48
48
|
ZoomOut: "Zoom out",
|
|
49
49
|
ReceiptImageAlt: "Receipt"
|
|
50
|
-
}, t = {
|
|
51
|
-
Description: "Match uploaded receipts to transactions that need one.",
|
|
52
|
-
StartButton: "Start matching"
|
|
53
50
|
};
|
|
54
51
|
//#endregion
|
|
55
|
-
export {
|
|
52
|
+
export { e as ReceiptMatchLabels };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AlertDialog as e, AlertDialogCancel as t, AlertDialogContent as n, AlertDialogDescription as r, AlertDialogFooter as i, AlertDialogHeader as a, AlertDialogTitle as o, Button as s } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { DELETE_RECEIPT_DIALOG_LABELS_EN as c } from "./labels.js";
|
|
3
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/DeleteReceiptDialog/DeleteReceiptDialog.js
|
|
5
|
+
function d({ open: d, onOpenChange: f, isRemoving: p, onConfirm: m, onCancel: h, labels: g }) {
|
|
6
|
+
let _ = {
|
|
7
|
+
...c,
|
|
8
|
+
...g
|
|
9
|
+
};
|
|
10
|
+
return /* @__PURE__ */ l(e, {
|
|
11
|
+
open: d,
|
|
12
|
+
onOpenChange: f,
|
|
13
|
+
children: /* @__PURE__ */ u(n, { children: [/* @__PURE__ */ u(a, { children: [/* @__PURE__ */ l(o, { children: _.title }), /* @__PURE__ */ l(r, { children: _.message })] }), /* @__PURE__ */ u(i, { children: [/* @__PURE__ */ l(t, {
|
|
14
|
+
asChild: !0,
|
|
15
|
+
children: /* @__PURE__ */ l(s, {
|
|
16
|
+
variant: "ghost",
|
|
17
|
+
onClick: h,
|
|
18
|
+
disabled: p,
|
|
19
|
+
children: _.cancelButton
|
|
20
|
+
})
|
|
21
|
+
}), /* @__PURE__ */ l(s, {
|
|
22
|
+
variant: "destructive",
|
|
23
|
+
onClick: m,
|
|
24
|
+
disabled: p,
|
|
25
|
+
loading: p,
|
|
26
|
+
children: _.confirmButton
|
|
27
|
+
})] })] })
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { d as DeleteReceiptDialog, d as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/DeleteReceiptDialog/labels.js
|
|
2
|
+
var e = {
|
|
3
|
+
title: "Remove receipt?",
|
|
4
|
+
message: "The receipt will be returned to the inbox and can be matched to another transaction.",
|
|
5
|
+
cancelButton: "Cancel",
|
|
6
|
+
confirmButton: "Remove receipt"
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { e as DELETE_RECEIPT_DIALOG_LABELS_EN };
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { Alert as e, AlertDescription as t, Button as n, Dialog as r, DialogClose as i, DialogContent as a, DialogDescription as ee, DialogFooter as o, DialogHeader as s, DialogTitle as c, Separator as l, Skeleton as u, Typography as d } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { ExpenseStatusBadge as f } from "../ExpenseStatusBadge/ExpenseStatusBadge.js";
|
|
7
|
+
import { FileViewer as p } from "../FileViewer/FileViewer.js";
|
|
8
|
+
import { AccordionItemCard as m } from "../AccordionItemCard/AccordionItemCard.js";
|
|
9
|
+
import { TRANSACTION_DETAILS_LABELS_EN as h } from "./labels.js";
|
|
10
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
11
|
+
import { CloudUpload as te, DollarSign as ne, Loader as re, Receipt as ie, X as ae } from "lucide-react";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/TransactionDetails.js
|
|
13
|
+
var oe = 3, y = () => void 0;
|
|
14
|
+
function b({ open: b, onClose: x, transactionId: S, transactionDate: C, status: w, hasValidationError: T, amount: E, merchant: D, receiptUrl: O, isLoading: k, isError: A, isClosingDisabled: j, cardLabel: M, cardName: N, cardholder: P, showCardholder: F, showPhysicalPill: I, isDescriptionRequired: L, isReceiptRequired: R, isReceiptAutoMatched: z, isReceiptActionDisabled: B, receiptButtonLabel: V, receiptButtonIcon: H, receiptButtonVariant: U, showNoReceiptWarning: W, onDeleteReceiptClick: G, onUploadClick: K, onOpenReceiptInbox: q, onSubmitWithoutReceipt: se, onFileDrop: J, isUploading: Y, descriptionValue: X, initialDescriptionValue: ce, onDescriptionChange: le, onSaveDescription: ue, onCancelDescription: de, isSavingDescription: fe, isMemoEditable: pe, memoBadgeLabel: me, showApprovalCard: he, hasAppliedPolicy: ge, greaterThanValue: _e, lessThanValue: ve, ruleLabel: ye, rejectionReason: be, approverName: xe, isAutoApproved: Se, isManuallyApproved: Ce, showAccountingCard: we, glCategory: Te = "", initialGlCategory: Ee = "", glCategoryOptions: De = [], onGlCategoryChange: Oe, department: ke = "", initialDepartment: Ae = "", departmentOptions: je = [], onDepartmentChange: Me, location: Ne = "", initialLocation: Pe = "", locationOptions: Fe = [], onLocationChange: Ie, onSaveAccounting: Le, onCancelAccounting: Re, isSavingAccounting: ze, isGlCategoryDisabled: Be, glCategoryHighlight: Ve, departmentHighlight: He, locationHighlight: Ue, showAuditHistoryCard: Z, auditHistoryRows: We, isLoadingAuditHistory: Ge, isAuditHistoryError: Ke, children: qe, labels: Je, cardLabels: Q, statusLabels: Ye, fileViewerLabels: Xe, historyLabels: Ze }) {
|
|
15
|
+
let $ = {
|
|
16
|
+
...h,
|
|
17
|
+
...Je
|
|
18
|
+
};
|
|
19
|
+
return /* @__PURE__ */ _(r, {
|
|
20
|
+
open: b,
|
|
21
|
+
onOpenChange: (e) => {
|
|
22
|
+
!e && !j && x();
|
|
23
|
+
},
|
|
24
|
+
children: /* @__PURE__ */ v(a, {
|
|
25
|
+
fullScreen: !0,
|
|
26
|
+
showCloseButton: !1,
|
|
27
|
+
className: "ttw:flex ttw:p-0",
|
|
28
|
+
children: [/* @__PURE__ */ v("div", {
|
|
29
|
+
className: "ttw:flex ttw:flex-1/2 ttw:flex-col ttw:overflow-hidden ttw:border-r ttw:border-border",
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ v(s, {
|
|
32
|
+
className: "ttw:h-20 ttw:flex-row ttw:items-center ttw:gap-3 ttw:px-8 ttw:py-6",
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ _(c, {
|
|
35
|
+
className: "ttw:sr-only",
|
|
36
|
+
children: $.screenReaderTitle
|
|
37
|
+
}),
|
|
38
|
+
/* @__PURE__ */ _(ee, {
|
|
39
|
+
className: "ttw:sr-only",
|
|
40
|
+
children: $.screenReaderDescription
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ _("div", {
|
|
43
|
+
className: "ttw:mr-3 ttw:flex ttw:size-15 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-emerald-700/25 ttw:shadow-[0_0_40px_8px] ttw:shadow-emerald-700/25",
|
|
44
|
+
children: /* @__PURE__ */ _("div", {
|
|
45
|
+
className: "ttw:flex ttw:size-11 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-emerald-700 ttw:text-white",
|
|
46
|
+
children: /* @__PURE__ */ _(ne, {
|
|
47
|
+
className: "ttw:size-5",
|
|
48
|
+
"aria-hidden": !0
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ _(d, {
|
|
53
|
+
variant: "h4",
|
|
54
|
+
children: $.contentTitle
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ _(l, { orientation: "vertical" }),
|
|
57
|
+
!k && /* @__PURE__ */ _(d, {
|
|
58
|
+
variant: "h5",
|
|
59
|
+
className: "ttw:whitespace-nowrap",
|
|
60
|
+
children: C
|
|
61
|
+
}),
|
|
62
|
+
!k && /* @__PURE__ */ _(f, {
|
|
63
|
+
status: w,
|
|
64
|
+
hasValidationErrors: T,
|
|
65
|
+
labels: Ye
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ _("div", {
|
|
70
|
+
className: "ttw:mx-auto ttw:flex ttw:w-140 ttw:flex-1 ttw:flex-col ttw:gap-4 ttw:overflow-y-auto ttw:px-6 ttw:py-12",
|
|
71
|
+
children: A ? /* @__PURE__ */ _(e, {
|
|
72
|
+
variant: "destructive",
|
|
73
|
+
children: /* @__PURE__ */ _(t, { children: $.loadFailed })
|
|
74
|
+
}) : k ? Array.from({ length: oe }, (e, t) => /* @__PURE__ */ _(u, {
|
|
75
|
+
width: "100%",
|
|
76
|
+
height: 290
|
|
77
|
+
}, t)) : /* @__PURE__ */ v(g, { children: [
|
|
78
|
+
/* @__PURE__ */ _(d, {
|
|
79
|
+
variant: "h2",
|
|
80
|
+
className: "ttw:font-bold",
|
|
81
|
+
children: $.amountAtMerchant(E, D)
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ _(m, {
|
|
84
|
+
type: "requirements",
|
|
85
|
+
title: $.requirementsCardTitle,
|
|
86
|
+
cardLabel: M,
|
|
87
|
+
cardName: N,
|
|
88
|
+
cardholder: P,
|
|
89
|
+
showCardholder: F,
|
|
90
|
+
showPhysicalPill: I,
|
|
91
|
+
receiptFileUrl: O,
|
|
92
|
+
hasMissingInfo: !!(L && !X || R && !O),
|
|
93
|
+
showNoReceiptWarning: !!W,
|
|
94
|
+
isDescriptionRequired: L,
|
|
95
|
+
isReceiptRequired: R,
|
|
96
|
+
isReceiptAutoMatched: z,
|
|
97
|
+
isReceiptActionDisabled: B,
|
|
98
|
+
receiptButtonLabel: V,
|
|
99
|
+
receiptButtonIcon: H,
|
|
100
|
+
receiptButtonVariant: U,
|
|
101
|
+
onUploadClick: K,
|
|
102
|
+
onOpenReceiptInbox: q,
|
|
103
|
+
onSubmitWithoutReceipt: se,
|
|
104
|
+
onDeleteReceipt: G,
|
|
105
|
+
descriptionValue: X,
|
|
106
|
+
initialDescriptionValue: ce,
|
|
107
|
+
onDescriptionChange: le,
|
|
108
|
+
onSaveDescription: ue,
|
|
109
|
+
onCancelDescription: de,
|
|
110
|
+
isSavingDescription: fe,
|
|
111
|
+
isMemoEditable: pe,
|
|
112
|
+
memoBadgeLabel: me,
|
|
113
|
+
labels: Q
|
|
114
|
+
}, `requirements-${S}`),
|
|
115
|
+
he && /* @__PURE__ */ _(m, {
|
|
116
|
+
type: "approvals",
|
|
117
|
+
title: $.approvalsCardTitle,
|
|
118
|
+
hasAppliedPolicy: !!ge,
|
|
119
|
+
isRejected: w === "rejected",
|
|
120
|
+
isAutoApproved: !!Se,
|
|
121
|
+
isManuallyApproved: !!Ce,
|
|
122
|
+
isPendingReview: w === "approve_in_progress",
|
|
123
|
+
rejectionReason: be,
|
|
124
|
+
greaterThanValue: _e,
|
|
125
|
+
lessThanValue: ve,
|
|
126
|
+
ruleLabel: ye,
|
|
127
|
+
approverName: xe,
|
|
128
|
+
labels: Q
|
|
129
|
+
}, `approvals-${S}`),
|
|
130
|
+
we && /* @__PURE__ */ _(m, {
|
|
131
|
+
type: "accounting",
|
|
132
|
+
title: $.accountingCardTitle,
|
|
133
|
+
glCategory: Te,
|
|
134
|
+
initialGlCategory: Ee,
|
|
135
|
+
glCategoryOptions: De,
|
|
136
|
+
onGlCategoryChange: Oe ?? y,
|
|
137
|
+
department: ke,
|
|
138
|
+
initialDepartment: Ae,
|
|
139
|
+
departmentOptions: je,
|
|
140
|
+
onDepartmentChange: Me ?? y,
|
|
141
|
+
location: Ne,
|
|
142
|
+
initialLocation: Pe,
|
|
143
|
+
locationOptions: Fe,
|
|
144
|
+
onLocationChange: Ie ?? y,
|
|
145
|
+
onSave: Le ?? y,
|
|
146
|
+
onCancel: Re ?? y,
|
|
147
|
+
isSaving: !!ze,
|
|
148
|
+
isGlCategoryDisabled: Be,
|
|
149
|
+
glCategoryHighlight: Ve,
|
|
150
|
+
departmentHighlight: He,
|
|
151
|
+
locationHighlight: Ue,
|
|
152
|
+
labels: Q
|
|
153
|
+
}, `accounting-${S}`),
|
|
154
|
+
Z && /* @__PURE__ */ _(m, {
|
|
155
|
+
type: "auditHistory",
|
|
156
|
+
title: $.auditHistoryCardTitle,
|
|
157
|
+
rows: We ?? [],
|
|
158
|
+
isLoading: Ge,
|
|
159
|
+
isError: Ke,
|
|
160
|
+
historyLabels: Ze
|
|
161
|
+
}, `auditHistory-${S}`)
|
|
162
|
+
] })
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ _(o, {
|
|
165
|
+
className: "ttw:flex-row ttw:items-center ttw:justify-center ttw:border-t ttw:border-border ttw:p-6 ttw:sm:justify-center",
|
|
166
|
+
children: k || A ? null : qe
|
|
167
|
+
})
|
|
168
|
+
]
|
|
169
|
+
}), /* @__PURE__ */ v("div", {
|
|
170
|
+
className: "ttw:relative ttw:flex ttw:flex-1/2 ttw:bg-muted ttw:px-6 ttw:py-20",
|
|
171
|
+
children: [/* @__PURE__ */ _(i, {
|
|
172
|
+
asChild: !0,
|
|
173
|
+
className: "ttw:absolute ttw:right-4 ttw:top-4",
|
|
174
|
+
children: /* @__PURE__ */ _(n, {
|
|
175
|
+
type: "button",
|
|
176
|
+
variant: "outline",
|
|
177
|
+
size: "icon",
|
|
178
|
+
"aria-label": $.closeDialog,
|
|
179
|
+
disabled: j,
|
|
180
|
+
children: /* @__PURE__ */ _(ae, {
|
|
181
|
+
className: "ttw:size-4",
|
|
182
|
+
"aria-hidden": !0
|
|
183
|
+
})
|
|
184
|
+
})
|
|
185
|
+
}), O ? /* @__PURE__ */ _(p, {
|
|
186
|
+
url: O,
|
|
187
|
+
className: "ttw:h-full ttw:min-h-0 ttw:w-full",
|
|
188
|
+
showDeleteOption: !!G,
|
|
189
|
+
onDeleteClick: G,
|
|
190
|
+
labels: Xe
|
|
191
|
+
}) : K || J ? /* @__PURE__ */ _("button", {
|
|
192
|
+
type: "button",
|
|
193
|
+
disabled: k || Y,
|
|
194
|
+
"aria-label": Y ? $.uploadingReceipt : `${$.dropFilesHere} ${$.clickToBrowse}`,
|
|
195
|
+
onClick: () => {
|
|
196
|
+
k || Y || K?.();
|
|
197
|
+
},
|
|
198
|
+
onDragOver: (e) => e.preventDefault(),
|
|
199
|
+
onDrop: (e) => {
|
|
200
|
+
if (k || Y) return;
|
|
201
|
+
e.preventDefault();
|
|
202
|
+
let t = e.dataTransfer.files[0];
|
|
203
|
+
t && J?.(t);
|
|
204
|
+
},
|
|
205
|
+
className: "ttw:flex ttw:h-full ttw:w-full ttw:cursor-pointer ttw:flex-col ttw:items-center ttw:justify-center ttw:gap-2 ttw:rounded-md ttw:border ttw:border-dashed ttw:border-border ttw:bg-background ttw:px-6 ttw:disabled:cursor-default",
|
|
206
|
+
children: Y ? /* @__PURE__ */ v(g, { children: [
|
|
207
|
+
/* @__PURE__ */ _(re, {
|
|
208
|
+
className: "ttw:size-5 ttw:animate-spin ttw:text-primary",
|
|
209
|
+
"aria-hidden": !0
|
|
210
|
+
}),
|
|
211
|
+
/* @__PURE__ */ _(d, {
|
|
212
|
+
variant: "body2",
|
|
213
|
+
component: "span",
|
|
214
|
+
className: "ttw:font-semibold",
|
|
215
|
+
children: $.uploadingReceipt
|
|
216
|
+
}),
|
|
217
|
+
/* @__PURE__ */ _(d, {
|
|
218
|
+
variant: "body2",
|
|
219
|
+
component: "span",
|
|
220
|
+
color: "muted",
|
|
221
|
+
children: $.uploadingReceiptBody
|
|
222
|
+
})
|
|
223
|
+
] }) : !k && /* @__PURE__ */ v(g, { children: [
|
|
224
|
+
/* @__PURE__ */ _("div", {
|
|
225
|
+
className: "ttw:flex ttw:size-11 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-primary",
|
|
226
|
+
children: /* @__PURE__ */ _(te, {
|
|
227
|
+
className: "ttw:size-5 ttw:text-primary-foreground",
|
|
228
|
+
"aria-hidden": !0
|
|
229
|
+
})
|
|
230
|
+
}),
|
|
231
|
+
/* @__PURE__ */ v(d, {
|
|
232
|
+
variant: "body2",
|
|
233
|
+
component: "span",
|
|
234
|
+
children: [
|
|
235
|
+
$.dropFilesHere,
|
|
236
|
+
" ",
|
|
237
|
+
/* @__PURE__ */ _("span", {
|
|
238
|
+
className: "ttw:text-primary ttw:underline",
|
|
239
|
+
children: $.clickToBrowse
|
|
240
|
+
})
|
|
241
|
+
]
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ _(d, {
|
|
244
|
+
variant: "caption",
|
|
245
|
+
color: "muted",
|
|
246
|
+
children: $.acceptedFileTypes
|
|
247
|
+
})
|
|
248
|
+
] })
|
|
249
|
+
}) : /* @__PURE__ */ _("div", {
|
|
250
|
+
className: "ttw:flex ttw:size-full ttw:flex-col ttw:items-center ttw:justify-center ttw:gap-2 ttw:rounded-md ttw:border ttw:border-dashed ttw:border-border ttw:bg-background",
|
|
251
|
+
children: !k && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", {
|
|
252
|
+
className: "ttw:flex ttw:size-11 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-muted",
|
|
253
|
+
children: /* @__PURE__ */ _(ie, {
|
|
254
|
+
className: "ttw:size-5 ttw:text-muted-foreground",
|
|
255
|
+
"aria-hidden": !0
|
|
256
|
+
})
|
|
257
|
+
}), /* @__PURE__ */ _(d, {
|
|
258
|
+
variant: "body2",
|
|
259
|
+
color: "muted",
|
|
260
|
+
children: $.noReceiptAttached
|
|
261
|
+
})] })
|
|
262
|
+
})]
|
|
263
|
+
})]
|
|
264
|
+
})
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
//#endregion
|
|
268
|
+
export { b as TransactionDetails, b as default };
|