@tesouro/embedded-components-react 0.4.31 → 0.5.1
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 +17 -47
- package/dist/index.d.ts +2 -27
- package/dist/index.js +21 -27
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/lib/ExpenseManagementWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +14 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +8 -96
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +91 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +96 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +3 -137
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +49 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +129 -180
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +32 -74
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +186 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +70 -226
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +22 -219
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +221 -109
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +220 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +119 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +13 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +43 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +29 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +186 -222
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +37 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +229 -420
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +21 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +429 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +4 -224
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +38 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +222 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +44 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +6 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +12 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +109 -124
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +3 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +124 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +8 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +8 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +45 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +20 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +28 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +76 -243
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +48 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +239 -196
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +115 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +207 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +3 -114
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +106 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index10.js +74 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index11.js +11 -247
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index12.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js +34 -57
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index14.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index8.js +253 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js +2 -48
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/index.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/ReceiptMatchLauncher.js +28 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/labels.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
- package/dist/lib/ExpenseApprovalPoliciesWidget.d.ts +0 -639
- package/dist/lib/ExpenseApprovalPoliciesWidget.js +0 -3
- package/dist/lib/ExpenseRequirementsWidget.d.ts +0 -639
- package/dist/lib/ExpenseRequirementsWidget.js +0 -3
- package/dist/lib/ReceiptMatchWidget.d.ts +0 -640
- package/dist/lib/ReceiptMatchWidget.js +0 -3
package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index8.js
CHANGED
|
@@ -1,4 +1,255 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import "../../../shared/ui/dist/index.js";
|
|
7
|
+
import { useWidgetConfig as t, useWidgetLoading as n } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
8
|
+
import "../../../shared/feature/dist/index.js";
|
|
9
|
+
import { ReceiptMatchLabels as r } from "../../ui/dist/lib/ReceiptMatchWidget/lib/labels.js";
|
|
10
|
+
import "../../ui/dist/index.js";
|
|
11
|
+
import { useGetReceiptsQuery as i } from "../../data-access/dist/index2.js";
|
|
12
|
+
import { useGetTransactionsQuery as a } from "../../data-access/dist/index3.js";
|
|
13
|
+
import { usePatchReceiptMutation as ee } from "../../data-access/dist/index5.js";
|
|
14
|
+
import { useDeleteReceiptMutation as te } from "../../data-access/dist/index6.js";
|
|
15
|
+
import "../../data-access/dist/index.js";
|
|
16
|
+
import { useCallback as o, useEffect as ne, useMemo as s, useState as c } from "react";
|
|
1
17
|
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index8.js
|
|
2
|
-
|
|
18
|
+
function l(e, t) {
|
|
19
|
+
if (typeof e == "object" && e) {
|
|
20
|
+
let t = e.error;
|
|
21
|
+
if (typeof t == "object" && t) {
|
|
22
|
+
let e = t.message;
|
|
23
|
+
if (typeof e == "string") return e;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return e instanceof Error && e.message ? e.message : t;
|
|
27
|
+
}
|
|
28
|
+
function u(e, t) {
|
|
29
|
+
let n = e / 100;
|
|
30
|
+
try {
|
|
31
|
+
return new Intl.NumberFormat("en-US", {
|
|
32
|
+
style: "currency",
|
|
33
|
+
currency: t
|
|
34
|
+
}).format(n);
|
|
35
|
+
} catch {
|
|
36
|
+
return `${t} ${n.toFixed(2)}`;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function d(e) {
|
|
40
|
+
if (!e) return "";
|
|
41
|
+
let t = new Date(e);
|
|
42
|
+
return Number.isNaN(t.getTime()) ? "" : t.toLocaleDateString("en-US", {
|
|
43
|
+
month: "short",
|
|
44
|
+
day: "numeric",
|
|
45
|
+
year: "numeric"
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function re(e) {
|
|
49
|
+
if (!e) return "";
|
|
50
|
+
let t = new Date(e);
|
|
51
|
+
return Number.isNaN(t.getTime()) ? "" : t.toLocaleDateString("en-US", {
|
|
52
|
+
month: "long",
|
|
53
|
+
day: "numeric",
|
|
54
|
+
year: "numeric"
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function f(e) {
|
|
58
|
+
if (!e) return "";
|
|
59
|
+
let t = new Date(e);
|
|
60
|
+
return Number.isNaN(t.getTime()) ? "" : t.toLocaleTimeString("en-US", {
|
|
61
|
+
hour: "numeric",
|
|
62
|
+
minute: "2-digit",
|
|
63
|
+
second: "2-digit",
|
|
64
|
+
hour12: !0
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function ie(e) {
|
|
68
|
+
let t = e.ocr_status === "processing";
|
|
69
|
+
return {
|
|
70
|
+
id: e.id,
|
|
71
|
+
primaryText: t ? r.ReceiptScanningTitle : e.merchant_name?.trim() || r.ReceiptScanningTitle,
|
|
72
|
+
secondaryText: t ? r.ReceiptScanningSubtitle : d(e.issued_at),
|
|
73
|
+
thumbnailUrl: e.file_url ?? void 0
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function p(e) {
|
|
77
|
+
return {
|
|
78
|
+
id: e.id,
|
|
79
|
+
merchantName: e.merchant_name,
|
|
80
|
+
date: d(e.started_at),
|
|
81
|
+
formattedAmount: u(e.amount, e.currency)
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
var m = .5, h = 3, g = .25, _ = 5e3, v = !1;
|
|
85
|
+
function y({ preSelectedIds: d, onClose: y, targetTransactionId: b, onSingleTransactionUpdate: x }) {
|
|
86
|
+
let { initResponse: S } = t(), C = n(), w = S?.userId ?? void 0, T = !!w && !C, [E, D] = c(1), [O, k] = c(0), [A, j] = c([]), [M, N] = c(() => d), [P, F] = c(""), [I, L] = c([]), R = s(() => I.map((e) => e.id), [I]), [z, B] = c(1), V = i({
|
|
87
|
+
has_transaction: !1,
|
|
88
|
+
created_by_entity_user_id: w,
|
|
89
|
+
enabled: T
|
|
90
|
+
}), H = a({
|
|
91
|
+
merchant_name__icontains: P || void 0,
|
|
92
|
+
has_receipt: !1,
|
|
93
|
+
enabled: E === 2
|
|
94
|
+
}), U = ee(), W = te(), G = V.data?.data ?? [], K = s(() => w ? G.filter((e) => e.created_by_entity_user_id == null || e.created_by_entity_user_id === w) : [], [G, w]);
|
|
95
|
+
ne(() => {
|
|
96
|
+
if (!K.some((e) => e.ocr_status === "processing")) return;
|
|
97
|
+
let e = window.setInterval(() => {
|
|
98
|
+
V.isFetching || V.refetch();
|
|
99
|
+
}, _);
|
|
100
|
+
return () => window.clearInterval(e);
|
|
101
|
+
}, [
|
|
102
|
+
V.isFetching,
|
|
103
|
+
V.refetch,
|
|
104
|
+
K
|
|
105
|
+
]);
|
|
106
|
+
let q = s(() => K.map(ie), [K]), J = s(() => new Set(A.flatMap((e) => e.transactionIds)), [A]), ae = s(() => (H.data?.data ?? []).filter((e) => !J.has(e.id)).map(p), [H.data, J]), Y = H.data?.data ?? [], X = M[O], Z = s(() => K.find((e) => e.id === X), [K, X]), oe = Z?.file_url ?? void 0, se = Z?.file_name ?? void 0, ce = s(() => {
|
|
107
|
+
if (b) return "Attach";
|
|
108
|
+
if (!(M.length <= 1)) return `Review (${O + 1}/${M.length})`;
|
|
109
|
+
}, [
|
|
110
|
+
b,
|
|
111
|
+
M.length,
|
|
112
|
+
O
|
|
113
|
+
]), le = s(() => A.filter((e) => e.receiptId === X).flatMap((e) => e.transactionDetails), [A, X]), ue = O >= M.length - 1 ? r.Done : r.ReviewNextReceipt(O + 2, M.length), Q = o(() => {
|
|
114
|
+
F(""), L([]), B(1);
|
|
115
|
+
}, []), de = o((e) => {
|
|
116
|
+
if (b) {
|
|
117
|
+
N((t) => t.includes(e) ? [] : [e]);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
N((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
121
|
+
}, [b]), fe = o(() => {
|
|
122
|
+
N(q.map((e) => e.id));
|
|
123
|
+
}, [q]), pe = o(() => {
|
|
124
|
+
N([]);
|
|
125
|
+
}, []), me = o((e) => {
|
|
126
|
+
let t = K.find((t) => t.id === e);
|
|
127
|
+
t?.file_url && window.open(t.file_url, "_blank", "noopener,noreferrer");
|
|
128
|
+
}, [K]), $ = o(async (t) => {
|
|
129
|
+
try {
|
|
130
|
+
await W.mutateAsync({ path: { receipt_id: t } });
|
|
131
|
+
} catch (t) {
|
|
132
|
+
e.error(l(t, "Failed to delete receipt"));
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
N((e) => e.filter((e) => e !== t));
|
|
136
|
+
}, [W]), he = o(async () => {
|
|
137
|
+
if (M.length !== 0) {
|
|
138
|
+
if (b) {
|
|
139
|
+
try {
|
|
140
|
+
await U.mutateAsync({
|
|
141
|
+
path: { receipt_id: M[0] },
|
|
142
|
+
body: { transaction_id: b }
|
|
143
|
+
}), x?.(), y();
|
|
144
|
+
} catch (t) {
|
|
145
|
+
e.error(l(t, "Failed to attach receipt"));
|
|
146
|
+
}
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
k(0), j([]), Q(), D(2);
|
|
150
|
+
}
|
|
151
|
+
}, [
|
|
152
|
+
M,
|
|
153
|
+
b,
|
|
154
|
+
U,
|
|
155
|
+
x,
|
|
156
|
+
y,
|
|
157
|
+
Q
|
|
158
|
+
]), ge = o((e) => {
|
|
159
|
+
F(e);
|
|
160
|
+
}, []), _e = o((e) => {
|
|
161
|
+
L((t) => {
|
|
162
|
+
let n = t.find((t) => t.id === e), r = Y.find((t) => t.id === e);
|
|
163
|
+
return n ? [] : r ? [r] : [];
|
|
164
|
+
});
|
|
165
|
+
}, [Y]), ve = o(async () => {
|
|
166
|
+
if (I.length === 0 || !X) return;
|
|
167
|
+
let t = I, n = (e) => ({
|
|
168
|
+
merchant: e.merchant_name,
|
|
169
|
+
location: e.merchant_location,
|
|
170
|
+
date: re(e.started_at),
|
|
171
|
+
time: f(e.started_at),
|
|
172
|
+
formattedAmount: u(e.amount, e.currency)
|
|
173
|
+
}), r = [], i = [];
|
|
174
|
+
for (let a of t) try {
|
|
175
|
+
await U.mutateAsync({
|
|
176
|
+
path: { receipt_id: X },
|
|
177
|
+
body: { transaction_id: a.id }
|
|
178
|
+
}), r.push(a.id), i.push(n(a));
|
|
179
|
+
} catch (t) {
|
|
180
|
+
r.length > 0 && j((e) => [...e, {
|
|
181
|
+
receiptId: X,
|
|
182
|
+
transactionIds: r,
|
|
183
|
+
transactionDetails: i
|
|
184
|
+
}]), L((e) => e.filter((e) => !r.includes(e.id))), e.error(l(t, "Failed to match receipt"));
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
j((e) => [...e, {
|
|
188
|
+
receiptId: X,
|
|
189
|
+
transactionIds: r,
|
|
190
|
+
transactionDetails: i
|
|
191
|
+
}]), D(3);
|
|
192
|
+
}, [
|
|
193
|
+
I,
|
|
194
|
+
X,
|
|
195
|
+
U
|
|
196
|
+
]), ye = o(() => {
|
|
197
|
+
B((e) => Math.min(e + g, h));
|
|
198
|
+
}, []), be = o(() => {
|
|
199
|
+
B((e) => Math.max(e - g, m));
|
|
200
|
+
}, []), xe = o(() => {
|
|
201
|
+
let e = O + 1;
|
|
202
|
+
if (e < M.length) {
|
|
203
|
+
k(e), Q(), D(2);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
y();
|
|
207
|
+
}, [
|
|
208
|
+
O,
|
|
209
|
+
M.length,
|
|
210
|
+
Q,
|
|
211
|
+
y
|
|
212
|
+
]), Se = o(() => {
|
|
213
|
+
if (A.length > 0) {
|
|
214
|
+
let e = new Set(A.map((e) => e.receiptId));
|
|
215
|
+
N((t) => t.filter((t) => !e.has(t)));
|
|
216
|
+
}
|
|
217
|
+
Q(), k(0), j([]), D(1);
|
|
218
|
+
}, [Q, A]);
|
|
219
|
+
return {
|
|
220
|
+
step: E,
|
|
221
|
+
receipts: q,
|
|
222
|
+
selectedReceiptIds: M,
|
|
223
|
+
onSelectAll: fe,
|
|
224
|
+
onReset: pe,
|
|
225
|
+
onReceiptToggle: de,
|
|
226
|
+
onViewAttachment: me,
|
|
227
|
+
onDeleteReceipt: $,
|
|
228
|
+
onReview: he,
|
|
229
|
+
isReceiptsLoading: V.isLoading,
|
|
230
|
+
showSelectAllButton: !b,
|
|
231
|
+
receiptPreviewUrl: oe,
|
|
232
|
+
receiptFileName: se,
|
|
233
|
+
transactions: ae,
|
|
234
|
+
isTransactionsLoading: H.isLoading,
|
|
235
|
+
selectedTransactionIds: R,
|
|
236
|
+
allowMultipleTransactions: v,
|
|
237
|
+
searchValue: P,
|
|
238
|
+
onSearchChange: ge,
|
|
239
|
+
onTransactionSelect: _e,
|
|
240
|
+
onConfirmMatch: ve,
|
|
241
|
+
isConfirming: U.isPending,
|
|
242
|
+
zoom: z,
|
|
243
|
+
onZoomIn: ye,
|
|
244
|
+
onZoomOut: be,
|
|
245
|
+
canZoomIn: z < h,
|
|
246
|
+
canZoomOut: z > m,
|
|
247
|
+
matchedTransactions: le,
|
|
248
|
+
primaryLabel: ue,
|
|
249
|
+
onPrimary: xe,
|
|
250
|
+
onCancel: Se,
|
|
251
|
+
reviewLabel: ce
|
|
252
|
+
};
|
|
253
|
+
}
|
|
3
254
|
//#endregion
|
|
4
|
-
export {
|
|
255
|
+
export { y as useReceiptMatch };
|
package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js
CHANGED
|
@@ -1,50 +1,4 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { useAnalyticsTrack as e } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
6
|
-
import { WidgetProvider as t } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
7
|
-
import "../../../shared/feature/dist/index.js";
|
|
8
|
-
import { ExpenseManagementWidgetUi as n } from "../../ui/dist/lib/ExpenseManagementWidgetUi/ExpenseManagementWidgetUi.js";
|
|
9
|
-
import "../../ui/dist/index.js";
|
|
10
|
-
import { ExpenseApprovalPoliciesWidget as r } from "./index6.js";
|
|
11
|
-
import { UploadReceiptWidget as i } from "./index7.js";
|
|
12
|
-
import { ExpenseManagementWidgetAnalyticsEvent as a, WIDGET_NAME as o } from "./index8.js";
|
|
13
|
-
import { ExpenseRequirementsWidget as s } from "../../../expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js";
|
|
14
|
-
import "../../../expense-requirements-widget/feature/dist/index.js";
|
|
15
|
-
import { useEffect as c } from "react";
|
|
16
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
17
1
|
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js
|
|
18
|
-
|
|
19
|
-
let m = e();
|
|
20
|
-
return c(() => {
|
|
21
|
-
m(a.Mounted);
|
|
22
|
-
}, [m]), /* @__PURE__ */ l(n, {
|
|
23
|
-
labels: t,
|
|
24
|
-
receiptsContent: u ?? (o ? /* @__PURE__ */ l(i, { ...o }) : null),
|
|
25
|
-
matchingContent: d,
|
|
26
|
-
policiesContent: f ?? /* @__PURE__ */ l(r, {}),
|
|
27
|
-
requirementsContent: p ?? /* @__PURE__ */ l(s, {})
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function d({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: s, implementation: c, uiFramework: d, errorFallback: f, onError: p, analytics: m, disclosuresAcceptance: h, providerLabels: g, ..._ }) {
|
|
31
|
-
return /* @__PURE__ */ l(t, {
|
|
32
|
-
widgetName: o,
|
|
33
|
-
baseUrl: e,
|
|
34
|
-
widgetToken: n,
|
|
35
|
-
organizationId: r,
|
|
36
|
-
configClient: i,
|
|
37
|
-
gatewayRouting: a,
|
|
38
|
-
linkComponent: s,
|
|
39
|
-
implementation: c,
|
|
40
|
-
uiFramework: d,
|
|
41
|
-
errorFallback: f,
|
|
42
|
-
onError: p,
|
|
43
|
-
analytics: m,
|
|
44
|
-
disclosuresAcceptance: h,
|
|
45
|
-
providerLabels: g,
|
|
46
|
-
children: /* @__PURE__ */ l(u, { ..._ })
|
|
47
|
-
});
|
|
48
|
-
}
|
|
2
|
+
var e = { Mounted: "receipt_match.mounted" }, t = "receipt_match";
|
|
49
3
|
//#endregion
|
|
50
|
-
export {
|
|
4
|
+
export { e as ReceiptMatchAnalyticsEvent, t as WIDGET_NAME };
|
package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/index.js
CHANGED
|
@@ -17,4 +17,5 @@ import "./lib/ExpenseApprovalPoliciesWidget/lib/EmptyApprovalRules.js";
|
|
|
17
17
|
import "./lib/ExpenseApprovalPoliciesWidget/lib/ApprovalRuleCard.js";
|
|
18
18
|
import "./lib/ExpenseApprovalPoliciesWidget/lib/ApprovalRuleForm.js";
|
|
19
19
|
import { ExpenseApprovalsPage as l } from "./lib/ExpenseApprovalPoliciesWidget/lib/ExpenseApprovalsPage.js";
|
|
20
|
-
|
|
20
|
+
import { ReceiptMatchLauncher as u } from "./lib/ReceiptMatchWidget/lib/ReceiptMatchLauncher.js";
|
|
21
|
+
export { o as AmountConditionType, s as ApprovalOutcomeType, c as ApprovalRuleToastLabels, l as ExpenseApprovalsPage, e as ExpenseManagementWidgetUi, i as ReceiptMatchLabels, u as ReceiptMatchLauncher, a as ReceiptMatchSidebar, n as UploadReceiptButton, r as UploadReceiptModal, t as UploadReceiptToastLabels };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { Button as e } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { RECEIPT_MATCH_LAUNCHER_LABELS_EN as t } from "./labels.js";
|
|
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 };
|
|
@@ -40,6 +40,9 @@ var e = {
|
|
|
40
40
|
ZoomIn: "Zoom in",
|
|
41
41
|
ZoomOut: "Zoom out",
|
|
42
42
|
ReceiptImageAlt: "Receipt"
|
|
43
|
+
}, t = {
|
|
44
|
+
Description: "Match uploaded receipts to transactions that need one.",
|
|
45
|
+
StartButton: "Start matching"
|
|
43
46
|
};
|
|
44
47
|
//#endregion
|
|
45
|
-
export { e as ReceiptMatchLabels };
|
|
48
|
+
export { t as RECEIPT_MATCH_LAUNCHER_LABELS_EN, e as ReceiptMatchLabels };
|
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.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.5.1", n = "87dbec4b3bd89285db60e51182b615c464821d83", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { Scope as e } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
6
6
|
import "../../../shared/data-access/dist/index.js";
|
|
7
|
-
import { BillPayWidget as t } from "../../../bill-pay-widget/feature/dist/
|
|
7
|
+
import { BillPayWidget as t } from "../../../bill-pay-widget/feature/dist/index88.js";
|
|
8
8
|
import "../../../bill-pay-widget/feature/dist/index.js";
|
|
9
9
|
import { jsx as n } from "react/jsx-runtime";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js
|