@tesouro/embedded-components-react 0.5.187 → 0.5.189
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 +19 -9
- package/dist/index.css +110 -0
- package/dist/index.d.ts +233 -60
- package/dist/index.js +6 -6
- package/dist/lib/ExpenseManagementWidget.d.ts +189 -11
- package/dist/lib/ExpenseManagementWidget.js +1 -1
- package/dist/lib/UploadReceiptWidget.js +1 -1
- package/dist/lib/WidgetSuite.d.ts +213 -16
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index.js +17 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index10.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index11.js +71 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index12.js +39 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index13.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index14.js +110 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index15.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index16.js +19 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index17.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index18.js +28 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index19.js +35 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index20.js +28 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index21.js +164 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index4.js +25 -18
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index5.js +20 -34
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index6.js +16 -20
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index7.js +16 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index8.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index9.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +10 -7
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index10.js +162 -59
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index11.js +64 -16
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index12.js +73 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js +348 -42
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index14.js +42 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index15.js +143 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index16.js +229 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index17.js +196 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index18.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index19.js +91 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index2.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index20.js +39 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index21.js +297 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index22.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index23.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index24.js +256 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index25.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index26.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index27.js +223 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index3.js +2 -254
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index4.js +4 -20
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +262 -8
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js +2 -221
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index7.js +54 -80
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index8.js +24 -254
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/index.js +34 -13
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js +549 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/labels.js +38 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ActionItemsList/ActionItemsList.js +64 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ActionItemsList/labels.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/ExpenseStatusBadge.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/badgeTones.js +16 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/labels.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesHeader/ExpensesHeader.js +37 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesHeader/labels.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesScreen/ExpensesScreen.js +112 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesScreen/labels.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/ExpensesTransactionsFilterBar.js +158 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/labels.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsTable/ExpensesTransactionsTable.js +148 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsTable/labels.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/FileViewer.js +107 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/PdfFileViewer.js +37 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/labels.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/ReceiptMatchLauncher.js +2 -24
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/ReceiptMatchSidebar.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/TransactionsMatchStep.js +62 -65
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/labels.js +1 -4
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/DeleteReceiptDialog/DeleteReceiptDialog.js +31 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/DeleteReceiptDialog/labels.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/TransactionDetails.js +268 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/labels.js +21 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/BulkProgress.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/TransactionDetailsActions.js +142 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/labels.js +20 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/isPdf.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index109.js +55 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index56.js +24 -18
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +36 -36
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +268 -206
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +218 -113
- 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/util/dist/lib/formatCalendarDate.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index11.js +16 -14
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +1 -2
- package/package.json +3 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/ExpenseManagementWidgetUi.js +0 -71
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/index.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/labels.js +0 -10
|
@@ -1160,7 +1160,7 @@ type BalancesWidgetPassthroughProps = Pick<BalancesWidgetWithContextProps, 'maxA
|
|
|
1160
1160
|
interface BalancesWidgetProps extends WidgetProviderProps, BalancesWidgetPassthroughProps {
|
|
1161
1161
|
}
|
|
1162
1162
|
|
|
1163
|
-
interface Labels$
|
|
1163
|
+
interface Labels$4 {
|
|
1164
1164
|
bankingTaglinePrefix: string;
|
|
1165
1165
|
availableBalanceLabel: string;
|
|
1166
1166
|
availableBalanceTooltip: string;
|
|
@@ -1198,7 +1198,7 @@ interface Labels$3 {
|
|
|
1198
1198
|
errorTitle: string;
|
|
1199
1199
|
}
|
|
1200
1200
|
|
|
1201
|
-
interface Labels$
|
|
1201
|
+
interface Labels$3 {
|
|
1202
1202
|
backToAccounts: string;
|
|
1203
1203
|
bankingTaglinePrefix: string;
|
|
1204
1204
|
availableBalanceLabel: string;
|
|
@@ -1278,8 +1278,8 @@ interface FeatureLabels$3 {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
|
|
1280
1280
|
interface BankAccountsWidgetProps extends WidgetProviderProps {
|
|
1281
|
-
labels?: Partial<Labels$
|
|
1282
|
-
accountDetailsLabels?: Partial<Labels$
|
|
1281
|
+
labels?: Partial<Labels$4>;
|
|
1282
|
+
accountDetailsLabels?: Partial<Labels$3>;
|
|
1283
1283
|
featureLabels?: Partial<FeatureLabels$3>;
|
|
1284
1284
|
isBankingTaglineVisible?: boolean;
|
|
1285
1285
|
/**
|
|
@@ -2077,6 +2077,208 @@ type CreditCardsWidgetProps = Omit<CardsWidgetProps, 'cardProgram' | 'cardArtSrc
|
|
|
2077
2077
|
*/
|
|
2078
2078
|
type DebitCardsWidgetProps = Omit<CardsWidgetProps, 'cardProgram'>;
|
|
2079
2079
|
|
|
2080
|
+
/**
|
|
2081
|
+
* Mirrors the REST API's `ExpenseStatusEnum` (`new`, `approve_in_progress`,
|
|
2082
|
+
* `approved`, `rejected`, `canceled`). Kept as a local literal union rather
|
|
2083
|
+
* than importing the generated enum type: a `type:ui` library must not reach
|
|
2084
|
+
* into `rest/types.gen.ts`, only the caller (a feature layer) may, and then
|
|
2085
|
+
* pass the already-mapped display status down.
|
|
2086
|
+
*/
|
|
2087
|
+
type ExpenseBadgeStatus = 'new' | 'approve_in_progress' | 'approved' | 'rejected' | 'canceled';
|
|
2088
|
+
|
|
2089
|
+
type ExpenseStatusBadgeLabels = Record<ExpenseBadgeStatus, string> & {
|
|
2090
|
+
unknown: string;
|
|
2091
|
+
readyToSubmit: string;
|
|
2092
|
+
missingInfo: string;
|
|
2093
|
+
};
|
|
2094
|
+
|
|
2095
|
+
interface ExpensesHeaderLabels {
|
|
2096
|
+
bankingTaglinePrefix: string;
|
|
2097
|
+
settingsButtonAriaLabel: string;
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
interface ActionItemsListLabels {
|
|
2101
|
+
heading: string;
|
|
2102
|
+
reviewButton: string;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
interface ExpensesTransactionsTableLabels {
|
|
2106
|
+
dateColumn: string;
|
|
2107
|
+
statusColumn: string;
|
|
2108
|
+
merchantColumn: string;
|
|
2109
|
+
cardholderColumn: string;
|
|
2110
|
+
cardColumn: string;
|
|
2111
|
+
departmentColumn: string;
|
|
2112
|
+
receiptColumn: string;
|
|
2113
|
+
amountColumn: string;
|
|
2114
|
+
receiptPresentAriaLabel: string;
|
|
2115
|
+
receiptMissingAriaLabel: string;
|
|
2116
|
+
addReceiptAriaLabel: string;
|
|
2117
|
+
addingReceiptAriaLabel: string;
|
|
2118
|
+
/** Accessible name of a clickable row, e.g. "Review expense — Acme, $42.00". */
|
|
2119
|
+
rowAriaLabel: (merchantLabel: string, amountLabel: string) => string;
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
interface ExpensesTransactionsFilterBarLabels {
|
|
2123
|
+
searchPlaceholder: string;
|
|
2124
|
+
searchAriaLabel: string;
|
|
2125
|
+
filtersButtonAriaLabel: string;
|
|
2126
|
+
clearAll: string;
|
|
2127
|
+
dateRangeFieldLabel: string;
|
|
2128
|
+
cardOnlyOn: string;
|
|
2129
|
+
fieldDate: string;
|
|
2130
|
+
fieldPaymentStatus: string;
|
|
2131
|
+
fieldApprovalStatus: string;
|
|
2132
|
+
fieldType: string;
|
|
2133
|
+
fieldTeamMember: string;
|
|
2134
|
+
fieldAmount: string;
|
|
2135
|
+
fieldCardOnly: string;
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2138
|
+
interface Labels$2 {
|
|
2139
|
+
myTransactionsTab: string;
|
|
2140
|
+
teamTransactionsTab: string;
|
|
2141
|
+
policiesTab: string;
|
|
2142
|
+
requirementsTab: string;
|
|
2143
|
+
matchingTab: string;
|
|
2144
|
+
tabCountAriaSuffix: string;
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
interface FileViewerLabels {
|
|
2148
|
+
filePreview: string;
|
|
2149
|
+
zoomIn: string;
|
|
2150
|
+
zoomOut: string;
|
|
2151
|
+
moreActions: string;
|
|
2152
|
+
downloadAttachment: string;
|
|
2153
|
+
deleteAttachment: string;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
interface AccordionItemCardLabels {
|
|
2157
|
+
spentFrom: string;
|
|
2158
|
+
cardholder: string;
|
|
2159
|
+
physical: string;
|
|
2160
|
+
receipt: string;
|
|
2161
|
+
memo: string;
|
|
2162
|
+
requiredMarker: string;
|
|
2163
|
+
missingInfoWarning: string;
|
|
2164
|
+
noReceiptWarningTitle: string;
|
|
2165
|
+
noReceiptWarningDescription: string;
|
|
2166
|
+
receiptAutoMatchedBadge: string;
|
|
2167
|
+
receiptMenuAriaLabel: string;
|
|
2168
|
+
uploadDropdownUploadOption: string;
|
|
2169
|
+
uploadDropdownFindReceiptOption: string;
|
|
2170
|
+
uploadDropdownSubmitWithoutOption: string;
|
|
2171
|
+
uploadedReceiptDownloadOption: string;
|
|
2172
|
+
uploadedReceiptDeleteOption: string;
|
|
2173
|
+
saveButton: string;
|
|
2174
|
+
cancelButton: string;
|
|
2175
|
+
emptyRejectionReason: string;
|
|
2176
|
+
rule: string;
|
|
2177
|
+
greaterThan: string;
|
|
2178
|
+
lessThan: string;
|
|
2179
|
+
systemDefaultApplied: string;
|
|
2180
|
+
status: string;
|
|
2181
|
+
autoApproval: string;
|
|
2182
|
+
approved: string;
|
|
2183
|
+
approvedBy: (approverName: string) => string;
|
|
2184
|
+
rejected: string;
|
|
2185
|
+
rejectedBy: (approverName: string) => string;
|
|
2186
|
+
awaitingReview: string;
|
|
2187
|
+
glCategory: string;
|
|
2188
|
+
department: string;
|
|
2189
|
+
location: string;
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
interface TransactionDetailsActionsLabels {
|
|
2193
|
+
returnToExpenses: string;
|
|
2194
|
+
cancel: string;
|
|
2195
|
+
reject: string;
|
|
2196
|
+
approve: string;
|
|
2197
|
+
approveReviewNext: string;
|
|
2198
|
+
confirmRejection: string;
|
|
2199
|
+
confirmRejectionReviewNext: string;
|
|
2200
|
+
submitForApproval: string;
|
|
2201
|
+
submitForApprovalReviewNext: string;
|
|
2202
|
+
rejectionReasonLabel: string;
|
|
2203
|
+
noReceiptReasonLabel: string;
|
|
2204
|
+
requiredMarker: string;
|
|
2205
|
+
/** e.g. "Review 2/7" above the bulk progress bar. */
|
|
2206
|
+
bulkProgress: (currentItem: number, totalItems: number) => string;
|
|
2207
|
+
bulkProgressAriaLabel: string;
|
|
2208
|
+
actionFailed: string;
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
interface TransactionDetailsLabels {
|
|
2212
|
+
screenReaderTitle: string;
|
|
2213
|
+
screenReaderDescription: string;
|
|
2214
|
+
contentTitle: string;
|
|
2215
|
+
closeDialog: string;
|
|
2216
|
+
requirementsCardTitle: string;
|
|
2217
|
+
approvalsCardTitle: string;
|
|
2218
|
+
accountingCardTitle: string;
|
|
2219
|
+
auditHistoryCardTitle: string;
|
|
2220
|
+
/** e.g. "$87.40 at Acme Coffee" — the dialog's one-line summary. */
|
|
2221
|
+
amountAtMerchant: (amount: string, merchant: string) => string;
|
|
2222
|
+
noReceiptAttached: string;
|
|
2223
|
+
dropFilesHere: string;
|
|
2224
|
+
clickToBrowse: string;
|
|
2225
|
+
acceptedFileTypes: string;
|
|
2226
|
+
uploadingReceipt: string;
|
|
2227
|
+
uploadingReceiptBody: string;
|
|
2228
|
+
loadFailed: string;
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
/**
|
|
2232
|
+
* Aggregate outcome of a receipt batch after the backend finishes OCR and
|
|
2233
|
+
* auto-matching. `stillProcessing` counts receipts that never reached a terminal
|
|
2234
|
+
* state inside the host's budget, which is a neutral state, not a failure.
|
|
2235
|
+
*/
|
|
2236
|
+
interface ReceiptMatchSummary {
|
|
2237
|
+
total: number;
|
|
2238
|
+
matched: number;
|
|
2239
|
+
unmatched: number;
|
|
2240
|
+
unreadable: number;
|
|
2241
|
+
stillProcessing: number;
|
|
2242
|
+
}
|
|
2243
|
+
interface UploadReceiptWidgetProps {
|
|
2244
|
+
emailAddress?: string;
|
|
2245
|
+
onFileUpload?: (file: File) => unknown | Promise<unknown>;
|
|
2246
|
+
/**
|
|
2247
|
+
* Awaited after every file in the batch has uploaded. Resolve once the backend
|
|
2248
|
+
* has finished OCR and auto-matching so the widget can report the outcome in
|
|
2249
|
+
* its batch toast. Omit it and the widget stops at "Uploaded N attachments".
|
|
2250
|
+
*/
|
|
2251
|
+
onAwaitMatching?: (uploadedCount: number) => Promise<ReceiptMatchSummary>;
|
|
2252
|
+
isUploading?: boolean;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
interface ExpenseManagementWidgetOwnProps {
|
|
2256
|
+
screenLabels?: Partial<Labels$2>;
|
|
2257
|
+
headerLabels?: Partial<ExpensesHeaderLabels>;
|
|
2258
|
+
transactionsTableLabels?: Partial<ExpensesTransactionsTableLabels>;
|
|
2259
|
+
filterBarLabels?: Partial<ExpensesTransactionsFilterBarLabels>;
|
|
2260
|
+
actionItemsLabels?: Partial<ActionItemsListLabels>;
|
|
2261
|
+
statusBadgeLabels?: Partial<ExpenseStatusBadgeLabels>;
|
|
2262
|
+
/** Copy for the full-screen review dialog opened from a row or an Action Item. */
|
|
2263
|
+
transactionDetailsLabels?: Partial<TransactionDetailsLabels>;
|
|
2264
|
+
transactionDetailsCardLabels?: Partial<AccordionItemCardLabels>;
|
|
2265
|
+
transactionDetailsActionsLabels?: Partial<TransactionDetailsActionsLabels>;
|
|
2266
|
+
fileViewerLabels?: Partial<FileViewerLabels>;
|
|
2267
|
+
/** Renders the "Upload receipts" entry point in the header's actions slot. */
|
|
2268
|
+
receiptUpload?: UploadReceiptWidgetProps;
|
|
2269
|
+
/**
|
|
2270
|
+
* Bank attribution header (name/logo/tagline) plus an optional settings
|
|
2271
|
+
* entry point. The widget cannot fetch its own bank branding or navigate
|
|
2272
|
+
* (host routing ban), so the host supplies both.
|
|
2273
|
+
*/
|
|
2274
|
+
bankDisplayName?: string;
|
|
2275
|
+
bankLogoSrc?: string;
|
|
2276
|
+
bankLogoAlt?: string;
|
|
2277
|
+
isBankingTaglineVisible?: boolean;
|
|
2278
|
+
onSettingsClick?: () => void;
|
|
2279
|
+
}
|
|
2280
|
+
type ExpenseManagementWidgetProps = WidgetProviderProps & ExpenseManagementWidgetOwnProps;
|
|
2281
|
+
|
|
2080
2282
|
interface InsightsWidgetLabels {
|
|
2081
2283
|
widgetTitle: string;
|
|
2082
2284
|
activeTab: string;
|
|
@@ -2655,6 +2857,7 @@ type WidgetSuiteDebitCardsLabels = WidgetLabelProps<DebitCardsWidgetProps>;
|
|
|
2655
2857
|
type WidgetSuiteTransfersLabels = WidgetLabelProps<TransfersWidgetProps>;
|
|
2656
2858
|
type WidgetSuiteLinkedAccountsLabels = WidgetLabelProps<LinkedAccountsWidgetProps>;
|
|
2657
2859
|
type WidgetSuiteSettingsLabels = WidgetLabelProps<SettingsWidgetProps>;
|
|
2860
|
+
type WidgetSuiteExpensesLabels = WidgetLabelProps<ExpenseManagementWidgetProps>;
|
|
2658
2861
|
/** The two widgets the Dashboard section pairs, each taking its own copy. */
|
|
2659
2862
|
interface WidgetSuiteDashboardLabels {
|
|
2660
2863
|
balances?: WidgetSuiteBalancesLabels;
|
|
@@ -2675,10 +2878,6 @@ interface WidgetSuiteCardsLabels {
|
|
|
2675
2878
|
creditCards?: WidgetSuiteCreditCardsLabels;
|
|
2676
2879
|
debitCards?: WidgetSuiteDebitCardsLabels;
|
|
2677
2880
|
}
|
|
2678
|
-
/** Expenses is only a placeholder until the suite wires a read/self surface. */
|
|
2679
|
-
interface WidgetSuiteExpensesLabels {
|
|
2680
|
-
expensesUnavailable: string;
|
|
2681
|
-
}
|
|
2682
2881
|
/**
|
|
2683
2882
|
* Copy the suite puts *inside* a section's panel, one group per section.
|
|
2684
2883
|
*
|
|
@@ -2696,7 +2895,7 @@ interface WidgetSuiteSectionContentLabels {
|
|
|
2696
2895
|
cards: WidgetSuiteCardsLabels;
|
|
2697
2896
|
transfers?: WidgetSuiteTransfersLabels;
|
|
2698
2897
|
linkedAccounts?: WidgetSuiteLinkedAccountsLabels;
|
|
2699
|
-
expenses
|
|
2898
|
+
expenses?: WidgetSuiteExpensesLabels;
|
|
2700
2899
|
settings?: WidgetSuiteSettingsLabels;
|
|
2701
2900
|
}
|
|
2702
2901
|
/**
|
|
@@ -2704,9 +2903,8 @@ interface WidgetSuiteSectionContentLabels {
|
|
|
2704
2903
|
* it mounts. Two kinds of group, differing in who holds the default:
|
|
2705
2904
|
*
|
|
2706
2905
|
* - **Suite-owned** — `shell`, `menu`, `sectionTitle`, `disclosure`,
|
|
2707
|
-
* `onboardingGate`,
|
|
2708
|
-
*
|
|
2709
|
-
* over it.
|
|
2906
|
+
* `onboardingGate`, and the two card-list titles. Defaulted in
|
|
2907
|
+
* {@link WIDGET_SUITE_LABELS_EN}, with an override merged over it.
|
|
2710
2908
|
* - **Forwarded** — `onboarding`, and every other key under `sections`.
|
|
2711
2909
|
* Handed down untouched for the widget to merge over its own defaults, so
|
|
2712
2910
|
* the suite carries no copy of a widget's strings and cannot go stale
|
|
@@ -2734,14 +2932,13 @@ interface WidgetSuiteLabels {
|
|
|
2734
2932
|
* each group under them is already the exact override its widget accepts,
|
|
2735
2933
|
* so deepening it again would admit a shape the suite cannot forward and
|
|
2736
2934
|
* would flatten a non-plain member (`PartialDeep` maps a function-valued
|
|
2737
|
-
* label to `{}`). The
|
|
2738
|
-
*
|
|
2935
|
+
* label to `{}`). The suite-owned `cards` group is made partial one level
|
|
2936
|
+
* for the same reason.
|
|
2739
2937
|
*/
|
|
2740
2938
|
type WidgetSuiteLabelOverrides = PartialDeep<Omit<WidgetSuiteLabels, 'sections' | 'onboarding'>> & {
|
|
2741
2939
|
onboarding?: WidgetSuiteOnboardingLabels;
|
|
2742
|
-
sections?: Partial<Omit<WidgetSuiteSectionContentLabels, 'cards'
|
|
2940
|
+
sections?: Partial<Omit<WidgetSuiteSectionContentLabels, 'cards'>> & {
|
|
2743
2941
|
cards?: Partial<WidgetSuiteCardsLabels>;
|
|
2744
|
-
expenses?: Partial<WidgetSuiteExpensesLabels>;
|
|
2745
2942
|
};
|
|
2746
2943
|
};
|
|
2747
2944
|
declare const WIDGET_SUITE_LABELS_EN: WidgetSuiteLabels;
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { useGetReceiptsQuery as e } from "./index2.js";
|
|
2
2
|
import { useGetTransactionsQuery as t } from "./index3.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { useOrganizationDepartmentsQuery as n } from "./index4.js";
|
|
4
|
+
import { useEntityUsersByIdsQuery as r } from "./index5.js";
|
|
5
|
+
import { useOrganizationLocationsQuery as i } from "./index6.js";
|
|
6
|
+
import { useExpenseLedgerAccountsQuery as a } from "./index7.js";
|
|
7
|
+
import { useExpenseHistoryQuery as o } from "./index8.js";
|
|
8
|
+
import { useGetTransactionQuery as s } from "./index9.js";
|
|
9
|
+
import { usePatchReceiptMutation as c } from "./index11.js";
|
|
10
|
+
import { useDeleteReceiptMutation as l } from "./index12.js";
|
|
11
|
+
import { useUploadReceiptMutation as u } from "./index13.js";
|
|
12
|
+
import { useTrackReceiptMatching as d } from "./index14.js";
|
|
13
|
+
import { useExpenseTransactionsCountQuery as f } from "./index15.js";
|
|
14
|
+
import { useExpenseTransactionIdsQuery as p } from "./index16.js";
|
|
15
|
+
import { useExpenseReceiptsCountQuery as m } from "./index17.js";
|
|
16
|
+
import { useTransactionValidationsQuery as h } from "./index18.js";
|
|
17
|
+
import { useGetApprovalRequestsQuery as g } from "./index19.js";
|
|
18
|
+
import { useApproveApprovalRequestMutation as _, useApproveTransactionMutation as v, useRejectApprovalRequestMutation as y, useRejectTransactionMutation as b, useReopenTransactionMutation as x, useSubmitTransactionMutation as S, useUpdateTransactionMutation as C } from "./index21.js";
|
|
19
|
+
export { _ as useApproveApprovalRequestMutation, v as useApproveTransactionMutation, l as useDeleteReceiptMutation, r as useEntityUsersByIdsQuery, o as useExpenseHistoryQuery, a as useExpenseLedgerAccountsQuery, m as useExpenseReceiptsCountQuery, p as useExpenseTransactionIdsQuery, f as useExpenseTransactionsCountQuery, g as useGetApprovalRequestsQuery, e as useGetReceiptsQuery, s as useGetTransactionQuery, t as useGetTransactionsQuery, n as useOrganizationDepartmentsQuery, i as useOrganizationLocationsQuery, c as usePatchReceiptMutation, y as useRejectApprovalRequestMutation, b as useRejectTransactionMutation, x as useReopenTransactionMutation, S as useSubmitTransactionMutation, d as useTrackReceiptMatching, h as useTransactionValidationsQuery, C as useUpdateTransactionMutation, u as useUploadReceiptMutation };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { getAnalyticsReceiptsQueryKey as e, getAnalyticsTransactionsQueryKey as t, getReceiptsIdQueryKey as n, getReceiptsQueryKey as r, getTransactionsIdExpenseHistoryQueryKey as i, getTransactionsIdQueryKey as a, getTransactionsQueryKey as o } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
2
|
+
import { organizationHeaders as s } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
3
|
+
import "../../../shared/data-access/dist/index.js";
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index10.js
|
|
5
|
+
var c = {
|
|
6
|
+
metric: "id",
|
|
7
|
+
aggregation_function: "count"
|
|
8
|
+
}, l = ({ client: e, organizationId: t }) => r({
|
|
9
|
+
client: e,
|
|
10
|
+
headers: s(t)
|
|
11
|
+
}), u = ({ client: e, organizationId: t }) => o({
|
|
12
|
+
client: e,
|
|
13
|
+
headers: s(t)
|
|
14
|
+
}), d = ({ client: t, organizationId: n }) => e({
|
|
15
|
+
client: t,
|
|
16
|
+
headers: s(n),
|
|
17
|
+
query: c
|
|
18
|
+
}), f = ({ client: e, organizationId: n }) => t({
|
|
19
|
+
client: e,
|
|
20
|
+
headers: s(n),
|
|
21
|
+
query: c
|
|
22
|
+
}), p = ({ client: e, organizationId: t, receiptId: r }) => n({
|
|
23
|
+
client: e,
|
|
24
|
+
headers: s(t),
|
|
25
|
+
path: { receipt_id: r }
|
|
26
|
+
}), m = ({ client: e, organizationId: t, transactionId: n }) => a({
|
|
27
|
+
client: e,
|
|
28
|
+
headers: s(t),
|
|
29
|
+
path: { transaction_id: n }
|
|
30
|
+
}), h = ({ client: e, organizationId: t, transactionId: n }) => i({
|
|
31
|
+
client: e,
|
|
32
|
+
headers: s(t),
|
|
33
|
+
path: { transaction_id: n }
|
|
34
|
+
});
|
|
35
|
+
//#endregion
|
|
36
|
+
export { c as EXPENSE_COUNT_ANALYTICS, d as analyticsReceiptsInvalidationKey, f as analyticsTransactionsInvalidationKey, p as receiptsIdInvalidationKey, l as receiptsInvalidationKey, h as transactionsIdExpenseHistoryInvalidationKey, m as transactionsIdInvalidationKey, u as transactionsInvalidationKey };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { patchReceiptsIdMutation as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { invalidateAllClients as t } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
|
+
import "../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { analyticsReceiptsInvalidationKey as i, analyticsTransactionsInvalidationKey as a, receiptsIdInvalidationKey as o, receiptsInvalidationKey as s, transactionsIdExpenseHistoryInvalidationKey as c, transactionsIdInvalidationKey as l, transactionsInvalidationKey as u } from "./index10.js";
|
|
11
|
+
import { useMutation as d } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index11.js
|
|
13
|
+
function f() {
|
|
14
|
+
let { client: f, organizationId: p } = n(), m = e({
|
|
15
|
+
client: f,
|
|
16
|
+
headers: r(p)
|
|
17
|
+
});
|
|
18
|
+
return d({
|
|
19
|
+
...m,
|
|
20
|
+
mutationFn: (e, t) => {
|
|
21
|
+
let { previousTransactionId: n, ...r } = e;
|
|
22
|
+
return m.mutationFn(r, t);
|
|
23
|
+
},
|
|
24
|
+
onSuccess: async (e, n) => {
|
|
25
|
+
let r = n.path.receipt_id, d = n.body?.transaction_id, { previousTransactionId: m } = n;
|
|
26
|
+
await Promise.all([
|
|
27
|
+
t(s({
|
|
28
|
+
client: f,
|
|
29
|
+
organizationId: p
|
|
30
|
+
})),
|
|
31
|
+
t(i({
|
|
32
|
+
client: f,
|
|
33
|
+
organizationId: p
|
|
34
|
+
})),
|
|
35
|
+
t(u({
|
|
36
|
+
client: f,
|
|
37
|
+
organizationId: p
|
|
38
|
+
})),
|
|
39
|
+
t(a({
|
|
40
|
+
client: f,
|
|
41
|
+
organizationId: p
|
|
42
|
+
})),
|
|
43
|
+
t(o({
|
|
44
|
+
client: f,
|
|
45
|
+
organizationId: p,
|
|
46
|
+
receiptId: r
|
|
47
|
+
})),
|
|
48
|
+
...d ? [t(l({
|
|
49
|
+
client: f,
|
|
50
|
+
organizationId: p,
|
|
51
|
+
transactionId: d
|
|
52
|
+
})), t(c({
|
|
53
|
+
client: f,
|
|
54
|
+
organizationId: p,
|
|
55
|
+
transactionId: d
|
|
56
|
+
}))] : [],
|
|
57
|
+
...m ? [t(l({
|
|
58
|
+
client: f,
|
|
59
|
+
organizationId: p,
|
|
60
|
+
transactionId: m
|
|
61
|
+
})), t(c({
|
|
62
|
+
client: f,
|
|
63
|
+
organizationId: p,
|
|
64
|
+
transactionId: m
|
|
65
|
+
}))] : []
|
|
66
|
+
]);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { f as usePatchReceiptMutation };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { deleteReceiptsIdMutation as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { invalidateAllClients as t } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
|
+
import "../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { analyticsReceiptsInvalidationKey as i, receiptsInvalidationKey as a, transactionsInvalidationKey as o } from "./index10.js";
|
|
11
|
+
import { useMutation as s } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index12.js
|
|
13
|
+
function c() {
|
|
14
|
+
let { client: c, organizationId: l } = n();
|
|
15
|
+
return s({
|
|
16
|
+
...e({
|
|
17
|
+
client: c,
|
|
18
|
+
headers: r(l)
|
|
19
|
+
}),
|
|
20
|
+
onSuccess: async () => {
|
|
21
|
+
await Promise.all([
|
|
22
|
+
t(a({
|
|
23
|
+
client: c,
|
|
24
|
+
organizationId: l
|
|
25
|
+
})),
|
|
26
|
+
t(i({
|
|
27
|
+
client: c,
|
|
28
|
+
organizationId: l
|
|
29
|
+
})),
|
|
30
|
+
t(o({
|
|
31
|
+
client: c,
|
|
32
|
+
organizationId: l
|
|
33
|
+
}))
|
|
34
|
+
]);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { c as useDeleteReceiptMutation };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { postReceiptsUploadFromFileMutation as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { invalidateAllClients as t } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
|
+
import "../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { analyticsReceiptsInvalidationKey as i, receiptsInvalidationKey as a } from "./index10.js";
|
|
11
|
+
import { useMutation as o } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index13.js
|
|
13
|
+
function s() {
|
|
14
|
+
let { client: s, organizationId: c } = n();
|
|
15
|
+
return o({
|
|
16
|
+
...e({
|
|
17
|
+
client: s,
|
|
18
|
+
headers: r(c)
|
|
19
|
+
}),
|
|
20
|
+
onSuccess: async () => {
|
|
21
|
+
await Promise.all([t(a({
|
|
22
|
+
client: s,
|
|
23
|
+
organizationId: c
|
|
24
|
+
})), t(i({
|
|
25
|
+
client: s,
|
|
26
|
+
organizationId: c
|
|
27
|
+
}))]);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { s as useUploadReceiptMutation };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { getReceipts as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { invalidateAllClients as t } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
|
+
import "../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { analyticsReceiptsInvalidationKey as i, analyticsTransactionsInvalidationKey as a, receiptsIdInvalidationKey as o, receiptsInvalidationKey as s, transactionsIdInvalidationKey as c, transactionsInvalidationKey as l } from "./index10.js";
|
|
11
|
+
import { useCallback as u, useEffect as d, useRef as f } from "react";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index14.js
|
|
13
|
+
var p = 3e3, m = 30, h = 10;
|
|
14
|
+
function g(e) {
|
|
15
|
+
return e.transaction_id ? "matched" : e.ocr_status === "processing" ? null : e.ocr_status === "error" ? "unreadable" : "unmatched";
|
|
16
|
+
}
|
|
17
|
+
function _(e, t) {
|
|
18
|
+
return new Promise((n, r) => {
|
|
19
|
+
if (t.aborted) {
|
|
20
|
+
r(new DOMException("Aborted", "AbortError"));
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
let i = () => {
|
|
24
|
+
clearTimeout(a), r(new DOMException("Aborted", "AbortError"));
|
|
25
|
+
}, a = setTimeout(() => {
|
|
26
|
+
t.removeEventListener("abort", i), n();
|
|
27
|
+
}, e);
|
|
28
|
+
t.addEventListener("abort", i, { once: !0 });
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function v({ intervalMs: v = p, maxAttempts: y = m } = {}) {
|
|
32
|
+
let { client: b, organizationId: x } = n(), S = f(null);
|
|
33
|
+
d(() => {
|
|
34
|
+
let e = new AbortController();
|
|
35
|
+
return S.current = e, () => e.abort();
|
|
36
|
+
}, []);
|
|
37
|
+
let C = u(() => Promise.all([
|
|
38
|
+
t(s({
|
|
39
|
+
client: b,
|
|
40
|
+
organizationId: x
|
|
41
|
+
})),
|
|
42
|
+
t(l({
|
|
43
|
+
client: b,
|
|
44
|
+
organizationId: x
|
|
45
|
+
})),
|
|
46
|
+
t(i({
|
|
47
|
+
client: b,
|
|
48
|
+
organizationId: x
|
|
49
|
+
})),
|
|
50
|
+
t(a({
|
|
51
|
+
client: b,
|
|
52
|
+
organizationId: x
|
|
53
|
+
}))
|
|
54
|
+
]), [b, x]);
|
|
55
|
+
return { trackBatch: u(async (n) => {
|
|
56
|
+
let i = {
|
|
57
|
+
total: n.length,
|
|
58
|
+
matched: 0,
|
|
59
|
+
unmatched: 0,
|
|
60
|
+
unreadable: 0,
|
|
61
|
+
stillProcessing: 0
|
|
62
|
+
};
|
|
63
|
+
if (n.length === 0) return i;
|
|
64
|
+
let a = new Set(n), s = S.current?.signal ?? new AbortController().signal;
|
|
65
|
+
await C();
|
|
66
|
+
for (let n = 0; n < y && a.size > 0; n++) {
|
|
67
|
+
if (s.aborted) throw new DOMException("Aborted", "AbortError");
|
|
68
|
+
let { data: l } = await e({
|
|
69
|
+
client: b,
|
|
70
|
+
headers: r(x),
|
|
71
|
+
query: {
|
|
72
|
+
id__in: [...a],
|
|
73
|
+
limit: h
|
|
74
|
+
},
|
|
75
|
+
signal: s,
|
|
76
|
+
throwOnError: !0
|
|
77
|
+
}), u = [], d = [];
|
|
78
|
+
for (let e of l?.data ?? []) {
|
|
79
|
+
if (!a.has(e.id)) continue;
|
|
80
|
+
let t = g(e);
|
|
81
|
+
t && (a.delete(e.id), i[t] += 1, u.push(e.id), t === "matched" && e.transaction_id && d.push(e.transaction_id));
|
|
82
|
+
}
|
|
83
|
+
u.length > 0 && await Promise.all([
|
|
84
|
+
C(),
|
|
85
|
+
...u.map((e) => t(o({
|
|
86
|
+
client: b,
|
|
87
|
+
organizationId: x,
|
|
88
|
+
receiptId: e
|
|
89
|
+
}))),
|
|
90
|
+
...d.map((e) => t(c({
|
|
91
|
+
client: b,
|
|
92
|
+
organizationId: x,
|
|
93
|
+
transactionId: e
|
|
94
|
+
})))
|
|
95
|
+
]), a.size > 0 && n < y - 1 && await _(v, s);
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
...i,
|
|
99
|
+
stillProcessing: a.size
|
|
100
|
+
};
|
|
101
|
+
}, [
|
|
102
|
+
b,
|
|
103
|
+
v,
|
|
104
|
+
y,
|
|
105
|
+
x,
|
|
106
|
+
C
|
|
107
|
+
]) };
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
export { g as classifyReceipt, v as useTrackReceiptMatching };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { getAnalyticsTransactionsOptions as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import "../../../shared/data-access/dist/index.js";
|
|
9
|
+
import { useQuery as r } from "@tanstack/react-query";
|
|
10
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index15.js
|
|
11
|
+
function i({ enabled: i, ...a } = {}) {
|
|
12
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationPending: u } = n(), d = !!(s && c) && (i === !0 || i === void 0), f = e({
|
|
13
|
+
query: {
|
|
14
|
+
...a,
|
|
15
|
+
metric: "id",
|
|
16
|
+
aggregation_function: "count"
|
|
17
|
+
},
|
|
18
|
+
client: o,
|
|
19
|
+
headers: { "x-organization-id": s ?? "" }
|
|
20
|
+
}), p = r({
|
|
21
|
+
...t(f, {
|
|
22
|
+
authEpoch: l,
|
|
23
|
+
organizationPending: u
|
|
24
|
+
}),
|
|
25
|
+
enabled: d
|
|
26
|
+
}), m = p.data?.data?.[0]?.metric_value;
|
|
27
|
+
return {
|
|
28
|
+
...p,
|
|
29
|
+
count: m
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { i as useExpenseTransactionsCountQuery };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useGetTransactionsQuery as e } from "./index3.js";
|
|
6
|
+
import { useMemo as t } from "react";
|
|
7
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index16.js
|
|
8
|
+
function n(n = {}) {
|
|
9
|
+
let r = e({
|
|
10
|
+
...n,
|
|
11
|
+
limit: 100
|
|
12
|
+
}), i = t(() => (r.data?.data ?? []).map((e) => e.id), [r.data]);
|
|
13
|
+
return {
|
|
14
|
+
...r,
|
|
15
|
+
transactionIds: i
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { n as useExpenseTransactionIdsQuery };
|