@tesouro/embedded-components-react 0.5.187 → 0.5.188
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/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 +1 -1
- 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
package/dist/index.d.ts
CHANGED
|
@@ -2922,6 +2922,227 @@ type DebitCardsWidgetProps = Omit<CardsWidgetProps, 'cardProgram'>;
|
|
|
2922
2922
|
*/
|
|
2923
2923
|
declare function DebitCardsWidget(props: DebitCardsWidgetProps): React.JSX.Element;
|
|
2924
2924
|
|
|
2925
|
+
/**
|
|
2926
|
+
* Mirrors the REST API's `ExpenseStatusEnum` (`new`, `approve_in_progress`,
|
|
2927
|
+
* `approved`, `rejected`, `canceled`). Kept as a local literal union rather
|
|
2928
|
+
* than importing the generated enum type: a `type:ui` library must not reach
|
|
2929
|
+
* into `rest/types.gen.ts`, only the caller (a feature layer) may, and then
|
|
2930
|
+
* pass the already-mapped display status down.
|
|
2931
|
+
*/
|
|
2932
|
+
type ExpenseBadgeStatus = 'new' | 'approve_in_progress' | 'approved' | 'rejected' | 'canceled';
|
|
2933
|
+
|
|
2934
|
+
type ExpenseStatusBadgeLabels = Record<ExpenseBadgeStatus, string> & {
|
|
2935
|
+
unknown: string;
|
|
2936
|
+
readyToSubmit: string;
|
|
2937
|
+
missingInfo: string;
|
|
2938
|
+
};
|
|
2939
|
+
|
|
2940
|
+
interface ExpensesHeaderLabels {
|
|
2941
|
+
bankingTaglinePrefix: string;
|
|
2942
|
+
settingsButtonAriaLabel: string;
|
|
2943
|
+
}
|
|
2944
|
+
|
|
2945
|
+
interface ActionItemsListLabels {
|
|
2946
|
+
heading: string;
|
|
2947
|
+
reviewButton: string;
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
interface ExpensesTransactionsTableLabels {
|
|
2951
|
+
dateColumn: string;
|
|
2952
|
+
statusColumn: string;
|
|
2953
|
+
merchantColumn: string;
|
|
2954
|
+
cardholderColumn: string;
|
|
2955
|
+
cardColumn: string;
|
|
2956
|
+
departmentColumn: string;
|
|
2957
|
+
receiptColumn: string;
|
|
2958
|
+
amountColumn: string;
|
|
2959
|
+
receiptPresentAriaLabel: string;
|
|
2960
|
+
receiptMissingAriaLabel: string;
|
|
2961
|
+
addReceiptAriaLabel: string;
|
|
2962
|
+
addingReceiptAriaLabel: string;
|
|
2963
|
+
/** Accessible name of a clickable row, e.g. "Review expense — Acme, $42.00". */
|
|
2964
|
+
rowAriaLabel: (merchantLabel: string, amountLabel: string) => string;
|
|
2965
|
+
}
|
|
2966
|
+
|
|
2967
|
+
interface ExpensesTransactionsFilterBarLabels {
|
|
2968
|
+
searchPlaceholder: string;
|
|
2969
|
+
searchAriaLabel: string;
|
|
2970
|
+
filtersButtonAriaLabel: string;
|
|
2971
|
+
clearAll: string;
|
|
2972
|
+
dateRangeFieldLabel: string;
|
|
2973
|
+
cardOnlyOn: string;
|
|
2974
|
+
fieldDate: string;
|
|
2975
|
+
fieldPaymentStatus: string;
|
|
2976
|
+
fieldApprovalStatus: string;
|
|
2977
|
+
fieldType: string;
|
|
2978
|
+
fieldTeamMember: string;
|
|
2979
|
+
fieldAmount: string;
|
|
2980
|
+
fieldCardOnly: string;
|
|
2981
|
+
}
|
|
2982
|
+
|
|
2983
|
+
interface Labels$2 {
|
|
2984
|
+
myTransactionsTab: string;
|
|
2985
|
+
teamTransactionsTab: string;
|
|
2986
|
+
policiesTab: string;
|
|
2987
|
+
requirementsTab: string;
|
|
2988
|
+
matchingTab: string;
|
|
2989
|
+
tabCountAriaSuffix: string;
|
|
2990
|
+
}
|
|
2991
|
+
|
|
2992
|
+
interface FileViewerLabels {
|
|
2993
|
+
filePreview: string;
|
|
2994
|
+
zoomIn: string;
|
|
2995
|
+
zoomOut: string;
|
|
2996
|
+
moreActions: string;
|
|
2997
|
+
downloadAttachment: string;
|
|
2998
|
+
deleteAttachment: string;
|
|
2999
|
+
}
|
|
3000
|
+
|
|
3001
|
+
interface AccordionItemCardLabels {
|
|
3002
|
+
spentFrom: string;
|
|
3003
|
+
cardholder: string;
|
|
3004
|
+
physical: string;
|
|
3005
|
+
receipt: string;
|
|
3006
|
+
memo: string;
|
|
3007
|
+
requiredMarker: string;
|
|
3008
|
+
missingInfoWarning: string;
|
|
3009
|
+
noReceiptWarningTitle: string;
|
|
3010
|
+
noReceiptWarningDescription: string;
|
|
3011
|
+
receiptAutoMatchedBadge: string;
|
|
3012
|
+
receiptMenuAriaLabel: string;
|
|
3013
|
+
uploadDropdownUploadOption: string;
|
|
3014
|
+
uploadDropdownFindReceiptOption: string;
|
|
3015
|
+
uploadDropdownSubmitWithoutOption: string;
|
|
3016
|
+
uploadedReceiptDownloadOption: string;
|
|
3017
|
+
uploadedReceiptDeleteOption: string;
|
|
3018
|
+
saveButton: string;
|
|
3019
|
+
cancelButton: string;
|
|
3020
|
+
emptyRejectionReason: string;
|
|
3021
|
+
rule: string;
|
|
3022
|
+
greaterThan: string;
|
|
3023
|
+
lessThan: string;
|
|
3024
|
+
systemDefaultApplied: string;
|
|
3025
|
+
status: string;
|
|
3026
|
+
autoApproval: string;
|
|
3027
|
+
approved: string;
|
|
3028
|
+
approvedBy: (approverName: string) => string;
|
|
3029
|
+
rejected: string;
|
|
3030
|
+
rejectedBy: (approverName: string) => string;
|
|
3031
|
+
awaitingReview: string;
|
|
3032
|
+
glCategory: string;
|
|
3033
|
+
department: string;
|
|
3034
|
+
location: string;
|
|
3035
|
+
}
|
|
3036
|
+
|
|
3037
|
+
interface TransactionDetailsActionsLabels {
|
|
3038
|
+
returnToExpenses: string;
|
|
3039
|
+
cancel: string;
|
|
3040
|
+
reject: string;
|
|
3041
|
+
approve: string;
|
|
3042
|
+
approveReviewNext: string;
|
|
3043
|
+
confirmRejection: string;
|
|
3044
|
+
confirmRejectionReviewNext: string;
|
|
3045
|
+
submitForApproval: string;
|
|
3046
|
+
submitForApprovalReviewNext: string;
|
|
3047
|
+
rejectionReasonLabel: string;
|
|
3048
|
+
noReceiptReasonLabel: string;
|
|
3049
|
+
requiredMarker: string;
|
|
3050
|
+
/** e.g. "Review 2/7" above the bulk progress bar. */
|
|
3051
|
+
bulkProgress: (currentItem: number, totalItems: number) => string;
|
|
3052
|
+
bulkProgressAriaLabel: string;
|
|
3053
|
+
actionFailed: string;
|
|
3054
|
+
}
|
|
3055
|
+
|
|
3056
|
+
interface TransactionDetailsLabels {
|
|
3057
|
+
screenReaderTitle: string;
|
|
3058
|
+
screenReaderDescription: string;
|
|
3059
|
+
contentTitle: string;
|
|
3060
|
+
closeDialog: string;
|
|
3061
|
+
requirementsCardTitle: string;
|
|
3062
|
+
approvalsCardTitle: string;
|
|
3063
|
+
accountingCardTitle: string;
|
|
3064
|
+
auditHistoryCardTitle: string;
|
|
3065
|
+
/** e.g. "$87.40 at Acme Coffee" — the dialog's one-line summary. */
|
|
3066
|
+
amountAtMerchant: (amount: string, merchant: string) => string;
|
|
3067
|
+
noReceiptAttached: string;
|
|
3068
|
+
dropFilesHere: string;
|
|
3069
|
+
clickToBrowse: string;
|
|
3070
|
+
acceptedFileTypes: string;
|
|
3071
|
+
uploadingReceipt: string;
|
|
3072
|
+
uploadingReceiptBody: string;
|
|
3073
|
+
loadFailed: string;
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
/**
|
|
3077
|
+
* Aggregate outcome of a receipt batch after the backend finishes OCR and
|
|
3078
|
+
* auto-matching. `stillProcessing` counts receipts that never reached a terminal
|
|
3079
|
+
* state inside the host's budget, which is a neutral state, not a failure.
|
|
3080
|
+
*/
|
|
3081
|
+
interface ReceiptMatchSummary {
|
|
3082
|
+
total: number;
|
|
3083
|
+
matched: number;
|
|
3084
|
+
unmatched: number;
|
|
3085
|
+
unreadable: number;
|
|
3086
|
+
stillProcessing: number;
|
|
3087
|
+
}
|
|
3088
|
+
interface UploadReceiptWidgetProps {
|
|
3089
|
+
emailAddress?: string;
|
|
3090
|
+
onFileUpload?: (file: File) => unknown | Promise<unknown>;
|
|
3091
|
+
/**
|
|
3092
|
+
* Awaited after every file in the batch has uploaded. Resolve once the backend
|
|
3093
|
+
* has finished OCR and auto-matching so the widget can report the outcome in
|
|
3094
|
+
* its batch toast. Omit it and the widget stops at "Uploaded N attachments".
|
|
3095
|
+
*/
|
|
3096
|
+
onAwaitMatching?: (uploadedCount: number) => Promise<ReceiptMatchSummary>;
|
|
3097
|
+
isUploading?: boolean;
|
|
3098
|
+
}
|
|
3099
|
+
declare function UploadReceiptWidget({ emailAddress, onFileUpload, onAwaitMatching, isUploading, }: UploadReceiptWidgetProps): React.JSX.Element;
|
|
3100
|
+
|
|
3101
|
+
interface ExpenseManagementWidgetOwnProps {
|
|
3102
|
+
screenLabels?: Partial<Labels$2>;
|
|
3103
|
+
headerLabels?: Partial<ExpensesHeaderLabels>;
|
|
3104
|
+
transactionsTableLabels?: Partial<ExpensesTransactionsTableLabels>;
|
|
3105
|
+
filterBarLabels?: Partial<ExpensesTransactionsFilterBarLabels>;
|
|
3106
|
+
actionItemsLabels?: Partial<ActionItemsListLabels>;
|
|
3107
|
+
statusBadgeLabels?: Partial<ExpenseStatusBadgeLabels>;
|
|
3108
|
+
/** Copy for the full-screen review dialog opened from a row or an Action Item. */
|
|
3109
|
+
transactionDetailsLabels?: Partial<TransactionDetailsLabels>;
|
|
3110
|
+
transactionDetailsCardLabels?: Partial<AccordionItemCardLabels>;
|
|
3111
|
+
transactionDetailsActionsLabels?: Partial<TransactionDetailsActionsLabels>;
|
|
3112
|
+
fileViewerLabels?: Partial<FileViewerLabels>;
|
|
3113
|
+
/** Renders the "Upload receipts" entry point in the header's actions slot. */
|
|
3114
|
+
receiptUpload?: UploadReceiptWidgetProps;
|
|
3115
|
+
/**
|
|
3116
|
+
* Bank attribution header (name/logo/tagline) plus an optional settings
|
|
3117
|
+
* entry point. The widget cannot fetch its own bank branding or navigate
|
|
3118
|
+
* (host routing ban), so the host supplies both.
|
|
3119
|
+
*/
|
|
3120
|
+
bankDisplayName?: string;
|
|
3121
|
+
bankLogoSrc?: string;
|
|
3122
|
+
bankLogoAlt?: string;
|
|
3123
|
+
isBankingTaglineVisible?: boolean;
|
|
3124
|
+
onSettingsClick?: () => void;
|
|
3125
|
+
}
|
|
3126
|
+
type ExpenseManagementWidgetProps = WidgetProviderProps & ExpenseManagementWidgetOwnProps;
|
|
3127
|
+
/**
|
|
3128
|
+
* Rebuilt for parity with the legacy `libs/embedded-banking/shared/expense-management`
|
|
3129
|
+
* widget: bank attribution header, My/Team transactions tabs with count
|
|
3130
|
+
* badges, Action Items, a searchable/filterable/paginated transactions table
|
|
3131
|
+
* with status pills and per-row receipt markers, the full-screen review dialog
|
|
3132
|
+
* (from a row or an Action Item's "Review"), the receipt-match sidebar (from
|
|
3133
|
+
* the unmatched-receipts Action Item), and an Upload Receipts entry
|
|
3134
|
+
* point — composed from `ExpensesScreen` rather than a monolithic UI
|
|
3135
|
+
* component, following the `WidgetProvider` "Feature Component Pattern" the
|
|
3136
|
+
* same way `CustomersWidgetNative` does. Uses no Monite provider.
|
|
3137
|
+
*
|
|
3138
|
+
* One legacy behavior is deliberately not replicated: team-tab visibility is
|
|
3139
|
+
* driven by `ExpenseReadOrg` alone rather than also probing for direct reports
|
|
3140
|
+
* (`hasDirectReports` in the legacy widget) — the probe existed only to widen
|
|
3141
|
+
* tab visibility for people-managers without org-wide read, a narrower cohort
|
|
3142
|
+
* this rebuild does not yet cover.
|
|
3143
|
+
*/
|
|
3144
|
+
declare function ExpenseManagementWidget({ screenLabels, headerLabels, transactionsTableLabels, filterBarLabels, actionItemsLabels, statusBadgeLabels, transactionDetailsLabels, transactionDetailsCardLabels, transactionDetailsActionsLabels, fileViewerLabels, receiptUpload, bankDisplayName, bankLogoSrc, bankLogoAlt, isBankingTaglineVisible, onSettingsClick, ...widgetProviderProps }: ExpenseManagementWidgetProps): React.JSX.Element;
|
|
3145
|
+
|
|
2925
3146
|
interface InsightsWidgetLabels {
|
|
2926
3147
|
widgetTitle: string;
|
|
2927
3148
|
activeTab: string;
|
|
@@ -3013,7 +3234,7 @@ interface InsightsWidgetProps extends WidgetProviderProps, InsightsWidgetPassthr
|
|
|
3013
3234
|
}
|
|
3014
3235
|
declare function InsightsWidget({ labels, singleInsightLabels, featureLabels, routingEnabled, onRoutingToggleChange, onLinkExternalAccountClick, ...widgetProviderProps }: InsightsWidgetProps): React.JSX.Element;
|
|
3015
3236
|
|
|
3016
|
-
interface Labels$
|
|
3237
|
+
interface Labels$1 {
|
|
3017
3238
|
title: string;
|
|
3018
3239
|
connectButton: string;
|
|
3019
3240
|
verifyCtaButton: string;
|
|
@@ -3090,12 +3311,12 @@ interface FeatureLabels$2 {
|
|
|
3090
3311
|
}
|
|
3091
3312
|
|
|
3092
3313
|
interface LinkedAccountsWidgetProps extends WidgetProviderProps {
|
|
3093
|
-
labels?: Partial<Labels$
|
|
3314
|
+
labels?: Partial<Labels$1>;
|
|
3094
3315
|
featureLabels?: Partial<FeatureLabels$2>;
|
|
3095
3316
|
}
|
|
3096
3317
|
declare function LinkedAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: LinkedAccountsWidgetProps): React.JSX.Element;
|
|
3097
3318
|
|
|
3098
|
-
interface Labels
|
|
3319
|
+
interface Labels {
|
|
3099
3320
|
description?: string;
|
|
3100
3321
|
}
|
|
3101
3322
|
|
|
@@ -3211,7 +3432,7 @@ interface SettingsWidgetAdditionalSection extends SettingsWidgetSection {
|
|
|
3211
3432
|
}
|
|
3212
3433
|
|
|
3213
3434
|
interface SettingsWidgetProps extends MoniteRegionProviderProps {
|
|
3214
|
-
labels?: Partial<Labels
|
|
3435
|
+
labels?: Partial<Labels>;
|
|
3215
3436
|
featureLabels?: Partial<FeatureLabels$1>;
|
|
3216
3437
|
/** Forwarded to the embedded Team section's {@link TeamWidget} — the
|
|
3217
3438
|
* allowlisted URL invite emails link to. Defaults to
|
|
@@ -3517,6 +3738,7 @@ type WidgetSuiteDebitCardsLabels = WidgetLabelProps<DebitCardsWidgetProps>;
|
|
|
3517
3738
|
type WidgetSuiteTransfersLabels = WidgetLabelProps<TransfersWidgetProps>;
|
|
3518
3739
|
type WidgetSuiteLinkedAccountsLabels = WidgetLabelProps<LinkedAccountsWidgetProps>;
|
|
3519
3740
|
type WidgetSuiteSettingsLabels = WidgetLabelProps<SettingsWidgetProps>;
|
|
3741
|
+
type WidgetSuiteExpensesLabels = WidgetLabelProps<ExpenseManagementWidgetProps>;
|
|
3520
3742
|
/** The two widgets the Dashboard section pairs, each taking its own copy. */
|
|
3521
3743
|
interface WidgetSuiteDashboardLabels {
|
|
3522
3744
|
balances?: WidgetSuiteBalancesLabels;
|
|
@@ -3537,10 +3759,6 @@ interface WidgetSuiteCardsLabels {
|
|
|
3537
3759
|
creditCards?: WidgetSuiteCreditCardsLabels;
|
|
3538
3760
|
debitCards?: WidgetSuiteDebitCardsLabels;
|
|
3539
3761
|
}
|
|
3540
|
-
/** Expenses is only a placeholder until the suite wires a read/self surface. */
|
|
3541
|
-
interface WidgetSuiteExpensesLabels {
|
|
3542
|
-
expensesUnavailable: string;
|
|
3543
|
-
}
|
|
3544
3762
|
/**
|
|
3545
3763
|
* Copy the suite puts *inside* a section's panel, one group per section.
|
|
3546
3764
|
*
|
|
@@ -3558,7 +3776,7 @@ interface WidgetSuiteSectionContentLabels {
|
|
|
3558
3776
|
cards: WidgetSuiteCardsLabels;
|
|
3559
3777
|
transfers?: WidgetSuiteTransfersLabels;
|
|
3560
3778
|
linkedAccounts?: WidgetSuiteLinkedAccountsLabels;
|
|
3561
|
-
expenses
|
|
3779
|
+
expenses?: WidgetSuiteExpensesLabels;
|
|
3562
3780
|
settings?: WidgetSuiteSettingsLabels;
|
|
3563
3781
|
}
|
|
3564
3782
|
/**
|
|
@@ -3566,9 +3784,8 @@ interface WidgetSuiteSectionContentLabels {
|
|
|
3566
3784
|
* it mounts. Two kinds of group, differing in who holds the default:
|
|
3567
3785
|
*
|
|
3568
3786
|
* - **Suite-owned** — `shell`, `menu`, `sectionTitle`, `disclosure`,
|
|
3569
|
-
* `onboardingGate`,
|
|
3570
|
-
*
|
|
3571
|
-
* over it.
|
|
3787
|
+
* `onboardingGate`, and the two card-list titles. Defaulted in
|
|
3788
|
+
* {@link WIDGET_SUITE_LABELS_EN}, with an override merged over it.
|
|
3572
3789
|
* - **Forwarded** — `onboarding`, and every other key under `sections`.
|
|
3573
3790
|
* Handed down untouched for the widget to merge over its own defaults, so
|
|
3574
3791
|
* the suite carries no copy of a widget's strings and cannot go stale
|
|
@@ -3596,14 +3813,13 @@ interface WidgetSuiteLabels {
|
|
|
3596
3813
|
* each group under them is already the exact override its widget accepts,
|
|
3597
3814
|
* so deepening it again would admit a shape the suite cannot forward and
|
|
3598
3815
|
* would flatten a non-plain member (`PartialDeep` maps a function-valued
|
|
3599
|
-
* label to `{}`). The
|
|
3600
|
-
*
|
|
3816
|
+
* label to `{}`). The suite-owned `cards` group is made partial one level
|
|
3817
|
+
* for the same reason.
|
|
3601
3818
|
*/
|
|
3602
3819
|
type WidgetSuiteLabelOverrides = PartialDeep<Omit<WidgetSuiteLabels, 'sections' | 'onboarding'>> & {
|
|
3603
3820
|
onboarding?: WidgetSuiteOnboardingLabels;
|
|
3604
|
-
sections?: Partial<Omit<WidgetSuiteSectionContentLabels, 'cards'
|
|
3821
|
+
sections?: Partial<Omit<WidgetSuiteSectionContentLabels, 'cards'>> & {
|
|
3605
3822
|
cards?: Partial<WidgetSuiteCardsLabels>;
|
|
3606
|
-
expenses?: Partial<WidgetSuiteExpensesLabels>;
|
|
3607
3823
|
};
|
|
3608
3824
|
};
|
|
3609
3825
|
declare const WIDGET_SUITE_LABELS_EN: WidgetSuiteLabels;
|
|
@@ -4515,49 +4731,6 @@ type CustomersWidgetProps = WidgetProviderProps & CustomersWidgetOwnProps;
|
|
|
4515
4731
|
*/
|
|
4516
4732
|
declare function CustomersWidget({ implementation, onViewAllDocuments, onCreateDocument, ...rest }: CustomersWidgetProps): React.JSX.Element;
|
|
4517
4733
|
|
|
4518
|
-
interface Labels {
|
|
4519
|
-
description: string;
|
|
4520
|
-
receiptsTab: string;
|
|
4521
|
-
matchingTab: string;
|
|
4522
|
-
policiesTab: string;
|
|
4523
|
-
requirementsTab: string;
|
|
4524
|
-
}
|
|
4525
|
-
|
|
4526
|
-
/**
|
|
4527
|
-
* Aggregate outcome of a receipt batch after the backend finishes OCR and
|
|
4528
|
-
* auto-matching. `stillProcessing` counts receipts that never reached a terminal
|
|
4529
|
-
* state inside the host's budget, which is a neutral state, not a failure.
|
|
4530
|
-
*/
|
|
4531
|
-
interface ReceiptMatchSummary {
|
|
4532
|
-
total: number;
|
|
4533
|
-
matched: number;
|
|
4534
|
-
unmatched: number;
|
|
4535
|
-
unreadable: number;
|
|
4536
|
-
stillProcessing: number;
|
|
4537
|
-
}
|
|
4538
|
-
interface UploadReceiptWidgetProps {
|
|
4539
|
-
emailAddress?: string;
|
|
4540
|
-
onFileUpload?: (file: File) => unknown | Promise<unknown>;
|
|
4541
|
-
/**
|
|
4542
|
-
* Awaited after every file in the batch has uploaded. Resolve once the backend
|
|
4543
|
-
* has finished OCR and auto-matching so the widget can report the outcome in
|
|
4544
|
-
* its batch toast. Omit it and the widget stops at "Uploaded N attachments".
|
|
4545
|
-
*/
|
|
4546
|
-
onAwaitMatching?: (uploadedCount: number) => Promise<ReceiptMatchSummary>;
|
|
4547
|
-
isUploading?: boolean;
|
|
4548
|
-
}
|
|
4549
|
-
declare function UploadReceiptWidget({ emailAddress, onFileUpload, onAwaitMatching, isUploading, }: UploadReceiptWidgetProps): React.JSX.Element;
|
|
4550
|
-
|
|
4551
|
-
interface ExpenseManagementWidgetProps extends WidgetProviderProps {
|
|
4552
|
-
labels?: Partial<Labels>;
|
|
4553
|
-
receiptUpload?: UploadReceiptWidgetProps;
|
|
4554
|
-
receiptsContent?: ReactNode;
|
|
4555
|
-
matchingContent?: ReactNode;
|
|
4556
|
-
policiesContent?: ReactNode;
|
|
4557
|
-
requirementsContent?: ReactNode;
|
|
4558
|
-
}
|
|
4559
|
-
declare function ExpenseManagementWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: ExpenseManagementWidgetProps): React.JSX.Element;
|
|
4560
|
-
|
|
4561
4734
|
type ReceivablesWidgetMoniteProps = MoniteRegionProviderProps & Omit<ReceivablesProps, 'pageTitleComponent' | 'initialView' | 'initialCounterpartId'> & {
|
|
4562
4735
|
pageTitleComponent?: ReceivablesProps['pageTitleComponent'];
|
|
4563
4736
|
};
|
|
@@ -5190,4 +5363,4 @@ interface CheckAmountAndDetailScreenProps {
|
|
|
5190
5363
|
type PendingFeatureStyleSources = CheckAmountAndDetailScreenProps | GapCoverageAlertProps | NoPolicyBannerProps;
|
|
5191
5364
|
|
|
5192
5365
|
export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, AcceptDisclosuresWidget, BALANCES_WIDGET_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BillPayWidget, CardDetailsWidget, CounterpartsWidget, CreditCardsWidget, CustomersWidget, DebitCardsWidget, ERROR_STATE_ID, ExpenseManagementWidget, HELP_FAQ_EN, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, Implementation, InsightsWidget, ReceivablesWidgetMonite as InvoicingWidget, LinkedAccountsWidget, MARKETING_WIDGET_LABELS_EN, MarketingBenefitIcon, MarketingWidget, PERSONAL_DETAILS_LABELS_EN, ProductsWidget, RESULT_LABELS_EN, ReceivablesWidget, RefreshingRootWidgetProvider, RootWidgetProvider, SINGLE_INSIGHT_LABELS_EN, Scope, SettingsSection, SettingsWidget, DEFAULT_FEATURE_LABELS as TRANSFERS_FEATURE_LABELS_EN, TRANSFERS_WIDGET_LABELS_EN, TransfersWidget, UIFramework, UploadReceiptWidget, WIDGET_SUITE_DEFAULT_SECTIONS, WIDGET_SUITE_LABELS_EN, WidgetProvider, WidgetSuite, WidgetSuiteSectionId, WidgetTokenRefreshProvider, cloneEmbeddedClient, getGlobalWidgetConfig, getGlobalWidgetInitState, isScope, registerDesignSystemEnsurer, registerUIRenderers, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetInitStaleForToken, useWidgetLoading, useWidgetToken };
|
|
5193
|
-
export type { AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, Labels$3 as AccountDetailsWidgetLabels, ActivateCardPanelLabels, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$3 as BankAccountsWidgetFeatureLabels, Labels$4 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels, CardsListLabels as CardsLabels, CardsPagination, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartActionTarget, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreditCardsWidgetProps, CustomersWidgetOwnProps, CustomersWidgetProps, DebitCardsWidgetProps, DisclosureLinks, EmbeddedClient, Labels as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, ReceivablesWidgetMoniteProps as InvoicingWidgetProps, LinkComponent, LinkComponentProps, FeatureLabels$2 as LinkedAccountsWidgetFeatureLabels, Labels$
|
|
5366
|
+
export type { AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccordionItemCardLabels, Labels$3 as AccountDetailsWidgetLabels, ActivateCardPanelLabels, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$3 as BankAccountsWidgetFeatureLabels, Labels$4 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels, CardsListLabels as CardsLabels, CardsPagination, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartActionTarget, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreditCardsWidgetProps, CustomersWidgetOwnProps, CustomersWidgetProps, DebitCardsWidgetProps, DisclosureLinks, EmbeddedClient, Labels$2 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, FileViewerLabels, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, ReceivablesWidgetMoniteProps as InvoicingWidgetProps, LinkComponent, LinkComponentProps, FeatureLabels$2 as LinkedAccountsWidgetFeatureLabels, Labels$1 as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps, MarketingWidgetAppearance, MarketingWidgetBenefit, MarketingWidgetContent, MarketingWidgetHowItWorksStep, MarketingWidgetImage, MarketingWidgetLabels, MarketingWidgetProps, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, PendingFeatureStyleSources, PersonalDetailsLabels, PersonalDetailsValues, ProductDeleteDialogLabels, ProductDetailsSheetLabels, ProductFormSheetLabels, ProductMessageLabels, ProductsScreenLabels, ProductsWidgetProps, ReceiptMatchSummary, ReceivableActionDialogLabels, ReceivableDetailsSheetLabelOverrides, ReceivableDetailsSheetLabels, ReceivableDocumentType, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivableSendDialogLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, ReceivablesWidgetTab, RefreshingRootWidgetProviderProps, ResultLabels, RootWidgetProviderProps, SettingsWidgetAdditionalSection, FeatureLabels$1 as SettingsWidgetFeatureLabels, Labels as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId, SingleInsightLabels, TransactionDetailsActionsLabels, TransactionDetailsLabels, FeatureLabels as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps, UploadReceiptWidgetProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderLabels, WidgetProviderProps, WidgetSuiteCardsLabels, WidgetSuiteDashboardLabels, WidgetSuiteDisclosureLabels, WidgetSuiteExpensesLabels, WidgetSuiteLabelOverrides, WidgetSuiteLabels, WidgetSuiteMenuLabels, WidgetSuiteOnboardingGateLabels, WidgetSuiteOnboardingLabels, WidgetSuiteProps, WidgetSuiteSectionContentLabels, WidgetSuiteSectionTitleLabels, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };
|
package/dist/index.js
CHANGED
|
@@ -24,11 +24,11 @@ import { INSIGHTS_FEATURE_LABELS_EN as P } from "./libs/tesouro-embedded-compone
|
|
|
24
24
|
import { INSIGHTS_WIDGET_LABELS_EN as F } from "./libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/labels.js";
|
|
25
25
|
import { SINGLE_INSIGHT_LABELS_EN as I } from "./libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/labels.js";
|
|
26
26
|
import { InsightsWidget as L } from "./libs/tesouro-embedded-components-react/insights-widget/feature/dist/index12.js";
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
27
|
+
import { UploadReceiptWidget as R } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index2.js";
|
|
28
|
+
import { ExpenseManagementWidget as z } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index21.js";
|
|
29
|
+
import { InvoicingWidget as B } from "./libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js";
|
|
30
|
+
import { ReceivablesWidget as V } from "./libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js";
|
|
31
|
+
import { SettingsSection as H } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/index4.js";
|
|
32
32
|
import { HELP_FAQ_EN as U } from "./libs/tesouro-embedded-components-react/settings-widget/help/ui/contract/dist/index3.js";
|
|
33
33
|
import { SettingsWidget as W } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js";
|
|
34
34
|
import { LinkedAccountsWidget as G } from "./libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index10.js";
|
|
@@ -73,4 +73,4 @@ import "./lib/TransfersWidget.js";
|
|
|
73
73
|
import { WidgetProvider as le } from "./lib/WidgetProviderPublic.js";
|
|
74
74
|
import "./lib/WidgetProvider.js";
|
|
75
75
|
import "./packages/tesouro-embedded-components-react/src/scopes.js";
|
|
76
|
-
export { Y as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, Z as ADDITIONAL_OWNERS_LABELS_EN, X as AcceptDisclosuresWidget, M as BALANCES_WIDGET_LABELS_EN, Q as BUSINESS_DETAILS_LABELS_EN, N as BalancesWidget, te as BankAccountOnboardingWidget, D as BankAccountsWidget, O as BillPayWidget, k as CardDetailsWidget, re as CounterpartsWidget, A as CreditCardsWidget, ie as CustomersWidget, j as DebitCardsWidget, l as ERROR_STATE_ID,
|
|
76
|
+
export { Y as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, Z as ADDITIONAL_OWNERS_LABELS_EN, X as AcceptDisclosuresWidget, M as BALANCES_WIDGET_LABELS_EN, Q as BUSINESS_DETAILS_LABELS_EN, N as BalancesWidget, te as BankAccountOnboardingWidget, D as BankAccountsWidget, O as BillPayWidget, k as CardDetailsWidget, re as CounterpartsWidget, A as CreditCardsWidget, ie as CustomersWidget, j as DebitCardsWidget, l as ERROR_STATE_ID, z as ExpenseManagementWidget, U as HELP_FAQ_EN, P as INSIGHTS_FEATURE_LABELS_EN, F as INSIGHTS_WIDGET_LABELS_EN, u as Implementation, L as InsightsWidget, B as InvoicingWidget, G as LinkedAccountsWidget, ae as MARKETING_WIDGET_LABELS_EN, oe as MarketingBenefitIcon, se as MarketingWidget, $ as PERSONAL_DETAILS_LABELS_EN, ce as ProductsWidget, ee as RESULT_LABELS_EN, V as ReceivablesWidget, y as RefreshingRootWidgetProvider, g as RootWidgetProvider, I as SINGLE_INSIGHT_LABELS_EN, i as Scope, H as SettingsSection, W as SettingsWidget, K as TRANSFERS_FEATURE_LABELS_EN, q as TRANSFERS_WIDGET_LABELS_EN, J as TransfersWidget, o as UIFramework, R as UploadReceiptWidget, t as WIDGET_SUITE_DEFAULT_SECTIONS, e as WIDGET_SUITE_LABELS_EN, le as WidgetProvider, ne as WidgetSuite, n as WidgetSuiteSectionId, _ as WidgetTokenRefreshProvider, r as cloneEmbeddedClient, d as getGlobalWidgetConfig, m as getGlobalWidgetInitState, a as isScope, s as registerDesignSystemEnsurer, c as registerUIRenderers, f as setGlobalWidgetConfig, h as subscribeToGlobalWidgetInitState, p as updateGlobalWidgetConfig, b as useDisclosuresAcceptanceSurface, x as useOwnWidgetConfig, S as useRefetchWidget, C as useWidgetConfig, w as useWidgetError, T as useWidgetInitStaleForToken, E as useWidgetLoading, v as useWidgetToken };
|
|
@@ -2,12 +2,155 @@ import * as React from 'react';
|
|
|
2
2
|
import { ComponentType, AnchorHTMLAttributes, ReactNode, ErrorInfo } from 'react';
|
|
3
3
|
import { FallbackProps } from 'react-error-boundary';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Mirrors the REST API's `ExpenseStatusEnum` (`new`, `approve_in_progress`,
|
|
7
|
+
* `approved`, `rejected`, `canceled`). Kept as a local literal union rather
|
|
8
|
+
* than importing the generated enum type: a `type:ui` library must not reach
|
|
9
|
+
* into `rest/types.gen.ts`, only the caller (a feature layer) may, and then
|
|
10
|
+
* pass the already-mapped display status down.
|
|
11
|
+
*/
|
|
12
|
+
type ExpenseBadgeStatus = 'new' | 'approve_in_progress' | 'approved' | 'rejected' | 'canceled';
|
|
13
|
+
|
|
14
|
+
type ExpenseStatusBadgeLabels = Record<ExpenseBadgeStatus, string> & {
|
|
15
|
+
unknown: string;
|
|
16
|
+
readyToSubmit: string;
|
|
17
|
+
missingInfo: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
interface ExpensesHeaderLabels {
|
|
21
|
+
bankingTaglinePrefix: string;
|
|
22
|
+
settingsButtonAriaLabel: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface ActionItemsListLabels {
|
|
26
|
+
heading: string;
|
|
27
|
+
reviewButton: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface ExpensesTransactionsTableLabels {
|
|
31
|
+
dateColumn: string;
|
|
32
|
+
statusColumn: string;
|
|
33
|
+
merchantColumn: string;
|
|
34
|
+
cardholderColumn: string;
|
|
35
|
+
cardColumn: string;
|
|
36
|
+
departmentColumn: string;
|
|
37
|
+
receiptColumn: string;
|
|
38
|
+
amountColumn: string;
|
|
39
|
+
receiptPresentAriaLabel: string;
|
|
40
|
+
receiptMissingAriaLabel: string;
|
|
41
|
+
addReceiptAriaLabel: string;
|
|
42
|
+
addingReceiptAriaLabel: string;
|
|
43
|
+
/** Accessible name of a clickable row, e.g. "Review expense — Acme, $42.00". */
|
|
44
|
+
rowAriaLabel: (merchantLabel: string, amountLabel: string) => string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface ExpensesTransactionsFilterBarLabels {
|
|
48
|
+
searchPlaceholder: string;
|
|
49
|
+
searchAriaLabel: string;
|
|
50
|
+
filtersButtonAriaLabel: string;
|
|
51
|
+
clearAll: string;
|
|
52
|
+
dateRangeFieldLabel: string;
|
|
53
|
+
cardOnlyOn: string;
|
|
54
|
+
fieldDate: string;
|
|
55
|
+
fieldPaymentStatus: string;
|
|
56
|
+
fieldApprovalStatus: string;
|
|
57
|
+
fieldType: string;
|
|
58
|
+
fieldTeamMember: string;
|
|
59
|
+
fieldAmount: string;
|
|
60
|
+
fieldCardOnly: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
5
63
|
interface Labels {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
matchingTab: string;
|
|
64
|
+
myTransactionsTab: string;
|
|
65
|
+
teamTransactionsTab: string;
|
|
9
66
|
policiesTab: string;
|
|
10
67
|
requirementsTab: string;
|
|
68
|
+
matchingTab: string;
|
|
69
|
+
tabCountAriaSuffix: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface FileViewerLabels {
|
|
73
|
+
filePreview: string;
|
|
74
|
+
zoomIn: string;
|
|
75
|
+
zoomOut: string;
|
|
76
|
+
moreActions: string;
|
|
77
|
+
downloadAttachment: string;
|
|
78
|
+
deleteAttachment: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
interface AccordionItemCardLabels {
|
|
82
|
+
spentFrom: string;
|
|
83
|
+
cardholder: string;
|
|
84
|
+
physical: string;
|
|
85
|
+
receipt: string;
|
|
86
|
+
memo: string;
|
|
87
|
+
requiredMarker: string;
|
|
88
|
+
missingInfoWarning: string;
|
|
89
|
+
noReceiptWarningTitle: string;
|
|
90
|
+
noReceiptWarningDescription: string;
|
|
91
|
+
receiptAutoMatchedBadge: string;
|
|
92
|
+
receiptMenuAriaLabel: string;
|
|
93
|
+
uploadDropdownUploadOption: string;
|
|
94
|
+
uploadDropdownFindReceiptOption: string;
|
|
95
|
+
uploadDropdownSubmitWithoutOption: string;
|
|
96
|
+
uploadedReceiptDownloadOption: string;
|
|
97
|
+
uploadedReceiptDeleteOption: string;
|
|
98
|
+
saveButton: string;
|
|
99
|
+
cancelButton: string;
|
|
100
|
+
emptyRejectionReason: string;
|
|
101
|
+
rule: string;
|
|
102
|
+
greaterThan: string;
|
|
103
|
+
lessThan: string;
|
|
104
|
+
systemDefaultApplied: string;
|
|
105
|
+
status: string;
|
|
106
|
+
autoApproval: string;
|
|
107
|
+
approved: string;
|
|
108
|
+
approvedBy: (approverName: string) => string;
|
|
109
|
+
rejected: string;
|
|
110
|
+
rejectedBy: (approverName: string) => string;
|
|
111
|
+
awaitingReview: string;
|
|
112
|
+
glCategory: string;
|
|
113
|
+
department: string;
|
|
114
|
+
location: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
interface TransactionDetailsActionsLabels {
|
|
118
|
+
returnToExpenses: string;
|
|
119
|
+
cancel: string;
|
|
120
|
+
reject: string;
|
|
121
|
+
approve: string;
|
|
122
|
+
approveReviewNext: string;
|
|
123
|
+
confirmRejection: string;
|
|
124
|
+
confirmRejectionReviewNext: string;
|
|
125
|
+
submitForApproval: string;
|
|
126
|
+
submitForApprovalReviewNext: string;
|
|
127
|
+
rejectionReasonLabel: string;
|
|
128
|
+
noReceiptReasonLabel: string;
|
|
129
|
+
requiredMarker: string;
|
|
130
|
+
/** e.g. "Review 2/7" above the bulk progress bar. */
|
|
131
|
+
bulkProgress: (currentItem: number, totalItems: number) => string;
|
|
132
|
+
bulkProgressAriaLabel: string;
|
|
133
|
+
actionFailed: string;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
interface TransactionDetailsLabels {
|
|
137
|
+
screenReaderTitle: string;
|
|
138
|
+
screenReaderDescription: string;
|
|
139
|
+
contentTitle: string;
|
|
140
|
+
closeDialog: string;
|
|
141
|
+
requirementsCardTitle: string;
|
|
142
|
+
approvalsCardTitle: string;
|
|
143
|
+
accountingCardTitle: string;
|
|
144
|
+
auditHistoryCardTitle: string;
|
|
145
|
+
/** e.g. "$87.40 at Acme Coffee" — the dialog's one-line summary. */
|
|
146
|
+
amountAtMerchant: (amount: string, merchant: string) => string;
|
|
147
|
+
noReceiptAttached: string;
|
|
148
|
+
dropFilesHere: string;
|
|
149
|
+
clickToBrowse: string;
|
|
150
|
+
acceptedFileTypes: string;
|
|
151
|
+
uploadingReceipt: string;
|
|
152
|
+
uploadingReceiptBody: string;
|
|
153
|
+
loadFailed: string;
|
|
11
154
|
}
|
|
12
155
|
|
|
13
156
|
type AuthToken = string | undefined;
|
|
@@ -659,15 +802,50 @@ interface UploadReceiptWidgetProps {
|
|
|
659
802
|
isUploading?: boolean;
|
|
660
803
|
}
|
|
661
804
|
|
|
662
|
-
interface
|
|
663
|
-
|
|
805
|
+
interface ExpenseManagementWidgetOwnProps {
|
|
806
|
+
screenLabels?: Partial<Labels>;
|
|
807
|
+
headerLabels?: Partial<ExpensesHeaderLabels>;
|
|
808
|
+
transactionsTableLabels?: Partial<ExpensesTransactionsTableLabels>;
|
|
809
|
+
filterBarLabels?: Partial<ExpensesTransactionsFilterBarLabels>;
|
|
810
|
+
actionItemsLabels?: Partial<ActionItemsListLabels>;
|
|
811
|
+
statusBadgeLabels?: Partial<ExpenseStatusBadgeLabels>;
|
|
812
|
+
/** Copy for the full-screen review dialog opened from a row or an Action Item. */
|
|
813
|
+
transactionDetailsLabels?: Partial<TransactionDetailsLabels>;
|
|
814
|
+
transactionDetailsCardLabels?: Partial<AccordionItemCardLabels>;
|
|
815
|
+
transactionDetailsActionsLabels?: Partial<TransactionDetailsActionsLabels>;
|
|
816
|
+
fileViewerLabels?: Partial<FileViewerLabels>;
|
|
817
|
+
/** Renders the "Upload receipts" entry point in the header's actions slot. */
|
|
664
818
|
receiptUpload?: UploadReceiptWidgetProps;
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
819
|
+
/**
|
|
820
|
+
* Bank attribution header (name/logo/tagline) plus an optional settings
|
|
821
|
+
* entry point. The widget cannot fetch its own bank branding or navigate
|
|
822
|
+
* (host routing ban), so the host supplies both.
|
|
823
|
+
*/
|
|
824
|
+
bankDisplayName?: string;
|
|
825
|
+
bankLogoSrc?: string;
|
|
826
|
+
bankLogoAlt?: string;
|
|
827
|
+
isBankingTaglineVisible?: boolean;
|
|
828
|
+
onSettingsClick?: () => void;
|
|
669
829
|
}
|
|
670
|
-
|
|
830
|
+
type ExpenseManagementWidgetProps = WidgetProviderProps & ExpenseManagementWidgetOwnProps;
|
|
831
|
+
/**
|
|
832
|
+
* Rebuilt for parity with the legacy `libs/embedded-banking/shared/expense-management`
|
|
833
|
+
* widget: bank attribution header, My/Team transactions tabs with count
|
|
834
|
+
* badges, Action Items, a searchable/filterable/paginated transactions table
|
|
835
|
+
* with status pills and per-row receipt markers, the full-screen review dialog
|
|
836
|
+
* (from a row or an Action Item's "Review"), the receipt-match sidebar (from
|
|
837
|
+
* the unmatched-receipts Action Item), and an Upload Receipts entry
|
|
838
|
+
* point — composed from `ExpensesScreen` rather than a monolithic UI
|
|
839
|
+
* component, following the `WidgetProvider` "Feature Component Pattern" the
|
|
840
|
+
* same way `CustomersWidgetNative` does. Uses no Monite provider.
|
|
841
|
+
*
|
|
842
|
+
* One legacy behavior is deliberately not replicated: team-tab visibility is
|
|
843
|
+
* driven by `ExpenseReadOrg` alone rather than also probing for direct reports
|
|
844
|
+
* (`hasDirectReports` in the legacy widget) — the probe existed only to widen
|
|
845
|
+
* tab visibility for people-managers without org-wide read, a narrower cohort
|
|
846
|
+
* this rebuild does not yet cover.
|
|
847
|
+
*/
|
|
848
|
+
declare function ExpenseManagementWidget({ screenLabels, headerLabels, transactionsTableLabels, filterBarLabels, actionItemsLabels, statusBadgeLabels, transactionDetailsLabels, transactionDetailsCardLabels, transactionDetailsActionsLabels, fileViewerLabels, receiptUpload, bankDisplayName, bankLogoSrc, bankLogoAlt, isBankingTaglineVisible, onSettingsClick, ...widgetProviderProps }: ExpenseManagementWidgetProps): React.JSX.Element;
|
|
671
849
|
|
|
672
850
|
export { ExpenseManagementWidget };
|
|
673
|
-
export type { Labels as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps };
|
|
851
|
+
export type { AccordionItemCardLabels, Labels as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, FileViewerLabels, TransactionDetailsActionsLabels, TransactionDetailsLabels };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ExpenseManagementWidget as e } from "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/
|
|
1
|
+
import { ExpenseManagementWidget as e } from "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index21.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js";
|
|
3
3
|
export { e as ExpenseManagementWidget };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { UploadReceiptWidget as e } from "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/
|
|
1
|
+
import { UploadReceiptWidget as e } from "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index2.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js";
|
|
3
3
|
export { e as UploadReceiptWidget };
|