@tesouro/embedded-components-react 0.9.46 → 0.9.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index5.js +88 -86
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/index.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -5,139 +5,141 @@
|
|
|
5
5
|
import { Button as e, Input as t, Skeleton as n } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
6
|
import { ErrorState as r } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
7
7
|
import "../../../../shared/ui/dist/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
8
|
+
import { PdfFileViewer as i } from "../../../ui/dist/lib/FileViewer/PdfFileViewer.js";
|
|
9
|
+
import { isPdf as a } from "../../../util/dist/lib/isPdf.js";
|
|
10
|
+
import "../../../ui/dist/index.js";
|
|
11
|
+
import { ReceiptMatchLabels as o } from "./index2.js";
|
|
12
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
13
|
+
import { Check as l, DollarSign as u, Loader2 as d, Search as f, X as p, ZoomIn as m, ZoomOut as h } from "lucide-react";
|
|
12
14
|
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index5.js
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
var g = 5;
|
|
16
|
+
function _({ receiptPreviewUrl: n, receiptFileName: i, transactions: a, selectedTransactionIds: _, 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 }) {
|
|
17
|
+
return /* @__PURE__ */ c("div", {
|
|
16
18
|
className: "ttw:flex ttw:w-full ttw:h-full",
|
|
17
|
-
children: [/* @__PURE__ */
|
|
19
|
+
children: [/* @__PURE__ */ c("div", {
|
|
18
20
|
className: "ttw:w-110 ttw:ml-auto ttw:bg-muted ttw:relative ttw:flex ttw:items-center ttw:justify-center ttw:overflow-hidden",
|
|
19
|
-
children: [n && /* @__PURE__ */
|
|
21
|
+
children: [n && /* @__PURE__ */ s(y, {
|
|
20
22
|
url: n,
|
|
21
23
|
fileName: i,
|
|
22
24
|
zoom: E
|
|
23
|
-
}), j && /* @__PURE__ */
|
|
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",
|
|
25
|
+
}), j && /* @__PURE__ */ c("div", {
|
|
26
|
+
className: "ttw:absolute ttw:bottom-4 ttw:left-4 ttw:z-10 ttw:flex ttw:items-center ttw:border ttw:rounded-[14px] ttw:border-border ttw:bg-card",
|
|
25
27
|
children: [
|
|
26
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ s(e, {
|
|
27
29
|
variant: "ghost",
|
|
28
30
|
size: "icon-sm",
|
|
29
31
|
onClick: O,
|
|
30
32
|
disabled: !O || !A,
|
|
31
|
-
"aria-label":
|
|
33
|
+
"aria-label": o.ZoomOut,
|
|
32
34
|
className: "ttw:rounded-none ttw:rounded-tl-[14px] ttw:rounded-bl-[14px]",
|
|
33
|
-
children: /* @__PURE__ */
|
|
35
|
+
children: /* @__PURE__ */ s(h, { className: "ttw:size-4" })
|
|
34
36
|
}),
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ s("div", { className: "ttw:w-px ttw:self-stretch ttw:bg-border" }),
|
|
38
|
+
/* @__PURE__ */ s(e, {
|
|
37
39
|
variant: "ghost",
|
|
38
40
|
size: "icon-sm",
|
|
39
41
|
onClick: D,
|
|
40
42
|
disabled: !D || !k,
|
|
41
|
-
"aria-label":
|
|
43
|
+
"aria-label": o.ZoomIn,
|
|
42
44
|
className: "ttw:rounded-none ttw:rounded-tr-[14px] ttw:rounded-br-[14px]",
|
|
43
|
-
children: /* @__PURE__ */
|
|
45
|
+
children: /* @__PURE__ */ s(m, { className: "ttw:size-4" })
|
|
44
46
|
})
|
|
45
47
|
]
|
|
46
48
|
})]
|
|
47
|
-
}), /* @__PURE__ */
|
|
49
|
+
}), /* @__PURE__ */ c("div", {
|
|
48
50
|
className: "ttw:flex ttw:flex-col ttw:w-110 ttw:h-full ttw:border-l ttw:border-border ttw:bg-card",
|
|
49
51
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ c("div", {
|
|
51
53
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:px-6 ttw:pt-5 ttw:pb-2",
|
|
52
|
-
children: [/* @__PURE__ */
|
|
54
|
+
children: [/* @__PURE__ */ s("h2", {
|
|
53
55
|
className: "ttw:text-lg ttw:font-semibold",
|
|
54
|
-
children:
|
|
55
|
-
}), /* @__PURE__ */
|
|
56
|
+
children: o.TransactionsTitle
|
|
57
|
+
}), /* @__PURE__ */ s(e, {
|
|
56
58
|
variant: "ghost",
|
|
57
59
|
size: "sm",
|
|
58
60
|
className: "ttw:p-1 ttw:h-auto",
|
|
59
61
|
onClick: N,
|
|
60
|
-
"aria-label":
|
|
61
|
-
children: /* @__PURE__ */
|
|
62
|
+
"aria-label": o.Close,
|
|
63
|
+
children: /* @__PURE__ */ s(p, { size: 18 })
|
|
62
64
|
})]
|
|
63
65
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ s("div", {
|
|
65
67
|
className: "ttw:px-6 ttw:py-3",
|
|
66
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ c("div", {
|
|
67
69
|
className: "ttw:relative",
|
|
68
|
-
children: [/* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */ s(f, {
|
|
69
71
|
size: 16,
|
|
70
72
|
className: "ttw:absolute ttw:left-3 ttw:top-1/2 ttw:-translate-y-1/2 ttw:text-muted-foreground"
|
|
71
|
-
}), /* @__PURE__ */
|
|
73
|
+
}), /* @__PURE__ */ s(t, {
|
|
72
74
|
value: x,
|
|
73
75
|
onChange: (e) => S(e.target.value),
|
|
74
|
-
placeholder:
|
|
76
|
+
placeholder: o.SearchPlaceholder,
|
|
75
77
|
className: "ttw:pl-9!"
|
|
76
78
|
})]
|
|
77
79
|
})
|
|
78
80
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ c("div", {
|
|
80
82
|
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:px-6 ttw:py-2 ttw:bg-muted/40",
|
|
81
83
|
children: [
|
|
82
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ s("span", {
|
|
83
85
|
className: "ttw:w-4 ttw:shrink-0",
|
|
84
86
|
"aria-hidden": !0
|
|
85
87
|
}),
|
|
86
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ s("span", {
|
|
87
89
|
className: "ttw:flex-1 ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
|
|
88
|
-
children:
|
|
90
|
+
children: o.Merchant
|
|
89
91
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ s("span", {
|
|
91
93
|
className: "ttw:w-24 ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
|
|
92
|
-
children:
|
|
94
|
+
children: o.Date
|
|
93
95
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ s("span", {
|
|
95
97
|
className: "ttw:w-20 ttw:text-xs ttw:font-medium ttw:text-muted-foreground ttw:text-right",
|
|
96
|
-
children:
|
|
98
|
+
children: o.Amount
|
|
97
99
|
})
|
|
98
100
|
]
|
|
99
101
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ c("div", {
|
|
101
103
|
className: "ttw:flex-1 ttw:overflow-y-auto",
|
|
102
104
|
children: [
|
|
103
|
-
P && /* @__PURE__ */
|
|
105
|
+
P && /* @__PURE__ */ c("div", {
|
|
104
106
|
role: "status",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
107
|
+
children: [/* @__PURE__ */ s("span", {
|
|
106
108
|
className: "ttw:sr-only",
|
|
107
|
-
children:
|
|
108
|
-
}), Array.from({ length:
|
|
109
|
+
children: o.LoadingTransactions
|
|
110
|
+
}), Array.from({ length: g }).map((e, t) => /* @__PURE__ */ s(v, {}, t))]
|
|
109
111
|
}),
|
|
110
|
-
!P && F && /* @__PURE__ */
|
|
111
|
-
title:
|
|
112
|
-
description:
|
|
113
|
-
retryLabel:
|
|
112
|
+
!P && F && /* @__PURE__ */ s(r, {
|
|
113
|
+
title: o.TransactionsErrorTitle,
|
|
114
|
+
description: o.TransactionsErrorSubtitle,
|
|
115
|
+
retryLabel: o.Retry,
|
|
114
116
|
onRetry: I
|
|
115
117
|
}),
|
|
116
|
-
!P && !F &&
|
|
118
|
+
!P && !F && a.length === 0 && /* @__PURE__ */ c("div", {
|
|
117
119
|
className: "ttw:flex ttw:flex-col ttw:items-center ttw:justify-center ttw:gap-3 ttw:h-full ttw:py-12",
|
|
118
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ s("div", {
|
|
119
121
|
className: "ttw:w-14 ttw:h-14 ttw:rounded-full ttw:bg-muted ttw:flex ttw:items-center ttw:justify-center",
|
|
120
|
-
children: /* @__PURE__ */
|
|
122
|
+
children: /* @__PURE__ */ s(u, {
|
|
121
123
|
size: 24,
|
|
122
124
|
className: "ttw:text-muted-foreground"
|
|
123
125
|
})
|
|
124
|
-
}), /* @__PURE__ */
|
|
126
|
+
}), /* @__PURE__ */ c("div", {
|
|
125
127
|
className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-1 ttw:text-center ttw:px-6",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
128
|
+
children: [/* @__PURE__ */ s("span", {
|
|
127
129
|
className: "ttw:text-sm ttw:font-medium",
|
|
128
|
-
children:
|
|
129
|
-
}), /* @__PURE__ */
|
|
130
|
+
children: o.NoTransactionsTitle
|
|
131
|
+
}), /* @__PURE__ */ s("span", {
|
|
130
132
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
131
|
-
children:
|
|
133
|
+
children: o.NoTransactionsSubtitle
|
|
132
134
|
})]
|
|
133
135
|
})]
|
|
134
136
|
}),
|
|
135
|
-
!P && !F &&
|
|
136
|
-
let t =
|
|
137
|
-
return /* @__PURE__ */
|
|
137
|
+
!P && !F && a.map((e) => {
|
|
138
|
+
let t = _.includes(e.id);
|
|
139
|
+
return /* @__PURE__ */ c("label", {
|
|
138
140
|
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"}`,
|
|
139
141
|
children: [
|
|
140
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ s("input", {
|
|
141
143
|
type: b ? "checkbox" : "radio",
|
|
142
144
|
name: b ? void 0 : "receipt-match-transaction",
|
|
143
145
|
checked: t,
|
|
@@ -150,15 +152,15 @@ function g({ receiptPreviewUrl: n, receiptFileName: i, transactions: g, selected
|
|
|
150
152
|
"aria-label": `Select transaction from ${e.merchantName}`,
|
|
151
153
|
className: "ttw:h-4 ttw:w-4 ttw:border ttw:border-input ttw:accent-primary ttw:cursor-pointer ttw:shrink-0"
|
|
152
154
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ s("span", {
|
|
154
156
|
className: "ttw:flex-1 ttw:text-sm ttw:font-medium ttw:truncate",
|
|
155
157
|
children: e.merchantName
|
|
156
158
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ s("span", {
|
|
158
160
|
className: "ttw:w-24 ttw:text-sm ttw:text-muted-foreground ttw:shrink-0",
|
|
159
161
|
children: e.date
|
|
160
162
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ s("span", {
|
|
162
164
|
className: "ttw:w-20 ttw:text-sm ttw:font-medium ttw:tabular-nums ttw:text-right ttw:shrink-0",
|
|
163
165
|
children: e.formattedAmount
|
|
164
166
|
})
|
|
@@ -167,52 +169,52 @@ function g({ receiptPreviewUrl: n, receiptFileName: i, transactions: g, selected
|
|
|
167
169
|
})
|
|
168
170
|
]
|
|
169
171
|
}),
|
|
170
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ c("div", {
|
|
171
173
|
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:px-6 ttw:py-4 ttw:border-t ttw:border-border",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ s(e, {
|
|
173
175
|
variant: "outline",
|
|
174
176
|
className: "ttw:flex-1",
|
|
175
177
|
onClick: M,
|
|
176
|
-
children:
|
|
177
|
-
}), /* @__PURE__ */
|
|
178
|
+
children: o.Back
|
|
179
|
+
}), /* @__PURE__ */ c(e, {
|
|
178
180
|
className: "ttw:flex-1",
|
|
179
|
-
disabled:
|
|
181
|
+
disabled: _.length === 0 || T,
|
|
180
182
|
onClick: w,
|
|
181
|
-
children: [T ? /* @__PURE__ */
|
|
183
|
+
children: [T ? /* @__PURE__ */ s(d, {
|
|
182
184
|
size: 16,
|
|
183
185
|
className: "ttw:animate-spin"
|
|
184
|
-
}) : /* @__PURE__ */
|
|
186
|
+
}) : /* @__PURE__ */ s(l, { size: 16 }), o.ConfirmMatch]
|
|
185
187
|
})]
|
|
186
188
|
})
|
|
187
189
|
]
|
|
188
190
|
})]
|
|
189
191
|
});
|
|
190
192
|
}
|
|
191
|
-
function
|
|
192
|
-
return /* @__PURE__ */
|
|
193
|
+
function v() {
|
|
194
|
+
return /* @__PURE__ */ c("div", {
|
|
193
195
|
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:px-6 ttw:py-3",
|
|
194
196
|
children: [
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ s(n, { className: "ttw:h-4 ttw:w-4" }),
|
|
198
|
+
/* @__PURE__ */ s(n, { className: "ttw:h-4 ttw:flex-1" }),
|
|
199
|
+
/* @__PURE__ */ s(n, { className: "ttw:h-4 ttw:w-20" }),
|
|
200
|
+
/* @__PURE__ */ s(n, { className: "ttw:h-4 ttw:w-16" })
|
|
199
201
|
]
|
|
200
202
|
});
|
|
201
203
|
}
|
|
202
|
-
function
|
|
203
|
-
return
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}) : /* @__PURE__ */
|
|
204
|
+
function y({ url: e, fileName: t, zoom: n }) {
|
|
205
|
+
return a(e, t) ? /* @__PURE__ */ s("div", {
|
|
206
|
+
className: "ttw:absolute ttw:inset-0 ttw:overflow-auto",
|
|
207
|
+
children: /* @__PURE__ */ s(i, {
|
|
208
|
+
url: e,
|
|
209
|
+
scale: n,
|
|
210
|
+
title: o.ReceiptPdfPreviewTitle
|
|
211
|
+
})
|
|
212
|
+
}) : /* @__PURE__ */ s("img", {
|
|
211
213
|
src: e,
|
|
212
|
-
alt:
|
|
214
|
+
alt: o.ReceiptImageAlt,
|
|
213
215
|
className: "ttw:max-h-full ttw:max-w-full ttw:object-contain ttw:transition-transform",
|
|
214
216
|
style: { transform: `scale(${n})` }
|
|
215
217
|
});
|
|
216
218
|
}
|
|
217
219
|
//#endregion
|
|
218
|
-
export {
|
|
220
|
+
export { _ as TransactionsMatchStep };
|
package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/index.js
CHANGED
|
@@ -10,14 +10,15 @@ import { ExpensesTransactionsFilterBar as n } from "./lib/ExpensesTransactionsFi
|
|
|
10
10
|
import "./lib/ExpensesScreen/labels.js";
|
|
11
11
|
import { ExpensesScreen as r } from "./lib/ExpensesScreen/ExpensesScreen.js";
|
|
12
12
|
import "./lib/FileViewer/labels.js";
|
|
13
|
+
import { PdfFileViewer as i } from "./lib/FileViewer/PdfFileViewer.js";
|
|
13
14
|
import "./lib/FileViewer/FileViewer.js";
|
|
14
15
|
import "./lib/AccordionItemCard/labels.js";
|
|
15
16
|
import "./lib/AccordionItemCard/AccordionItemCard.js";
|
|
16
|
-
import { TRANSACTION_DETAILS_ACTIONS_LABELS_EN as
|
|
17
|
+
import { TRANSACTION_DETAILS_ACTIONS_LABELS_EN as a } from "./lib/TransactionDetailsActions/labels.js";
|
|
17
18
|
import "./lib/TransactionDetailsActions/BulkProgress.js";
|
|
18
|
-
import { TransactionDetailsActions as
|
|
19
|
+
import { TransactionDetailsActions as o } from "./lib/TransactionDetailsActions/TransactionDetailsActions.js";
|
|
19
20
|
import "./lib/TransactionDetails/labels.js";
|
|
20
|
-
import { TransactionDetails as
|
|
21
|
+
import { TransactionDetails as s } from "./lib/TransactionDetails/TransactionDetails.js";
|
|
21
22
|
import "./lib/TransactionDetails/DeleteReceiptDialog/labels.js";
|
|
22
|
-
import { DeleteReceiptDialog as
|
|
23
|
-
export { e as ActionItemsList,
|
|
23
|
+
import { DeleteReceiptDialog as c } from "./lib/TransactionDetails/DeleteReceiptDialog/DeleteReceiptDialog.js";
|
|
24
|
+
export { e as ActionItemsList, c as DeleteReceiptDialog, r as ExpensesScreen, n as ExpensesTransactionsFilterBar, t as ExpensesTransactionsTable, i as PdfFileViewer, a as TRANSACTION_DETAILS_ACTIONS_LABELS_EN, s as TransactionDetails, o as TransactionDetailsActions };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.9.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.9.49", n = "de576e7905e5941d756600766ba515ddaaf91c41", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|