@tesouro/embedded-components-react 0.7.37 → 0.7.41
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 +2 -2
- package/dist/fixtures/index.d.ts +1 -1
- package/dist/index.d.ts +21 -14
- package/dist/lib/CounterpartsWidget.d.ts +16 -14
- package/dist/lib/CounterpartsWidgetPublic.d.ts +16 -14
- package/dist/lib/CustomersWidget.d.ts +16 -14
- package/dist/lib/TransfersWidget.d.ts +5 -0
- package/dist/lib/WidgetSuite.d.ts +5 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldInput/formatPhoneNumberInput.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/mocks/bankAccounts.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +30 -29
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/constants.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsTable.js +143 -95
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsWidget.js +60 -48
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/mocks/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +22 -15
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +137 -135
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +106 -108
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +50 -50
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +22 -22
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index3.js +6 -7
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +14 -34
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index7.js +16 -13
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index8.js +4 -10
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/TransfersWidgetInner.js +99 -75
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/featureLabels.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/useTransfersPageState.js +49 -0
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/mocks/labels.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/mocks/transfers.js +103 -85
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransfersWidget.js +73 -61
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/labels.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -328,7 +328,7 @@ Manages an organization's customers or vendors: a searchable list with money col
|
|
|
328
328
|
| Prop | Type | Default | Description |
|
|
329
329
|
| -------------------- | ------------------------------------------------ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
330
330
|
| `counterpartType` | `'customer' \| 'vendor'` | **Required** | Selects the customer or vendor surface. |
|
|
331
|
-
| `pageSizeOptions` | `number[]` | `[10, 25, 50, 100]` | Page-size choices shown by the table.
|
|
331
|
+
| `pageSizeOptions` | `number[]` | `[10, 25, 50, 100]` | Page-size choices shown by the table. The list opens at the first one. |
|
|
332
332
|
| `onViewAllDocuments` | `(counterpart: CounterpartActionTarget) => void` | `undefined` | Shows a "View all" action by the details sheet's recent bills/invoices and passes the counterpart's `id` and `name`. Hidden when omitted. |
|
|
333
333
|
| `onCreateDocument` | `(counterpart: CounterpartActionTarget) => void` | `undefined` | Runs the details sheet's "Send a payment" (vendor) or "Issue an invoice" (customer) button. Hidden when omitted; you check the scopes it needs. |
|
|
334
334
|
| `screenLabels` | `Partial<CounterpartsScreenLabels>` | English labels | Table, search/filter, empty, error and access-restricted copy. |
|
|
@@ -347,7 +347,7 @@ Manages an organization's customers: a searchable list with money columns, a det
|
|
|
347
347
|
|
|
348
348
|
| Prop | Type | Default | Description |
|
|
349
349
|
| -------------------- | --------------------------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
350
|
-
| `pageSizeOptions` | `number[]` | `[10, 25, 50, 100]` | Page-size choices shown by the table.
|
|
350
|
+
| `pageSizeOptions` | `number[]` | `[10, 25, 50, 100]` | Page-size choices shown by the table. The list opens at the first one. |
|
|
351
351
|
| `onViewAllDocuments` | `(customer: CounterpartActionTarget) => void` | `undefined` | Shows a "View all" action on the details sheet's recent invoices and passes the customer's `id` and `name`; omit to hide it. |
|
|
352
352
|
| `onCreateDocument` | `(customer: CounterpartActionTarget) => void` | `undefined` | Handles "Issue an invoice" with the customer's `id` and `name`; omit to hide the button. You check invoice scopes. |
|
|
353
353
|
| `screenLabels` | `Partial<CounterpartsScreenLabels>` | English labels | Table, search, filter, empty and error copy. |
|
package/dist/fixtures/index.d.ts
CHANGED
|
@@ -4516,7 +4516,7 @@ declare const A_COMPLETE_BANK_ACCOUNT_APPLICATION: ApplicationStatusEntry;
|
|
|
4516
4516
|
declare const AN_EXTERNAL_BANK_ACCOUNT: ExternalBankAccountResponse;
|
|
4517
4517
|
/**
|
|
4518
4518
|
* One completed book transfer out of {@link A_BANK_ACCOUNT}, as
|
|
4519
|
-
* `GET /bank-accounts/
|
|
4519
|
+
* `GET /bank-accounts/transfers` returns it.
|
|
4520
4520
|
*
|
|
4521
4521
|
* Both ends are `{ id, nickname }` and nothing more, which is the whole reason
|
|
4522
4522
|
* the transfers list is a two-read screen: the id is resolved against the
|
package/dist/index.d.ts
CHANGED
|
@@ -3699,6 +3699,9 @@ interface TransfersWidgetLabels {
|
|
|
3699
3699
|
loadErrorRetry: string;
|
|
3700
3700
|
emptyTitle: string;
|
|
3701
3701
|
emptyDescription: string;
|
|
3702
|
+
paginationRowsPerPage: string;
|
|
3703
|
+
paginationPreviousPage: string;
|
|
3704
|
+
paginationNextPage: string;
|
|
3702
3705
|
modalTitle: string;
|
|
3703
3706
|
/** Shown under the title on the accounts step (e.g. ACH timing). */
|
|
3704
3707
|
modalAccountsSubtitle: string;
|
|
@@ -3757,6 +3760,8 @@ interface FeatureLabels {
|
|
|
3757
3760
|
routeSeparator: string;
|
|
3758
3761
|
defaultCurrencyCode: string;
|
|
3759
3762
|
defaultSecCode: string;
|
|
3763
|
+
/** Prefix before the page's row range, e.g. "Viewing 1-25". */
|
|
3764
|
+
viewingRangeLabel: string;
|
|
3760
3765
|
}
|
|
3761
3766
|
declare const DEFAULT_FEATURE_LABELS: FeatureLabels;
|
|
3762
3767
|
|
|
@@ -4540,36 +4545,35 @@ interface GapCoverageAlertProps {
|
|
|
4540
4545
|
testIds?: GapCoverageAlertTestIds;
|
|
4541
4546
|
}
|
|
4542
4547
|
|
|
4543
|
-
/**
|
|
4544
|
-
* Co-located user-facing strings for the counterparts widget UI. Each component
|
|
4545
|
-
* takes a `labels?: Partial<...Labels>` prop merged over the matching
|
|
4546
|
-
* `*_LABELS_EN` default, so integrators can re-label without forking the UI.
|
|
4547
|
-
*/
|
|
4548
4548
|
interface CounterpartsScreenLabels {
|
|
4549
4549
|
/** Customer-mode create action. */
|
|
4550
4550
|
createButton: string;
|
|
4551
|
-
/** Vendor-mode create action
|
|
4551
|
+
/** Vendor-mode create action. */
|
|
4552
4552
|
vendorsCreateButton: string;
|
|
4553
4553
|
columnName: string;
|
|
4554
4554
|
sortByName: string;
|
|
4555
|
-
/** Customer mode only — the vendor table has no billed column. */
|
|
4556
4555
|
columnBilledAmount: string;
|
|
4557
4556
|
columnReceivedAmount: string;
|
|
4558
4557
|
columnAmountDue: string;
|
|
4559
4558
|
columnTotalPaidToDate: string;
|
|
4560
4559
|
columnBalanceDue: string;
|
|
4561
|
-
columnActions: string;
|
|
4562
4560
|
/**
|
|
4563
4561
|
* A focused row's accessible name. The row itself is the control that
|
|
4564
4562
|
* opens it, so the name says what Enter does. A template so locales own the
|
|
4565
4563
|
* wording and order.
|
|
4566
4564
|
*/
|
|
4567
4565
|
openRow: (counterpartName: string) => string;
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
deleteAction: string;
|
|
4566
|
+
/** Shown in the name cell when a counterpart has no name. */
|
|
4567
|
+
unnamedCounterpart: string;
|
|
4571
4568
|
searchPlaceholder: string;
|
|
4572
|
-
|
|
4569
|
+
searchLabel: string;
|
|
4570
|
+
filtersButton: string;
|
|
4571
|
+
filterFieldType: string;
|
|
4572
|
+
/** Accessible name of a chip's dismiss button. `{label}` is the chip's text. */
|
|
4573
|
+
filterChipRemove: string;
|
|
4574
|
+
typeChip: (value: string) => string;
|
|
4575
|
+
searchChip: (value: string) => string;
|
|
4576
|
+
clearAllFilters: string;
|
|
4573
4577
|
entityFilterOrganization: string;
|
|
4574
4578
|
entityFilterIndividual: string;
|
|
4575
4579
|
customersEmptyTitle: string;
|
|
@@ -4581,8 +4585,11 @@ interface CounterpartsScreenLabels {
|
|
|
4581
4585
|
customersFilterEmptyTitle: string;
|
|
4582
4586
|
vendorsFilterEmptyTitle: string;
|
|
4583
4587
|
filterEmptyDescription: string;
|
|
4584
|
-
|
|
4585
|
-
|
|
4588
|
+
filterEmptyAction: string;
|
|
4589
|
+
customersErrorTitle: string;
|
|
4590
|
+
customersErrorDescription: string;
|
|
4591
|
+
vendorsErrorTitle: string;
|
|
4592
|
+
vendorsErrorDescription: string;
|
|
4586
4593
|
errorRetry: string;
|
|
4587
4594
|
accessRestrictedTitle: string;
|
|
4588
4595
|
accessRestrictedDescription: string;
|
|
@@ -813,36 +813,35 @@ interface CounterpartMessageLabels {
|
|
|
813
813
|
deleteBankAccountFailed: string;
|
|
814
814
|
}
|
|
815
815
|
|
|
816
|
-
/**
|
|
817
|
-
* Co-located user-facing strings for the counterparts widget UI. Each component
|
|
818
|
-
* takes a `labels?: Partial<...Labels>` prop merged over the matching
|
|
819
|
-
* `*_LABELS_EN` default, so integrators can re-label without forking the UI.
|
|
820
|
-
*/
|
|
821
816
|
interface CounterpartsScreenLabels {
|
|
822
817
|
/** Customer-mode create action. */
|
|
823
818
|
createButton: string;
|
|
824
|
-
/** Vendor-mode create action
|
|
819
|
+
/** Vendor-mode create action. */
|
|
825
820
|
vendorsCreateButton: string;
|
|
826
821
|
columnName: string;
|
|
827
822
|
sortByName: string;
|
|
828
|
-
/** Customer mode only — the vendor table has no billed column. */
|
|
829
823
|
columnBilledAmount: string;
|
|
830
824
|
columnReceivedAmount: string;
|
|
831
825
|
columnAmountDue: string;
|
|
832
826
|
columnTotalPaidToDate: string;
|
|
833
827
|
columnBalanceDue: string;
|
|
834
|
-
columnActions: string;
|
|
835
828
|
/**
|
|
836
829
|
* A focused row's accessible name. The row itself is the control that
|
|
837
830
|
* opens it, so the name says what Enter does. A template so locales own the
|
|
838
831
|
* wording and order.
|
|
839
832
|
*/
|
|
840
833
|
openRow: (counterpartName: string) => string;
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
deleteAction: string;
|
|
834
|
+
/** Shown in the name cell when a counterpart has no name. */
|
|
835
|
+
unnamedCounterpart: string;
|
|
844
836
|
searchPlaceholder: string;
|
|
845
|
-
|
|
837
|
+
searchLabel: string;
|
|
838
|
+
filtersButton: string;
|
|
839
|
+
filterFieldType: string;
|
|
840
|
+
/** Accessible name of a chip's dismiss button. `{label}` is the chip's text. */
|
|
841
|
+
filterChipRemove: string;
|
|
842
|
+
typeChip: (value: string) => string;
|
|
843
|
+
searchChip: (value: string) => string;
|
|
844
|
+
clearAllFilters: string;
|
|
846
845
|
entityFilterOrganization: string;
|
|
847
846
|
entityFilterIndividual: string;
|
|
848
847
|
customersEmptyTitle: string;
|
|
@@ -854,8 +853,11 @@ interface CounterpartsScreenLabels {
|
|
|
854
853
|
customersFilterEmptyTitle: string;
|
|
855
854
|
vendorsFilterEmptyTitle: string;
|
|
856
855
|
filterEmptyDescription: string;
|
|
857
|
-
|
|
858
|
-
|
|
856
|
+
filterEmptyAction: string;
|
|
857
|
+
customersErrorTitle: string;
|
|
858
|
+
customersErrorDescription: string;
|
|
859
|
+
vendorsErrorTitle: string;
|
|
860
|
+
vendorsErrorDescription: string;
|
|
859
861
|
errorRetry: string;
|
|
860
862
|
accessRestrictedTitle: string;
|
|
861
863
|
accessRestrictedDescription: string;
|
|
@@ -813,36 +813,35 @@ interface CounterpartMessageLabels {
|
|
|
813
813
|
deleteBankAccountFailed: string;
|
|
814
814
|
}
|
|
815
815
|
|
|
816
|
-
/**
|
|
817
|
-
* Co-located user-facing strings for the counterparts widget UI. Each component
|
|
818
|
-
* takes a `labels?: Partial<...Labels>` prop merged over the matching
|
|
819
|
-
* `*_LABELS_EN` default, so integrators can re-label without forking the UI.
|
|
820
|
-
*/
|
|
821
816
|
interface CounterpartsScreenLabels {
|
|
822
817
|
/** Customer-mode create action. */
|
|
823
818
|
createButton: string;
|
|
824
|
-
/** Vendor-mode create action
|
|
819
|
+
/** Vendor-mode create action. */
|
|
825
820
|
vendorsCreateButton: string;
|
|
826
821
|
columnName: string;
|
|
827
822
|
sortByName: string;
|
|
828
|
-
/** Customer mode only — the vendor table has no billed column. */
|
|
829
823
|
columnBilledAmount: string;
|
|
830
824
|
columnReceivedAmount: string;
|
|
831
825
|
columnAmountDue: string;
|
|
832
826
|
columnTotalPaidToDate: string;
|
|
833
827
|
columnBalanceDue: string;
|
|
834
|
-
columnActions: string;
|
|
835
828
|
/**
|
|
836
829
|
* A focused row's accessible name. The row itself is the control that
|
|
837
830
|
* opens it, so the name says what Enter does. A template so locales own the
|
|
838
831
|
* wording and order.
|
|
839
832
|
*/
|
|
840
833
|
openRow: (counterpartName: string) => string;
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
deleteAction: string;
|
|
834
|
+
/** Shown in the name cell when a counterpart has no name. */
|
|
835
|
+
unnamedCounterpart: string;
|
|
844
836
|
searchPlaceholder: string;
|
|
845
|
-
|
|
837
|
+
searchLabel: string;
|
|
838
|
+
filtersButton: string;
|
|
839
|
+
filterFieldType: string;
|
|
840
|
+
/** Accessible name of a chip's dismiss button. `{label}` is the chip's text. */
|
|
841
|
+
filterChipRemove: string;
|
|
842
|
+
typeChip: (value: string) => string;
|
|
843
|
+
searchChip: (value: string) => string;
|
|
844
|
+
clearAllFilters: string;
|
|
846
845
|
entityFilterOrganization: string;
|
|
847
846
|
entityFilterIndividual: string;
|
|
848
847
|
customersEmptyTitle: string;
|
|
@@ -854,8 +853,11 @@ interface CounterpartsScreenLabels {
|
|
|
854
853
|
customersFilterEmptyTitle: string;
|
|
855
854
|
vendorsFilterEmptyTitle: string;
|
|
856
855
|
filterEmptyDescription: string;
|
|
857
|
-
|
|
858
|
-
|
|
856
|
+
filterEmptyAction: string;
|
|
857
|
+
customersErrorTitle: string;
|
|
858
|
+
customersErrorDescription: string;
|
|
859
|
+
vendorsErrorTitle: string;
|
|
860
|
+
vendorsErrorDescription: string;
|
|
859
861
|
errorRetry: string;
|
|
860
862
|
accessRestrictedTitle: string;
|
|
861
863
|
accessRestrictedDescription: string;
|
|
@@ -803,36 +803,35 @@ interface CounterpartMessageLabels {
|
|
|
803
803
|
deleteBankAccountFailed: string;
|
|
804
804
|
}
|
|
805
805
|
|
|
806
|
-
/**
|
|
807
|
-
* Co-located user-facing strings for the counterparts widget UI. Each component
|
|
808
|
-
* takes a `labels?: Partial<...Labels>` prop merged over the matching
|
|
809
|
-
* `*_LABELS_EN` default, so integrators can re-label without forking the UI.
|
|
810
|
-
*/
|
|
811
806
|
interface CounterpartsScreenLabels {
|
|
812
807
|
/** Customer-mode create action. */
|
|
813
808
|
createButton: string;
|
|
814
|
-
/** Vendor-mode create action
|
|
809
|
+
/** Vendor-mode create action. */
|
|
815
810
|
vendorsCreateButton: string;
|
|
816
811
|
columnName: string;
|
|
817
812
|
sortByName: string;
|
|
818
|
-
/** Customer mode only — the vendor table has no billed column. */
|
|
819
813
|
columnBilledAmount: string;
|
|
820
814
|
columnReceivedAmount: string;
|
|
821
815
|
columnAmountDue: string;
|
|
822
816
|
columnTotalPaidToDate: string;
|
|
823
817
|
columnBalanceDue: string;
|
|
824
|
-
columnActions: string;
|
|
825
818
|
/**
|
|
826
819
|
* A focused row's accessible name. The row itself is the control that
|
|
827
820
|
* opens it, so the name says what Enter does. A template so locales own the
|
|
828
821
|
* wording and order.
|
|
829
822
|
*/
|
|
830
823
|
openRow: (counterpartName: string) => string;
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
deleteAction: string;
|
|
824
|
+
/** Shown in the name cell when a counterpart has no name. */
|
|
825
|
+
unnamedCounterpart: string;
|
|
834
826
|
searchPlaceholder: string;
|
|
835
|
-
|
|
827
|
+
searchLabel: string;
|
|
828
|
+
filtersButton: string;
|
|
829
|
+
filterFieldType: string;
|
|
830
|
+
/** Accessible name of a chip's dismiss button. `{label}` is the chip's text. */
|
|
831
|
+
filterChipRemove: string;
|
|
832
|
+
typeChip: (value: string) => string;
|
|
833
|
+
searchChip: (value: string) => string;
|
|
834
|
+
clearAllFilters: string;
|
|
836
835
|
entityFilterOrganization: string;
|
|
837
836
|
entityFilterIndividual: string;
|
|
838
837
|
customersEmptyTitle: string;
|
|
@@ -844,8 +843,11 @@ interface CounterpartsScreenLabels {
|
|
|
844
843
|
customersFilterEmptyTitle: string;
|
|
845
844
|
vendorsFilterEmptyTitle: string;
|
|
846
845
|
filterEmptyDescription: string;
|
|
847
|
-
|
|
848
|
-
|
|
846
|
+
filterEmptyAction: string;
|
|
847
|
+
customersErrorTitle: string;
|
|
848
|
+
customersErrorDescription: string;
|
|
849
|
+
vendorsErrorTitle: string;
|
|
850
|
+
vendorsErrorDescription: string;
|
|
849
851
|
errorRetry: string;
|
|
850
852
|
accessRestrictedTitle: string;
|
|
851
853
|
accessRestrictedDescription: string;
|
|
@@ -645,6 +645,9 @@ interface TransfersWidgetLabels {
|
|
|
645
645
|
loadErrorRetry: string;
|
|
646
646
|
emptyTitle: string;
|
|
647
647
|
emptyDescription: string;
|
|
648
|
+
paginationRowsPerPage: string;
|
|
649
|
+
paginationPreviousPage: string;
|
|
650
|
+
paginationNextPage: string;
|
|
648
651
|
modalTitle: string;
|
|
649
652
|
/** Shown under the title on the accounts step (e.g. ACH timing). */
|
|
650
653
|
modalAccountsSubtitle: string;
|
|
@@ -703,6 +706,8 @@ interface FeatureLabels {
|
|
|
703
706
|
routeSeparator: string;
|
|
704
707
|
defaultCurrencyCode: string;
|
|
705
708
|
defaultSecCode: string;
|
|
709
|
+
/** Prefix before the page's row range, e.g. "Viewing 1-25". */
|
|
710
|
+
viewingRangeLabel: string;
|
|
706
711
|
}
|
|
707
712
|
declare const DEFAULT_FEATURE_LABELS: FeatureLabels;
|
|
708
713
|
|
|
@@ -2737,6 +2737,9 @@ interface TransfersWidgetLabels {
|
|
|
2737
2737
|
loadErrorRetry: string;
|
|
2738
2738
|
emptyTitle: string;
|
|
2739
2739
|
emptyDescription: string;
|
|
2740
|
+
paginationRowsPerPage: string;
|
|
2741
|
+
paginationPreviousPage: string;
|
|
2742
|
+
paginationNextPage: string;
|
|
2740
2743
|
modalTitle: string;
|
|
2741
2744
|
/** Shown under the title on the accounts step (e.g. ACH timing). */
|
|
2742
2745
|
modalAccountsSubtitle: string;
|
|
@@ -2794,6 +2797,8 @@ interface FeatureLabels {
|
|
|
2794
2797
|
routeSeparator: string;
|
|
2795
2798
|
defaultCurrencyCode: string;
|
|
2796
2799
|
defaultSecCode: string;
|
|
2800
|
+
/** Prefix before the page's row range, e.g. "Viewing 1-25". */
|
|
2801
|
+
viewingRangeLabel: string;
|
|
2797
2802
|
}
|
|
2798
2803
|
|
|
2799
2804
|
interface TransfersWidgetPassthroughProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldInput/formatPhoneNumberInput.js
|
|
2
2
|
function e(e) {
|
|
3
|
-
let t = e.replace(/\D/g, "").slice(0, 10),
|
|
4
|
-
return
|
|
3
|
+
let t = e.replace(/\D/g, ""), n = (t.length === 11 && t.startsWith("1") ? t.slice(1) : t).slice(0, 10), r = n.slice(0, 3), i = n.slice(3, 6), a = n.slice(6, 10);
|
|
4
|
+
return n.length > 6 ? `${r}-${i}-${a}` : n.length > 3 ? `${r}-${i}` : r;
|
|
5
5
|
}
|
|
6
6
|
//#endregion
|
|
7
7
|
export { e as formatPhoneNumberInput };
|
|
@@ -96,7 +96,10 @@ var C = [e.BankAccountReadOrg], w = [e.BankAccountReadOrg, e.BankAccountWriteOrg
|
|
|
96
96
|
let r = t.get("Status") === "INVITED";
|
|
97
97
|
return t.has("Permissions") ? p(z(r ? [] : [n])) : p(z(r ? [R] : [n, L]));
|
|
98
98
|
}), c((e) => e === `${o}/roles`, () => p(z([t, I])))], V = `${s}/bank-accounts`, H = (e) => e === V, U = (e = {}) => {
|
|
99
|
-
let t = [...O], n = y(), r = 0, i = (e) => t.find((t) => t.id === e), a = () => h(404, "Not Found", "No such bank account.")
|
|
99
|
+
let t = [...O], n = y(), r = 0, i = (e) => t.find((t) => t.id === e), a = () => h(404, "Not Found", "No such bank account."), o = d("GET", `${V}/:id`, (e, { id: t }) => {
|
|
100
|
+
let n = i(t);
|
|
101
|
+
return n ? p(n) : a();
|
|
102
|
+
});
|
|
100
103
|
return [
|
|
101
104
|
...B(e.rosterFails),
|
|
102
105
|
c((e) => e === V, () => p(z(t))),
|
|
@@ -108,10 +111,7 @@ var C = [e.BankAccountReadOrg], w = [e.BankAccountReadOrg, e.BankAccountWriteOrg
|
|
|
108
111
|
return t.push(a), p(a, 201);
|
|
109
112
|
}),
|
|
110
113
|
d("POST", `${V}/:id/access`, () => m()),
|
|
111
|
-
|
|
112
|
-
let n = i(t);
|
|
113
|
-
return n ? p(n) : a();
|
|
114
|
-
}),
|
|
114
|
+
(e) => e.path === `${V}/transfers` ? void 0 : o(e),
|
|
115
115
|
d("PATCH", `${V}/:id`, async (e, { id: n }) => {
|
|
116
116
|
let r = t.findIndex((e) => e.id === n), i = t[r];
|
|
117
117
|
if (!i) return a();
|
|
@@ -24,18 +24,22 @@ function h({ counterpartType: n, pageSizeOptions: o = l, onViewAllDocuments: h,
|
|
|
24
24
|
d(() => {
|
|
25
25
|
w(a.Mounted);
|
|
26
26
|
}, [w]);
|
|
27
|
-
let { stateOptions: T, selectedId: E, view: D, table: O,
|
|
27
|
+
let { stateOptions: T, selectedId: E, view: D, table: O, listError: k, details: A, detailsSheetView: j, permissions: M, isPermissionLoading: N, actions: P, handleRowClick: F, closeDetails: I } = u({
|
|
28
28
|
counterpartType: n,
|
|
29
|
+
pageSizeOptions: o,
|
|
29
30
|
detailsLabels: y,
|
|
30
|
-
messageLabels: C
|
|
31
|
-
|
|
31
|
+
messageLabels: C,
|
|
32
|
+
screenLabels: _
|
|
33
|
+
}), { form: L } = P;
|
|
32
34
|
return /* @__PURE__ */ m(f, { children: [
|
|
33
35
|
/* @__PURE__ */ p(e, {}),
|
|
34
36
|
/* @__PURE__ */ p(s, {
|
|
35
37
|
mode: n,
|
|
36
38
|
counterparts: O.rows,
|
|
37
|
-
isLoading:
|
|
39
|
+
isLoading: N || O.isLoading,
|
|
38
40
|
isError: O.isError,
|
|
41
|
+
errorTitle: k.title,
|
|
42
|
+
errorDescription: k.description,
|
|
39
43
|
sorting: O.sorting,
|
|
40
44
|
onSortingChange: O.onSortingChange,
|
|
41
45
|
pageSize: O.pageSize,
|
|
@@ -45,15 +49,12 @@ function h({ counterpartType: n, pageSizeOptions: o = l, onViewAllDocuments: h,
|
|
|
45
49
|
hasPrevPage: O.hasPrevPage,
|
|
46
50
|
onNextPage: O.onNextPage,
|
|
47
51
|
onPrevPage: O.onPrevPage,
|
|
48
|
-
|
|
49
|
-
onSearchChange: O.onSearchChange,
|
|
50
|
-
entityFilter: O.entityFilter,
|
|
51
|
-
onEntityFilterChange: O.onEntityFilterChange,
|
|
52
|
+
filters: O.filters,
|
|
52
53
|
isFiltering: O.isFiltering,
|
|
53
|
-
canCreate:
|
|
54
|
-
isAccessRestricted: !
|
|
55
|
-
onCreateClick:
|
|
56
|
-
onRowClick:
|
|
54
|
+
canCreate: M.canCreate,
|
|
55
|
+
isAccessRestricted: !N && !M.canRead,
|
|
56
|
+
onCreateClick: M.canCreate ? L.openCreate : () => void 0,
|
|
57
|
+
onRowClick: F,
|
|
57
58
|
onRetry: O.onRetry,
|
|
58
59
|
labels: _,
|
|
59
60
|
emptyStateTestId: "counterparts-widget-empty-state",
|
|
@@ -62,36 +63,36 @@ function h({ counterpartType: n, pageSizeOptions: o = l, onViewAllDocuments: h,
|
|
|
62
63
|
/* @__PURE__ */ p(r, {
|
|
63
64
|
open: D === "create",
|
|
64
65
|
onOpenChange: (e) => {
|
|
65
|
-
e ||
|
|
66
|
+
e || L.close();
|
|
66
67
|
},
|
|
67
68
|
mode: "create",
|
|
68
69
|
counterpartMode: n,
|
|
69
|
-
values:
|
|
70
|
-
errors:
|
|
70
|
+
values: L.values,
|
|
71
|
+
errors: L.errors,
|
|
71
72
|
stateOptions: T,
|
|
72
|
-
taxIdField: i(
|
|
73
|
-
inProgress:
|
|
74
|
-
submitDisabled:
|
|
75
|
-
onChange: (e) =>
|
|
73
|
+
taxIdField: i(L.values.entityType, n, v),
|
|
74
|
+
inProgress: L.isSubmitting,
|
|
75
|
+
submitDisabled: L.isSubmitting,
|
|
76
|
+
onChange: (e) => L.setValues((t) => ({
|
|
76
77
|
...t,
|
|
77
78
|
...e
|
|
78
79
|
})),
|
|
79
|
-
onAddressChange: (e) =>
|
|
80
|
+
onAddressChange: (e) => L.setValues((t) => ({
|
|
80
81
|
...t,
|
|
81
82
|
address: {
|
|
82
83
|
...t.address,
|
|
83
84
|
...e
|
|
84
85
|
}
|
|
85
86
|
})),
|
|
86
|
-
onBankAccountChange: (e) =>
|
|
87
|
+
onBankAccountChange: (e) => L.setValues((t) => ({
|
|
87
88
|
...t,
|
|
88
89
|
bankAccount: {
|
|
89
90
|
...t.bankAccount,
|
|
90
91
|
...e
|
|
91
92
|
}
|
|
92
93
|
})),
|
|
93
|
-
onSubmit:
|
|
94
|
-
onCancel:
|
|
94
|
+
onSubmit: L.submit,
|
|
95
|
+
onCancel: L.close,
|
|
95
96
|
labels: v
|
|
96
97
|
}),
|
|
97
98
|
/* @__PURE__ */ p(c, {
|
|
@@ -99,13 +100,13 @@ function h({ counterpartType: n, pageSizeOptions: o = l, onViewAllDocuments: h,
|
|
|
99
100
|
open: E !== void 0 && (D === "none" || D === "edit"),
|
|
100
101
|
selectedId: E,
|
|
101
102
|
view: D,
|
|
102
|
-
details:
|
|
103
|
-
detailsSheetView:
|
|
104
|
-
actions:
|
|
103
|
+
details: A,
|
|
104
|
+
detailsSheetView: j,
|
|
105
|
+
actions: P,
|
|
105
106
|
stateOptions: T,
|
|
106
|
-
canEdit:
|
|
107
|
-
canDelete:
|
|
108
|
-
onClose:
|
|
107
|
+
canEdit: M.canUpdate,
|
|
108
|
+
canDelete: M.canDelete,
|
|
109
|
+
onClose: I,
|
|
109
110
|
onViewAllDocuments: h,
|
|
110
111
|
onCreateDocument: g,
|
|
111
112
|
formLabels: v,
|
|
@@ -4,26 +4,26 @@ var e = [
|
|
|
4
4
|
25,
|
|
5
5
|
50,
|
|
6
6
|
100
|
|
7
|
-
], t = [
|
|
7
|
+
], t = ["individual", "organization"], n = [
|
|
8
8
|
"issued",
|
|
9
9
|
"overdue",
|
|
10
10
|
"partially_paid",
|
|
11
11
|
"paid"
|
|
12
|
-
],
|
|
12
|
+
], r = [
|
|
13
13
|
"issued",
|
|
14
14
|
"overdue",
|
|
15
15
|
"partially_paid"
|
|
16
|
-
],
|
|
16
|
+
], i = [
|
|
17
17
|
"new",
|
|
18
18
|
"approve_in_progress",
|
|
19
19
|
"waiting_to_be_paid",
|
|
20
20
|
"partially_paid",
|
|
21
21
|
"paid"
|
|
22
|
-
],
|
|
22
|
+
], a = [
|
|
23
23
|
"new",
|
|
24
24
|
"approve_in_progress",
|
|
25
25
|
"waiting_to_be_paid",
|
|
26
26
|
"partially_paid"
|
|
27
|
-
],
|
|
27
|
+
], o = ["rejected"];
|
|
28
28
|
//#endregion
|
|
29
|
-
export { e as PAGE_SIZE_OPTIONS,
|
|
29
|
+
export { e as PAGE_SIZE_OPTIONS, i as PAYABLES_BILLED_STATUSES, a as PAYABLES_OWED_STATUSES, o as PAYABLES_REJECTED_STATUSES, n as RECEIVABLES_BILLED_STATUSES, r as RECEIVABLES_DUE_STATUSES, t as TYPE_FILTER_OPTIONS };
|