@tesouro/embedded-components-react 0.11.220 → 0.11.222
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 +4 -3
- package/dist/fixtures/index.d.ts +135 -112
- package/dist/index.css +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/lib/BillPayWidget.d.ts +4 -3
- package/dist/lib/ReceivablesWidget.d.ts +2 -2
- package/dist/lib/WidgetSuite.d.ts +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +61 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +48 -37
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/lib/cardExpenseTypes.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/lib/queryKeys.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/lib/useExpenseHistoryQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/lib/useExpenseTransactionsCountQuery.js +18 -16
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/lib/useGetTransactionQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/lib/useGetTransactionsQuery.js +17 -13
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/lib/useTransactionReviewMutations.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/lib/useTransactionValidationsQuery.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/mapTransactionRow.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/useExpensesTransactions.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/useExpensesTransactionsFilter.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/mocks/expenseManagement.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/feature/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +105 -97
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +21 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +42 -35
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/mocks/settings.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +118 -118
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +174 -174
- package/dist/libs/tesouro-embedded-components-react/shared/data-access-mocks/dist/lib/fixtures.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +119 -119
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -513,7 +513,7 @@ Shows "Business Banking provided by" the business customer's bank, plus the FDIC
|
|
|
513
513
|
|
|
514
514
|
A bill pay widget with Tesouro widget auth and theming: a Bills tab for uploading, reviewing and paying bills, and a Vendors tab for the vendors they are paid to.
|
|
515
515
|
|
|
516
|
-
The right end of the tab row holds the active tab's main action: Add bill on Bills and Add vendor on Vendors. While the vendor list is empty, Add vendor shows only in its empty state.
|
|
516
|
+
The settings cog sits at the top right, on the same line as `headerStart`. The right end of the tab row holds the active tab's main action: Add bill on Bills and Add vendor on Vendors. While the vendor list is empty, Add vendor shows only in its empty state.
|
|
517
517
|
|
|
518
518
|
Above the bills list, the Total unpaid, Overdue, Scheduled and Not submitted cards act as quick filters. Clicking one switches to All bills, narrows the list to the bills that card totals, shows that as a filter chip and selects the card. Clicking it again, removing the chip or Clear all deselects it, and only one card is selected at a time. Picking another view, such as Assigned to me, also deselects it. Pass `selectedSummaryCard` and `onSummaryCardChange` to keep the card in your URL, for example to link straight to overdue bills, and `selectedBillsView` and `onBillsViewChange` to do the same for All bills and Assigned to me.
|
|
519
519
|
|
|
@@ -526,7 +526,8 @@ Above the bills list, the Total unpaid, Overdue, Scheduled and Not submitted car
|
|
|
526
526
|
| `onTabChange` | `(tab: BillPayWidgetTabId) => void` | `undefined` | Called when the active tab changes, from a tab click or a vendor's "View all" or "Add a bill" opening the Bills tab, so you can keep it in the URL. |
|
|
527
527
|
| `initialView` | `'create'` | `undefined` | Opens the Bills tab's "Add a bill" dialog once on arrival, when the user can create bills. Closing it does not reopen it. Ignored when the widget opens on Vendors. |
|
|
528
528
|
| `poweredByBankName` | `string` | `undefined` | Bank shown as "Powered by {bank}" next to the source account when paying a bill. Omit it to hide the badge. |
|
|
529
|
-
| `onSettingsClick` | `() => void` | `undefined` | Opens your bill pay settings surface from a cog
|
|
529
|
+
| `onSettingsClick` | `() => void` | `undefined` | Opens your bill pay settings surface from a cog at the top right, on the `headerStart` line. The cog renders only when this is supplied and the user's scopes reach that surface. |
|
|
530
|
+
| `headerStart` | `ReactNode` | `undefined` | Rendered above the tab row, beside the settings cog. It stays when an error or the disclosures gate replaces the tabs. The widget renders no heading of its own, so pass your page title here. |
|
|
530
531
|
| `selectedSummaryCard` | `BillSummaryCard \| null` | `undefined` | The active summary card on the Bills tab: `'total_unpaid'`, `'overdue'`, `'scheduled'` or `'not_submitted'`, or `null` for none. Applied on mount and whenever it changes. Omit to let the widget track it, starting with none. |
|
|
531
532
|
| `onSummaryCardChange` | `(card: BillSummaryCard \| null) => void` | `undefined` | Called when the reader selects or deselects a summary card, so you can keep it in the URL. |
|
|
532
533
|
| `selectedBillsView` | `BillsView` | `undefined` | The open view on the Bills tab: `'all'` (All bills) or `'assigned_to_me'`. Applied on mount and whenever it changes. A selected summary card opens All bills instead. Omit to let the widget track it, starting on All bills. |
|
|
@@ -752,7 +753,7 @@ Lists, creates, edits and acts on an organization's invoices, including sending
|
|
|
752
753
|
| `onReceivableCreated` | `(id: string, type: ReceivableDocumentType) => void` | `undefined` | Called after a create succeeds. Not called for a duplicate. |
|
|
753
754
|
| `onReceivableOpened` | `(id: string, type: ReceivableDocumentType) => void` | `undefined` | Called when the user opens a row's details panel. |
|
|
754
755
|
| `onTemplateSettingsClick` | `() => void` | `undefined` | Shows the invoice settings button at the top right, on the `headerStart` line, for users holding `organization_settings:write:org`, and calls this when it is clicked. |
|
|
755
|
-
| `headerStart` | `ReactNode` | `undefined` | Rendered above the tab row. The widget renders no heading of its own, so pass your page title here.
|
|
756
|
+
| `headerStart` | `ReactNode` | `undefined` | Rendered above the tab row. It stays when an error or the disclosures gate replaces the tabs. The widget renders no heading of its own, so pass your page title here. |
|
|
756
757
|
| `selectedTab` | `InvoicingTabId` | `undefined` | The active tab: `'invoices'`, `'recurring'`, `'customers'` or `'products'`. Omit to let the widget track it, starting on Invoices. |
|
|
757
758
|
| `onTabChange` | `(tab: InvoicingTabId) => void` | `undefined` | Called when the user picks a tab, so you can keep it in the URL. |
|
|
758
759
|
| `selectedStatusCard` | `ReceivableStatusCard \| null` | `undefined` | The active summary card on the Invoices tab: `'unpaid'`, `'overdue'`, `'paid'` (paid in the last 30 days) or `'drafts'`, or `null` for none. Applied on mount and whenever it changes. Omit to let the widget track it, starting with none. |
|
package/dist/fixtures/index.d.ts
CHANGED
|
@@ -2004,6 +2004,138 @@ type ExpenseReceiptUnlinkedEventData = {
|
|
|
2004
2004
|
*/
|
|
2005
2005
|
receipt_id: string;
|
|
2006
2006
|
};
|
|
2007
|
+
type ExpenseResponse = {
|
|
2008
|
+
/**
|
|
2009
|
+
* A unique system-generated ID assigned to this transaction.
|
|
2010
|
+
*/
|
|
2011
|
+
id: string;
|
|
2012
|
+
/**
|
|
2013
|
+
* The transaction amount in [minor units](https://docs.tesouro.com/finops/support/currencies#minor-units). Positive values for in-flow, negative values for out-flow.
|
|
2014
|
+
*/
|
|
2015
|
+
amount: number;
|
|
2016
|
+
/**
|
|
2017
|
+
* ID of the approval policy applied to this transaction, if any.
|
|
2018
|
+
*/
|
|
2019
|
+
applied_policy_id?: string | null;
|
|
2020
|
+
/**
|
|
2021
|
+
* ISO currency code.
|
|
2022
|
+
*/
|
|
2023
|
+
currency: CurrencyEnum;
|
|
2024
|
+
/**
|
|
2025
|
+
* ID of the department associated with this transaction.
|
|
2026
|
+
*/
|
|
2027
|
+
department_id?: string | null;
|
|
2028
|
+
/**
|
|
2029
|
+
* A human-readable description of the transaction.
|
|
2030
|
+
*/
|
|
2031
|
+
description?: string | null;
|
|
2032
|
+
/**
|
|
2033
|
+
* ID of the entity that owns this resource.
|
|
2034
|
+
*/
|
|
2035
|
+
entity_id: string;
|
|
2036
|
+
/**
|
|
2037
|
+
* ID of the entity user who owns the transaction. Must be an active or invited user of the organization. When omitted and the request is made as an entity user, the caller becomes the owner; an explicit null leaves the transaction unowned. A caller limited to their own transactions may only name themselves or one of their direct reportees, and becomes the owner when the field is null.
|
|
2038
|
+
*/
|
|
2039
|
+
entity_user_id?: string | null;
|
|
2040
|
+
/**
|
|
2041
|
+
* The current expense approval status of the transaction.
|
|
2042
|
+
*/
|
|
2043
|
+
expense_status: ExpenseStatusEnum;
|
|
2044
|
+
/**
|
|
2045
|
+
* External identifier for idempotency, if provided by the source system.
|
|
2046
|
+
*/
|
|
2047
|
+
external_id?: string | null;
|
|
2048
|
+
/**
|
|
2049
|
+
* Whether the transaction has missing required fields per the entity's TransactionValidation config. Always false when no config is set.
|
|
2050
|
+
*/
|
|
2051
|
+
has_validation_errors: boolean;
|
|
2052
|
+
/**
|
|
2053
|
+
* ID of the ledger account from the Accounting service.
|
|
2054
|
+
*/
|
|
2055
|
+
ledger_account_id?: string | null;
|
|
2056
|
+
/**
|
|
2057
|
+
* ID of the location associated with this transaction.
|
|
2058
|
+
*/
|
|
2059
|
+
location_id?: string | null;
|
|
2060
|
+
/**
|
|
2061
|
+
* Original merchant transaction amount in minor units.
|
|
2062
|
+
*/
|
|
2063
|
+
merchant_amount: number;
|
|
2064
|
+
/**
|
|
2065
|
+
* ISO currency code for the `merchant_amount`.
|
|
2066
|
+
*/
|
|
2067
|
+
merchant_currency: CurrencyEnum;
|
|
2068
|
+
/**
|
|
2069
|
+
* The merchant location. Always set on cards, optional on reimbursements.
|
|
2070
|
+
*/
|
|
2071
|
+
merchant_location?: string | null;
|
|
2072
|
+
/**
|
|
2073
|
+
* The merchant name.
|
|
2074
|
+
*/
|
|
2075
|
+
merchant_name: string;
|
|
2076
|
+
/**
|
|
2077
|
+
* Reason provided by the employee when submitting without a receipt (e.g. receipt was lost or unavailable). Set via the submit endpoint; bypasses the receipt_id required-field check.
|
|
2078
|
+
*/
|
|
2079
|
+
no_receipt_reason?: string | null;
|
|
2080
|
+
/**
|
|
2081
|
+
* When a reimbursement was paid out. Null until paid.
|
|
2082
|
+
*/
|
|
2083
|
+
paid_at?: string | null;
|
|
2084
|
+
/**
|
|
2085
|
+
* ID of the entity user who marked a reimbursement paid. Null until paid.
|
|
2086
|
+
*/
|
|
2087
|
+
paid_by_entity_user_id?: string | null;
|
|
2088
|
+
/**
|
|
2089
|
+
* Extensible key-value pairs for storing additional custom information for partner needs.
|
|
2090
|
+
*/
|
|
2091
|
+
partner_metadata?: {
|
|
2092
|
+
[key: string]: string;
|
|
2093
|
+
} | null;
|
|
2094
|
+
/**
|
|
2095
|
+
* How a card expense was paid. Always set on cards, null on reimbursements.
|
|
2096
|
+
*/
|
|
2097
|
+
payment_method?: TransactionPaymentMethod | null;
|
|
2098
|
+
/**
|
|
2099
|
+
* The current processing status of the transaction.
|
|
2100
|
+
*/
|
|
2101
|
+
payment_processing_status?: TransactionStatusEnum;
|
|
2102
|
+
/**
|
|
2103
|
+
* How a reimbursement was paid out. Null until paid.
|
|
2104
|
+
*/
|
|
2105
|
+
payout_method?: PayoutMethodEnum | null;
|
|
2106
|
+
/**
|
|
2107
|
+
* Whether a reimbursement has been paid out to the employee. Null on cards.
|
|
2108
|
+
*/
|
|
2109
|
+
payout_status?: PayoutStatusEnum | null;
|
|
2110
|
+
/**
|
|
2111
|
+
* URL of the attached receipt's file. Present when receipt_id is set and the receipt is reachable; null otherwise.
|
|
2112
|
+
*/
|
|
2113
|
+
receipt_file_url?: string | null;
|
|
2114
|
+
/**
|
|
2115
|
+
* ID of the related receipt from payables service, if any.
|
|
2116
|
+
*/
|
|
2117
|
+
receipt_id?: string | null;
|
|
2118
|
+
/**
|
|
2119
|
+
* Optional reason explaining why the transaction was rejected.
|
|
2120
|
+
*/
|
|
2121
|
+
reject_reason?: string | null;
|
|
2122
|
+
/**
|
|
2123
|
+
* Per-field source tracking. Each field indicates how its value was set: user, generated, or automatched.
|
|
2124
|
+
*/
|
|
2125
|
+
source_of_data?: SourceOfData | null;
|
|
2126
|
+
/**
|
|
2127
|
+
* Date and time when the transaction was initiated.
|
|
2128
|
+
*/
|
|
2129
|
+
started_at: string;
|
|
2130
|
+
/**
|
|
2131
|
+
* The kind of charge, such as a capture or a refund.
|
|
2132
|
+
*/
|
|
2133
|
+
subtype: ExpenseSubtypeEnum;
|
|
2134
|
+
/**
|
|
2135
|
+
* The kind of expense.
|
|
2136
|
+
*/
|
|
2137
|
+
type: ExpenseTypeEnum;
|
|
2138
|
+
};
|
|
2007
2139
|
type ExpenseStatusChangedEventData = {
|
|
2008
2140
|
approval_policy_id?: string | null;
|
|
2009
2141
|
approval_policy_name?: string | null;
|
|
@@ -2049,6 +2181,7 @@ type ExpenseSubmittedEventData = {
|
|
|
2049
2181
|
*/
|
|
2050
2182
|
old_status: ExpenseStatusEnum;
|
|
2051
2183
|
};
|
|
2184
|
+
type ExpenseSubtypeEnum = 'capture' | 'refund' | 'cash_withdrawal' | 'fee' | 'adjustment' | 'reversal' | 'out_of_pocket';
|
|
2052
2185
|
type ExpenseTypeEnum = 'card' | 'reimbursement';
|
|
2053
2186
|
type ExpenseUpdatedEventData = {
|
|
2054
2187
|
fields?: {
|
|
@@ -4596,117 +4729,7 @@ type TransactionRequiredFieldItem = {
|
|
|
4596
4729
|
amount_threshold?: number | null;
|
|
4597
4730
|
field: TransactionFieldsAllowedForValidate;
|
|
4598
4731
|
};
|
|
4599
|
-
type TransactionResponse = {
|
|
4600
|
-
/**
|
|
4601
|
-
* A unique system-generated ID assigned to this transaction.
|
|
4602
|
-
*/
|
|
4603
|
-
id: string;
|
|
4604
|
-
/**
|
|
4605
|
-
* The transaction amount in [minor units](https://docs.tesouro.com/finops/support/currencies#minor-units). Positive values for in-flow, negative values for out-flow.
|
|
4606
|
-
*/
|
|
4607
|
-
amount: number;
|
|
4608
|
-
/**
|
|
4609
|
-
* ID of the approval policy applied to this transaction, if any.
|
|
4610
|
-
*/
|
|
4611
|
-
applied_policy_id?: string | null;
|
|
4612
|
-
/**
|
|
4613
|
-
* ISO currency code.
|
|
4614
|
-
*/
|
|
4615
|
-
currency: CurrencyEnum;
|
|
4616
|
-
/**
|
|
4617
|
-
* ID of the department associated with this transaction.
|
|
4618
|
-
*/
|
|
4619
|
-
department_id?: string | null;
|
|
4620
|
-
/**
|
|
4621
|
-
* A human-readable description of the transaction.
|
|
4622
|
-
*/
|
|
4623
|
-
description?: string | null;
|
|
4624
|
-
/**
|
|
4625
|
-
* ID of the entity that owns this resource.
|
|
4626
|
-
*/
|
|
4627
|
-
entity_id: string;
|
|
4628
|
-
/**
|
|
4629
|
-
* ID of the entity user who owns the transaction. Must be an active or invited user of the organization. When omitted and the request is made as an entity user, the caller becomes the owner; an explicit null leaves the transaction unowned. A caller limited to their own transactions may only name themselves or one of their direct reportees, and becomes the owner when the field is null.
|
|
4630
|
-
*/
|
|
4631
|
-
entity_user_id?: string | null;
|
|
4632
|
-
/**
|
|
4633
|
-
* The current expense approval status of the transaction.
|
|
4634
|
-
*/
|
|
4635
|
-
expense_status: ExpenseStatusEnum;
|
|
4636
|
-
/**
|
|
4637
|
-
* External identifier for idempotency, if provided by the source system.
|
|
4638
|
-
*/
|
|
4639
|
-
external_id?: string | null;
|
|
4640
|
-
/**
|
|
4641
|
-
* Whether the transaction has missing required fields per the entity's TransactionValidation config. Always false when no config is set.
|
|
4642
|
-
*/
|
|
4643
|
-
has_validation_errors: boolean;
|
|
4644
|
-
/**
|
|
4645
|
-
* ID of the ledger account from the Accounting service.
|
|
4646
|
-
*/
|
|
4647
|
-
ledger_account_id?: string | null;
|
|
4648
|
-
/**
|
|
4649
|
-
* ID of the location associated with this transaction.
|
|
4650
|
-
*/
|
|
4651
|
-
location_id?: string | null;
|
|
4652
|
-
/**
|
|
4653
|
-
* Original merchant transaction amount in minor units.
|
|
4654
|
-
*/
|
|
4655
|
-
merchant_amount: number;
|
|
4656
|
-
/**
|
|
4657
|
-
* ISO currency code for the `merchant_amount`.
|
|
4658
|
-
*/
|
|
4659
|
-
merchant_currency: CurrencyEnum;
|
|
4660
|
-
/**
|
|
4661
|
-
* The merchant location.
|
|
4662
|
-
*/
|
|
4663
|
-
merchant_location: string;
|
|
4664
|
-
/**
|
|
4665
|
-
* The merchant name.
|
|
4666
|
-
*/
|
|
4667
|
-
merchant_name: string;
|
|
4668
|
-
/**
|
|
4669
|
-
* Reason provided by the employee when submitting without a receipt (e.g. receipt was lost or unavailable). Set via the submit endpoint; bypasses the receipt_id required-field check.
|
|
4670
|
-
*/
|
|
4671
|
-
no_receipt_reason?: string | null;
|
|
4672
|
-
/**
|
|
4673
|
-
* Extensible key-value pairs for storing additional custom information for partner needs.
|
|
4674
|
-
*/
|
|
4675
|
-
partner_metadata?: {
|
|
4676
|
-
[key: string]: string;
|
|
4677
|
-
} | null;
|
|
4678
|
-
payment_method: TransactionPaymentMethod;
|
|
4679
|
-
/**
|
|
4680
|
-
* The current processing status of the transaction.
|
|
4681
|
-
*/
|
|
4682
|
-
payment_processing_status?: TransactionStatusEnum;
|
|
4683
|
-
/**
|
|
4684
|
-
* URL of the attached receipt's file. Present when receipt_id is set and the receipt is reachable; null otherwise.
|
|
4685
|
-
*/
|
|
4686
|
-
receipt_file_url?: string | null;
|
|
4687
|
-
/**
|
|
4688
|
-
* ID of the related receipt from payables service, if any.
|
|
4689
|
-
*/
|
|
4690
|
-
receipt_id?: string | null;
|
|
4691
|
-
/**
|
|
4692
|
-
* Optional reason explaining why the transaction was rejected.
|
|
4693
|
-
*/
|
|
4694
|
-
reject_reason?: string | null;
|
|
4695
|
-
/**
|
|
4696
|
-
* Per-field source tracking. Each field indicates how its value was set: user, generated, or automatched.
|
|
4697
|
-
*/
|
|
4698
|
-
source_of_data?: SourceOfData | null;
|
|
4699
|
-
/**
|
|
4700
|
-
* Date and time when the transaction was initiated.
|
|
4701
|
-
*/
|
|
4702
|
-
started_at: string;
|
|
4703
|
-
/**
|
|
4704
|
-
* The nature of the transaction.
|
|
4705
|
-
*/
|
|
4706
|
-
type: TransactionTypeEnum;
|
|
4707
|
-
};
|
|
4708
4732
|
type TransactionStatusEnum = 'created' | 'processing' | 'succeeded' | 'declined' | 'refunded' | 'failed';
|
|
4709
|
-
type TransactionTypeEnum = 'capture' | 'refund' | 'cash_withdrawal' | 'fee' | 'adjustment' | 'reversal';
|
|
4710
4733
|
type TransactionValidationResponse = {
|
|
4711
4734
|
required_fields: Array<TransactionRequiredFieldItem>;
|
|
4712
4735
|
};
|
|
@@ -5074,7 +5097,7 @@ declare const A_DISCLOSURE_ACCEPTANCE: WidgetDisclosureAcceptance;
|
|
|
5074
5097
|
declare const A_RECEIPT: ReceiptResponseSchema;
|
|
5075
5098
|
/**
|
|
5076
5099
|
* The card transaction {@link A_RECEIPT} belongs to, as
|
|
5077
|
-
* `GET /finops/v1/
|
|
5100
|
+
* `GET /finops/v1/expenses` returns it.
|
|
5078
5101
|
*
|
|
5079
5102
|
* `amount` is **negative** because a purchase is an out-flow, which is how the
|
|
5080
5103
|
* API models it and what the seeded e2e expenses send. The picker's Amount
|
|
@@ -5084,7 +5107,7 @@ declare const A_RECEIPT: ReceiptResponseSchema;
|
|
|
5084
5107
|
* `merchant_name` matches the receipt's so a story's match reads as a plausible
|
|
5085
5108
|
* one, and `entity_user_id` matches for the same reason the receipt's does.
|
|
5086
5109
|
*/
|
|
5087
|
-
declare const A_TRANSACTION:
|
|
5110
|
+
declare const A_TRANSACTION: ExpenseResponse;
|
|
5088
5111
|
/**
|
|
5089
5112
|
* One expense approval policy, as `GET /finops/v1/approval-policies` returns it.
|
|
5090
5113
|
*
|
package/dist/index.css
CHANGED
|
@@ -201,11 +201,6 @@
|
|
|
201
201
|
margin-block-start: calc(calc(var(--ttw-spacing) * 4) * var(--tw-space-y-reverse));
|
|
202
202
|
margin-block-end: calc(calc(var(--ttw-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));
|
|
203
203
|
}
|
|
204
|
-
.ttw\:space-y-5 > :where(:not(:last-child)) {
|
|
205
|
-
--tw-space-y-reverse: 0;
|
|
206
|
-
margin-block-start: calc(calc(var(--ttw-spacing) * 5) * var(--tw-space-y-reverse));
|
|
207
|
-
margin-block-end: calc(calc(var(--ttw-spacing) * 5) * calc(1 - var(--tw-space-y-reverse)));
|
|
208
|
-
}
|
|
209
204
|
.ttw\:space-y-6 > :where(:not(:last-child)) {
|
|
210
205
|
--tw-space-y-reverse: 0;
|
|
211
206
|
margin-block-start: calc(calc(var(--ttw-spacing) * 6) * var(--tw-space-y-reverse));
|
|
@@ -535,6 +530,9 @@
|
|
|
535
530
|
.ttw\:mb-4 {
|
|
536
531
|
margin-bottom: calc(var(--ttw-spacing) * 4);
|
|
537
532
|
}
|
|
533
|
+
.ttw\:mb-5 {
|
|
534
|
+
margin-bottom: calc(var(--ttw-spacing) * 5);
|
|
535
|
+
}
|
|
538
536
|
.ttw\:mb-6 {
|
|
539
537
|
margin-bottom: calc(var(--ttw-spacing) * 6);
|
|
540
538
|
}
|
|
@@ -5679,6 +5677,9 @@
|
|
|
5679
5677
|
--tw-ring-color: color-mix(in oklab, var(--ttw-ring) 50%, transparent);
|
|
5680
5678
|
}
|
|
5681
5679
|
}
|
|
5680
|
+
.ttw\:has-\[\>\:not\(\:empty\)\]\:flex:has( > :not(:empty)) {
|
|
5681
|
+
display: flex;
|
|
5682
|
+
}
|
|
5682
5683
|
.ttw\:has-\[\>\[data-slot\=checkbox-group\]\]\:gap-3:has( > [data-slot=checkbox-group]) {
|
|
5683
5684
|
gap: calc(var(--ttw-spacing) * 3);
|
|
5684
5685
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -5185,7 +5185,7 @@ interface InvoicingTabLabels extends InvoicingTabsLabels {
|
|
|
5185
5185
|
interface ReceivablesWidgetOwnProps {
|
|
5186
5186
|
/** Sponsor bank shown as "Powered by {bank}" beside embedded accounts. */
|
|
5187
5187
|
embeddedBankName?: string;
|
|
5188
|
-
/** Rendered above the tab row. The widget renders no heading of its own (embedded ADR 0010), so pass the page title here. */
|
|
5188
|
+
/** Rendered above the tab row, and kept when an error or the disclosures gate replaces the tabs. The widget renders no heading of its own (embedded ADR 0010), so pass the page title here. */
|
|
5189
5189
|
headerStart?: ReactNode;
|
|
5190
5190
|
/** The active tab. Omit to let the widget track it, starting on Invoices. */
|
|
5191
5191
|
selectedTab?: InvoicingTabId;
|
|
@@ -5225,7 +5225,7 @@ interface ReceivablesWidgetOwnProps {
|
|
|
5225
5225
|
|
|
5226
5226
|
type ReceivablesWidgetProps = WidgetProviderProps & ReceivablesWidgetOwnProps;
|
|
5227
5227
|
|
|
5228
|
-
declare function ReceivablesWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: ReceivablesWidgetProps): React.JSX.Element;
|
|
5228
|
+
declare function ReceivablesWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, headerStart, ...innerProps }: ReceivablesWidgetProps): React.JSX.Element;
|
|
5229
5229
|
|
|
5230
5230
|
interface Labels$1 {
|
|
5231
5231
|
title: string;
|
|
@@ -6482,11 +6482,12 @@ interface BillPayWidgetProps extends WidgetProviderProps {
|
|
|
6482
6482
|
/** Bank shown as "Powered by {bank}" next to the source account when paying; omitted hides the badge. */
|
|
6483
6483
|
poweredByBankName?: string;
|
|
6484
6484
|
/**
|
|
6485
|
-
* Opens the host's bill-pay settings surface, from a cog
|
|
6486
|
-
*
|
|
6487
|
-
* reach it.
|
|
6485
|
+
* Opens the host's bill-pay settings surface, from a cog at the top right,
|
|
6486
|
+
* on the `headerStart` line. Only rendered for a user whose scopes reach it.
|
|
6488
6487
|
*/
|
|
6489
6488
|
onSettingsClick?: () => void;
|
|
6489
|
+
/** Rendered above the tab row, beside the settings cog, and kept when an error or the disclosures gate replaces the tabs. The widget renders no heading of its own, so pass your page title here (embedded ADR 0010). */
|
|
6490
|
+
headerStart?: ReactNode;
|
|
6490
6491
|
/**
|
|
6491
6492
|
* The active summary card on the Bills tab, or `null` for none. Applied on
|
|
6492
6493
|
* mount and whenever it changes. Omit to let the widget track it.
|
|
@@ -635,11 +635,12 @@ interface BillPayWidgetProps extends WidgetProviderProps {
|
|
|
635
635
|
/** Bank shown as "Powered by {bank}" next to the source account when paying; omitted hides the badge. */
|
|
636
636
|
poweredByBankName?: string;
|
|
637
637
|
/**
|
|
638
|
-
* Opens the host's bill-pay settings surface, from a cog
|
|
639
|
-
*
|
|
640
|
-
* reach it.
|
|
638
|
+
* Opens the host's bill-pay settings surface, from a cog at the top right,
|
|
639
|
+
* on the `headerStart` line. Only rendered for a user whose scopes reach it.
|
|
641
640
|
*/
|
|
642
641
|
onSettingsClick?: () => void;
|
|
642
|
+
/** Rendered above the tab row, beside the settings cog, and kept when an error or the disclosures gate replaces the tabs. The widget renders no heading of its own, so pass your page title here (embedded ADR 0010). */
|
|
643
|
+
headerStart?: ReactNode;
|
|
643
644
|
/**
|
|
644
645
|
* The active summary card on the Bills tab, or `null` for none. Applied on
|
|
645
646
|
* mount and whenever it changes. Omit to let the widget track it.
|
|
@@ -1821,7 +1821,7 @@ interface InvoicingTabLabels extends InvoicingTabsLabels {
|
|
|
1821
1821
|
interface ReceivablesWidgetOwnProps {
|
|
1822
1822
|
/** Sponsor bank shown as "Powered by {bank}" beside embedded accounts. */
|
|
1823
1823
|
embeddedBankName?: string;
|
|
1824
|
-
/** Rendered above the tab row. The widget renders no heading of its own (embedded ADR 0010), so pass the page title here. */
|
|
1824
|
+
/** Rendered above the tab row, and kept when an error or the disclosures gate replaces the tabs. The widget renders no heading of its own (embedded ADR 0010), so pass the page title here. */
|
|
1825
1825
|
headerStart?: ReactNode;
|
|
1826
1826
|
/** The active tab. Omit to let the widget track it, starting on Invoices. */
|
|
1827
1827
|
selectedTab?: InvoicingTabId;
|
|
@@ -1861,7 +1861,7 @@ interface ReceivablesWidgetOwnProps {
|
|
|
1861
1861
|
|
|
1862
1862
|
type ReceivablesWidgetProps = WidgetProviderProps & ReceivablesWidgetOwnProps;
|
|
1863
1863
|
|
|
1864
|
-
declare function ReceivablesWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: ReceivablesWidgetProps): React.JSX.Element;
|
|
1864
|
+
declare function ReceivablesWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, headerStart, ...innerProps }: ReceivablesWidgetProps): React.JSX.Element;
|
|
1865
1865
|
|
|
1866
1866
|
export { InvoicingTab, ReceivableStatusCard, ReceivablesWidget };
|
|
1867
1867
|
export type { CounterpartFormSheetLabels, CounterpartMessageLabels, InvoicesFilterBarLabelOverrides, InvoicesFilterBarLabels, InvoicesFilterLabelOverrides, InvoicesFilterLabels, InvoicingTabId, InvoicingTabLabels, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, ProductFormSheetLabels, ProductMessageLabels, ReceivableActionDialogLabels, ReceivableActionsModalLabels, ReceivableAuditHistoryLabels, ReceivableDetailsPanelLabelOverrides, ReceivableDetailsPanelLabels, ReceivableDocumentType, ReceivableFormDialogLabels, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivablePreviewLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, RecurringSeriesScreenLabelOverrides, RecurringSeriesScreenLabels };
|
|
@@ -4066,7 +4066,7 @@ interface InvoicingTabLabels extends InvoicingTabsLabels {
|
|
|
4066
4066
|
interface ReceivablesWidgetOwnProps {
|
|
4067
4067
|
/** Sponsor bank shown as "Powered by {bank}" beside embedded accounts. */
|
|
4068
4068
|
embeddedBankName?: string;
|
|
4069
|
-
/** Rendered above the tab row. The widget renders no heading of its own (embedded ADR 0010), so pass the page title here. */
|
|
4069
|
+
/** Rendered above the tab row, and kept when an error or the disclosures gate replaces the tabs. The widget renders no heading of its own (embedded ADR 0010), so pass the page title here. */
|
|
4070
4070
|
headerStart?: ReactNode;
|
|
4071
4071
|
/** The active tab. Omit to let the widget track it, starting on Invoices. */
|
|
4072
4072
|
selectedTab?: InvoicingTabId;
|
|
@@ -16,66 +16,66 @@ import "../../../../../shared/feature/dist/index.js";
|
|
|
16
16
|
import { BillPayWidgetAnalyticsEvent as c, WIDGET_NAME as l } from "../analytics/events.js";
|
|
17
17
|
import { BillQueue as u } from "../../../../bills-list/feature/dist/index5.js";
|
|
18
18
|
import { BillSummaryCard as d } from "../../../../bills-list/feature/dist/index10.js";
|
|
19
|
-
import {
|
|
19
|
+
import { BillPayWidgetHeaderUi as f, BillPayWidgetUi as p } from "../../../../ui/dist/index14.js";
|
|
20
20
|
import "../../../../ui/dist/index.js";
|
|
21
21
|
import "../../../../bills-list/feature/dist/index.js";
|
|
22
|
-
import { BillUploadWidget as
|
|
22
|
+
import { BillUploadWidget as m } from "../../../../bill-upload/feature/dist/index8.js";
|
|
23
23
|
import "../../../../bill-upload/feature/dist/index.js";
|
|
24
|
-
import { BillsTab as
|
|
25
|
-
import { BILL_PAY_WIDGET_LABELS_EN as
|
|
26
|
-
import { CounterpartsWidget as
|
|
24
|
+
import { BillsTab as h } from "./BillsTab.js";
|
|
25
|
+
import { BILL_PAY_WIDGET_LABELS_EN as g } from "./labels.js";
|
|
26
|
+
import { CounterpartsWidget as _ } from "../../../../../counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js";
|
|
27
27
|
import "../../../../../counterparts-widget/feature/dist/index.js";
|
|
28
|
-
import { useCallback as
|
|
29
|
-
import { Fragment as
|
|
28
|
+
import { useCallback as v, useEffect as ee, useMemo as y, useRef as b, useState as x } from "react";
|
|
29
|
+
import { Fragment as S, jsx as C, jsxs as te } from "react/jsx-runtime";
|
|
30
30
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js
|
|
31
|
-
var
|
|
31
|
+
var w = {
|
|
32
32
|
Bills: "bills",
|
|
33
33
|
Vendors: "vendors"
|
|
34
|
-
},
|
|
34
|
+
}, T = [w.Bills, w.Vendors];
|
|
35
35
|
function ne(e) {
|
|
36
|
-
return
|
|
36
|
+
return T.includes(e);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}, [
|
|
43
|
-
let
|
|
38
|
+
function E({ labels: a, initialTab: l = w.Bills, selectedTab: u, onTabChange: d, initialView: f, poweredByBankName: E, onSettingsClick: D, settingsContainer: O, selectedSummaryCard: k, onSummaryCardChange: A, selectedBillsView: j, onBillsViewChange: M }) {
|
|
39
|
+
let N = i();
|
|
40
|
+
ee(() => {
|
|
41
|
+
N(c.Mounted);
|
|
42
|
+
}, [N]);
|
|
43
|
+
let P = y(() => e(g, a), [a]), { initResponse: F } = o(), re = t(F?.scopes, [n.PayableReadOrg]), I = t(F?.scopes, [n.PayableWriteOrg]), L = t(F?.scopes, [n.ApprovalPolicyWriteOrg]) && t(F?.scopes, [n.PayableWriteOrg]) && t(F?.scopes, [n.RoleReadOrg]) && t(F?.scopes, [n.UserReadOrg]), [R, z] = x(l), B = u ?? R, V = v((e) => {
|
|
44
44
|
ne(e) && (z(e), d?.(e));
|
|
45
|
-
}, [d]), [H, U] = x(null), [W, G] = x(), K =
|
|
46
|
-
V(
|
|
47
|
-
}, [V]), q = b(null), J =
|
|
48
|
-
V(
|
|
49
|
-
}, [V]),
|
|
50
|
-
|
|
45
|
+
}, [d]), [H, U] = x(null), [W, G] = x(), K = v((e) => {
|
|
46
|
+
V(w.Bills), G(e);
|
|
47
|
+
}, [V]), q = b(null), J = v((e) => q.current?.enqueue(e), []), [Y, X] = x(), Z = v((e) => {
|
|
48
|
+
V(w.Bills), X(e);
|
|
49
|
+
}, [V]), ie = s(), [ae, oe] = x(f === "create"), [se, Q] = x(!1);
|
|
50
|
+
ae && F && !ie && (oe(!1), I && B === w.Bills && Q(!0));
|
|
51
51
|
let $ = [{
|
|
52
|
-
id:
|
|
53
|
-
label:
|
|
54
|
-
content: /* @__PURE__ */
|
|
55
|
-
labels:
|
|
52
|
+
id: w.Bills,
|
|
53
|
+
label: P.tabs.bills,
|
|
54
|
+
content: /* @__PURE__ */ C(h, {
|
|
55
|
+
labels: P,
|
|
56
56
|
onEnqueueFiles: J,
|
|
57
57
|
openPayableId: W,
|
|
58
58
|
onOpenPayableHandled: () => G(void 0),
|
|
59
59
|
vendorIntent: Y,
|
|
60
60
|
onVendorIntentHandled: () => X(void 0),
|
|
61
|
-
openAddBill:
|
|
61
|
+
openAddBill: se,
|
|
62
62
|
onOpenAddBillHandled: () => Q(!1),
|
|
63
63
|
poweredByBankName: E,
|
|
64
64
|
headerActionContainer: H,
|
|
65
|
-
selectedSummaryCard:
|
|
66
|
-
onSummaryCardChange:
|
|
67
|
-
selectedQueue:
|
|
68
|
-
onQueueChange:
|
|
65
|
+
selectedSummaryCard: k,
|
|
66
|
+
onSummaryCardChange: A,
|
|
67
|
+
selectedQueue: j,
|
|
68
|
+
onQueueChange: M
|
|
69
69
|
})
|
|
70
70
|
}, {
|
|
71
|
-
id:
|
|
72
|
-
label:
|
|
73
|
-
content: /* @__PURE__ */
|
|
74
|
-
...
|
|
71
|
+
id: w.Vendors,
|
|
72
|
+
label: P.tabs.vendors,
|
|
73
|
+
content: /* @__PURE__ */ C(_, {
|
|
74
|
+
...P.vendors,
|
|
75
75
|
counterpartType: "vendor",
|
|
76
76
|
passThrough: !0,
|
|
77
77
|
headerActionContainer: H,
|
|
78
|
-
onViewAllDocuments:
|
|
78
|
+
onViewAllDocuments: re ? (e) => Z({
|
|
79
79
|
vendorId: e.id,
|
|
80
80
|
vendorName: e.name,
|
|
81
81
|
action: "viewBills"
|
|
@@ -86,26 +86,33 @@ function T({ labels: a, initialTab: l = C.Bills, selectedTab: u, onTabChange: d,
|
|
|
86
86
|
action: "createBill"
|
|
87
87
|
}) : void 0
|
|
88
88
|
})
|
|
89
|
-
}],
|
|
90
|
-
return /* @__PURE__ */ te(
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
labels:
|
|
89
|
+
}], ce = $.some((e) => e.id === B) ? B : T.find((e) => $.some((t) => t.id === e)) ?? $[0]?.id ?? "";
|
|
90
|
+
return /* @__PURE__ */ te(S, { children: [
|
|
91
|
+
/* @__PURE__ */ C(r, {}),
|
|
92
|
+
/* @__PURE__ */ C(p, {
|
|
93
|
+
labels: P.widget,
|
|
94
94
|
tabs: $,
|
|
95
|
-
selectedTabId:
|
|
95
|
+
selectedTabId: ce,
|
|
96
96
|
onTabChange: V,
|
|
97
97
|
onSettingsClick: D && L ? D : void 0,
|
|
98
|
+
settingsContainer: O,
|
|
98
99
|
actionContainerRef: U
|
|
99
100
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ C(m, {
|
|
101
102
|
ref: q,
|
|
102
103
|
onOpenBill: K,
|
|
103
|
-
labels:
|
|
104
|
+
labels: P.billUpload
|
|
104
105
|
})
|
|
105
106
|
] });
|
|
106
107
|
}
|
|
107
|
-
function
|
|
108
|
-
|
|
108
|
+
function D({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: o, uiFramework: s, errorFallback: c, onError: u, analytics: d, disclosuresAcceptance: p, providerLabels: m, headerStart: h, ...g }) {
|
|
109
|
+
let [_, v] = x(null);
|
|
110
|
+
return /* @__PURE__ */ C(a, {
|
|
111
|
+
header: h || g.labels?.widget?.description || g.onSettingsClick ? /* @__PURE__ */ C(f, {
|
|
112
|
+
labels: g.labels?.widget,
|
|
113
|
+
headerStart: h,
|
|
114
|
+
settingsContainerRef: v
|
|
115
|
+
}) : null,
|
|
109
116
|
widgetName: l,
|
|
110
117
|
baseUrl: e,
|
|
111
118
|
widgetToken: t,
|
|
@@ -117,10 +124,13 @@ function E({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gat
|
|
|
117
124
|
errorFallback: c,
|
|
118
125
|
onError: u,
|
|
119
126
|
analytics: d,
|
|
120
|
-
disclosuresAcceptance:
|
|
121
|
-
providerLabels:
|
|
122
|
-
children: /* @__PURE__ */
|
|
127
|
+
disclosuresAcceptance: p,
|
|
128
|
+
providerLabels: m,
|
|
129
|
+
children: /* @__PURE__ */ C(E, {
|
|
130
|
+
...g,
|
|
131
|
+
settingsContainer: _
|
|
132
|
+
})
|
|
123
133
|
});
|
|
124
134
|
}
|
|
125
|
-
var
|
|
126
|
-
export {
|
|
135
|
+
var O = D;
|
|
136
|
+
export { O as BillPayWidget, O as default, D as BillPayWidgetWithLabels, d as BillSummaryCard, u as BillsView };
|
|
@@ -10,12 +10,12 @@ import { groupBySectionHeading as a } from "./index10.js";
|
|
|
10
10
|
import { BillOverflowMenu as o } from "./index11.js";
|
|
11
11
|
import "./index12.js";
|
|
12
12
|
import "./index13.js";
|
|
13
|
-
import {
|
|
13
|
+
import { BillPayWidgetHeaderUi as s, BillPayWidgetUi as c } from "./index14.js";
|
|
14
14
|
import "./index15.js";
|
|
15
|
-
import { BILL_UPLOAD_DROPZONE_LABELS_EN as
|
|
16
|
-
import { BillUploadDropzone as
|
|
15
|
+
import { BILL_UPLOAD_DROPZONE_LABELS_EN as l } from "./index16.js";
|
|
16
|
+
import { BillUploadDropzone as u, getAcceptedBillUploadFiles as d } from "./index17.js";
|
|
17
17
|
import "./index19.js";
|
|
18
|
-
import { REVEALABLE_FIELD_LABELS_EN as
|
|
19
|
-
import { RevealableField as
|
|
18
|
+
import { REVEALABLE_FIELD_LABELS_EN as f } from "./index20.js";
|
|
19
|
+
import { RevealableField as p } from "./index21.js";
|
|
20
20
|
import "./index22.js";
|
|
21
|
-
export {
|
|
21
|
+
export { l as BILL_UPLOAD_DROPZONE_LABELS_EN, e as BillActionButtons, n as BillDecisionDialog, r as BillDuplicateIcon, i as BillDuplicateWarning, o as BillOverflowMenu, s as BillPayWidgetHeaderUi, c as BillPayWidgetUi, u as BillUploadDropzone, t as NO_BILL_ACTIONS, f as REVEALABLE_FIELD_LABELS_EN, p as RevealableField, d as getAcceptedBillUploadFiles, a as groupBySectionHeading };
|