@tesouro/embedded-components-react 0.5.204 → 0.5.206
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 +15 -14
- package/dist/index.d.ts +49 -4
- package/dist/index.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +49 -4
- package/dist/lib/ReceivablesWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js +26 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +79 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +88 -193
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +184 -31
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +32 -145
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +150 -47
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +37 -293
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +58 -70
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +86 -99
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +48 -233
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +336 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +75 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +270 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +95 -394
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +422 -72
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +15 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +94 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +24 -11
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +3 -264
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +3 -72
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +16 -421
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +1 -106
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +4 -93
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +11 -343
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +5 -159
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +264 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +72 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +401 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +106 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +344 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +182 -32
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +27 -154
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +203 -20
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +161 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +16 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +25 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +3 -17
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +38 -38
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +213 -202
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +136 -116
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +1763 -1749
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -569,20 +569,21 @@ A self-contained native widget for listing, creating, editing, and acting on cus
|
|
|
569
569
|
| `onReceivableOpened` | `(id: string, type: ReceivableDocumentType) => void` | `undefined` | Called when the user opens a row's detail sheet. |
|
|
570
570
|
| `onTemplateSettingsClick` | `() => void` | `undefined` | Shows a template settings action in the header and calls this handler when selected. |
|
|
571
571
|
|
|
572
|
-
| Prop | Type | Default | Description
|
|
573
|
-
| -------------------------- | ---------------------------------------- | ---------------- |
|
|
574
|
-
| `
|
|
575
|
-
| `
|
|
576
|
-
| `
|
|
577
|
-
| `
|
|
578
|
-
| `
|
|
579
|
-
| `
|
|
580
|
-
| `
|
|
581
|
-
| `
|
|
582
|
-
| `
|
|
583
|
-
| `
|
|
584
|
-
| `
|
|
585
|
-
| `
|
|
572
|
+
| Prop | Type | Default | Description |
|
|
573
|
+
| -------------------------- | ---------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
574
|
+
| `embeddedBankName` | `string` | `undefined` | Display name of the sponsor bank powering embedded bank accounts (e.g. `"Zenith Bank"`). Shown next to embedded accounts in the invoice payment-account picker as "Powered by {embeddedBankName}"; omitted when unset. |
|
|
575
|
+
| `screenLabels` | `Partial<ReceivablesScreenLabels>` | English defaults | Overrides table, tab, filter, empty, error, action, and status badge copy. |
|
|
576
|
+
| `formLabels` | `Partial<ReceivableFormSheetLabels>` | English defaults | Overrides create/edit form labels and button copy. |
|
|
577
|
+
| `detailsLabels` | `Partial<ReceivableDetailsSheetLabels>` | English defaults | Overrides detail sheet headings, actions, empty copy, and status badge copy. |
|
|
578
|
+
| `sendLabels` | `Partial<ReceivableSendDialogLabels>` | English defaults | Overrides send-email dialog labels and buttons. |
|
|
579
|
+
| `paymentLabels` | `Partial<ReceivablePaymentDialogLabels>` | English defaults | Overrides manual payment dialog labels and buttons. |
|
|
580
|
+
| `actionLabels` | `Partial<ReceivableActionDialogLabels>` | English defaults | Overrides generic confirmation dialog buttons. Action-specific title and body copy come from `messageLabels`. |
|
|
581
|
+
| `counterpartFormLabels` | `Partial<CounterpartFormSheetLabels>` | English defaults | Overrides inline customer creation copy from the shared counterpart-management flow. |
|
|
582
|
+
| `measureUnitsLabels` | `Partial<MeasureUnitsManagerLabels>` | English defaults | Overrides copy of the measure-unit manager opened from a line item's unit select. |
|
|
583
|
+
| `measureUnitDeleteLabels` | `Partial<MeasureUnitDeleteDialogLabels>` | English defaults | Overrides measure-unit delete confirmation copy. |
|
|
584
|
+
| `messageLabels` | `Partial<ReceivableMessageLabels>` | English defaults | Overrides validation, fallback, summary, activity, and action-confirmation messages generated by the feature layer. |
|
|
585
|
+
| `productMessageLabels` | `Partial<ProductMessageLabels>` | English defaults | Overrides product flow validation and error messages. |
|
|
586
|
+
| `counterpartMessageLabels` | `Partial<CounterpartMessageLabels>` | English defaults | Overrides customer flow validation and error messages. |
|
|
586
587
|
|
|
587
588
|
### SettingsWidget
|
|
588
589
|
|
package/dist/index.d.ts
CHANGED
|
@@ -4824,6 +4824,15 @@ interface ProductMessageLabels {
|
|
|
4824
4824
|
updateMeasureUnitError: string;
|
|
4825
4825
|
}
|
|
4826
4826
|
|
|
4827
|
+
interface ReceivableBillingSectionLabels {
|
|
4828
|
+
billingHeading: string;
|
|
4829
|
+
billingDescription: string;
|
|
4830
|
+
paymentTermsLabel: string;
|
|
4831
|
+
paymentTermsPlaceholder: string;
|
|
4832
|
+
paymentTermsReceiptDue: string;
|
|
4833
|
+
paymentTermsCustomDate: string;
|
|
4834
|
+
}
|
|
4835
|
+
|
|
4827
4836
|
interface ReceivableStatusBadgeLabels {
|
|
4828
4837
|
draft: string;
|
|
4829
4838
|
issuing: string;
|
|
@@ -4893,7 +4902,7 @@ interface ReceivablesScreenLabels {
|
|
|
4893
4902
|
type ReceivablesScreenLabelOverrides = Partial<Omit<ReceivablesScreenLabels, 'statusBadge'>> & {
|
|
4894
4903
|
statusBadge?: Partial<ReceivableStatusBadgeLabels>;
|
|
4895
4904
|
};
|
|
4896
|
-
interface ReceivableFormSheetLabels {
|
|
4905
|
+
interface ReceivableFormSheetLabels extends ReceivableBillingSectionLabels {
|
|
4897
4906
|
createTitle: string;
|
|
4898
4907
|
editTitle: string;
|
|
4899
4908
|
hiddenDescription: string;
|
|
@@ -4905,9 +4914,6 @@ interface ReceivableFormSheetLabels {
|
|
|
4905
4914
|
currencyLabel: string;
|
|
4906
4915
|
issueDateLabel: string;
|
|
4907
4916
|
dueDateLabel: string;
|
|
4908
|
-
paymentTermsLabel: string;
|
|
4909
|
-
paymentTermsPlaceholder: string;
|
|
4910
|
-
paymentTermsNone: string;
|
|
4911
4917
|
lineItemsHeading: string;
|
|
4912
4918
|
lineItemsDescription: string;
|
|
4913
4919
|
productLabel: string;
|
|
@@ -4937,6 +4943,26 @@ interface ReceivableFormSheetLabels {
|
|
|
4937
4943
|
closingNoteLabel: string;
|
|
4938
4944
|
closingNotePlaceholder: string;
|
|
4939
4945
|
closingNoteDescription: string;
|
|
4946
|
+
bankAccountHeading: string;
|
|
4947
|
+
bankAccountDescription: string;
|
|
4948
|
+
bankAccountLabel: string;
|
|
4949
|
+
bankAccountHint: string;
|
|
4950
|
+
bankAccountSelectorLabel: string;
|
|
4951
|
+
bankAccountPlaceholder: string;
|
|
4952
|
+
bankAccountAddOption: string;
|
|
4953
|
+
bankAccountFormHeading: string;
|
|
4954
|
+
bankAccountRoutingNumberLabel: string;
|
|
4955
|
+
bankAccountRoutingNumberPlaceholder: string;
|
|
4956
|
+
bankAccountAccountNumberLabel: string;
|
|
4957
|
+
bankAccountAccountNumberPlaceholder: string;
|
|
4958
|
+
bankAccountHolderNameLabel: string;
|
|
4959
|
+
bankAccountHolderNamePlaceholder: string;
|
|
4960
|
+
bankAccountNicknameLabel: string;
|
|
4961
|
+
bankAccountNicknamePlaceholder: string;
|
|
4962
|
+
bankAccountCancelButton: string;
|
|
4963
|
+
bankAccountSaveButton: string;
|
|
4964
|
+
bankAccountRestrictedTitle: string;
|
|
4965
|
+
bankAccountRestrictedDescription: string;
|
|
4940
4966
|
attachmentsHeading: string;
|
|
4941
4967
|
attachmentsDescription: string;
|
|
4942
4968
|
attachmentsDropPrompt: string;
|
|
@@ -5020,6 +5046,23 @@ interface ReceivableMessageLabels {
|
|
|
5020
5046
|
paymentAmountInvalid: string;
|
|
5021
5047
|
genericError: string;
|
|
5022
5048
|
lineItemsLoading: string;
|
|
5049
|
+
paymentTermsCustomDatePlaceholder: string;
|
|
5050
|
+
bankAccountFallbackName: string;
|
|
5051
|
+
/** `{embeddedBankName}` is replaced with the host's bank name. */
|
|
5052
|
+
bankAccountPoweredBy: string;
|
|
5053
|
+
bankAccountLinked: string;
|
|
5054
|
+
bankAccountHolderNameRequired: string;
|
|
5055
|
+
bankAccountHolderNameTooLong: string;
|
|
5056
|
+
bankAccountNumberRequired: string;
|
|
5057
|
+
bankAccountNumberDigitsOnly: string;
|
|
5058
|
+
bankAccountNumberTooShort: string;
|
|
5059
|
+
bankAccountNumberTooLong: string;
|
|
5060
|
+
bankAccountRoutingNumberRequired: string;
|
|
5061
|
+
bankAccountRoutingNumberInvalid: string;
|
|
5062
|
+
bankAccountNicknameTooLong: string;
|
|
5063
|
+
/** `{name}` is replaced with the new account's nickname. */
|
|
5064
|
+
bankAccountCreated: string;
|
|
5065
|
+
bankAccountCreateFailed: string;
|
|
5023
5066
|
untitledDocument: string;
|
|
5024
5067
|
unknownCustomer: string;
|
|
5025
5068
|
notAvailable: string;
|
|
@@ -5083,6 +5126,8 @@ interface ReceivableMessageLabels {
|
|
|
5083
5126
|
|
|
5084
5127
|
interface ReceivablesWidgetOwnProps {
|
|
5085
5128
|
defaultTab?: ReceivablesWidgetTab;
|
|
5129
|
+
/** Sponsor bank shown as "Powered by {bank}" beside embedded accounts. */
|
|
5130
|
+
embeddedBankName?: string;
|
|
5086
5131
|
enabledTabs?: ReceivablesWidgetTab[];
|
|
5087
5132
|
pageSizeOptions?: number[];
|
|
5088
5133
|
onReceivableCreated?: (id: string, type: ReceivableDocumentType) => void;
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import { InsightsWidget as L } from "./libs/tesouro-embedded-components-react/in
|
|
|
27
27
|
import { UploadReceiptWidget as R } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index2.js";
|
|
28
28
|
import { ExpenseManagementWidget as z } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index21.js";
|
|
29
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/
|
|
30
|
+
import { ReceivablesWidget as V } from "./libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js";
|
|
31
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";
|
|
@@ -868,6 +868,15 @@ interface ProductMessageLabels {
|
|
|
868
868
|
updateMeasureUnitError: string;
|
|
869
869
|
}
|
|
870
870
|
|
|
871
|
+
interface ReceivableBillingSectionLabels {
|
|
872
|
+
billingHeading: string;
|
|
873
|
+
billingDescription: string;
|
|
874
|
+
paymentTermsLabel: string;
|
|
875
|
+
paymentTermsPlaceholder: string;
|
|
876
|
+
paymentTermsReceiptDue: string;
|
|
877
|
+
paymentTermsCustomDate: string;
|
|
878
|
+
}
|
|
879
|
+
|
|
871
880
|
interface ReceivableStatusBadgeLabels {
|
|
872
881
|
draft: string;
|
|
873
882
|
issuing: string;
|
|
@@ -937,7 +946,7 @@ interface ReceivablesScreenLabels {
|
|
|
937
946
|
type ReceivablesScreenLabelOverrides = Partial<Omit<ReceivablesScreenLabels, 'statusBadge'>> & {
|
|
938
947
|
statusBadge?: Partial<ReceivableStatusBadgeLabels>;
|
|
939
948
|
};
|
|
940
|
-
interface ReceivableFormSheetLabels {
|
|
949
|
+
interface ReceivableFormSheetLabels extends ReceivableBillingSectionLabels {
|
|
941
950
|
createTitle: string;
|
|
942
951
|
editTitle: string;
|
|
943
952
|
hiddenDescription: string;
|
|
@@ -949,9 +958,6 @@ interface ReceivableFormSheetLabels {
|
|
|
949
958
|
currencyLabel: string;
|
|
950
959
|
issueDateLabel: string;
|
|
951
960
|
dueDateLabel: string;
|
|
952
|
-
paymentTermsLabel: string;
|
|
953
|
-
paymentTermsPlaceholder: string;
|
|
954
|
-
paymentTermsNone: string;
|
|
955
961
|
lineItemsHeading: string;
|
|
956
962
|
lineItemsDescription: string;
|
|
957
963
|
productLabel: string;
|
|
@@ -981,6 +987,26 @@ interface ReceivableFormSheetLabels {
|
|
|
981
987
|
closingNoteLabel: string;
|
|
982
988
|
closingNotePlaceholder: string;
|
|
983
989
|
closingNoteDescription: string;
|
|
990
|
+
bankAccountHeading: string;
|
|
991
|
+
bankAccountDescription: string;
|
|
992
|
+
bankAccountLabel: string;
|
|
993
|
+
bankAccountHint: string;
|
|
994
|
+
bankAccountSelectorLabel: string;
|
|
995
|
+
bankAccountPlaceholder: string;
|
|
996
|
+
bankAccountAddOption: string;
|
|
997
|
+
bankAccountFormHeading: string;
|
|
998
|
+
bankAccountRoutingNumberLabel: string;
|
|
999
|
+
bankAccountRoutingNumberPlaceholder: string;
|
|
1000
|
+
bankAccountAccountNumberLabel: string;
|
|
1001
|
+
bankAccountAccountNumberPlaceholder: string;
|
|
1002
|
+
bankAccountHolderNameLabel: string;
|
|
1003
|
+
bankAccountHolderNamePlaceholder: string;
|
|
1004
|
+
bankAccountNicknameLabel: string;
|
|
1005
|
+
bankAccountNicknamePlaceholder: string;
|
|
1006
|
+
bankAccountCancelButton: string;
|
|
1007
|
+
bankAccountSaveButton: string;
|
|
1008
|
+
bankAccountRestrictedTitle: string;
|
|
1009
|
+
bankAccountRestrictedDescription: string;
|
|
984
1010
|
attachmentsHeading: string;
|
|
985
1011
|
attachmentsDescription: string;
|
|
986
1012
|
attachmentsDropPrompt: string;
|
|
@@ -1064,6 +1090,23 @@ interface ReceivableMessageLabels {
|
|
|
1064
1090
|
paymentAmountInvalid: string;
|
|
1065
1091
|
genericError: string;
|
|
1066
1092
|
lineItemsLoading: string;
|
|
1093
|
+
paymentTermsCustomDatePlaceholder: string;
|
|
1094
|
+
bankAccountFallbackName: string;
|
|
1095
|
+
/** `{embeddedBankName}` is replaced with the host's bank name. */
|
|
1096
|
+
bankAccountPoweredBy: string;
|
|
1097
|
+
bankAccountLinked: string;
|
|
1098
|
+
bankAccountHolderNameRequired: string;
|
|
1099
|
+
bankAccountHolderNameTooLong: string;
|
|
1100
|
+
bankAccountNumberRequired: string;
|
|
1101
|
+
bankAccountNumberDigitsOnly: string;
|
|
1102
|
+
bankAccountNumberTooShort: string;
|
|
1103
|
+
bankAccountNumberTooLong: string;
|
|
1104
|
+
bankAccountRoutingNumberRequired: string;
|
|
1105
|
+
bankAccountRoutingNumberInvalid: string;
|
|
1106
|
+
bankAccountNicknameTooLong: string;
|
|
1107
|
+
/** `{name}` is replaced with the new account's nickname. */
|
|
1108
|
+
bankAccountCreated: string;
|
|
1109
|
+
bankAccountCreateFailed: string;
|
|
1067
1110
|
untitledDocument: string;
|
|
1068
1111
|
unknownCustomer: string;
|
|
1069
1112
|
notAvailable: string;
|
|
@@ -1127,6 +1170,8 @@ interface ReceivableMessageLabels {
|
|
|
1127
1170
|
|
|
1128
1171
|
interface ReceivablesWidgetOwnProps {
|
|
1129
1172
|
defaultTab?: ReceivablesWidgetTab;
|
|
1173
|
+
/** Sponsor bank shown as "Powered by {bank}" beside embedded accounts. */
|
|
1174
|
+
embeddedBankName?: string;
|
|
1130
1175
|
enabledTabs?: ReceivablesWidgetTab[];
|
|
1131
1176
|
pageSizeOptions?: number[];
|
|
1132
1177
|
onReceivableCreated?: (id: string, type: ReceivableDocumentType) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ReceivablesWidget as e } from "../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/
|
|
1
|
+
import { ReceivablesWidget as e } from "../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js";
|
|
3
3
|
export { e as ReceivablesWidget };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { usePaymentTermsQuery as e } from "../../../shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js";
|
|
2
2
|
import "../../../shared/data-access/dist/index.js";
|
|
3
3
|
import "./index2.js";
|
|
4
|
-
import "./index3.js";
|
|
5
|
-
import { useDeleteReceivableAttachmentMutation as
|
|
6
|
-
import { useSendReceivableEmailMutation as
|
|
7
|
-
import { useAcceptReceivableMutation as
|
|
4
|
+
import { useCreateEntityBankAccountMutation as t, usePaymentAccountsQuery as n } from "./index3.js";
|
|
5
|
+
import { useDeleteReceivableAttachmentMutation as r, useUploadReceivableAttachmentMutation as i } from "./index4.js";
|
|
6
|
+
import { useSendReceivableEmailMutation as a } from "./index5.js";
|
|
7
|
+
import { useAcceptReceivableMutation as o, useCancelReceivableMutation as s, useCloneReceivableMutation as c, useCreateReceivableMutation as l, useDeclineReceivableMutation as u, useDeleteReceivableMutation as d, useIssueReceivableMutation as f, useUpdateReceivableMutation as p } from "./index6.js";
|
|
8
8
|
import "./index7.js";
|
|
9
|
-
import { useMarkReceivablePaidMutation as
|
|
10
|
-
import { useReceivableHistoryQuery as
|
|
9
|
+
import { useMarkReceivablePaidMutation as m, useMarkReceivablePartiallyPaidMutation as h, useMarkReceivableUncollectibleMutation as g } from "./index8.js";
|
|
10
|
+
import { useReceivableHistoryQuery as _, useReceivableMailsQuery as v, useReceivablePdfLinkQuery as y, useReceivableQuery as b, useReceivablesQuery as x } from "./index9.js";
|
|
11
11
|
import "./index10.js";
|
|
12
12
|
import "./index11.js";
|
|
13
|
-
export {
|
|
13
|
+
export { o as useAcceptReceivableMutation, s as useCancelReceivableMutation, c as useCloneReceivableMutation, t as useCreateEntityBankAccountMutation, l as useCreateReceivableMutation, u as useDeclineReceivableMutation, r as useDeleteReceivableAttachmentMutation, d as useDeleteReceivableMutation, f as useIssueReceivableMutation, m as useMarkReceivablePaidMutation, h as useMarkReceivablePartiallyPaidMutation, g as useMarkReceivableUncollectibleMutation, n as usePaymentAccountsQuery, e as usePaymentTermsQuery, _ as useReceivableHistoryQuery, v as useReceivableMailsQuery, y as useReceivablePdfLinkQuery, b as useReceivableQuery, x as useReceivablesQuery, a as useSendReceivableEmailMutation, p as useUpdateReceivableMutation, i as useUploadReceivableAttachmentMutation };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js
CHANGED
|
@@ -1,48 +1,51 @@
|
|
|
1
|
-
import { getAnalyticsReceivablesQueryKey as e,
|
|
2
|
-
import { organizationHeaders as
|
|
1
|
+
import { getAnalyticsReceivablesQueryKey as e, getBankDetailsQueryKey as t, getFilesQueryKey as n, getPaymentRecordsQueryKey as r, getReceivablesIdHistoryQueryKey as i, getReceivablesIdMailsQueryKey as a, getReceivablesIdPdfLinkQueryKey as o, getReceivablesIdQueryKey as s, getReceivablesQueryKey as c } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
2
|
+
import { organizationHeaders as l } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
3
3
|
import "../../../shared/data-access/dist/index.js";
|
|
4
4
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js
|
|
5
|
-
var
|
|
6
|
-
let [n] =
|
|
5
|
+
var u = ({ client: e, organizationId: t }) => {
|
|
6
|
+
let [n] = c({
|
|
7
7
|
client: e,
|
|
8
|
-
headers:
|
|
8
|
+
headers: l(t)
|
|
9
9
|
}), r = { ...n };
|
|
10
10
|
return delete r.query, [r];
|
|
11
|
-
},
|
|
11
|
+
}, d = ({ client: e, organizationId: t, receivableId: n }) => s({
|
|
12
12
|
client: e,
|
|
13
|
-
headers:
|
|
14
|
-
path: { receivable_id: n }
|
|
15
|
-
}), d = ({ client: e, organizationId: t, receivableId: n }) => r({
|
|
16
|
-
client: e,
|
|
17
|
-
headers: c(t),
|
|
13
|
+
headers: l(t),
|
|
18
14
|
path: { receivable_id: n }
|
|
19
15
|
}), f = ({ client: e, organizationId: t, receivableId: n }) => i({
|
|
20
16
|
client: e,
|
|
21
|
-
headers:
|
|
17
|
+
headers: l(t),
|
|
22
18
|
path: { receivable_id: n }
|
|
23
19
|
}), p = ({ client: e, organizationId: t, receivableId: n }) => a({
|
|
24
20
|
client: e,
|
|
25
|
-
headers:
|
|
21
|
+
headers: l(t),
|
|
22
|
+
path: { receivable_id: n }
|
|
23
|
+
}), m = ({ client: e, organizationId: t, receivableId: n }) => o({
|
|
24
|
+
client: e,
|
|
25
|
+
headers: l(t),
|
|
26
26
|
path: { receivable_id: n }
|
|
27
|
-
}),
|
|
28
|
-
|
|
27
|
+
}), h = ({ client: e, organizationId: n }) => t({
|
|
28
|
+
client: e,
|
|
29
|
+
headers: l(n)
|
|
30
|
+
}), g = ({ client: e, organizationId: t }) => {
|
|
31
|
+
let [r] = n({
|
|
29
32
|
client: e,
|
|
30
|
-
headers:
|
|
33
|
+
headers: l(t)
|
|
31
34
|
}), i = { ...r };
|
|
32
35
|
return delete i.query, [i];
|
|
33
|
-
},
|
|
34
|
-
let [
|
|
36
|
+
}, _ = ({ client: e, organizationId: t }) => {
|
|
37
|
+
let [n] = r({
|
|
35
38
|
client: e,
|
|
36
|
-
headers:
|
|
37
|
-
}), i = { ...
|
|
39
|
+
headers: l(t)
|
|
40
|
+
}), i = { ...n };
|
|
38
41
|
return delete i.query, [i];
|
|
39
|
-
},
|
|
42
|
+
}, v = ({ client: t, organizationId: n }) => {
|
|
40
43
|
let [r] = e({
|
|
41
44
|
client: t,
|
|
42
|
-
headers:
|
|
45
|
+
headers: l(n),
|
|
43
46
|
query: {}
|
|
44
47
|
}), i = { ...r };
|
|
45
48
|
return delete i.query, [i];
|
|
46
49
|
};
|
|
47
50
|
//#endregion
|
|
48
|
-
export { h as paymentRecordsInvalidationKey,
|
|
51
|
+
export { h as entityBankAccountsInvalidationKey, _ as paymentRecordsInvalidationKey, g as receivableAttachmentsInvalidationKey, f as receivableHistoryInvalidationKey, d as receivableInvalidationKey, p as receivableMailsInvalidationKey, m as receivablePdfInvalidationKey, v as receivablesAnalyticsInvalidationKey, u as receivablesInvalidationKey };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js
CHANGED
|
@@ -2,6 +2,83 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
+
import { postBankDetails as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { getBankDetailsOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
+
import { withAuthEpoch as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { invalidateAllClients as r } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
9
|
+
import { useEmbedApi as i } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
10
|
+
import { organizationHeaders as a } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
11
|
+
import { useAllBankAccountsQuery as o } from "../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
|
|
12
|
+
import { useAllExternalBankAccountsQuery as s } from "../../../shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js";
|
|
5
13
|
import "../../../shared/data-access/dist/index.js";
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
14
|
+
import { entityBankAccountsInvalidationKey as c } from "./index2.js";
|
|
15
|
+
import { useMemo as l } from "react";
|
|
16
|
+
import { useMutation as u, useQuery as d } from "@tanstack/react-query";
|
|
17
|
+
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js
|
|
18
|
+
function f({ enabled: e = !0 } = {}) {
|
|
19
|
+
let { client: r, organizationId: o, widgetToken: s, authEpoch: c, organizationPending: l } = i(), u = t({
|
|
20
|
+
client: r,
|
|
21
|
+
headers: a(o)
|
|
22
|
+
});
|
|
23
|
+
return d({
|
|
24
|
+
...n(u, {
|
|
25
|
+
authEpoch: c,
|
|
26
|
+
organizationPending: l
|
|
27
|
+
}),
|
|
28
|
+
enabled: e && !!(o && s)
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function p() {
|
|
32
|
+
let { client: t, organizationId: n } = i();
|
|
33
|
+
return u({
|
|
34
|
+
mutationFn: async ({ body: r }) => {
|
|
35
|
+
let { data: i } = await e({
|
|
36
|
+
client: t,
|
|
37
|
+
headers: a(n),
|
|
38
|
+
body: r,
|
|
39
|
+
throwOnError: !0
|
|
40
|
+
});
|
|
41
|
+
return i;
|
|
42
|
+
},
|
|
43
|
+
onSuccess: async () => {
|
|
44
|
+
await r(c({
|
|
45
|
+
client: t,
|
|
46
|
+
organizationId: n
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
var m = (e) => e ? e.slice(-4) : null;
|
|
52
|
+
function h({ enabled: e = !0, canReadEmbedded: t = !1, canReadExternal: n = !1 } = {}) {
|
|
53
|
+
let { organizationId: r, widgetToken: a, organizationPending: c } = i(), u = e && !!(a && (r || c)), d = u && t, p = u && n, h = f({ enabled: e }), g = o({ enabled: d }), _ = s({ enabled: p }), v = u ? h.data?.data : void 0, y = d ? g.data?.data : void 0, b = p ? _.data?.data : void 0, x = l(() => [
|
|
54
|
+
...(v ?? []).map((e) => ({
|
|
55
|
+
id: e.id,
|
|
56
|
+
type: "BANK_DETAILS",
|
|
57
|
+
displayName: e.display_name ?? null,
|
|
58
|
+
accountNumberLast4: m(e.account_number) ?? e.account_number_last4 ?? null
|
|
59
|
+
})),
|
|
60
|
+
...(y ?? []).filter((e) => e.status === "ACTIVE").map((e) => ({
|
|
61
|
+
id: e.id,
|
|
62
|
+
type: "INTERNAL",
|
|
63
|
+
displayName: e.nickname ?? null,
|
|
64
|
+
accountNumberLast4: m(e.accountNumber)
|
|
65
|
+
})),
|
|
66
|
+
...(b ?? []).filter((e) => e.accountStatus === "ACTIVE" && e.verificationStatus === "VERIFIED").map((e) => ({
|
|
67
|
+
id: e.id,
|
|
68
|
+
type: "EXTERNAL",
|
|
69
|
+
displayName: e.nickname || e.nameOnAccount || null,
|
|
70
|
+
accountNumberLast4: m(e.accountNumber)
|
|
71
|
+
}))
|
|
72
|
+
], [
|
|
73
|
+
v,
|
|
74
|
+
y,
|
|
75
|
+
b
|
|
76
|
+
]), S = u && h.isLoading || d && g.isLoading || p && _.isLoading;
|
|
77
|
+
return {
|
|
78
|
+
paymentAccounts: x,
|
|
79
|
+
isLoading: S,
|
|
80
|
+
isIncomplete: S || u && c || u && (h.isFetching || h.isError) || d && (g.isFetching || g.isError || g.hasNextPage) || p && (_.isFetching || _.isError || _.hasNextPage) || !!(u && h.data?.next_pagination_token)
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
export { p as useCreateEntityBankAccountMutation, f as useEntityBankAccountsQuery, h as usePaymentAccountsQuery };
|