@tesouro/embedded-components-react 0.11.120 → 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,107 +2,45 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { ResultScreen as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
6
|
import { ReceiptMatchLabels as t } from "./index2.js";
|
|
7
|
-
import {
|
|
8
|
-
import { Check as
|
|
7
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
8
|
+
import { Check as r } from "lucide-react";
|
|
9
9
|
// ../../libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index6.js
|
|
10
|
-
function
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
] })
|
|
45
|
-
})]
|
|
46
|
-
}),
|
|
47
|
-
u.length > 0 && /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("div", { className: "ttw:border-t ttw:border-border" }), /* @__PURE__ */ r("div", {
|
|
48
|
-
className: "ttw:w-full ttw:flex ttw:flex-col ttw:gap-4",
|
|
49
|
-
children: u.map((e, n) => /* @__PURE__ */ i("div", {
|
|
50
|
-
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
51
|
-
children: [/* @__PURE__ */ r("span", {
|
|
52
|
-
className: "ttw:text-sm ttw:font-semibold",
|
|
53
|
-
children: d ? t.TransactionDetailsHeading : t.TransactionNDetailsHeading(n + 1)
|
|
54
|
-
}), /* @__PURE__ */ i("div", {
|
|
55
|
-
className: "ttw:rounded-xl ttw:bg-muted/50 ttw:p-2",
|
|
56
|
-
children: [
|
|
57
|
-
/* @__PURE__ */ r(s, {
|
|
58
|
-
label: t.Merchant,
|
|
59
|
-
value: e.merchant
|
|
60
|
-
}),
|
|
61
|
-
e.orderId && /* @__PURE__ */ r(s, {
|
|
62
|
-
label: t.OrderId,
|
|
63
|
-
value: e.orderId
|
|
64
|
-
}),
|
|
65
|
-
/* @__PURE__ */ r(s, {
|
|
66
|
-
label: t.Location,
|
|
67
|
-
value: e.location
|
|
68
|
-
}),
|
|
69
|
-
/* @__PURE__ */ r(s, {
|
|
70
|
-
label: t.Date,
|
|
71
|
-
value: e.date
|
|
72
|
-
}),
|
|
73
|
-
/* @__PURE__ */ r(s, {
|
|
74
|
-
label: t.Time,
|
|
75
|
-
value: e.time
|
|
76
|
-
}),
|
|
77
|
-
e.formattedAmount && /* @__PURE__ */ r(s, {
|
|
78
|
-
label: t.Amount,
|
|
79
|
-
value: e.formattedAmount
|
|
80
|
-
})
|
|
81
|
-
]
|
|
82
|
-
})]
|
|
83
|
-
}, `${e.merchant}-${e.date}-${e.time}-${n}`))
|
|
84
|
-
})] })
|
|
85
|
-
]
|
|
86
|
-
}), /* @__PURE__ */ r("div", {
|
|
87
|
-
className: "ttw:px-6 ttw:py-4 ttw:border-t ttw:border-border",
|
|
88
|
-
children: /* @__PURE__ */ r(e, {
|
|
89
|
-
className: "ttw:w-full",
|
|
90
|
-
onClick: l,
|
|
91
|
-
children: c
|
|
92
|
-
})
|
|
93
|
-
})]
|
|
10
|
+
function i({ matchedTransactions: i = [], primaryLabel: a, onPrimary: o }) {
|
|
11
|
+
let s = i[0], c = s ? i.length === 1 ? `${t.MatchConfirmedSubtitle} ${s.merchant}.` : `${t.MatchConfirmedMultipleSubtitle} ${t.MatchConfirmedMultipleTransactionsSuffix(i.length)}` : void 0, l = i.flatMap((e) => [
|
|
12
|
+
{
|
|
13
|
+
label: t.Merchant,
|
|
14
|
+
value: e.merchant
|
|
15
|
+
},
|
|
16
|
+
...e.orderId ? [{
|
|
17
|
+
label: t.OrderId,
|
|
18
|
+
value: e.orderId
|
|
19
|
+
}] : [],
|
|
20
|
+
{
|
|
21
|
+
label: t.Location,
|
|
22
|
+
value: e.location
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
label: t.Date,
|
|
26
|
+
value: e.date
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: t.Time,
|
|
30
|
+
value: e.time
|
|
31
|
+
},
|
|
32
|
+
...e.formattedAmount ? [{
|
|
33
|
+
label: t.Amount,
|
|
34
|
+
value: e.formattedAmount
|
|
35
|
+
}] : []
|
|
36
|
+
]);
|
|
37
|
+
return /* @__PURE__ */ n(e, {
|
|
38
|
+
icon: /* @__PURE__ */ n(r, {}),
|
|
39
|
+
title: t.MatchConfirmedTitle,
|
|
40
|
+
description: c,
|
|
41
|
+
details: l,
|
|
42
|
+
onDone: o,
|
|
43
|
+
labels: { done: a }
|
|
94
44
|
});
|
|
95
45
|
}
|
|
96
|
-
|
|
97
|
-
return /* @__PURE__ */ i("div", {
|
|
98
|
-
className: "ttw:flex ttw:justify-between ttw:items-start ttw:gap-6 ttw:px-4 ttw:py-2.5",
|
|
99
|
-
children: [/* @__PURE__ */ r("span", {
|
|
100
|
-
className: "ttw:text-sm ttw:text-muted-foreground ttw:shrink-0",
|
|
101
|
-
children: e
|
|
102
|
-
}), /* @__PURE__ */ r("span", {
|
|
103
|
-
className: "ttw:text-sm ttw:font-medium ttw:text-right",
|
|
104
|
-
children: t
|
|
105
|
-
})]
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
export { o as MatchConfirmationStep };
|
|
46
|
+
export { i as MatchConfirmationStep };
|
|
@@ -7,71 +7,94 @@ import { ReceiptMatchLabels as i } from "./index2.js";
|
|
|
7
7
|
import { ReceiptInboxStep as a } from "./index4.js";
|
|
8
8
|
import { TransactionsMatchStep as o } from "./index5.js";
|
|
9
9
|
import { MatchConfirmationStep as s } from "./index6.js";
|
|
10
|
-
import {
|
|
10
|
+
import { useState as c } from "react";
|
|
11
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
11
12
|
// ../../libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index7.js
|
|
12
|
-
function
|
|
13
|
-
let
|
|
14
|
-
receipts:
|
|
15
|
-
selectedReceiptIds:
|
|
16
|
-
onSelectAll:
|
|
17
|
-
onReset:
|
|
18
|
-
onReceiptToggle:
|
|
19
|
-
onViewAttachment:
|
|
20
|
-
onDeleteReceipt:
|
|
21
|
-
onReview:
|
|
22
|
-
onClose:
|
|
23
|
-
reviewLabel:
|
|
24
|
-
isLoading:
|
|
25
|
-
isError:
|
|
26
|
-
onRetry:
|
|
27
|
-
showSelectAllButton:
|
|
28
|
-
},
|
|
29
|
-
receiptPreviewUrl:
|
|
30
|
-
receiptFileName:
|
|
31
|
-
transactions:
|
|
32
|
-
selectedTransactionIds:
|
|
33
|
-
allowMultipleTransactions:
|
|
34
|
-
searchValue:
|
|
35
|
-
onSearchChange:
|
|
36
|
-
onTransactionSelect:
|
|
37
|
-
onConfirmMatch:
|
|
38
|
-
isConfirming:
|
|
39
|
-
zoom:
|
|
40
|
-
onZoomIn:
|
|
41
|
-
onZoomOut:
|
|
42
|
-
canZoomIn:
|
|
43
|
-
canZoomOut:
|
|
44
|
-
showZoomControls:
|
|
45
|
-
onCancel:
|
|
46
|
-
onClose:
|
|
47
|
-
isLoading:
|
|
48
|
-
isError:
|
|
49
|
-
onRetry:
|
|
50
|
-
}, Z = {
|
|
51
|
-
matchedTransactions: U,
|
|
52
|
-
primaryLabel: W,
|
|
53
|
-
onPrimary: G
|
|
13
|
+
function d({ open: d, onClose: f, step: p, receipts: m, selectedReceiptIds: h, onSelectAll: g, onReset: _, onReceiptToggle: v, onViewAttachment: y, onDeleteReceipt: b, onFilesDropped: x, onReview: S, isReceiptsLoading: C, isReceiptsError: w, onRetryReceipts: T, receiptPreviewUrl: E, receiptFileName: D, transactions: O, isTransactionsLoading: k, isTransactionsError: ee, onRetryTransactions: A, selectedTransactionIds: j, allowMultipleTransactions: M, searchValue: N, onSearchChange: P, onTransactionSelect: F, onConfirmMatch: I, isConfirming: L, zoom: R, onZoomIn: z, onZoomOut: B, canZoomIn: V, canZoomOut: H, showZoomControls: U, matchedTransactions: W, primaryLabel: G, onPrimary: K, onCancel: q, reviewLabel: J, showSelectAllButton: Y }) {
|
|
14
|
+
let [X, Z] = c(!1), Q = {
|
|
15
|
+
receipts: m,
|
|
16
|
+
selectedReceiptIds: h,
|
|
17
|
+
onSelectAll: g,
|
|
18
|
+
onReset: _,
|
|
19
|
+
onReceiptToggle: v,
|
|
20
|
+
onViewAttachment: y,
|
|
21
|
+
onDeleteReceipt: b,
|
|
22
|
+
onReview: S,
|
|
23
|
+
onClose: f,
|
|
24
|
+
reviewLabel: J,
|
|
25
|
+
isLoading: C,
|
|
26
|
+
isError: w,
|
|
27
|
+
onRetry: T,
|
|
28
|
+
showSelectAllButton: Y
|
|
29
|
+
}, $ = {
|
|
30
|
+
receiptPreviewUrl: E,
|
|
31
|
+
receiptFileName: D,
|
|
32
|
+
transactions: O,
|
|
33
|
+
selectedTransactionIds: j,
|
|
34
|
+
allowMultipleTransactions: M,
|
|
35
|
+
searchValue: N,
|
|
36
|
+
onSearchChange: P,
|
|
37
|
+
onTransactionSelect: F,
|
|
38
|
+
onConfirmMatch: I,
|
|
39
|
+
isConfirming: L,
|
|
40
|
+
zoom: R,
|
|
41
|
+
onZoomIn: z,
|
|
42
|
+
onZoomOut: B,
|
|
43
|
+
canZoomIn: V,
|
|
44
|
+
canZoomOut: H,
|
|
45
|
+
showZoomControls: U,
|
|
46
|
+
onCancel: q,
|
|
47
|
+
onClose: f,
|
|
48
|
+
isLoading: k,
|
|
49
|
+
isError: ee,
|
|
50
|
+
onRetry: A
|
|
54
51
|
};
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
open:
|
|
57
|
-
onOpenChange:
|
|
58
|
-
children: /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ l(e, {
|
|
53
|
+
open: d,
|
|
54
|
+
onOpenChange: f,
|
|
55
|
+
children: /* @__PURE__ */ u(t, {
|
|
59
56
|
showCloseButton: !1,
|
|
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 ${
|
|
57
|
+
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 ${p === 2 ? "ttw:w-[880px]" : "ttw:w-[440px]"}`,
|
|
61
58
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ l(r, {
|
|
63
60
|
className: "ttw:sr-only",
|
|
64
61
|
children: i.DialogTitle
|
|
65
62
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ l(n, {
|
|
67
64
|
className: "ttw:sr-only",
|
|
68
65
|
children: i.DialogDescription
|
|
69
66
|
}),
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
p === 1 && /* @__PURE__ */ u("div", {
|
|
68
|
+
className: "ttw:relative ttw:h-full ttw:w-full",
|
|
69
|
+
onDragOver: (e) => {
|
|
70
|
+
x && Array.from(e.dataTransfer.types).includes("Files") && (e.preventDefault(), Z(!0));
|
|
71
|
+
},
|
|
72
|
+
onDragLeave: (e) => {
|
|
73
|
+
e.currentTarget.contains(e.relatedTarget) || Z(!1);
|
|
74
|
+
},
|
|
75
|
+
onDrop: (e) => {
|
|
76
|
+
x && Array.from(e.dataTransfer.types).includes("Files") && (e.preventDefault(), Z(!1), x(Array.from(e.dataTransfer.files)));
|
|
77
|
+
},
|
|
78
|
+
children: [X && /* @__PURE__ */ l("div", {
|
|
79
|
+
role: "status",
|
|
80
|
+
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",
|
|
81
|
+
children: /* @__PURE__ */ u("div", {
|
|
82
|
+
className: "ttw:rounded-lg ttw:bg-muted ttw:p-4 ttw:text-center",
|
|
83
|
+
children: [/* @__PURE__ */ l("p", { children: i.DropReceipts }), /* @__PURE__ */ l("p", {
|
|
84
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
85
|
+
children: i.DropReceiptRules
|
|
86
|
+
})]
|
|
87
|
+
})
|
|
88
|
+
}), /* @__PURE__ */ l(a, { ...Q })]
|
|
89
|
+
}),
|
|
90
|
+
p === 2 && /* @__PURE__ */ l(o, { ...$ }),
|
|
91
|
+
p === 3 && /* @__PURE__ */ l(s, {
|
|
92
|
+
matchedTransactions: W,
|
|
93
|
+
primaryLabel: G,
|
|
94
|
+
onPrimary: K
|
|
95
|
+
})
|
|
73
96
|
]
|
|
74
97
|
})
|
|
75
98
|
});
|
|
76
99
|
}
|
|
77
|
-
export { i as ReceiptMatchLabels,
|
|
100
|
+
export { i as ReceiptMatchLabels, d as ReceiptMatchSidebar };
|