@tesouro/embedded-components-react 0.6.5 → 0.7.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 +0 -1
- package/dist/index.css +3 -0
- package/dist/index.d.ts +13 -12
- package/dist/lib/ExpenseManagementWidget.d.ts +1 -0
- package/dist/lib/SettingsWidget.d.ts +2 -12
- package/dist/lib/WidgetSuite.d.ts +2 -11
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/lib/useTrackReceiptMatching.js +126 -73
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/ExpenseManagementWidget.js +185 -182
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/TransactionDetails/TransactionDetailsFeature.js +187 -180
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js +86 -84
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/TransactionDetails.js +110 -100
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +28 -23
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -2,84 +2,93 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { Alert as e, AlertDescription as t,
|
|
5
|
+
import { Alert as e, AlertDescription as t, Badge as n, Button as r, Dialog as ee, DialogClose as te, DialogContent as ne, DialogDescription as re, DialogFooter as i, DialogHeader as a, DialogTitle as o, Separator as s, Skeleton as c, Typography as l } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
6
|
import { ExpenseStatusBadge as u } from "../ExpenseStatusBadge/ExpenseStatusBadge.js";
|
|
7
7
|
import { FileViewer as d } from "../FileViewer/FileViewer.js";
|
|
8
8
|
import { AccordionItemCard as f } from "../AccordionItemCard/AccordionItemCard.js";
|
|
9
|
-
import { TRANSACTION_DETAILS_LABELS_EN as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { CloudUpload as
|
|
9
|
+
import { TRANSACTION_DETAILS_LABELS_EN as ie } from "./labels.js";
|
|
10
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
11
|
+
import { CloudUpload as ae, DollarSign as oe, Loader as g, Receipt as se, X as ce } from "lucide-react";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/TransactionDetails.js
|
|
13
13
|
var _ = 3, v = () => void 0;
|
|
14
|
-
function y({ open: y, onClose: b, transactionId: x, transactionDate: S, statusLabel: C, statusTone: w, isRejected: T, isPendingReview: E, amount: D, merchant: O, receiptUrl: k, isLoading: A, isError: j, isClosingDisabled: M, cardLabel: N, cardName: P, cardholder: F, showCardholder: I, showPhysicalPill: L, isDescriptionRequired: R, isReceiptRequired: z, isReceiptAutoMatched: B, isReceiptActionDisabled: V, receiptButtonLabel: H, receiptButtonIcon: U, receiptButtonVariant: W, showNoReceiptWarning: G, onDeleteReceiptClick: K, onUploadClick: q, onOpenReceiptInbox:
|
|
14
|
+
function y({ open: y, onClose: b, transactionId: x, transactionDate: S, statusLabel: C, statusTone: w, isRejected: T, isPendingReview: E, amount: D, merchant: O, receiptUrl: k, isLoading: A, isError: j, isClosingDisabled: M, cardLabel: N, cardName: P, cardholder: F, showCardholder: I, showPhysicalPill: L, isDescriptionRequired: R, isReceiptRequired: z, isReceiptAutoMatched: B, isReceiptActionDisabled: V, receiptButtonLabel: H, receiptButtonIcon: U, receiptButtonVariant: W, showNoReceiptWarning: G, onDeleteReceiptClick: K, onUploadClick: q, onOpenReceiptInbox: le, onSubmitWithoutReceipt: ue, onFileDrop: J, isUploading: Y, descriptionValue: X, initialDescriptionValue: de, onDescriptionChange: fe, onSaveDescription: pe, onCancelDescription: me, isSavingDescription: he, isMemoEditable: ge, memoBadgeLabel: _e, isReadingReceipt: ve, showApprovalCard: ye, hasAppliedPolicy: be, greaterThanValue: xe, lessThanValue: Se, ruleLabel: Ce, rejectionReason: we, approverName: Te, isAutoApproved: Ee, isManuallyApproved: De, showAccountingCard: Oe, glCategory: ke = "", initialGlCategory: Ae = "", glCategoryOptions: je = [], onGlCategoryChange: Me, department: Ne = "", initialDepartment: Pe = "", departmentOptions: Fe = [], onDepartmentChange: Ie, location: Le = "", initialLocation: Re = "", locationOptions: ze = [], onLocationChange: Be, onSaveAccounting: Ve, onCancelAccounting: He, isSavingAccounting: Ue, isGlCategoryDisabled: Z, isAccountingDisabled: We, glCategoryHighlight: Ge, departmentHighlight: Ke, locationHighlight: qe, showAuditHistoryCard: Je, auditHistoryRows: Ye, isLoadingAuditHistory: Xe, isAuditHistoryError: Ze, children: Qe, labels: $e, cardLabels: Q, fileViewerLabels: et, historyLabels: tt }) {
|
|
15
15
|
let $ = {
|
|
16
|
-
...
|
|
17
|
-
|
|
16
|
+
...ie,
|
|
17
|
+
...$e
|
|
18
18
|
};
|
|
19
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ m(ee, {
|
|
20
20
|
open: y,
|
|
21
21
|
onOpenChange: (e) => {
|
|
22
22
|
!e && !M && b();
|
|
23
23
|
},
|
|
24
|
-
children: /* @__PURE__ */
|
|
24
|
+
children: /* @__PURE__ */ h(ne, {
|
|
25
25
|
fullScreen: !0,
|
|
26
26
|
showCloseButton: !1,
|
|
27
27
|
className: "ttw:flex ttw:p-0",
|
|
28
|
-
children: [/* @__PURE__ */
|
|
28
|
+
children: [/* @__PURE__ */ h("div", {
|
|
29
29
|
className: "ttw:flex ttw:flex-1/2 ttw:flex-col ttw:overflow-hidden ttw:border-r ttw:border-border",
|
|
30
30
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ h(a, {
|
|
32
32
|
className: "ttw:h-20 ttw:flex-row ttw:items-center ttw:gap-3 ttw:px-8 ttw:py-6",
|
|
33
33
|
children: [
|
|
34
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ m(o, {
|
|
35
35
|
className: "ttw:sr-only",
|
|
36
36
|
children: $.screenReaderTitle
|
|
37
37
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ m(re, {
|
|
39
39
|
className: "ttw:sr-only",
|
|
40
40
|
children: $.screenReaderDescription
|
|
41
41
|
}),
|
|
42
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ m("div", {
|
|
43
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__ */
|
|
44
|
+
children: /* @__PURE__ */ m("div", {
|
|
45
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__ */
|
|
46
|
+
children: /* @__PURE__ */ m(oe, {
|
|
47
47
|
className: "ttw:size-5",
|
|
48
48
|
"aria-hidden": !0
|
|
49
49
|
})
|
|
50
50
|
})
|
|
51
51
|
}),
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ m(l, {
|
|
53
53
|
variant: "h4",
|
|
54
54
|
children: $.contentTitle
|
|
55
55
|
}),
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
!A && /* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ m(s, { orientation: "vertical" }),
|
|
57
|
+
!A && /* @__PURE__ */ m(l, {
|
|
58
58
|
variant: "h5",
|
|
59
59
|
className: "ttw:whitespace-nowrap",
|
|
60
60
|
children: S
|
|
61
61
|
}),
|
|
62
|
-
!A && /* @__PURE__ */
|
|
62
|
+
!A && /* @__PURE__ */ m(u, {
|
|
63
63
|
label: C,
|
|
64
64
|
tone: w
|
|
65
|
+
}),
|
|
66
|
+
!A && ve && /* @__PURE__ */ h(n, {
|
|
67
|
+
role: "status",
|
|
68
|
+
variant: "outline",
|
|
69
|
+
className: "ttw:border-purple-100 ttw:bg-purple-100 ttw:text-purple-700 ttw:hover:bg-purple-100",
|
|
70
|
+
children: [/* @__PURE__ */ m(g, {
|
|
71
|
+
className: "ttw:animate-spin",
|
|
72
|
+
"aria-hidden": !0
|
|
73
|
+
}), $.readingReceipt]
|
|
65
74
|
})
|
|
66
75
|
]
|
|
67
76
|
}),
|
|
68
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ m("div", {
|
|
69
78
|
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",
|
|
70
|
-
children: j ? /* @__PURE__ */
|
|
79
|
+
children: j ? /* @__PURE__ */ m(e, {
|
|
71
80
|
variant: "destructive",
|
|
72
|
-
children: /* @__PURE__ */
|
|
73
|
-
}) : A ? Array.from({ length: _ }, (e, t) => /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ m(t, { children: $.loadFailed })
|
|
82
|
+
}) : A ? Array.from({ length: _ }, (e, t) => /* @__PURE__ */ m(c, {
|
|
74
83
|
width: "100%",
|
|
75
84
|
height: 290
|
|
76
|
-
}, t)) : /* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
85
|
+
}, t)) : /* @__PURE__ */ h(p, { children: [
|
|
86
|
+
/* @__PURE__ */ m(l, {
|
|
78
87
|
variant: "h2",
|
|
79
88
|
className: "ttw:font-bold",
|
|
80
89
|
children: $.amountAtMerchant(D, O)
|
|
81
90
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ m(f, {
|
|
83
92
|
type: "requirements",
|
|
84
93
|
title: $.requirementsCardTitle,
|
|
85
94
|
cardLabel: N,
|
|
@@ -88,7 +97,7 @@ function y({ open: y, onClose: b, transactionId: x, transactionDate: S, statusLa
|
|
|
88
97
|
showCardholder: I,
|
|
89
98
|
showPhysicalPill: L,
|
|
90
99
|
receiptFileUrl: k,
|
|
91
|
-
hasMissingInfo: !!(R && !
|
|
100
|
+
hasMissingInfo: !!(R && !X || z && !k),
|
|
92
101
|
showNoReceiptWarning: !!G,
|
|
93
102
|
isDescriptionRequired: R,
|
|
94
103
|
isReceiptRequired: z,
|
|
@@ -98,162 +107,163 @@ function y({ open: y, onClose: b, transactionId: x, transactionDate: S, statusLa
|
|
|
98
107
|
receiptButtonIcon: U,
|
|
99
108
|
receiptButtonVariant: W,
|
|
100
109
|
onUploadClick: q,
|
|
101
|
-
onOpenReceiptInbox:
|
|
102
|
-
onSubmitWithoutReceipt:
|
|
110
|
+
onOpenReceiptInbox: le,
|
|
111
|
+
onSubmitWithoutReceipt: ue,
|
|
103
112
|
onDeleteReceipt: K,
|
|
104
|
-
descriptionValue:
|
|
105
|
-
initialDescriptionValue:
|
|
106
|
-
onDescriptionChange:
|
|
107
|
-
onSaveDescription:
|
|
108
|
-
onCancelDescription:
|
|
109
|
-
isSavingDescription:
|
|
110
|
-
isMemoEditable:
|
|
111
|
-
memoBadgeLabel:
|
|
113
|
+
descriptionValue: X,
|
|
114
|
+
initialDescriptionValue: de,
|
|
115
|
+
onDescriptionChange: fe,
|
|
116
|
+
onSaveDescription: pe,
|
|
117
|
+
onCancelDescription: me,
|
|
118
|
+
isSavingDescription: he,
|
|
119
|
+
isMemoEditable: ge,
|
|
120
|
+
memoBadgeLabel: _e,
|
|
112
121
|
labels: Q
|
|
113
122
|
}, `requirements-${x}`),
|
|
114
|
-
|
|
123
|
+
ye && /* @__PURE__ */ m(f, {
|
|
115
124
|
type: "approvals",
|
|
116
125
|
title: $.approvalsCardTitle,
|
|
117
|
-
hasAppliedPolicy: !!
|
|
126
|
+
hasAppliedPolicy: !!be,
|
|
118
127
|
isRejected: T,
|
|
119
|
-
isAutoApproved: !!
|
|
120
|
-
isManuallyApproved: !!
|
|
128
|
+
isAutoApproved: !!Ee,
|
|
129
|
+
isManuallyApproved: !!De,
|
|
121
130
|
isPendingReview: E,
|
|
122
|
-
rejectionReason:
|
|
123
|
-
greaterThanValue:
|
|
124
|
-
lessThanValue:
|
|
125
|
-
ruleLabel:
|
|
126
|
-
approverName:
|
|
131
|
+
rejectionReason: we,
|
|
132
|
+
greaterThanValue: xe,
|
|
133
|
+
lessThanValue: Se,
|
|
134
|
+
ruleLabel: Ce,
|
|
135
|
+
approverName: Te,
|
|
127
136
|
labels: Q
|
|
128
137
|
}, `approvals-${x}`),
|
|
129
|
-
|
|
138
|
+
Oe && /* @__PURE__ */ m(f, {
|
|
130
139
|
type: "accounting",
|
|
131
140
|
title: $.accountingCardTitle,
|
|
132
|
-
glCategory:
|
|
133
|
-
initialGlCategory:
|
|
134
|
-
glCategoryOptions:
|
|
135
|
-
onGlCategoryChange:
|
|
136
|
-
department:
|
|
137
|
-
initialDepartment:
|
|
138
|
-
departmentOptions:
|
|
139
|
-
onDepartmentChange:
|
|
140
|
-
location:
|
|
141
|
-
initialLocation:
|
|
142
|
-
locationOptions:
|
|
143
|
-
onLocationChange:
|
|
144
|
-
onSave:
|
|
145
|
-
onCancel:
|
|
146
|
-
isSaving: !!
|
|
147
|
-
isGlCategoryDisabled:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
141
|
+
glCategory: ke,
|
|
142
|
+
initialGlCategory: Ae,
|
|
143
|
+
glCategoryOptions: je,
|
|
144
|
+
onGlCategoryChange: Me ?? v,
|
|
145
|
+
department: Ne,
|
|
146
|
+
initialDepartment: Pe,
|
|
147
|
+
departmentOptions: Fe,
|
|
148
|
+
onDepartmentChange: Ie ?? v,
|
|
149
|
+
location: Le,
|
|
150
|
+
initialLocation: Re,
|
|
151
|
+
locationOptions: ze,
|
|
152
|
+
onLocationChange: Be ?? v,
|
|
153
|
+
onSave: Ve ?? v,
|
|
154
|
+
onCancel: He ?? v,
|
|
155
|
+
isSaving: !!Ue,
|
|
156
|
+
isGlCategoryDisabled: Z,
|
|
157
|
+
isDisabled: We,
|
|
158
|
+
glCategoryHighlight: Ge,
|
|
159
|
+
departmentHighlight: Ke,
|
|
160
|
+
locationHighlight: qe,
|
|
151
161
|
labels: Q
|
|
152
162
|
}, `accounting-${x}`),
|
|
153
|
-
|
|
163
|
+
Je && /* @__PURE__ */ m(f, {
|
|
154
164
|
type: "auditHistory",
|
|
155
165
|
title: $.auditHistoryCardTitle,
|
|
156
|
-
rows:
|
|
157
|
-
isLoading:
|
|
158
|
-
isError:
|
|
159
|
-
historyLabels:
|
|
166
|
+
rows: Ye ?? [],
|
|
167
|
+
isLoading: Xe,
|
|
168
|
+
isError: Ze,
|
|
169
|
+
historyLabels: tt
|
|
160
170
|
}, `auditHistory-${x}`)
|
|
161
171
|
] })
|
|
162
172
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ m(i, {
|
|
164
174
|
className: "ttw:flex-row ttw:items-center ttw:justify-center ttw:border-t ttw:border-border ttw:p-6 ttw:sm:justify-center",
|
|
165
|
-
children: A || j ? null :
|
|
175
|
+
children: A || j ? null : Qe
|
|
166
176
|
})
|
|
167
177
|
]
|
|
168
|
-
}), /* @__PURE__ */
|
|
178
|
+
}), /* @__PURE__ */ h("div", {
|
|
169
179
|
className: "ttw:relative ttw:flex ttw:flex-1/2 ttw:bg-muted ttw:px-6 ttw:py-20",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
180
|
+
children: [/* @__PURE__ */ m(te, {
|
|
171
181
|
asChild: !0,
|
|
172
182
|
className: "ttw:absolute ttw:right-4 ttw:top-4",
|
|
173
|
-
children: /* @__PURE__ */
|
|
183
|
+
children: /* @__PURE__ */ m(r, {
|
|
174
184
|
type: "button",
|
|
175
185
|
variant: "outline",
|
|
176
186
|
size: "icon",
|
|
177
187
|
"aria-label": $.closeDialog,
|
|
178
188
|
disabled: M,
|
|
179
|
-
children: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ m(ce, {
|
|
180
190
|
className: "ttw:size-4",
|
|
181
191
|
"aria-hidden": !0
|
|
182
192
|
})
|
|
183
193
|
})
|
|
184
|
-
}), k ? /* @__PURE__ */
|
|
194
|
+
}), k ? /* @__PURE__ */ m(d, {
|
|
185
195
|
url: k,
|
|
186
196
|
className: "ttw:h-full ttw:min-h-0 ttw:w-full",
|
|
187
197
|
showDeleteOption: !!K,
|
|
188
198
|
onDeleteClick: K,
|
|
189
|
-
labels:
|
|
190
|
-
}) : q ||
|
|
199
|
+
labels: et
|
|
200
|
+
}) : q || J ? /* @__PURE__ */ m("button", {
|
|
191
201
|
type: "button",
|
|
192
|
-
disabled: A ||
|
|
193
|
-
"aria-label":
|
|
202
|
+
disabled: A || Y,
|
|
203
|
+
"aria-label": Y ? $.uploadingReceipt : `${$.dropFilesHere} ${$.clickToBrowse}`,
|
|
194
204
|
onClick: () => {
|
|
195
|
-
A ||
|
|
205
|
+
A || Y || q?.();
|
|
196
206
|
},
|
|
197
207
|
onDragOver: (e) => e.preventDefault(),
|
|
198
208
|
onDrop: (e) => {
|
|
199
|
-
if (A ||
|
|
209
|
+
if (A || Y) return;
|
|
200
210
|
e.preventDefault();
|
|
201
211
|
let t = e.dataTransfer.files[0];
|
|
202
|
-
t &&
|
|
212
|
+
t && J?.(t);
|
|
203
213
|
},
|
|
204
214
|
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",
|
|
205
|
-
children:
|
|
206
|
-
/* @__PURE__ */
|
|
215
|
+
children: Y ? /* @__PURE__ */ h(p, { children: [
|
|
216
|
+
/* @__PURE__ */ m(g, {
|
|
207
217
|
className: "ttw:size-5 ttw:animate-spin ttw:text-primary",
|
|
208
218
|
"aria-hidden": !0
|
|
209
219
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ m(l, {
|
|
211
221
|
variant: "body2",
|
|
212
222
|
component: "span",
|
|
213
223
|
className: "ttw:font-semibold",
|
|
214
224
|
children: $.uploadingReceipt
|
|
215
225
|
}),
|
|
216
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ m(l, {
|
|
217
227
|
variant: "body2",
|
|
218
228
|
component: "span",
|
|
219
229
|
color: "muted",
|
|
220
230
|
children: $.uploadingReceiptBody
|
|
221
231
|
})
|
|
222
|
-
] }) : !A && /* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
232
|
+
] }) : !A && /* @__PURE__ */ h(p, { children: [
|
|
233
|
+
/* @__PURE__ */ m("div", {
|
|
224
234
|
className: "ttw:flex ttw:size-11 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-primary",
|
|
225
|
-
children: /* @__PURE__ */
|
|
235
|
+
children: /* @__PURE__ */ m(ae, {
|
|
226
236
|
className: "ttw:size-5 ttw:text-primary-foreground",
|
|
227
237
|
"aria-hidden": !0
|
|
228
238
|
})
|
|
229
239
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ h(l, {
|
|
231
241
|
variant: "body2",
|
|
232
242
|
component: "span",
|
|
233
243
|
children: [
|
|
234
244
|
$.dropFilesHere,
|
|
235
245
|
" ",
|
|
236
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ m("span", {
|
|
237
247
|
className: "ttw:text-primary ttw:underline",
|
|
238
248
|
children: $.clickToBrowse
|
|
239
249
|
})
|
|
240
250
|
]
|
|
241
251
|
}),
|
|
242
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ m(l, {
|
|
243
253
|
variant: "caption",
|
|
244
254
|
color: "muted",
|
|
245
255
|
children: $.acceptedFileTypes
|
|
246
256
|
})
|
|
247
257
|
] })
|
|
248
|
-
}) : /* @__PURE__ */
|
|
258
|
+
}) : /* @__PURE__ */ m("div", {
|
|
249
259
|
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",
|
|
250
|
-
children: !A && /* @__PURE__ */
|
|
260
|
+
children: !A && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
|
|
251
261
|
className: "ttw:flex ttw:size-11 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-muted",
|
|
252
|
-
children: /* @__PURE__ */
|
|
262
|
+
children: /* @__PURE__ */ m(se, {
|
|
253
263
|
className: "ttw:size-5 ttw:text-muted-foreground",
|
|
254
264
|
"aria-hidden": !0
|
|
255
265
|
})
|
|
256
|
-
}), /* @__PURE__ */
|
|
266
|
+
}), /* @__PURE__ */ m(l, {
|
|
257
267
|
variant: "body2",
|
|
258
268
|
color: "muted",
|
|
259
269
|
children: $.noReceiptAttached
|
|
@@ -15,6 +15,7 @@ var e = {
|
|
|
15
15
|
acceptedFileTypes: "SVG, PNG, JPG or GIF (max. 3MB)",
|
|
16
16
|
uploadingReceipt: "Processing receipts...",
|
|
17
17
|
uploadingReceiptBody: "Give us a few seconds to process your attachment.",
|
|
18
|
+
readingReceipt: "Reading receipt…",
|
|
18
19
|
loadFailed: "This transaction could not be loaded. Please try again."
|
|
19
20
|
};
|
|
20
21
|
//#endregion
|
|
@@ -6,10 +6,9 @@ import { hasAnyScope as e } from "../../../../../shared/data-access/dist/lib/has
|
|
|
6
6
|
import { Scope as t } from "../../../../../shared/data-access/dist/lib/scopes.js";
|
|
7
7
|
import "../../../../../shared/data-access/dist/index.js";
|
|
8
8
|
import { useAnalyticsTrack as n } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
9
|
-
import {
|
|
9
|
+
import { WidgetProvider as r } from "../../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
10
|
+
import { useWidgetConfig as i } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
11
|
import "../../../../../shared/feature/dist/index.js";
|
|
11
|
-
import { MoniteRegionProvider as i } from "../../../../../shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js";
|
|
12
|
-
import "../../../../../shared/monite-wrapper/feature/dist/index.js";
|
|
13
12
|
import { ApprovalPoliciesSettings as a } from "../../../../../shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js";
|
|
14
13
|
import "../../../../../shared/approval-policy/feature/dist/index.js";
|
|
15
14
|
import { DEFAULT_FEATURE_LABELS as o } from "./labels.js";
|
|
@@ -49,15 +48,15 @@ var w = {
|
|
|
49
48
|
[s.Legal]: [],
|
|
50
49
|
[s.Help]: []
|
|
51
50
|
};
|
|
52
|
-
function T({ labels: t, featureLabels:
|
|
51
|
+
function T({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, helpContactUrl: T, helpFaq: E, profileContactUrl: D, selectedSection: O, defaultSelectedSection: k, onSelectedSectionChange: A, additionalSections: j, profileContent: M, teamContent: N, billPayContent: P, helpContent: F, expenseContent: I, accountingContent: L, invoiceContent: R, legalContent: z }) {
|
|
53
52
|
let B = {
|
|
54
53
|
...o,
|
|
55
|
-
...
|
|
54
|
+
...r
|
|
56
55
|
}, V = x(null), H = n();
|
|
57
56
|
b(() => {
|
|
58
57
|
H(l.Mounted);
|
|
59
58
|
}, [H]);
|
|
60
|
-
let { initResponse: U } =
|
|
59
|
+
let { initResponse: U } = i(), W = U?.scopes, G = [
|
|
61
60
|
{
|
|
62
61
|
id: s.Profile,
|
|
63
62
|
label: B.profileSection,
|
|
@@ -129,24 +128,30 @@ function T({ labels: t, featureLabels: i, acceptInviteRedirectUri: u, helpContac
|
|
|
129
128
|
onSectionChange: Z
|
|
130
129
|
});
|
|
131
130
|
}
|
|
132
|
-
function E({
|
|
133
|
-
return /* @__PURE__ */ S(
|
|
131
|
+
function E({ labels: e, featureLabels: t, acceptInviteRedirectUri: n, helpContactUrl: i, helpFaq: a, profileContactUrl: o, selectedSection: s, defaultSelectedSection: c, onSelectedSectionChange: l, additionalSections: d, profileContent: f, teamContent: p, billPayContent: m, helpContent: h, expenseContent: g, accountingContent: _, invoiceContent: v, legalContent: y, ...b }) {
|
|
132
|
+
return /* @__PURE__ */ S(r, {
|
|
133
|
+
...b,
|
|
134
134
|
widgetName: u,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
135
|
+
children: /* @__PURE__ */ S(T, {
|
|
136
|
+
labels: e,
|
|
137
|
+
featureLabels: t,
|
|
138
|
+
acceptInviteRedirectUri: n,
|
|
139
|
+
helpContactUrl: i,
|
|
140
|
+
helpFaq: a,
|
|
141
|
+
profileContactUrl: o,
|
|
142
|
+
selectedSection: s,
|
|
143
|
+
defaultSelectedSection: c,
|
|
144
|
+
onSelectedSectionChange: l,
|
|
145
|
+
additionalSections: d,
|
|
146
|
+
profileContent: f,
|
|
147
|
+
teamContent: p,
|
|
148
|
+
billPayContent: m,
|
|
149
|
+
helpContent: h,
|
|
150
|
+
expenseContent: g,
|
|
151
|
+
accountingContent: _,
|
|
152
|
+
invoiceContent: v,
|
|
153
|
+
legalContent: y
|
|
154
|
+
})
|
|
150
155
|
});
|
|
151
156
|
}
|
|
152
157
|
//#endregion
|
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.7.1", n = "d85210973d9434812a992830457a63870b1bb361", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|