@tesouro/embedded-components-react 0.11.119 → 0.11.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +32 -154
- package/dist/index.d.ts +11 -2
- package/dist/lib/ExpenseManagementWidget.d.ts +11 -2
- package/dist/lib/WidgetSuite.d.ts +11 -2
- 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/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
|
@@ -2,116 +2,110 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { Button as e,
|
|
6
|
-
import {
|
|
5
|
+
import { Button as e, Heading as t, Skeleton as n, Tooltip as r, TooltipContent as i, TooltipProvider as a, TooltipTrigger as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { EmptyState as s } from "../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
7
|
+
import { ErrorState as c } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
8
|
+
import { LoadingRegion as l } from "../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
|
|
7
9
|
import "../../../../shared/ui/dist/index.js";
|
|
8
|
-
import { ReceiptMatchLabels as
|
|
9
|
-
import { ReceiptInboxItem as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import {
|
|
10
|
+
import { ReceiptMatchLabels as u } from "./index2.js";
|
|
11
|
+
import { ReceiptInboxItem as d } from "./index3.js";
|
|
12
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
13
|
+
import { FileText as m, X as h } from "lucide-react";
|
|
12
14
|
// ../../libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index4.js
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
className: "ttw:flex ttw:flex-col ttw:w-[440px] ttw:h-full ttw:ml-auto ttw:border-l ttw:border-border ttw:bg-
|
|
15
|
+
var g = 4;
|
|
16
|
+
function _({ embedded: n = !1, receipts: _, selectedReceiptIds: y, onSelectAll: b, onReset: x, onReceiptToggle: S, onViewAttachment: C, onDeleteReceipt: w, onReview: T, onClose: E, reviewLabel: D, isLoading: O = !1, isError: k = !1, onRetry: A, showSelectAllButton: j = !0 }) {
|
|
17
|
+
return /* @__PURE__ */ p("div", {
|
|
18
|
+
className: n ? "ttw:flex ttw:flex-col ttw:h-full" : "ttw:flex ttw:flex-col ttw:w-[440px] ttw:h-full ttw:ml-auto ttw:border-l ttw:border-border ttw:bg-card",
|
|
17
19
|
children: [
|
|
18
|
-
/* @__PURE__ */
|
|
20
|
+
n && /* @__PURE__ */ f(t, {
|
|
21
|
+
variant: "section",
|
|
22
|
+
level: 2,
|
|
23
|
+
children: u.InboxTitle
|
|
24
|
+
}),
|
|
25
|
+
!n && /* @__PURE__ */ p("div", {
|
|
19
26
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:px-6 ttw:pt-5 ttw:pb-2",
|
|
20
|
-
children: [/* @__PURE__ */
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
children: [/* @__PURE__ */ f(t, {
|
|
28
|
+
variant: "section",
|
|
29
|
+
level: 2,
|
|
30
|
+
children: O || k ? u.InboxTitle : `${u.InboxTitle} (${_.length})`
|
|
31
|
+
}), /* @__PURE__ */ f(a, { children: /* @__PURE__ */ p(r, { children: [/* @__PURE__ */ f(o, {
|
|
32
|
+
asChild: !0,
|
|
33
|
+
children: /* @__PURE__ */ f(e, {
|
|
34
|
+
variant: "ghost",
|
|
35
|
+
size: "sm",
|
|
36
|
+
className: "ttw:p-1 ttw:h-auto",
|
|
37
|
+
onClick: E,
|
|
38
|
+
"aria-label": u.Close,
|
|
39
|
+
children: /* @__PURE__ */ f(h, { size: 18 })
|
|
40
|
+
})
|
|
41
|
+
}), /* @__PURE__ */ f(i, { children: u.Close })] }) })]
|
|
31
42
|
}),
|
|
32
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ p("div", {
|
|
33
44
|
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:px-6 ttw:py-3",
|
|
34
|
-
children: [
|
|
45
|
+
children: [j && /* @__PURE__ */ f(e, {
|
|
35
46
|
variant: "outline",
|
|
36
47
|
size: "sm",
|
|
37
|
-
onClick:
|
|
38
|
-
children:
|
|
39
|
-
}), /* @__PURE__ */
|
|
48
|
+
onClick: b,
|
|
49
|
+
children: u.SelectAll
|
|
50
|
+
}), /* @__PURE__ */ f(e, {
|
|
40
51
|
variant: "outline",
|
|
41
52
|
size: "sm",
|
|
42
|
-
onClick:
|
|
43
|
-
children:
|
|
53
|
+
onClick: x,
|
|
54
|
+
children: u.Reset
|
|
44
55
|
})]
|
|
45
56
|
}),
|
|
46
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ f("div", {
|
|
47
58
|
className: "ttw:flex-1 ttw:overflow-y-auto ttw:flex ttw:flex-col ttw:gap-2 ttw:px-6 ttw:py-3",
|
|
48
|
-
children:
|
|
49
|
-
|
|
59
|
+
children: O ? /* @__PURE__ */ f(l, {
|
|
60
|
+
isLoading: !0,
|
|
61
|
+
loadingLabel: u.LoadingReceipts,
|
|
50
62
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
51
|
-
children:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
className: "ttw:flex
|
|
62
|
-
|
|
63
|
-
className: "ttw:w-14 ttw:h-14 ttw:rounded-full ttw:bg-muted ttw:flex ttw:items-center ttw:justify-center",
|
|
64
|
-
children: /* @__PURE__ */ a(c, {
|
|
65
|
-
size: 24,
|
|
66
|
-
className: "ttw:text-muted-foreground"
|
|
67
|
-
})
|
|
68
|
-
}), /* @__PURE__ */ o("div", {
|
|
69
|
-
className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-1 ttw:text-center",
|
|
70
|
-
children: [/* @__PURE__ */ a("span", {
|
|
71
|
-
className: "ttw:text-sm ttw:font-medium",
|
|
72
|
-
children: r.NoReceiptsTitle
|
|
73
|
-
}), /* @__PURE__ */ a("span", {
|
|
74
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
75
|
-
children: r.NoReceiptsSubtitle
|
|
76
|
-
})]
|
|
77
|
-
})]
|
|
78
|
-
}) : t.map((e) => /* @__PURE__ */ a(i, {
|
|
63
|
+
children: Array.from({ length: g }).map((e, t) => /* @__PURE__ */ f(v, {}, t))
|
|
64
|
+
}) : k ? /* @__PURE__ */ f(c, {
|
|
65
|
+
title: u.ReceiptsErrorTitle,
|
|
66
|
+
description: u.ReceiptsErrorSubtitle,
|
|
67
|
+
retryLabel: u.Retry,
|
|
68
|
+
onRetry: A
|
|
69
|
+
}) : _.length === 0 ? /* @__PURE__ */ f(s, {
|
|
70
|
+
icon: /* @__PURE__ */ f(m, {}),
|
|
71
|
+
title: u.NoReceiptsTitle,
|
|
72
|
+
description: u.NoReceiptsSubtitle,
|
|
73
|
+
className: "ttw:flex-1"
|
|
74
|
+
}) : _.map((e) => /* @__PURE__ */ f(d, {
|
|
79
75
|
item: e,
|
|
80
|
-
selected:
|
|
81
|
-
onToggle: () =>
|
|
82
|
-
onViewAttachment: () =>
|
|
83
|
-
onDelete: () =>
|
|
76
|
+
selected: y.includes(e.id),
|
|
77
|
+
onToggle: () => S(e.id),
|
|
78
|
+
onViewAttachment: () => C(e.id),
|
|
79
|
+
onDelete: () => w(e.id)
|
|
84
80
|
}, e.id))
|
|
85
81
|
}),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
className: "ttw:flex ttw:
|
|
88
|
-
children: [/* @__PURE__ */
|
|
89
|
-
variant: "
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
onClick: v,
|
|
97
|
-
children: [b ?? r.Review, /* @__PURE__ */ a(s, { size: 16 })]
|
|
82
|
+
!n && /* @__PURE__ */ p("div", {
|
|
83
|
+
className: "ttw:flex ttw:flex-col-reverse ttw:gap-2 ttw:px-6 ttw:py-4 ttw:border-t ttw:border-border ttw:sm:flex-row ttw:sm:justify-end",
|
|
84
|
+
children: [/* @__PURE__ */ f(e, {
|
|
85
|
+
variant: "ghost",
|
|
86
|
+
onClick: E,
|
|
87
|
+
children: u.Cancel
|
|
88
|
+
}), /* @__PURE__ */ f(e, {
|
|
89
|
+
disabled: O || y.length === 0,
|
|
90
|
+
onClick: T,
|
|
91
|
+
children: D ?? u.Review
|
|
98
92
|
})]
|
|
99
93
|
})
|
|
100
94
|
]
|
|
101
95
|
});
|
|
102
96
|
}
|
|
103
|
-
function
|
|
104
|
-
return /* @__PURE__ */
|
|
97
|
+
function v() {
|
|
98
|
+
return /* @__PURE__ */ p("div", {
|
|
105
99
|
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:py-2",
|
|
106
100
|
children: [
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ f(n, { className: "ttw:h-4 ttw:w-4" }),
|
|
102
|
+
/* @__PURE__ */ f(n, { className: "ttw:h-10 ttw:w-10 ttw:rounded" }),
|
|
103
|
+
/* @__PURE__ */ p("div", {
|
|
110
104
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5 ttw:flex-1",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
105
|
+
children: [/* @__PURE__ */ f(n, { className: "ttw:h-4 ttw:w-32" }), /* @__PURE__ */ f(n, { className: "ttw:h-3 ttw:w-20" })]
|
|
112
106
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ f(n, { className: "ttw:h-4 ttw:w-4" })
|
|
114
108
|
]
|
|
115
109
|
});
|
|
116
110
|
}
|
|
117
|
-
export {
|
|
111
|
+
export { _ as ReceiptInboxStep };
|
|
@@ -2,218 +2,225 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { Button as e,
|
|
6
|
-
import {
|
|
5
|
+
import { Button as e, Checkbox as t, Heading as n, Input as r, RadioGroup as i, RadioGroupItem as a, Skeleton as o, Tooltip as s, TooltipContent as c, TooltipProvider as l, TooltipTrigger as u } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { EmptyState as d } from "../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
7
|
+
import { ErrorState as f } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
8
|
+
import { LoadingRegion as p } from "../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
|
|
7
9
|
import "../../../../shared/ui/dist/index.js";
|
|
8
|
-
import { PdfFileViewer as
|
|
9
|
-
import { isPdf as
|
|
10
|
+
import { PdfFileViewer as m } from "../../../ui/dist/lib/FileViewer/PdfFileViewer.js";
|
|
11
|
+
import { isPdf as h } from "../../../util/dist/lib/isPdf.js";
|
|
10
12
|
import "../../../ui/dist/index.js";
|
|
11
|
-
import { ReceiptMatchLabels as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import {
|
|
13
|
+
import { ReceiptMatchLabels as g } from "./index2.js";
|
|
14
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
15
|
+
import { DollarSign as y, Search as b, X as x, ZoomIn as S, ZoomOut as C } from "lucide-react";
|
|
14
16
|
// ../../libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index5.js
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
|
|
17
|
+
var w = 5;
|
|
18
|
+
function T({ embedded: o = !1, receiptPreviewUrl: m, receiptFileName: h, transactions: T, selectedTransactionIds: O, allowMultipleTransactions: k = !1, searchValue: A, onSearchChange: j, onTransactionSelect: M, onConfirmMatch: N, isConfirming: P = !1, zoom: F = 1, onZoomIn: I, onZoomOut: L, canZoomIn: R = !0, canZoomOut: z = !0, showZoomControls: B = !!(m && (I || L)), onCancel: V, onClose: H, isLoading: U = !1, isError: W = !1, onRetry: G }) {
|
|
19
|
+
let K = T.map((e) => {
|
|
20
|
+
let n = O.includes(e.id);
|
|
21
|
+
return /* @__PURE__ */ v("label", {
|
|
22
|
+
className: `ttw:flex ttw:items-center ttw:gap-3 ttw:px-6 ttw:py-3 ttw:cursor-pointer ttw:transition-colors ${n ? "ttw:bg-primary/5" : "ttw:hover:bg-muted/50"}`,
|
|
23
|
+
children: [
|
|
24
|
+
k ? /* @__PURE__ */ _(t, {
|
|
25
|
+
checked: n,
|
|
26
|
+
onCheckedChange: () => M(e.id),
|
|
27
|
+
"aria-label": g.SelectTransaction(e.merchantName)
|
|
28
|
+
}) : /* @__PURE__ */ _(a, {
|
|
29
|
+
value: e.id,
|
|
30
|
+
"aria-label": g.SelectTransaction(e.merchantName),
|
|
31
|
+
onClick: () => {
|
|
32
|
+
n && M(e.id);
|
|
33
|
+
}
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ _("span", {
|
|
36
|
+
className: "ttw:min-w-0 ttw:flex-1 ttw:text-sm ttw:font-medium ttw:truncate",
|
|
37
|
+
children: e.merchantName
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ _("span", {
|
|
40
|
+
className: "ttw:w-24 ttw:text-sm ttw:text-muted-foreground ttw:shrink-0",
|
|
41
|
+
children: e.date
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ _("span", {
|
|
44
|
+
className: "ttw:min-w-20 ttw:whitespace-nowrap ttw:text-sm ttw:font-medium ttw:tabular-nums ttw:text-right ttw:shrink-0",
|
|
45
|
+
children: e.formattedAmount
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
}, e.id);
|
|
49
|
+
});
|
|
50
|
+
return /* @__PURE__ */ v("div", {
|
|
18
51
|
className: "ttw:flex ttw:w-full ttw:h-full",
|
|
19
|
-
children: [/* @__PURE__ */
|
|
52
|
+
children: [!o && /* @__PURE__ */ v("div", {
|
|
20
53
|
className: "ttw:w-110 ttw:ml-auto ttw:bg-muted ttw:relative ttw:flex ttw:items-center ttw:justify-center ttw:overflow-hidden",
|
|
21
|
-
children: [
|
|
22
|
-
url:
|
|
23
|
-
fileName:
|
|
24
|
-
zoom:
|
|
25
|
-
}),
|
|
26
|
-
className: "ttw:absolute ttw:bottom-4 ttw:left-4 ttw:z-10 ttw:flex ttw:items-center ttw:border ttw:rounded-
|
|
54
|
+
children: [m && /* @__PURE__ */ _(D, {
|
|
55
|
+
url: m,
|
|
56
|
+
fileName: h,
|
|
57
|
+
zoom: F
|
|
58
|
+
}), B && /* @__PURE__ */ _(l, { children: /* @__PURE__ */ v("div", {
|
|
59
|
+
className: "ttw:absolute ttw:bottom-4 ttw:left-4 ttw:z-10 ttw:flex ttw:items-center ttw:border ttw:rounded-lg ttw:border-border ttw:bg-card",
|
|
27
60
|
children: [
|
|
28
|
-
/* @__PURE__ */ s(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
61
|
+
/* @__PURE__ */ v(s, { children: [/* @__PURE__ */ _(u, {
|
|
62
|
+
asChild: !0,
|
|
63
|
+
children: /* @__PURE__ */ _(e, {
|
|
64
|
+
variant: "ghost",
|
|
65
|
+
size: "icon-sm",
|
|
66
|
+
onClick: L,
|
|
67
|
+
disabled: !L || !z,
|
|
68
|
+
"aria-label": g.ZoomOut,
|
|
69
|
+
className: "ttw:rounded-none ttw:rounded-tl-lg ttw:rounded-bl-lg",
|
|
70
|
+
children: /* @__PURE__ */ _(C, { className: "ttw:size-4" })
|
|
71
|
+
})
|
|
72
|
+
}), /* @__PURE__ */ _(c, { children: g.ZoomOut })] }),
|
|
73
|
+
/* @__PURE__ */ _("div", { className: "ttw:w-px ttw:self-stretch ttw:bg-border" }),
|
|
74
|
+
/* @__PURE__ */ v(s, { children: [/* @__PURE__ */ _(u, {
|
|
75
|
+
asChild: !0,
|
|
76
|
+
children: /* @__PURE__ */ _(e, {
|
|
77
|
+
variant: "ghost",
|
|
78
|
+
size: "icon-sm",
|
|
79
|
+
onClick: I,
|
|
80
|
+
disabled: !I || !R,
|
|
81
|
+
"aria-label": g.ZoomIn,
|
|
82
|
+
className: "ttw:rounded-none ttw:rounded-tr-lg ttw:rounded-br-lg",
|
|
83
|
+
children: /* @__PURE__ */ _(S, { className: "ttw:size-4" })
|
|
84
|
+
})
|
|
85
|
+
}), /* @__PURE__ */ _(c, { children: g.ZoomIn })] })
|
|
47
86
|
]
|
|
48
|
-
})]
|
|
49
|
-
}), /* @__PURE__ */
|
|
50
|
-
className: "ttw:flex ttw:flex-col ttw:w-110 ttw:h-full ttw:border-l ttw:border-border ttw:bg-card",
|
|
87
|
+
}) })]
|
|
88
|
+
}), /* @__PURE__ */ v("div", {
|
|
89
|
+
className: o ? "ttw:flex ttw:flex-col ttw:w-full ttw:h-full" : "ttw:flex ttw:flex-col ttw:w-110 ttw:h-full ttw:border-l ttw:border-border ttw:bg-card",
|
|
51
90
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
91
|
+
o && /* @__PURE__ */ _(n, {
|
|
92
|
+
variant: "section",
|
|
93
|
+
level: 2,
|
|
94
|
+
children: g.TransactionsTitle
|
|
95
|
+
}),
|
|
96
|
+
!o && /* @__PURE__ */ v("div", {
|
|
53
97
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:px-6 ttw:pt-5 ttw:pb-2",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
98
|
+
children: [/* @__PURE__ */ _(n, {
|
|
99
|
+
variant: "section",
|
|
100
|
+
level: 2,
|
|
101
|
+
children: g.TransactionsTitle
|
|
102
|
+
}), /* @__PURE__ */ _(l, { children: /* @__PURE__ */ v(s, { children: [/* @__PURE__ */ _(u, {
|
|
103
|
+
asChild: !0,
|
|
104
|
+
children: /* @__PURE__ */ _(e, {
|
|
105
|
+
variant: "ghost",
|
|
106
|
+
size: "sm",
|
|
107
|
+
className: "ttw:p-1 ttw:h-auto",
|
|
108
|
+
onClick: H,
|
|
109
|
+
"aria-label": g.Close,
|
|
110
|
+
children: /* @__PURE__ */ _(x, { size: 18 })
|
|
111
|
+
})
|
|
112
|
+
}), /* @__PURE__ */ _(c, { children: g.Close })] }) })]
|
|
65
113
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ _("div", {
|
|
67
115
|
className: "ttw:px-6 ttw:py-3",
|
|
68
|
-
children: /* @__PURE__ */
|
|
116
|
+
children: /* @__PURE__ */ v("div", {
|
|
69
117
|
className: "ttw:relative",
|
|
70
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ _(b, {
|
|
71
119
|
size: 16,
|
|
72
120
|
className: "ttw:absolute ttw:left-3 ttw:top-1/2 ttw:-translate-y-1/2 ttw:text-muted-foreground"
|
|
73
|
-
}), /* @__PURE__ */
|
|
74
|
-
value:
|
|
75
|
-
onChange: (e) =>
|
|
76
|
-
placeholder:
|
|
121
|
+
}), /* @__PURE__ */ _(r, {
|
|
122
|
+
value: A,
|
|
123
|
+
onChange: (e) => j(e.target.value),
|
|
124
|
+
placeholder: g.SearchPlaceholder,
|
|
77
125
|
className: "ttw:pl-9!"
|
|
78
126
|
})]
|
|
79
127
|
})
|
|
80
128
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ v("div", {
|
|
82
130
|
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:px-6 ttw:py-2 ttw:bg-muted/40",
|
|
83
131
|
children: [
|
|
84
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ _("span", {
|
|
85
133
|
className: "ttw:w-4 ttw:shrink-0",
|
|
86
134
|
"aria-hidden": !0
|
|
87
135
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ _("span", {
|
|
89
137
|
className: "ttw:flex-1 ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
|
|
90
|
-
children:
|
|
138
|
+
children: g.Merchant
|
|
91
139
|
}),
|
|
92
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ _("span", {
|
|
93
141
|
className: "ttw:w-24 ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
|
|
94
|
-
children:
|
|
142
|
+
children: g.Date
|
|
95
143
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
className: "ttw:w-20 ttw:text-xs ttw:font-medium ttw:text-muted-foreground ttw:text-right",
|
|
98
|
-
children:
|
|
144
|
+
/* @__PURE__ */ _("span", {
|
|
145
|
+
className: "ttw:min-w-20 ttw:text-xs ttw:font-medium ttw:text-muted-foreground ttw:text-right",
|
|
146
|
+
children: g.Amount
|
|
99
147
|
})
|
|
100
148
|
]
|
|
101
149
|
}),
|
|
102
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ v("div", {
|
|
103
151
|
className: "ttw:flex-1 ttw:overflow-y-auto",
|
|
104
152
|
children: [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
children: o.LoadingTransactions
|
|
110
|
-
}), Array.from({ length: g }).map((e, t) => /* @__PURE__ */ s(v, {}, t))]
|
|
153
|
+
U && /* @__PURE__ */ _(p, {
|
|
154
|
+
isLoading: !0,
|
|
155
|
+
loadingLabel: g.LoadingTransactions,
|
|
156
|
+
children: Array.from({ length: w }).map((e, t) => /* @__PURE__ */ _(E, {}, t))
|
|
111
157
|
}),
|
|
112
|
-
!
|
|
113
|
-
title:
|
|
114
|
-
description:
|
|
115
|
-
retryLabel:
|
|
116
|
-
onRetry:
|
|
158
|
+
!U && W && /* @__PURE__ */ _(f, {
|
|
159
|
+
title: g.TransactionsErrorTitle,
|
|
160
|
+
description: g.TransactionsErrorSubtitle,
|
|
161
|
+
retryLabel: g.Retry,
|
|
162
|
+
onRetry: G
|
|
117
163
|
}),
|
|
118
|
-
!
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
size: 24,
|
|
124
|
-
className: "ttw:text-muted-foreground"
|
|
125
|
-
})
|
|
126
|
-
}), /* @__PURE__ */ c("div", {
|
|
127
|
-
className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-1 ttw:text-center ttw:px-6",
|
|
128
|
-
children: [/* @__PURE__ */ s("span", {
|
|
129
|
-
className: "ttw:text-sm ttw:font-medium",
|
|
130
|
-
children: o.NoTransactionsTitle
|
|
131
|
-
}), /* @__PURE__ */ s("span", {
|
|
132
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
133
|
-
children: o.NoTransactionsSubtitle
|
|
134
|
-
})]
|
|
135
|
-
})]
|
|
164
|
+
!U && !W && T.length === 0 && /* @__PURE__ */ _(d, {
|
|
165
|
+
icon: /* @__PURE__ */ _(y, {}),
|
|
166
|
+
title: g.NoTransactionsTitle,
|
|
167
|
+
description: g.NoTransactionsSubtitle,
|
|
168
|
+
className: "ttw:h-full"
|
|
136
169
|
}),
|
|
137
|
-
!
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
onClick: () => {
|
|
150
|
-
!b && t && C(e.id);
|
|
151
|
-
},
|
|
152
|
-
"aria-label": `Select transaction from ${e.merchantName}`,
|
|
153
|
-
className: "ttw:h-4 ttw:w-4 ttw:border ttw:border-input ttw:accent-primary ttw:cursor-pointer ttw:shrink-0"
|
|
154
|
-
}),
|
|
155
|
-
/* @__PURE__ */ s("span", {
|
|
156
|
-
className: "ttw:flex-1 ttw:text-sm ttw:font-medium ttw:truncate",
|
|
157
|
-
children: e.merchantName
|
|
158
|
-
}),
|
|
159
|
-
/* @__PURE__ */ s("span", {
|
|
160
|
-
className: "ttw:w-24 ttw:text-sm ttw:text-muted-foreground ttw:shrink-0",
|
|
161
|
-
children: e.date
|
|
162
|
-
}),
|
|
163
|
-
/* @__PURE__ */ s("span", {
|
|
164
|
-
className: "ttw:w-20 ttw:text-sm ttw:font-medium ttw:tabular-nums ttw:text-right ttw:shrink-0",
|
|
165
|
-
children: e.formattedAmount
|
|
166
|
-
})
|
|
167
|
-
]
|
|
168
|
-
}, e.id);
|
|
169
|
-
})
|
|
170
|
+
!U && !W && T.length > 0 && (k ? /* @__PURE__ */ _("div", {
|
|
171
|
+
role: "group",
|
|
172
|
+
"aria-label": g.TransactionsTitle,
|
|
173
|
+
children: K
|
|
174
|
+
}) : /* @__PURE__ */ _(i, {
|
|
175
|
+
"aria-label": g.TransactionsTitle,
|
|
176
|
+
value: O[0] ?? "",
|
|
177
|
+
onValueChange: M,
|
|
178
|
+
className: "ttw:grid-cols-[minmax(0,1fr)] ttw:gap-0",
|
|
179
|
+
children: K
|
|
180
|
+
}))
|
|
170
181
|
]
|
|
171
182
|
}),
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
className: "ttw:flex ttw:
|
|
174
|
-
children: [/* @__PURE__ */
|
|
175
|
-
variant: "
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
children: [T ? /* @__PURE__ */ s(d, {
|
|
184
|
-
size: 16,
|
|
185
|
-
className: "ttw:animate-spin"
|
|
186
|
-
}) : /* @__PURE__ */ s(l, { size: 16 }), o.ConfirmMatch]
|
|
183
|
+
!o && /* @__PURE__ */ v("div", {
|
|
184
|
+
className: "ttw:flex ttw:flex-col-reverse ttw:gap-2 ttw:px-6 ttw:py-4 ttw:border-t ttw:border-border ttw:sm:flex-row ttw:sm:justify-end",
|
|
185
|
+
children: [/* @__PURE__ */ _(e, {
|
|
186
|
+
variant: "ghost",
|
|
187
|
+
onClick: V,
|
|
188
|
+
children: g.Back
|
|
189
|
+
}), /* @__PURE__ */ _(e, {
|
|
190
|
+
disabled: O.length === 0 || P,
|
|
191
|
+
onClick: N,
|
|
192
|
+
loading: P,
|
|
193
|
+
children: g.ConfirmMatch
|
|
187
194
|
})]
|
|
188
195
|
})
|
|
189
196
|
]
|
|
190
197
|
})]
|
|
191
198
|
});
|
|
192
199
|
}
|
|
193
|
-
function
|
|
194
|
-
return /* @__PURE__ */
|
|
200
|
+
function E() {
|
|
201
|
+
return /* @__PURE__ */ v("div", {
|
|
195
202
|
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:px-6 ttw:py-3",
|
|
196
203
|
children: [
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ _(o, { className: "ttw:h-4 ttw:w-4" }),
|
|
205
|
+
/* @__PURE__ */ _(o, { className: "ttw:h-4 ttw:flex-1" }),
|
|
206
|
+
/* @__PURE__ */ _(o, { className: "ttw:h-4 ttw:w-20" }),
|
|
207
|
+
/* @__PURE__ */ _(o, { className: "ttw:h-4 ttw:w-16" })
|
|
201
208
|
]
|
|
202
209
|
});
|
|
203
210
|
}
|
|
204
|
-
function
|
|
205
|
-
return
|
|
211
|
+
function D({ url: e, fileName: t, zoom: n }) {
|
|
212
|
+
return h(e, t) ? /* @__PURE__ */ _("div", {
|
|
206
213
|
className: "ttw:absolute ttw:inset-0 ttw:overflow-auto",
|
|
207
|
-
children: /* @__PURE__ */
|
|
214
|
+
children: /* @__PURE__ */ _(m, {
|
|
208
215
|
url: e,
|
|
209
216
|
scale: n,
|
|
210
|
-
title:
|
|
217
|
+
title: g.ReceiptPdfPreviewTitle
|
|
211
218
|
})
|
|
212
|
-
}) : /* @__PURE__ */
|
|
219
|
+
}) : /* @__PURE__ */ _("img", {
|
|
213
220
|
src: e,
|
|
214
|
-
alt:
|
|
221
|
+
alt: g.ReceiptImageAlt,
|
|
215
222
|
className: "ttw:max-h-full ttw:max-w-full ttw:object-contain ttw:transition-transform",
|
|
216
223
|
style: { transform: `scale(${n})` }
|
|
217
224
|
});
|
|
218
225
|
}
|
|
219
|
-
export {
|
|
226
|
+
export { D as ReceiptPreview, T as TransactionsMatchStep };
|