@tesouro/embedded-components-react 0.11.120 → 0.11.123
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 +6 -3
- package/dist/index.css +32 -161
- package/dist/index.d.ts +40 -8
- package/dist/index.js +29 -28
- package/dist/lib/ExpenseManagementWidget.d.ts +11 -2
- package/dist/lib/ReceivablesWidget.d.ts +29 -6
- package/dist/lib/ReceivablesWidget.js +3 -1
- package/dist/lib/WidgetSuite.d.ts +38 -6
- 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/invoicing-widget/feature/dist/index.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableAttachmentsSection.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +342 -295
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/tabs.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +30 -26
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +121 -11
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +100 -11
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +39 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +2 -205
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +11 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +11 -210
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +27 -159
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +203 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +51 -22
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +210 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +154 -111
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +15 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +21 -195
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +116 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +3 -22
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +197 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +2 -78
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +53 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +20 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +8 -41
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +73 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +36 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +17 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +39 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +29 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +18 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +8 -85
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +33 -490
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +15 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +22 -42
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +82 -65
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +475 -426
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +2 -226
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +46 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +69 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +445 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +208 -246
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +22 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +5 -129
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +247 -222
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +125 -242
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +23 -56
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +229 -209
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +3 -47
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +248 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +60 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +194 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +47 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +53 -117
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +9 -99
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +3 -40
- 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
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +0 -27
|
@@ -2,275 +2,192 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import { FullPageModal as e, Skeleton as ee, Typography as t } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { ErrorState as n } from "../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
7
|
+
import { LoadingRegion as r } from "../../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
|
|
8
|
+
import { FileDropZone as i } from "../../../../../shared/ui/dist/lib/FileDropZone/FileDropZone.js";
|
|
9
|
+
import "../../../../../shared/ui/dist/index.js";
|
|
10
|
+
import { ExpenseStatusBadge as a } from "../ExpenseStatusBadge/ExpenseStatusBadge.js";
|
|
11
|
+
import { FileViewer as o } from "../FileViewer/FileViewer.js";
|
|
12
|
+
import { AccordionItemCard as s } from "../AccordionItemCard/AccordionItemCard.js";
|
|
13
|
+
import { TRANSACTION_DETAILS_LABELS_EN as c } from "./labels.js";
|
|
14
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
15
|
+
import { Loader as f, Receipt as p } from "lucide-react";
|
|
12
16
|
// ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/TransactionDetails.js
|
|
13
|
-
var
|
|
14
|
-
function
|
|
17
|
+
var m = 3, h = () => void 0;
|
|
18
|
+
function g({ open: g, onClose: _, transactionId: v, transactionDate: y, statusLabel: b, statusTone: te, isRejected: ne, isPendingReview: x, amount: S, merchant: C, receiptUrl: w, isLoading: T, isError: E, onRetry: D, isClosingDisabled: O, cardLabel: k, cardName: A, cardholder: j, showCardholder: M, showPhysicalPill: N, isDescriptionRequired: P, isReceiptRequired: F, isReceiptAutoMatched: I, isReceiptActionDisabled: L, receiptButtonLabel: R, receiptButtonIcon: z, receiptButtonVariant: B, showNoReceiptWarning: V, onDeleteReceiptClick: H, onUploadClick: U, onOpenReceiptInbox: W, onSubmitWithoutReceipt: G, onFileDrop: K, isUploading: q, descriptionValue: J, initialDescriptionValue: Y, onDescriptionChange: X, onSaveDescription: Z, onCancelDescription: re, isSavingDescription: ie, isMemoEditable: ae, memoBadgeLabel: oe, isReadingReceipt: se, showApprovalCard: ce, hasAppliedPolicy: le, greaterThanValue: ue, lessThanValue: de, ruleLabel: fe, rejectionReason: pe, approverName: me, isAutoApproved: he, isManuallyApproved: ge, showAccountingCard: _e, glCategory: ve = "", initialGlCategory: ye = "", glCategoryOptions: be = [], onGlCategoryChange: xe, department: Se = "", initialDepartment: Ce = "", departmentOptions: we = [], onDepartmentChange: Te, location: Ee = "", initialLocation: De = "", locationOptions: Oe = [], onLocationChange: ke, onSaveAccounting: Ae, onCancelAccounting: je, isSavingAccounting: Me, isGlCategoryDisabled: Ne, isAccountingDisabled: Pe, glCategoryHighlight: Fe, departmentHighlight: Ie, locationHighlight: Le, showAuditHistoryCard: Re, auditHistoryRows: ze, isLoadingAuditHistory: Be, isAuditHistoryError: Ve, children: He, labels: Ue, cardLabels: Q, fileViewerLabels: We, historyLabels: Ge }) {
|
|
15
19
|
let $ = {
|
|
16
|
-
...
|
|
17
|
-
|
|
20
|
+
...c,
|
|
21
|
+
...Ue
|
|
18
22
|
};
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
open:
|
|
23
|
+
return /* @__PURE__ */ u(e, {
|
|
24
|
+
open: g,
|
|
21
25
|
onOpenChange: (e) => {
|
|
22
|
-
!e && !
|
|
26
|
+
!e && !O && _();
|
|
23
27
|
},
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
title: /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d("span", {
|
|
29
|
+
className: "ttw:sr-only",
|
|
30
|
+
children: [$.screenReaderTitle, ": "]
|
|
31
|
+
}), T ? $.contentTitle : $.amountAtMerchant(S, C)] }),
|
|
32
|
+
description: $.screenReaderDescription,
|
|
33
|
+
submitting: O,
|
|
34
|
+
labels: { close: $.closeDialog },
|
|
35
|
+
primaryAction: T || E ? void 0 : He,
|
|
36
|
+
preview: /* @__PURE__ */ u("div", {
|
|
37
|
+
className: "ttw:flex ttw:h-full ttw:min-h-96 ttw:w-full ttw:items-stretch",
|
|
38
|
+
children: w ? /* @__PURE__ */ u(o, {
|
|
39
|
+
url: w,
|
|
40
|
+
className: "ttw:min-h-0 ttw:w-full",
|
|
41
|
+
showDeleteOption: !!H,
|
|
42
|
+
onDeleteClick: H,
|
|
43
|
+
labels: We
|
|
44
|
+
}) : U || K ? q ? /* @__PURE__ */ d("span", {
|
|
45
|
+
role: "status",
|
|
46
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
47
|
+
children: [/* @__PURE__ */ u(f, {
|
|
48
|
+
className: "ttw:size-4 ttw:animate-spin",
|
|
49
|
+
"aria-hidden": !0
|
|
50
|
+
}), $.uploadingReceipt]
|
|
51
|
+
}) : /* @__PURE__ */ u(i, {
|
|
52
|
+
label: `${$.dropFilesHere} ${$.clickToBrowse}`,
|
|
53
|
+
rules: $.acceptedFileTypes,
|
|
54
|
+
inputLabel: $.clickToBrowse,
|
|
55
|
+
disabled: T,
|
|
56
|
+
onBrowse: U,
|
|
57
|
+
onFilesSelected: (e) => {
|
|
58
|
+
e[0] && K?.(e[0]);
|
|
59
|
+
}
|
|
60
|
+
}) : /* @__PURE__ */ u("div", {
|
|
61
|
+
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",
|
|
62
|
+
children: !T && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", {
|
|
63
|
+
className: "ttw:flex ttw:size-11 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-muted",
|
|
64
|
+
children: /* @__PURE__ */ u(p, {
|
|
65
|
+
className: "ttw:size-5 ttw:text-muted-foreground",
|
|
66
|
+
"aria-hidden": !0
|
|
67
|
+
})
|
|
68
|
+
}), /* @__PURE__ */ u(t, {
|
|
69
|
+
variant: "body2",
|
|
70
|
+
color: "muted",
|
|
71
|
+
children: $.noReceiptAttached
|
|
72
|
+
})] })
|
|
73
|
+
})
|
|
74
|
+
}),
|
|
75
|
+
children: /* @__PURE__ */ d("div", {
|
|
76
|
+
className: "ttw:mx-auto ttw:flex ttw:w-full ttw:max-w-180 ttw:flex-col ttw:gap-4",
|
|
77
|
+
children: [!T && /* @__PURE__ */ d("div", {
|
|
78
|
+
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
|
|
30
79
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
className: "ttw:
|
|
33
|
-
children:
|
|
34
|
-
/* @__PURE__ */ m(o, {
|
|
35
|
-
className: "ttw:sr-only",
|
|
36
|
-
children: $.screenReaderTitle
|
|
37
|
-
}),
|
|
38
|
-
/* @__PURE__ */ m(re, {
|
|
39
|
-
className: "ttw:sr-only",
|
|
40
|
-
children: $.screenReaderDescription
|
|
41
|
-
}),
|
|
42
|
-
/* @__PURE__ */ m("div", {
|
|
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__ */ m("div", {
|
|
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__ */ m(oe, {
|
|
47
|
-
className: "ttw:size-5",
|
|
48
|
-
"aria-hidden": !0
|
|
49
|
-
})
|
|
50
|
-
})
|
|
51
|
-
}),
|
|
52
|
-
/* @__PURE__ */ m(l, {
|
|
53
|
-
variant: "h4",
|
|
54
|
-
children: $.contentTitle
|
|
55
|
-
}),
|
|
56
|
-
/* @__PURE__ */ m(s, { orientation: "vertical" }),
|
|
57
|
-
!A && /* @__PURE__ */ m(l, {
|
|
58
|
-
variant: "h5",
|
|
59
|
-
className: "ttw:whitespace-nowrap",
|
|
60
|
-
children: S
|
|
61
|
-
}),
|
|
62
|
-
!A && /* @__PURE__ */ m(u, {
|
|
63
|
-
label: C,
|
|
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]
|
|
74
|
-
})
|
|
75
|
-
]
|
|
80
|
+
/* @__PURE__ */ u("span", {
|
|
81
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
82
|
+
children: y
|
|
76
83
|
}),
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
variant: "destructive",
|
|
81
|
-
children: /* @__PURE__ */ m(t, { children: $.loadFailed })
|
|
82
|
-
}) : A ? Array.from({ length: _ }, (e, t) => /* @__PURE__ */ m(c, {
|
|
83
|
-
width: "100%",
|
|
84
|
-
height: 290
|
|
85
|
-
}, t)) : /* @__PURE__ */ h(p, { children: [
|
|
86
|
-
/* @__PURE__ */ m(l, {
|
|
87
|
-
variant: "h2",
|
|
88
|
-
className: "ttw:font-bold",
|
|
89
|
-
children: $.amountAtMerchant(D, O)
|
|
90
|
-
}),
|
|
91
|
-
/* @__PURE__ */ m(f, {
|
|
92
|
-
type: "requirements",
|
|
93
|
-
title: $.requirementsCardTitle,
|
|
94
|
-
cardLabel: N,
|
|
95
|
-
cardName: P,
|
|
96
|
-
cardholder: F,
|
|
97
|
-
showCardholder: I,
|
|
98
|
-
showPhysicalPill: L,
|
|
99
|
-
receiptFileUrl: k,
|
|
100
|
-
hasMissingInfo: !!(R && !X || z && !k),
|
|
101
|
-
showNoReceiptWarning: !!G,
|
|
102
|
-
isDescriptionRequired: R,
|
|
103
|
-
isReceiptRequired: z,
|
|
104
|
-
isReceiptAutoMatched: B,
|
|
105
|
-
isReceiptActionDisabled: V,
|
|
106
|
-
receiptButtonLabel: H,
|
|
107
|
-
receiptButtonIcon: U,
|
|
108
|
-
receiptButtonVariant: W,
|
|
109
|
-
onUploadClick: q,
|
|
110
|
-
onOpenReceiptInbox: le,
|
|
111
|
-
onSubmitWithoutReceipt: ue,
|
|
112
|
-
onDeleteReceipt: K,
|
|
113
|
-
descriptionValue: X,
|
|
114
|
-
initialDescriptionValue: de,
|
|
115
|
-
onDescriptionChange: fe,
|
|
116
|
-
onSaveDescription: pe,
|
|
117
|
-
onCancelDescription: me,
|
|
118
|
-
isSavingDescription: he,
|
|
119
|
-
isMemoEditable: ge,
|
|
120
|
-
memoBadgeLabel: _e,
|
|
121
|
-
labels: Q
|
|
122
|
-
}, `requirements-${x}`),
|
|
123
|
-
ye && /* @__PURE__ */ m(f, {
|
|
124
|
-
type: "approvals",
|
|
125
|
-
title: $.approvalsCardTitle,
|
|
126
|
-
hasAppliedPolicy: !!be,
|
|
127
|
-
isRejected: T,
|
|
128
|
-
isAutoApproved: !!Ee,
|
|
129
|
-
isManuallyApproved: !!De,
|
|
130
|
-
isPendingReview: E,
|
|
131
|
-
rejectionReason: we,
|
|
132
|
-
greaterThanValue: xe,
|
|
133
|
-
lessThanValue: Se,
|
|
134
|
-
ruleLabel: Ce,
|
|
135
|
-
approverName: Te,
|
|
136
|
-
labels: Q
|
|
137
|
-
}, `approvals-${x}`),
|
|
138
|
-
Oe && /* @__PURE__ */ m(f, {
|
|
139
|
-
type: "accounting",
|
|
140
|
-
title: $.accountingCardTitle,
|
|
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,
|
|
161
|
-
labels: Q
|
|
162
|
-
}, `accounting-${x}`),
|
|
163
|
-
Je && /* @__PURE__ */ m(f, {
|
|
164
|
-
type: "auditHistory",
|
|
165
|
-
title: $.auditHistoryCardTitle,
|
|
166
|
-
rows: Ye ?? [],
|
|
167
|
-
isLoading: Xe,
|
|
168
|
-
isError: Ze,
|
|
169
|
-
historyLabels: tt
|
|
170
|
-
}, `auditHistory-${x}`)
|
|
171
|
-
] })
|
|
84
|
+
/* @__PURE__ */ u(a, {
|
|
85
|
+
label: b,
|
|
86
|
+
tone: te
|
|
172
87
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}), /* @__PURE__ */ h("div", {
|
|
179
|
-
className: "ttw:relative ttw:flex ttw:flex-1/2 ttw:bg-muted ttw:px-6 ttw:py-20",
|
|
180
|
-
children: [/* @__PURE__ */ m(te, {
|
|
181
|
-
asChild: !0,
|
|
182
|
-
className: "ttw:absolute ttw:right-4 ttw:top-4",
|
|
183
|
-
children: /* @__PURE__ */ m(r, {
|
|
184
|
-
type: "button",
|
|
185
|
-
variant: "outline",
|
|
186
|
-
size: "icon",
|
|
187
|
-
"aria-label": $.closeDialog,
|
|
188
|
-
disabled: M,
|
|
189
|
-
children: /* @__PURE__ */ m(ce, {
|
|
190
|
-
className: "ttw:size-4",
|
|
88
|
+
se && /* @__PURE__ */ d("span", {
|
|
89
|
+
role: "status",
|
|
90
|
+
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-sm ttw:text-muted-foreground",
|
|
91
|
+
children: [/* @__PURE__ */ u(f, {
|
|
92
|
+
className: "ttw:size-4 ttw:animate-spin",
|
|
191
93
|
"aria-hidden": !0
|
|
192
|
-
})
|
|
94
|
+
}), $.readingReceipt]
|
|
193
95
|
})
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
"
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
96
|
+
]
|
|
97
|
+
}), E ? /* @__PURE__ */ u(n, {
|
|
98
|
+
title: $.loadFailed,
|
|
99
|
+
retryLabel: $.tryAgain,
|
|
100
|
+
onRetry: D
|
|
101
|
+
}) : T ? /* @__PURE__ */ u(r, {
|
|
102
|
+
isLoading: !0,
|
|
103
|
+
loadingLabel: $.loading,
|
|
104
|
+
children: Array.from({ length: m }, (e, t) => /* @__PURE__ */ u(ee, {
|
|
105
|
+
width: "100%",
|
|
106
|
+
height: 290
|
|
107
|
+
}, t))
|
|
108
|
+
}) : /* @__PURE__ */ d(l, { children: [
|
|
109
|
+
/* @__PURE__ */ u(s, {
|
|
110
|
+
type: "requirements",
|
|
111
|
+
title: $.requirementsCardTitle,
|
|
112
|
+
cardLabel: k,
|
|
113
|
+
cardName: A,
|
|
114
|
+
cardholder: j,
|
|
115
|
+
showCardholder: M,
|
|
116
|
+
showPhysicalPill: N,
|
|
117
|
+
receiptFileUrl: w,
|
|
118
|
+
hasMissingInfo: !!(P && !J || F && !w),
|
|
119
|
+
showNoReceiptWarning: !!V,
|
|
120
|
+
isDescriptionRequired: P,
|
|
121
|
+
isReceiptRequired: F,
|
|
122
|
+
isReceiptAutoMatched: I,
|
|
123
|
+
isReceiptActionDisabled: L,
|
|
124
|
+
receiptButtonLabel: R,
|
|
125
|
+
receiptButtonIcon: z,
|
|
126
|
+
receiptButtonVariant: B,
|
|
127
|
+
onUploadClick: U,
|
|
128
|
+
onOpenReceiptInbox: W,
|
|
129
|
+
onSubmitWithoutReceipt: G,
|
|
130
|
+
onDeleteReceipt: H,
|
|
131
|
+
descriptionValue: J,
|
|
132
|
+
initialDescriptionValue: Y,
|
|
133
|
+
onDescriptionChange: X,
|
|
134
|
+
onSaveDescription: Z,
|
|
135
|
+
onCancelDescription: re,
|
|
136
|
+
isSavingDescription: ie,
|
|
137
|
+
isMemoEditable: ae,
|
|
138
|
+
memoBadgeLabel: oe,
|
|
139
|
+
labels: Q
|
|
140
|
+
}, `requirements-${v}`),
|
|
141
|
+
ce && /* @__PURE__ */ u(s, {
|
|
142
|
+
type: "approvals",
|
|
143
|
+
title: $.approvalsCardTitle,
|
|
144
|
+
hasAppliedPolicy: !!le,
|
|
145
|
+
isRejected: ne,
|
|
146
|
+
isAutoApproved: !!he,
|
|
147
|
+
isManuallyApproved: !!ge,
|
|
148
|
+
isPendingReview: x,
|
|
149
|
+
rejectionReason: pe,
|
|
150
|
+
greaterThanValue: ue,
|
|
151
|
+
lessThanValue: de,
|
|
152
|
+
ruleLabel: fe,
|
|
153
|
+
approverName: me,
|
|
154
|
+
labels: Q
|
|
155
|
+
}, `approvals-${v}`),
|
|
156
|
+
_e && /* @__PURE__ */ u(s, {
|
|
157
|
+
type: "accounting",
|
|
158
|
+
title: $.accountingCardTitle,
|
|
159
|
+
glCategory: ve,
|
|
160
|
+
initialGlCategory: ye,
|
|
161
|
+
glCategoryOptions: be,
|
|
162
|
+
onGlCategoryChange: xe ?? h,
|
|
163
|
+
department: Se,
|
|
164
|
+
initialDepartment: Ce,
|
|
165
|
+
departmentOptions: we,
|
|
166
|
+
onDepartmentChange: Te ?? h,
|
|
167
|
+
location: Ee,
|
|
168
|
+
initialLocation: De,
|
|
169
|
+
locationOptions: Oe,
|
|
170
|
+
onLocationChange: ke ?? h,
|
|
171
|
+
onSave: Ae ?? h,
|
|
172
|
+
onCancel: je ?? h,
|
|
173
|
+
isSaving: !!Me,
|
|
174
|
+
isGlCategoryDisabled: Ne,
|
|
175
|
+
isDisabled: Pe,
|
|
176
|
+
glCategoryHighlight: Fe,
|
|
177
|
+
departmentHighlight: Ie,
|
|
178
|
+
locationHighlight: Le,
|
|
179
|
+
labels: Q
|
|
180
|
+
}, `accounting-${v}`),
|
|
181
|
+
Re && /* @__PURE__ */ u(s, {
|
|
182
|
+
type: "auditHistory",
|
|
183
|
+
title: $.auditHistoryCardTitle,
|
|
184
|
+
rows: ze ?? [],
|
|
185
|
+
isLoading: Be,
|
|
186
|
+
isError: Ve,
|
|
187
|
+
historyLabels: Ge
|
|
188
|
+
}, `auditHistory-${v}`)
|
|
189
|
+
] })]
|
|
273
190
|
})
|
|
274
191
|
});
|
|
275
192
|
}
|
|
276
|
-
export {
|
|
193
|
+
export { g as TransactionDetails, g as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/labels.js
|
|
2
2
|
var e = {
|
|
3
3
|
screenReaderTitle: "Transaction details",
|
|
4
|
+
loading: "Loading expense",
|
|
4
5
|
screenReaderDescription: "Review the transaction, its receipt and its approval requirements.",
|
|
5
6
|
contentTitle: "Transaction",
|
|
6
7
|
closeDialog: "Close transaction details",
|
|
@@ -12,10 +13,11 @@ var e = {
|
|
|
12
13
|
noReceiptAttached: "No receipt attached",
|
|
13
14
|
dropFilesHere: "Drop your files here, or",
|
|
14
15
|
clickToBrowse: "click to browse",
|
|
15
|
-
acceptedFileTypes: "
|
|
16
|
+
acceptedFileTypes: "PDF, PNG, JPG, GIF or SVG",
|
|
16
17
|
uploadingReceipt: "Processing receipts...",
|
|
17
18
|
uploadingReceiptBody: "Give us a few seconds to process your attachment.",
|
|
18
19
|
readingReceipt: "Reading receipt…",
|
|
19
|
-
loadFailed: "
|
|
20
|
+
loadFailed: "Couldn’t load expense",
|
|
21
|
+
tryAgain: "Try again"
|
|
20
22
|
};
|
|
21
23
|
export { e as TRANSACTION_DETAILS_LABELS_EN };
|